aws-sdk-connectcases 1.113.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 UpdateCaseRuleInput {
    /// <p>Unique identifier of a Cases domain.</p>
    pub domain_id: ::std::option::Option<::std::string::String>,
    /// <p>Unique identifier of a case rule.</p>
    pub case_rule_id: ::std::option::Option<::std::string::String>,
    /// <p>Name of the case rule.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>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 UpdateCaseRuleInput {
    /// <p>Unique identifier of a Cases domain.</p>
    pub fn domain_id(&self) -> ::std::option::Option<&str> {
        self.domain_id.as_deref()
    }
    /// <p>Unique identifier of a case rule.</p>
    pub fn case_rule_id(&self) -> ::std::option::Option<&str> {
        self.case_rule_id.as_deref()
    }
    /// <p>Name of the case rule.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>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 UpdateCaseRuleInput {
    /// Creates a new builder-style object to manufacture [`UpdateCaseRuleInput`](crate::operation::update_case_rule::UpdateCaseRuleInput).
    pub fn builder() -> crate::operation::update_case_rule::builders::UpdateCaseRuleInputBuilder {
        crate::operation::update_case_rule::builders::UpdateCaseRuleInputBuilder::default()
    }
}

/// A builder for [`UpdateCaseRuleInput`](crate::operation::update_case_rule::UpdateCaseRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCaseRuleInputBuilder {
    pub(crate) domain_id: ::std::option::Option<::std::string::String>,
    pub(crate) case_rule_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 UpdateCaseRuleInputBuilder {
    /// <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>Unique identifier of a case rule.</p>
    /// This field is required.
    pub fn case_rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.case_rule_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier of a case rule.</p>
    pub fn set_case_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.case_rule_id = input;
        self
    }
    /// <p>Unique identifier of a case rule.</p>
    pub fn get_case_rule_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.case_rule_id
    }
    /// <p>Name of the case rule.</p>
    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>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>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>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>
    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 [`UpdateCaseRuleInput`](crate::operation::update_case_rule::UpdateCaseRuleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_case_rule::UpdateCaseRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_case_rule::UpdateCaseRuleInput {
            domain_id: self.domain_id,
            case_rule_id: self.case_rule_id,
            name: self.name,
            description: self.description,
            rule: self.rule,
        })
    }
}