aws_sdk_lightsail/operation/get_operations/
_get_operations_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetOperationsInput {
6    /// <p>The token to advance to the next page of results from your request.</p>
7    /// <p>To get a page token, perform an initial <code>GetOperations</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>
8    pub page_token: ::std::option::Option<::std::string::String>,
9}
10impl GetOperationsInput {
11    /// <p>The token to advance to the next page of results from your request.</p>
12    /// <p>To get a page token, perform an initial <code>GetOperations</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>
13    pub fn page_token(&self) -> ::std::option::Option<&str> {
14        self.page_token.as_deref()
15    }
16}
17impl GetOperationsInput {
18    /// Creates a new builder-style object to manufacture [`GetOperationsInput`](crate::operation::get_operations::GetOperationsInput).
19    pub fn builder() -> crate::operation::get_operations::builders::GetOperationsInputBuilder {
20        crate::operation::get_operations::builders::GetOperationsInputBuilder::default()
21    }
22}
23
24/// A builder for [`GetOperationsInput`](crate::operation::get_operations::GetOperationsInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct GetOperationsInputBuilder {
28    pub(crate) page_token: ::std::option::Option<::std::string::String>,
29}
30impl GetOperationsInputBuilder {
31    /// <p>The token to advance to the next page of results from your request.</p>
32    /// <p>To get a page token, perform an initial <code>GetOperations</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>
33    pub fn page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
34        self.page_token = ::std::option::Option::Some(input.into());
35        self
36    }
37    /// <p>The token to advance to the next page of results from your request.</p>
38    /// <p>To get a page token, perform an initial <code>GetOperations</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>
39    pub fn set_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
40        self.page_token = input;
41        self
42    }
43    /// <p>The token to advance to the next page of results from your request.</p>
44    /// <p>To get a page token, perform an initial <code>GetOperations</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>
45    pub fn get_page_token(&self) -> &::std::option::Option<::std::string::String> {
46        &self.page_token
47    }
48    /// Consumes the builder and constructs a [`GetOperationsInput`](crate::operation::get_operations::GetOperationsInput).
49    pub fn build(
50        self,
51    ) -> ::std::result::Result<crate::operation::get_operations::GetOperationsInput, ::aws_smithy_types::error::operation::BuildError> {
52        ::std::result::Result::Ok(crate::operation::get_operations::GetOperationsInput { page_token: self.page_token })
53    }
54}