source: vendor/google/apiclient-services/src/CertificateAuthorityService/Resource/ProjectsLocationsCaPoolsCertificates.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: 8.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\CertificateAuthorityService\Resource;
19
20use Google\Service\CertificateAuthorityService\Certificate;
21use Google\Service\CertificateAuthorityService\ListCertificatesResponse;
22use Google\Service\CertificateAuthorityService\RevokeCertificateRequest;
23
24/**
25 * The "certificates" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $privatecaService = new Google\Service\CertificateAuthorityService(...);
29 * $certificates = $privatecaService->projects_locations_caPools_certificates;
30 * </code>
31 */
32class ProjectsLocationsCaPoolsCertificates extends \Google\Service\Resource
33{
34 /**
35 * Create a new Certificate in a given Project, Location from a particular
36 * CaPool. (certificates.create)
37 *
38 * @param string $parent Required. The resource name of the CaPool associated
39 * with the Certificate, in the format `projects/locations/caPools`.
40 * @param Certificate $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string certificateId Optional. It must be unique within a location
44 * and match the regular expression `[a-zA-Z0-9_-]{1,63}`. This field is
45 * required when using a CertificateAuthority in the Enterprise
46 * CertificateAuthority.tier, but is optional and its value is ignored
47 * otherwise.
48 * @opt_param string issuingCertificateAuthorityId Optional. The resource ID of
49 * the CertificateAuthority that should issue the certificate. This optional
50 * field will ignore the load-balancing scheme of the Pool and directly issue
51 * the certificate from the CA with the specified ID, contained in the same
52 * CaPool referenced by `parent`. Per-CA quota rules apply. If left empty, a
53 * CertificateAuthority will be chosen from the CaPool by the service. For
54 * example, to issue a Certificate from a Certificate Authority with resource
55 * name "projects/my-project/locations/us-central1/caPools/my-
56 * pool/certificateAuthorities/my-ca", you can set the parent to "projects/my-
57 * project/locations/us-central1/caPools/my-pool" and the
58 * issuing_certificate_authority_id to "my-ca".
59 * @opt_param string requestId Optional. An ID to identify requests. Specify a
60 * unique request ID so that if you must retry your request, the server will
61 * know to ignore the request if it has already been completed. The server will
62 * guarantee that for at least 60 minutes since the first request. For example,
63 * consider a situation where you make an initial request and the request times
64 * out. If you make the request again with the same request ID, the server can
65 * check if original operation with the same request ID was received, and if so,
66 * will ignore the second request. This prevents clients from accidentally
67 * creating duplicate commitments. The request ID must be a valid UUID with the
68 * exception that zero UUID is not supported
69 * (00000000-0000-0000-0000-000000000000).
70 * @opt_param bool validateOnly Optional. If this is true, no Certificate
71 * resource will be persisted regardless of the CaPool's tier, and the returned
72 * Certificate will not contain the pem_certificate field.
73 * @return Certificate
74 * @throws \Google\Service\Exception
75 */
76 public function create($parent, Certificate $postBody, $optParams = [])
77 {
78 $params = ['parent' => $parent, 'postBody' => $postBody];
79 $params = array_merge($params, $optParams);
80 return $this->call('create', [$params], Certificate::class);
81 }
82 /**
83 * Returns a Certificate. (certificates.get)
84 *
85 * @param string $name Required. The name of the Certificate to get.
86 * @param array $optParams Optional parameters.
87 * @return Certificate
88 * @throws \Google\Service\Exception
89 */
90 public function get($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('get', [$params], Certificate::class);
95 }
96 /**
97 * Lists Certificates. (certificates.listProjectsLocationsCaPoolsCertificates)
98 *
99 * @param string $parent Required. The resource name of the location associated
100 * with the Certificates, in the format `projects/locations/caPools`.
101 * @param array $optParams Optional parameters.
102 *
103 * @opt_param string filter Optional. Only include resources that match the
104 * filter in the response. For details on supported filters and syntax, see
105 * [Certificates Filtering documentation](https://cloud.google.com/certificate-
106 * authority-service/docs/sorting-filtering-certificates#filtering_support).
107 * @opt_param string orderBy Optional. Specify how the results should be sorted.
108 * For details on supported fields and syntax, see [Certificates Sorting
109 * documentation](https://cloud.google.com/certificate-authority-
110 * service/docs/sorting-filtering-certificates#sorting_support).
111 * @opt_param int pageSize Optional. Limit on the number of Certificates to
112 * include in the response. Further Certificates can subsequently be obtained by
113 * including the ListCertificatesResponse.next_page_token in a subsequent
114 * request. If unspecified, the server will pick an appropriate default.
115 * @opt_param string pageToken Optional. Pagination token, returned earlier via
116 * ListCertificatesResponse.next_page_token.
117 * @return ListCertificatesResponse
118 * @throws \Google\Service\Exception
119 */
120 public function listProjectsLocationsCaPoolsCertificates($parent, $optParams = [])
121 {
122 $params = ['parent' => $parent];
123 $params = array_merge($params, $optParams);
124 return $this->call('list', [$params], ListCertificatesResponse::class);
125 }
126 /**
127 * Update a Certificate. Currently, the only field you can update is the labels
128 * field. (certificates.patch)
129 *
130 * @param string $name Output only. The resource name for this Certificate in
131 * the format `projects/locations/caPools/certificates`.
132 * @param Certificate $postBody
133 * @param array $optParams Optional parameters.
134 *
135 * @opt_param string requestId Optional. An ID to identify requests. Specify a
136 * unique request ID so that if you must retry your request, the server will
137 * know to ignore the request if it has already been completed. The server will
138 * guarantee that for at least 60 minutes since the first request. For example,
139 * consider a situation where you make an initial request and the request times
140 * out. If you make the request again with the same request ID, the server can
141 * check if original operation with the same request ID was received, and if so,
142 * will ignore the second request. This prevents clients from accidentally
143 * creating duplicate commitments. The request ID must be a valid UUID with the
144 * exception that zero UUID is not supported
145 * (00000000-0000-0000-0000-000000000000).
146 * @opt_param string updateMask Required. A list of fields to be updated in this
147 * request.
148 * @return Certificate
149 * @throws \Google\Service\Exception
150 */
151 public function patch($name, Certificate $postBody, $optParams = [])
152 {
153 $params = ['name' => $name, 'postBody' => $postBody];
154 $params = array_merge($params, $optParams);
155 return $this->call('patch', [$params], Certificate::class);
156 }
157 /**
158 * Revoke a Certificate. (certificates.revoke)
159 *
160 * @param string $name Required. The resource name for this Certificate in the
161 * format `projects/locations/caPools/certificates`.
162 * @param RevokeCertificateRequest $postBody
163 * @param array $optParams Optional parameters.
164 * @return Certificate
165 * @throws \Google\Service\Exception
166 */
167 public function revoke($name, RevokeCertificateRequest $postBody, $optParams = [])
168 {
169 $params = ['name' => $name, 'postBody' => $postBody];
170 $params = array_merge($params, $optParams);
171 return $this->call('revoke', [$params], Certificate::class);
172 }
173}
174
175// Adding a class alias for backwards compatibility with the previous class name.
176class_alias(ProjectsLocationsCaPoolsCertificates::class, 'Google_Service_CertificateAuthorityService_Resource_ProjectsLocationsCaPoolsCertificates');
Note: See TracBrowser for help on using the repository browser.