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