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