#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateCredentialLockerInput {
pub name: ::std::option::Option<::std::string::String>,
pub client_token: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCredentialLockerInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::std::fmt::Debug for CreateCredentialLockerInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateCredentialLockerInput");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("client_token", &self.client_token);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl CreateCredentialLockerInput {
pub fn builder() -> crate::operation::create_credential_locker::builders::CreateCredentialLockerInputBuilder {
crate::operation::create_credential_locker::builders::CreateCredentialLockerInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateCredentialLockerInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCredentialLockerInputBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_credential_locker::CreateCredentialLockerInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_credential_locker::CreateCredentialLockerInput {
name: self.name,
client_token: self.client_token,
tags: self.tags,
})
}
}
impl ::std::fmt::Debug for CreateCredentialLockerInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateCredentialLockerInputBuilder");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("client_token", &self.client_token);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}