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\Operation;
21use Google\Service\Compute\RegionTargetHttpsProxiesSetSslCertificatesRequest;
22use Google\Service\Compute\TargetHttpsProxy;
23use Google\Service\Compute\TargetHttpsProxyList;
24use Google\Service\Compute\UrlMapReference;
25
26/**
27 * The "regionTargetHttpsProxies" collection of methods.
28 * Typical usage is:
29 *  <code>
30 *   $computeService = new Google\Service\Compute(...);
31 *   $regionTargetHttpsProxies = $computeService->regionTargetHttpsProxies;
32 *  </code>
33 */
34class RegionTargetHttpsProxies extends \Google\Service\Resource
35{
36  /**
37   * Deletes the specified TargetHttpsProxy resource.
38   * (regionTargetHttpsProxies.delete)
39   *
40   * @param string $project Project ID for this request.
41   * @param string $region Name of the region scoping this request.
42   * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to
43   * delete.
44   * @param array $optParams Optional parameters.
45   *
46   * @opt_param string requestId An optional request ID to identify requests.
47   * Specify a unique request ID so that if you must retry your request, the
48   * server will know to ignore the request if it has already been completed. For
49   * example, consider a situation where you make an initial request and the
50   * request times out. If you make the request again with the same request ID,
51   * the server can check if original operation with the same request ID was
52   * received, and if so, will ignore the second request. This prevents clients
53   * from accidentally creating duplicate commitments. The request ID must be a
54   * valid UUID with the exception that zero UUID is not supported (
55   * 00000000-0000-0000-0000-000000000000).
56   * @return Operation
57   */
58  public function delete($project, $region, $targetHttpsProxy, $optParams = [])
59  {
60    $params = ['project' => $project, 'region' => $region, 'targetHttpsProxy' => $targetHttpsProxy];
61    $params = array_merge($params, $optParams);
62    return $this->call('delete', [$params], Operation::class);
63  }
64  /**
65   * Returns the specified TargetHttpsProxy resource in the specified region. Gets
66   * a list of available target HTTP proxies by making a list() request.
67   * (regionTargetHttpsProxies.get)
68   *
69   * @param string $project Project ID for this request.
70   * @param string $region Name of the region scoping this request.
71   * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to
72   * return.
73   * @param array $optParams Optional parameters.
74   * @return TargetHttpsProxy
75   */
76  public function get($project, $region, $targetHttpsProxy, $optParams = [])
77  {
78    $params = ['project' => $project, 'region' => $region, 'targetHttpsProxy' => $targetHttpsProxy];
79    $params = array_merge($params, $optParams);
80    return $this->call('get', [$params], TargetHttpsProxy::class);
81  }
82  /**
83   * Creates a TargetHttpsProxy resource in the specified project and region using
84   * the data included in the request. (regionTargetHttpsProxies.insert)
85   *
86   * @param string $project Project ID for this request.
87   * @param string $region Name of the region scoping this request.
88   * @param TargetHttpsProxy $postBody
89   * @param array $optParams Optional parameters.
90   *
91   * @opt_param string requestId An optional request ID to identify requests.
92   * Specify a unique request ID so that if you must retry your request, the
93   * server will know to ignore the request if it has already been completed. For
94   * example, consider a situation where you make an initial request and the
95   * request times out. If you make the request again with the same request ID,
96   * the server can check if original operation with the same request ID was
97   * received, and if so, will ignore the second request. This prevents clients
98   * from accidentally creating duplicate commitments. The request ID must be a
99   * valid UUID with the exception that zero UUID is not supported (
100   * 00000000-0000-0000-0000-000000000000).
101   * @return Operation
102   */
103  public function insert($project, $region, TargetHttpsProxy $postBody, $optParams = [])
104  {
105    $params = ['project' => $project, 'region' => $region, 'postBody' => $postBody];
106    $params = array_merge($params, $optParams);
107    return $this->call('insert', [$params], Operation::class);
108  }
109  /**
110   * Retrieves the list of TargetHttpsProxy resources available to the specified
111   * project in the specified region.
112   * (regionTargetHttpsProxies.listRegionTargetHttpsProxies)
113   *
114   * @param string $project Project ID for this request.
115   * @param string $region Name of the region scoping this request.
116   * @param array $optParams Optional parameters.
117   *
118   * @opt_param string filter A filter expression that filters resources listed in
119   * the response. The expression must specify the field name, an operator, and
120   * the value that you want to use for filtering. The value must be a string, a
121   * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`,
122   * `>=` or `:`. For example, if you are filtering Compute Engine instances, you
123   * can exclude instances named `example-instance` by specifying `name !=
124   * example-instance`. The `:` operator can be used with string fields to match
125   * substrings. For non-string fields it is equivalent to the `=` operator. The
126   * `:*` comparison can be used to test whether a key has been defined. For
127   * example, to find all objects with `owner` label use: ``` labels.owner:* ```
128   * You can also filter nested fields. For example, you could specify
129   * `scheduling.automaticRestart = false` to include instances only if they are
130   * not scheduled for automatic restarts. You can use filtering on nested fields
131   * to filter based on resource labels. To filter on multiple expressions,
132   * provide each separate expression within parentheses. For example: ```
133   * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
134   * default, each expression is an `AND` expression. However, you can include
135   * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
136   * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
137   * (scheduling.automaticRestart = true) ```
138   * @opt_param string maxResults The maximum number of results per page that
139   * should be returned. If the number of available results is larger than
140   * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
141   * get the next page of results in subsequent list requests. Acceptable values
142   * are `0` to `500`, inclusive. (Default: `500`)
143   * @opt_param string orderBy Sorts list results by a certain order. By default,
144   * results are returned in alphanumerical order based on the resource name. You
145   * can also sort results in descending order based on the creation timestamp
146   * using `orderBy="creationTimestamp desc"`. This sorts results based on the
147   * `creationTimestamp` field in reverse chronological order (newest result
148   * first). Use this to sort resources like operations so that the newest
149   * operation is returned first. Currently, only sorting by `name` or
150   * `creationTimestamp desc` is supported.
151   * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
152   * the `nextPageToken` returned by a previous list request to get the next page
153   * of results.
154   * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
155   * which provides partial results in case of failure. The default value is
156   * false.
157   * @return TargetHttpsProxyList
158   */
159  public function listRegionTargetHttpsProxies($project, $region, $optParams = [])
160  {
161    $params = ['project' => $project, 'region' => $region];
162    $params = array_merge($params, $optParams);
163    return $this->call('list', [$params], TargetHttpsProxyList::class);
164  }
165  /**
166   * Patches the specified regional TargetHttpsProxy resource with the data
167   * included in the request. This method supports PATCH semantics and uses JSON
168   * merge patch format and processing rules. (regionTargetHttpsProxies.patch)
169   *
170   * @param string $project Project ID for this request.
171   * @param string $region Name of the region for this request.
172   * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to
173   * patch.
174   * @param TargetHttpsProxy $postBody
175   * @param array $optParams Optional parameters.
176   *
177   * @opt_param string requestId An optional request ID to identify requests.
178   * Specify a unique request ID so that if you must retry your request, the
179   * server will know to ignore the request if it has already been completed. For
180   * example, consider a situation where you make an initial request and the
181   * request times out. If you make the request again with the same request ID,
182   * the server can check if original operation with the same request ID was
183   * received, and if so, will ignore the second request. This prevents clients
184   * from accidentally creating duplicate commitments. The request ID must be a
185   * valid UUID with the exception that zero UUID is not supported (
186   * 00000000-0000-0000-0000-000000000000).
187   * @return Operation
188   */
189  public function patch($project, $region, $targetHttpsProxy, TargetHttpsProxy $postBody, $optParams = [])
190  {
191    $params = ['project' => $project, 'region' => $region, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody];
192    $params = array_merge($params, $optParams);
193    return $this->call('patch', [$params], Operation::class);
194  }
195  /**
196   * Replaces SslCertificates for TargetHttpsProxy.
197   * (regionTargetHttpsProxies.setSslCertificates)
198   *
199   * @param string $project Project ID for this request.
200   * @param string $region Name of the region scoping this request.
201   * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to set
202   * an SslCertificates resource for.
203   * @param RegionTargetHttpsProxiesSetSslCertificatesRequest $postBody
204   * @param array $optParams Optional parameters.
205   *
206   * @opt_param string requestId An optional request ID to identify requests.
207   * Specify a unique request ID so that if you must retry your request, the
208   * server will know to ignore the request if it has already been completed. For
209   * example, consider a situation where you make an initial request and the
210   * request times out. If you make the request again with the same request ID,
211   * the server can check if original operation with the same request ID was
212   * received, and if so, will ignore the second request. This prevents clients
213   * from accidentally creating duplicate commitments. The request ID must be a
214   * valid UUID with the exception that zero UUID is not supported (
215   * 00000000-0000-0000-0000-000000000000).
216   * @return Operation
217   */
218  public function setSslCertificates($project, $region, $targetHttpsProxy, RegionTargetHttpsProxiesSetSslCertificatesRequest $postBody, $optParams = [])
219  {
220    $params = ['project' => $project, 'region' => $region, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody];
221    $params = array_merge($params, $optParams);
222    return $this->call('setSslCertificates', [$params], Operation::class);
223  }
224  /**
225   * Changes the URL map for TargetHttpsProxy.
226   * (regionTargetHttpsProxies.setUrlMap)
227   *
228   * @param string $project Project ID for this request.
229   * @param string $region Name of the region scoping this request.
230   * @param string $targetHttpsProxy Name of the TargetHttpsProxy to set a URL map
231   * for.
232   * @param UrlMapReference $postBody
233   * @param array $optParams Optional parameters.
234   *
235   * @opt_param string requestId An optional request ID to identify requests.
236   * Specify a unique request ID so that if you must retry your request, the
237   * server will know to ignore the request if it has already been completed. For
238   * example, consider a situation where you make an initial request and the
239   * request times out. If you make the request again with the same request ID,
240   * the server can check if original operation with the same request ID was
241   * received, and if so, will ignore the second request. This prevents clients
242   * from accidentally creating duplicate commitments. The request ID must be a
243   * valid UUID with the exception that zero UUID is not supported (
244   * 00000000-0000-0000-0000-000000000000).
245   * @return Operation
246   */
247  public function setUrlMap($project, $region, $targetHttpsProxy, UrlMapReference $postBody, $optParams = [])
248  {
249    $params = ['project' => $project, 'region' => $region, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody];
250    $params = array_merge($params, $optParams);
251    return $this->call('setUrlMap', [$params], Operation::class);
252  }
253}
254
255// Adding a class alias for backwards compatibility with the previous class name.
256class_alias(RegionTargetHttpsProxies::class, 'Google_Service_Compute_Resource_RegionTargetHttpsProxies');
257