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\Dns\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Dns\ResourceRecordSet;
|
---|
21 | use Google\Service\Dns\ResourceRecordSetsDeleteResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "rrsets" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $dnsService = new Google\Service\Dns(...);
|
---|
28 | * $rrsets = $dnsService->rrsets;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class ProjectsManagedZonesRrsets extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Creates a new ResourceRecordSet. (rrsets.create)
|
---|
35 | *
|
---|
36 | * @param string $project Identifies the project addressed by this request.
|
---|
37 | * @param string $managedZone Identifies the managed zone addressed by this
|
---|
38 | * request. Can be the managed zone name or ID.
|
---|
39 | * @param ResourceRecordSet $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
43 | * optional identifier specified by the client. Must be unique for operation
|
---|
44 | * resources in the Operations collection.
|
---|
45 | * @return ResourceRecordSet
|
---|
46 | */
|
---|
47 | public function create($project, $managedZone, ResourceRecordSet $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['project' => $project, 'managedZone' => $managedZone, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('create', [$params], ResourceRecordSet::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Deletes a previously created ResourceRecordSet. (rrsets.delete)
|
---|
55 | *
|
---|
56 | * @param string $project Identifies the project addressed by this request.
|
---|
57 | * @param string $managedZone Identifies the managed zone addressed by this
|
---|
58 | * request. Can be the managed zone name or ID.
|
---|
59 | * @param string $name Fully qualified domain name.
|
---|
60 | * @param string $type RRSet type.
|
---|
61 | * @param array $optParams Optional parameters.
|
---|
62 | *
|
---|
63 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
64 | * optional identifier specified by the client. Must be unique for operation
|
---|
65 | * resources in the Operations collection.
|
---|
66 | * @return ResourceRecordSetsDeleteResponse
|
---|
67 | */
|
---|
68 | public function delete($project, $managedZone, $name, $type, $optParams = [])
|
---|
69 | {
|
---|
70 | $params = ['project' => $project, 'managedZone' => $managedZone, 'name' => $name, 'type' => $type];
|
---|
71 | $params = array_merge($params, $optParams);
|
---|
72 | return $this->call('delete', [$params], ResourceRecordSetsDeleteResponse::class);
|
---|
73 | }
|
---|
74 | /**
|
---|
75 | * Fetches the representation of an existing ResourceRecordSet. (rrsets.get)
|
---|
76 | *
|
---|
77 | * @param string $project Identifies the project addressed by this request.
|
---|
78 | * @param string $managedZone Identifies the managed zone addressed by this
|
---|
79 | * request. Can be the managed zone name or ID.
|
---|
80 | * @param string $name Fully qualified domain name.
|
---|
81 | * @param string $type RRSet type.
|
---|
82 | * @param array $optParams Optional parameters.
|
---|
83 | *
|
---|
84 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
85 | * optional identifier specified by the client. Must be unique for operation
|
---|
86 | * resources in the Operations collection.
|
---|
87 | * @return ResourceRecordSet
|
---|
88 | */
|
---|
89 | public function get($project, $managedZone, $name, $type, $optParams = [])
|
---|
90 | {
|
---|
91 | $params = ['project' => $project, 'managedZone' => $managedZone, 'name' => $name, 'type' => $type];
|
---|
92 | $params = array_merge($params, $optParams);
|
---|
93 | return $this->call('get', [$params], ResourceRecordSet::class);
|
---|
94 | }
|
---|
95 | /**
|
---|
96 | * Applies a partial update to an existing ResourceRecordSet. (rrsets.patch)
|
---|
97 | *
|
---|
98 | * @param string $project Identifies the project addressed by this request.
|
---|
99 | * @param string $managedZone Identifies the managed zone addressed by this
|
---|
100 | * request. Can be the managed zone name or ID.
|
---|
101 | * @param string $name Fully qualified domain name.
|
---|
102 | * @param string $type RRSet type.
|
---|
103 | * @param ResourceRecordSet $postBody
|
---|
104 | * @param array $optParams Optional parameters.
|
---|
105 | *
|
---|
106 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
107 | * optional identifier specified by the client. Must be unique for operation
|
---|
108 | * resources in the Operations collection.
|
---|
109 | * @return ResourceRecordSet
|
---|
110 | */
|
---|
111 | public function patch($project, $managedZone, $name, $type, ResourceRecordSet $postBody, $optParams = [])
|
---|
112 | {
|
---|
113 | $params = ['project' => $project, 'managedZone' => $managedZone, 'name' => $name, 'type' => $type, 'postBody' => $postBody];
|
---|
114 | $params = array_merge($params, $optParams);
|
---|
115 | return $this->call('patch', [$params], ResourceRecordSet::class);
|
---|
116 | }
|
---|
117 | }
|
---|
118 |
|
---|
119 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
120 | class_alias(ProjectsManagedZonesRrsets::class, 'Google_Service_Dns_Resource_ProjectsManagedZonesRrsets');
|
---|