Skip to main content

aws_sdk_networkmanager/operation/get_link_associations/
_get_link_associations_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 GetLinkAssociationsInput {
6    /// <p>The ID of the global network.</p>
7    pub global_network_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the device.</p>
9    pub device_id: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the link.</p>
11    pub link_id: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum number of results to return.</p>
13    pub max_results: ::std::option::Option<i32>,
14    /// <p>The token for the next page of results.</p>
15    pub next_token: ::std::option::Option<::std::string::String>,
16}
17impl GetLinkAssociationsInput {
18    /// <p>The ID of the global network.</p>
19    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
20        self.global_network_id.as_deref()
21    }
22    /// <p>The ID of the device.</p>
23    pub fn device_id(&self) -> ::std::option::Option<&str> {
24        self.device_id.as_deref()
25    }
26    /// <p>The ID of the link.</p>
27    pub fn link_id(&self) -> ::std::option::Option<&str> {
28        self.link_id.as_deref()
29    }
30    /// <p>The maximum number of results to return.</p>
31    pub fn max_results(&self) -> ::std::option::Option<i32> {
32        self.max_results
33    }
34    /// <p>The token for the next page of results.</p>
35    pub fn next_token(&self) -> ::std::option::Option<&str> {
36        self.next_token.as_deref()
37    }
38}
39impl GetLinkAssociationsInput {
40    /// Creates a new builder-style object to manufacture [`GetLinkAssociationsInput`](crate::operation::get_link_associations::GetLinkAssociationsInput).
41    pub fn builder() -> crate::operation::get_link_associations::builders::GetLinkAssociationsInputBuilder {
42        crate::operation::get_link_associations::builders::GetLinkAssociationsInputBuilder::default()
43    }
44}
45
46/// A builder for [`GetLinkAssociationsInput`](crate::operation::get_link_associations::GetLinkAssociationsInput).
47#[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    /// <p>The ID of the global network.</p>
58    /// This field is required.
59    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    /// <p>The ID of the global network.</p>
64    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    /// <p>The ID of the global network.</p>
69    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.global_network_id
71    }
72    /// <p>The ID of the device.</p>
73    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    /// <p>The ID of the device.</p>
78    pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.device_id = input;
80        self
81    }
82    /// <p>The ID of the device.</p>
83    pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
84        &self.device_id
85    }
86    /// <p>The ID of the link.</p>
87    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    /// <p>The ID of the link.</p>
92    pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.link_id = input;
94        self
95    }
96    /// <p>The ID of the link.</p>
97    pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
98        &self.link_id
99    }
100    /// <p>The maximum number of results to return.</p>
101    pub fn max_results(mut self, input: i32) -> Self {
102        self.max_results = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The maximum number of results to return.</p>
106    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
107        self.max_results = input;
108        self
109    }
110    /// <p>The maximum number of results to return.</p>
111    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
112        &self.max_results
113    }
114    /// <p>The token for the next page of results.</p>
115    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    /// <p>The token for the next page of results.</p>
120    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.next_token = input;
122        self
123    }
124    /// <p>The token for the next page of results.</p>
125    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
126        &self.next_token
127    }
128    /// Consumes the builder and constructs a [`GetLinkAssociationsInput`](crate::operation::get_link_associations::GetLinkAssociationsInput).
129    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}