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 AssociateEnvironmentRoleInput {
    /// <p>The ID of the Amazon DataZone domain in which the environment role is associated.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon DataZone environment.</p>
    pub environment_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the environment role.</p>
    pub environment_role_arn: ::std::option::Option<::std::string::String>,
}
impl AssociateEnvironmentRoleInput {
    /// <p>The ID of the Amazon DataZone domain in which the environment role is associated.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The ID of the Amazon DataZone environment.</p>
    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
        self.environment_identifier.as_deref()
    }
    /// <p>The ARN of the environment role.</p>
    pub fn environment_role_arn(&self) -> ::std::option::Option<&str> {
        self.environment_role_arn.as_deref()
    }
}
impl AssociateEnvironmentRoleInput {
    /// Creates a new builder-style object to manufacture [`AssociateEnvironmentRoleInput`](crate::operation::associate_environment_role::AssociateEnvironmentRoleInput).
    pub fn builder() -> crate::operation::associate_environment_role::builders::AssociateEnvironmentRoleInputBuilder {
        crate::operation::associate_environment_role::builders::AssociateEnvironmentRoleInputBuilder::default()
    }
}

/// A builder for [`AssociateEnvironmentRoleInput`](crate::operation::associate_environment_role::AssociateEnvironmentRoleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateEnvironmentRoleInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) environment_role_arn: ::std::option::Option<::std::string::String>,
}
impl AssociateEnvironmentRoleInputBuilder {
    /// <p>The ID of the Amazon DataZone domain in which the environment role is associated.</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 Amazon DataZone domain in which the environment role is associated.</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 Amazon DataZone domain in which the environment role is associated.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The ID of the Amazon DataZone environment.</p>
    /// This field is required.
    pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon DataZone environment.</p>
    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_identifier = input;
        self
    }
    /// <p>The ID of the Amazon DataZone environment.</p>
    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_identifier
    }
    /// <p>The ARN of the environment role.</p>
    /// This field is required.
    pub fn environment_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the environment role.</p>
    pub fn set_environment_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_role_arn = input;
        self
    }
    /// <p>The ARN of the environment role.</p>
    pub fn get_environment_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_role_arn
    }
    /// Consumes the builder and constructs a [`AssociateEnvironmentRoleInput`](crate::operation::associate_environment_role::AssociateEnvironmentRoleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::associate_environment_role::AssociateEnvironmentRoleInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::associate_environment_role::AssociateEnvironmentRoleInput {
            domain_identifier: self.domain_identifier,
            environment_identifier: self.environment_identifier,
            environment_role_arn: self.environment_role_arn,
        })
    }
}