aws-sdk-connectcases 1.116.0

AWS SDK for Amazon Connect Cases
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 CreateRelatedItemInput {
    /// <p>The unique identifier of the Cases domain.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier of the case.</p>
    pub case_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of a related item.</p>
    pub r#type: ::std::option::Option<crate::types::RelatedItemType>,
    /// <p>The content of a related item to be created.</p>
    pub content: ::std::option::Option<crate::types::RelatedItemInputContent>,
    /// <p>Represents the creator of the related item.</p>
    pub performed_by: ::std::option::Option<crate::types::UserUnion>,
}
impl CreateRelatedItemInput {
    /// <p>The unique identifier of the Cases domain.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.as_deref()
    }
    /// <p>A unique identifier of the case.</p>
    pub fn case_id(&self) -> ::std::option::Option<&str> {
        self.case_id.as_deref()
    }
    /// <p>The type of a related item.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::RelatedItemType> {
        self.r#type.as_ref()
    }
    /// <p>The content of a related item to be created.</p>
    pub fn content(&self) -> ::std::option::Option<&crate::types::RelatedItemInputContent> {
        self.content.as_ref()
    }
    /// <p>Represents the creator of the related item.</p>
    pub fn performed_by(&self) -> ::std::option::Option<&crate::types::UserUnion> {
        self.performed_by.as_ref()
    }
}
impl CreateRelatedItemInput {
    /// Creates a new builder-style object to manufacture [`CreateRelatedItemInput`](crate::operation::create_related_item::CreateRelatedItemInput).
    pub fn builder() -> crate::operation::create_related_item::builders::CreateRelatedItemInputBuilder {
        crate::operation::create_related_item::builders::CreateRelatedItemInputBuilder::default()
    }
}

/// A builder for [`CreateRelatedItemInput`](crate::operation::create_related_item::CreateRelatedItemInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRelatedItemInputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) case_id: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::RelatedItemType>,
    pub(crate) content: ::std::option::Option<crate::types::RelatedItemInputContent>,
    pub(crate) performed_by: ::std::option::Option<crate::types::UserUnion>,
}
impl CreateRelatedItemInputBuilder {
    /// <p>The unique identifier of the Cases domain.</p>
    /// This field is required.
    pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the Cases domain.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>The unique identifier of the Cases domain.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <p>A unique identifier of the case.</p>
    /// This field is required.
    pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.case_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier of the case.</p>
    pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.case_id = input;
        self
    }
    /// <p>A unique identifier of the case.</p>
    pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.case_id
    }
    /// <p>The type of a related item.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::RelatedItemType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of a related item.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::RelatedItemType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of a related item.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::RelatedItemType> {
        &self.r#type
    }
    /// <p>The content of a related item to be created.</p>
    /// This field is required.
    pub fn content(mut self, input: crate::types::RelatedItemInputContent) -> Self {
        self.content = ::std::option::Option::Some(input);
        self
    }
    /// <p>The content of a related item to be created.</p>
    pub fn set_content(mut self, input: ::std::option::Option<crate::types::RelatedItemInputContent>) -> Self {
        self.content = input;
        self
    }
    /// <p>The content of a related item to be created.</p>
    pub fn get_content(&self) -> &::std::option::Option<crate::types::RelatedItemInputContent> {
        &self.content
    }
    /// <p>Represents the creator of the related item.</p>
    pub fn performed_by(mut self, input: crate::types::UserUnion) -> Self {
        self.performed_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>Represents the creator of the related item.</p>
    pub fn set_performed_by(mut self, input: ::std::option::Option<crate::types::UserUnion>) -> Self {
        self.performed_by = input;
        self
    }
    /// <p>Represents the creator of the related item.</p>
    pub fn get_performed_by(&self) -> &::std::option::Option<crate::types::UserUnion> {
        &self.performed_by
    }
    /// Consumes the builder and constructs a [`CreateRelatedItemInput`](crate::operation::create_related_item::CreateRelatedItemInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_related_item::CreateRelatedItemInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_related_item::CreateRelatedItemInput {
            domain_id: self.domain_id,
            case_id: self.case_id,
            r#type: self.r#type,
            content: self.content,
            performed_by: self.performed_by,
        })
    }
}