#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct WatchlistSummary {
pub domain_id: ::std::option::Option<::std::string::String>,
pub watchlist_id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub default_watchlist: bool,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl WatchlistSummary {
pub fn domain_id(&self) -> ::std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn watchlist_id(&self) -> ::std::option::Option<&str> {
self.watchlist_id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn default_watchlist(&self) -> bool {
self.default_watchlist
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
}
impl ::std::fmt::Debug for WatchlistSummary {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("WatchlistSummary");
formatter.field("domain_id", &self.domain_id);
formatter.field("watchlist_id", &self.watchlist_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("default_watchlist", &self.default_watchlist);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.finish()
}
}
impl WatchlistSummary {
pub fn builder() -> crate::types::builders::WatchlistSummaryBuilder {
crate::types::builders::WatchlistSummaryBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct WatchlistSummaryBuilder {
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) watchlist_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) default_watchlist: ::std::option::Option<bool>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl WatchlistSummaryBuilder {
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn watchlist_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.watchlist_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_watchlist_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.watchlist_id = input;
self
}
pub fn get_watchlist_id(&self) -> &::std::option::Option<::std::string::String> {
&self.watchlist_id
}
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 description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn default_watchlist(mut self, input: bool) -> Self {
self.default_watchlist = ::std::option::Option::Some(input);
self
}
pub fn set_default_watchlist(mut self, input: ::std::option::Option<bool>) -> Self {
self.default_watchlist = input;
self
}
pub fn get_default_watchlist(&self) -> &::std::option::Option<bool> {
&self.default_watchlist
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn build(self) -> crate::types::WatchlistSummary {
crate::types::WatchlistSummary {
domain_id: self.domain_id,
watchlist_id: self.watchlist_id,
name: self.name,
description: self.description,
default_watchlist: self.default_watchlist.unwrap_or_default(),
created_at: self.created_at,
updated_at: self.updated_at,
}
}
}
impl ::std::fmt::Debug for WatchlistSummaryBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("WatchlistSummaryBuilder");
formatter.field("domain_id", &self.domain_id);
formatter.field("watchlist_id", &self.watchlist_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("default_watchlist", &self.default_watchlist);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.finish()
}
}