source: vendor/google/apiclient-services/src/Dns/Resource/Policies.php@ f9c482b

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

Upload new project files

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