#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Annotation {
pub title: ::std::option::Option<::std::string::String>,
pub destructive_hint: ::std::option::Option<bool>,
}
impl Annotation {
pub fn title(&self) -> ::std::option::Option<&str> {
self.title.as_deref()
}
pub fn destructive_hint(&self) -> ::std::option::Option<bool> {
self.destructive_hint
}
}
impl ::std::fmt::Debug for Annotation {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("Annotation");
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("destructive_hint", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl Annotation {
pub fn builder() -> crate::types::builders::AnnotationBuilder {
crate::types::builders::AnnotationBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct AnnotationBuilder {
pub(crate) title: ::std::option::Option<::std::string::String>,
pub(crate) destructive_hint: ::std::option::Option<bool>,
}
impl AnnotationBuilder {
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
pub fn destructive_hint(mut self, input: bool) -> Self {
self.destructive_hint = ::std::option::Option::Some(input);
self
}
pub fn set_destructive_hint(mut self, input: ::std::option::Option<bool>) -> Self {
self.destructive_hint = input;
self
}
pub fn get_destructive_hint(&self) -> &::std::option::Option<bool> {
&self.destructive_hint
}
pub fn build(self) -> crate::types::Annotation {
crate::types::Annotation {
title: self.title,
destructive_hint: self.destructive_hint,
}
}
}
impl ::std::fmt::Debug for AnnotationBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("AnnotationBuilder");
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("destructive_hint", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}