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\AddDnsZoneRequest;
21use Google\Service\ServiceNetworking\Operation;
22use Google\Service\ServiceNetworking\RemoveDnsZoneRequest;
23
24/**
25 * The "dnsZones" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $servicenetworkingService = new Google\Service\ServiceNetworking(...);
29 *   $dnsZones = $servicenetworkingService->dnsZones;
30 *  </code>
31 */
32class ServicesDnsZones extends \Google\Service\Resource
33{
34  /**
35   * Service producers can use this method to add private DNS zones in the shared
36   * producer host project and matching peering zones in the consumer project.
37   * (dnsZones.add)
38   *
39   * @param string $parent Required. The service that is managing peering
40   * connectivity for a service producer's organization. For Google services that
41   * support this functionality, this value is
42   * `services/servicenetworking.googleapis.com`.
43   * @param AddDnsZoneRequest $postBody
44   * @param array $optParams Optional parameters.
45   * @return Operation
46   */
47  public function add($parent, AddDnsZoneRequest $postBody, $optParams = [])
48  {
49    $params = ['parent' => $parent, 'postBody' => $postBody];
50    $params = array_merge($params, $optParams);
51    return $this->call('add', [$params], Operation::class);
52  }
53  /**
54   * Service producers can use this method to remove private DNS zones in the
55   * shared producer host project and matching peering zones in the consumer
56   * project. (dnsZones.remove)
57   *
58   * @param string $parent Required. The service that is managing peering
59   * connectivity for a service producer's organization. For Google services that
60   * support this functionality, this value is
61   * `services/servicenetworking.googleapis.com`.
62   * @param RemoveDnsZoneRequest $postBody
63   * @param array $optParams Optional parameters.
64   * @return Operation
65   */
66  public function remove($parent, RemoveDnsZoneRequest $postBody, $optParams = [])
67  {
68    $params = ['parent' => $parent, 'postBody' => $postBody];
69    $params = array_merge($params, $optParams);
70    return $this->call('remove', [$params], Operation::class);
71  }
72}
73
74// Adding a class alias for backwards compatibility with the previous class name.
75class_alias(ServicesDnsZones::class, 'Google_Service_ServiceNetworking_Resource_ServicesDnsZones');
76