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 ListServersInput {
    /// <p> Criteria for filtering servers. </p>
    #[doc(hidden)]
    pub server_criteria: std::option::Option<crate::types::ServerCriteria>,
    /// <p> Specifies the filter value, which is based on the type of server criteria. For example, if <code>serverCriteria</code> is <code>OS_NAME</code>, and the <code>filterValue</code> is equal to <code>WindowsServer</code>, then <code>ListServers</code> returns all of the servers matching the OS name <code>WindowsServer</code>. </p>
    #[doc(hidden)]
    pub filter_value: std::option::Option<std::string::String>,
    /// <p> Specifies whether to sort by ascending (<code>ASC</code>) or descending (<code>DESC</code>) order. </p>
    #[doc(hidden)]
    pub sort: std::option::Option<crate::types::SortOrder>,
    /// <p> Specifies the group ID to filter on. </p>
    #[doc(hidden)]
    pub group_id_filter: std::option::Option<std::vec::Vec<crate::types::Group>>,
    /// <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 ListServersInput {
    /// <p> Criteria for filtering servers. </p>
    pub fn server_criteria(&self) -> std::option::Option<&crate::types::ServerCriteria> {
        self.server_criteria.as_ref()
    }
    /// <p> Specifies the filter value, which is based on the type of server criteria. For example, if <code>serverCriteria</code> is <code>OS_NAME</code>, and the <code>filterValue</code> is equal to <code>WindowsServer</code>, then <code>ListServers</code> returns all of the servers matching the OS name <code>WindowsServer</code>. </p>
    pub fn filter_value(&self) -> std::option::Option<&str> {
        self.filter_value.as_deref()
    }
    /// <p> Specifies whether to sort by ascending (<code>ASC</code>) or descending (<code>DESC</code>) order. </p>
    pub fn sort(&self) -> std::option::Option<&crate::types::SortOrder> {
        self.sort.as_ref()
    }
    /// <p> Specifies the group ID to filter on. </p>
    pub fn group_id_filter(&self) -> std::option::Option<&[crate::types::Group]> {
        self.group_id_filter.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 ListServersInput {
    /// Creates a new builder-style object to manufacture [`ListServersInput`](crate::operation::list_servers::ListServersInput).
    pub fn builder() -> crate::operation::list_servers::builders::ListServersInputBuilder {
        crate::operation::list_servers::builders::ListServersInputBuilder::default()
    }
}

/// A builder for [`ListServersInput`](crate::operation::list_servers::ListServersInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ListServersInputBuilder {
    pub(crate) server_criteria: std::option::Option<crate::types::ServerCriteria>,
    pub(crate) filter_value: std::option::Option<std::string::String>,
    pub(crate) sort: std::option::Option<crate::types::SortOrder>,
    pub(crate) group_id_filter: std::option::Option<std::vec::Vec<crate::types::Group>>,
    pub(crate) next_token: std::option::Option<std::string::String>,
    pub(crate) max_results: std::option::Option<i32>,
}
impl ListServersInputBuilder {
    /// <p> Criteria for filtering servers. </p>
    pub fn server_criteria(mut self, input: crate::types::ServerCriteria) -> Self {
        self.server_criteria = Some(input);
        self
    }
    /// <p> Criteria for filtering servers. </p>
    pub fn set_server_criteria(
        mut self,
        input: std::option::Option<crate::types::ServerCriteria>,
    ) -> Self {
        self.server_criteria = input;
        self
    }
    /// <p> Specifies the filter value, which is based on the type of server criteria. For example, if <code>serverCriteria</code> is <code>OS_NAME</code>, and the <code>filterValue</code> is equal to <code>WindowsServer</code>, then <code>ListServers</code> returns all of the servers matching the OS name <code>WindowsServer</code>. </p>
    pub fn filter_value(mut self, input: impl Into<std::string::String>) -> Self {
        self.filter_value = Some(input.into());
        self
    }
    /// <p> Specifies the filter value, which is based on the type of server criteria. For example, if <code>serverCriteria</code> is <code>OS_NAME</code>, and the <code>filterValue</code> is equal to <code>WindowsServer</code>, then <code>ListServers</code> returns all of the servers matching the OS name <code>WindowsServer</code>. </p>
    pub fn set_filter_value(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.filter_value = input;
        self
    }
    /// <p> Specifies whether to sort by ascending (<code>ASC</code>) or descending (<code>DESC</code>) order. </p>
    pub fn sort(mut self, input: crate::types::SortOrder) -> Self {
        self.sort = Some(input);
        self
    }
    /// <p> Specifies whether to sort by ascending (<code>ASC</code>) or descending (<code>DESC</code>) order. </p>
    pub fn set_sort(mut self, input: std::option::Option<crate::types::SortOrder>) -> Self {
        self.sort = input;
        self
    }
    /// Appends an item to `group_id_filter`.
    ///
    /// To override the contents of this collection use [`set_group_id_filter`](Self::set_group_id_filter).
    ///
    /// <p> Specifies the group ID to filter on. </p>
    pub fn group_id_filter(mut self, input: crate::types::Group) -> Self {
        let mut v = self.group_id_filter.unwrap_or_default();
        v.push(input);
        self.group_id_filter = Some(v);
        self
    }
    /// <p> Specifies the group ID to filter on. </p>
    pub fn set_group_id_filter(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Group>>,
    ) -> Self {
        self.group_id_filter = 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 [`ListServersInput`](crate::operation::list_servers::ListServersInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::list_servers::ListServersInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::list_servers::ListServersInput {
            server_criteria: self.server_criteria,
            filter_value: self.filter_value,
            sort: self.sort,
            group_id_filter: self.group_id_filter,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}