Skip to content

Commit 6d0eaee

Browse files
feat: Automated regeneration of cloudkms v1 client (googleapis#23889)
Auto-created at 2025-08-10 09:49:37 +0000 using the toys pull request generator.
1 parent fb00533 commit 6d0eaee

File tree

6 files changed

+184
-2
lines changed

6 files changed

+184
-2
lines changed

api_names_out.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75033,6 +75033,15 @@
7503375033
"/cloudkms:v1/CryptoKeyVersionTemplate/protectionLevel": protection_level
7503475034
"/cloudkms:v1/DataAccessOptions": data_access_options
7503575035
"/cloudkms:v1/DataAccessOptions/logMode": log_mode
75036+
"/cloudkms:v1/DecapsulateRequest": decapsulate_request
75037+
"/cloudkms:v1/DecapsulateRequest/ciphertext": ciphertext
75038+
"/cloudkms:v1/DecapsulateRequest/ciphertextCrc32c": ciphertext_crc32c
75039+
"/cloudkms:v1/DecapsulateResponse": decapsulate_response
75040+
"/cloudkms:v1/DecapsulateResponse/name": name
75041+
"/cloudkms:v1/DecapsulateResponse/protectionLevel": protection_level
75042+
"/cloudkms:v1/DecapsulateResponse/sharedSecret": shared_secret
75043+
"/cloudkms:v1/DecapsulateResponse/sharedSecretCrc32c": shared_secret_crc32c
75044+
"/cloudkms:v1/DecapsulateResponse/verifiedCiphertextCrc32c": verified_ciphertext_crc32c
7503675045
"/cloudkms:v1/DecryptRequest": decrypt_request
7503775046
"/cloudkms:v1/DecryptRequest/additionalAuthenticatedData": additional_authenticated_data
7503875047
"/cloudkms:v1/DecryptRequest/additionalAuthenticatedDataCrc32c": additional_authenticated_data_crc32c
@@ -75374,6 +75383,8 @@
7537475383
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricSign/name": name
7537575384
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create": create_project_location_key_ring_crypto_key_crypto_key_version
7537675385
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create/parent": parent
75386+
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.decapsulate": decapsulate_crypto_key_version
75387+
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.decapsulate/name": name
7537775388
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy": destroy_crypto_key_version
7537875389
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy/name": name
7537975390
"/cloudkms:v1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get": get_project_location_key_ring_crypto_key_crypto_key_version

generated/google-apis-cloudkms_v1/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release history for google-apis-cloudkms_v1
22

3+
### v0.60.0 (2025-08-10)
4+
5+
* Regenerated from discovery document revision 20250731
6+
37
### v0.59.0 (2025-05-25)
48

59
* Regenerated from discovery document revision 20250516

generated/google-apis-cloudkms_v1/lib/google/apis/cloudkms_v1/classes.rb

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,107 @@ def update!(**args)
886886
end
887887
end
888888

889+
# Request message for KeyManagementService.Decapsulate.
890+
class DecapsulateRequest
891+
include Google::Apis::Core::Hashable
892+
893+
# Required. The ciphertext produced from encapsulation with the named
894+
# CryptoKeyVersion public key(s).
895+
# Corresponds to the JSON property `ciphertext`
896+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
897+
# @return [String]
898+
attr_accessor :ciphertext
899+
900+
# Optional. A CRC32C checksum of the DecapsulateRequest.ciphertext. If specified,
901+
# KeyManagementService will verify the integrity of the received
902+
# DecapsulateRequest.ciphertext using this checksum. KeyManagementService will
903+
# report an error if the checksum verification fails. If you receive a checksum
904+
# error, your client should verify that CRC32C(DecapsulateRequest.ciphertext) is
905+
# equal to DecapsulateRequest.ciphertext_crc32c, and if so, perform a limited
906+
# number of retries. A persistent mismatch may indicate an issue in your
907+
# computation of the CRC32C checksum. Note: This field is defined as int64 for
908+
# reasons of compatibility across different languages. However, it is a non-
909+
# negative integer, which will never exceed 2^32-1, and can be safely
910+
# downconverted to uint32 in languages that support this type.
911+
# Corresponds to the JSON property `ciphertextCrc32c`
912+
# @return [Fixnum]
913+
attr_accessor :ciphertext_crc32c
914+
915+
def initialize(**args)
916+
update!(**args)
917+
end
918+
919+
# Update properties of this object
920+
def update!(**args)
921+
@ciphertext = args[:ciphertext] if args.key?(:ciphertext)
922+
@ciphertext_crc32c = args[:ciphertext_crc32c] if args.key?(:ciphertext_crc32c)
923+
end
924+
end
925+
926+
# Response message for KeyManagementService.Decapsulate.
927+
class DecapsulateResponse
928+
include Google::Apis::Core::Hashable
929+
930+
# The resource name of the CryptoKeyVersion used for decapsulation. Check this
931+
# field to verify that the intended resource was used for decapsulation.
932+
# Corresponds to the JSON property `name`
933+
# @return [String]
934+
attr_accessor :name
935+
936+
# The ProtectionLevel of the CryptoKeyVersion used in decapsulation.
937+
# Corresponds to the JSON property `protectionLevel`
938+
# @return [String]
939+
attr_accessor :protection_level
940+
941+
# The decapsulated shared_secret originally encapsulated with the matching
942+
# public key.
943+
# Corresponds to the JSON property `sharedSecret`
944+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
945+
# @return [String]
946+
attr_accessor :shared_secret
947+
948+
# Integrity verification field. A CRC32C checksum of the returned
949+
# DecapsulateResponse.shared_secret. An integrity check of DecapsulateResponse.
950+
# shared_secret can be performed by computing the CRC32C checksum of
951+
# DecapsulateResponse.shared_secret and comparing your results to this field.
952+
# Discard the response in case of non-matching checksum values, and perform a
953+
# limited number of retries. A persistent mismatch may indicate an issue in your
954+
# computation of the CRC32C checksum. Note: receiving this response message
955+
# indicates that KeyManagementService is able to successfully decrypt the
956+
# ciphertext. Note: This field is defined as int64 for reasons of compatibility
957+
# across different languages. However, it is a non-negative integer, which will
958+
# never exceed 2^32-1, and can be safely downconverted to uint32 in languages
959+
# that support this type.
960+
# Corresponds to the JSON property `sharedSecretCrc32c`
961+
# @return [Fixnum]
962+
attr_accessor :shared_secret_crc32c
963+
964+
# Integrity verification field. A flag indicating whether DecapsulateRequest.
965+
# ciphertext_crc32c was received by KeyManagementService and used for the
966+
# integrity verification of the ciphertext. A false value of this field
967+
# indicates either that DecapsulateRequest.ciphertext_crc32c was left unset or
968+
# that it was not delivered to KeyManagementService. If you've set
969+
# DecapsulateRequest.ciphertext_crc32c but this field is still false, discard
970+
# the response and perform a limited number of retries.
971+
# Corresponds to the JSON property `verifiedCiphertextCrc32c`
972+
# @return [Boolean]
973+
attr_accessor :verified_ciphertext_crc32c
974+
alias_method :verified_ciphertext_crc32c?, :verified_ciphertext_crc32c
975+
976+
def initialize(**args)
977+
update!(**args)
978+
end
979+
980+
# Update properties of this object
981+
def update!(**args)
982+
@name = args[:name] if args.key?(:name)
983+
@protection_level = args[:protection_level] if args.key?(:protection_level)
984+
@shared_secret = args[:shared_secret] if args.key?(:shared_secret)
985+
@shared_secret_crc32c = args[:shared_secret_crc32c] if args.key?(:shared_secret_crc32c)
986+
@verified_ciphertext_crc32c = args[:verified_ciphertext_crc32c] if args.key?(:verified_ciphertext_crc32c)
987+
end
988+
end
989+
889990
# Request message for KeyManagementService.Decrypt.
890991
class DecryptRequest
891992
include Google::Apis::Core::Hashable

generated/google-apis-cloudkms_v1/lib/google/apis/cloudkms_v1/gem_version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ module Google
1616
module Apis
1717
module CloudkmsV1
1818
# Version of the google-apis-cloudkms_v1 gem
19-
GEM_VERSION = "0.59.0"
19+
GEM_VERSION = "0.60.0"
2020

2121
# Version of the code generator used to generate this client
2222
GENERATOR_VERSION = "0.18.0"
2323

2424
# Revision of the discovery document this client was generated from
25-
REVISION = "20250516"
25+
REVISION = "20250731"
2626
end
2727
end
2828
end

generated/google-apis-cloudkms_v1/lib/google/apis/cloudkms_v1/representations.rb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,18 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
106106
include Google::Apis::Core::JsonObjectSupport
107107
end
108108

109+
class DecapsulateRequest
110+
class Representation < Google::Apis::Core::JsonRepresentation; end
111+
112+
include Google::Apis::Core::JsonObjectSupport
113+
end
114+
115+
class DecapsulateResponse
116+
class Representation < Google::Apis::Core::JsonRepresentation; end
117+
118+
include Google::Apis::Core::JsonObjectSupport
119+
end
120+
109121
class DecryptRequest
110122
class Representation < Google::Apis::Core::JsonRepresentation; end
111123

@@ -581,6 +593,25 @@ class Representation < Google::Apis::Core::JsonRepresentation
581593
end
582594
end
583595

596+
class DecapsulateRequest
597+
# @private
598+
class Representation < Google::Apis::Core::JsonRepresentation
599+
property :ciphertext, :base64 => true, as: 'ciphertext'
600+
property :ciphertext_crc32c, :numeric_string => true, as: 'ciphertextCrc32c'
601+
end
602+
end
603+
604+
class DecapsulateResponse
605+
# @private
606+
class Representation < Google::Apis::Core::JsonRepresentation
607+
property :name, as: 'name'
608+
property :protection_level, as: 'protectionLevel'
609+
property :shared_secret, :base64 => true, as: 'sharedSecret'
610+
property :shared_secret_crc32c, :numeric_string => true, as: 'sharedSecretCrc32c'
611+
property :verified_ciphertext_crc32c, as: 'verifiedCiphertextCrc32c'
612+
end
613+
end
614+
584615
class DecryptRequest
585616
# @private
586617
class Representation < Google::Apis::Core::JsonRepresentation

generated/google-apis-cloudkms_v1/lib/google/apis/cloudkms_v1/service.rb

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,6 +1893,41 @@ def create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypt
18931893
execute_or_queue_command(command, &block)
18941894
end
18951895

1896+
# Decapsulates data that was encapsulated with a public key retrieved from
1897+
# GetPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose
1898+
# KEY_ENCAPSULATION.
1899+
# @param [String] name
1900+
# Required. The resource name of the CryptoKeyVersion to use for decapsulation.
1901+
# @param [Google::Apis::CloudkmsV1::DecapsulateRequest] decapsulate_request_object
1902+
# @param [String] fields
1903+
# Selector specifying which fields to include in a partial response.
1904+
# @param [String] quota_user
1905+
# Available to use for quota purposes for server-side applications. Can be any
1906+
# arbitrary string assigned to a user, but should not exceed 40 characters.
1907+
# @param [Google::Apis::RequestOptions] options
1908+
# Request-specific options
1909+
#
1910+
# @yield [result, err] Result & error if block supplied
1911+
# @yieldparam result [Google::Apis::CloudkmsV1::DecapsulateResponse] parsed result object
1912+
# @yieldparam err [StandardError] error object if request failed
1913+
#
1914+
# @return [Google::Apis::CloudkmsV1::DecapsulateResponse]
1915+
#
1916+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1917+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1918+
# @raise [Google::Apis::AuthorizationError] Authorization is required
1919+
def decapsulate_crypto_key_version(name, decapsulate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1920+
command = make_simple_command(:post, 'v1/{+name}:decapsulate', options)
1921+
command.request_representation = Google::Apis::CloudkmsV1::DecapsulateRequest::Representation
1922+
command.request_object = decapsulate_request_object
1923+
command.response_representation = Google::Apis::CloudkmsV1::DecapsulateResponse::Representation
1924+
command.response_class = Google::Apis::CloudkmsV1::DecapsulateResponse
1925+
command.params['name'] = name unless name.nil?
1926+
command.query['fields'] = fields unless fields.nil?
1927+
command.query['quotaUser'] = quota_user unless quota_user.nil?
1928+
execute_or_queue_command(command, &block)
1929+
end
1930+
18961931
# Schedule a CryptoKeyVersion for destruction. Upon calling this method,
18971932
# CryptoKeyVersion.state will be set to DESTROY_SCHEDULED, and destroy_time will
18981933
# be set to the time destroy_scheduled_duration in the future. At that time, the

0 commit comments

Comments
 (0)