aws-sdk-migrationhubstrategy 1.47.0

AWS SDK for Migration Hub Strategy Recommendations
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 UpdateServerConfigInput {
    /// <p>The ID of the server.</p>
    pub server_id: ::std::option::Option<::std::string::String>,
    /// <p>The preferred strategy options for the application component. See the response from <code>GetServerStrategies</code>.</p>
    pub strategy_option: ::std::option::Option<crate::types::StrategyOption>,
}
impl UpdateServerConfigInput {
    /// <p>The ID of the server.</p>
    pub fn server_id(&self) -> ::std::option::Option<&str> {
        self.server_id.as_deref()
    }
    /// <p>The preferred strategy options for the application component. See the response from <code>GetServerStrategies</code>.</p>
    pub fn strategy_option(&self) -> ::std::option::Option<&crate::types::StrategyOption> {
        self.strategy_option.as_ref()
    }
}
impl UpdateServerConfigInput {
    /// Creates a new builder-style object to manufacture [`UpdateServerConfigInput`](crate::operation::update_server_config::UpdateServerConfigInput).
    pub fn builder() -> crate::operation::update_server_config::builders::UpdateServerConfigInputBuilder {
        crate::operation::update_server_config::builders::UpdateServerConfigInputBuilder::default()
    }
}

/// A builder for [`UpdateServerConfigInput`](crate::operation::update_server_config::UpdateServerConfigInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateServerConfigInputBuilder {
    pub(crate) server_id: ::std::option::Option<::std::string::String>,
    pub(crate) strategy_option: ::std::option::Option<crate::types::StrategyOption>,
}
impl UpdateServerConfigInputBuilder {
    /// <p>The ID of the server.</p>
    /// This field is required.
    pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.server_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the server.</p>
    pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.server_id = input;
        self
    }
    /// <p>The ID of the server.</p>
    pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.server_id
    }
    /// <p>The preferred strategy options for the application component. See the response from <code>GetServerStrategies</code>.</p>
    pub fn strategy_option(mut self, input: crate::types::StrategyOption) -> Self {
        self.strategy_option = ::std::option::Option::Some(input);
        self
    }
    /// <p>The preferred strategy options for the application component. See the response from <code>GetServerStrategies</code>.</p>
    pub fn set_strategy_option(mut self, input: ::std::option::Option<crate::types::StrategyOption>) -> Self {
        self.strategy_option = input;
        self
    }
    /// <p>The preferred strategy options for the application component. See the response from <code>GetServerStrategies</code>.</p>
    pub fn get_strategy_option(&self) -> &::std::option::Option<crate::types::StrategyOption> {
        &self.strategy_option
    }
    /// Consumes the builder and constructs a [`UpdateServerConfigInput`](crate::operation::update_server_config::UpdateServerConfigInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_server_config::UpdateServerConfigInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_server_config::UpdateServerConfigInput {
            server_id: self.server_id,
            strategy_option: self.strategy_option,
        })
    }
}