aws-sdk-qconnect 1.109.0

AWS SDK for Amazon Q Connect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An annotation that provides additional context or metadata.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Annotation {
    /// <p>The title of the annotation.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>A hint indicating that the annotation contains potentially destructive content.</p>
    pub destructive_hint: ::std::option::Option<bool>,
}
impl Annotation {
    /// <p>The title of the annotation.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>A hint indicating that the annotation contains potentially destructive content.</p>
    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 {
    /// Creates a new builder-style object to manufacture [`Annotation`](crate::types::Annotation).
    pub fn builder() -> crate::types::builders::AnnotationBuilder {
        crate::types::builders::AnnotationBuilder::default()
    }
}

/// A builder for [`Annotation`](crate::types::Annotation).
#[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 {
    /// <p>The title of the annotation.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the annotation.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the annotation.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>A hint indicating that the annotation contains potentially destructive content.</p>
    pub fn destructive_hint(mut self, input: bool) -> Self {
        self.destructive_hint = ::std::option::Option::Some(input);
        self
    }
    /// <p>A hint indicating that the annotation contains potentially destructive content.</p>
    pub fn set_destructive_hint(mut self, input: ::std::option::Option<bool>) -> Self {
        self.destructive_hint = input;
        self
    }
    /// <p>A hint indicating that the annotation contains potentially destructive content.</p>
    pub fn get_destructive_hint(&self) -> &::std::option::Option<bool> {
        &self.destructive_hint
    }
    /// Consumes the builder and constructs a [`Annotation`](crate::types::Annotation).
    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()
    }
}