aws_sdk_s3/types/_ssekms.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies the use of SSE-KMS to encrypt delivered inventory reports.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Ssekms {
/// <p>Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports.</p>
pub key_id: ::std::string::String,
}
impl Ssekms {
/// <p>Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports.</p>
pub fn key_id(&self) -> &str {
use std::ops::Deref;
self.key_id.deref()
}
}
impl ::std::fmt::Debug for Ssekms {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("Ssekms");
formatter.field("key_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl Ssekms {
/// Creates a new builder-style object to manufacture [`Ssekms`](crate::types::Ssekms).
pub fn builder() -> crate::types::builders::SsekmsBuilder {
crate::types::builders::SsekmsBuilder::default()
}
}
/// A builder for [`Ssekms`](crate::types::Ssekms).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SsekmsBuilder {
pub(crate) key_id: ::std::option::Option<::std::string::String>,
}
impl SsekmsBuilder {
/// <p>Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports.</p>
/// This field is required.
pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports.</p>
pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_id = input;
self
}
/// <p>Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports.</p>
pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.key_id
}
/// Consumes the builder and constructs a [`Ssekms`](crate::types::Ssekms).
/// This method will fail if any of the following fields are not set:
/// - [`key_id`](crate::types::builders::SsekmsBuilder::key_id)
pub fn build(self) -> ::std::result::Result<crate::types::Ssekms, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Ssekms {
key_id: self.key_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"key_id",
"key_id was not specified but it is required when building Ssekms",
)
})?,
})
}
}
impl ::std::fmt::Debug for SsekmsBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SsekmsBuilder");
formatter.field("key_id", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}