aws-sdk-migrationhubstrategy 0.25.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 ListServersOutput {
    /// <p> The list of servers with detailed information about each server. </p>
    #[doc(hidden)]
    pub server_infos: std::option::Option<std::vec::Vec<crate::types::ServerDetail>>,
    /// <p> The token you use to retrieve the next set of results, or null if there are no more results. </p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListServersOutput {
    /// <p> The list of servers with detailed information about each server. </p>
    pub fn server_infos(&self) -> std::option::Option<&[crate::types::ServerDetail]> {
        self.server_infos.as_deref()
    }
    /// <p> The token you use to retrieve the next set of results, or null if there are no more results. </p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl aws_http::request_id::RequestId for ListServersOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListServersOutput {
    /// Creates a new builder-style object to manufacture [`ListServersOutput`](crate::operation::list_servers::ListServersOutput).
    pub fn builder() -> crate::operation::list_servers::builders::ListServersOutputBuilder {
        crate::operation::list_servers::builders::ListServersOutputBuilder::default()
    }
}

/// A builder for [`ListServersOutput`](crate::operation::list_servers::ListServersOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListServersOutputBuilder {
    pub(crate) server_infos: std::option::Option<std::vec::Vec<crate::types::ServerDetail>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ListServersOutputBuilder {
    /// Appends an item to `server_infos`.
    ///
    /// To override the contents of this collection use [`set_server_infos`](Self::set_server_infos).
    ///
    /// <p> The list of servers with detailed information about each server. </p>
    pub fn server_infos(mut self, input: crate::types::ServerDetail) -> Self {
        let mut v = self.server_infos.unwrap_or_default();
        v.push(input);
        self.server_infos = Some(v);
        self
    }
    /// <p> The list of servers with detailed information about each server. </p>
    pub fn set_server_infos(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::ServerDetail>>,
    ) -> Self {
        self.server_infos = input;
        self
    }
    /// <p> The token you use to retrieve the next set of results, or null if there are no more results. </p>
    pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.next_token = Some(input.into());
        self
    }
    /// <p> The token you use to retrieve the next set of results, or null if there are no more results. </p>
    pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ListServersOutput`](crate::operation::list_servers::ListServersOutput).
    pub fn build(self) -> crate::operation::list_servers::ListServersOutput {
        crate::operation::list_servers::ListServersOutput {
            server_infos: self.server_infos,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}