aws_sdk_networkmanager/operation/get_transit_gateway_registrations/
_get_transit_gateway_registrations_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 GetTransitGatewayRegistrationsInput {
6    /// <p>The ID of the global network.</p>
7    pub global_network_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is 10.</p>
9    pub transit_gateway_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>The maximum number of results to return.</p>
11    pub max_results: ::std::option::Option<i32>,
12    /// <p>The token for the next page of results.</p>
13    pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl GetTransitGatewayRegistrationsInput {
16    /// <p>The ID of the global network.</p>
17    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
18        self.global_network_id.as_deref()
19    }
20    /// <p>The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is 10.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.transit_gateway_arns.is_none()`.
23    pub fn transit_gateway_arns(&self) -> &[::std::string::String] {
24        self.transit_gateway_arns.as_deref().unwrap_or_default()
25    }
26    /// <p>The maximum number of results to return.</p>
27    pub fn max_results(&self) -> ::std::option::Option<i32> {
28        self.max_results
29    }
30    /// <p>The token for the next page of results.</p>
31    pub fn next_token(&self) -> ::std::option::Option<&str> {
32        self.next_token.as_deref()
33    }
34}
35impl GetTransitGatewayRegistrationsInput {
36    /// Creates a new builder-style object to manufacture [`GetTransitGatewayRegistrationsInput`](crate::operation::get_transit_gateway_registrations::GetTransitGatewayRegistrationsInput).
37    pub fn builder() -> crate::operation::get_transit_gateway_registrations::builders::GetTransitGatewayRegistrationsInputBuilder {
38        crate::operation::get_transit_gateway_registrations::builders::GetTransitGatewayRegistrationsInputBuilder::default()
39    }
40}
41
42/// A builder for [`GetTransitGatewayRegistrationsInput`](crate::operation::get_transit_gateway_registrations::GetTransitGatewayRegistrationsInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct GetTransitGatewayRegistrationsInputBuilder {
46    pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
47    pub(crate) transit_gateway_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
48    pub(crate) max_results: ::std::option::Option<i32>,
49    pub(crate) next_token: ::std::option::Option<::std::string::String>,
50}
51impl GetTransitGatewayRegistrationsInputBuilder {
52    /// <p>The ID of the global network.</p>
53    /// This field is required.
54    pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.global_network_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The ID of the global network.</p>
59    pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.global_network_id = input;
61        self
62    }
63    /// <p>The ID of the global network.</p>
64    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.global_network_id
66    }
67    /// Appends an item to `transit_gateway_arns`.
68    ///
69    /// To override the contents of this collection use [`set_transit_gateway_arns`](Self::set_transit_gateway_arns).
70    ///
71    /// <p>The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is 10.</p>
72    pub fn transit_gateway_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        let mut v = self.transit_gateway_arns.unwrap_or_default();
74        v.push(input.into());
75        self.transit_gateway_arns = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is 10.</p>
79    pub fn set_transit_gateway_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
80        self.transit_gateway_arns = input;
81        self
82    }
83    /// <p>The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is 10.</p>
84    pub fn get_transit_gateway_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
85        &self.transit_gateway_arns
86    }
87    /// <p>The maximum number of results to return.</p>
88    pub fn max_results(mut self, input: i32) -> Self {
89        self.max_results = ::std::option::Option::Some(input);
90        self
91    }
92    /// <p>The maximum number of results to return.</p>
93    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
94        self.max_results = input;
95        self
96    }
97    /// <p>The maximum number of results to return.</p>
98    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
99        &self.max_results
100    }
101    /// <p>The token for the next page of results.</p>
102    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.next_token = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The token for the next page of results.</p>
107    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.next_token = input;
109        self
110    }
111    /// <p>The token for the next page of results.</p>
112    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
113        &self.next_token
114    }
115    /// Consumes the builder and constructs a [`GetTransitGatewayRegistrationsInput`](crate::operation::get_transit_gateway_registrations::GetTransitGatewayRegistrationsInput).
116    pub fn build(
117        self,
118    ) -> ::std::result::Result<
119        crate::operation::get_transit_gateway_registrations::GetTransitGatewayRegistrationsInput,
120        ::aws_smithy_types::error::operation::BuildError,
121    > {
122        ::std::result::Result::Ok(crate::operation::get_transit_gateway_registrations::GetTransitGatewayRegistrationsInput {
123            global_network_id: self.global_network_id,
124            transit_gateway_arns: self.transit_gateway_arns,
125            max_results: self.max_results,
126            next_token: self.next_token,
127        })
128    }
129}