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\CertificateManager\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CertificateManager\ListTrustConfigsResponse;
|
---|
21 | use Google\Service\CertificateManager\Operation;
|
---|
22 | use Google\Service\CertificateManager\TrustConfig;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "trustConfigs" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $certificatemanagerService = new Google\Service\CertificateManager(...);
|
---|
29 | * $trustConfigs = $certificatemanagerService->projects_locations_trustConfigs;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsTrustConfigs extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a new TrustConfig in a given project and location.
|
---|
36 | * (trustConfigs.create)
|
---|
37 | *
|
---|
38 | * @param string $parent Required. The parent resource of the TrustConfig. Must
|
---|
39 | * be in the format `projects/locations`.
|
---|
40 | * @param TrustConfig $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string trustConfigId Required. A user-provided name of the
|
---|
44 | * TrustConfig. Must match the regexp `[a-z0-9-]{1,63}`.
|
---|
45 | * @return Operation
|
---|
46 | * @throws \Google\Service\Exception
|
---|
47 | */
|
---|
48 | public function create($parent, TrustConfig $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('create', [$params], Operation::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Deletes a single TrustConfig. (trustConfigs.delete)
|
---|
56 | *
|
---|
57 | * @param string $name Required. A name of the TrustConfig to delete. Must be in
|
---|
58 | * the format `projects/locations/trustConfigs`.
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | *
|
---|
61 | * @opt_param string etag Optional. The current etag of the TrustConfig. If an
|
---|
62 | * etag is provided and does not match the current etag of the resource,
|
---|
63 | * deletion will be blocked and an ABORTED error will be returned.
|
---|
64 | * @return Operation
|
---|
65 | * @throws \Google\Service\Exception
|
---|
66 | */
|
---|
67 | public function delete($name, $optParams = [])
|
---|
68 | {
|
---|
69 | $params = ['name' => $name];
|
---|
70 | $params = array_merge($params, $optParams);
|
---|
71 | return $this->call('delete', [$params], Operation::class);
|
---|
72 | }
|
---|
73 | /**
|
---|
74 | * Gets details of a single TrustConfig. (trustConfigs.get)
|
---|
75 | *
|
---|
76 | * @param string $name Required. A name of the TrustConfig to describe. Must be
|
---|
77 | * in the format `projects/locations/trustConfigs`.
|
---|
78 | * @param array $optParams Optional parameters.
|
---|
79 | * @return TrustConfig
|
---|
80 | * @throws \Google\Service\Exception
|
---|
81 | */
|
---|
82 | public function get($name, $optParams = [])
|
---|
83 | {
|
---|
84 | $params = ['name' => $name];
|
---|
85 | $params = array_merge($params, $optParams);
|
---|
86 | return $this->call('get', [$params], TrustConfig::class);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Lists TrustConfigs in a given project and location.
|
---|
90 | * (trustConfigs.listProjectsLocationsTrustConfigs)
|
---|
91 | *
|
---|
92 | * @param string $parent Required. The project and location from which the
|
---|
93 | * TrustConfigs should be listed, specified in the format `projects/locations`.
|
---|
94 | * @param array $optParams Optional parameters.
|
---|
95 | *
|
---|
96 | * @opt_param string filter Optional. Filter expression to restrict the
|
---|
97 | * TrustConfigs returned.
|
---|
98 | * @opt_param string orderBy Optional. A list of TrustConfig field names used to
|
---|
99 | * specify the order of the returned results. The default sorting order is
|
---|
100 | * ascending. To specify descending order for a field, add a suffix `" desc"`.
|
---|
101 | * @opt_param int pageSize Optional. Maximum number of TrustConfigs to return
|
---|
102 | * per call.
|
---|
103 | * @opt_param string pageToken Optional. The value returned by the last
|
---|
104 | * `ListTrustConfigsResponse`. Indicates that this is a continuation of a prior
|
---|
105 | * `ListTrustConfigs` call, and that the system should return the next page of
|
---|
106 | * data.
|
---|
107 | * @return ListTrustConfigsResponse
|
---|
108 | * @throws \Google\Service\Exception
|
---|
109 | */
|
---|
110 | public function listProjectsLocationsTrustConfigs($parent, $optParams = [])
|
---|
111 | {
|
---|
112 | $params = ['parent' => $parent];
|
---|
113 | $params = array_merge($params, $optParams);
|
---|
114 | return $this->call('list', [$params], ListTrustConfigsResponse::class);
|
---|
115 | }
|
---|
116 | /**
|
---|
117 | * Updates a TrustConfig. (trustConfigs.patch)
|
---|
118 | *
|
---|
119 | * @param string $name Identifier. A user-defined name of the trust config.
|
---|
120 | * TrustConfig names must be unique globally and match pattern
|
---|
121 | * `projects/locations/trustConfigs`.
|
---|
122 | * @param TrustConfig $postBody
|
---|
123 | * @param array $optParams Optional parameters.
|
---|
124 | *
|
---|
125 | * @opt_param string updateMask Required. The update mask applies to the
|
---|
126 | * resource. For the `FieldMask` definition, see
|
---|
127 | * https://developers.google.com/protocol-
|
---|
128 | * buffers/docs/reference/google.protobuf#fieldmask.
|
---|
129 | * @return Operation
|
---|
130 | * @throws \Google\Service\Exception
|
---|
131 | */
|
---|
132 | public function patch($name, TrustConfig $postBody, $optParams = [])
|
---|
133 | {
|
---|
134 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
135 | $params = array_merge($params, $optParams);
|
---|
136 | return $this->call('patch', [$params], Operation::class);
|
---|
137 | }
|
---|
138 | }
|
---|
139 |
|
---|
140 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
141 | class_alias(ProjectsLocationsTrustConfigs::class, 'Google_Service_CertificateManager_Resource_ProjectsLocationsTrustConfigs');
|
---|