source: vendor/google/apiclient-services/src/VMwareEngine/Resource/ProjectsLocationsNetworkPeerings.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 3 weeks ago

Upload new project files

  • Property mode set to 100644
File size: 11.2 KB
Line 
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\VMwareEngine\Resource;
19
20use Google\Service\VMwareEngine\ListNetworkPeeringsResponse;
21use Google\Service\VMwareEngine\NetworkPeering;
22use Google\Service\VMwareEngine\Operation;
23
24/**
25 * The "networkPeerings" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $vmwareengineService = new Google\Service\VMwareEngine(...);
29 * $networkPeerings = $vmwareengineService->projects_locations_networkPeerings;
30 * </code>
31 */
32class ProjectsLocationsNetworkPeerings extends \Google\Service\Resource
33{
34 /**
35 * Creates a new network peering between the peer network and VMware Engine
36 * network provided in a `NetworkPeering` resource. NetworkPeering is a global
37 * resource and location can only be global. (networkPeerings.create)
38 *
39 * @param string $parent Required. The resource name of the location to create
40 * the new network peering in. This value is always `global`, because
41 * `NetworkPeering` is a global resource. Resource names are schemeless URIs
42 * that follow the conventions in
43 * https://cloud.google.com/apis/design/resource_names. For example:
44 * `projects/my-project/locations/global`
45 * @param NetworkPeering $postBody
46 * @param array $optParams Optional parameters.
47 *
48 * @opt_param string networkPeeringId Required. The user-provided identifier of
49 * the new `NetworkPeering`. This identifier must be unique among
50 * `NetworkPeering` resources within the parent and becomes the final token in
51 * the name URI. The identifier must meet the following requirements: * Only
52 * contains 1-63 alphanumeric characters and hyphens * Begins with an
53 * alphabetical character * Ends with a non-hyphen character * Not formatted as
54 * a UUID * Complies with [RFC
55 * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
56 * @opt_param string requestId Optional. A request ID to identify requests.
57 * Specify a unique request ID so that if you must retry your request, the
58 * server will know to ignore the request if it has already been completed. The
59 * server guarantees that a request doesn't result in creation of duplicate
60 * commitments for at least 60 minutes. For example, consider a situation where
61 * you make an initial request and the request times out. If you make the
62 * request again with the same request ID, the server can check if original
63 * operation with the same request ID was received, and if so, will ignore the
64 * second request. This prevents clients from accidentally creating duplicate
65 * commitments. The request ID must be a valid UUID with the exception that zero
66 * UUID is not supported (00000000-0000-0000-0000-000000000000).
67 * @return Operation
68 * @throws \Google\Service\Exception
69 */
70 public function create($parent, NetworkPeering $postBody, $optParams = [])
71 {
72 $params = ['parent' => $parent, 'postBody' => $postBody];
73 $params = array_merge($params, $optParams);
74 return $this->call('create', [$params], Operation::class);
75 }
76 /**
77 * Deletes a `NetworkPeering` resource. When a network peering is deleted for a
78 * VMware Engine network, the peer network becomes inaccessible to that VMware
79 * Engine network. NetworkPeering is a global resource and location can only be
80 * global. (networkPeerings.delete)
81 *
82 * @param string $name Required. The resource name of the network peering to be
83 * deleted. Resource names are schemeless URIs that follow the conventions in
84 * https://cloud.google.com/apis/design/resource_names. For example:
85 * `projects/my-project/locations/global/networkPeerings/my-peering`
86 * @param array $optParams Optional parameters.
87 *
88 * @opt_param string requestId Optional. A request ID to identify requests.
89 * Specify a unique request ID so that if you must retry your request, the
90 * server will know to ignore the request if it has already been completed. The
91 * server guarantees that a request doesn't result in creation of duplicate
92 * commitments for at least 60 minutes. For example, consider a situation where
93 * you make an initial request and the request times out. If you make the
94 * request again with the same request ID, the server can check if original
95 * operation with the same request ID was received, and if so, will ignore the
96 * second request. This prevents clients from accidentally creating duplicate
97 * commitments. The request ID must be a valid UUID with the exception that zero
98 * UUID is not supported (00000000-0000-0000-0000-000000000000).
99 * @return Operation
100 * @throws \Google\Service\Exception
101 */
102 public function delete($name, $optParams = [])
103 {
104 $params = ['name' => $name];
105 $params = array_merge($params, $optParams);
106 return $this->call('delete', [$params], Operation::class);
107 }
108 /**
109 * Retrieves a `NetworkPeering` resource by its resource name. The resource
110 * contains details of the network peering, such as peered networks, import and
111 * export custom route configurations, and peering state. NetworkPeering is a
112 * global resource and location can only be global. (networkPeerings.get)
113 *
114 * @param string $name Required. The resource name of the network peering to
115 * retrieve. Resource names are schemeless URIs that follow the conventions in
116 * https://cloud.google.com/apis/design/resource_names. For example:
117 * `projects/my-project/locations/global/networkPeerings/my-peering`
118 * @param array $optParams Optional parameters.
119 * @return NetworkPeering
120 * @throws \Google\Service\Exception
121 */
122 public function get($name, $optParams = [])
123 {
124 $params = ['name' => $name];
125 $params = array_merge($params, $optParams);
126 return $this->call('get', [$params], NetworkPeering::class);
127 }
128 /**
129 * Lists `NetworkPeering` resources in a given project. NetworkPeering is a
130 * global resource and location can only be global.
131 * (networkPeerings.listProjectsLocationsNetworkPeerings)
132 *
133 * @param string $parent Required. The resource name of the location (global) to
134 * query for network peerings. Resource names are schemeless URIs that follow
135 * the conventions in https://cloud.google.com/apis/design/resource_names. For
136 * example: `projects/my-project/locations/global`
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param string filter A filter expression that matches resources returned
140 * in the response. The expression must specify the field name, a comparison
141 * operator, and the value that you want to use for filtering. The value must be
142 * a string, a number, or a boolean. The comparison operator must be `=`, `!=`,
143 * `>`, or `<`. For example, if you are filtering a list of network peerings,
144 * you can exclude the ones named `example-peering` by specifying `name !=
145 * "example-peering"`. To filter on multiple expressions, provide each separate
146 * expression within parentheses. For example: ``` (name = "example-peering")
147 * (createTime > "2021-04-12T08:15:10.40Z") ``` By default, each expression is
148 * an `AND` expression. However, you can include `AND` and `OR` expressions
149 * explicitly. For example: ``` (name = "example-peering-1") AND (createTime >
150 * "2021-04-12T08:15:10.40Z") OR (name = "example-peering-2") ```
151 * @opt_param string orderBy Sorts list results by a certain order. By default,
152 * returned results are ordered by `name` in ascending order. You can also sort
153 * results in descending order based on the `name` value using `orderBy="name
154 * desc"`. Currently, only ordering by `name` is supported.
155 * @opt_param int pageSize The maximum number of network peerings to return in
156 * one page. The maximum value is coerced to 1000. The default value of this
157 * field is 500.
158 * @opt_param string pageToken A page token, received from a previous
159 * `ListNetworkPeerings` call. Provide this to retrieve the subsequent page.
160 * When paginating, all other parameters provided to `ListNetworkPeerings` must
161 * match the call that provided the page token.
162 * @return ListNetworkPeeringsResponse
163 * @throws \Google\Service\Exception
164 */
165 public function listProjectsLocationsNetworkPeerings($parent, $optParams = [])
166 {
167 $params = ['parent' => $parent];
168 $params = array_merge($params, $optParams);
169 return $this->call('list', [$params], ListNetworkPeeringsResponse::class);
170 }
171 /**
172 * Modifies a `NetworkPeering` resource. Only the `description` field can be
173 * updated. Only fields specified in `updateMask` are applied. NetworkPeering is
174 * a global resource and location can only be global. (networkPeerings.patch)
175 *
176 * @param string $name Output only. Identifier. The resource name of the network
177 * peering. NetworkPeering is a global resource and location can only be global.
178 * Resource names are scheme-less URIs that follow the conventions in
179 * https://cloud.google.com/apis/design/resource_names. For example:
180 * `projects/my-project/locations/global/networkPeerings/my-peering`
181 * @param NetworkPeering $postBody
182 * @param array $optParams Optional parameters.
183 *
184 * @opt_param string requestId Optional. A request ID to identify requests.
185 * Specify a unique request ID so that if you must retry your request, the
186 * server will know to ignore the request if it has already been completed. The
187 * server guarantees that a request doesn't result in creation of duplicate
188 * commitments for at least 60 minutes. For example, consider a situation where
189 * you make an initial request and the request times out. If you make the
190 * request again with the same request ID, the server can check if original
191 * operation with the same request ID was received, and if so, will ignore the
192 * second request. This prevents clients from accidentally creating duplicate
193 * commitments. The request ID must be a valid UUID with the exception that zero
194 * UUID is not supported (00000000-0000-0000-0000-000000000000).
195 * @opt_param string updateMask Required. Field mask is used to specify the
196 * fields to be overwritten in the `NetworkPeering` resource by the update. The
197 * fields specified in the `update_mask` are relative to the resource, not the
198 * full request. A field will be overwritten if it is in the mask. If the user
199 * does not provide a mask then all fields will be overwritten.
200 * @return Operation
201 * @throws \Google\Service\Exception
202 */
203 public function patch($name, NetworkPeering $postBody, $optParams = [])
204 {
205 $params = ['name' => $name, 'postBody' => $postBody];
206 $params = array_merge($params, $optParams);
207 return $this->call('patch', [$params], Operation::class);
208 }
209}
210
211// Adding a class alias for backwards compatibility with the previous class name.
212class_alias(ProjectsLocationsNetworkPeerings::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsNetworkPeerings');
Note: See TracBrowser for help on using the repository browser.