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