Struct google_api_proto::google::cloud::kms::v1::CryptoKeyVersionTemplate
source · pub struct CryptoKeyVersionTemplate {
pub protection_level: i32,
pub algorithm: i32,
}
Expand description
A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate] specifies the properties to use when creating a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually with [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or automatically as a result of auto-rotation.
Fields§
§protection_level: i32
[ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
algorithm: i32
Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template.
For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
Implementations§
source§impl CryptoKeyVersionTemplate
impl CryptoKeyVersionTemplate
sourcepub fn protection_level(&self) -> ProtectionLevel
pub fn protection_level(&self) -> ProtectionLevel
Returns the enum value of protection_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_protection_level(&mut self, value: ProtectionLevel)
pub fn set_protection_level(&mut self, value: ProtectionLevel)
Sets protection_level
to the provided enum value.
sourcepub fn algorithm(&self) -> CryptoKeyVersionAlgorithm
pub fn algorithm(&self) -> CryptoKeyVersionAlgorithm
Returns the enum value of algorithm
, or the default if the field is set to an invalid enum value.
sourcepub fn set_algorithm(&mut self, value: CryptoKeyVersionAlgorithm)
pub fn set_algorithm(&mut self, value: CryptoKeyVersionAlgorithm)
Sets algorithm
to the provided enum value.
Trait Implementations§
source§impl Clone for CryptoKeyVersionTemplate
impl Clone for CryptoKeyVersionTemplate
source§fn clone(&self) -> CryptoKeyVersionTemplate
fn clone(&self) -> CryptoKeyVersionTemplate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CryptoKeyVersionTemplate
impl Debug for CryptoKeyVersionTemplate
source§impl Default for CryptoKeyVersionTemplate
impl Default for CryptoKeyVersionTemplate
source§impl Message for CryptoKeyVersionTemplate
impl Message for CryptoKeyVersionTemplate
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CryptoKeyVersionTemplate
impl PartialEq for CryptoKeyVersionTemplate
source§fn eq(&self, other: &CryptoKeyVersionTemplate) -> bool
fn eq(&self, other: &CryptoKeyVersionTemplate) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for CryptoKeyVersionTemplate
impl StructuralPartialEq for CryptoKeyVersionTemplate
Auto Trait Implementations§
impl Freeze for CryptoKeyVersionTemplate
impl RefUnwindSafe for CryptoKeyVersionTemplate
impl Send for CryptoKeyVersionTemplate
impl Sync for CryptoKeyVersionTemplate
impl Unpin for CryptoKeyVersionTemplate
impl UnwindSafe for CryptoKeyVersionTemplate
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request