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\AddDnsRecordSetRequest;
21use Google\Service\ServiceNetworking\Operation;
22use Google\Service\ServiceNetworking\RemoveDnsRecordSetRequest;
23use Google\Service\ServiceNetworking\UpdateDnsRecordSetRequest;
24
25/**
26 * The "dnsRecordSets" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $servicenetworkingService = new Google\Service\ServiceNetworking(...);
30 *   $dnsRecordSets = $servicenetworkingService->dnsRecordSets;
31 *  </code>
32 */
33class ServicesDnsRecordSets extends \Google\Service\Resource
34{
35  /**
36   * Service producers can use this method to add DNS record sets to private DNS
37   * zones in the shared producer host project. (dnsRecordSets.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 AddDnsRecordSetRequest $postBody
44   * @param array $optParams Optional parameters.
45   * @return Operation
46   */
47  public function add($parent, AddDnsRecordSetRequest $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 DNS record sets from private
55   * DNS zones in the shared producer host project. (dnsRecordSets.remove)
56   *
57   * @param string $parent Required. The service that is managing peering
58   * connectivity for a service producer's organization. For Google services that
59   * support this functionality, this value is
60   * `services/servicenetworking.googleapis.com`.
61   * @param RemoveDnsRecordSetRequest $postBody
62   * @param array $optParams Optional parameters.
63   * @return Operation
64   */
65  public function remove($parent, RemoveDnsRecordSetRequest $postBody, $optParams = [])
66  {
67    $params = ['parent' => $parent, 'postBody' => $postBody];
68    $params = array_merge($params, $optParams);
69    return $this->call('remove', [$params], Operation::class);
70  }
71  /**
72   * Service producers can use this method to update DNS record sets from private
73   * DNS zones in the shared producer host project. (dnsRecordSets.update)
74   *
75   * @param string $parent Required. The service that is managing peering
76   * connectivity for a service producer's organization. For Google services that
77   * support this functionality, this value is
78   * `services/servicenetworking.googleapis.com`.
79   * @param UpdateDnsRecordSetRequest $postBody
80   * @param array $optParams Optional parameters.
81   * @return Operation
82   */
83  public function update($parent, UpdateDnsRecordSetRequest $postBody, $optParams = [])
84  {
85    $params = ['parent' => $parent, 'postBody' => $postBody];
86    $params = array_merge($params, $optParams);
87    return $this->call('update', [$params], Operation::class);
88  }
89}
90
91// Adding a class alias for backwards compatibility with the previous class name.
92class_alias(ServicesDnsRecordSets::class, 'Google_Service_ServiceNetworking_Resource_ServicesDnsRecordSets');
93