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