[e3d4e0a] | 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\ConnectionProfile;
|
---|
| 21 | use Google\Service\Datastream\DiscoverConnectionProfileRequest;
|
---|
| 22 | use Google\Service\Datastream\DiscoverConnectionProfileResponse;
|
---|
| 23 | use Google\Service\Datastream\ListConnectionProfilesResponse;
|
---|
| 24 | use Google\Service\Datastream\Operation;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "connectionProfiles" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $datastreamService = new Google\Service\Datastream(...);
|
---|
| 31 | * $connectionProfiles = $datastreamService->projects_locations_connectionProfiles;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsLocationsConnectionProfiles extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Use this method to create a connection profile in a project and location.
|
---|
| 38 | * (connectionProfiles.create)
|
---|
| 39 | *
|
---|
| 40 | * @param string $parent Required. The parent that owns the collection of
|
---|
| 41 | * ConnectionProfiles.
|
---|
| 42 | * @param ConnectionProfile $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | *
|
---|
| 45 | * @opt_param string connectionProfileId Required. The connection profile
|
---|
| 46 | * identifier.
|
---|
| 47 | * @opt_param bool force Optional. Create the connection profile without
|
---|
| 48 | * validating it.
|
---|
| 49 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 50 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 51 | * server will know to ignore the request if it has already been completed. The
|
---|
| 52 | * server will guarantee that for at least 60 minutes since the first request.
|
---|
| 53 | * For example, consider a situation where you make an initial request and the
|
---|
| 54 | * request times out. If you make the request again with the same request ID,
|
---|
| 55 | * the server can check if original operation with the same request ID was
|
---|
| 56 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 57 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 58 | * valid UUID with the exception that zero UUID is not supported
|
---|
| 59 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 60 | * @opt_param bool validateOnly Optional. Only validate the connection profile,
|
---|
| 61 | * but don't create any resources. The default is false.
|
---|
| 62 | * @return Operation
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function create($parent, ConnectionProfile $postBody, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('create', [$params], Operation::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Use this method to delete a connection profile. (connectionProfiles.delete)
|
---|
| 73 | *
|
---|
| 74 | * @param string $name Required. The name of the connection profile resource to
|
---|
| 75 | * delete.
|
---|
| 76 | * @param array $optParams Optional parameters.
|
---|
| 77 | *
|
---|
| 78 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 79 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 80 | * server will know to ignore the request if it has already been completed. The
|
---|
| 81 | * server will guarantee that for at least 60 minutes after the first request.
|
---|
| 82 | * For example, consider a situation where you make an initial request and the
|
---|
| 83 | * request times out. If you make the request again with the same request ID,
|
---|
| 84 | * the server can check if original operation with the same request ID was
|
---|
| 85 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 86 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 87 | * valid UUID with the exception that zero UUID is not supported
|
---|
| 88 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 89 | * @return Operation
|
---|
| 90 | * @throws \Google\Service\Exception
|
---|
| 91 | */
|
---|
| 92 | public function delete($name, $optParams = [])
|
---|
| 93 | {
|
---|
| 94 | $params = ['name' => $name];
|
---|
| 95 | $params = array_merge($params, $optParams);
|
---|
| 96 | return $this->call('delete', [$params], Operation::class);
|
---|
| 97 | }
|
---|
| 98 | /**
|
---|
| 99 | * Use this method to discover a connection profile. The discover API call
|
---|
| 100 | * exposes the data objects and metadata belonging to the profile. Typically, a
|
---|
| 101 | * request returns children data objects of a parent data object that's
|
---|
| 102 | * optionally supplied in the request. (connectionProfiles.discover)
|
---|
| 103 | *
|
---|
| 104 | * @param string $parent Required. The parent resource of the connection profile
|
---|
| 105 | * type. Must be in the format `projects/locations`.
|
---|
| 106 | * @param DiscoverConnectionProfileRequest $postBody
|
---|
| 107 | * @param array $optParams Optional parameters.
|
---|
| 108 | * @return DiscoverConnectionProfileResponse
|
---|
| 109 | * @throws \Google\Service\Exception
|
---|
| 110 | */
|
---|
| 111 | public function discover($parent, DiscoverConnectionProfileRequest $postBody, $optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('discover', [$params], DiscoverConnectionProfileResponse::class);
|
---|
| 116 | }
|
---|
| 117 | /**
|
---|
| 118 | * Use this method to get details about a connection profile.
|
---|
| 119 | * (connectionProfiles.get)
|
---|
| 120 | *
|
---|
| 121 | * @param string $name Required. The name of the connection profile resource to
|
---|
| 122 | * get.
|
---|
| 123 | * @param array $optParams Optional parameters.
|
---|
| 124 | * @return ConnectionProfile
|
---|
| 125 | * @throws \Google\Service\Exception
|
---|
| 126 | */
|
---|
| 127 | public function get($name, $optParams = [])
|
---|
| 128 | {
|
---|
| 129 | $params = ['name' => $name];
|
---|
| 130 | $params = array_merge($params, $optParams);
|
---|
| 131 | return $this->call('get', [$params], ConnectionProfile::class);
|
---|
| 132 | }
|
---|
| 133 | /**
|
---|
| 134 | * Use this method to list connection profiles created in a project and
|
---|
| 135 | * location. (connectionProfiles.listProjectsLocationsConnectionProfiles)
|
---|
| 136 | *
|
---|
| 137 | * @param string $parent Required. The parent that owns the collection of
|
---|
| 138 | * connection profiles.
|
---|
| 139 | * @param array $optParams Optional parameters.
|
---|
| 140 | *
|
---|
| 141 | * @opt_param string filter Filter request.
|
---|
| 142 | * @opt_param string orderBy Order by fields for the result.
|
---|
| 143 | * @opt_param int pageSize Maximum number of connection profiles to return. If
|
---|
| 144 | * unspecified, at most 50 connection profiles will be returned. The maximum
|
---|
| 145 | * value is 1000; values above 1000 will be coerced to 1000.
|
---|
| 146 | * @opt_param string pageToken Page token received from a previous
|
---|
| 147 | * `ListConnectionProfiles` call. Provide this to retrieve the subsequent page.
|
---|
| 148 | * When paginating, all other parameters provided to `ListConnectionProfiles`
|
---|
| 149 | * must match the call that provided the page token.
|
---|
| 150 | * @return ListConnectionProfilesResponse
|
---|
| 151 | * @throws \Google\Service\Exception
|
---|
| 152 | */
|
---|
| 153 | public function listProjectsLocationsConnectionProfiles($parent, $optParams = [])
|
---|
| 154 | {
|
---|
| 155 | $params = ['parent' => $parent];
|
---|
| 156 | $params = array_merge($params, $optParams);
|
---|
| 157 | return $this->call('list', [$params], ListConnectionProfilesResponse::class);
|
---|
| 158 | }
|
---|
| 159 | /**
|
---|
| 160 | * Use this method to update the parameters of a connection profile.
|
---|
| 161 | * (connectionProfiles.patch)
|
---|
| 162 | *
|
---|
| 163 | * @param string $name Output only. The resource's name.
|
---|
| 164 | * @param ConnectionProfile $postBody
|
---|
| 165 | * @param array $optParams Optional parameters.
|
---|
| 166 | *
|
---|
| 167 | * @opt_param bool force Optional. Update the connection profile without
|
---|
| 168 | * validating it.
|
---|
| 169 | * @opt_param string requestId Optional. A request ID to identify requests.
|
---|
| 170 | * Specify a unique request ID so that if you must retry your request, the
|
---|
| 171 | * server will know to ignore the request if it has already been completed. The
|
---|
| 172 | * server will guarantee that for at least 60 minutes since the first request.
|
---|
| 173 | * For example, consider a situation where you make an initial request and the
|
---|
| 174 | * request times out. If you make the request again with the same request ID,
|
---|
| 175 | * the server can check if original operation with the same request ID was
|
---|
| 176 | * received, and if so, will ignore the second request. This prevents clients
|
---|
| 177 | * from accidentally creating duplicate commitments. The request ID must be a
|
---|
| 178 | * valid UUID with the exception that zero UUID is not supported
|
---|
| 179 | * (00000000-0000-0000-0000-000000000000).
|
---|
| 180 | * @opt_param string updateMask Optional. Field mask is used to specify the
|
---|
| 181 | * fields to be overwritten in the ConnectionProfile resource by the update. The
|
---|
| 182 | * fields specified in the update_mask are relative to the resource, not the
|
---|
| 183 | * full request. A field will be overwritten if it is in the mask. If the user
|
---|
| 184 | * does not provide a mask then all fields will be overwritten.
|
---|
| 185 | * @opt_param bool validateOnly Optional. Only validate the connection profile,
|
---|
| 186 | * but don't update any resources. The default is false.
|
---|
| 187 | * @return Operation
|
---|
| 188 | * @throws \Google\Service\Exception
|
---|
| 189 | */
|
---|
| 190 | public function patch($name, ConnectionProfile $postBody, $optParams = [])
|
---|
| 191 | {
|
---|
| 192 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 193 | $params = array_merge($params, $optParams);
|
---|
| 194 | return $this->call('patch', [$params], Operation::class);
|
---|
| 195 | }
|
---|
| 196 | }
|
---|
| 197 |
|
---|
| 198 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 199 | class_alias(ProjectsLocationsConnectionProfiles::class, 'Google_Service_Datastream_Resource_ProjectsLocationsConnectionProfiles');
|
---|