aws-sdk-wisdom 1.99.0

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

/// <p>The document.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Document {
    /// <p>A reference to the content resource.</p>
    pub content_reference: ::std::option::Option<crate::types::ContentReference>,
    /// <p>The title of the document.</p>
    pub title: ::std::option::Option<crate::types::DocumentText>,
    /// <p>The excerpt from the document.</p>
    pub excerpt: ::std::option::Option<crate::types::DocumentText>,
}
impl Document {
    /// <p>A reference to the content resource.</p>
    pub fn content_reference(&self) -> ::std::option::Option<&crate::types::ContentReference> {
        self.content_reference.as_ref()
    }
    /// <p>The title of the document.</p>
    pub fn title(&self) -> ::std::option::Option<&crate::types::DocumentText> {
        self.title.as_ref()
    }
    /// <p>The excerpt from the document.</p>
    pub fn excerpt(&self) -> ::std::option::Option<&crate::types::DocumentText> {
        self.excerpt.as_ref()
    }
}
impl Document {
    /// Creates a new builder-style object to manufacture [`Document`](crate::types::Document).
    pub fn builder() -> crate::types::builders::DocumentBuilder {
        crate::types::builders::DocumentBuilder::default()
    }
}

/// A builder for [`Document`](crate::types::Document).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DocumentBuilder {
    pub(crate) content_reference: ::std::option::Option<crate::types::ContentReference>,
    pub(crate) title: ::std::option::Option<crate::types::DocumentText>,
    pub(crate) excerpt: ::std::option::Option<crate::types::DocumentText>,
}
impl DocumentBuilder {
    /// <p>A reference to the content resource.</p>
    /// This field is required.
    pub fn content_reference(mut self, input: crate::types::ContentReference) -> Self {
        self.content_reference = ::std::option::Option::Some(input);
        self
    }
    /// <p>A reference to the content resource.</p>
    pub fn set_content_reference(mut self, input: ::std::option::Option<crate::types::ContentReference>) -> Self {
        self.content_reference = input;
        self
    }
    /// <p>A reference to the content resource.</p>
    pub fn get_content_reference(&self) -> &::std::option::Option<crate::types::ContentReference> {
        &self.content_reference
    }
    /// <p>The title of the document.</p>
    pub fn title(mut self, input: crate::types::DocumentText) -> Self {
        self.title = ::std::option::Option::Some(input);
        self
    }
    /// <p>The title of the document.</p>
    pub fn set_title(mut self, input: ::std::option::Option<crate::types::DocumentText>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the document.</p>
    pub fn get_title(&self) -> &::std::option::Option<crate::types::DocumentText> {
        &self.title
    }
    /// <p>The excerpt from the document.</p>
    pub fn excerpt(mut self, input: crate::types::DocumentText) -> Self {
        self.excerpt = ::std::option::Option::Some(input);
        self
    }
    /// <p>The excerpt from the document.</p>
    pub fn set_excerpt(mut self, input: ::std::option::Option<crate::types::DocumentText>) -> Self {
        self.excerpt = input;
        self
    }
    /// <p>The excerpt from the document.</p>
    pub fn get_excerpt(&self) -> &::std::option::Option<crate::types::DocumentText> {
        &self.excerpt
    }
    /// Consumes the builder and constructs a [`Document`](crate::types::Document).
    pub fn build(self) -> crate::types::Document {
        crate::types::Document {
            content_reference: self.content_reference,
            title: self.title,
            excerpt: self.excerpt,
        }
    }
}