aws-sdk-migrationhubstrategy 0.27.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>
    #[doc(hidden)]
    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>
    #[doc(hidden)]
    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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
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>
    pub fn server_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.server_id = 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 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 = 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
    }
    /// Consumes the builder and constructs a [`UpdateServerConfigInput`](crate::operation::update_server_config::UpdateServerConfigInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::update_server_config::UpdateServerConfigInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::update_server_config::UpdateServerConfigInput {
                server_id: self.server_id,
                strategy_option: self.strategy_option,
            },
        )
    }
}