Cloud KMS V1 Client - Class GenerateRandomBytesRequest (2.1.4)

Reference documentation and code samples for the Cloud KMS V1 Client class GenerateRandomBytesRequest.

Request message for KeyManagementService.GenerateRandomBytes.

Generated from protobuf message google.cloud.kms.v1.GenerateRandomBytesRequest

Namespace

Google \ Cloud \ Kms \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ location string

The project-specific location in which to generate random bytes. For example, "projects/my-project/locations/us-central1".

↳ length_bytes int

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

↳ protection_level int

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

getLocation

The project-specific location in which to generate random bytes.

For example, "projects/my-project/locations/us-central1".

Returns
Type Description
string

setLocation

The project-specific location in which to generate random bytes.

For example, "projects/my-project/locations/us-central1".

Parameter
Name Description
var string
Returns
Type Description
$this

getLengthBytes

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

Returns
Type Description
int

setLengthBytes

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

Parameter
Name Description
var int
Returns
Type Description
$this

getProtectionLevel

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

Returns
Type Description
int

setProtectionLevel

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

Parameter
Name Description
var int
Returns
Type Description
$this

static::build

Parameters
Name Description
location string

The project-specific location in which to generate random bytes. For example, "projects/my-project/locations/us-central1".

lengthBytes int

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

protectionLevel int

The ProtectionLevel to use when generating the random data. Currently, only HSM protection level is supported. For allowed values, use constants defined on ProtectionLevel

Returns
Type Description
GenerateRandomBytesRequest