[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\ServerlessVPCAccess\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\ServerlessVPCAccess\Connector;
|
---|
| 21 | use Google\Service\ServerlessVPCAccess\ListConnectorsResponse;
|
---|
| 22 | use Google\Service\ServerlessVPCAccess\Operation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "connectors" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $vpcaccessService = new Google\Service\ServerlessVPCAccess(...);
|
---|
| 29 | * $connectors = $vpcaccessService->projects_locations_connectors;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsConnectors extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a Serverless VPC Access connector, returns an operation.
|
---|
| 36 | * (connectors.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The project ID and location in which the
|
---|
| 39 | * configuration should be created, specified in the format
|
---|
| 40 | * `projects/locations`.
|
---|
| 41 | * @param Connector $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | *
|
---|
| 44 | * @opt_param string connectorId Required. The ID to use for this connector.
|
---|
| 45 | * @return Operation
|
---|
| 46 | * @throws \Google\Service\Exception
|
---|
| 47 | */
|
---|
| 48 | public function create($parent, Connector $postBody, $optParams = [])
|
---|
| 49 | {
|
---|
| 50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 51 | $params = array_merge($params, $optParams);
|
---|
| 52 | return $this->call('create', [$params], Operation::class);
|
---|
| 53 | }
|
---|
| 54 | /**
|
---|
| 55 | * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource
|
---|
| 56 | * does not exist. (connectors.delete)
|
---|
| 57 | *
|
---|
| 58 | * @param string $name Required. Name of a Serverless VPC Access connector to
|
---|
| 59 | * delete.
|
---|
| 60 | * @param array $optParams Optional parameters.
|
---|
| 61 | * @return Operation
|
---|
| 62 | * @throws \Google\Service\Exception
|
---|
| 63 | */
|
---|
| 64 | public function delete($name, $optParams = [])
|
---|
| 65 | {
|
---|
| 66 | $params = ['name' => $name];
|
---|
| 67 | $params = array_merge($params, $optParams);
|
---|
| 68 | return $this->call('delete', [$params], Operation::class);
|
---|
| 69 | }
|
---|
| 70 | /**
|
---|
| 71 | * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource
|
---|
| 72 | * does not exist. (connectors.get)
|
---|
| 73 | *
|
---|
| 74 | * @param string $name Required. Name of a Serverless VPC Access connector to
|
---|
| 75 | * get.
|
---|
| 76 | * @param array $optParams Optional parameters.
|
---|
| 77 | * @return Connector
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function get($name, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['name' => $name];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('get', [$params], Connector::class);
|
---|
| 85 | }
|
---|
| 86 | /**
|
---|
| 87 | * Lists Serverless VPC Access connectors.
|
---|
| 88 | * (connectors.listProjectsLocationsConnectors)
|
---|
| 89 | *
|
---|
| 90 | * @param string $parent Required. The project and location from which the
|
---|
| 91 | * routes should be listed.
|
---|
| 92 | * @param array $optParams Optional parameters.
|
---|
| 93 | *
|
---|
| 94 | * @opt_param int pageSize Maximum number of functions to return per call.
|
---|
| 95 | * @opt_param string pageToken Continuation token.
|
---|
| 96 | * @return ListConnectorsResponse
|
---|
| 97 | * @throws \Google\Service\Exception
|
---|
| 98 | */
|
---|
| 99 | public function listProjectsLocationsConnectors($parent, $optParams = [])
|
---|
| 100 | {
|
---|
| 101 | $params = ['parent' => $parent];
|
---|
| 102 | $params = array_merge($params, $optParams);
|
---|
| 103 | return $this->call('list', [$params], ListConnectorsResponse::class);
|
---|
| 104 | }
|
---|
| 105 | /**
|
---|
| 106 | * Updates a Serverless VPC Access connector, returns an operation.
|
---|
| 107 | * (connectors.patch)
|
---|
| 108 | *
|
---|
| 109 | * @param string $name The resource name in the format
|
---|
| 110 | * `projects/locations/connectors`.
|
---|
| 111 | * @param Connector $postBody
|
---|
| 112 | * @param array $optParams Optional parameters.
|
---|
| 113 | *
|
---|
| 114 | * @opt_param string updateMask The fields to update on the entry group. If
|
---|
| 115 | * absent or empty, all modifiable fields are updated.
|
---|
| 116 | * @return Operation
|
---|
| 117 | * @throws \Google\Service\Exception
|
---|
| 118 | */
|
---|
| 119 | public function patch($name, Connector $postBody, $optParams = [])
|
---|
| 120 | {
|
---|
| 121 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 122 | $params = array_merge($params, $optParams);
|
---|
| 123 | return $this->call('patch', [$params], Operation::class);
|
---|
| 124 | }
|
---|
| 125 | }
|
---|
| 126 |
|
---|
| 127 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 128 | class_alias(ProjectsLocationsConnectors::class, 'Google_Service_ServerlessVPCAccess_Resource_ProjectsLocationsConnectors');
|
---|