source: vendor/google/apiclient-services/src/Dns/Resource/ResponsePolicies.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 6.6 KB
RevLine 
[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
18namespace Google\Service\Dns\Resource;
19
20use Google\Service\Dns\ResponsePoliciesListResponse;
21use Google\Service\Dns\ResponsePoliciesPatchResponse;
22use Google\Service\Dns\ResponsePoliciesUpdateResponse;
23use Google\Service\Dns\ResponsePolicy;
24
25/**
26 * The "responsePolicies" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $dnsService = new Google\Service\Dns(...);
30 * $responsePolicies = $dnsService->responsePolicies;
31 * </code>
32 */
33class ResponsePolicies extends \Google\Service\Resource
34{
35 /**
36 * Creates a new Response Policy (responsePolicies.create)
37 *
38 * @param string $project Identifies the project addressed by this request.
39 * @param ResponsePolicy $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 ResponsePolicy
46 * @throws \Google\Service\Exception
47 */
48 public function create($project, ResponsePolicy $postBody, $optParams = [])
49 {
50 $params = ['project' => $project, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], ResponsePolicy::class);
53 }
54 /**
55 * Deletes a previously created Response Policy. Fails if the response policy is
56 * non-empty or still being referenced by a network. (responsePolicies.delete)
57 *
58 * @param string $project Identifies the project addressed by this request.
59 * @param string $responsePolicy User assigned name of the Response Policy
60 * addressed by this request.
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 * @throws \Google\Service\Exception
67 */
68 public function delete($project, $responsePolicy, $optParams = [])
69 {
70 $params = ['project' => $project, 'responsePolicy' => $responsePolicy];
71 $params = array_merge($params, $optParams);
72 return $this->call('delete', [$params]);
73 }
74 /**
75 * Fetches the representation of an existing Response Policy.
76 * (responsePolicies.get)
77 *
78 * @param string $project Identifies the project addressed by this request.
79 * @param string $responsePolicy User assigned name of the Response Policy
80 * addressed by this request.
81 * @param array $optParams Optional parameters.
82 *
83 * @opt_param string clientOperationId For mutating operation requests only. An
84 * optional identifier specified by the client. Must be unique for operation
85 * resources in the Operations collection.
86 * @return ResponsePolicy
87 * @throws \Google\Service\Exception
88 */
89 public function get($project, $responsePolicy, $optParams = [])
90 {
91 $params = ['project' => $project, 'responsePolicy' => $responsePolicy];
92 $params = array_merge($params, $optParams);
93 return $this->call('get', [$params], ResponsePolicy::class);
94 }
95 /**
96 * Enumerates all Response Policies associated with a project.
97 * (responsePolicies.listResponsePolicies)
98 *
99 * @param string $project Identifies the project addressed by this request.
100 * @param array $optParams Optional parameters.
101 *
102 * @opt_param int maxResults Optional. Maximum number of results to be returned.
103 * If unspecified, the server decides how many results to return.
104 * @opt_param string pageToken Optional. A tag returned by a previous list
105 * request that was truncated. Use this parameter to continue a previous list
106 * request.
107 * @return ResponsePoliciesListResponse
108 * @throws \Google\Service\Exception
109 */
110 public function listResponsePolicies($project, $optParams = [])
111 {
112 $params = ['project' => $project];
113 $params = array_merge($params, $optParams);
114 return $this->call('list', [$params], ResponsePoliciesListResponse::class);
115 }
116 /**
117 * Applies a partial update to an existing Response Policy.
118 * (responsePolicies.patch)
119 *
120 * @param string $project Identifies the project addressed by this request.
121 * @param string $responsePolicy User assigned name of the response policy
122 * addressed by this request.
123 * @param ResponsePolicy $postBody
124 * @param array $optParams Optional parameters.
125 *
126 * @opt_param string clientOperationId For mutating operation requests only. An
127 * optional identifier specified by the client. Must be unique for operation
128 * resources in the Operations collection.
129 * @return ResponsePoliciesPatchResponse
130 * @throws \Google\Service\Exception
131 */
132 public function patch($project, $responsePolicy, ResponsePolicy $postBody, $optParams = [])
133 {
134 $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'postBody' => $postBody];
135 $params = array_merge($params, $optParams);
136 return $this->call('patch', [$params], ResponsePoliciesPatchResponse::class);
137 }
138 /**
139 * Updates an existing Response Policy. (responsePolicies.update)
140 *
141 * @param string $project Identifies the project addressed by this request.
142 * @param string $responsePolicy User assigned name of the Response Policy
143 * addressed by this request.
144 * @param ResponsePolicy $postBody
145 * @param array $optParams Optional parameters.
146 *
147 * @opt_param string clientOperationId For mutating operation requests only. An
148 * optional identifier specified by the client. Must be unique for operation
149 * resources in the Operations collection.
150 * @return ResponsePoliciesUpdateResponse
151 * @throws \Google\Service\Exception
152 */
153 public function update($project, $responsePolicy, ResponsePolicy $postBody, $optParams = [])
154 {
155 $params = ['project' => $project, 'responsePolicy' => $responsePolicy, 'postBody' => $postBody];
156 $params = array_merge($params, $optParams);
157 return $this->call('update', [$params], ResponsePoliciesUpdateResponse::class);
158 }
159}
160
161// Adding a class alias for backwards compatibility with the previous class name.
162class_alias(ResponsePolicies::class, 'Google_Service_Dns_Resource_ResponsePolicies');
Note: See TracBrowser for help on using the repository browser.