aws-sdk-artifact 1.94.0

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

/// <p>Citation information for AI-generated responses.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Citation {
    /// <p>Label identifying the compliance source.</p>
    pub source_label: ::std::option::Option<::std::string::String>,
    /// <p>Content text from the compliance source.</p>
    pub source_content: ::std::option::Option<::std::string::String>,
    /// <p>Link to the compliance source.</p>
    pub source_link: ::std::option::Option<::std::string::String>,
}
impl Citation {
    /// <p>Label identifying the compliance source.</p>
    pub fn source_label(&self) -> ::std::option::Option<&str> {
        self.source_label.as_deref()
    }
    /// <p>Content text from the compliance source.</p>
    pub fn source_content(&self) -> ::std::option::Option<&str> {
        self.source_content.as_deref()
    }
    /// <p>Link to the compliance source.</p>
    pub fn source_link(&self) -> ::std::option::Option<&str> {
        self.source_link.as_deref()
    }
}
impl Citation {
    /// Creates a new builder-style object to manufacture [`Citation`](crate::types::Citation).
    pub fn builder() -> crate::types::builders::CitationBuilder {
        crate::types::builders::CitationBuilder::default()
    }
}

/// A builder for [`Citation`](crate::types::Citation).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CitationBuilder {
    pub(crate) source_label: ::std::option::Option<::std::string::String>,
    pub(crate) source_content: ::std::option::Option<::std::string::String>,
    pub(crate) source_link: ::std::option::Option<::std::string::String>,
}
impl CitationBuilder {
    /// <p>Label identifying the compliance source.</p>
    pub fn source_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Label identifying the compliance source.</p>
    pub fn set_source_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_label = input;
        self
    }
    /// <p>Label identifying the compliance source.</p>
    pub fn get_source_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_label
    }
    /// <p>Content text from the compliance source.</p>
    pub fn source_content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_content = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Content text from the compliance source.</p>
    pub fn set_source_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_content = input;
        self
    }
    /// <p>Content text from the compliance source.</p>
    pub fn get_source_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_content
    }
    /// <p>Link to the compliance source.</p>
    pub fn source_link(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_link = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Link to the compliance source.</p>
    pub fn set_source_link(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_link = input;
        self
    }
    /// <p>Link to the compliance source.</p>
    pub fn get_source_link(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_link
    }
    /// Consumes the builder and constructs a [`Citation`](crate::types::Citation).
    pub fn build(self) -> crate::types::Citation {
        crate::types::Citation {
            source_label: self.source_label,
            source_content: self.source_content,
            source_link: self.source_link,
        }
    }
}