aws_sdk_rtbfabric/operation/accept_link/
_accept_link_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 AcceptLinkInput {
6    /// <p>The unique identifier of the gateway.</p>
7    pub gateway_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the link.</p>
9    pub link_id: ::std::option::Option<::std::string::String>,
10    /// <p>Attributes of the link.</p>
11    pub attributes: ::std::option::Option<crate::types::LinkAttributes>,
12    /// <p>Settings for the application logs.</p>
13    pub log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
14}
15impl AcceptLinkInput {
16    /// <p>The unique identifier of the gateway.</p>
17    pub fn gateway_id(&self) -> ::std::option::Option<&str> {
18        self.gateway_id.as_deref()
19    }
20    /// <p>The unique identifier of the link.</p>
21    pub fn link_id(&self) -> ::std::option::Option<&str> {
22        self.link_id.as_deref()
23    }
24    /// <p>Attributes of the link.</p>
25    pub fn attributes(&self) -> ::std::option::Option<&crate::types::LinkAttributes> {
26        self.attributes.as_ref()
27    }
28    /// <p>Settings for the application logs.</p>
29    pub fn log_settings(&self) -> ::std::option::Option<&crate::types::LinkLogSettings> {
30        self.log_settings.as_ref()
31    }
32}
33impl AcceptLinkInput {
34    /// Creates a new builder-style object to manufacture [`AcceptLinkInput`](crate::operation::accept_link::AcceptLinkInput).
35    pub fn builder() -> crate::operation::accept_link::builders::AcceptLinkInputBuilder {
36        crate::operation::accept_link::builders::AcceptLinkInputBuilder::default()
37    }
38}
39
40/// A builder for [`AcceptLinkInput`](crate::operation::accept_link::AcceptLinkInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct AcceptLinkInputBuilder {
44    pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
45    pub(crate) link_id: ::std::option::Option<::std::string::String>,
46    pub(crate) attributes: ::std::option::Option<crate::types::LinkAttributes>,
47    pub(crate) log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
48}
49impl AcceptLinkInputBuilder {
50    /// <p>The unique identifier of the gateway.</p>
51    /// This field is required.
52    pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.gateway_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The unique identifier of the gateway.</p>
57    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.gateway_id = input;
59        self
60    }
61    /// <p>The unique identifier of the gateway.</p>
62    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.gateway_id
64    }
65    /// <p>The unique identifier of the link.</p>
66    /// This field is required.
67    pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.link_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The unique identifier of the link.</p>
72    pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.link_id = input;
74        self
75    }
76    /// <p>The unique identifier of the link.</p>
77    pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.link_id
79    }
80    /// <p>Attributes of the link.</p>
81    pub fn attributes(mut self, input: crate::types::LinkAttributes) -> Self {
82        self.attributes = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>Attributes of the link.</p>
86    pub fn set_attributes(mut self, input: ::std::option::Option<crate::types::LinkAttributes>) -> Self {
87        self.attributes = input;
88        self
89    }
90    /// <p>Attributes of the link.</p>
91    pub fn get_attributes(&self) -> &::std::option::Option<crate::types::LinkAttributes> {
92        &self.attributes
93    }
94    /// <p>Settings for the application logs.</p>
95    /// This field is required.
96    pub fn log_settings(mut self, input: crate::types::LinkLogSettings) -> Self {
97        self.log_settings = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>Settings for the application logs.</p>
101    pub fn set_log_settings(mut self, input: ::std::option::Option<crate::types::LinkLogSettings>) -> Self {
102        self.log_settings = input;
103        self
104    }
105    /// <p>Settings for the application logs.</p>
106    pub fn get_log_settings(&self) -> &::std::option::Option<crate::types::LinkLogSettings> {
107        &self.log_settings
108    }
109    /// Consumes the builder and constructs a [`AcceptLinkInput`](crate::operation::accept_link::AcceptLinkInput).
110    pub fn build(self) -> ::std::result::Result<crate::operation::accept_link::AcceptLinkInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::accept_link::AcceptLinkInput {
112            gateway_id: self.gateway_id,
113            link_id: self.link_id,
114            attributes: self.attributes,
115            log_settings: self.log_settings,
116        })
117    }
118}