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\Dns\Resource;
19
20use Google\Service\Dns\DnsKey;
21use Google\Service\Dns\DnsKeysListResponse;
22
23/**
24 * The "dnsKeys" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $dnsService = new Google\Service\Dns(...);
28 *   $dnsKeys = $dnsService->dnsKeys;
29 *  </code>
30 */
31class DnsKeys extends \Google\Service\Resource
32{
33  /**
34   * Fetches the representation of an existing DnsKey. (dnsKeys.get)
35   *
36   * @param string $project Identifies the project addressed by this request.
37   * @param string $location Specifies the location of the resource. This
38   * information will be used for routing and will be part of the resource name.
39   * @param string $managedZone Identifies the managed zone addressed by this
40   * request. Can be the managed zone name or ID.
41   * @param string $dnsKeyId The identifier of the requested DnsKey.
42   * @param array $optParams Optional parameters.
43   *
44   * @opt_param string clientOperationId For mutating operation requests only. An
45   * optional identifier specified by the client. Must be unique for operation
46   * resources in the Operations collection.
47   * @opt_param string digestType An optional comma-separated list of digest types
48   * to compute and display for key signing keys. If omitted, the recommended
49   * digest type is computed and displayed.
50   * @return DnsKey
51   */
52  public function get($project, $location, $managedZone, $dnsKeyId, $optParams = [])
53  {
54    $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone, 'dnsKeyId' => $dnsKeyId];
55    $params = array_merge($params, $optParams);
56    return $this->call('get', [$params], DnsKey::class);
57  }
58  /**
59   * Enumerates DnsKeys to a ResourceRecordSet collection. (dnsKeys.listDnsKeys)
60   *
61   * @param string $project Identifies the project addressed by this request.
62   * @param string $location Specifies the location of the resource. This
63   * information will be used for routing and will be part of the resource name.
64   * @param string $managedZone Identifies the managed zone addressed by this
65   * request. Can be the managed zone name or ID.
66   * @param array $optParams Optional parameters.
67   *
68   * @opt_param string digestType An optional comma-separated list of digest types
69   * to compute and display for key signing keys. If omitted, the recommended
70   * digest type is computed and displayed.
71   * @opt_param int maxResults Optional. Maximum number of results to be returned.
72   * If unspecified, the server decides how many results to return.
73   * @opt_param string pageToken Optional. A tag returned by a previous list
74   * request that was truncated. Use this parameter to continue a previous list
75   * request.
76   * @return DnsKeysListResponse
77   */
78  public function listDnsKeys($project, $location, $managedZone, $optParams = [])
79  {
80    $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone];
81    $params = array_merge($params, $optParams);
82    return $this->call('list', [$params], DnsKeysListResponse::class);
83  }
84}
85
86// Adding a class alias for backwards compatibility with the previous class name.
87class_alias(DnsKeys::class, 'Google_Service_Dns_Resource_DnsKeys');
88