1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateLinkInput {
/// <p>The unique identifier of the gateway.</p>
pub gateway_id: ::std::option::Option<::std::string::String>,
/// <p>The unique identifier of the peer gateway.</p>
pub peer_gateway_id: ::std::option::Option<::std::string::String>,
/// <p>Attributes of the link.</p>
pub attributes: ::std::option::Option<crate::types::LinkAttributes>,
/// <p>Boolean to specify if an HTTP responder is allowed.</p>
pub http_responder_allowed: ::std::option::Option<bool>,
/// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>Application log settings for the link. This value is required. Under <code>applicationLogs.sampling</code>, the <code>errorLog</code> and <code>filterLog</code> fields set the percentage of eligible events to log. Valid values range from <code>0</code> through <code>100</code>. To turn off application logs, set both fields to <code>0</code>, as in <code>{"applicationLogs":{"sampling":{"errorLog":0,"filterLog":0}}}</code>.</p>
pub log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
/// <p>The timeout value in milliseconds.</p>
pub timeout_in_millis: ::std::option::Option<i64>,
}
impl CreateLinkInput {
/// <p>The unique identifier of the gateway.</p>
pub fn gateway_id(&self) -> ::std::option::Option<&str> {
self.gateway_id.as_deref()
}
/// <p>The unique identifier of the peer gateway.</p>
pub fn peer_gateway_id(&self) -> ::std::option::Option<&str> {
self.peer_gateway_id.as_deref()
}
/// <p>Attributes of the link.</p>
pub fn attributes(&self) -> ::std::option::Option<&crate::types::LinkAttributes> {
self.attributes.as_ref()
}
/// <p>Boolean to specify if an HTTP responder is allowed.</p>
pub fn http_responder_allowed(&self) -> ::std::option::Option<bool> {
self.http_responder_allowed
}
/// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>Application log settings for the link. This value is required. Under <code>applicationLogs.sampling</code>, the <code>errorLog</code> and <code>filterLog</code> fields set the percentage of eligible events to log. Valid values range from <code>0</code> through <code>100</code>. To turn off application logs, set both fields to <code>0</code>, as in <code>{"applicationLogs":{"sampling":{"errorLog":0,"filterLog":0}}}</code>.</p>
pub fn log_settings(&self) -> ::std::option::Option<&crate::types::LinkLogSettings> {
self.log_settings.as_ref()
}
/// <p>The timeout value in milliseconds.</p>
pub fn timeout_in_millis(&self) -> ::std::option::Option<i64> {
self.timeout_in_millis
}
}
impl CreateLinkInput {
/// Creates a new builder-style object to manufacture [`CreateLinkInput`](crate::operation::create_link::CreateLinkInput).
pub fn builder() -> crate::operation::create_link::builders::CreateLinkInputBuilder {
crate::operation::create_link::builders::CreateLinkInputBuilder::default()
}
}
/// A builder for [`CreateLinkInput`](crate::operation::create_link::CreateLinkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateLinkInputBuilder {
pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
pub(crate) peer_gateway_id: ::std::option::Option<::std::string::String>,
pub(crate) attributes: ::std::option::Option<crate::types::LinkAttributes>,
pub(crate) http_responder_allowed: ::std::option::Option<bool>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
pub(crate) timeout_in_millis: ::std::option::Option<i64>,
}
impl CreateLinkInputBuilder {
/// <p>The unique identifier of the gateway.</p>
/// This field is required.
pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.gateway_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the gateway.</p>
pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.gateway_id = input;
self
}
/// <p>The unique identifier of the gateway.</p>
pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
&self.gateway_id
}
/// <p>The unique identifier of the peer gateway.</p>
/// This field is required.
pub fn peer_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.peer_gateway_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the peer gateway.</p>
pub fn set_peer_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.peer_gateway_id = input;
self
}
/// <p>The unique identifier of the peer gateway.</p>
pub fn get_peer_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
&self.peer_gateway_id
}
/// <p>Attributes of the link.</p>
pub fn attributes(mut self, input: crate::types::LinkAttributes) -> Self {
self.attributes = ::std::option::Option::Some(input);
self
}
/// <p>Attributes of the link.</p>
pub fn set_attributes(mut self, input: ::std::option::Option<crate::types::LinkAttributes>) -> Self {
self.attributes = input;
self
}
/// <p>Attributes of the link.</p>
pub fn get_attributes(&self) -> &::std::option::Option<crate::types::LinkAttributes> {
&self.attributes
}
/// <p>Boolean to specify if an HTTP responder is allowed.</p>
pub fn http_responder_allowed(mut self, input: bool) -> Self {
self.http_responder_allowed = ::std::option::Option::Some(input);
self
}
/// <p>Boolean to specify if an HTTP responder is allowed.</p>
pub fn set_http_responder_allowed(mut self, input: ::std::option::Option<bool>) -> Self {
self.http_responder_allowed = input;
self
}
/// <p>Boolean to specify if an HTTP responder is allowed.</p>
pub fn get_http_responder_allowed(&self) -> &::std::option::Option<bool> {
&self.http_responder_allowed
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// <p>Application log settings for the link. This value is required. Under <code>applicationLogs.sampling</code>, the <code>errorLog</code> and <code>filterLog</code> fields set the percentage of eligible events to log. Valid values range from <code>0</code> through <code>100</code>. To turn off application logs, set both fields to <code>0</code>, as in <code>{"applicationLogs":{"sampling":{"errorLog":0,"filterLog":0}}}</code>.</p>
/// This field is required.
pub fn log_settings(mut self, input: crate::types::LinkLogSettings) -> Self {
self.log_settings = ::std::option::Option::Some(input);
self
}
/// <p>Application log settings for the link. This value is required. Under <code>applicationLogs.sampling</code>, the <code>errorLog</code> and <code>filterLog</code> fields set the percentage of eligible events to log. Valid values range from <code>0</code> through <code>100</code>. To turn off application logs, set both fields to <code>0</code>, as in <code>{"applicationLogs":{"sampling":{"errorLog":0,"filterLog":0}}}</code>.</p>
pub fn set_log_settings(mut self, input: ::std::option::Option<crate::types::LinkLogSettings>) -> Self {
self.log_settings = input;
self
}
/// <p>Application log settings for the link. This value is required. Under <code>applicationLogs.sampling</code>, the <code>errorLog</code> and <code>filterLog</code> fields set the percentage of eligible events to log. Valid values range from <code>0</code> through <code>100</code>. To turn off application logs, set both fields to <code>0</code>, as in <code>{"applicationLogs":{"sampling":{"errorLog":0,"filterLog":0}}}</code>.</p>
pub fn get_log_settings(&self) -> &::std::option::Option<crate::types::LinkLogSettings> {
&self.log_settings
}
/// <p>The timeout value in milliseconds.</p>
pub fn timeout_in_millis(mut self, input: i64) -> Self {
self.timeout_in_millis = ::std::option::Option::Some(input);
self
}
/// <p>The timeout value in milliseconds.</p>
pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i64>) -> Self {
self.timeout_in_millis = input;
self
}
/// <p>The timeout value in milliseconds.</p>
pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i64> {
&self.timeout_in_millis
}
/// Consumes the builder and constructs a [`CreateLinkInput`](crate::operation::create_link::CreateLinkInput).
pub fn build(self) -> ::std::result::Result<crate::operation::create_link::CreateLinkInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_link::CreateLinkInput {
gateway_id: self.gateway_id,
peer_gateway_id: self.peer_gateway_id,
attributes: self.attributes,
http_responder_allowed: self.http_responder_allowed,
tags: self.tags,
log_settings: self.log_settings,
timeout_in_millis: self.timeout_in_millis,
})
}
}