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\VMwareEngine\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\VMwareEngine\GrantDnsBindPermissionRequest;
|
---|
21 | use Google\Service\VMwareEngine\Operation;
|
---|
22 | use Google\Service\VMwareEngine\RevokeDnsBindPermissionRequest;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "dnsBindPermission" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $vmwareengineService = new Google\Service\VMwareEngine(...);
|
---|
29 | * $dnsBindPermission = $vmwareengineService->projects_locations_global_dnsBindPermission;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsVmwareengineGlobalDnsBindPermission extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Grants the bind permission to the customer provided principal(user / service
|
---|
36 | * account) to bind their DNS zone with the intranet VPC associated with the
|
---|
37 | * project. (dnsBindPermission.grant)
|
---|
38 | *
|
---|
39 | * @param string $name Required. The name of the resource which stores the
|
---|
40 | * users/service accounts having the permission to bind to the corresponding
|
---|
41 | * intranet VPC of the consumer project. DnsBindPermission is a global resource.
|
---|
42 | * Resource names are schemeless URIs that follow the conventions in
|
---|
43 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
44 | * `projects/my-project/locations/global/dnsBindPermission`
|
---|
45 | * @param GrantDnsBindPermissionRequest $postBody
|
---|
46 | * @param array $optParams Optional parameters.
|
---|
47 | * @return Operation
|
---|
48 | */
|
---|
49 | public function grant($name, GrantDnsBindPermissionRequest $postBody, $optParams = [])
|
---|
50 | {
|
---|
51 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
52 | $params = array_merge($params, $optParams);
|
---|
53 | return $this->call('grant', [$params], Operation::class);
|
---|
54 | }
|
---|
55 | /**
|
---|
56 | * Revokes the bind permission from the customer provided principal(user /
|
---|
57 | * service account) on the intranet VPC associated with the consumer project.
|
---|
58 | * (dnsBindPermission.revoke)
|
---|
59 | *
|
---|
60 | * @param string $name Required. The name of the resource which stores the
|
---|
61 | * users/service accounts having the permission to bind to the corresponding
|
---|
62 | * intranet VPC of the consumer project. DnsBindPermission is a global resource.
|
---|
63 | * Resource names are schemeless URIs that follow the conventions in
|
---|
64 | * https://cloud.google.com/apis/design/resource_names. For example:
|
---|
65 | * `projects/my-project/locations/global/dnsBindPermission`
|
---|
66 | * @param RevokeDnsBindPermissionRequest $postBody
|
---|
67 | * @param array $optParams Optional parameters.
|
---|
68 | * @return Operation
|
---|
69 | */
|
---|
70 | public function revoke($name, RevokeDnsBindPermissionRequest $postBody, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('revoke', [$params], Operation::class);
|
---|
75 | }
|
---|
76 | }
|
---|
77 |
|
---|
78 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
79 | class_alias(ProjectsLocationsVmwareengineGlobalDnsBindPermission::class, 'Google_Service_VMwareEngine_Resource_ProjectsLocationsVmwareengineGlobalDnsBindPermission');
|
---|