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 RemovePolicyGrantInput {
    /// <p>The ID of the domain where you want to remove a policy grant.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The type of the entity from which you want to remove a policy grant.</p>
    pub entity_type: ::std::option::Option<crate::types::TargetEntityType>,
    /// <p>The ID of the entity from which you want to remove a policy grant.</p>
    pub entity_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The type of the policy that you want to remove.</p>
    pub policy_type: ::std::option::Option<crate::types::ManagedPolicyType>,
    /// <p>The principal from which you want to remove a policy grant.</p>
    pub principal: ::std::option::Option<crate::types::PolicyGrantPrincipal>,
    /// <p>The ID of the policy grant that is to be removed from a specified entity.</p>
    pub grant_identifier: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl RemovePolicyGrantInput {
    /// <p>The ID of the domain where you want to remove a policy grant.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The type of the entity from which you want to remove a policy grant.</p>
    pub fn entity_type(&self) -> ::std::option::Option<&crate::types::TargetEntityType> {
        self.entity_type.as_ref()
    }
    /// <p>The ID of the entity from which you want to remove a policy grant.</p>
    pub fn entity_identifier(&self) -> ::std::option::Option<&str> {
        self.entity_identifier.as_deref()
    }
    /// <p>The type of the policy that you want to remove.</p>
    pub fn policy_type(&self) -> ::std::option::Option<&crate::types::ManagedPolicyType> {
        self.policy_type.as_ref()
    }
    /// <p>The principal from which you want to remove a policy grant.</p>
    pub fn principal(&self) -> ::std::option::Option<&crate::types::PolicyGrantPrincipal> {
        self.principal.as_ref()
    }
    /// <p>The ID of the policy grant that is to be removed from a specified entity.</p>
    pub fn grant_identifier(&self) -> ::std::option::Option<&str> {
        self.grant_identifier.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl RemovePolicyGrantInput {
    /// Creates a new builder-style object to manufacture [`RemovePolicyGrantInput`](crate::operation::remove_policy_grant::RemovePolicyGrantInput).
    pub fn builder() -> crate::operation::remove_policy_grant::builders::RemovePolicyGrantInputBuilder {
        crate::operation::remove_policy_grant::builders::RemovePolicyGrantInputBuilder::default()
    }
}

/// A builder for [`RemovePolicyGrantInput`](crate::operation::remove_policy_grant::RemovePolicyGrantInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RemovePolicyGrantInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) entity_type: ::std::option::Option<crate::types::TargetEntityType>,
    pub(crate) entity_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) policy_type: ::std::option::Option<crate::types::ManagedPolicyType>,
    pub(crate) principal: ::std::option::Option<crate::types::PolicyGrantPrincipal>,
    pub(crate) grant_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl RemovePolicyGrantInputBuilder {
    /// <p>The ID of the domain where you want to remove a policy grant.</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 remove a policy grant.</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 remove a policy grant.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The type of the entity from which you want to remove a policy grant.</p>
    /// This field is required.
    pub fn entity_type(mut self, input: crate::types::TargetEntityType) -> Self {
        self.entity_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the entity from which you want to remove a policy grant.</p>
    pub fn set_entity_type(mut self, input: ::std::option::Option<crate::types::TargetEntityType>) -> Self {
        self.entity_type = input;
        self
    }
    /// <p>The type of the entity from which you want to remove a policy grant.</p>
    pub fn get_entity_type(&self) -> &::std::option::Option<crate::types::TargetEntityType> {
        &self.entity_type
    }
    /// <p>The ID of the entity from which you want to remove a policy grant.</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 the entity from which you want to remove a policy grant.</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 the entity from which you want to remove a policy grant.</p>
    pub fn get_entity_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.entity_identifier
    }
    /// <p>The type of the policy that you want to remove.</p>
    /// This field is required.
    pub fn policy_type(mut self, input: crate::types::ManagedPolicyType) -> Self {
        self.policy_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the policy that you want to remove.</p>
    pub fn set_policy_type(mut self, input: ::std::option::Option<crate::types::ManagedPolicyType>) -> Self {
        self.policy_type = input;
        self
    }
    /// <p>The type of the policy that you want to remove.</p>
    pub fn get_policy_type(&self) -> &::std::option::Option<crate::types::ManagedPolicyType> {
        &self.policy_type
    }
    /// <p>The principal from which you want to remove a policy grant.</p>
    /// This field is required.
    pub fn principal(mut self, input: crate::types::PolicyGrantPrincipal) -> Self {
        self.principal = ::std::option::Option::Some(input);
        self
    }
    /// <p>The principal from which you want to remove a policy grant.</p>
    pub fn set_principal(mut self, input: ::std::option::Option<crate::types::PolicyGrantPrincipal>) -> Self {
        self.principal = input;
        self
    }
    /// <p>The principal from which you want to remove a policy grant.</p>
    pub fn get_principal(&self) -> &::std::option::Option<crate::types::PolicyGrantPrincipal> {
        &self.principal
    }
    /// <p>The ID of the policy grant that is to be removed from a specified entity.</p>
    pub fn grant_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.grant_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the policy grant that is to be removed from a specified entity.</p>
    pub fn set_grant_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.grant_identifier = input;
        self
    }
    /// <p>The ID of the policy grant that is to be removed from a specified entity.</p>
    pub fn get_grant_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.grant_identifier
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`RemovePolicyGrantInput`](crate::operation::remove_policy_grant::RemovePolicyGrantInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::remove_policy_grant::RemovePolicyGrantInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::remove_policy_grant::RemovePolicyGrantInput {
            domain_identifier: self.domain_identifier,
            entity_type: self.entity_type,
            entity_identifier: self.entity_identifier,
            policy_type: self.policy_type,
            principal: self.principal,
            grant_identifier: self.grant_identifier,
            client_token: self.client_token,
        })
    }
}