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
// 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 UpdateProbeInput {
/// <p>The name of the monitor that the probe was updated for.</p>
pub monitor_name: ::std::option::Option<::std::string::String>,
/// <p>The ID of the probe to update.</p>
pub probe_id: ::std::option::Option<::std::string::String>,
/// <p>The state of the probe update.</p>
pub state: ::std::option::Option<crate::types::ProbeState>,
/// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
pub destination: ::std::option::Option<::std::string::String>,
/// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
pub destination_port: ::std::option::Option<i32>,
/// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
pub protocol: ::std::option::Option<crate::types::Protocol>,
/// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
pub packet_size: ::std::option::Option<i32>,
}
impl UpdateProbeInput {
/// <p>The name of the monitor that the probe was updated for.</p>
pub fn monitor_name(&self) -> ::std::option::Option<&str> {
self.monitor_name.as_deref()
}
/// <p>The ID of the probe to update.</p>
pub fn probe_id(&self) -> ::std::option::Option<&str> {
self.probe_id.as_deref()
}
/// <p>The state of the probe update.</p>
pub fn state(&self) -> ::std::option::Option<&crate::types::ProbeState> {
self.state.as_ref()
}
/// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
pub fn destination(&self) -> ::std::option::Option<&str> {
self.destination.as_deref()
}
/// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
pub fn destination_port(&self) -> ::std::option::Option<i32> {
self.destination_port
}
/// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
pub fn protocol(&self) -> ::std::option::Option<&crate::types::Protocol> {
self.protocol.as_ref()
}
/// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
pub fn packet_size(&self) -> ::std::option::Option<i32> {
self.packet_size
}
}
impl UpdateProbeInput {
/// Creates a new builder-style object to manufacture [`UpdateProbeInput`](crate::operation::update_probe::UpdateProbeInput).
pub fn builder() -> crate::operation::update_probe::builders::UpdateProbeInputBuilder {
crate::operation::update_probe::builders::UpdateProbeInputBuilder::default()
}
}
/// A builder for [`UpdateProbeInput`](crate::operation::update_probe::UpdateProbeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProbeInputBuilder {
pub(crate) monitor_name: ::std::option::Option<::std::string::String>,
pub(crate) probe_id: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<crate::types::ProbeState>,
pub(crate) destination: ::std::option::Option<::std::string::String>,
pub(crate) destination_port: ::std::option::Option<i32>,
pub(crate) protocol: ::std::option::Option<crate::types::Protocol>,
pub(crate) packet_size: ::std::option::Option<i32>,
}
impl UpdateProbeInputBuilder {
/// <p>The name of the monitor that the probe was updated for.</p>
/// This field is required.
pub fn monitor_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.monitor_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the monitor that the probe was updated for.</p>
pub fn set_monitor_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.monitor_name = input;
self
}
/// <p>The name of the monitor that the probe was updated for.</p>
pub fn get_monitor_name(&self) -> &::std::option::Option<::std::string::String> {
&self.monitor_name
}
/// <p>The ID of the probe to update.</p>
/// This field is required.
pub fn probe_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.probe_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the probe to update.</p>
pub fn set_probe_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.probe_id = input;
self
}
/// <p>The ID of the probe to update.</p>
pub fn get_probe_id(&self) -> &::std::option::Option<::std::string::String> {
&self.probe_id
}
/// <p>The state of the probe update.</p>
pub fn state(mut self, input: crate::types::ProbeState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
/// <p>The state of the probe update.</p>
pub fn set_state(mut self, input: ::std::option::Option<crate::types::ProbeState>) -> Self {
self.state = input;
self
}
/// <p>The state of the probe update.</p>
pub fn get_state(&self) -> &::std::option::Option<crate::types::ProbeState> {
&self.state
}
/// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
pub fn destination(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.destination = ::std::option::Option::Some(input.into());
self
}
/// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
pub fn set_destination(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.destination = input;
self
}
/// <p>The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.</p>
pub fn get_destination(&self) -> &::std::option::Option<::std::string::String> {
&self.destination
}
/// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
pub fn destination_port(mut self, input: i32) -> Self {
self.destination_port = ::std::option::Option::Some(input);
self
}
/// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
pub fn set_destination_port(mut self, input: ::std::option::Option<i32>) -> Self {
self.destination_port = input;
self
}
/// <p>The updated port for the probe destination. This is required only if the <code>protocol</code> is <code>TCP</code> and must be a number between <code>1</code> and <code>65536</code>.</p>
pub fn get_destination_port(&self) -> &::std::option::Option<i32> {
&self.destination_port
}
/// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
pub fn protocol(mut self, input: crate::types::Protocol) -> Self {
self.protocol = ::std::option::Option::Some(input);
self
}
/// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::Protocol>) -> Self {
self.protocol = input;
self
}
/// <p>The updated network protocol for the destination. This can be either <code>TCP</code> or <code>ICMP</code>. If the protocol is <code>TCP</code>, then <code>port</code> is also required.</p>
pub fn get_protocol(&self) -> &::std::option::Option<crate::types::Protocol> {
&self.protocol
}
/// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
pub fn packet_size(mut self, input: i32) -> Self {
self.packet_size = ::std::option::Option::Some(input);
self
}
/// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
pub fn set_packet_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.packet_size = input;
self
}
/// <p>he updated packets size for network traffic between the source and destination. This must be a number between <code>56</code> and <code>8500</code>.</p>
pub fn get_packet_size(&self) -> &::std::option::Option<i32> {
&self.packet_size
}
/// Consumes the builder and constructs a [`UpdateProbeInput`](crate::operation::update_probe::UpdateProbeInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_probe::UpdateProbeInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_probe::UpdateProbeInput {
monitor_name: self.monitor_name,
probe_id: self.probe_id,
state: self.state,
destination: self.destination,
destination_port: self.destination_port,
protocol: self.protocol,
packet_size: self.packet_size,
})
}
}