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\InterconnectLocation; 21use Google\Service\Compute\InterconnectLocationList; 22 23/** 24 * The "interconnectLocations" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $computeService = new Google\Service\Compute(...); 28 * $interconnectLocations = $computeService->interconnectLocations; 29 * </code> 30 */ 31class InterconnectLocations extends \Google\Service\Resource 32{ 33 /** 34 * Returns the details for the specified interconnect location. Gets a list of 35 * available interconnect locations by making a list() request. 36 * (interconnectLocations.get) 37 * 38 * @param string $project Project ID for this request. 39 * @param string $interconnectLocation Name of the interconnect location to 40 * return. 41 * @param array $optParams Optional parameters. 42 * @return InterconnectLocation 43 */ 44 public function get($project, $interconnectLocation, $optParams = []) 45 { 46 $params = ['project' => $project, 'interconnectLocation' => $interconnectLocation]; 47 $params = array_merge($params, $optParams); 48 return $this->call('get', [$params], InterconnectLocation::class); 49 } 50 /** 51 * Retrieves the list of interconnect locations available to the specified 52 * project. (interconnectLocations.listInterconnectLocations) 53 * 54 * @param string $project Project ID for this request. 55 * @param array $optParams Optional parameters. 56 * 57 * @opt_param string filter A filter expression that filters resources listed in 58 * the response. The expression must specify the field name, an operator, and 59 * the value that you want to use for filtering. The value must be a string, a 60 * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 61 * `>=` or `:`. For example, if you are filtering Compute Engine instances, you 62 * can exclude instances named `example-instance` by specifying `name != 63 * example-instance`. The `:` operator can be used with string fields to match 64 * substrings. For non-string fields it is equivalent to the `=` operator. The 65 * `:*` comparison can be used to test whether a key has been defined. For 66 * example, to find all objects with `owner` label use: ``` labels.owner:* ``` 67 * You can also filter nested fields. For example, you could specify 68 * `scheduling.automaticRestart = false` to include instances only if they are 69 * not scheduled for automatic restarts. You can use filtering on nested fields 70 * to filter based on resource labels. To filter on multiple expressions, 71 * provide each separate expression within parentheses. For example: ``` 72 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By 73 * default, each expression is an `AND` expression. However, you can include 74 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel 75 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND 76 * (scheduling.automaticRestart = true) ``` 77 * @opt_param string maxResults The maximum number of results per page that 78 * should be returned. If the number of available results is larger than 79 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to 80 * get the next page of results in subsequent list requests. Acceptable values 81 * are `0` to `500`, inclusive. (Default: `500`) 82 * @opt_param string orderBy Sorts list results by a certain order. By default, 83 * results are returned in alphanumerical order based on the resource name. You 84 * can also sort results in descending order based on the creation timestamp 85 * using `orderBy="creationTimestamp desc"`. This sorts results based on the 86 * `creationTimestamp` field in reverse chronological order (newest result 87 * first). Use this to sort resources like operations so that the newest 88 * operation is returned first. Currently, only sorting by `name` or 89 * `creationTimestamp desc` is supported. 90 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to 91 * the `nextPageToken` returned by a previous list request to get the next page 92 * of results. 93 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior 94 * which provides partial results in case of failure. The default value is 95 * false. 96 * @return InterconnectLocationList 97 */ 98 public function listInterconnectLocations($project, $optParams = []) 99 { 100 $params = ['project' => $project]; 101 $params = array_merge($params, $optParams); 102 return $this->call('list', [$params], InterconnectLocationList::class); 103 } 104} 105 106// Adding a class alias for backwards compatibility with the previous class name. 107class_alias(InterconnectLocations::class, 'Google_Service_Compute_Resource_InterconnectLocations'); 108