aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
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)]
pub struct UpdateRuleInput {
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the rule that is to be updated</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the rule.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the rule.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The scrope of the rule.</p>
    pub scope: ::std::option::Option<crate::types::RuleScope>,
    /// <p>The detail of the rule.</p>
    pub detail: ::std::option::Option<crate::types::RuleDetail>,
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub include_child_domain_units: ::std::option::Option<bool>,
}
impl UpdateRuleInput {
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The ID of the rule that is to be updated</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The name of the rule.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The description of the rule.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The scrope of the rule.</p>
    pub fn scope(&self) -> ::std::option::Option<&crate::types::RuleScope> {
        self.scope.as_ref()
    }
    /// <p>The detail of the rule.</p>
    pub fn detail(&self) -> ::std::option::Option<&crate::types::RuleDetail> {
        self.detail.as_ref()
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn include_child_domain_units(&self) -> ::std::option::Option<bool> {
        self.include_child_domain_units
    }
}
impl ::std::fmt::Debug for UpdateRuleInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateRuleInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("scope", &self.scope);
        formatter.field("detail", &self.detail);
        formatter.field("include_child_domain_units", &self.include_child_domain_units);
        formatter.finish()
    }
}
impl UpdateRuleInput {
    /// Creates a new builder-style object to manufacture [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
    pub fn builder() -> crate::operation::update_rule::builders::UpdateRuleInputBuilder {
        crate::operation::update_rule::builders::UpdateRuleInputBuilder::default()
    }
}

/// A builder for [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateRuleInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) identifier: ::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) scope: ::std::option::Option<crate::types::RuleScope>,
    pub(crate) detail: ::std::option::Option<crate::types::RuleDetail>,
    pub(crate) include_child_domain_units: ::std::option::Option<bool>,
}
impl UpdateRuleInputBuilder {
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The ID of the domain in which a rule is to be updated.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The ID of the rule that is to be updated</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the rule that is to be updated</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The ID of the rule that is to be updated</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The name of the 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>The name of the rule.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the rule.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The description of the 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 the rule.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the rule.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The scrope of the rule.</p>
    pub fn scope(mut self, input: crate::types::RuleScope) -> Self {
        self.scope = ::std::option::Option::Some(input);
        self
    }
    /// <p>The scrope of the rule.</p>
    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::RuleScope>) -> Self {
        self.scope = input;
        self
    }
    /// <p>The scrope of the rule.</p>
    pub fn get_scope(&self) -> &::std::option::Option<crate::types::RuleScope> {
        &self.scope
    }
    /// <p>The detail of the rule.</p>
    pub fn detail(mut self, input: crate::types::RuleDetail) -> Self {
        self.detail = ::std::option::Option::Some(input);
        self
    }
    /// <p>The detail of the rule.</p>
    pub fn set_detail(mut self, input: ::std::option::Option<crate::types::RuleDetail>) -> Self {
        self.detail = input;
        self
    }
    /// <p>The detail of the rule.</p>
    pub fn get_detail(&self) -> &::std::option::Option<crate::types::RuleDetail> {
        &self.detail
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn include_child_domain_units(mut self, input: bool) -> Self {
        self.include_child_domain_units = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn set_include_child_domain_units(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_child_domain_units = input;
        self
    }
    /// <p>Specifies whether to update this rule in the child domain units.</p>
    pub fn get_include_child_domain_units(&self) -> &::std::option::Option<bool> {
        &self.include_child_domain_units
    }
    /// Consumes the builder and constructs a [`UpdateRuleInput`](crate::operation::update_rule::UpdateRuleInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_rule::UpdateRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_rule::UpdateRuleInput {
            domain_identifier: self.domain_identifier,
            identifier: self.identifier,
            name: self.name,
            description: self.description,
            scope: self.scope,
            detail: self.detail,
            include_child_domain_units: self.include_child_domain_units,
        })
    }
}
impl ::std::fmt::Debug for UpdateRuleInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateRuleInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("scope", &self.scope);
        formatter.field("detail", &self.detail);
        formatter.field("include_child_domain_units", &self.include_child_domain_units);
        formatter.finish()
    }
}