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