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\CloudIAP\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudIAP\IapEmpty;
|
---|
21 | use Google\Service\CloudIAP\ListTunnelDestGroupsResponse;
|
---|
22 | use Google\Service\CloudIAP\TunnelDestGroup;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "destGroups" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $iapService = new Google\Service\CloudIAP(...);
|
---|
29 | * $destGroups = $iapService->projects_iap_tunnel_locations_destGroups;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsIapTunnelLocationsDestGroups extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new TunnelDestGroup. (destGroups.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. Google Cloud Project ID and location. In the
|
---|
38 | * following format:
|
---|
39 | * `projects/{project_number/id}/iap_tunnel/locations/{location}`.
|
---|
40 | * @param TunnelDestGroup $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string tunnelDestGroupId Required. The ID to use for the
|
---|
44 | * TunnelDestGroup, which becomes the final component of the resource name. This
|
---|
45 | * value must be 4-63 characters, and valid characters are `[a-z]-`.
|
---|
46 | * @return TunnelDestGroup
|
---|
47 | * @throws \Google\Service\Exception
|
---|
48 | */
|
---|
49 | public function create($parent, TunnelDestGroup $postBody, $optParams = [])
|
---|
50 | {
|
---|
51 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
52 | $params = array_merge($params, $optParams);
|
---|
53 | return $this->call('create', [$params], TunnelDestGroup::class);
|
---|
54 | }
|
---|
55 | /**
|
---|
56 | * Deletes a TunnelDestGroup. (destGroups.delete)
|
---|
57 | *
|
---|
58 | * @param string $name Required. Name of the TunnelDestGroup to delete. In the
|
---|
59 | * following format: `projects/{project_number/id}/iap_tunnel/locations/{locatio
|
---|
60 | * n}/destGroups/{dest_group}`.
|
---|
61 | * @param array $optParams Optional parameters.
|
---|
62 | * @return IapEmpty
|
---|
63 | * @throws \Google\Service\Exception
|
---|
64 | */
|
---|
65 | public function delete($name, $optParams = [])
|
---|
66 | {
|
---|
67 | $params = ['name' => $name];
|
---|
68 | $params = array_merge($params, $optParams);
|
---|
69 | return $this->call('delete', [$params], IapEmpty::class);
|
---|
70 | }
|
---|
71 | /**
|
---|
72 | * Retrieves an existing TunnelDestGroup. (destGroups.get)
|
---|
73 | *
|
---|
74 | * @param string $name Required. Name of the TunnelDestGroup to be fetched. In
|
---|
75 | * the following format: `projects/{project_number/id}/iap_tunnel/locations/{loc
|
---|
76 | * ation}/destGroups/{dest_group}`.
|
---|
77 | * @param array $optParams Optional parameters.
|
---|
78 | * @return TunnelDestGroup
|
---|
79 | * @throws \Google\Service\Exception
|
---|
80 | */
|
---|
81 | public function get($name, $optParams = [])
|
---|
82 | {
|
---|
83 | $params = ['name' => $name];
|
---|
84 | $params = array_merge($params, $optParams);
|
---|
85 | return $this->call('get', [$params], TunnelDestGroup::class);
|
---|
86 | }
|
---|
87 | /**
|
---|
88 | * Lists the existing TunnelDestGroups. To group across all locations, use a `-`
|
---|
89 | * as the location ID. For example:
|
---|
90 | * `/v1/projects/123/iap_tunnel/locations/-/destGroups`
|
---|
91 | * (destGroups.listProjectsIapTunnelLocationsDestGroups)
|
---|
92 | *
|
---|
93 | * @param string $parent Required. Google Cloud Project ID and location. In the
|
---|
94 | * following format:
|
---|
95 | * `projects/{project_number/id}/iap_tunnel/locations/{location}`. A `-` can be
|
---|
96 | * used for the location to group across all locations.
|
---|
97 | * @param array $optParams Optional parameters.
|
---|
98 | *
|
---|
99 | * @opt_param int pageSize The maximum number of groups to return. The service
|
---|
100 | * might return fewer than this value. If unspecified, at most 100 groups are
|
---|
101 | * returned. The maximum value is 1000; values above 1000 are coerced to 1000.
|
---|
102 | * @opt_param string pageToken A page token, received from a previous
|
---|
103 | * `ListTunnelDestGroups` call. Provide this to retrieve the subsequent page.
|
---|
104 | * When paginating, all other parameters provided to `ListTunnelDestGroups` must
|
---|
105 | * match the call that provided the page token.
|
---|
106 | * @return ListTunnelDestGroupsResponse
|
---|
107 | * @throws \Google\Service\Exception
|
---|
108 | */
|
---|
109 | public function listProjectsIapTunnelLocationsDestGroups($parent, $optParams = [])
|
---|
110 | {
|
---|
111 | $params = ['parent' => $parent];
|
---|
112 | $params = array_merge($params, $optParams);
|
---|
113 | return $this->call('list', [$params], ListTunnelDestGroupsResponse::class);
|
---|
114 | }
|
---|
115 | /**
|
---|
116 | * Updates a TunnelDestGroup. (destGroups.patch)
|
---|
117 | *
|
---|
118 | * @param string $name Identifier. Identifier for the TunnelDestGroup. Must be
|
---|
119 | * unique within the project and contain only lower case letters (a-z) and
|
---|
120 | * dashes (-).
|
---|
121 | * @param TunnelDestGroup $postBody
|
---|
122 | * @param array $optParams Optional parameters.
|
---|
123 | *
|
---|
124 | * @opt_param string updateMask A field mask that specifies which IAP settings
|
---|
125 | * to update. If omitted, then all of the settings are updated. See
|
---|
126 | * https://developers.google.com/protocol-
|
---|
127 | * buffers/docs/reference/google.protobuf#fieldmask
|
---|
128 | * @return TunnelDestGroup
|
---|
129 | * @throws \Google\Service\Exception
|
---|
130 | */
|
---|
131 | public function patch($name, TunnelDestGroup $postBody, $optParams = [])
|
---|
132 | {
|
---|
133 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
134 | $params = array_merge($params, $optParams);
|
---|
135 | return $this->call('patch', [$params], TunnelDestGroup::class);
|
---|
136 | }
|
---|
137 | }
|
---|
138 |
|
---|
139 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
140 | class_alias(ProjectsIapTunnelLocationsDestGroups::class, 'Google_Service_CloudIAP_Resource_ProjectsIapTunnelLocationsDestGroups');
|
---|