Skip to content

Commit 2f20fe5

Browse files
1 parent 498a121 commit 2f20fe5

File tree

6 files changed

+526
-6
lines changed

6 files changed

+526
-6
lines changed

clients/google-api-services-cloudkms/v1/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-cloudkms</artifactId>
25-
<version>v1-rev20250523-2.0.0</version>
25+
<version>v1-rev20250731-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-cloudkms:v1-rev20250523-2.0.0'
38+
implementation 'com.google.apis:google-api-services-cloudkms:v1-rev20250731-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-cloudkms/v1/2.0.0/com/google/api/services/cloudkms/v1/CloudKMS.java

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8267,6 +8267,139 @@ public Create set(String parameterName, Object value) {
82678267
return (Create) super.set(parameterName, value);
82688268
}
82698269
}
8270+
/**
8271+
* Decapsulates data that was encapsulated with a public key retrieved from GetPublicKey
8272+
* corresponding to a CryptoKeyVersion with CryptoKey.purpose KEY_ENCAPSULATION.
8273+
*
8274+
* Create a request for the method "cryptoKeyVersions.decapsulate".
8275+
*
8276+
* This request holds the parameters needed by the cloudkms server. After setting any optional
8277+
* parameters, call the {@link Decapsulate#execute()} method to invoke the remote operation.
8278+
*
8279+
* @param name Required. The resource name of the CryptoKeyVersion to use for decapsulation.
8280+
* @param content the {@link com.google.api.services.cloudkms.v1.model.DecapsulateRequest}
8281+
* @return the request
8282+
*/
8283+
public Decapsulate decapsulate(java.lang.String name, com.google.api.services.cloudkms.v1.model.DecapsulateRequest content) throws java.io.IOException {
8284+
Decapsulate result = new Decapsulate(name, content);
8285+
initialize(result);
8286+
return result;
8287+
}
8288+
8289+
public class Decapsulate extends CloudKMSRequest<com.google.api.services.cloudkms.v1.model.DecapsulateResponse> {
8290+
8291+
private static final String REST_PATH = "v1/{+name}:decapsulate";
8292+
8293+
private final java.util.regex.Pattern NAME_PATTERN =
8294+
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$");
8295+
8296+
/**
8297+
* Decapsulates data that was encapsulated with a public key retrieved from GetPublicKey
8298+
* corresponding to a CryptoKeyVersion with CryptoKey.purpose KEY_ENCAPSULATION.
8299+
*
8300+
* Create a request for the method "cryptoKeyVersions.decapsulate".
8301+
*
8302+
* This request holds the parameters needed by the the cloudkms server. After setting any
8303+
* optional parameters, call the {@link Decapsulate#execute()} method to invoke the remote
8304+
* operation. <p> {@link
8305+
* Decapsulate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
8306+
* must be called to initialize this instance immediately after invoking the constructor. </p>
8307+
*
8308+
* @param name Required. The resource name of the CryptoKeyVersion to use for decapsulation.
8309+
* @param content the {@link com.google.api.services.cloudkms.v1.model.DecapsulateRequest}
8310+
* @since 1.13
8311+
*/
8312+
protected Decapsulate(java.lang.String name, com.google.api.services.cloudkms.v1.model.DecapsulateRequest content) {
8313+
super(CloudKMS.this, "POST", REST_PATH, content, com.google.api.services.cloudkms.v1.model.DecapsulateResponse.class);
8314+
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
8315+
if (!getSuppressPatternChecks()) {
8316+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
8317+
"Parameter name must conform to the pattern " +
8318+
"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$");
8319+
}
8320+
}
8321+
8322+
@Override
8323+
public Decapsulate set$Xgafv(java.lang.String $Xgafv) {
8324+
return (Decapsulate) super.set$Xgafv($Xgafv);
8325+
}
8326+
8327+
@Override
8328+
public Decapsulate setAccessToken(java.lang.String accessToken) {
8329+
return (Decapsulate) super.setAccessToken(accessToken);
8330+
}
8331+
8332+
@Override
8333+
public Decapsulate setAlt(java.lang.String alt) {
8334+
return (Decapsulate) super.setAlt(alt);
8335+
}
8336+
8337+
@Override
8338+
public Decapsulate setCallback(java.lang.String callback) {
8339+
return (Decapsulate) super.setCallback(callback);
8340+
}
8341+
8342+
@Override
8343+
public Decapsulate setFields(java.lang.String fields) {
8344+
return (Decapsulate) super.setFields(fields);
8345+
}
8346+
8347+
@Override
8348+
public Decapsulate setKey(java.lang.String key) {
8349+
return (Decapsulate) super.setKey(key);
8350+
}
8351+
8352+
@Override
8353+
public Decapsulate setOauthToken(java.lang.String oauthToken) {
8354+
return (Decapsulate) super.setOauthToken(oauthToken);
8355+
}
8356+
8357+
@Override
8358+
public Decapsulate setPrettyPrint(java.lang.Boolean prettyPrint) {
8359+
return (Decapsulate) super.setPrettyPrint(prettyPrint);
8360+
}
8361+
8362+
@Override
8363+
public Decapsulate setQuotaUser(java.lang.String quotaUser) {
8364+
return (Decapsulate) super.setQuotaUser(quotaUser);
8365+
}
8366+
8367+
@Override
8368+
public Decapsulate setUploadType(java.lang.String uploadType) {
8369+
return (Decapsulate) super.setUploadType(uploadType);
8370+
}
8371+
8372+
@Override
8373+
public Decapsulate setUploadProtocol(java.lang.String uploadProtocol) {
8374+
return (Decapsulate) super.setUploadProtocol(uploadProtocol);
8375+
}
8376+
8377+
/** Required. The resource name of the CryptoKeyVersion to use for decapsulation. */
8378+
@com.google.api.client.util.Key
8379+
private java.lang.String name;
8380+
8381+
/** Required. The resource name of the CryptoKeyVersion to use for decapsulation.
8382+
*/
8383+
public java.lang.String getName() {
8384+
return name;
8385+
}
8386+
8387+
/** Required. The resource name of the CryptoKeyVersion to use for decapsulation. */
8388+
public Decapsulate setName(java.lang.String name) {
8389+
if (!getSuppressPatternChecks()) {
8390+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
8391+
"Parameter name must conform to the pattern " +
8392+
"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$");
8393+
}
8394+
this.name = name;
8395+
return this;
8396+
}
8397+
8398+
@Override
8399+
public Decapsulate set(String parameterName, Object value) {
8400+
return (Decapsulate) super.set(parameterName, value);
8401+
}
8402+
}
82708403
/**
82718404
* Schedule a CryptoKeyVersion for destruction. Upon calling this method, CryptoKeyVersion.state
82728405
* will be set to DESTROY_SCHEDULED, and destroy_time will be set to the time
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.cloudkms.v1.model;
18+
19+
/**
20+
* Request message for KeyManagementService.Decapsulate.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Key Management Service (KMS) API. For a
24+
* detailed explanation see:
25+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
26+
* </p>
27+
*
28+
* @author Google, Inc.
29+
*/
30+
@SuppressWarnings("javadoc")
31+
public final class DecapsulateRequest extends com.google.api.client.json.GenericJson {
32+
33+
/**
34+
* Required. The ciphertext produced from encapsulation with the named CryptoKeyVersion public
35+
* key(s).
36+
* The value may be {@code null}.
37+
*/
38+
@com.google.api.client.util.Key
39+
private java.lang.String ciphertext;
40+
41+
/**
42+
* Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If specified,
43+
* KeyManagementService will verify the integrity of the received DecapsulateRequest.ciphertext
44+
* using this checksum. KeyManagementService will report an error if the checksum verification
45+
* fails. If you receive a checksum error, your client should verify that
46+
* CRC32C(DecapsulateRequest.ciphertext) is equal to DecapsulateRequest.ciphertext_crc32c, and if
47+
* so, perform a limited number of retries. A persistent mismatch may indicate an issue in your
48+
* computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of
49+
* compatibility across different languages. However, it is a non-negative integer, which will
50+
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this
51+
* type.
52+
* The value may be {@code null}.
53+
*/
54+
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
55+
private java.lang.Long ciphertextCrc32c;
56+
57+
/**
58+
* Required. The ciphertext produced from encapsulation with the named CryptoKeyVersion public
59+
* key(s).
60+
* @see #decodeCiphertext()
61+
* @return value or {@code null} for none
62+
*/
63+
public java.lang.String getCiphertext() {
64+
return ciphertext;
65+
}
66+
67+
/**
68+
* Required. The ciphertext produced from encapsulation with the named CryptoKeyVersion public
69+
* key(s).
70+
* @see #getCiphertext()
71+
* @return Base64 decoded value or {@code null} for none
72+
*
73+
* @since 1.14
74+
*/
75+
public byte[] decodeCiphertext() {
76+
return com.google.api.client.util.Base64.decodeBase64(ciphertext);
77+
}
78+
79+
/**
80+
* Required. The ciphertext produced from encapsulation with the named CryptoKeyVersion public
81+
* key(s).
82+
* @see #encodeCiphertext()
83+
* @param ciphertext ciphertext or {@code null} for none
84+
*/
85+
public DecapsulateRequest setCiphertext(java.lang.String ciphertext) {
86+
this.ciphertext = ciphertext;
87+
return this;
88+
}
89+
90+
/**
91+
* Required. The ciphertext produced from encapsulation with the named CryptoKeyVersion public
92+
* key(s).
93+
* @see #setCiphertext()
94+
*
95+
* <p>
96+
* The value is encoded Base64 or {@code null} for none.
97+
* </p>
98+
*
99+
* @since 1.14
100+
*/
101+
public DecapsulateRequest encodeCiphertext(byte[] ciphertext) {
102+
this.ciphertext = com.google.api.client.util.Base64.encodeBase64URLSafeString(ciphertext);
103+
return this;
104+
}
105+
106+
/**
107+
* Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If specified,
108+
* KeyManagementService will verify the integrity of the received DecapsulateRequest.ciphertext
109+
* using this checksum. KeyManagementService will report an error if the checksum verification
110+
* fails. If you receive a checksum error, your client should verify that
111+
* CRC32C(DecapsulateRequest.ciphertext) is equal to DecapsulateRequest.ciphertext_crc32c, and if
112+
* so, perform a limited number of retries. A persistent mismatch may indicate an issue in your
113+
* computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of
114+
* compatibility across different languages. However, it is a non-negative integer, which will
115+
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this
116+
* type.
117+
* @return value or {@code null} for none
118+
*/
119+
public java.lang.Long getCiphertextCrc32c() {
120+
return ciphertextCrc32c;
121+
}
122+
123+
/**
124+
* Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If specified,
125+
* KeyManagementService will verify the integrity of the received DecapsulateRequest.ciphertext
126+
* using this checksum. KeyManagementService will report an error if the checksum verification
127+
* fails. If you receive a checksum error, your client should verify that
128+
* CRC32C(DecapsulateRequest.ciphertext) is equal to DecapsulateRequest.ciphertext_crc32c, and if
129+
* so, perform a limited number of retries. A persistent mismatch may indicate an issue in your
130+
* computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of
131+
* compatibility across different languages. However, it is a non-negative integer, which will
132+
* never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this
133+
* type.
134+
* @param ciphertextCrc32c ciphertextCrc32c or {@code null} for none
135+
*/
136+
public DecapsulateRequest setCiphertextCrc32c(java.lang.Long ciphertextCrc32c) {
137+
this.ciphertextCrc32c = ciphertextCrc32c;
138+
return this;
139+
}
140+
141+
@Override
142+
public DecapsulateRequest set(String fieldName, Object value) {
143+
return (DecapsulateRequest) super.set(fieldName, value);
144+
}
145+
146+
@Override
147+
public DecapsulateRequest clone() {
148+
return (DecapsulateRequest) super.clone();
149+
}
150+
151+
}

0 commit comments

Comments
 (0)