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 CreateConnectionInput {
    /// <p>The location where the connection is created.</p>
    pub aws_location: ::std::option::Option<crate::types::AwsLocation>,
    /// <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>,
    /// <p>The configurations of the connection.</p>
    pub configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
    /// <p>A connection description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the domain where the connection is created.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the environment where the connection is created.</p>
    pub environment_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The connection name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The connection props.</p>
    pub props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
    pub enable_trusted_identity_propagation: ::std::option::Option<bool>,
    /// <p>The scope of the connection.</p>
    pub scope: ::std::option::Option<crate::types::ConnectionScope>,
}
impl CreateConnectionInput {
    /// <p>The location where the connection is created.</p>
    pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
        self.aws_location.as_ref()
    }
    /// <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()
    }
    /// <p>The configurations of the connection.</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 `.configurations.is_none()`.
    pub fn configurations(&self) -> &[crate::types::Configuration] {
        self.configurations.as_deref().unwrap_or_default()
    }
    /// <p>A connection description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of the domain where the connection is created.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The ID of the environment where the connection is created.</p>
    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
        self.environment_identifier.as_deref()
    }
    /// <p>The connection name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The connection props.</p>
    pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesInput> {
        self.props.as_ref()
    }
    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
    pub fn enable_trusted_identity_propagation(&self) -> ::std::option::Option<bool> {
        self.enable_trusted_identity_propagation
    }
    /// <p>The scope of the connection.</p>
    pub fn scope(&self) -> ::std::option::Option<&crate::types::ConnectionScope> {
        self.scope.as_ref()
    }
}
impl ::std::fmt::Debug for CreateConnectionInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateConnectionInput");
        formatter.field("aws_location", &self.aws_location);
        formatter.field("client_token", &self.client_token);
        formatter.field("configurations", &self.configurations);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("environment_identifier", &self.environment_identifier);
        formatter.field("name", &self.name);
        formatter.field("props", &self.props);
        formatter.field("enable_trusted_identity_propagation", &self.enable_trusted_identity_propagation);
        formatter.field("scope", &self.scope);
        formatter.finish()
    }
}
impl CreateConnectionInput {
    /// Creates a new builder-style object to manufacture [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
    pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
        crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
    }
}

/// A builder for [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateConnectionInputBuilder {
    pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesInput>,
    pub(crate) enable_trusted_identity_propagation: ::std::option::Option<bool>,
    pub(crate) scope: ::std::option::Option<crate::types::ConnectionScope>,
}
impl CreateConnectionInputBuilder {
    /// <p>The location where the connection is created.</p>
    pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
        self.aws_location = ::std::option::Option::Some(input);
        self
    }
    /// <p>The location where the connection is created.</p>
    pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
        self.aws_location = input;
        self
    }
    /// <p>The location where the connection is created.</p>
    pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
        &self.aws_location
    }
    /// <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
    }
    /// Appends an item to `configurations`.
    ///
    /// To override the contents of this collection use [`set_configurations`](Self::set_configurations).
    ///
    /// <p>The configurations of the connection.</p>
    pub fn configurations(mut self, input: crate::types::Configuration) -> Self {
        let mut v = self.configurations.unwrap_or_default();
        v.push(input);
        self.configurations = ::std::option::Option::Some(v);
        self
    }
    /// <p>The configurations of the connection.</p>
    pub fn set_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>) -> Self {
        self.configurations = input;
        self
    }
    /// <p>The configurations of the connection.</p>
    pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
        &self.configurations
    }
    /// <p>A connection description.</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>A connection description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A connection description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The ID of the domain where the connection is created.</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 the connection is created.</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 the connection is created.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The ID of the environment where the connection is created.</p>
    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 environment where the connection is created.</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 environment where the connection is created.</p>
    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_identifier
    }
    /// <p>The connection name.</p>
    /// This field is required.
    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 connection name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The connection name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The connection props.</p>
    pub fn props(mut self, input: crate::types::ConnectionPropertiesInput) -> Self {
        self.props = ::std::option::Option::Some(input);
        self
    }
    /// <p>The connection props.</p>
    pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesInput>) -> Self {
        self.props = input;
        self
    }
    /// <p>The connection props.</p>
    pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesInput> {
        &self.props
    }
    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
    pub fn enable_trusted_identity_propagation(mut self, input: bool) -> Self {
        self.enable_trusted_identity_propagation = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
    pub fn set_enable_trusted_identity_propagation(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_trusted_identity_propagation = input;
        self
    }
    /// <p>Specifies whether the trusted identity propagation is enabled.</p>
    pub fn get_enable_trusted_identity_propagation(&self) -> &::std::option::Option<bool> {
        &self.enable_trusted_identity_propagation
    }
    /// <p>The scope of the connection.</p>
    pub fn scope(mut self, input: crate::types::ConnectionScope) -> Self {
        self.scope = ::std::option::Option::Some(input);
        self
    }
    /// <p>The scope of the connection.</p>
    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::ConnectionScope>) -> Self {
        self.scope = input;
        self
    }
    /// <p>The scope of the connection.</p>
    pub fn get_scope(&self) -> &::std::option::Option<crate::types::ConnectionScope> {
        &self.scope
    }
    /// Consumes the builder and constructs a [`CreateConnectionInput`](crate::operation::create_connection::CreateConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_connection::CreateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_connection::CreateConnectionInput {
            aws_location: self.aws_location,
            client_token: self.client_token,
            configurations: self.configurations,
            description: self.description,
            domain_identifier: self.domain_identifier,
            environment_identifier: self.environment_identifier,
            name: self.name,
            props: self.props,
            enable_trusted_identity_propagation: self.enable_trusted_identity_propagation,
            scope: self.scope,
        })
    }
}
impl ::std::fmt::Debug for CreateConnectionInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateConnectionInputBuilder");
        formatter.field("aws_location", &self.aws_location);
        formatter.field("client_token", &self.client_token);
        formatter.field("configurations", &self.configurations);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("environment_identifier", &self.environment_identifier);
        formatter.field("name", &self.name);
        formatter.field("props", &self.props);
        formatter.field("enable_trusted_identity_propagation", &self.enable_trusted_identity_propagation);
        formatter.field("scope", &self.scope);
        formatter.finish()
    }
}