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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetContentAssociationInput {
    /// <p>The identifier of the knowledge base.</p>
    pub knowledge_base_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the content.</p>
    pub content_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub content_association_id: ::std::option::Option<::std::string::String>,
}
impl GetContentAssociationInput {
    /// <p>The identifier of the knowledge base.</p>
    pub fn knowledge_base_id(&self) -> ::std::option::Option<&str> {
        self.knowledge_base_id.as_deref()
    }
    /// <p>The identifier of the content.</p>
    pub fn content_id(&self) -> ::std::option::Option<&str> {
        self.content_id.as_deref()
    }
    /// <p>The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub fn content_association_id(&self) -> ::std::option::Option<&str> {
        self.content_association_id.as_deref()
    }
}
impl GetContentAssociationInput {
    /// Creates a new builder-style object to manufacture [`GetContentAssociationInput`](crate::operation::get_content_association::GetContentAssociationInput).
    pub fn builder() -> crate::operation::get_content_association::builders::GetContentAssociationInputBuilder {
        crate::operation::get_content_association::builders::GetContentAssociationInputBuilder::default()
    }
}

/// A builder for [`GetContentAssociationInput`](crate::operation::get_content_association::GetContentAssociationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetContentAssociationInputBuilder {
    pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
    pub(crate) content_id: ::std::option::Option<::std::string::String>,
    pub(crate) content_association_id: ::std::option::Option<::std::string::String>,
}
impl GetContentAssociationInputBuilder {
    /// <p>The identifier of the knowledge base.</p>
    /// This field is required.
    pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.knowledge_base_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the knowledge base.</p>
    pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.knowledge_base_id = input;
        self
    }
    /// <p>The identifier of the knowledge base.</p>
    pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.knowledge_base_id
    }
    /// <p>The identifier of the content.</p>
    /// This field is required.
    pub fn content_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the content.</p>
    pub fn set_content_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content_id = input;
        self
    }
    /// <p>The identifier of the content.</p>
    pub fn get_content_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.content_id
    }
    /// <p>The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    /// This field is required.
    pub fn content_association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content_association_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub fn set_content_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content_association_id = input;
        self
    }
    /// <p>The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
    pub fn get_content_association_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.content_association_id
    }
    /// Consumes the builder and constructs a [`GetContentAssociationInput`](crate::operation::get_content_association::GetContentAssociationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_content_association::GetContentAssociationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_content_association::GetContentAssociationInput {
            knowledge_base_id: self.knowledge_base_id,
            content_id: self.content_id,
            content_association_id: self.content_association_id,
        })
    }
}