// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_application::_create_application_input::CreateApplicationInputBuilder;
pub use crate::operation::create_application::_create_application_output::CreateApplicationOutputBuilder;
impl crate::operation::create_application::builders::CreateApplicationInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::create_application::CreateApplicationOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_application::CreateApplicationError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.create_application();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `CreateApplication`.
///
/// <p>Creates an Amazon Web Services Migration Hub Refactor Spaces application. The account that owns the environment also owns the applications created inside the environment, regardless of the account that creates the application. Refactor Spaces provisions an Amazon API Gateway, API Gateway VPC link, and Network Load Balancer for the application proxy inside your account.</p>
/// <p>In environments created with a <a href="https://docs.aws.amazon.com/migrationhub-refactor-spaces/latest/APIReference/API_CreateEnvironment.html#migrationhubrefactorspaces-CreateEnvironment-request-NetworkFabricType">CreateEnvironment:NetworkFabricType</a> of <code>NONE</code> you need to configure <a href="https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/amazon-vpc-to-amazon-vpc-connectivity-options.html"> VPC to VPC connectivity</a> between your service VPC and the application proxy VPC to route traffic through the application proxy to a service with a private URL endpoint. For more information, see <a href="https://docs.aws.amazon.com/migrationhub-refactor-spaces/latest/userguide/getting-started-create-application.html"> Create an application</a> in the <i>Refactor Spaces User Guide</i>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateApplicationFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::create_application::builders::CreateApplicationInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::create_application::CreateApplicationOutput,
crate::operation::create_application::CreateApplicationError,
> for CreateApplicationFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::create_application::CreateApplicationOutput,
crate::operation::create_application::CreateApplicationError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl CreateApplicationFluentBuilder {
/// Creates a new `CreateApplicationFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the CreateApplication as a reference.
pub fn as_input(&self) -> &crate::operation::create_application::builders::CreateApplicationInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::create_application::CreateApplicationOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_application::CreateApplicationError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::create_application::CreateApplication::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::create_application::CreateApplication::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::create_application::CreateApplicationOutput,
crate::operation::create_application::CreateApplicationError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The name to use for the application.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.name(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.inner = self.inner.set_name(input);
self
}
/// <p>The name to use for the application.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_name()
}
/// <p>The unique identifier of the environment.</p>
pub fn environment_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.environment_identifier(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.inner = self.inner.set_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.inner.get_environment_identifier()
}
/// <p>The ID of the virtual private cloud (VPC).</p>
pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.vpc_id(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.inner = self.inner.set_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.inner.get_vpc_id()
}
/// <p>The proxy type of the proxy created within the application.</p>
pub fn proxy_type(mut self, input: crate::types::ProxyType) -> Self {
self.inner = self.inner.proxy_type(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.inner = self.inner.set_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.inner.get_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.inner = self.inner.api_gateway_proxy(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.inner = self.inner.set_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.inner.get_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 {
self.inner = self.inner.tags(k.into(), v.into());
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.inner = self.inner.set_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.inner.get_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.inner = self.inner.client_token(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.inner = self.inner.set_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.inner.get_client_token()
}
}