aws_sdk_networkmanager/operation/get_link_associations/
_get_link_associations_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetLinkAssociationsInput {
6 pub global_network_id: ::std::option::Option<::std::string::String>,
8 pub device_id: ::std::option::Option<::std::string::String>,
10 pub link_id: ::std::option::Option<::std::string::String>,
12 pub max_results: ::std::option::Option<i32>,
14 pub next_token: ::std::option::Option<::std::string::String>,
16}
17impl GetLinkAssociationsInput {
18 pub fn global_network_id(&self) -> ::std::option::Option<&str> {
20 self.global_network_id.as_deref()
21 }
22 pub fn device_id(&self) -> ::std::option::Option<&str> {
24 self.device_id.as_deref()
25 }
26 pub fn link_id(&self) -> ::std::option::Option<&str> {
28 self.link_id.as_deref()
29 }
30 pub fn max_results(&self) -> ::std::option::Option<i32> {
32 self.max_results
33 }
34 pub fn next_token(&self) -> ::std::option::Option<&str> {
36 self.next_token.as_deref()
37 }
38}
39impl GetLinkAssociationsInput {
40 pub fn builder() -> crate::operation::get_link_associations::builders::GetLinkAssociationsInputBuilder {
42 crate::operation::get_link_associations::builders::GetLinkAssociationsInputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct GetLinkAssociationsInputBuilder {
50 pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
51 pub(crate) device_id: ::std::option::Option<::std::string::String>,
52 pub(crate) link_id: ::std::option::Option<::std::string::String>,
53 pub(crate) max_results: ::std::option::Option<i32>,
54 pub(crate) next_token: ::std::option::Option<::std::string::String>,
55}
56impl GetLinkAssociationsInputBuilder {
57 pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.global_network_id = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.global_network_id = input;
66 self
67 }
68 pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.global_network_id
71 }
72 pub fn device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.device_id = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.device_id = input;
80 self
81 }
82 pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
84 &self.device_id
85 }
86 pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.link_id = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.link_id = input;
94 self
95 }
96 pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
98 &self.link_id
99 }
100 pub fn max_results(mut self, input: i32) -> Self {
102 self.max_results = ::std::option::Option::Some(input);
103 self
104 }
105 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
107 self.max_results = input;
108 self
109 }
110 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
112 &self.max_results
113 }
114 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.next_token = ::std::option::Option::Some(input.into());
117 self
118 }
119 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.next_token = input;
122 self
123 }
124 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
126 &self.next_token
127 }
128 pub fn build(
130 self,
131 ) -> ::std::result::Result<crate::operation::get_link_associations::GetLinkAssociationsInput, ::aws_smithy_types::error::operation::BuildError>
132 {
133 ::std::result::Result::Ok(crate::operation::get_link_associations::GetLinkAssociationsInput {
134 global_network_id: self.global_network_id,
135 device_id: self.device_id,
136 link_id: self.link_id,
137 max_results: self.max_results,
138 next_token: self.next_token,
139 })
140 }
141}