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\ServiceNetworking\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\ServiceNetworking\ListPeeredDnsDomainsResponse;
|
---|
21 | use Google\Service\ServiceNetworking\Operation;
|
---|
22 | use Google\Service\ServiceNetworking\PeeredDnsDomain;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "peeredDnsDomains" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $servicenetworkingService = new Google\Service\ServiceNetworking(...);
|
---|
29 | * $peeredDnsDomains = $servicenetworkingService->services_projects_global_networks_peeredDnsDomains;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a peered DNS domain which sends requests for records in given
|
---|
36 | * namespace originating in the service producer VPC network to the consumer VPC
|
---|
37 | * network to be resolved. (peeredDnsDomains.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. Parent resource identifying the connection
|
---|
40 | * for which the peered DNS domain will be created in the format:
|
---|
41 | * `services/{service}/projects/{project}/global/networks/{network}` {service}
|
---|
42 | * is the peering service that is managing connectivity for the service
|
---|
43 | * producer's organization. For Google services that support this functionality,
|
---|
44 | * this value is `servicenetworking.googleapis.com`. {project} is the number of
|
---|
45 | * the project that contains the service consumer's VPC network e.g. `12345`.
|
---|
46 | * {network} is the name of the service consumer's VPC network.
|
---|
47 | * @param PeeredDnsDomain $postBody
|
---|
48 | * @param array $optParams Optional parameters.
|
---|
49 | * @return Operation
|
---|
50 | * @throws \Google\Service\Exception
|
---|
51 | */
|
---|
52 | public function create($parent, PeeredDnsDomain $postBody, $optParams = [])
|
---|
53 | {
|
---|
54 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
55 | $params = array_merge($params, $optParams);
|
---|
56 | return $this->call('create', [$params], Operation::class);
|
---|
57 | }
|
---|
58 | /**
|
---|
59 | * Deletes a peered DNS domain. (peeredDnsDomains.delete)
|
---|
60 | *
|
---|
61 | * @param string $name Required. The name of the peered DNS domain to delete in
|
---|
62 | * the format: `services/{service}/projects/{project}/global/networks/{network}/
|
---|
63 | * peeredDnsDomains/{name}`. {service} is the peering service that is managing
|
---|
64 | * connectivity for the service producer's organization. For Google services
|
---|
65 | * that support this functionality, this value is
|
---|
66 | * `servicenetworking.googleapis.com`. {project} is the number of the project
|
---|
67 | * that contains the service consumer's VPC network e.g. `12345`. {network} is
|
---|
68 | * the name of the service consumer's VPC network. {name} is the name of the
|
---|
69 | * peered DNS domain.
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | * @return Operation
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function delete($name, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['name' => $name];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('delete', [$params], Operation::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Lists peered DNS domains for a connection. (peeredDnsDomains.listServicesProj
|
---|
82 | * ectsServicenetworkingGlobalNetworksPeeredDnsDomains)
|
---|
83 | *
|
---|
84 | * @param string $parent Required. Parent resource identifying the connection
|
---|
85 | * which owns this collection of peered DNS domains in the format:
|
---|
86 | * `services/{service}/projects/{project}/global/networks/{network}`. {service}
|
---|
87 | * is the peering service that is managing connectivity for the service
|
---|
88 | * producer's organization. For Google services that support this functionality,
|
---|
89 | * this value is `servicenetworking.googleapis.com`. {project} is a project
|
---|
90 | * number e.g. `12345` that contains the service consumer's VPC network.
|
---|
91 | * {network} is the name of the service consumer's VPC network.
|
---|
92 | * @param array $optParams Optional parameters.
|
---|
93 | * @return ListPeeredDnsDomainsResponse
|
---|
94 | * @throws \Google\Service\Exception
|
---|
95 | */
|
---|
96 | public function listServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains($parent, $optParams = [])
|
---|
97 | {
|
---|
98 | $params = ['parent' => $parent];
|
---|
99 | $params = array_merge($params, $optParams);
|
---|
100 | return $this->call('list', [$params], ListPeeredDnsDomainsResponse::class);
|
---|
101 | }
|
---|
102 | }
|
---|
103 |
|
---|
104 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
105 | class_alias(ServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains::class, 'Google_Service_ServiceNetworking_Resource_ServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains');
|
---|