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
18namespace Google\Service\ServiceNetworking\Resource;
19
20use Google\Service\ServiceNetworking\ListPeeredDnsDomainsResponse;
21use Google\Service\ServiceNetworking\Operation;
22use 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->peeredDnsDomains;
30 *  </code>
31 */
32class 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   */
51  public function create($parent, PeeredDnsDomain $postBody, $optParams = [])
52  {
53    $params = ['parent' => $parent, 'postBody' => $postBody];
54    $params = array_merge($params, $optParams);
55    return $this->call('create', [$params], Operation::class);
56  }
57  /**
58   * Deletes a peered DNS domain. (peeredDnsDomains.delete)
59   *
60   * @param string $name Required. The name of the peered DNS domain to delete in
61   * the format: `services/{service}/projects/{project}/global/networks/{network}/
62   * peeredDnsDomains/{name}`. {service} is the peering service that is managing
63   * connectivity for the service producer's organization. For Google services
64   * that support this functionality, this value is
65   * `servicenetworking.googleapis.com`. {project} is the number of the project
66   * that contains the service consumer's VPC network e.g. `12345`. {network} is
67   * the name of the service consumer's VPC network. {name} is the name of the
68   * peered DNS domain.
69   * @param array $optParams Optional parameters.
70   * @return Operation
71   */
72  public function delete($name, $optParams = [])
73  {
74    $params = ['name' => $name];
75    $params = array_merge($params, $optParams);
76    return $this->call('delete', [$params], Operation::class);
77  }
78  /**
79   * Lists peered DNS domains for a connection. (peeredDnsDomains.listServicesProj
80   * ectsServicenetworkingGlobalNetworksPeeredDnsDomains)
81   *
82   * @param string $parent Required. Parent resource identifying the connection
83   * which owns this collection of peered DNS domains in the format:
84   * `services/{service}/projects/{project}/global/networks/{network}`. {service}
85   * is the peering service that is managing connectivity for the service
86   * producer's organization. For Google services that support this functionality,
87   * this value is `servicenetworking.googleapis.com`. {project} is a project
88   * number e.g. `12345` that contains the service consumer's VPC network.
89   * {network} is the name of the service consumer's VPC network.
90   * @param array $optParams Optional parameters.
91   * @return ListPeeredDnsDomainsResponse
92   */
93  public function listServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains($parent, $optParams = [])
94  {
95    $params = ['parent' => $parent];
96    $params = array_merge($params, $optParams);
97    return $this->call('list', [$params], ListPeeredDnsDomainsResponse::class);
98  }
99}
100
101// Adding a class alias for backwards compatibility with the previous class name.
102class_alias(ServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains::class, 'Google_Service_ServiceNetworking_Resource_ServicesProjectsServicenetworkingGlobalNetworksPeeredDnsDomains');
103