aws_sdk_appstream/operation/describe_entitlements/
_describe_entitlements_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 DescribeEntitlementsInput {
6    /// <p>The name of the entitlement.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the stack with which the entitlement is associated.</p>
9    pub stack_name: ::std::option::Option<::std::string::String>,
10    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum size of each page of results.</p>
13    pub max_results: ::std::option::Option<i32>,
14}
15impl DescribeEntitlementsInput {
16    /// <p>The name of the entitlement.</p>
17    pub fn name(&self) -> ::std::option::Option<&str> {
18        self.name.as_deref()
19    }
20    /// <p>The name of the stack with which the entitlement is associated.</p>
21    pub fn stack_name(&self) -> ::std::option::Option<&str> {
22        self.stack_name.as_deref()
23    }
24    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28    /// <p>The maximum size of each page of results.</p>
29    pub fn max_results(&self) -> ::std::option::Option<i32> {
30        self.max_results
31    }
32}
33impl DescribeEntitlementsInput {
34    /// Creates a new builder-style object to manufacture [`DescribeEntitlementsInput`](crate::operation::describe_entitlements::DescribeEntitlementsInput).
35    pub fn builder() -> crate::operation::describe_entitlements::builders::DescribeEntitlementsInputBuilder {
36        crate::operation::describe_entitlements::builders::DescribeEntitlementsInputBuilder::default()
37    }
38}
39
40/// A builder for [`DescribeEntitlementsInput`](crate::operation::describe_entitlements::DescribeEntitlementsInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DescribeEntitlementsInputBuilder {
44    pub(crate) name: ::std::option::Option<::std::string::String>,
45    pub(crate) stack_name: ::std::option::Option<::std::string::String>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47    pub(crate) max_results: ::std::option::Option<i32>,
48}
49impl DescribeEntitlementsInputBuilder {
50    /// <p>The name of the entitlement.</p>
51    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.name = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The name of the entitlement.</p>
56    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.name = input;
58        self
59    }
60    /// <p>The name of the entitlement.</p>
61    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
62        &self.name
63    }
64    /// <p>The name of the stack with which the entitlement is associated.</p>
65    /// This field is required.
66    pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.stack_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the stack with which the entitlement is associated.</p>
71    pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.stack_name = input;
73        self
74    }
75    /// <p>The name of the stack with which the entitlement is associated.</p>
76    pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.stack_name
78    }
79    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
80    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.next_token = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
85    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.next_token = input;
87        self
88    }
89    /// <p>The pagination token used to retrieve the next page of results for this operation.</p>
90    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91        &self.next_token
92    }
93    /// <p>The maximum size of each page of results.</p>
94    pub fn max_results(mut self, input: i32) -> Self {
95        self.max_results = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The maximum size of each page of results.</p>
99    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
100        self.max_results = input;
101        self
102    }
103    /// <p>The maximum size of each page of results.</p>
104    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
105        &self.max_results
106    }
107    /// Consumes the builder and constructs a [`DescribeEntitlementsInput`](crate::operation::describe_entitlements::DescribeEntitlementsInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::describe_entitlements::DescribeEntitlementsInput, ::aws_smithy_types::error::operation::BuildError>
111    {
112        ::std::result::Result::Ok(crate::operation::describe_entitlements::DescribeEntitlementsInput {
113            name: self.name,
114            stack_name: self.stack_name,
115            next_token: self.next_token,
116            max_results: self.max_results,
117        })
118    }
119}