aws_sdk_directconnect/operation/update_lag/
_update_lag_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 UpdateLagInput {
6    /// <p>The ID of the LAG.</p>
7    pub lag_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the LAG.</p>
9    pub lag_name: ::std::option::Option<::std::string::String>,
10    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
11    pub minimum_links: ::std::option::Option<i32>,
12    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
13    /// <p>Amazon Web Services applies the value to all connections which are part of the LAG.</p>
14    pub encryption_mode: ::std::option::Option<::std::string::String>,
15}
16impl UpdateLagInput {
17    /// <p>The ID of the LAG.</p>
18    pub fn lag_id(&self) -> ::std::option::Option<&str> {
19        self.lag_id.as_deref()
20    }
21    /// <p>The name of the LAG.</p>
22    pub fn lag_name(&self) -> ::std::option::Option<&str> {
23        self.lag_name.as_deref()
24    }
25    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
26    pub fn minimum_links(&self) -> ::std::option::Option<i32> {
27        self.minimum_links
28    }
29    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
30    /// <p>Amazon Web Services applies the value to all connections which are part of the LAG.</p>
31    pub fn encryption_mode(&self) -> ::std::option::Option<&str> {
32        self.encryption_mode.as_deref()
33    }
34}
35impl UpdateLagInput {
36    /// Creates a new builder-style object to manufacture [`UpdateLagInput`](crate::operation::update_lag::UpdateLagInput).
37    pub fn builder() -> crate::operation::update_lag::builders::UpdateLagInputBuilder {
38        crate::operation::update_lag::builders::UpdateLagInputBuilder::default()
39    }
40}
41
42/// A builder for [`UpdateLagInput`](crate::operation::update_lag::UpdateLagInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateLagInputBuilder {
46    pub(crate) lag_id: ::std::option::Option<::std::string::String>,
47    pub(crate) lag_name: ::std::option::Option<::std::string::String>,
48    pub(crate) minimum_links: ::std::option::Option<i32>,
49    pub(crate) encryption_mode: ::std::option::Option<::std::string::String>,
50}
51impl UpdateLagInputBuilder {
52    /// <p>The ID of the LAG.</p>
53    /// This field is required.
54    pub fn lag_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.lag_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The ID of the LAG.</p>
59    pub fn set_lag_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.lag_id = input;
61        self
62    }
63    /// <p>The ID of the LAG.</p>
64    pub fn get_lag_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.lag_id
66    }
67    /// <p>The name of the LAG.</p>
68    pub fn lag_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.lag_name = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The name of the LAG.</p>
73    pub fn set_lag_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.lag_name = input;
75        self
76    }
77    /// <p>The name of the LAG.</p>
78    pub fn get_lag_name(&self) -> &::std::option::Option<::std::string::String> {
79        &self.lag_name
80    }
81    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
82    pub fn minimum_links(mut self, input: i32) -> Self {
83        self.minimum_links = ::std::option::Option::Some(input);
84        self
85    }
86    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
87    pub fn set_minimum_links(mut self, input: ::std::option::Option<i32>) -> Self {
88        self.minimum_links = input;
89        self
90    }
91    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
92    pub fn get_minimum_links(&self) -> &::std::option::Option<i32> {
93        &self.minimum_links
94    }
95    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
96    /// <p>Amazon Web Services applies the value to all connections which are part of the LAG.</p>
97    pub fn encryption_mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.encryption_mode = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
102    /// <p>Amazon Web Services applies the value to all connections which are part of the LAG.</p>
103    pub fn set_encryption_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.encryption_mode = input;
105        self
106    }
107    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
108    /// <p>Amazon Web Services applies the value to all connections which are part of the LAG.</p>
109    pub fn get_encryption_mode(&self) -> &::std::option::Option<::std::string::String> {
110        &self.encryption_mode
111    }
112    /// Consumes the builder and constructs a [`UpdateLagInput`](crate::operation::update_lag::UpdateLagInput).
113    pub fn build(self) -> ::std::result::Result<crate::operation::update_lag::UpdateLagInput, ::aws_smithy_types::error::operation::BuildError> {
114        ::std::result::Result::Ok(crate::operation::update_lag::UpdateLagInput {
115            lag_id: self.lag_id,
116            lag_name: self.lag_name,
117            minimum_links: self.minimum_links,
118            encryption_mode: self.encryption_mode,
119        })
120    }
121}