#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct ReEncryptDataInput {
pub incoming_key_identifier: ::std::option::Option<::std::string::String>,
pub outgoing_key_identifier: ::std::option::Option<::std::string::String>,
pub cipher_text: ::std::option::Option<::std::string::String>,
pub incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
pub outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
pub incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
pub outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
}
impl ReEncryptDataInput {
pub fn incoming_key_identifier(&self) -> ::std::option::Option<&str> {
self.incoming_key_identifier.as_deref()
}
pub fn outgoing_key_identifier(&self) -> ::std::option::Option<&str> {
self.outgoing_key_identifier.as_deref()
}
pub fn cipher_text(&self) -> ::std::option::Option<&str> {
self.cipher_text.as_deref()
}
pub fn incoming_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
self.incoming_encryption_attributes.as_ref()
}
pub fn outgoing_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
self.outgoing_encryption_attributes.as_ref()
}
pub fn incoming_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
self.incoming_wrapped_key.as_ref()
}
pub fn outgoing_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
self.outgoing_wrapped_key.as_ref()
}
}
impl ::std::fmt::Debug for ReEncryptDataInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ReEncryptDataInput");
formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
formatter.field("cipher_text", &"*** Sensitive Data Redacted ***");
formatter.field("incoming_encryption_attributes", &self.incoming_encryption_attributes);
formatter.field("outgoing_encryption_attributes", &self.outgoing_encryption_attributes);
formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
formatter.finish()
}
}
impl ReEncryptDataInput {
pub fn builder() -> crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder {
crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ReEncryptDataInputBuilder {
pub(crate) incoming_key_identifier: ::std::option::Option<::std::string::String>,
pub(crate) outgoing_key_identifier: ::std::option::Option<::std::string::String>,
pub(crate) cipher_text: ::std::option::Option<::std::string::String>,
pub(crate) incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
pub(crate) outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
pub(crate) incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
pub(crate) outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
}
impl ReEncryptDataInputBuilder {
pub fn incoming_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.incoming_key_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_incoming_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.incoming_key_identifier = input;
self
}
pub fn get_incoming_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.incoming_key_identifier
}
pub fn outgoing_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.outgoing_key_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_outgoing_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.outgoing_key_identifier = input;
self
}
pub fn get_outgoing_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.outgoing_key_identifier
}
pub fn cipher_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cipher_text = ::std::option::Option::Some(input.into());
self
}
pub fn set_cipher_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cipher_text = input;
self
}
pub fn get_cipher_text(&self) -> &::std::option::Option<::std::string::String> {
&self.cipher_text
}
pub fn incoming_encryption_attributes(mut self, input: crate::types::ReEncryptionAttributes) -> Self {
self.incoming_encryption_attributes = ::std::option::Option::Some(input);
self
}
pub fn set_incoming_encryption_attributes(mut self, input: ::std::option::Option<crate::types::ReEncryptionAttributes>) -> Self {
self.incoming_encryption_attributes = input;
self
}
pub fn get_incoming_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
&self.incoming_encryption_attributes
}
pub fn outgoing_encryption_attributes(mut self, input: crate::types::ReEncryptionAttributes) -> Self {
self.outgoing_encryption_attributes = ::std::option::Option::Some(input);
self
}
pub fn set_outgoing_encryption_attributes(mut self, input: ::std::option::Option<crate::types::ReEncryptionAttributes>) -> Self {
self.outgoing_encryption_attributes = input;
self
}
pub fn get_outgoing_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
&self.outgoing_encryption_attributes
}
pub fn incoming_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
self.incoming_wrapped_key = ::std::option::Option::Some(input);
self
}
pub fn set_incoming_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
self.incoming_wrapped_key = input;
self
}
pub fn get_incoming_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
&self.incoming_wrapped_key
}
pub fn outgoing_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
self.outgoing_wrapped_key = ::std::option::Option::Some(input);
self
}
pub fn set_outgoing_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
self.outgoing_wrapped_key = input;
self
}
pub fn get_outgoing_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
&self.outgoing_wrapped_key
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::re_encrypt_data::ReEncryptDataInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::re_encrypt_data::ReEncryptDataInput {
incoming_key_identifier: self.incoming_key_identifier,
outgoing_key_identifier: self.outgoing_key_identifier,
cipher_text: self.cipher_text,
incoming_encryption_attributes: self.incoming_encryption_attributes,
outgoing_encryption_attributes: self.outgoing_encryption_attributes,
incoming_wrapped_key: self.incoming_wrapped_key,
outgoing_wrapped_key: self.outgoing_wrapped_key,
})
}
}
impl ::std::fmt::Debug for ReEncryptDataInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("ReEncryptDataInputBuilder");
formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
formatter.field("cipher_text", &"*** Sensitive Data Redacted ***");
formatter.field("incoming_encryption_attributes", &self.incoming_encryption_attributes);
formatter.field("outgoing_encryption_attributes", &self.outgoing_encryption_attributes);
formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
formatter.finish()
}
}