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\NetworkServices\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\NetworkServices\ListTcpRoutesResponse;
|
---|
21 | use Google\Service\NetworkServices\Operation;
|
---|
22 | use Google\Service\NetworkServices\TcpRoute;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "tcpRoutes" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $networkservicesService = new Google\Service\NetworkServices(...);
|
---|
29 | * $tcpRoutes = $networkservicesService->projects_locations_tcpRoutes;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsTcpRoutes extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new TcpRoute in a given project and location. (tcpRoutes.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The parent resource of the TcpRoute. Must be
|
---|
38 | * in the format `projects/locations/global`.
|
---|
39 | * @param TcpRoute $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string tcpRouteId Required. Short name of the TcpRoute resource to
|
---|
43 | * be created.
|
---|
44 | * @return Operation
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function create($parent, TcpRoute $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('create', [$params], Operation::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Deletes a single TcpRoute. (tcpRoutes.delete)
|
---|
55 | *
|
---|
56 | * @param string $name Required. A name of the TcpRoute to delete. Must be in
|
---|
57 | * the format `projects/locations/global/tcpRoutes`.
|
---|
58 | * @param array $optParams Optional parameters.
|
---|
59 | * @return Operation
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function delete($name, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['name' => $name];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('delete', [$params], Operation::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Gets details of a single TcpRoute. (tcpRoutes.get)
|
---|
70 | *
|
---|
71 | * @param string $name Required. A name of the TcpRoute to get. Must be in the
|
---|
72 | * format `projects/locations/global/tcpRoutes`.
|
---|
73 | * @param array $optParams Optional parameters.
|
---|
74 | * @return TcpRoute
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function get($name, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['name' => $name];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('get', [$params], TcpRoute::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Lists TcpRoute in a given project and location.
|
---|
85 | * (tcpRoutes.listProjectsLocationsTcpRoutes)
|
---|
86 | *
|
---|
87 | * @param string $parent Required. The project and location from which the
|
---|
88 | * TcpRoutes should be listed, specified in the format
|
---|
89 | * `projects/locations/global`.
|
---|
90 | * @param array $optParams Optional parameters.
|
---|
91 | *
|
---|
92 | * @opt_param int pageSize Maximum number of TcpRoutes to return per call.
|
---|
93 | * @opt_param string pageToken The value returned by the last
|
---|
94 | * `ListTcpRoutesResponse` Indicates that this is a continuation of a prior
|
---|
95 | * `ListTcpRoutes` call, and that the system should return the next page of
|
---|
96 | * data.
|
---|
97 | * @return ListTcpRoutesResponse
|
---|
98 | * @throws \Google\Service\Exception
|
---|
99 | */
|
---|
100 | public function listProjectsLocationsTcpRoutes($parent, $optParams = [])
|
---|
101 | {
|
---|
102 | $params = ['parent' => $parent];
|
---|
103 | $params = array_merge($params, $optParams);
|
---|
104 | return $this->call('list', [$params], ListTcpRoutesResponse::class);
|
---|
105 | }
|
---|
106 | /**
|
---|
107 | * Updates the parameters of a single TcpRoute. (tcpRoutes.patch)
|
---|
108 | *
|
---|
109 | * @param string $name Identifier. Name of the TcpRoute resource. It matches
|
---|
110 | * pattern `projects/locations/global/tcpRoutes/tcp_route_name>`.
|
---|
111 | * @param TcpRoute $postBody
|
---|
112 | * @param array $optParams Optional parameters.
|
---|
113 | *
|
---|
114 | * @opt_param string updateMask Optional. Field mask is used to specify the
|
---|
115 | * fields to be overwritten in the TcpRoute resource by the update. The fields
|
---|
116 | * specified in the update_mask are relative to the resource, not the full
|
---|
117 | * request. A field will be overwritten if it is in the mask. If the user does
|
---|
118 | * not provide a mask then all fields will be overwritten.
|
---|
119 | * @return Operation
|
---|
120 | * @throws \Google\Service\Exception
|
---|
121 | */
|
---|
122 | public function patch($name, TcpRoute $postBody, $optParams = [])
|
---|
123 | {
|
---|
124 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
125 | $params = array_merge($params, $optParams);
|
---|
126 | return $this->call('patch', [$params], Operation::class);
|
---|
127 | }
|
---|
128 | }
|
---|
129 |
|
---|
130 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
131 | class_alias(ProjectsLocationsTcpRoutes::class, 'Google_Service_NetworkServices_Resource_ProjectsLocationsTcpRoutes');
|
---|