1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Compute\Resource;
19
20use Google\Service\Compute\HealthCheckService;
21use Google\Service\Compute\HealthCheckServicesList;
22use Google\Service\Compute\Operation;
23
24/**
25 * The "regionHealthCheckServices" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $computeService = new Google\Service\Compute(...);
29 *   $regionHealthCheckServices = $computeService->regionHealthCheckServices;
30 *  </code>
31 */
32class RegionHealthCheckServices extends \Google\Service\Resource
33{
34  /**
35   * Deletes the specified regional HealthCheckService.
36   * (regionHealthCheckServices.delete)
37   *
38   * @param string $project Project ID for this request.
39   * @param string $region Name of the region scoping this request.
40   * @param string $healthCheckService Name of the HealthCheckService to delete.
41   * The name must be 1-63 characters long, and comply with RFC1035.
42   * @param array $optParams Optional parameters.
43   *
44   * @opt_param string requestId An optional request ID to identify requests.
45   * Specify a unique request ID so that if you must retry your request, the
46   * server will know to ignore the request if it has already been completed. For
47   * example, consider a situation where you make an initial request and the
48   * request times out. If you make the request again with the same request ID,
49   * the server can check if original operation with the same request ID was
50   * received, and if so, will ignore the second request. This prevents clients
51   * from accidentally creating duplicate commitments. The request ID must be a
52   * valid UUID with the exception that zero UUID is not supported (
53   * 00000000-0000-0000-0000-000000000000).
54   * @return Operation
55   */
56  public function delete($project, $region, $healthCheckService, $optParams = [])
57  {
58    $params = ['project' => $project, 'region' => $region, 'healthCheckService' => $healthCheckService];
59    $params = array_merge($params, $optParams);
60    return $this->call('delete', [$params], Operation::class);
61  }
62  /**
63   * Returns the specified regional HealthCheckService resource.
64   * (regionHealthCheckServices.get)
65   *
66   * @param string $project Project ID for this request.
67   * @param string $region Name of the region scoping this request.
68   * @param string $healthCheckService Name of the HealthCheckService to update.
69   * The name must be 1-63 characters long, and comply with RFC1035.
70   * @param array $optParams Optional parameters.
71   * @return HealthCheckService
72   */
73  public function get($project, $region, $healthCheckService, $optParams = [])
74  {
75    $params = ['project' => $project, 'region' => $region, 'healthCheckService' => $healthCheckService];
76    $params = array_merge($params, $optParams);
77    return $this->call('get', [$params], HealthCheckService::class);
78  }
79  /**
80   * Creates a regional HealthCheckService resource in the specified project and
81   * region using the data included in the request.
82   * (regionHealthCheckServices.insert)
83   *
84   * @param string $project Project ID for this request.
85   * @param string $region Name of the region scoping this request.
86   * @param HealthCheckService $postBody
87   * @param array $optParams Optional parameters.
88   *
89   * @opt_param string requestId An optional request ID to identify requests.
90   * Specify a unique request ID so that if you must retry your request, the
91   * server will know to ignore the request if it has already been completed. For
92   * example, consider a situation where you make an initial request and the
93   * request times out. If you make the request again with the same request ID,
94   * the server can check if original operation with the same request ID was
95   * received, and if so, will ignore the second request. This prevents clients
96   * from accidentally creating duplicate commitments. The request ID must be a
97   * valid UUID with the exception that zero UUID is not supported (
98   * 00000000-0000-0000-0000-000000000000).
99   * @return Operation
100   */
101  public function insert($project, $region, HealthCheckService $postBody, $optParams = [])
102  {
103    $params = ['project' => $project, 'region' => $region, 'postBody' => $postBody];
104    $params = array_merge($params, $optParams);
105    return $this->call('insert', [$params], Operation::class);
106  }
107  /**
108   * Lists all the HealthCheckService resources that have been configured for the
109   * specified project in the given region.
110   * (regionHealthCheckServices.listRegionHealthCheckServices)
111   *
112   * @param string $project Project ID for this request.
113   * @param string $region Name of the region scoping this request.
114   * @param array $optParams Optional parameters.
115   *
116   * @opt_param string filter A filter expression that filters resources listed in
117   * the response. The expression must specify the field name, an operator, and
118   * the value that you want to use for filtering. The value must be a string, a
119   * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`,
120   * `>=` or `:`. For example, if you are filtering Compute Engine instances, you
121   * can exclude instances named `example-instance` by specifying `name !=
122   * example-instance`. The `:` operator can be used with string fields to match
123   * substrings. For non-string fields it is equivalent to the `=` operator. The
124   * `:*` comparison can be used to test whether a key has been defined. For
125   * example, to find all objects with `owner` label use: ``` labels.owner:* ```
126   * You can also filter nested fields. For example, you could specify
127   * `scheduling.automaticRestart = false` to include instances only if they are
128   * not scheduled for automatic restarts. You can use filtering on nested fields
129   * to filter based on resource labels. To filter on multiple expressions,
130   * provide each separate expression within parentheses. For example: ```
131   * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
132   * default, each expression is an `AND` expression. However, you can include
133   * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
134   * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
135   * (scheduling.automaticRestart = true) ```
136   * @opt_param string maxResults The maximum number of results per page that
137   * should be returned. If the number of available results is larger than
138   * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
139   * get the next page of results in subsequent list requests. Acceptable values
140   * are `0` to `500`, inclusive. (Default: `500`)
141   * @opt_param string orderBy Sorts list results by a certain order. By default,
142   * results are returned in alphanumerical order based on the resource name. You
143   * can also sort results in descending order based on the creation timestamp
144   * using `orderBy="creationTimestamp desc"`. This sorts results based on the
145   * `creationTimestamp` field in reverse chronological order (newest result
146   * first). Use this to sort resources like operations so that the newest
147   * operation is returned first. Currently, only sorting by `name` or
148   * `creationTimestamp desc` is supported.
149   * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
150   * the `nextPageToken` returned by a previous list request to get the next page
151   * of results.
152   * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
153   * which provides partial results in case of failure. The default value is
154   * false.
155   * @return HealthCheckServicesList
156   */
157  public function listRegionHealthCheckServices($project, $region, $optParams = [])
158  {
159    $params = ['project' => $project, 'region' => $region];
160    $params = array_merge($params, $optParams);
161    return $this->call('list', [$params], HealthCheckServicesList::class);
162  }
163  /**
164   * Updates the specified regional HealthCheckService resource with the data
165   * included in the request. This method supports PATCH semantics and uses the
166   * JSON merge patch format and processing rules.
167   * (regionHealthCheckServices.patch)
168   *
169   * @param string $project Project ID for this request.
170   * @param string $region Name of the region scoping this request.
171   * @param string $healthCheckService Name of the HealthCheckService to update.
172   * The name must be 1-63 characters long, and comply with RFC1035.
173   * @param HealthCheckService $postBody
174   * @param array $optParams Optional parameters.
175   *
176   * @opt_param string requestId An optional request ID to identify requests.
177   * Specify a unique request ID so that if you must retry your request, the
178   * server will know to ignore the request if it has already been completed. For
179   * example, consider a situation where you make an initial request and the
180   * request times out. If you make the request again with the same request ID,
181   * the server can check if original operation with the same request ID was
182   * received, and if so, will ignore the second request. This prevents clients
183   * from accidentally creating duplicate commitments. The request ID must be a
184   * valid UUID with the exception that zero UUID is not supported (
185   * 00000000-0000-0000-0000-000000000000).
186   * @return Operation
187   */
188  public function patch($project, $region, $healthCheckService, HealthCheckService $postBody, $optParams = [])
189  {
190    $params = ['project' => $project, 'region' => $region, 'healthCheckService' => $healthCheckService, 'postBody' => $postBody];
191    $params = array_merge($params, $optParams);
192    return $this->call('patch', [$params], Operation::class);
193  }
194}
195
196// Adding a class alias for backwards compatibility with the previous class name.
197class_alias(RegionHealthCheckServices::class, 'Google_Service_Compute_Resource_RegionHealthCheckServices');
198