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\SslPolicyReference; 22use Google\Service\Compute\TargetHttpsProxiesSetQuicOverrideRequest; 23use Google\Service\Compute\TargetHttpsProxiesSetSslCertificatesRequest; 24use Google\Service\Compute\TargetHttpsProxy; 25use Google\Service\Compute\TargetHttpsProxyAggregatedList; 26use Google\Service\Compute\TargetHttpsProxyList; 27use Google\Service\Compute\UrlMapReference; 28 29/** 30 * The "targetHttpsProxies" collection of methods. 31 * Typical usage is: 32 * <code> 33 * $computeService = new Google\Service\Compute(...); 34 * $targetHttpsProxies = $computeService->targetHttpsProxies; 35 * </code> 36 */ 37class TargetHttpsProxies extends \Google\Service\Resource 38{ 39 /** 40 * Retrieves the list of all TargetHttpsProxy resources, regional and global, 41 * available to the specified project. (targetHttpsProxies.aggregatedList) 42 * 43 * @param string $project Name of the project scoping this request. 44 * @param array $optParams Optional parameters. 45 * 46 * @opt_param string filter A filter expression that filters resources listed in 47 * the response. The expression must specify the field name, an operator, and 48 * the value that you want to use for filtering. The value must be a string, a 49 * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 50 * `>=` or `:`. For example, if you are filtering Compute Engine instances, you 51 * can exclude instances named `example-instance` by specifying `name != 52 * example-instance`. The `:` operator can be used with string fields to match 53 * substrings. For non-string fields it is equivalent to the `=` operator. The 54 * `:*` comparison can be used to test whether a key has been defined. For 55 * example, to find all objects with `owner` label use: ``` labels.owner:* ``` 56 * You can also filter nested fields. For example, you could specify 57 * `scheduling.automaticRestart = false` to include instances only if they are 58 * not scheduled for automatic restarts. You can use filtering on nested fields 59 * to filter based on resource labels. To filter on multiple expressions, 60 * provide each separate expression within parentheses. For example: ``` 61 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By 62 * default, each expression is an `AND` expression. However, you can include 63 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel 64 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND 65 * (scheduling.automaticRestart = true) ``` 66 * @opt_param bool includeAllScopes Indicates whether every visible scope for 67 * each scope type (zone, region, global) should be included in the response. 68 * For new resource types added after this field, the flag has no effect as new 69 * resource types will always include every visible scope for each scope type in 70 * response. For resource types which predate this field, if this flag is 71 * omitted or false, only scopes of the scope types where the resource type is 72 * expected to be found will be included. 73 * @opt_param string maxResults The maximum number of results per page that 74 * should be returned. If the number of available results is larger than 75 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to 76 * get the next page of results in subsequent list requests. Acceptable values 77 * are `0` to `500`, inclusive. (Default: `500`) 78 * @opt_param string orderBy Sorts list results by a certain order. By default, 79 * results are returned in alphanumerical order based on the resource name. You 80 * can also sort results in descending order based on the creation timestamp 81 * using `orderBy="creationTimestamp desc"`. This sorts results based on the 82 * `creationTimestamp` field in reverse chronological order (newest result 83 * first). Use this to sort resources like operations so that the newest 84 * operation is returned first. Currently, only sorting by `name` or 85 * `creationTimestamp desc` is supported. 86 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to 87 * the `nextPageToken` returned by a previous list request to get the next page 88 * of results. 89 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior 90 * which provides partial results in case of failure. The default value is 91 * false. 92 * @return TargetHttpsProxyAggregatedList 93 */ 94 public function aggregatedList($project, $optParams = []) 95 { 96 $params = ['project' => $project]; 97 $params = array_merge($params, $optParams); 98 return $this->call('aggregatedList', [$params], TargetHttpsProxyAggregatedList::class); 99 } 100 /** 101 * Deletes the specified TargetHttpsProxy resource. (targetHttpsProxies.delete) 102 * 103 * @param string $project Project ID for this request. 104 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to 105 * delete. 106 * @param array $optParams Optional parameters. 107 * 108 * @opt_param string requestId An optional request ID to identify requests. 109 * Specify a unique request ID so that if you must retry your request, the 110 * server will know to ignore the request if it has already been completed. For 111 * example, consider a situation where you make an initial request and the 112 * request times out. If you make the request again with the same request ID, 113 * the server can check if original operation with the same request ID was 114 * received, and if so, will ignore the second request. This prevents clients 115 * from accidentally creating duplicate commitments. The request ID must be a 116 * valid UUID with the exception that zero UUID is not supported ( 117 * 00000000-0000-0000-0000-000000000000). 118 * @return Operation 119 */ 120 public function delete($project, $targetHttpsProxy, $optParams = []) 121 { 122 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy]; 123 $params = array_merge($params, $optParams); 124 return $this->call('delete', [$params], Operation::class); 125 } 126 /** 127 * Returns the specified TargetHttpsProxy resource. Gets a list of available 128 * target HTTPS proxies by making a list() request. (targetHttpsProxies.get) 129 * 130 * @param string $project Project ID for this request. 131 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to 132 * return. 133 * @param array $optParams Optional parameters. 134 * @return TargetHttpsProxy 135 */ 136 public function get($project, $targetHttpsProxy, $optParams = []) 137 { 138 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy]; 139 $params = array_merge($params, $optParams); 140 return $this->call('get', [$params], TargetHttpsProxy::class); 141 } 142 /** 143 * Creates a TargetHttpsProxy resource in the specified project using the data 144 * included in the request. (targetHttpsProxies.insert) 145 * 146 * @param string $project Project ID for this request. 147 * @param TargetHttpsProxy $postBody 148 * @param array $optParams Optional parameters. 149 * 150 * @opt_param string requestId An optional request ID to identify requests. 151 * Specify a unique request ID so that if you must retry your request, the 152 * server will know to ignore the request if it has already been completed. For 153 * example, consider a situation where you make an initial request and the 154 * request times out. If you make the request again with the same request ID, 155 * the server can check if original operation with the same request ID was 156 * received, and if so, will ignore the second request. This prevents clients 157 * from accidentally creating duplicate commitments. The request ID must be a 158 * valid UUID with the exception that zero UUID is not supported ( 159 * 00000000-0000-0000-0000-000000000000). 160 * @return Operation 161 */ 162 public function insert($project, TargetHttpsProxy $postBody, $optParams = []) 163 { 164 $params = ['project' => $project, 'postBody' => $postBody]; 165 $params = array_merge($params, $optParams); 166 return $this->call('insert', [$params], Operation::class); 167 } 168 /** 169 * Retrieves the list of TargetHttpsProxy resources available to the specified 170 * project. (targetHttpsProxies.listTargetHttpsProxies) 171 * 172 * @param string $project Project ID for this request. 173 * @param array $optParams Optional parameters. 174 * 175 * @opt_param string filter A filter expression that filters resources listed in 176 * the response. The expression must specify the field name, an operator, and 177 * the value that you want to use for filtering. The value must be a string, a 178 * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 179 * `>=` or `:`. For example, if you are filtering Compute Engine instances, you 180 * can exclude instances named `example-instance` by specifying `name != 181 * example-instance`. The `:` operator can be used with string fields to match 182 * substrings. For non-string fields it is equivalent to the `=` operator. The 183 * `:*` comparison can be used to test whether a key has been defined. For 184 * example, to find all objects with `owner` label use: ``` labels.owner:* ``` 185 * You can also filter nested fields. For example, you could specify 186 * `scheduling.automaticRestart = false` to include instances only if they are 187 * not scheduled for automatic restarts. You can use filtering on nested fields 188 * to filter based on resource labels. To filter on multiple expressions, 189 * provide each separate expression within parentheses. For example: ``` 190 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By 191 * default, each expression is an `AND` expression. However, you can include 192 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel 193 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND 194 * (scheduling.automaticRestart = true) ``` 195 * @opt_param string maxResults The maximum number of results per page that 196 * should be returned. If the number of available results is larger than 197 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to 198 * get the next page of results in subsequent list requests. Acceptable values 199 * are `0` to `500`, inclusive. (Default: `500`) 200 * @opt_param string orderBy Sorts list results by a certain order. By default, 201 * results are returned in alphanumerical order based on the resource name. You 202 * can also sort results in descending order based on the creation timestamp 203 * using `orderBy="creationTimestamp desc"`. This sorts results based on the 204 * `creationTimestamp` field in reverse chronological order (newest result 205 * first). Use this to sort resources like operations so that the newest 206 * operation is returned first. Currently, only sorting by `name` or 207 * `creationTimestamp desc` is supported. 208 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to 209 * the `nextPageToken` returned by a previous list request to get the next page 210 * of results. 211 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior 212 * which provides partial results in case of failure. The default value is 213 * false. 214 * @return TargetHttpsProxyList 215 */ 216 public function listTargetHttpsProxies($project, $optParams = []) 217 { 218 $params = ['project' => $project]; 219 $params = array_merge($params, $optParams); 220 return $this->call('list', [$params], TargetHttpsProxyList::class); 221 } 222 /** 223 * Patches the specified TargetHttpsProxy resource with the data included in the 224 * request. This method supports PATCH semantics and uses JSON merge patch 225 * format and processing rules. (targetHttpsProxies.patch) 226 * 227 * @param string $project Project ID for this request. 228 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to 229 * patch. 230 * @param TargetHttpsProxy $postBody 231 * @param array $optParams Optional parameters. 232 * 233 * @opt_param string requestId An optional request ID to identify requests. 234 * Specify a unique request ID so that if you must retry your request, the 235 * server will know to ignore the request if it has already been completed. For 236 * example, consider a situation where you make an initial request and the 237 * request times out. If you make the request again with the same request ID, 238 * the server can check if original operation with the same request ID was 239 * received, and if so, will ignore the second request. This prevents clients 240 * from accidentally creating duplicate commitments. The request ID must be a 241 * valid UUID with the exception that zero UUID is not supported ( 242 * 00000000-0000-0000-0000-000000000000). 243 * @return Operation 244 */ 245 public function patch($project, $targetHttpsProxy, TargetHttpsProxy $postBody, $optParams = []) 246 { 247 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody]; 248 $params = array_merge($params, $optParams); 249 return $this->call('patch', [$params], Operation::class); 250 } 251 /** 252 * Sets the QUIC override policy for TargetHttpsProxy. 253 * (targetHttpsProxies.setQuicOverride) 254 * 255 * @param string $project Project ID for this request. 256 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to set 257 * the QUIC override policy for. The name should conform to RFC1035. 258 * @param TargetHttpsProxiesSetQuicOverrideRequest $postBody 259 * @param array $optParams Optional parameters. 260 * 261 * @opt_param string requestId An optional request ID to identify requests. 262 * Specify a unique request ID so that if you must retry your request, the 263 * server will know to ignore the request if it has already been completed. For 264 * example, consider a situation where you make an initial request and the 265 * request times out. If you make the request again with the same request ID, 266 * the server can check if original operation with the same request ID was 267 * received, and if so, will ignore the second request. This prevents clients 268 * from accidentally creating duplicate commitments. The request ID must be a 269 * valid UUID with the exception that zero UUID is not supported ( 270 * 00000000-0000-0000-0000-000000000000). 271 * @return Operation 272 */ 273 public function setQuicOverride($project, $targetHttpsProxy, TargetHttpsProxiesSetQuicOverrideRequest $postBody, $optParams = []) 274 { 275 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody]; 276 $params = array_merge($params, $optParams); 277 return $this->call('setQuicOverride', [$params], Operation::class); 278 } 279 /** 280 * Replaces SslCertificates for TargetHttpsProxy. 281 * (targetHttpsProxies.setSslCertificates) 282 * 283 * @param string $project Project ID for this request. 284 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource to set 285 * an SslCertificates resource for. 286 * @param TargetHttpsProxiesSetSslCertificatesRequest $postBody 287 * @param array $optParams Optional parameters. 288 * 289 * @opt_param string requestId An optional request ID to identify requests. 290 * Specify a unique request ID so that if you must retry your request, the 291 * server will know to ignore the request if it has already been completed. For 292 * example, consider a situation where you make an initial request and the 293 * request times out. If you make the request again with the same request ID, 294 * the server can check if original operation with the same request ID was 295 * received, and if so, will ignore the second request. This prevents clients 296 * from accidentally creating duplicate commitments. The request ID must be a 297 * valid UUID with the exception that zero UUID is not supported ( 298 * 00000000-0000-0000-0000-000000000000). 299 * @return Operation 300 */ 301 public function setSslCertificates($project, $targetHttpsProxy, TargetHttpsProxiesSetSslCertificatesRequest $postBody, $optParams = []) 302 { 303 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody]; 304 $params = array_merge($params, $optParams); 305 return $this->call('setSslCertificates', [$params], Operation::class); 306 } 307 /** 308 * Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the 309 * server-side support for SSL features. This affects connections between 310 * clients and the HTTPS proxy load balancer. They do not affect the connection 311 * between the load balancer and the backends. (targetHttpsProxies.setSslPolicy) 312 * 313 * @param string $project Project ID for this request. 314 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource whose 315 * SSL policy is to be set. The name must be 1-63 characters long, and comply 316 * with RFC1035. 317 * @param SslPolicyReference $postBody 318 * @param array $optParams Optional parameters. 319 * 320 * @opt_param string requestId An optional request ID to identify requests. 321 * Specify a unique request ID so that if you must retry your request, the 322 * server will know to ignore the request if it has already been completed. For 323 * example, consider a situation where you make an initial request and the 324 * request times out. If you make the request again with the same request ID, 325 * the server can check if original operation with the same request ID was 326 * received, and if so, will ignore the second request. This prevents clients 327 * from accidentally creating duplicate commitments. The request ID must be a 328 * valid UUID with the exception that zero UUID is not supported ( 329 * 00000000-0000-0000-0000-000000000000). 330 * @return Operation 331 */ 332 public function setSslPolicy($project, $targetHttpsProxy, SslPolicyReference $postBody, $optParams = []) 333 { 334 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody]; 335 $params = array_merge($params, $optParams); 336 return $this->call('setSslPolicy', [$params], Operation::class); 337 } 338 /** 339 * Changes the URL map for TargetHttpsProxy. (targetHttpsProxies.setUrlMap) 340 * 341 * @param string $project Project ID for this request. 342 * @param string $targetHttpsProxy Name of the TargetHttpsProxy resource whose 343 * URL map is to be set. 344 * @param UrlMapReference $postBody 345 * @param array $optParams Optional parameters. 346 * 347 * @opt_param string requestId An optional request ID to identify requests. 348 * Specify a unique request ID so that if you must retry your request, the 349 * server will know to ignore the request if it has already been completed. For 350 * example, consider a situation where you make an initial request and the 351 * request times out. If you make the request again with the same request ID, 352 * the server can check if original operation with the same request ID was 353 * received, and if so, will ignore the second request. This prevents clients 354 * from accidentally creating duplicate commitments. The request ID must be a 355 * valid UUID with the exception that zero UUID is not supported ( 356 * 00000000-0000-0000-0000-000000000000). 357 * @return Operation 358 */ 359 public function setUrlMap($project, $targetHttpsProxy, UrlMapReference $postBody, $optParams = []) 360 { 361 $params = ['project' => $project, 'targetHttpsProxy' => $targetHttpsProxy, 'postBody' => $postBody]; 362 $params = array_merge($params, $optParams); 363 return $this->call('setUrlMap', [$params], Operation::class); 364 } 365} 366 367// Adding a class alias for backwards compatibility with the previous class name. 368class_alias(TargetHttpsProxies::class, 'Google_Service_Compute_Resource_TargetHttpsProxies'); 369