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, ::std::fmt::Debug)]
pub struct DisassociateGovernedTermsInput {
    /// <p>The ID of the domain where you want to disassociate restricted terms from an asset.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of an asset from which you want to disassociate restricted terms.</p>
    pub entity_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The type of the asset from which you want to disassociate restricted terms.</p>
    pub entity_type: ::std::option::Option<crate::types::GovernedEntityType>,
    /// <p>The restricted glossary terms that you want to disassociate from an asset.</p>
    pub governed_glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateGovernedTermsInput {
    /// <p>The ID of the domain where you want to disassociate restricted terms from an asset.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The ID of an asset from which you want to disassociate restricted terms.</p>
    pub fn entity_identifier(&self) -> ::std::option::Option<&str> {
        self.entity_identifier.as_deref()
    }
    /// <p>The type of the asset from which you want to disassociate restricted terms.</p>
    pub fn entity_type(&self) -> ::std::option::Option<&crate::types::GovernedEntityType> {
        self.entity_type.as_ref()
    }
    /// <p>The restricted glossary terms that you want to disassociate from an asset.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.governed_glossary_terms.is_none()`.
    pub fn governed_glossary_terms(&self) -> &[::std::string::String] {
        self.governed_glossary_terms.as_deref().unwrap_or_default()
    }
}
impl DisassociateGovernedTermsInput {
    /// Creates a new builder-style object to manufacture [`DisassociateGovernedTermsInput`](crate::operation::disassociate_governed_terms::DisassociateGovernedTermsInput).
    pub fn builder() -> crate::operation::disassociate_governed_terms::builders::DisassociateGovernedTermsInputBuilder {
        crate::operation::disassociate_governed_terms::builders::DisassociateGovernedTermsInputBuilder::default()
    }
}

/// A builder for [`DisassociateGovernedTermsInput`](crate::operation::disassociate_governed_terms::DisassociateGovernedTermsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DisassociateGovernedTermsInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) entity_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) entity_type: ::std::option::Option<crate::types::GovernedEntityType>,
    pub(crate) governed_glossary_terms: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DisassociateGovernedTermsInputBuilder {
    /// <p>The ID of the domain where you want to disassociate restricted terms from an asset.</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 where you want to disassociate restricted terms from an asset.</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 where you want to disassociate restricted terms from an asset.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The ID of an asset from which you want to disassociate restricted terms.</p>
    /// This field is required.
    pub fn entity_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.entity_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of an asset from which you want to disassociate restricted terms.</p>
    pub fn set_entity_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.entity_identifier = input;
        self
    }
    /// <p>The ID of an asset from which you want to disassociate restricted terms.</p>
    pub fn get_entity_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.entity_identifier
    }
    /// <p>The type of the asset from which you want to disassociate restricted terms.</p>
    /// This field is required.
    pub fn entity_type(mut self, input: crate::types::GovernedEntityType) -> Self {
        self.entity_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the asset from which you want to disassociate restricted terms.</p>
    pub fn set_entity_type(mut self, input: ::std::option::Option<crate::types::GovernedEntityType>) -> Self {
        self.entity_type = input;
        self
    }
    /// <p>The type of the asset from which you want to disassociate restricted terms.</p>
    pub fn get_entity_type(&self) -> &::std::option::Option<crate::types::GovernedEntityType> {
        &self.entity_type
    }
    /// Appends an item to `governed_glossary_terms`.
    ///
    /// To override the contents of this collection use [`set_governed_glossary_terms`](Self::set_governed_glossary_terms).
    ///
    /// <p>The restricted glossary terms that you want to disassociate from an asset.</p>
    pub fn governed_glossary_terms(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.governed_glossary_terms.unwrap_or_default();
        v.push(input.into());
        self.governed_glossary_terms = ::std::option::Option::Some(v);
        self
    }
    /// <p>The restricted glossary terms that you want to disassociate from an asset.</p>
    pub fn set_governed_glossary_terms(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.governed_glossary_terms = input;
        self
    }
    /// <p>The restricted glossary terms that you want to disassociate from an asset.</p>
    pub fn get_governed_glossary_terms(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.governed_glossary_terms
    }
    /// Consumes the builder and constructs a [`DisassociateGovernedTermsInput`](crate::operation::disassociate_governed_terms::DisassociateGovernedTermsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::disassociate_governed_terms::DisassociateGovernedTermsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::disassociate_governed_terms::DisassociateGovernedTermsInput {
            domain_identifier: self.domain_identifier,
            entity_identifier: self.entity_identifier,
            entity_type: self.entity_type,
            governed_glossary_terms: self.governed_glossary_terms,
        })
    }
}