source: vendor/google/apiclient-services/src/NetworkSecurity/Resource/ProjectsLocationsServerTlsPolicies.php

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

Upload project files

  • Property mode set to 100644
File size: 9.4 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\NetworkSecurity\Resource;
19
20use Google\Service\NetworkSecurity\GoogleIamV1Policy;
21use Google\Service\NetworkSecurity\GoogleIamV1SetIamPolicyRequest;
22use Google\Service\NetworkSecurity\GoogleIamV1TestIamPermissionsRequest;
23use Google\Service\NetworkSecurity\GoogleIamV1TestIamPermissionsResponse;
24use Google\Service\NetworkSecurity\ListServerTlsPoliciesResponse;
25use Google\Service\NetworkSecurity\Operation;
26use Google\Service\NetworkSecurity\ServerTlsPolicy;
27
28/**
29 * The "serverTlsPolicies" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $networksecurityService = new Google\Service\NetworkSecurity(...);
33 * $serverTlsPolicies = $networksecurityService->projects_locations_serverTlsPolicies;
34 * </code>
35 */
36class ProjectsLocationsServerTlsPolicies extends \Google\Service\Resource
37{
38 /**
39 * Creates a new ServerTlsPolicy in a given project and location.
40 * (serverTlsPolicies.create)
41 *
42 * @param string $parent Required. The parent resource of the ServerTlsPolicy.
43 * Must be in the format `projects/locations/{location}`.
44 * @param ServerTlsPolicy $postBody
45 * @param array $optParams Optional parameters.
46 *
47 * @opt_param string serverTlsPolicyId Required. Short name of the
48 * ServerTlsPolicy resource to be created. This value should be 1-63 characters
49 * long, containing only letters, numbers, hyphens, and underscores, and should
50 * not start with a number. E.g. "server_mtls_policy".
51 * @return Operation
52 * @throws \Google\Service\Exception
53 */
54 public function create($parent, ServerTlsPolicy $postBody, $optParams = [])
55 {
56 $params = ['parent' => $parent, 'postBody' => $postBody];
57 $params = array_merge($params, $optParams);
58 return $this->call('create', [$params], Operation::class);
59 }
60 /**
61 * Deletes a single ServerTlsPolicy. (serverTlsPolicies.delete)
62 *
63 * @param string $name Required. A name of the ServerTlsPolicy to delete. Must
64 * be in the format `projects/locations/{location}/serverTlsPolicies`.
65 * @param array $optParams Optional parameters.
66 * @return Operation
67 * @throws \Google\Service\Exception
68 */
69 public function delete($name, $optParams = [])
70 {
71 $params = ['name' => $name];
72 $params = array_merge($params, $optParams);
73 return $this->call('delete', [$params], Operation::class);
74 }
75 /**
76 * Gets details of a single ServerTlsPolicy. (serverTlsPolicies.get)
77 *
78 * @param string $name Required. A name of the ServerTlsPolicy to get. Must be
79 * in the format `projects/locations/{location}/serverTlsPolicies`.
80 * @param array $optParams Optional parameters.
81 * @return ServerTlsPolicy
82 * @throws \Google\Service\Exception
83 */
84 public function get($name, $optParams = [])
85 {
86 $params = ['name' => $name];
87 $params = array_merge($params, $optParams);
88 return $this->call('get', [$params], ServerTlsPolicy::class);
89 }
90 /**
91 * Gets the access control policy for a resource. Returns an empty policy if the
92 * resource exists and does not have a policy set.
93 * (serverTlsPolicies.getIamPolicy)
94 *
95 * @param string $resource REQUIRED: The resource for which the policy is being
96 * requested. See [Resource
97 * names](https://cloud.google.com/apis/design/resource_names) for the
98 * appropriate value for this field.
99 * @param array $optParams Optional parameters.
100 *
101 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
102 * version that will be used to format the policy. Valid values are 0, 1, and 3.
103 * Requests specifying an invalid value will be rejected. Requests for policies
104 * with any conditional role bindings must specify version 3. Policies with no
105 * conditional role bindings may specify any valid value or leave the field
106 * unset. The policy in the response might use the policy version that you
107 * specified, or it might use a lower policy version. For example, if you
108 * specify version 3, but the policy has no conditional role bindings, the
109 * response uses version 1. To learn which resources support conditions in their
110 * IAM policies, see the [IAM
111 * documentation](https://cloud.google.com/iam/help/conditions/resource-
112 * policies).
113 * @return GoogleIamV1Policy
114 * @throws \Google\Service\Exception
115 */
116 public function getIamPolicy($resource, $optParams = [])
117 {
118 $params = ['resource' => $resource];
119 $params = array_merge($params, $optParams);
120 return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
121 }
122 /**
123 * Lists ServerTlsPolicies in a given project and location.
124 * (serverTlsPolicies.listProjectsLocationsServerTlsPolicies)
125 *
126 * @param string $parent Required. The project and location from which the
127 * ServerTlsPolicies should be listed, specified in the format
128 * `projects/locations/{location}`.
129 * @param array $optParams Optional parameters.
130 *
131 * @opt_param int pageSize Maximum number of ServerTlsPolicies to return per
132 * call.
133 * @opt_param string pageToken The value returned by the last
134 * `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a
135 * prior `ListServerTlsPolicies` call, and that the system should return the
136 * next page of data.
137 * @return ListServerTlsPoliciesResponse
138 * @throws \Google\Service\Exception
139 */
140 public function listProjectsLocationsServerTlsPolicies($parent, $optParams = [])
141 {
142 $params = ['parent' => $parent];
143 $params = array_merge($params, $optParams);
144 return $this->call('list', [$params], ListServerTlsPoliciesResponse::class);
145 }
146 /**
147 * Updates the parameters of a single ServerTlsPolicy. (serverTlsPolicies.patch)
148 *
149 * @param string $name Required. Name of the ServerTlsPolicy resource. It
150 * matches the pattern
151 * `projects/locations/{location}/serverTlsPolicies/{server_tls_policy}`
152 * @param ServerTlsPolicy $postBody
153 * @param array $optParams Optional parameters.
154 *
155 * @opt_param string updateMask Optional. Field mask is used to specify the
156 * fields to be overwritten in the ServerTlsPolicy resource by the update. The
157 * fields specified in the update_mask are relative to the resource, not the
158 * full request. A field will be overwritten if it is in the mask. If the user
159 * does not provide a mask then all fields will be overwritten.
160 * @return Operation
161 * @throws \Google\Service\Exception
162 */
163 public function patch($name, ServerTlsPolicy $postBody, $optParams = [])
164 {
165 $params = ['name' => $name, 'postBody' => $postBody];
166 $params = array_merge($params, $optParams);
167 return $this->call('patch', [$params], Operation::class);
168 }
169 /**
170 * Sets the access control policy on the specified resource. Replaces any
171 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
172 * `PERMISSION_DENIED` errors. (serverTlsPolicies.setIamPolicy)
173 *
174 * @param string $resource REQUIRED: The resource for which the policy is being
175 * specified. See [Resource
176 * names](https://cloud.google.com/apis/design/resource_names) for the
177 * appropriate value for this field.
178 * @param GoogleIamV1SetIamPolicyRequest $postBody
179 * @param array $optParams Optional parameters.
180 * @return GoogleIamV1Policy
181 * @throws \Google\Service\Exception
182 */
183 public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
184 {
185 $params = ['resource' => $resource, 'postBody' => $postBody];
186 $params = array_merge($params, $optParams);
187 return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
188 }
189 /**
190 * Returns permissions that a caller has on the specified resource. If the
191 * resource does not exist, this will return an empty set of permissions, not a
192 * `NOT_FOUND` error. Note: This operation is designed to be used for building
193 * permission-aware UIs and command-line tools, not for authorization checking.
194 * This operation may "fail open" without warning.
195 * (serverTlsPolicies.testIamPermissions)
196 *
197 * @param string $resource REQUIRED: The resource for which the policy detail is
198 * being requested. See [Resource
199 * names](https://cloud.google.com/apis/design/resource_names) for the
200 * appropriate value for this field.
201 * @param GoogleIamV1TestIamPermissionsRequest $postBody
202 * @param array $optParams Optional parameters.
203 * @return GoogleIamV1TestIamPermissionsResponse
204 * @throws \Google\Service\Exception
205 */
206 public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
207 {
208 $params = ['resource' => $resource, 'postBody' => $postBody];
209 $params = array_merge($params, $optParams);
210 return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
211 }
212}
213
214// Adding a class alias for backwards compatibility with the previous class name.
215class_alias(ProjectsLocationsServerTlsPolicies::class, 'Google_Service_NetworkSecurity_Resource_ProjectsLocationsServerTlsPolicies');
Note: See TracBrowser for help on using the repository browser.