aws-sdk-lightsail 1.107.0

AWS SDK for Amazon Lightsail
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 GetKeyPairsInput {
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetKeyPairs</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub page_token: ::std::option::Option<::std::string::String>,
    /// <p>A Boolean value that indicates whether to include the default key pair in the response of your request.</p>
    pub include_default_key_pair: ::std::option::Option<bool>,
}
impl GetKeyPairsInput {
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetKeyPairs</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn page_token(&self) -> ::std::option::Option<&str> {
        self.page_token.as_deref()
    }
    /// <p>A Boolean value that indicates whether to include the default key pair in the response of your request.</p>
    pub fn include_default_key_pair(&self) -> ::std::option::Option<bool> {
        self.include_default_key_pair
    }
}
impl GetKeyPairsInput {
    /// Creates a new builder-style object to manufacture [`GetKeyPairsInput`](crate::operation::get_key_pairs::GetKeyPairsInput).
    pub fn builder() -> crate::operation::get_key_pairs::builders::GetKeyPairsInputBuilder {
        crate::operation::get_key_pairs::builders::GetKeyPairsInputBuilder::default()
    }
}

/// A builder for [`GetKeyPairsInput`](crate::operation::get_key_pairs::GetKeyPairsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetKeyPairsInputBuilder {
    pub(crate) page_token: ::std::option::Option<::std::string::String>,
    pub(crate) include_default_key_pair: ::std::option::Option<bool>,
}
impl GetKeyPairsInputBuilder {
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetKeyPairs</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.page_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetKeyPairs</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn set_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.page_token = input;
        self
    }
    /// <p>The token to advance to the next page of results from your request.</p>
    /// <p>To get a page token, perform an initial <code>GetKeyPairs</code> request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.</p>
    pub fn get_page_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.page_token
    }
    /// <p>A Boolean value that indicates whether to include the default key pair in the response of your request.</p>
    pub fn include_default_key_pair(mut self, input: bool) -> Self {
        self.include_default_key_pair = ::std::option::Option::Some(input);
        self
    }
    /// <p>A Boolean value that indicates whether to include the default key pair in the response of your request.</p>
    pub fn set_include_default_key_pair(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_default_key_pair = input;
        self
    }
    /// <p>A Boolean value that indicates whether to include the default key pair in the response of your request.</p>
    pub fn get_include_default_key_pair(&self) -> &::std::option::Option<bool> {
        &self.include_default_key_pair
    }
    /// Consumes the builder and constructs a [`GetKeyPairsInput`](crate::operation::get_key_pairs::GetKeyPairsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_key_pairs::GetKeyPairsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_key_pairs::GetKeyPairsInput {
            page_token: self.page_token,
            include_default_key_pair: self.include_default_key_pair,
        })
    }
}