aws_sdk_networkmonitor/operation/update_probe/
builders.rs1pub use crate::operation::update_probe::_update_probe_output::UpdateProbeOutputBuilder;
3
4pub use crate::operation::update_probe::_update_probe_input::UpdateProbeInputBuilder;
5
6impl crate::operation::update_probe::builders::UpdateProbeInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_probe::UpdateProbeOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_probe::UpdateProbeError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_probe();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct UpdateProbeFluentBuilder {
43 handle: ::std::sync::Arc<crate::client::Handle>,
44 inner: crate::operation::update_probe::builders::UpdateProbeInputBuilder,
45 config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48 crate::client::customize::internal::CustomizableSend<
49 crate::operation::update_probe::UpdateProbeOutput,
50 crate::operation::update_probe::UpdateProbeError,
51 > for UpdateProbeFluentBuilder
52{
53 fn send(
54 self,
55 config_override: crate::config::Builder,
56 ) -> crate::client::customize::internal::BoxFuture<
57 crate::client::customize::internal::SendResult<
58 crate::operation::update_probe::UpdateProbeOutput,
59 crate::operation::update_probe::UpdateProbeError,
60 >,
61 > {
62 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63 }
64}
65impl UpdateProbeFluentBuilder {
66 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68 Self {
69 handle,
70 inner: ::std::default::Default::default(),
71 config_override: ::std::option::Option::None,
72 }
73 }
74 pub fn as_input(&self) -> &crate::operation::update_probe::builders::UpdateProbeInputBuilder {
76 &self.inner
77 }
78 pub async fn send(
87 self,
88 ) -> ::std::result::Result<
89 crate::operation::update_probe::UpdateProbeOutput,
90 ::aws_smithy_runtime_api::client::result::SdkError<
91 crate::operation::update_probe::UpdateProbeError,
92 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93 >,
94 > {
95 let input = self
96 .inner
97 .build()
98 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99 let runtime_plugins = crate::operation::update_probe::UpdateProbe::operation_runtime_plugins(
100 self.handle.runtime_plugins.clone(),
101 &self.handle.conf,
102 self.config_override,
103 );
104 crate::operation::update_probe::UpdateProbe::orchestrate(&runtime_plugins, input).await
105 }
106
107 pub fn customize(
109 self,
110 ) -> crate::client::customize::CustomizableOperation<
111 crate::operation::update_probe::UpdateProbeOutput,
112 crate::operation::update_probe::UpdateProbeError,
113 Self,
114 > {
115 crate::client::customize::CustomizableOperation::new(self)
116 }
117 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
118 self.set_config_override(::std::option::Option::Some(config_override.into()));
119 self
120 }
121
122 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
123 self.config_override = config_override;
124 self
125 }
126 pub fn monitor_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.inner = self.inner.monitor_name(input.into());
129 self
130 }
131 pub fn set_monitor_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.inner = self.inner.set_monitor_name(input);
134 self
135 }
136 pub fn get_monitor_name(&self) -> &::std::option::Option<::std::string::String> {
138 self.inner.get_monitor_name()
139 }
140 pub fn probe_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.inner = self.inner.probe_id(input.into());
143 self
144 }
145 pub fn set_probe_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.inner = self.inner.set_probe_id(input);
148 self
149 }
150 pub fn get_probe_id(&self) -> &::std::option::Option<::std::string::String> {
152 self.inner.get_probe_id()
153 }
154 pub fn state(mut self, input: crate::types::ProbeState) -> Self {
156 self.inner = self.inner.state(input);
157 self
158 }
159 pub fn set_state(mut self, input: ::std::option::Option<crate::types::ProbeState>) -> Self {
161 self.inner = self.inner.set_state(input);
162 self
163 }
164 pub fn get_state(&self) -> &::std::option::Option<crate::types::ProbeState> {
166 self.inner.get_state()
167 }
168 pub fn destination(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170 self.inner = self.inner.destination(input.into());
171 self
172 }
173 pub fn set_destination(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175 self.inner = self.inner.set_destination(input);
176 self
177 }
178 pub fn get_destination(&self) -> &::std::option::Option<::std::string::String> {
180 self.inner.get_destination()
181 }
182 pub fn destination_port(mut self, input: i32) -> Self {
184 self.inner = self.inner.destination_port(input);
185 self
186 }
187 pub fn set_destination_port(mut self, input: ::std::option::Option<i32>) -> Self {
189 self.inner = self.inner.set_destination_port(input);
190 self
191 }
192 pub fn get_destination_port(&self) -> &::std::option::Option<i32> {
194 self.inner.get_destination_port()
195 }
196 pub fn protocol(mut self, input: crate::types::Protocol) -> Self {
198 self.inner = self.inner.protocol(input);
199 self
200 }
201 pub fn set_protocol(mut self, input: ::std::option::Option<crate::types::Protocol>) -> Self {
203 self.inner = self.inner.set_protocol(input);
204 self
205 }
206 pub fn get_protocol(&self) -> &::std::option::Option<crate::types::Protocol> {
208 self.inner.get_protocol()
209 }
210 pub fn packet_size(mut self, input: i32) -> Self {
212 self.inner = self.inner.packet_size(input);
213 self
214 }
215 pub fn set_packet_size(mut self, input: ::std::option::Option<i32>) -> Self {
217 self.inner = self.inner.set_packet_size(input);
218 self
219 }
220 pub fn get_packet_size(&self) -> &::std::option::Option<i32> {
222 self.inner.get_packet_size()
223 }
224}