#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct SecretValueEntry {
pub arn: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub version_id: ::std::option::Option<::std::string::String>,
pub secret_binary: ::std::option::Option<::aws_smithy_types::Blob>,
pub secret_string: ::std::option::Option<::std::string::String>,
pub version_stages: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl SecretValueEntry {
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn version_id(&self) -> ::std::option::Option<&str> {
self.version_id.as_deref()
}
pub fn secret_binary(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
self.secret_binary.as_ref()
}
pub fn secret_string(&self) -> ::std::option::Option<&str> {
self.secret_string.as_deref()
}
pub fn version_stages(&self) -> &[::std::string::String] {
self.version_stages.as_deref().unwrap_or_default()
}
pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_date.as_ref()
}
}
impl ::std::fmt::Debug for SecretValueEntry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SecretValueEntry");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
formatter.field("version_stages", &self.version_stages);
formatter.field("created_date", &self.created_date);
formatter.finish()
}
}
impl SecretValueEntry {
pub fn builder() -> crate::types::builders::SecretValueEntryBuilder {
crate::types::builders::SecretValueEntryBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct SecretValueEntryBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) version_id: ::std::option::Option<::std::string::String>,
pub(crate) secret_binary: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) secret_string: ::std::option::Option<::std::string::String>,
pub(crate) version_stages: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl SecretValueEntryBuilder {
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
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 version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
&self.version_id
}
pub fn secret_binary(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.secret_binary = ::std::option::Option::Some(input);
self
}
pub fn set_secret_binary(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.secret_binary = input;
self
}
pub fn get_secret_binary(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.secret_binary
}
pub fn secret_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.secret_string = ::std::option::Option::Some(input.into());
self
}
pub fn set_secret_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.secret_string = input;
self
}
pub fn get_secret_string(&self) -> &::std::option::Option<::std::string::String> {
&self.secret_string
}
pub fn version_stages(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.version_stages.unwrap_or_default();
v.push(input.into());
self.version_stages = ::std::option::Option::Some(v);
self
}
pub fn set_version_stages(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.version_stages = input;
self
}
pub fn get_version_stages(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.version_stages
}
pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_date = ::std::option::Option::Some(input);
self
}
pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_date = input;
self
}
pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_date
}
pub fn build(self) -> crate::types::SecretValueEntry {
crate::types::SecretValueEntry {
arn: self.arn,
name: self.name,
version_id: self.version_id,
secret_binary: self.secret_binary,
secret_string: self.secret_string,
version_stages: self.version_stages,
created_date: self.created_date,
}
}
}
impl ::std::fmt::Debug for SecretValueEntryBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SecretValueEntryBuilder");
formatter.field("arn", &self.arn);
formatter.field("name", &self.name);
formatter.field("version_id", &self.version_id);
formatter.field("secret_binary", &"*** Sensitive Data Redacted ***");
formatter.field("secret_string", &"*** Sensitive Data Redacted ***");
formatter.field("version_stages", &self.version_stages);
formatter.field("created_date", &self.created_date);
formatter.finish()
}
}