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 | namespace Google\Service\Compute\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Compute\InterconnectRemoteLocation;
|
---|
21 | use Google\Service\Compute\InterconnectRemoteLocationList;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "interconnectRemoteLocations" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $computeService = new Google\Service\Compute(...);
|
---|
28 | * $interconnectRemoteLocations = $computeService->interconnectRemoteLocations;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class InterconnectRemoteLocations extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Returns the details for the specified interconnect remote location. Gets a
|
---|
35 | * list of available interconnect remote locations by making a list() request.
|
---|
36 | * (interconnectRemoteLocations.get)
|
---|
37 | *
|
---|
38 | * @param string $project Project ID for this request.
|
---|
39 | * @param string $interconnectRemoteLocation Name of the interconnect remote
|
---|
40 | * location to return.
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @return InterconnectRemoteLocation
|
---|
43 | * @throws \Google\Service\Exception
|
---|
44 | */
|
---|
45 | public function get($project, $interconnectRemoteLocation, $optParams = [])
|
---|
46 | {
|
---|
47 | $params = ['project' => $project, 'interconnectRemoteLocation' => $interconnectRemoteLocation];
|
---|
48 | $params = array_merge($params, $optParams);
|
---|
49 | return $this->call('get', [$params], InterconnectRemoteLocation::class);
|
---|
50 | }
|
---|
51 | /**
|
---|
52 | * Retrieves the list of interconnect remote locations available to the
|
---|
53 | * specified project.
|
---|
54 | * (interconnectRemoteLocations.listInterconnectRemoteLocations)
|
---|
55 | *
|
---|
56 | * @param string $project Project ID for this request.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | *
|
---|
59 | * @opt_param string filter A filter expression that filters resources listed in
|
---|
60 | * the response. Most Compute resources support two types of filter expressions:
|
---|
61 | * expressions that support regular expressions and expressions that follow API
|
---|
62 | * improvement proposal AIP-160. These two types of filter expressions cannot be
|
---|
63 | * mixed in one request. If you want to use AIP-160, your expression must
|
---|
64 | * specify the field name, an operator, and the value that you want to use for
|
---|
65 | * filtering. The value must be a string, a number, or a boolean. The operator
|
---|
66 | * must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you
|
---|
67 | * are filtering Compute Engine instances, you can exclude instances named
|
---|
68 | * `example-instance` by specifying `name != example-instance`. The `:*`
|
---|
69 | * comparison can be used to test whether a key has been defined. For example,
|
---|
70 | * to find all objects with `owner` label use: ``` labels.owner:* ``` You can
|
---|
71 | * also filter nested fields. For example, you could specify
|
---|
72 | * `scheduling.automaticRestart = false` to include instances only if they are
|
---|
73 | * not scheduled for automatic restarts. You can use filtering on nested fields
|
---|
74 | * to filter based on resource labels. To filter on multiple expressions,
|
---|
75 | * provide each separate expression within parentheses. For example: ```
|
---|
76 | * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By
|
---|
77 | * default, each expression is an `AND` expression. However, you can include
|
---|
78 | * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel
|
---|
79 | * Skylake") OR (cpuPlatform = "Intel Broadwell") AND
|
---|
80 | * (scheduling.automaticRestart = true) ``` If you want to use a regular
|
---|
81 | * expression, use the `eq` (equal) or `ne` (not equal) operator against a
|
---|
82 | * single un-parenthesized expression with or without quotes or against multiple
|
---|
83 | * parenthesized expressions. Examples: `fieldname eq unquoted literal`
|
---|
84 | * `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"`
|
---|
85 | * `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is
|
---|
86 | * interpreted as a regular expression using Google RE2 library syntax. The
|
---|
87 | * literal value must match the entire field. For example, to filter for
|
---|
88 | * instances that do not end with name "instance", you would use `name ne
|
---|
89 | * .*instance`. You cannot combine constraints on multiple fields using regular
|
---|
90 | * expressions.
|
---|
91 | * @opt_param string maxResults The maximum number of results per page that
|
---|
92 | * should be returned. If the number of available results is larger than
|
---|
93 | * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to
|
---|
94 | * get the next page of results in subsequent list requests. Acceptable values
|
---|
95 | * are `0` to `500`, inclusive. (Default: `500`)
|
---|
96 | * @opt_param string orderBy Sorts list results by a certain order. By default,
|
---|
97 | * results are returned in alphanumerical order based on the resource name. You
|
---|
98 | * can also sort results in descending order based on the creation timestamp
|
---|
99 | * using `orderBy="creationTimestamp desc"`. This sorts results based on the
|
---|
100 | * `creationTimestamp` field in reverse chronological order (newest result
|
---|
101 | * first). Use this to sort resources like operations so that the newest
|
---|
102 | * operation is returned first. Currently, only sorting by `name` or
|
---|
103 | * `creationTimestamp desc` is supported.
|
---|
104 | * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to
|
---|
105 | * the `nextPageToken` returned by a previous list request to get the next page
|
---|
106 | * of results.
|
---|
107 | * @opt_param bool returnPartialSuccess Opt-in for partial success behavior
|
---|
108 | * which provides partial results in case of failure. The default value is
|
---|
109 | * false. For example, when partial success behavior is enabled, aggregatedList
|
---|
110 | * for a single zone scope either returns all resources in the zone or no
|
---|
111 | * resources, with an error code.
|
---|
112 | * @return InterconnectRemoteLocationList
|
---|
113 | * @throws \Google\Service\Exception
|
---|
114 | */
|
---|
115 | public function listInterconnectRemoteLocations($project, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['project' => $project];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('list', [$params], InterconnectRemoteLocationList::class);
|
---|
120 | }
|
---|
121 | }
|
---|
122 |
|
---|
123 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
124 | class_alias(InterconnectRemoteLocations::class, 'Google_Service_Compute_Resource_InterconnectRemoteLocations');
|
---|