aws-sdk-mgn 1.102.0

AWS SDK for Application Migration Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_launch_configuration::_update_launch_configuration_input::UpdateLaunchConfigurationInputBuilder;

pub use crate::operation::update_launch_configuration::_update_launch_configuration_output::UpdateLaunchConfigurationOutputBuilder;

impl crate::operation::update_launch_configuration::builders::UpdateLaunchConfigurationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_launch_configuration::UpdateLaunchConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_launch_configuration();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateLaunchConfiguration`.
///
/// <p>Updates multiple LaunchConfigurations by Source Server ID.</p><note>
/// <p>bootMode valid values are <code>LEGACY_BIOS | UEFI</code></p>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateLaunchConfigurationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_launch_configuration::builders::UpdateLaunchConfigurationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_launch_configuration::UpdateLaunchConfigurationOutput,
        crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
    > for UpdateLaunchConfigurationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_launch_configuration::UpdateLaunchConfigurationOutput,
            crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateLaunchConfigurationFluentBuilder {
    /// Creates a new `UpdateLaunchConfigurationFluentBuilder`.
    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 UpdateLaunchConfiguration as a reference.
    pub fn as_input(&self) -> &crate::operation::update_launch_configuration::builders::UpdateLaunchConfigurationInputBuilder {
        &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::update_launch_configuration::UpdateLaunchConfigurationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
            ::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::update_launch_configuration::UpdateLaunchConfiguration::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_launch_configuration::UpdateLaunchConfiguration::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::update_launch_configuration::UpdateLaunchConfigurationOutput,
        crate::operation::update_launch_configuration::UpdateLaunchConfigurationError,
        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>Update Launch configuration by Source Server ID request.</p>
    pub fn source_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.source_server_id(input.into());
        self
    }
    /// <p>Update Launch configuration by Source Server ID request.</p>
    pub fn set_source_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_source_server_id(input);
        self
    }
    /// <p>Update Launch configuration by Source Server ID request.</p>
    pub fn get_source_server_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_source_server_id()
    }
    /// <p>Update Launch configuration name request.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>Update Launch configuration name request.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>Update Launch configuration name request.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>Update Launch configuration launch disposition request.</p>
    pub fn launch_disposition(mut self, input: crate::types::LaunchDisposition) -> Self {
        self.inner = self.inner.launch_disposition(input);
        self
    }
    /// <p>Update Launch configuration launch disposition request.</p>
    pub fn set_launch_disposition(mut self, input: ::std::option::Option<crate::types::LaunchDisposition>) -> Self {
        self.inner = self.inner.set_launch_disposition(input);
        self
    }
    /// <p>Update Launch configuration launch disposition request.</p>
    pub fn get_launch_disposition(&self) -> &::std::option::Option<crate::types::LaunchDisposition> {
        self.inner.get_launch_disposition()
    }
    /// <p>Update Launch configuration Target instance right sizing request.</p>
    pub fn target_instance_type_right_sizing_method(mut self, input: crate::types::TargetInstanceTypeRightSizingMethod) -> Self {
        self.inner = self.inner.target_instance_type_right_sizing_method(input);
        self
    }
    /// <p>Update Launch configuration Target instance right sizing request.</p>
    pub fn set_target_instance_type_right_sizing_method(
        mut self,
        input: ::std::option::Option<crate::types::TargetInstanceTypeRightSizingMethod>,
    ) -> Self {
        self.inner = self.inner.set_target_instance_type_right_sizing_method(input);
        self
    }
    /// <p>Update Launch configuration Target instance right sizing request.</p>
    pub fn get_target_instance_type_right_sizing_method(&self) -> &::std::option::Option<crate::types::TargetInstanceTypeRightSizingMethod> {
        self.inner.get_target_instance_type_right_sizing_method()
    }
    /// <p>Update Launch configuration copy Private IP request.</p>
    pub fn copy_private_ip(mut self, input: bool) -> Self {
        self.inner = self.inner.copy_private_ip(input);
        self
    }
    /// <p>Update Launch configuration copy Private IP request.</p>
    pub fn set_copy_private_ip(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_copy_private_ip(input);
        self
    }
    /// <p>Update Launch configuration copy Private IP request.</p>
    pub fn get_copy_private_ip(&self) -> &::std::option::Option<bool> {
        self.inner.get_copy_private_ip()
    }
    /// <p>Update Launch configuration copy Tags request.</p>
    pub fn copy_tags(mut self, input: bool) -> Self {
        self.inner = self.inner.copy_tags(input);
        self
    }
    /// <p>Update Launch configuration copy Tags request.</p>
    pub fn set_copy_tags(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_copy_tags(input);
        self
    }
    /// <p>Update Launch configuration copy Tags request.</p>
    pub fn get_copy_tags(&self) -> &::std::option::Option<bool> {
        self.inner.get_copy_tags()
    }
    /// <p>Update Launch configuration licensing request.</p>
    pub fn licensing(mut self, input: crate::types::Licensing) -> Self {
        self.inner = self.inner.licensing(input);
        self
    }
    /// <p>Update Launch configuration licensing request.</p>
    pub fn set_licensing(mut self, input: ::std::option::Option<crate::types::Licensing>) -> Self {
        self.inner = self.inner.set_licensing(input);
        self
    }
    /// <p>Update Launch configuration licensing request.</p>
    pub fn get_licensing(&self) -> &::std::option::Option<crate::types::Licensing> {
        self.inner.get_licensing()
    }
    /// <p>Update Launch configuration boot mode request.</p>
    pub fn boot_mode(mut self, input: crate::types::BootMode) -> Self {
        self.inner = self.inner.boot_mode(input);
        self
    }
    /// <p>Update Launch configuration boot mode request.</p>
    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootMode>) -> Self {
        self.inner = self.inner.set_boot_mode(input);
        self
    }
    /// <p>Update Launch configuration boot mode request.</p>
    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootMode> {
        self.inner.get_boot_mode()
    }
    /// <p>Post Launch Actions to executed on the Test or Cutover instance.</p>
    pub fn post_launch_actions(mut self, input: crate::types::PostLaunchActions) -> Self {
        self.inner = self.inner.post_launch_actions(input);
        self
    }
    /// <p>Post Launch Actions to executed on the Test or Cutover instance.</p>
    pub fn set_post_launch_actions(mut self, input: ::std::option::Option<crate::types::PostLaunchActions>) -> Self {
        self.inner = self.inner.set_post_launch_actions(input);
        self
    }
    /// <p>Post Launch Actions to executed on the Test or Cutover instance.</p>
    pub fn get_post_launch_actions(&self) -> &::std::option::Option<crate::types::PostLaunchActions> {
        self.inner.get_post_launch_actions()
    }
    /// <p>Enable map auto tagging.</p>
    pub fn enable_map_auto_tagging(mut self, input: bool) -> Self {
        self.inner = self.inner.enable_map_auto_tagging(input);
        self
    }
    /// <p>Enable map auto tagging.</p>
    pub fn set_enable_map_auto_tagging(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_enable_map_auto_tagging(input);
        self
    }
    /// <p>Enable map auto tagging.</p>
    pub fn get_enable_map_auto_tagging(&self) -> &::std::option::Option<bool> {
        self.inner.get_enable_map_auto_tagging()
    }
    /// <p>Launch configuration map auto tagging MPE ID.</p>
    pub fn map_auto_tagging_mpe_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.map_auto_tagging_mpe_id(input.into());
        self
    }
    /// <p>Launch configuration map auto tagging MPE ID.</p>
    pub fn set_map_auto_tagging_mpe_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_map_auto_tagging_mpe_id(input);
        self
    }
    /// <p>Launch configuration map auto tagging MPE ID.</p>
    pub fn get_map_auto_tagging_mpe_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_map_auto_tagging_mpe_id()
    }
    /// <p>Update Launch configuration Account ID.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.account_id(input.into());
        self
    }
    /// <p>Update Launch configuration Account ID.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_account_id(input);
        self
    }
    /// <p>Update Launch configuration Account ID.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_account_id()
    }
}