aws_sdk_networkmanager/operation/get_transit_gateway_registrations/
_get_transit_gateway_registrations_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTransitGatewayRegistrationsInput {
6 pub global_network_id: ::std::option::Option<::std::string::String>,
8 pub transit_gateway_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 pub max_results: ::std::option::Option<i32>,
12 pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl GetTransitGatewayRegistrationsInput {
16 pub fn global_network_id(&self) -> ::std::option::Option<&str> {
18 self.global_network_id.as_deref()
19 }
20 pub fn transit_gateway_arns(&self) -> &[::std::string::String] {
24 self.transit_gateway_arns.as_deref().unwrap_or_default()
25 }
26 pub fn max_results(&self) -> ::std::option::Option<i32> {
28 self.max_results
29 }
30 pub fn next_token(&self) -> ::std::option::Option<&str> {
32 self.next_token.as_deref()
33 }
34}
35impl GetTransitGatewayRegistrationsInput {
36 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#[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 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 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 pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.global_network_id
66 }
67 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 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 pub fn get_transit_gateway_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
85 &self.transit_gateway_arns
86 }
87 pub fn max_results(mut self, input: i32) -> Self {
89 self.max_results = ::std::option::Option::Some(input);
90 self
91 }
92 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
94 self.max_results = input;
95 self
96 }
97 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
99 &self.max_results
100 }
101 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 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.next_token = input;
109 self
110 }
111 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
113 &self.next_token
114 }
115 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}