#[non_exhaustive]pub struct GenerateRandomBytesRequest {
pub location: String,
pub length_bytes: i32,
pub protection_level: ProtectionLevel,
/* private fields */
}Expand description
Request message for KeyManagementService.GenerateRandomBytes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.location: StringThe project-specific location in which to generate random bytes. For example, “projects/my-project/locations/us-central1”.
length_bytes: i32The length in bytes of the amount of randomness to retrieve. Minimum 8 bytes, maximum 1024 bytes.
protection_level: ProtectionLevelThe ProtectionLevel to use when generating the random data. Currently, only HSM protection level is supported.
Implementations§
Source§impl GenerateRandomBytesRequest
impl GenerateRandomBytesRequest
pub fn new() -> Self
Sourcepub fn set_location<T: Into<String>>(self, v: T) -> Self
pub fn set_location<T: Into<String>>(self, v: T) -> Self
Sets the value of location.
Sourcepub fn set_length_bytes<T: Into<i32>>(self, v: T) -> Self
pub fn set_length_bytes<T: Into<i32>>(self, v: T) -> Self
Sets the value of length_bytes.
Sourcepub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
pub fn set_protection_level<T: Into<ProtectionLevel>>(self, v: T) -> Self
Sets the value of protection_level.
Trait Implementations§
Source§impl Clone for GenerateRandomBytesRequest
impl Clone for GenerateRandomBytesRequest
Source§fn clone(&self) -> GenerateRandomBytesRequest
fn clone(&self) -> GenerateRandomBytesRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenerateRandomBytesRequest
impl Debug for GenerateRandomBytesRequest
Source§impl Default for GenerateRandomBytesRequest
impl Default for GenerateRandomBytesRequest
Source§fn default() -> GenerateRandomBytesRequest
fn default() -> GenerateRandomBytesRequest
Returns the “default value” for a type. Read more
Source§impl Message for GenerateRandomBytesRequest
impl Message for GenerateRandomBytesRequest
impl StructuralPartialEq for GenerateRandomBytesRequest
Auto Trait Implementations§
impl Freeze for GenerateRandomBytesRequest
impl RefUnwindSafe for GenerateRandomBytesRequest
impl Send for GenerateRandomBytesRequest
impl Sync for GenerateRandomBytesRequest
impl Unpin for GenerateRandomBytesRequest
impl UnwindSafe for GenerateRandomBytesRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more