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 GetServerDetailsInput {
    /// <p> The ID of the server. </p>
    #[doc(hidden)]
    pub server_id: std::option::Option<std::string::String>,
    /// <p> The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set <code>maxResults</code> to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10. </p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    /// <p> The maximum number of items to include in the response. The maximum value is 100. </p>
    #[doc(hidden)]
    pub max_results: std::option::Option<i32>,
}
impl GetServerDetailsInput {
    /// <p> The ID of the server. </p>
    pub fn server_id(&self) -> std::option::Option<&str> {
        self.server_id.as_deref()
    }
    /// <p> The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set <code>maxResults</code> to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10. </p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p> The maximum number of items to include in the response. The maximum value is 100. </p>
    pub fn max_results(&self) -> std::option::Option<i32> {
        self.max_results
    }
}
impl GetServerDetailsInput {
    /// Creates a new builder-style object to manufacture [`GetServerDetailsInput`](crate::operation::get_server_details::GetServerDetailsInput).
    pub fn builder() -> crate::operation::get_server_details::builders::GetServerDetailsInputBuilder
    {
        crate::operation::get_server_details::builders::GetServerDetailsInputBuilder::default()
    }
}

/// A builder for [`GetServerDetailsInput`](crate::operation::get_server_details::GetServerDetailsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetServerDetailsInputBuilder {
    pub(crate) server_id: std::option::Option<std::string::String>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    pub(crate) max_results: std::option::Option<i32>,
}
impl GetServerDetailsInputBuilder {
    /// <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 token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set <code>maxResults</code> to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10. </p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p> The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set <code>maxResults</code> to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10. </p>
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p> The maximum number of items to include in the response. The maximum value is 100. </p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = Some(input);
        self
    }
    /// <p> The maximum number of items to include in the response. The maximum value is 100. </p>
    pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// Consumes the builder and constructs a [`GetServerDetailsInput`](crate::operation::get_server_details::GetServerDetailsInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::get_server_details::GetServerDetailsInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::get_server_details::GetServerDetailsInput {
                server_id: self.server_id,
                next_token: self.next_token,
                max_results: self.max_results,
            },
        )
    }
}