aws_sdk_ram/operation/get_resource_share_invitations/
_get_resource_share_invitations_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 GetResourceShareInvitationsInput {
6    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
7    pub resource_share_invitation_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a></p>
9    pub resource_share_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
13    pub max_results: ::std::option::Option<i32>,
14}
15impl GetResourceShareInvitationsInput {
16    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
17    ///
18    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_share_invitation_arns.is_none()`.
19    pub fn resource_share_invitation_arns(&self) -> &[::std::string::String] {
20        self.resource_share_invitation_arns.as_deref().unwrap_or_default()
21    }
22    /// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a></p>
23    ///
24    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resource_share_arns.is_none()`.
25    pub fn resource_share_arns(&self) -> &[::std::string::String] {
26        self.resource_share_arns.as_deref().unwrap_or_default()
27    }
28    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
29    pub fn next_token(&self) -> ::std::option::Option<&str> {
30        self.next_token.as_deref()
31    }
32    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
33    pub fn max_results(&self) -> ::std::option::Option<i32> {
34        self.max_results
35    }
36}
37impl GetResourceShareInvitationsInput {
38    /// Creates a new builder-style object to manufacture [`GetResourceShareInvitationsInput`](crate::operation::get_resource_share_invitations::GetResourceShareInvitationsInput).
39    pub fn builder() -> crate::operation::get_resource_share_invitations::builders::GetResourceShareInvitationsInputBuilder {
40        crate::operation::get_resource_share_invitations::builders::GetResourceShareInvitationsInputBuilder::default()
41    }
42}
43
44/// A builder for [`GetResourceShareInvitationsInput`](crate::operation::get_resource_share_invitations::GetResourceShareInvitationsInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct GetResourceShareInvitationsInputBuilder {
48    pub(crate) resource_share_invitation_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
49    pub(crate) resource_share_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
50    pub(crate) next_token: ::std::option::Option<::std::string::String>,
51    pub(crate) max_results: ::std::option::Option<i32>,
52}
53impl GetResourceShareInvitationsInputBuilder {
54    /// Appends an item to `resource_share_invitation_arns`.
55    ///
56    /// To override the contents of this collection use [`set_resource_share_invitation_arns`](Self::set_resource_share_invitation_arns).
57    ///
58    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
59    pub fn resource_share_invitation_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        let mut v = self.resource_share_invitation_arns.unwrap_or_default();
61        v.push(input.into());
62        self.resource_share_invitation_arns = ::std::option::Option::Some(v);
63        self
64    }
65    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
66    pub fn set_resource_share_invitation_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
67        self.resource_share_invitation_arns = input;
68        self
69    }
70    /// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
71    pub fn get_resource_share_invitation_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
72        &self.resource_share_invitation_arns
73    }
74    /// Appends an item to `resource_share_arns`.
75    ///
76    /// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
77    ///
78    /// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a></p>
79    pub fn resource_share_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        let mut v = self.resource_share_arns.unwrap_or_default();
81        v.push(input.into());
82        self.resource_share_arns = ::std::option::Option::Some(v);
83        self
84    }
85    /// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a></p>
86    pub fn set_resource_share_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
87        self.resource_share_arns = input;
88        self
89    }
90    /// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a></p>
91    pub fn get_resource_share_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
92        &self.resource_share_arns
93    }
94    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
95    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.next_token = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
100    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.next_token = input;
102        self
103    }
104    /// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
105    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
106        &self.next_token
107    }
108    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
109    pub fn max_results(mut self, input: i32) -> Self {
110        self.max_results = ::std::option::Option::Some(input);
111        self
112    }
113    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
114    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
115        self.max_results = input;
116        self
117    }
118    /// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
119    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
120        &self.max_results
121    }
122    /// Consumes the builder and constructs a [`GetResourceShareInvitationsInput`](crate::operation::get_resource_share_invitations::GetResourceShareInvitationsInput).
123    pub fn build(
124        self,
125    ) -> ::std::result::Result<
126        crate::operation::get_resource_share_invitations::GetResourceShareInvitationsInput,
127        ::aws_smithy_types::error::operation::BuildError,
128    > {
129        ::std::result::Result::Ok(crate::operation::get_resource_share_invitations::GetResourceShareInvitationsInput {
130            resource_share_invitation_arns: self.resource_share_invitation_arns,
131            resource_share_arns: self.resource_share_arns,
132            next_token: self.next_token,
133            max_results: self.max_results,
134        })
135    }
136}