#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateEncryptionConfigInput {
pub cluster_name: ::std::option::Option<::std::string::String>,
pub encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
pub client_request_token: ::std::option::Option<::std::string::String>,
}
impl AssociateEncryptionConfigInput {
pub fn cluster_name(&self) -> ::std::option::Option<&str> {
self.cluster_name.as_deref()
}
pub fn encryption_config(&self) -> &[crate::types::EncryptionConfig] {
self.encryption_config.as_deref().unwrap_or_default()
}
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
}
impl AssociateEncryptionConfigInput {
pub fn builder() -> crate::operation::associate_encryption_config::builders::AssociateEncryptionConfigInputBuilder {
crate::operation::associate_encryption_config::builders::AssociateEncryptionConfigInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateEncryptionConfigInputBuilder {
pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
pub(crate) encryption_config: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
}
impl AssociateEncryptionConfigInputBuilder {
pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_name = input;
self
}
pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_name
}
pub fn encryption_config(mut self, input: crate::types::EncryptionConfig) -> Self {
let mut v = self.encryption_config.unwrap_or_default();
v.push(input);
self.encryption_config = ::std::option::Option::Some(v);
self
}
pub fn set_encryption_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>>) -> Self {
self.encryption_config = input;
self
}
pub fn get_encryption_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EncryptionConfig>> {
&self.encryption_config
}
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::associate_encryption_config::AssociateEncryptionConfigInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::associate_encryption_config::AssociateEncryptionConfigInput {
cluster_name: self.cluster_name,
encryption_config: self.encryption_config,
client_request_token: self.client_request_token,
})
}
}