Class: Google::Apis::CloudkmsV1::GenerateRandomBytesRequest

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudkms_v1/classes.rb,
lib/google/apis/cloudkms_v1/representations.rb,
lib/google/apis/cloudkms_v1/representations.rb

Overview

Request message for KeyManagementService.GenerateRandomBytes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenerateRandomBytesRequest

Returns a new instance of GenerateRandomBytesRequest.



1203
1204
1205
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1203

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#length_bytesFixnum

The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes. Corresponds to the JSON property lengthBytes

Returns:

  • (Fixnum)


1195
1196
1197
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1195

def length_bytes
  @length_bytes
end

#protection_levelString

The ProtectionLevel to use when generating the random data. Currently, only HSM protection level is supported. Corresponds to the JSON property protectionLevel

Returns:

  • (String)


1201
1202
1203
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1201

def protection_level
  @protection_level
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1208
1209
1210
1211
# File 'lib/google/apis/cloudkms_v1/classes.rb', line 1208

def update!(**args)
  @length_bytes = args[:length_bytes] if args.key?(:length_bytes)
  @protection_level = args[:protection_level] if args.key?(:protection_level)
end