[e3d4e0a] | 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\ResponsePolicyRule;
|
---|
| 21 | use Google\Service\Dns\ResponsePolicyRulesListResponse;
|
---|
| 22 | use Google\Service\Dns\ResponsePolicyRulesPatchResponse;
|
---|
| 23 | use Google\Service\Dns\ResponsePolicyRulesUpdateResponse;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "responsePolicyRules" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $dnsService = new Google\Service\Dns(...);
|
---|
| 30 | * $responsePolicyRules = $dnsService->responsePolicyRules;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ResponsePolicyRules extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Creates a new Response Policy Rule. (responsePolicyRules.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $project Identifies the project addressed by this request.
|
---|
| 39 | * @param string $responsePolicy User assigned name of the Response Policy
|
---|
| 40 | * containing the Response Policy Rule.
|
---|
| 41 | * @param ResponsePolicyRule $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 ResponsePolicyRule
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function create($project, $responsePolicy, ResponsePolicyRule $postBody, $optParams = [])
|
---|
| 51 | {
|
---|
| 52 | $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'postBody' => $postBody];
|
---|
| 53 | $params = array_merge($params, $optParams);
|
---|
| 54 | return $this->call('create', [$params], ResponsePolicyRule::class);
|
---|
| 55 | }
|
---|
| 56 | /**
|
---|
| 57 | * Deletes a previously created Response Policy Rule.
|
---|
| 58 | * (responsePolicyRules.delete)
|
---|
| 59 | *
|
---|
| 60 | * @param string $project Identifies the project addressed by this request.
|
---|
| 61 | * @param string $responsePolicy User assigned name of the Response Policy
|
---|
| 62 | * containing the Response Policy Rule.
|
---|
| 63 | * @param string $responsePolicyRule User assigned name of the Response Policy
|
---|
| 64 | * Rule addressed by this request.
|
---|
| 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 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function delete($project, $responsePolicy, $responsePolicyRule, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'responsePolicyRule' => $responsePolicyRule];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('delete', [$params]);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Fetches the representation of an existing Response Policy Rule.
|
---|
| 80 | * (responsePolicyRules.get)
|
---|
| 81 | *
|
---|
| 82 | * @param string $project Identifies the project addressed by this request.
|
---|
| 83 | * @param string $responsePolicy User assigned name of the Response Policy
|
---|
| 84 | * containing the Response Policy Rule.
|
---|
| 85 | * @param string $responsePolicyRule User assigned name of the Response Policy
|
---|
| 86 | * Rule addressed by this request.
|
---|
| 87 | * @param array $optParams Optional parameters.
|
---|
| 88 | *
|
---|
| 89 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
| 90 | * optional identifier specified by the client. Must be unique for operation
|
---|
| 91 | * resources in the Operations collection.
|
---|
| 92 | * @return ResponsePolicyRule
|
---|
| 93 | * @throws \Google\Service\Exception
|
---|
| 94 | */
|
---|
| 95 | public function get($project, $responsePolicy, $responsePolicyRule, $optParams = [])
|
---|
| 96 | {
|
---|
| 97 | $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'responsePolicyRule' => $responsePolicyRule];
|
---|
| 98 | $params = array_merge($params, $optParams);
|
---|
| 99 | return $this->call('get', [$params], ResponsePolicyRule::class);
|
---|
| 100 | }
|
---|
| 101 | /**
|
---|
| 102 | * Enumerates all Response Policy Rules associated with a project.
|
---|
| 103 | * (responsePolicyRules.listResponsePolicyRules)
|
---|
| 104 | *
|
---|
| 105 | * @param string $project Identifies the project addressed by this request.
|
---|
| 106 | * @param string $responsePolicy User assigned name of the Response Policy to
|
---|
| 107 | * list.
|
---|
| 108 | * @param array $optParams Optional parameters.
|
---|
| 109 | *
|
---|
| 110 | * @opt_param int maxResults Optional. Maximum number of results to be returned.
|
---|
| 111 | * If unspecified, the server decides how many results to return.
|
---|
| 112 | * @opt_param string pageToken Optional. A tag returned by a previous list
|
---|
| 113 | * request that was truncated. Use this parameter to continue a previous list
|
---|
| 114 | * request.
|
---|
| 115 | * @return ResponsePolicyRulesListResponse
|
---|
| 116 | * @throws \Google\Service\Exception
|
---|
| 117 | */
|
---|
| 118 | public function listResponsePolicyRules($project, $responsePolicy, $optParams = [])
|
---|
| 119 | {
|
---|
| 120 | $params = ['project' => $project, 'responsePolicy' => $responsePolicy];
|
---|
| 121 | $params = array_merge($params, $optParams);
|
---|
| 122 | return $this->call('list', [$params], ResponsePolicyRulesListResponse::class);
|
---|
| 123 | }
|
---|
| 124 | /**
|
---|
| 125 | * Applies a partial update to an existing Response Policy Rule.
|
---|
| 126 | * (responsePolicyRules.patch)
|
---|
| 127 | *
|
---|
| 128 | * @param string $project Identifies the project addressed by this request.
|
---|
| 129 | * @param string $responsePolicy User assigned name of the Response Policy
|
---|
| 130 | * containing the Response Policy Rule.
|
---|
| 131 | * @param string $responsePolicyRule User assigned name of the Response Policy
|
---|
| 132 | * Rule addressed by this request.
|
---|
| 133 | * @param ResponsePolicyRule $postBody
|
---|
| 134 | * @param array $optParams Optional parameters.
|
---|
| 135 | *
|
---|
| 136 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
| 137 | * optional identifier specified by the client. Must be unique for operation
|
---|
| 138 | * resources in the Operations collection.
|
---|
| 139 | * @return ResponsePolicyRulesPatchResponse
|
---|
| 140 | * @throws \Google\Service\Exception
|
---|
| 141 | */
|
---|
| 142 | public function patch($project, $responsePolicy, $responsePolicyRule, ResponsePolicyRule $postBody, $optParams = [])
|
---|
| 143 | {
|
---|
| 144 | $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'responsePolicyRule' => $responsePolicyRule, 'postBody' => $postBody];
|
---|
| 145 | $params = array_merge($params, $optParams);
|
---|
| 146 | return $this->call('patch', [$params], ResponsePolicyRulesPatchResponse::class);
|
---|
| 147 | }
|
---|
| 148 | /**
|
---|
| 149 | * Updates an existing Response Policy Rule. (responsePolicyRules.update)
|
---|
| 150 | *
|
---|
| 151 | * @param string $project Identifies the project addressed by this request.
|
---|
| 152 | * @param string $responsePolicy User assigned name of the Response Policy
|
---|
| 153 | * containing the Response Policy Rule.
|
---|
| 154 | * @param string $responsePolicyRule User assigned name of the Response Policy
|
---|
| 155 | * Rule addressed by this request.
|
---|
| 156 | * @param ResponsePolicyRule $postBody
|
---|
| 157 | * @param array $optParams Optional parameters.
|
---|
| 158 | *
|
---|
| 159 | * @opt_param string clientOperationId For mutating operation requests only. An
|
---|
| 160 | * optional identifier specified by the client. Must be unique for operation
|
---|
| 161 | * resources in the Operations collection.
|
---|
| 162 | * @return ResponsePolicyRulesUpdateResponse
|
---|
| 163 | * @throws \Google\Service\Exception
|
---|
| 164 | */
|
---|
| 165 | public function update($project, $responsePolicy, $responsePolicyRule, ResponsePolicyRule $postBody, $optParams = [])
|
---|
| 166 | {
|
---|
| 167 | $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'responsePolicyRule' => $responsePolicyRule, 'postBody' => $postBody];
|
---|
| 168 | $params = array_merge($params, $optParams);
|
---|
| 169 | return $this->call('update', [$params], ResponsePolicyRulesUpdateResponse::class);
|
---|
| 170 | }
|
---|
| 171 | }
|
---|
| 172 |
|
---|
| 173 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 174 | class_alias(ResponsePolicyRules::class, 'Google_Service_Dns_Resource_ResponsePolicyRules');
|
---|