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\Datastream\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Datastream\ListPrivateConnectionsResponse;
|
---|
21 | use Google\Service\Datastream\Operation;
|
---|
22 | use Google\Service\Datastream\PrivateConnection;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "privateConnections" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $datastreamService = new Google\Service\Datastream(...);
|
---|
29 | * $privateConnections = $datastreamService->projects_locations_privateConnections;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsPrivateConnections extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Use this method to create a private connectivity configuration.
|
---|
36 | * (privateConnections.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent that owns the collection of
|
---|
39 | * PrivateConnections.
|
---|
40 | * @param PrivateConnection $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param bool force Optional. If set to true, will skip validations.
|
---|
44 | * @opt_param string privateConnectionId Required. The private connectivity
|
---|
45 | * identifier.
|
---|
46 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
47 | * Specify a unique request ID so that if you must retry your request, the
|
---|
48 | * server will know to ignore the request if it has already been completed. The
|
---|
49 | * server will guarantee that for at least 60 minutes since the first request.
|
---|
50 | * For example, consider a situation where you make an initial request and the
|
---|
51 | * request times out. If you make the request again with the same request ID,
|
---|
52 | * the server can check if original operation with the same request ID was
|
---|
53 | * received, and if so, will ignore the second request. This prevents clients
|
---|
54 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
55 | * valid UUID with the exception that zero UUID is not supported
|
---|
56 | * (00000000-0000-0000-0000-000000000000).
|
---|
57 | * @return Operation
|
---|
58 | * @throws \Google\Service\Exception
|
---|
59 | */
|
---|
60 | public function create($parent, PrivateConnection $postBody, $optParams = [])
|
---|
61 | {
|
---|
62 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
63 | $params = array_merge($params, $optParams);
|
---|
64 | return $this->call('create', [$params], Operation::class);
|
---|
65 | }
|
---|
66 | /**
|
---|
67 | * Use this method to delete a private connectivity configuration.
|
---|
68 | * (privateConnections.delete)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The name of the private connectivity
|
---|
71 | * configuration to delete.
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | *
|
---|
74 | * @opt_param bool force Optional. If set to true, any child routes that belong
|
---|
75 | * to this PrivateConnection will also be deleted.
|
---|
76 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
77 | * Specify a unique request ID so that if you must retry your request, the
|
---|
78 | * server will know to ignore the request if it has already been completed. The
|
---|
79 | * server will guarantee that for at least 60 minutes after the first request.
|
---|
80 | * For example, consider a situation where you make an initial request and the
|
---|
81 | * request times out. If you make the request again with the same request ID,
|
---|
82 | * the server can check if original operation with the same request ID was
|
---|
83 | * received, and if so, will ignore the second request. This prevents clients
|
---|
84 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
85 | * valid UUID with the exception that zero UUID is not supported
|
---|
86 | * (00000000-0000-0000-0000-000000000000).
|
---|
87 | * @return Operation
|
---|
88 | * @throws \Google\Service\Exception
|
---|
89 | */
|
---|
90 | public function delete($name, $optParams = [])
|
---|
91 | {
|
---|
92 | $params = ['name' => $name];
|
---|
93 | $params = array_merge($params, $optParams);
|
---|
94 | return $this->call('delete', [$params], Operation::class);
|
---|
95 | }
|
---|
96 | /**
|
---|
97 | * Use this method to get details about a private connectivity configuration.
|
---|
98 | * (privateConnections.get)
|
---|
99 | *
|
---|
100 | * @param string $name Required. The name of the private connectivity
|
---|
101 | * configuration to get.
|
---|
102 | * @param array $optParams Optional parameters.
|
---|
103 | * @return PrivateConnection
|
---|
104 | * @throws \Google\Service\Exception
|
---|
105 | */
|
---|
106 | public function get($name, $optParams = [])
|
---|
107 | {
|
---|
108 | $params = ['name' => $name];
|
---|
109 | $params = array_merge($params, $optParams);
|
---|
110 | return $this->call('get', [$params], PrivateConnection::class);
|
---|
111 | }
|
---|
112 | /**
|
---|
113 | * Use this method to list private connectivity configurations in a project and
|
---|
114 | * location. (privateConnections.listProjectsLocationsPrivateConnections)
|
---|
115 | *
|
---|
116 | * @param string $parent Required. The parent that owns the collection of
|
---|
117 | * private connectivity configurations.
|
---|
118 | * @param array $optParams Optional parameters.
|
---|
119 | *
|
---|
120 | * @opt_param string filter Filter request.
|
---|
121 | * @opt_param string orderBy Order by fields for the result.
|
---|
122 | * @opt_param int pageSize Maximum number of private connectivity configurations
|
---|
123 | * to return. If unspecified, at most 50 private connectivity configurations
|
---|
124 | * that will be returned. The maximum value is 1000; values above 1000 will be
|
---|
125 | * coerced to 1000.
|
---|
126 | * @opt_param string pageToken Page token received from a previous
|
---|
127 | * `ListPrivateConnections` call. Provide this to retrieve the subsequent page.
|
---|
128 | * When paginating, all other parameters provided to `ListPrivateConnections`
|
---|
129 | * must match the call that provided the page token.
|
---|
130 | * @return ListPrivateConnectionsResponse
|
---|
131 | * @throws \Google\Service\Exception
|
---|
132 | */
|
---|
133 | public function listProjectsLocationsPrivateConnections($parent, $optParams = [])
|
---|
134 | {
|
---|
135 | $params = ['parent' => $parent];
|
---|
136 | $params = array_merge($params, $optParams);
|
---|
137 | return $this->call('list', [$params], ListPrivateConnectionsResponse::class);
|
---|
138 | }
|
---|
139 | }
|
---|
140 |
|
---|
141 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
142 | class_alias(ProjectsLocationsPrivateConnections::class, 'Google_Service_Datastream_Resource_ProjectsLocationsPrivateConnections');
|
---|