source: vendor/google/apiclient-services/src/CertificateAuthorityService/Resource/ProjectsLocationsCaPoolsCertificateAuthorities.php

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

Upload project files

  • Property mode set to 100644
File size: 12.9 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\CertificateAuthorityService\Resource;
19
20use Google\Service\CertificateAuthorityService\ActivateCertificateAuthorityRequest;
21use Google\Service\CertificateAuthorityService\CertificateAuthority;
22use Google\Service\CertificateAuthorityService\DisableCertificateAuthorityRequest;
23use Google\Service\CertificateAuthorityService\EnableCertificateAuthorityRequest;
24use Google\Service\CertificateAuthorityService\FetchCertificateAuthorityCsrResponse;
25use Google\Service\CertificateAuthorityService\ListCertificateAuthoritiesResponse;
26use Google\Service\CertificateAuthorityService\Operation;
27use Google\Service\CertificateAuthorityService\UndeleteCertificateAuthorityRequest;
28
29/**
30 * The "certificateAuthorities" collection of methods.
31 * Typical usage is:
32 * <code>
33 * $privatecaService = new Google\Service\CertificateAuthorityService(...);
34 * $certificateAuthorities = $privatecaService->projects_locations_caPools_certificateAuthorities;
35 * </code>
36 */
37class ProjectsLocationsCaPoolsCertificateAuthorities extends \Google\Service\Resource
38{
39 /**
40 * Activate a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and
41 * is of type SUBORDINATE. After the parent Certificate Authority signs a
42 * certificate signing request from FetchCertificateAuthorityCsr, this method
43 * can complete the activation process. (certificateAuthorities.activate)
44 *
45 * @param string $name Required. The resource name for this CertificateAuthority
46 * in the format `projects/locations/caPools/certificateAuthorities`.
47 * @param ActivateCertificateAuthorityRequest $postBody
48 * @param array $optParams Optional parameters.
49 * @return Operation
50 * @throws \Google\Service\Exception
51 */
52 public function activate($name, ActivateCertificateAuthorityRequest $postBody, $optParams = [])
53 {
54 $params = ['name' => $name, 'postBody' => $postBody];
55 $params = array_merge($params, $optParams);
56 return $this->call('activate', [$params], Operation::class);
57 }
58 /**
59 * Create a new CertificateAuthority in a given Project and Location.
60 * (certificateAuthorities.create)
61 *
62 * @param string $parent Required. The resource name of the CaPool associated
63 * with the CertificateAuthorities, in the format `projects/locations/caPools`.
64 * @param CertificateAuthority $postBody
65 * @param array $optParams Optional parameters.
66 *
67 * @opt_param string certificateAuthorityId Required. It must be unique within a
68 * location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
69 * @opt_param string requestId Optional. An ID to identify requests. Specify a
70 * unique request ID so that if you must retry your request, the server will
71 * know to ignore the request if it has already been completed. The server will
72 * guarantee that for at least 60 minutes since the first request. For example,
73 * consider a situation where you make an initial request and the request times
74 * out. If you make the request again with the same request ID, the server can
75 * check if original operation with the same request ID was received, and if so,
76 * will ignore the second request. This prevents clients from accidentally
77 * creating duplicate commitments. The request ID must be a valid UUID with the
78 * exception that zero UUID is not supported
79 * (00000000-0000-0000-0000-000000000000).
80 * @return Operation
81 * @throws \Google\Service\Exception
82 */
83 public function create($parent, CertificateAuthority $postBody, $optParams = [])
84 {
85 $params = ['parent' => $parent, 'postBody' => $postBody];
86 $params = array_merge($params, $optParams);
87 return $this->call('create', [$params], Operation::class);
88 }
89 /**
90 * Delete a CertificateAuthority. (certificateAuthorities.delete)
91 *
92 * @param string $name Required. The resource name for this CertificateAuthority
93 * in the format `projects/locations/caPools/certificateAuthorities`.
94 * @param array $optParams Optional parameters.
95 *
96 * @opt_param bool ignoreActiveCertificates Optional. This field allows the CA
97 * to be deleted even if the CA has active certs. Active certs include both
98 * unrevoked and unexpired certs.
99 * @opt_param bool ignoreDependentResources Optional. This field allows this CA
100 * to be deleted even if it's being depended on by another resource. However,
101 * doing so may result in unintended and unrecoverable effects on any dependent
102 * resources since the CA will no longer be able to issue certificates.
103 * @opt_param string requestId Optional. An ID to identify requests. Specify a
104 * unique request ID so that if you must retry your request, the server will
105 * know to ignore the request if it has already been completed. The server will
106 * guarantee that for at least 60 minutes since the first request. For example,
107 * consider a situation where you make an initial request and the request times
108 * out. If you make the request again with the same request ID, the server can
109 * check if original operation with the same request ID was received, and if so,
110 * will ignore the second request. This prevents clients from accidentally
111 * creating duplicate commitments. The request ID must be a valid UUID with the
112 * exception that zero UUID is not supported
113 * (00000000-0000-0000-0000-000000000000).
114 * @opt_param bool skipGracePeriod Optional. If this flag is set, the
115 * Certificate Authority will be deleted as soon as possible without a 30-day
116 * grace period where undeletion would have been allowed. If you proceed, there
117 * will be no way to recover this CA.
118 * @return Operation
119 * @throws \Google\Service\Exception
120 */
121 public function delete($name, $optParams = [])
122 {
123 $params = ['name' => $name];
124 $params = array_merge($params, $optParams);
125 return $this->call('delete', [$params], Operation::class);
126 }
127 /**
128 * Disable a CertificateAuthority. (certificateAuthorities.disable)
129 *
130 * @param string $name Required. The resource name for this CertificateAuthority
131 * in the format `projects/locations/caPools/certificateAuthorities`.
132 * @param DisableCertificateAuthorityRequest $postBody
133 * @param array $optParams Optional parameters.
134 * @return Operation
135 * @throws \Google\Service\Exception
136 */
137 public function disable($name, DisableCertificateAuthorityRequest $postBody, $optParams = [])
138 {
139 $params = ['name' => $name, 'postBody' => $postBody];
140 $params = array_merge($params, $optParams);
141 return $this->call('disable', [$params], Operation::class);
142 }
143 /**
144 * Enable a CertificateAuthority. (certificateAuthorities.enable)
145 *
146 * @param string $name Required. The resource name for this CertificateAuthority
147 * in the format `projects/locations/caPools/certificateAuthorities`.
148 * @param EnableCertificateAuthorityRequest $postBody
149 * @param array $optParams Optional parameters.
150 * @return Operation
151 * @throws \Google\Service\Exception
152 */
153 public function enable($name, EnableCertificateAuthorityRequest $postBody, $optParams = [])
154 {
155 $params = ['name' => $name, 'postBody' => $postBody];
156 $params = array_merge($params, $optParams);
157 return $this->call('enable', [$params], Operation::class);
158 }
159 /**
160 * Fetch a certificate signing request (CSR) from a CertificateAuthority that is
161 * in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. The CSR must
162 * then be signed by the desired parent Certificate Authority, which could be
163 * another CertificateAuthority resource, or could be an on-prem certificate
164 * authority. See also ActivateCertificateAuthority.
165 * (certificateAuthorities.fetch)
166 *
167 * @param string $name Required. The resource name for this CertificateAuthority
168 * in the format `projects/locations/caPools/certificateAuthorities`.
169 * @param array $optParams Optional parameters.
170 * @return FetchCertificateAuthorityCsrResponse
171 * @throws \Google\Service\Exception
172 */
173 public function fetch($name, $optParams = [])
174 {
175 $params = ['name' => $name];
176 $params = array_merge($params, $optParams);
177 return $this->call('fetch', [$params], FetchCertificateAuthorityCsrResponse::class);
178 }
179 /**
180 * Returns a CertificateAuthority. (certificateAuthorities.get)
181 *
182 * @param string $name Required. The name of the CertificateAuthority to get.
183 * @param array $optParams Optional parameters.
184 * @return CertificateAuthority
185 * @throws \Google\Service\Exception
186 */
187 public function get($name, $optParams = [])
188 {
189 $params = ['name' => $name];
190 $params = array_merge($params, $optParams);
191 return $this->call('get', [$params], CertificateAuthority::class);
192 }
193 /**
194 * Lists CertificateAuthorities.
195 * (certificateAuthorities.listProjectsLocationsCaPoolsCertificateAuthorities)
196 *
197 * @param string $parent Required. The resource name of the CaPool associated
198 * with the CertificateAuthorities, in the format `projects/locations/caPools`.
199 * @param array $optParams Optional parameters.
200 *
201 * @opt_param string filter Optional. Only include resources that match the
202 * filter in the response.
203 * @opt_param string orderBy Optional. Specify how the results should be sorted.
204 * @opt_param int pageSize Optional. Limit on the number of
205 * CertificateAuthorities to include in the response. Further
206 * CertificateAuthorities can subsequently be obtained by including the
207 * ListCertificateAuthoritiesResponse.next_page_token in a subsequent request.
208 * If unspecified, the server will pick an appropriate default.
209 * @opt_param string pageToken Optional. Pagination token, returned earlier via
210 * ListCertificateAuthoritiesResponse.next_page_token.
211 * @return ListCertificateAuthoritiesResponse
212 * @throws \Google\Service\Exception
213 */
214 public function listProjectsLocationsCaPoolsCertificateAuthorities($parent, $optParams = [])
215 {
216 $params = ['parent' => $parent];
217 $params = array_merge($params, $optParams);
218 return $this->call('list', [$params], ListCertificateAuthoritiesResponse::class);
219 }
220 /**
221 * Update a CertificateAuthority. (certificateAuthorities.patch)
222 *
223 * @param string $name Output only. Identifier. The resource name for this
224 * CertificateAuthority in the format
225 * `projects/locations/caPools/certificateAuthorities`.
226 * @param CertificateAuthority $postBody
227 * @param array $optParams Optional parameters.
228 *
229 * @opt_param string requestId Optional. An ID to identify requests. Specify a
230 * unique request ID so that if you must retry your request, the server will
231 * know to ignore the request if it has already been completed. The server will
232 * guarantee that for at least 60 minutes since the first request. For example,
233 * consider a situation where you make an initial request and the request times
234 * out. If you make the request again with the same request ID, the server can
235 * check if original operation with the same request ID was received, and if so,
236 * will ignore the second request. This prevents clients from accidentally
237 * creating duplicate commitments. The request ID must be a valid UUID with the
238 * exception that zero UUID is not supported
239 * (00000000-0000-0000-0000-000000000000).
240 * @opt_param string updateMask Required. A list of fields to be updated in this
241 * request.
242 * @return Operation
243 * @throws \Google\Service\Exception
244 */
245 public function patch($name, CertificateAuthority $postBody, $optParams = [])
246 {
247 $params = ['name' => $name, 'postBody' => $postBody];
248 $params = array_merge($params, $optParams);
249 return $this->call('patch', [$params], Operation::class);
250 }
251 /**
252 * Undelete a CertificateAuthority that has been deleted.
253 * (certificateAuthorities.undelete)
254 *
255 * @param string $name Required. The resource name for this CertificateAuthority
256 * in the format `projects/locations/caPools/certificateAuthorities`.
257 * @param UndeleteCertificateAuthorityRequest $postBody
258 * @param array $optParams Optional parameters.
259 * @return Operation
260 * @throws \Google\Service\Exception
261 */
262 public function undelete($name, UndeleteCertificateAuthorityRequest $postBody, $optParams = [])
263 {
264 $params = ['name' => $name, 'postBody' => $postBody];
265 $params = array_merge($params, $optParams);
266 return $this->call('undelete', [$params], Operation::class);
267 }
268}
269
270// Adding a class alias for backwards compatibility with the previous class name.
271class_alias(ProjectsLocationsCaPoolsCertificateAuthorities::class, 'Google_Service_CertificateAuthorityService_Resource_ProjectsLocationsCaPoolsCertificateAuthorities');
Note: See TracBrowser for help on using the repository browser.