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