aws-sdk-migrationhubrefactorspaces 1.98.0

AWS SDK for AWS Migration Hub Refactor Spaces
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 CreateApplicationInput {
    /// <p>The name to use for the application.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the environment.</p>
    pub environment_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the virtual private cloud (VPC).</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
    /// <p>The proxy type of the proxy created within the application.</p>
    pub proxy_type: ::std::option::Option<crate::types::ProxyType>,
    /// <p>A wrapper object holding the API Gateway endpoint type and stage name for the proxy.</p>
    pub api_gateway_proxy: ::std::option::Option<crate::types::ApiGatewayProxyInput>,
    /// <p>The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateApplicationInput {
    /// <p>The name to use for the application.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The unique identifier of the environment.</p>
    pub fn environment_identifier(&self) -> ::std::option::Option<&str> {
        self.environment_identifier.as_deref()
    }
    /// <p>The ID of the virtual private cloud (VPC).</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The proxy type of the proxy created within the application.</p>
    pub fn proxy_type(&self) -> ::std::option::Option<&crate::types::ProxyType> {
        self.proxy_type.as_ref()
    }
    /// <p>A wrapper object holding the API Gateway endpoint type and stage name for the proxy.</p>
    pub fn api_gateway_proxy(&self) -> ::std::option::Option<&crate::types::ApiGatewayProxyInput> {
        self.api_gateway_proxy.as_ref()
    }
    /// <p>The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ::std::fmt::Debug for CreateApplicationInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateApplicationInput");
        formatter.field("name", &self.name);
        formatter.field("environment_identifier", &self.environment_identifier);
        formatter.field("vpc_id", &self.vpc_id);
        formatter.field("proxy_type", &self.proxy_type);
        formatter.field("api_gateway_proxy", &self.api_gateway_proxy);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}
impl CreateApplicationInput {
    /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
        crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
    }
}

/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateApplicationInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) environment_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
    pub(crate) proxy_type: ::std::option::Option<crate::types::ProxyType>,
    pub(crate) api_gateway_proxy: ::std::option::Option<crate::types::ApiGatewayProxyInput>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateApplicationInputBuilder {
    /// <p>The name to use for the application.</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 name to use for the application.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name to use for the application.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The unique identifier of the 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 unique identifier of the environment.</p>
    pub fn set_environment_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_identifier = input;
        self
    }
    /// <p>The unique identifier of the environment.</p>
    pub fn get_environment_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_identifier
    }
    /// <p>The ID of the virtual private cloud (VPC).</p>
    /// This field is required.
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the virtual private cloud (VPC).</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The ID of the virtual private cloud (VPC).</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// <p>The proxy type of the proxy created within the application.</p>
    /// This field is required.
    pub fn proxy_type(mut self, input: crate::types::ProxyType) -> Self {
        self.proxy_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The proxy type of the proxy created within the application.</p>
    pub fn set_proxy_type(mut self, input: ::std::option::Option<crate::types::ProxyType>) -> Self {
        self.proxy_type = input;
        self
    }
    /// <p>The proxy type of the proxy created within the application.</p>
    pub fn get_proxy_type(&self) -> &::std::option::Option<crate::types::ProxyType> {
        &self.proxy_type
    }
    /// <p>A wrapper object holding the API Gateway endpoint type and stage name for the proxy.</p>
    pub fn api_gateway_proxy(mut self, input: crate::types::ApiGatewayProxyInput) -> Self {
        self.api_gateway_proxy = ::std::option::Option::Some(input);
        self
    }
    /// <p>A wrapper object holding the API Gateway endpoint type and stage name for the proxy.</p>
    pub fn set_api_gateway_proxy(mut self, input: ::std::option::Option<crate::types::ApiGatewayProxyInput>) -> Self {
        self.api_gateway_proxy = input;
        self
    }
    /// <p>A wrapper object holding the API Gateway endpoint type and stage name for the proxy.</p>
    pub fn get_api_gateway_proxy(&self) -> &::std::option::Option<crate::types::ApiGatewayProxyInput> {
        &self.api_gateway_proxy
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>A unique, case-sensitive identifier that you provide 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 you provide 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 you provide 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 [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
            name: self.name,
            environment_identifier: self.environment_identifier,
            vpc_id: self.vpc_id,
            proxy_type: self.proxy_type,
            api_gateway_proxy: self.api_gateway_proxy,
            tags: self.tags,
            client_token: self.client_token,
        })
    }
}
impl ::std::fmt::Debug for CreateApplicationInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateApplicationInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("environment_identifier", &self.environment_identifier);
        formatter.field("vpc_id", &self.vpc_id);
        formatter.field("proxy_type", &self.proxy_type);
        formatter.field("api_gateway_proxy", &self.api_gateway_proxy);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}