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\ResourceRecordSet; 21use Google\Service\Dns\ResourceRecordSetsListResponse; 22 23/** 24 * The "resourceRecordSets" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $dnsService = new Google\Service\Dns(...); 28 * $resourceRecordSets = $dnsService->resourceRecordSets; 29 * </code> 30 */ 31class ResourceRecordSets extends \Google\Service\Resource 32{ 33 /** 34 * Creates a new ResourceRecordSet. (resourceRecordSets.create) 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 ResourceRecordSet $postBody 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 * @return ResourceRecordSet 48 */ 49 public function create($project, $location, $managedZone, ResourceRecordSet $postBody, $optParams = []) 50 { 51 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone, 'postBody' => $postBody]; 52 $params = array_merge($params, $optParams); 53 return $this->call('create', [$params], ResourceRecordSet::class); 54 } 55 /** 56 * Deletes a previously created ResourceRecordSet. (resourceRecordSets.delete) 57 * 58 * @param string $project Identifies the project addressed by this request. 59 * @param string $location Specifies the location of the resource. This 60 * information will be used for routing and will be part of the resource name. 61 * @param string $managedZone Identifies the managed zone addressed by this 62 * request. Can be the managed zone name or ID. 63 * @param string $name Fully qualified domain name. 64 * @param string $type RRSet type. 65 * @param array $optParams Optional parameters. 66 * 67 * @opt_param string clientOperationId For mutating operation requests only. An 68 * optional identifier specified by the client. Must be unique for operation 69 * resources in the Operations collection. 70 */ 71 public function delete($project, $location, $managedZone, $name, $type, $optParams = []) 72 { 73 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone, 'name' => $name, 'type' => $type]; 74 $params = array_merge($params, $optParams); 75 return $this->call('delete', [$params]); 76 } 77 /** 78 * Fetches the representation of an existing ResourceRecordSet. 79 * (resourceRecordSets.get) 80 * 81 * @param string $project Identifies the project addressed by this request. 82 * @param string $location Specifies the location of the resource. This 83 * information will be used for routing and will be part of the resource name. 84 * @param string $managedZone Identifies the managed zone addressed by this 85 * request. Can be the managed zone name or ID. 86 * @param string $name Fully qualified domain name. 87 * @param string $type RRSet type. 88 * @param array $optParams Optional parameters. 89 * 90 * @opt_param string clientOperationId For mutating operation requests only. An 91 * optional identifier specified by the client. Must be unique for operation 92 * resources in the Operations collection. 93 * @return ResourceRecordSet 94 */ 95 public function get($project, $location, $managedZone, $name, $type, $optParams = []) 96 { 97 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone, 'name' => $name, 'type' => $type]; 98 $params = array_merge($params, $optParams); 99 return $this->call('get', [$params], ResourceRecordSet::class); 100 } 101 /** 102 * Enumerates ResourceRecordSets that you have created but not yet deleted. 103 * (resourceRecordSets.listResourceRecordSets) 104 * 105 * @param string $project Identifies the project addressed by this request. 106 * @param string $location Specifies the location of the resource. This 107 * information will be used for routing and will be part of the resource name. 108 * @param string $managedZone Identifies the managed zone addressed by this 109 * request. Can be the managed zone name or ID. 110 * @param array $optParams Optional parameters. 111 * 112 * @opt_param int maxResults Optional. Maximum number of results to be returned. 113 * If unspecified, the server decides how many results to return. 114 * @opt_param string name Restricts the list to return only records with this 115 * fully qualified domain name. 116 * @opt_param string pageToken Optional. A tag returned by a previous list 117 * request that was truncated. Use this parameter to continue a previous list 118 * request. 119 * @opt_param string type Restricts the list to return only records of this 120 * type. If present, the "name" parameter must also be present. 121 * @return ResourceRecordSetsListResponse 122 */ 123 public function listResourceRecordSets($project, $location, $managedZone, $optParams = []) 124 { 125 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone]; 126 $params = array_merge($params, $optParams); 127 return $this->call('list', [$params], ResourceRecordSetsListResponse::class); 128 } 129 /** 130 * Applies a partial update to an existing ResourceRecordSet. 131 * (resourceRecordSets.patch) 132 * 133 * @param string $project Identifies the project addressed by this request. 134 * @param string $location Specifies the location of the resource. This 135 * information will be used for routing and will be part of the resource name. 136 * @param string $managedZone Identifies the managed zone addressed by this 137 * request. Can be the managed zone name or ID. 138 * @param string $name Fully qualified domain name. 139 * @param string $type RRSet type. 140 * @param ResourceRecordSet $postBody 141 * @param array $optParams Optional parameters. 142 * 143 * @opt_param string clientOperationId For mutating operation requests only. An 144 * optional identifier specified by the client. Must be unique for operation 145 * resources in the Operations collection. 146 * @return ResourceRecordSet 147 */ 148 public function patch($project, $location, $managedZone, $name, $type, ResourceRecordSet $postBody, $optParams = []) 149 { 150 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone, 'name' => $name, 'type' => $type, 'postBody' => $postBody]; 151 $params = array_merge($params, $optParams); 152 return $this->call('patch', [$params], ResourceRecordSet::class); 153 } 154} 155 156// Adding a class alias for backwards compatibility with the previous class name. 157class_alias(ResourceRecordSets::class, 'Google_Service_Dns_Resource_ResourceRecordSets'); 158