aws_sdk_apigateway/operation/get_models/
_get_models_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request to list existing Models defined for a RestApi resource.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetModelsInput {
7    /// <p>The string identifier of the associated RestApi.</p>
8    pub rest_api_id: ::std::option::Option<::std::string::String>,
9    /// <p>The current pagination position in the paged result set.</p>
10    pub position: ::std::option::Option<::std::string::String>,
11    /// <p>The maximum number of returned results per page. The default value is 25 and the maximum value is 500.</p>
12    pub limit: ::std::option::Option<i32>,
13}
14impl GetModelsInput {
15    /// <p>The string identifier of the associated RestApi.</p>
16    pub fn rest_api_id(&self) -> ::std::option::Option<&str> {
17        self.rest_api_id.as_deref()
18    }
19    /// <p>The current pagination position in the paged result set.</p>
20    pub fn position(&self) -> ::std::option::Option<&str> {
21        self.position.as_deref()
22    }
23    /// <p>The maximum number of returned results per page. The default value is 25 and the maximum value is 500.</p>
24    pub fn limit(&self) -> ::std::option::Option<i32> {
25        self.limit
26    }
27}
28impl GetModelsInput {
29    /// Creates a new builder-style object to manufacture [`GetModelsInput`](crate::operation::get_models::GetModelsInput).
30    pub fn builder() -> crate::operation::get_models::builders::GetModelsInputBuilder {
31        crate::operation::get_models::builders::GetModelsInputBuilder::default()
32    }
33}
34
35/// A builder for [`GetModelsInput`](crate::operation::get_models::GetModelsInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct GetModelsInputBuilder {
39    pub(crate) rest_api_id: ::std::option::Option<::std::string::String>,
40    pub(crate) position: ::std::option::Option<::std::string::String>,
41    pub(crate) limit: ::std::option::Option<i32>,
42}
43impl GetModelsInputBuilder {
44    /// <p>The string identifier of the associated RestApi.</p>
45    /// This field is required.
46    pub fn rest_api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.rest_api_id = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The string identifier of the associated RestApi.</p>
51    pub fn set_rest_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.rest_api_id = input;
53        self
54    }
55    /// <p>The string identifier of the associated RestApi.</p>
56    pub fn get_rest_api_id(&self) -> &::std::option::Option<::std::string::String> {
57        &self.rest_api_id
58    }
59    /// <p>The current pagination position in the paged result set.</p>
60    pub fn position(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.position = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The current pagination position in the paged result set.</p>
65    pub fn set_position(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.position = input;
67        self
68    }
69    /// <p>The current pagination position in the paged result set.</p>
70    pub fn get_position(&self) -> &::std::option::Option<::std::string::String> {
71        &self.position
72    }
73    /// <p>The maximum number of returned results per page. The default value is 25 and the maximum value is 500.</p>
74    pub fn limit(mut self, input: i32) -> Self {
75        self.limit = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The maximum number of returned results per page. The default value is 25 and the maximum value is 500.</p>
79    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
80        self.limit = input;
81        self
82    }
83    /// <p>The maximum number of returned results per page. The default value is 25 and the maximum value is 500.</p>
84    pub fn get_limit(&self) -> &::std::option::Option<i32> {
85        &self.limit
86    }
87    /// Consumes the builder and constructs a [`GetModelsInput`](crate::operation::get_models::GetModelsInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::get_models::GetModelsInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::get_models::GetModelsInput {
90            rest_api_id: self.rest_api_id,
91            position: self.position,
92            limit: self.limit,
93        })
94    }
95}