Skip to content

Commit 6c7b80d

Browse files
1 parent 38e76d0 commit 6c7b80d

10 files changed

Lines changed: 401 additions & 6 deletions

src/CloudKMS.php

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class CloudKMS extends \Google\Service
5454
public $projects_locations_keyRings_cryptoKeys_cryptoKeyVersions;
5555
public $projects_locations_keyRings_importJobs;
5656
public $projects_locations_operations;
57+
public $projects_locations_retiredResources;
5758
public $projects_locations_singleTenantHsmInstances;
5859
public $projects_locations_singleTenantHsmInstances_proposals;
5960
public $rootUrlTemplate;
@@ -682,6 +683,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
682683
'required' => true,
683684
],
684685
],
686+
],'delete' => [
687+
'path' => 'v1/{+name}',
688+
'httpMethod' => 'DELETE',
689+
'parameters' => [
690+
'name' => [
691+
'location' => 'path',
692+
'type' => 'string',
693+
'required' => true,
694+
],
695+
],
685696
],'encrypt' => [
686697
'path' => 'v1/{+name}:encrypt',
687698
'httpMethod' => 'POST',
@@ -840,6 +851,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
840851
'required' => true,
841852
],
842853
],
854+
],'delete' => [
855+
'path' => 'v1/{+name}',
856+
'httpMethod' => 'DELETE',
857+
'parameters' => [
858+
'name' => [
859+
'location' => 'path',
860+
'type' => 'string',
861+
'required' => true,
862+
],
863+
],
843864
],'destroy' => [
844865
'path' => 'v1/{+name}:destroy',
845866
'httpMethod' => 'POST',
@@ -1096,6 +1117,44 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
10961117
]
10971118
]
10981119
);
1120+
$this->projects_locations_retiredResources = new CloudKMS\Resource\ProjectsLocationsRetiredResources(
1121+
$this,
1122+
$this->serviceName,
1123+
'retiredResources',
1124+
[
1125+
'methods' => [
1126+
'get' => [
1127+
'path' => 'v1/{+name}',
1128+
'httpMethod' => 'GET',
1129+
'parameters' => [
1130+
'name' => [
1131+
'location' => 'path',
1132+
'type' => 'string',
1133+
'required' => true,
1134+
],
1135+
],
1136+
],'list' => [
1137+
'path' => 'v1/{+parent}/retiredResources',
1138+
'httpMethod' => 'GET',
1139+
'parameters' => [
1140+
'parent' => [
1141+
'location' => 'path',
1142+
'type' => 'string',
1143+
'required' => true,
1144+
],
1145+
'pageSize' => [
1146+
'location' => 'query',
1147+
'type' => 'integer',
1148+
],
1149+
'pageToken' => [
1150+
'location' => 'query',
1151+
'type' => 'string',
1152+
],
1153+
],
1154+
],
1155+
]
1156+
]
1157+
);
10991158
$this->projects_locations_singleTenantHsmInstances = new CloudKMS\Resource\ProjectsLocationsSingleTenantHsmInstances(
11001159
$this,
11011160
$this->serviceName,

src/CloudKMS/AutokeyConfig.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class AutokeyConfig extends \Google\Model
3030
public const KEY_PROJECT_RESOLUTION_MODE_DEDICATED_KEY_PROJECT = 'DEDICATED_KEY_PROJECT';
3131
/**
3232
* Keys are created in the same project as the resource requesting the key.
33-
* `key_project` must not be set when this mode is used.
33+
* The `key_project` must not be set when this mode is used.
3434
*/
3535
public const KEY_PROJECT_RESOLUTION_MODE_RESOURCE_PROJECT = 'RESOURCE_PROJECT';
3636
/**
@@ -93,7 +93,8 @@ class AutokeyConfig extends \Google\Model
9393
public $keyProjectResolutionMode;
9494
/**
9595
* Identifier. Name of the AutokeyConfig resource, e.g.
96-
* `folders/{FOLDER_NUMBER}/autokeyConfig`
96+
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
97+
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
9798
*
9899
* @var string
99100
*/
@@ -170,7 +171,8 @@ public function getKeyProjectResolutionMode()
170171
}
171172
/**
172173
* Identifier. Name of the AutokeyConfig resource, e.g.
173-
* `folders/{FOLDER_NUMBER}/autokeyConfig`
174+
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
175+
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
174176
*
175177
* @param string $name
176178
*/
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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\CloudKMS;
19+
20+
class ListRetiredResourcesResponse extends \Google\Collection
21+
{
22+
protected $collection_key = 'retiredResources';
23+
/**
24+
* A token to retrieve the next page of results. Pass this value in
25+
* ListRetiredResourcesRequest.page_token to retrieve the next page of
26+
* results.
27+
*
28+
* @var string
29+
*/
30+
public $nextPageToken;
31+
protected $retiredResourcesType = RetiredResource::class;
32+
protected $retiredResourcesDataType = 'array';
33+
/**
34+
* The total number of RetiredResources that matched the query.
35+
*
36+
* @var string
37+
*/
38+
public $totalSize;
39+
40+
/**
41+
* A token to retrieve the next page of results. Pass this value in
42+
* ListRetiredResourcesRequest.page_token to retrieve the next page of
43+
* results.
44+
*
45+
* @param string $nextPageToken
46+
*/
47+
public function setNextPageToken($nextPageToken)
48+
{
49+
$this->nextPageToken = $nextPageToken;
50+
}
51+
/**
52+
* @return string
53+
*/
54+
public function getNextPageToken()
55+
{
56+
return $this->nextPageToken;
57+
}
58+
/**
59+
* The list of RetiredResources.
60+
*
61+
* @param RetiredResource[] $retiredResources
62+
*/
63+
public function setRetiredResources($retiredResources)
64+
{
65+
$this->retiredResources = $retiredResources;
66+
}
67+
/**
68+
* @return RetiredResource[]
69+
*/
70+
public function getRetiredResources()
71+
{
72+
return $this->retiredResources;
73+
}
74+
/**
75+
* The total number of RetiredResources that matched the query.
76+
*
77+
* @param string $totalSize
78+
*/
79+
public function setTotalSize($totalSize)
80+
{
81+
$this->totalSize = $totalSize;
82+
}
83+
/**
84+
* @return string
85+
*/
86+
public function getTotalSize()
87+
{
88+
return $this->totalSize;
89+
}
90+
}
91+
92+
// Adding a class alias for backwards compatibility with the previous class name.
93+
class_alias(ListRetiredResourcesResponse::class, 'Google_Service_CloudKMS_ListRetiredResourcesResponse');

src/CloudKMS/Resource/Folders.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public function getKajPolicyConfig($name, $optParams = [])
7171
* (folders.updateAutokeyConfig)
7272
*
7373
* @param string $name Identifier. Name of the AutokeyConfig resource, e.g.
74-
* `folders/{FOLDER_NUMBER}/autokeyConfig`
74+
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
75+
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
7576
* @param AutokeyConfig $postBody
7677
* @param array $optParams Optional parameters.
7778
*

src/CloudKMS/Resource/Projects.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public function showEffectiveKeyAccessJustificationsPolicyConfig($project, $optP
128128
* (projects.updateAutokeyConfig)
129129
*
130130
* @param string $name Identifier. Name of the AutokeyConfig resource, e.g.
131-
* `folders/{FOLDER_NUMBER}/autokeyConfig`
131+
* `folders/{FOLDER_NUMBER}/autokeyConfig` or
132+
* `projects/{PROJECT_NUMBER}/autokeyConfig`.
132133
* @param AutokeyConfig $postBody
133134
* @param array $optParams Optional parameters.
134135
*

src/CloudKMS/Resource/ProjectsLocations.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ public function getEkmConfig($name, $optParams = [])
8080
return $this->call('getEkmConfig', [$params], EkmConfig::class);
8181
}
8282
/**
83-
* Lists information about the supported locations for this service.
83+
* Lists information about the supported locations for this service. This method
84+
* can be called in two ways: * **List all public locations:** Use the path `GET
85+
* /v1/locations`. * **List project-visible locations:** Use the path `GET
86+
* /v1/projects/{project_id}/locations`. This may include public locations as
87+
* well as private or other locations specifically visible to the project.
8488
* (locations.listProjectsLocations)
8589
*
8690
* @param string $name The resource that owns the locations collection, if

src/CloudKMS/Resource/ProjectsLocationsKeyRingsCryptoKeys.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Google\Service\CloudKMS\EncryptRequest;
2424
use Google\Service\CloudKMS\EncryptResponse;
2525
use Google\Service\CloudKMS\ListCryptoKeysResponse;
26+
use Google\Service\CloudKMS\Operation;
2627
use Google\Service\CloudKMS\Policy;
2728
use Google\Service\CloudKMS\SetIamPolicyRequest;
2829
use Google\Service\CloudKMS\TestIamPermissionsRequest;
@@ -80,6 +81,24 @@ public function decrypt($name, DecryptRequest $postBody, $optParams = [])
8081
$params = array_merge($params, $optParams);
8182
return $this->call('decrypt', [$params], DecryptResponse::class);
8283
}
84+
/**
85+
* Permanently deletes the given CryptoKey. All child CryptoKeyVersions must
86+
* have been previously deleted using
87+
* KeyManagementService.DeleteCryptoKeyVersion. The specified crypto key will be
88+
* immediately and permanently deleted upon calling this method. This action
89+
* cannot be undone. (cryptoKeys.delete)
90+
*
91+
* @param string $name Required. The name of the CryptoKey to delete.
92+
* @param array $optParams Optional parameters.
93+
* @return Operation
94+
* @throws \Google\Service\Exception
95+
*/
96+
public function delete($name, $optParams = [])
97+
{
98+
$params = ['name' => $name];
99+
$params = array_merge($params, $optParams);
100+
return $this->call('delete', [$params], Operation::class);
101+
}
83102
/**
84103
* Encrypts data, so that it can only be recovered by a call to Decrypt. The
85104
* CryptoKey.purpose must be ENCRYPT_DECRYPT. (cryptoKeys.encrypt)

src/CloudKMS/Resource/ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersions.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use Google\Service\CloudKMS\MacSignResponse;
3232
use Google\Service\CloudKMS\MacVerifyRequest;
3333
use Google\Service\CloudKMS\MacVerifyResponse;
34+
use Google\Service\CloudKMS\Operation;
3435
use Google\Service\CloudKMS\PublicKey;
3536
use Google\Service\CloudKMS\RawDecryptRequest;
3637
use Google\Service\CloudKMS\RawDecryptResponse;
@@ -120,6 +121,25 @@ public function decapsulate($name, DecapsulateRequest $postBody, $optParams = []
120121
$params = array_merge($params, $optParams);
121122
return $this->call('decapsulate', [$params], DecapsulateResponse::class);
122123
}
124+
/**
125+
* Permanently deletes the given CryptoKeyVersion. Only possible if the version
126+
* has not been previously imported and if its state is one of DESTROYED,
127+
* IMPORT_FAILED, or GENERATION_FAILED. Successfully imported CryptoKeyVersions
128+
* cannot be deleted at this time. The specified version will be immediately and
129+
* permanently deleted upon calling this method. This action cannot be undone.
130+
* (cryptoKeyVersions.delete)
131+
*
132+
* @param string $name Required. The name of the CryptoKeyVersion to delete.
133+
* @param array $optParams Optional parameters.
134+
* @return Operation
135+
* @throws \Google\Service\Exception
136+
*/
137+
public function delete($name, $optParams = [])
138+
{
139+
$params = ['name' => $name];
140+
$params = array_merge($params, $optParams);
141+
return $this->call('delete', [$params], Operation::class);
142+
}
123143
/**
124144
* Schedule a CryptoKeyVersion for destruction. Upon calling this method,
125145
* CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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\CloudKMS\Resource;
19+
20+
use Google\Service\CloudKMS\ListRetiredResourcesResponse;
21+
use Google\Service\CloudKMS\RetiredResource;
22+
23+
/**
24+
* The "retiredResources" collection of methods.
25+
* Typical usage is:
26+
* <code>
27+
* $cloudkmsService = new Google\Service\CloudKMS(...);
28+
* $retiredResources = $cloudkmsService->projects_locations_retiredResources;
29+
* </code>
30+
*/
31+
class ProjectsLocationsRetiredResources extends \Google\Service\Resource
32+
{
33+
/**
34+
* Retrieves a specific RetiredResource resource, which represents the record of
35+
* a deleted CryptoKey. (retiredResources.get)
36+
*
37+
* @param string $name Required. The name of the RetiredResource to get.
38+
* @param array $optParams Optional parameters.
39+
* @return RetiredResource
40+
* @throws \Google\Service\Exception
41+
*/
42+
public function get($name, $optParams = [])
43+
{
44+
$params = ['name' => $name];
45+
$params = array_merge($params, $optParams);
46+
return $this->call('get', [$params], RetiredResource::class);
47+
}
48+
/**
49+
* Lists the RetiredResources which are the records of deleted CryptoKeys.
50+
* RetiredResources prevent the reuse of these resource names after deletion.
51+
* (retiredResources.listProjectsLocationsRetiredResources)
52+
*
53+
* @param string $parent Required. The project-specific location holding the
54+
* RetiredResources, in the format `projects/locations`.
55+
* @param array $optParams Optional parameters.
56+
*
57+
* @opt_param int pageSize Optional. Optional limit on the number of
58+
* RetiredResources to be included in the response. Further RetiredResources can
59+
* subsequently be obtained by including the
60+
* ListRetiredResourcesResponse.next_page_token in a subsequent request. If
61+
* unspecified, the server will pick an appropriate default.
62+
* @opt_param string pageToken Optional. Optional pagination token, returned
63+
* earlier via ListRetiredResourcesResponse.next_page_token.
64+
* @return ListRetiredResourcesResponse
65+
* @throws \Google\Service\Exception
66+
*/
67+
public function listProjectsLocationsRetiredResources($parent, $optParams = [])
68+
{
69+
$params = ['parent' => $parent];
70+
$params = array_merge($params, $optParams);
71+
return $this->call('list', [$params], ListRetiredResourcesResponse::class);
72+
}
73+
}
74+
75+
// Adding a class alias for backwards compatibility with the previous class name.
76+
class_alias(ProjectsLocationsRetiredResources::class, 'Google_Service_CloudKMS_Resource_ProjectsLocationsRetiredResources');

0 commit comments

Comments
 (0)