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 CreateCaseRuleInput {
    /// <p>Unique identifier of a Cases domain.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>Name of the case rule.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of a case rule.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Represents what rule type should take place, under what conditions.</p>
    pub rule: ::std::option::Option<crate::types::CaseRuleDetails>,
}
impl CreateCaseRuleInput {
    /// <p>Unique identifier of a Cases domain.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.as_deref()
    }
    /// <p>Name of the case rule.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of a case rule.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Represents what rule type should take place, under what conditions.</p>
    pub fn rule(&self) -> ::std::option::Option<&crate::types::CaseRuleDetails> {
        self.rule.as_ref()
    }
}
impl CreateCaseRuleInput {
    /// Creates a new builder-style object to manufacture [`CreateCaseRuleInput`](crate::operation::create_case_rule::CreateCaseRuleInput).
    pub fn builder() -> crate::operation::create_case_rule::builders::CreateCaseRuleInputBuilder {
        crate::operation::create_case_rule::builders::CreateCaseRuleInputBuilder::default()
    }
}

/// A builder for [`CreateCaseRuleInput`](crate::operation::create_case_rule::CreateCaseRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateCaseRuleInputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) rule: ::std::option::Option<crate::types::CaseRuleDetails>,
}
impl CreateCaseRuleInputBuilder {
    /// <p>Unique identifier of a 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>Unique identifier of a Cases domain.</p>
    pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_id = input;
        self
    }
    /// <p>Unique identifier of a Cases domain.</p>
    pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_id
    }
    /// <p>Name of the case rule.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Name of the case rule.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Name of the case rule.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of a case rule.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of a case rule.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of a case rule.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Represents what rule type should take place, under what conditions.</p>
    /// This field is required.
    pub fn rule(mut self, input: crate::types::CaseRuleDetails) -> Self {
        self.rule = ::std::option::Option::Some(input);
        self
    }
    /// <p>Represents what rule type should take place, under what conditions.</p>
    pub fn set_rule(mut self, input: ::std::option::Option<crate::types::CaseRuleDetails>) -> Self {
        self.rule = input;
        self
    }
    /// <p>Represents what rule type should take place, under what conditions.</p>
    pub fn get_rule(&self) -> &::std::option::Option<crate::types::CaseRuleDetails> {
        &self.rule
    }
    /// Consumes the builder and constructs a [`CreateCaseRuleInput`](crate::operation::create_case_rule::CreateCaseRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_case_rule::CreateCaseRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_case_rule::CreateCaseRuleInput {
            domain_id: self.domain_id,
            name: self.name,
            description: self.description,
            rule: self.rule,
        })
    }
}