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 |
|
---|
18 | namespace Google\Service\Integrations\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaCertificate;
|
---|
21 | use Google\Service\Integrations\GoogleCloudIntegrationsV1alphaListCertificatesResponse;
|
---|
22 | use Google\Service\Integrations\GoogleProtobufEmpty;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "certificates" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $integrationsService = new Google\Service\Integrations(...);
|
---|
29 | * $certificates = $integrationsService->projects_locations_certificates;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsCertificates extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new certificate. The certificate will be registered to the trawler
|
---|
36 | * service and will be encrypted using cloud KMS and stored in Spanner Returns
|
---|
37 | * the certificate. (certificates.create)
|
---|
38 | *
|
---|
39 | * @param string $parent Required. "projects/{project}/locations/{location}"
|
---|
40 | * format.
|
---|
41 | * @param GoogleCloudIntegrationsV1alphaCertificate $postBody
|
---|
42 | * @param array $optParams Optional parameters.
|
---|
43 | * @return GoogleCloudIntegrationsV1alphaCertificate
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($parent, GoogleCloudIntegrationsV1alphaCertificate $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], GoogleCloudIntegrationsV1alphaCertificate::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Delete a certificate (certificates.delete)
|
---|
54 | *
|
---|
55 | * @param string $name Required. The name that is associated with the
|
---|
56 | * Certificate.
|
---|
57 | * @param array $optParams Optional parameters.
|
---|
58 | * @return GoogleProtobufEmpty
|
---|
59 | * @throws \Google\Service\Exception
|
---|
60 | */
|
---|
61 | public function delete($name, $optParams = [])
|
---|
62 | {
|
---|
63 | $params = ['name' => $name];
|
---|
64 | $params = array_merge($params, $optParams);
|
---|
65 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
66 | }
|
---|
67 | /**
|
---|
68 | * Get a certificates in the specified project. (certificates.get)
|
---|
69 | *
|
---|
70 | * @param string $name Required. The certificate to retrieve. Format:
|
---|
71 | * projects/{project}/locations/{location}/certificates/{certificate}
|
---|
72 | * @param array $optParams Optional parameters.
|
---|
73 | * @return GoogleCloudIntegrationsV1alphaCertificate
|
---|
74 | * @throws \Google\Service\Exception
|
---|
75 | */
|
---|
76 | public function get($name, $optParams = [])
|
---|
77 | {
|
---|
78 | $params = ['name' => $name];
|
---|
79 | $params = array_merge($params, $optParams);
|
---|
80 | return $this->call('get', [$params], GoogleCloudIntegrationsV1alphaCertificate::class);
|
---|
81 | }
|
---|
82 | /**
|
---|
83 | * List all the certificates that match the filter. Restrict to certificate of
|
---|
84 | * current client only. (certificates.listProjectsLocationsCertificates)
|
---|
85 | *
|
---|
86 | * @param string $parent Required. The client, which owns this collection of
|
---|
87 | * Certificates.
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | *
|
---|
90 | * @opt_param string filter Filtering as supported in
|
---|
91 | * https://developers.google.com/authorized-buyers/apis/guides/list-filters.
|
---|
92 | * @opt_param int pageSize The size of entries in the response. If unspecified,
|
---|
93 | * defaults to 100.
|
---|
94 | * @opt_param string pageToken The token returned in the previous response.
|
---|
95 | * @opt_param string readMask The mask which specifies fields that need to be
|
---|
96 | * returned in the Certificate's response.
|
---|
97 | * @return GoogleCloudIntegrationsV1alphaListCertificatesResponse
|
---|
98 | * @throws \Google\Service\Exception
|
---|
99 | */
|
---|
100 | public function listProjectsLocationsCertificates($parent, $optParams = [])
|
---|
101 | {
|
---|
102 | $params = ['parent' => $parent];
|
---|
103 | $params = array_merge($params, $optParams);
|
---|
104 | return $this->call('list', [$params], GoogleCloudIntegrationsV1alphaListCertificatesResponse::class);
|
---|
105 | }
|
---|
106 | /**
|
---|
107 | * Updates the certificate by id. If new certificate file is updated, it will
|
---|
108 | * register with the trawler service, re-encrypt with cloud KMS and update the
|
---|
109 | * Spanner record. Other fields will directly update the Spanner record. Returns
|
---|
110 | * the Certificate. (certificates.patch)
|
---|
111 | *
|
---|
112 | * @param string $name Output only. Auto generated primary key
|
---|
113 | * @param GoogleCloudIntegrationsV1alphaCertificate $postBody
|
---|
114 | * @param array $optParams Optional parameters.
|
---|
115 | *
|
---|
116 | * @opt_param string updateMask Field mask specifying the fields in the above
|
---|
117 | * Certificate that have been modified and need to be updated.
|
---|
118 | * @return GoogleCloudIntegrationsV1alphaCertificate
|
---|
119 | * @throws \Google\Service\Exception
|
---|
120 | */
|
---|
121 | public function patch($name, GoogleCloudIntegrationsV1alphaCertificate $postBody, $optParams = [])
|
---|
122 | {
|
---|
123 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
124 | $params = array_merge($params, $optParams);
|
---|
125 | return $this->call('patch', [$params], GoogleCloudIntegrationsV1alphaCertificate::class);
|
---|
126 | }
|
---|
127 | }
|
---|
128 |
|
---|
129 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
130 | class_alias(ProjectsLocationsCertificates::class, 'Google_Service_Integrations_Resource_ProjectsLocationsCertificates');
|
---|