public sealed class GenerateRandomBytesRequest : IMessage<GenerateRandomBytesRequest>, IEquatable<GenerateRandomBytesRequest>, IDeepCloneable<GenerateRandomBytesRequest>, IBufferMessage, IMessage
Request message for
[KeyManagementService.GenerateRandomBytes][google.cloud.kms.v1.KeyManagementService.GenerateRandomBytes].
The project-specific location in which to generate random bytes.
For example, "projects/my-project/locations/us-central1".
Property Value
Type
Description
System.String
ProtectionLevel
public ProtectionLevel ProtectionLevel { get; set; }
The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when
generating the random data. Currently, only
[HSM][google.cloud.kms.v1.ProtectionLevel.HSM] protection level is
supported.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eGenerateRandomBytesRequest\u003c/code\u003e is 3.16.0, while version 3.0.0 is also available along with multiple previous versions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eGenerateRandomBytesRequest\u003c/code\u003e is a message used for requesting random byte generation via the KeyManagementService.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerateRandomBytesRequest\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from the \u003ccode\u003eObject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThis request object includes properties to define the \u003ccode\u003eLengthBytes\u003c/code\u003e, \u003ccode\u003eLocation\u003c/code\u003e, and \u003ccode\u003eProtectionLevel\u003c/code\u003e, with the \u003ccode\u003eLengthBytes\u003c/code\u003e property specifying the amount of randomness to be retrieved.\u003c/p\u003e\n"],["\u003cp\u003eOnly the HSM protection level is currently supported when generating the random data, as defined by the ProtectionLevel property.\u003c/p\u003e\n"]]],[],null,[]]