docktor_api_client/
input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2use std::fmt::Write;
3/// See [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
4pub mod healthcheck_operation_input {
5    /// A builder for [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
6    #[non_exhaustive]
7    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
8    pub struct Builder {}
9    impl Builder {
10        /// Consumes the builder and constructs a [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
11        pub fn build(
12            self,
13        ) -> std::result::Result<
14            crate::input::HealthcheckOperationInput,
15            aws_smithy_http::operation::BuildError,
16        > {
17            Ok(crate::input::HealthcheckOperationInput {})
18        }
19    }
20}
21#[doc(hidden)]
22pub type HealthcheckOperationInputOperationOutputAlias = crate::operation::HealthcheckOperation;
23#[doc(hidden)]
24pub type HealthcheckOperationInputOperationRetryAlias = ();
25impl HealthcheckOperationInput {
26    /// Consumes the builder and constructs an Operation<[`HealthcheckOperation`](crate::operation::HealthcheckOperation)>
27    #[allow(clippy::let_and_return)]
28    #[allow(clippy::needless_borrow)]
29    pub async fn make_operation(
30        &self,
31        _config: &crate::config::Config,
32    ) -> std::result::Result<
33        aws_smithy_http::operation::Operation<crate::operation::HealthcheckOperation, ()>,
34        aws_smithy_http::operation::BuildError,
35    > {
36        fn uri_base(
37            _input: &crate::input::HealthcheckOperationInput,
38            output: &mut String,
39        ) -> Result<(), aws_smithy_http::operation::BuildError> {
40            write!(output, "/healthcheck").expect("formatting should succeed");
41            Ok(())
42        }
43        #[allow(clippy::unnecessary_wraps)]
44        fn update_http_builder(
45            input: &crate::input::HealthcheckOperationInput,
46            builder: http::request::Builder,
47        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
48        {
49            let mut uri = String::new();
50            uri_base(input, &mut uri)?;
51            Ok(builder.method("GET").uri(uri))
52        }
53        #[allow(clippy::unnecessary_wraps)]
54        fn request_builder_base(
55            input: &crate::input::HealthcheckOperationInput,
56        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
57        {
58            #[allow(unused_mut)]
59            let mut builder = update_http_builder(input, http::request::Builder::new())?;
60            Ok(builder)
61        }
62        let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
63        let request = request_builder_base(&self)?;
64        let body = aws_smithy_http::body::SdkBody::from("");
65        let request = Self::assemble(request, body);
66        #[allow(unused_mut)]
67        let mut request = aws_smithy_http::operation::Request::from_parts(
68            request.map(aws_smithy_http::body::SdkBody::from),
69            properties,
70        );
71        let op = aws_smithy_http::operation::Operation::new(
72            request,
73            crate::operation::HealthcheckOperation::new(),
74        )
75        .with_metadata(aws_smithy_http::operation::Metadata::new(
76            "HealthcheckOperation",
77            "DocktorApi",
78        ));
79        Ok(op)
80    }
81    fn assemble(
82        builder: http::request::Builder,
83        body: aws_smithy_http::body::SdkBody,
84    ) -> http::request::Request<aws_smithy_http::body::SdkBody> {
85        builder.body(body).expect("should be valid request")
86    }
87    /// Creates a new builder-style object to manufacture [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
88    pub fn builder() -> crate::input::healthcheck_operation_input::Builder {
89        crate::input::healthcheck_operation_input::Builder::default()
90    }
91}
92
93/// See [`ListOperationInput`](crate::input::ListOperationInput)
94pub mod list_operation_input {
95    /// A builder for [`ListOperationInput`](crate::input::ListOperationInput)
96    #[non_exhaustive]
97    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
98    pub struct Builder {}
99    impl Builder {
100        /// Consumes the builder and constructs a [`ListOperationInput`](crate::input::ListOperationInput)
101        pub fn build(
102            self,
103        ) -> std::result::Result<
104            crate::input::ListOperationInput,
105            aws_smithy_http::operation::BuildError,
106        > {
107            Ok(crate::input::ListOperationInput {})
108        }
109    }
110}
111#[doc(hidden)]
112pub type ListOperationInputOperationOutputAlias = crate::operation::ListOperation;
113#[doc(hidden)]
114pub type ListOperationInputOperationRetryAlias = ();
115impl ListOperationInput {
116    /// Consumes the builder and constructs an Operation<[`ListOperation`](crate::operation::ListOperation)>
117    #[allow(clippy::let_and_return)]
118    #[allow(clippy::needless_borrow)]
119    pub async fn make_operation(
120        &self,
121        _config: &crate::config::Config,
122    ) -> std::result::Result<
123        aws_smithy_http::operation::Operation<crate::operation::ListOperation, ()>,
124        aws_smithy_http::operation::BuildError,
125    > {
126        fn uri_base(
127            _input: &crate::input::ListOperationInput,
128            output: &mut String,
129        ) -> Result<(), aws_smithy_http::operation::BuildError> {
130            write!(output, "/").expect("formatting should succeed");
131            Ok(())
132        }
133        #[allow(clippy::unnecessary_wraps)]
134        fn update_http_builder(
135            input: &crate::input::ListOperationInput,
136            builder: http::request::Builder,
137        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
138        {
139            let mut uri = String::new();
140            uri_base(input, &mut uri)?;
141            Ok(builder.method("GET").uri(uri))
142        }
143        #[allow(clippy::unnecessary_wraps)]
144        fn request_builder_base(
145            input: &crate::input::ListOperationInput,
146        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
147        {
148            #[allow(unused_mut)]
149            let mut builder = update_http_builder(input, http::request::Builder::new())?;
150            Ok(builder)
151        }
152        let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
153        let request = request_builder_base(&self)?;
154        let body = aws_smithy_http::body::SdkBody::from("");
155        let request = Self::assemble(request, body);
156        #[allow(unused_mut)]
157        let mut request = aws_smithy_http::operation::Request::from_parts(
158            request.map(aws_smithy_http::body::SdkBody::from),
159            properties,
160        );
161        let op = aws_smithy_http::operation::Operation::new(
162            request,
163            crate::operation::ListOperation::new(),
164        )
165        .with_metadata(aws_smithy_http::operation::Metadata::new(
166            "ListOperation",
167            "DocktorApi",
168        ));
169        Ok(op)
170    }
171    fn assemble(
172        builder: http::request::Builder,
173        body: aws_smithy_http::body::SdkBody,
174    ) -> http::request::Request<aws_smithy_http::body::SdkBody> {
175        builder.body(body).expect("should be valid request")
176    }
177    /// Creates a new builder-style object to manufacture [`ListOperationInput`](crate::input::ListOperationInput)
178    pub fn builder() -> crate::input::list_operation_input::Builder {
179        crate::input::list_operation_input::Builder::default()
180    }
181}
182
183/// See [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
184pub mod prometheus_target_operation_input {
185    /// A builder for [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
186    #[non_exhaustive]
187    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
188    pub struct Builder {}
189    impl Builder {
190        /// Consumes the builder and constructs a [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
191        pub fn build(
192            self,
193        ) -> std::result::Result<
194            crate::input::PrometheusTargetOperationInput,
195            aws_smithy_http::operation::BuildError,
196        > {
197            Ok(crate::input::PrometheusTargetOperationInput {})
198        }
199    }
200}
201#[doc(hidden)]
202pub type PrometheusTargetOperationInputOperationOutputAlias =
203    crate::operation::PrometheusTargetOperation;
204#[doc(hidden)]
205pub type PrometheusTargetOperationInputOperationRetryAlias = ();
206impl PrometheusTargetOperationInput {
207    /// Consumes the builder and constructs an Operation<[`PrometheusTargetOperation`](crate::operation::PrometheusTargetOperation)>
208    #[allow(clippy::let_and_return)]
209    #[allow(clippy::needless_borrow)]
210    pub async fn make_operation(
211        &self,
212        _config: &crate::config::Config,
213    ) -> std::result::Result<
214        aws_smithy_http::operation::Operation<crate::operation::PrometheusTargetOperation, ()>,
215        aws_smithy_http::operation::BuildError,
216    > {
217        fn uri_base(
218            _input: &crate::input::PrometheusTargetOperationInput,
219            output: &mut String,
220        ) -> Result<(), aws_smithy_http::operation::BuildError> {
221            write!(output, "/prometheus/targets").expect("formatting should succeed");
222            Ok(())
223        }
224        #[allow(clippy::unnecessary_wraps)]
225        fn update_http_builder(
226            input: &crate::input::PrometheusTargetOperationInput,
227            builder: http::request::Builder,
228        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
229        {
230            let mut uri = String::new();
231            uri_base(input, &mut uri)?;
232            Ok(builder.method("GET").uri(uri))
233        }
234        #[allow(clippy::unnecessary_wraps)]
235        fn request_builder_base(
236            input: &crate::input::PrometheusTargetOperationInput,
237        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
238        {
239            #[allow(unused_mut)]
240            let mut builder = update_http_builder(input, http::request::Builder::new())?;
241            Ok(builder)
242        }
243        let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
244        let request = request_builder_base(&self)?;
245        let body = aws_smithy_http::body::SdkBody::from("");
246        let request = Self::assemble(request, body);
247        #[allow(unused_mut)]
248        let mut request = aws_smithy_http::operation::Request::from_parts(
249            request.map(aws_smithy_http::body::SdkBody::from),
250            properties,
251        );
252        let op = aws_smithy_http::operation::Operation::new(
253            request,
254            crate::operation::PrometheusTargetOperation::new(),
255        )
256        .with_metadata(aws_smithy_http::operation::Metadata::new(
257            "PrometheusTargetOperation",
258            "DocktorApi",
259        ));
260        Ok(op)
261    }
262    fn assemble(
263        builder: http::request::Builder,
264        body: aws_smithy_http::body::SdkBody,
265    ) -> http::request::Request<aws_smithy_http::body::SdkBody> {
266        builder.body(body).expect("should be valid request")
267    }
268    /// Creates a new builder-style object to manufacture [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
269    pub fn builder() -> crate::input::prometheus_target_operation_input::Builder {
270        crate::input::prometheus_target_operation_input::Builder::default()
271    }
272}
273
274/// See [`RestartOperationInput`](crate::input::RestartOperationInput)
275pub mod restart_operation_input {
276    /// A builder for [`RestartOperationInput`](crate::input::RestartOperationInput)
277    #[non_exhaustive]
278    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
279    pub struct Builder {
280        pub(crate) services: std::option::Option<std::vec::Vec<std::string::String>>,
281        pub(crate) hostname: std::option::Option<std::string::String>,
282    }
283    impl Builder {
284        /// Appends an item to `services`.
285        ///
286        /// To override the contents of this collection use [`set_services`](Self::set_services).
287        ///
288        /// Service name.
289        pub fn services(mut self, input: impl Into<std::string::String>) -> Self {
290            let mut v = self.services.unwrap_or_default();
291            v.push(input.into());
292            self.services = Some(v);
293            self
294        }
295        /// Service name.
296        pub fn set_services(
297            mut self,
298            input: std::option::Option<std::vec::Vec<std::string::String>>,
299        ) -> Self {
300            self.services = input;
301            self
302        }
303        /// Hostname.
304        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
305            self.hostname = Some(input.into());
306            self
307        }
308        /// Hostname.
309        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
310            self.hostname = input;
311            self
312        }
313        /// Consumes the builder and constructs a [`RestartOperationInput`](crate::input::RestartOperationInput)
314        pub fn build(
315            self,
316        ) -> std::result::Result<
317            crate::input::RestartOperationInput,
318            aws_smithy_http::operation::BuildError,
319        > {
320            Ok(crate::input::RestartOperationInput {
321                services: self.services,
322                hostname: self.hostname,
323            })
324        }
325    }
326}
327#[doc(hidden)]
328pub type RestartOperationInputOperationOutputAlias = crate::operation::RestartOperation;
329#[doc(hidden)]
330pub type RestartOperationInputOperationRetryAlias = ();
331impl RestartOperationInput {
332    /// Consumes the builder and constructs an Operation<[`RestartOperation`](crate::operation::RestartOperation)>
333    #[allow(clippy::let_and_return)]
334    #[allow(clippy::needless_borrow)]
335    pub async fn make_operation(
336        &self,
337        _config: &crate::config::Config,
338    ) -> std::result::Result<
339        aws_smithy_http::operation::Operation<crate::operation::RestartOperation, ()>,
340        aws_smithy_http::operation::BuildError,
341    > {
342        fn uri_base(
343            _input: &crate::input::RestartOperationInput,
344            output: &mut String,
345        ) -> Result<(), aws_smithy_http::operation::BuildError> {
346            write!(output, "/systemd/restart").expect("formatting should succeed");
347            Ok(())
348        }
349        #[allow(clippy::unnecessary_wraps)]
350        fn update_http_builder(
351            input: &crate::input::RestartOperationInput,
352            builder: http::request::Builder,
353        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
354        {
355            let mut uri = String::new();
356            uri_base(input, &mut uri)?;
357            Ok(builder.method("POST").uri(uri))
358        }
359        #[allow(clippy::unnecessary_wraps)]
360        fn request_builder_base(
361            input: &crate::input::RestartOperationInput,
362        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
363        {
364            #[allow(unused_mut)]
365            let mut builder = update_http_builder(input, http::request::Builder::new())?;
366            builder = aws_smithy_http::header::set_header_if_absent(
367                builder,
368                http::header::HeaderName::from_static("content-type"),
369                "application/json",
370            );
371            Ok(builder)
372        }
373        let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
374        let request = request_builder_base(&self)?;
375        let body =
376            crate::operation_ser::serialize_operation_crate_operation_restart_operation(&self)?;
377        let request = Self::assemble(request, body);
378        #[allow(unused_mut)]
379        let mut request = aws_smithy_http::operation::Request::from_parts(
380            request.map(aws_smithy_http::body::SdkBody::from),
381            properties,
382        );
383        let op = aws_smithy_http::operation::Operation::new(
384            request,
385            crate::operation::RestartOperation::new(),
386        )
387        .with_metadata(aws_smithy_http::operation::Metadata::new(
388            "RestartOperation",
389            "DocktorApi",
390        ));
391        Ok(op)
392    }
393    fn assemble(
394        builder: http::request::Builder,
395        body: aws_smithy_http::body::SdkBody,
396    ) -> http::request::Request<aws_smithy_http::body::SdkBody> {
397        let mut builder = builder;
398        if let Some(content_length) = body.content_length() {
399            builder = aws_smithy_http::header::set_header_if_absent(
400                builder,
401                http::header::CONTENT_LENGTH,
402                content_length,
403            );
404        }
405        builder.body(body).expect("should be valid request")
406    }
407    /// Creates a new builder-style object to manufacture [`RestartOperationInput`](crate::input::RestartOperationInput)
408    pub fn builder() -> crate::input::restart_operation_input::Builder {
409        crate::input::restart_operation_input::Builder::default()
410    }
411}
412
413/// See [`StartOperationInput`](crate::input::StartOperationInput)
414pub mod start_operation_input {
415    /// A builder for [`StartOperationInput`](crate::input::StartOperationInput)
416    #[non_exhaustive]
417    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
418    pub struct Builder {
419        pub(crate) services: std::option::Option<std::vec::Vec<std::string::String>>,
420        pub(crate) hostname: std::option::Option<std::string::String>,
421    }
422    impl Builder {
423        /// Appends an item to `services`.
424        ///
425        /// To override the contents of this collection use [`set_services`](Self::set_services).
426        ///
427        /// Service name.
428        pub fn services(mut self, input: impl Into<std::string::String>) -> Self {
429            let mut v = self.services.unwrap_or_default();
430            v.push(input.into());
431            self.services = Some(v);
432            self
433        }
434        /// Service name.
435        pub fn set_services(
436            mut self,
437            input: std::option::Option<std::vec::Vec<std::string::String>>,
438        ) -> Self {
439            self.services = input;
440            self
441        }
442        /// Hostname.
443        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
444            self.hostname = Some(input.into());
445            self
446        }
447        /// Hostname.
448        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
449            self.hostname = input;
450            self
451        }
452        /// Consumes the builder and constructs a [`StartOperationInput`](crate::input::StartOperationInput)
453        pub fn build(
454            self,
455        ) -> std::result::Result<
456            crate::input::StartOperationInput,
457            aws_smithy_http::operation::BuildError,
458        > {
459            Ok(crate::input::StartOperationInput {
460                services: self.services,
461                hostname: self.hostname,
462            })
463        }
464    }
465}
466#[doc(hidden)]
467pub type StartOperationInputOperationOutputAlias = crate::operation::StartOperation;
468#[doc(hidden)]
469pub type StartOperationInputOperationRetryAlias = ();
470impl StartOperationInput {
471    /// Consumes the builder and constructs an Operation<[`StartOperation`](crate::operation::StartOperation)>
472    #[allow(clippy::let_and_return)]
473    #[allow(clippy::needless_borrow)]
474    pub async fn make_operation(
475        &self,
476        _config: &crate::config::Config,
477    ) -> std::result::Result<
478        aws_smithy_http::operation::Operation<crate::operation::StartOperation, ()>,
479        aws_smithy_http::operation::BuildError,
480    > {
481        fn uri_base(
482            _input: &crate::input::StartOperationInput,
483            output: &mut String,
484        ) -> Result<(), aws_smithy_http::operation::BuildError> {
485            write!(output, "/systemd/start").expect("formatting should succeed");
486            Ok(())
487        }
488        #[allow(clippy::unnecessary_wraps)]
489        fn update_http_builder(
490            input: &crate::input::StartOperationInput,
491            builder: http::request::Builder,
492        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
493        {
494            let mut uri = String::new();
495            uri_base(input, &mut uri)?;
496            Ok(builder.method("POST").uri(uri))
497        }
498        #[allow(clippy::unnecessary_wraps)]
499        fn request_builder_base(
500            input: &crate::input::StartOperationInput,
501        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
502        {
503            #[allow(unused_mut)]
504            let mut builder = update_http_builder(input, http::request::Builder::new())?;
505            builder = aws_smithy_http::header::set_header_if_absent(
506                builder,
507                http::header::HeaderName::from_static("content-type"),
508                "application/json",
509            );
510            Ok(builder)
511        }
512        let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
513        let request = request_builder_base(&self)?;
514        let body =
515            crate::operation_ser::serialize_operation_crate_operation_start_operation(&self)?;
516        let request = Self::assemble(request, body);
517        #[allow(unused_mut)]
518        let mut request = aws_smithy_http::operation::Request::from_parts(
519            request.map(aws_smithy_http::body::SdkBody::from),
520            properties,
521        );
522        let op = aws_smithy_http::operation::Operation::new(
523            request,
524            crate::operation::StartOperation::new(),
525        )
526        .with_metadata(aws_smithy_http::operation::Metadata::new(
527            "StartOperation",
528            "DocktorApi",
529        ));
530        Ok(op)
531    }
532    fn assemble(
533        builder: http::request::Builder,
534        body: aws_smithy_http::body::SdkBody,
535    ) -> http::request::Request<aws_smithy_http::body::SdkBody> {
536        let mut builder = builder;
537        if let Some(content_length) = body.content_length() {
538            builder = aws_smithy_http::header::set_header_if_absent(
539                builder,
540                http::header::CONTENT_LENGTH,
541                content_length,
542            );
543        }
544        builder.body(body).expect("should be valid request")
545    }
546    /// Creates a new builder-style object to manufacture [`StartOperationInput`](crate::input::StartOperationInput)
547    pub fn builder() -> crate::input::start_operation_input::Builder {
548        crate::input::start_operation_input::Builder::default()
549    }
550}
551
552/// See [`StopOperationInput`](crate::input::StopOperationInput)
553pub mod stop_operation_input {
554    /// A builder for [`StopOperationInput`](crate::input::StopOperationInput)
555    #[non_exhaustive]
556    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
557    pub struct Builder {
558        pub(crate) services: std::option::Option<std::vec::Vec<std::string::String>>,
559        pub(crate) hostname: std::option::Option<std::string::String>,
560    }
561    impl Builder {
562        /// Appends an item to `services`.
563        ///
564        /// To override the contents of this collection use [`set_services`](Self::set_services).
565        ///
566        /// Service name.
567        pub fn services(mut self, input: impl Into<std::string::String>) -> Self {
568            let mut v = self.services.unwrap_or_default();
569            v.push(input.into());
570            self.services = Some(v);
571            self
572        }
573        /// Service name.
574        pub fn set_services(
575            mut self,
576            input: std::option::Option<std::vec::Vec<std::string::String>>,
577        ) -> Self {
578            self.services = input;
579            self
580        }
581        /// Hostname.
582        pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
583            self.hostname = Some(input.into());
584            self
585        }
586        /// Hostname.
587        pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
588            self.hostname = input;
589            self
590        }
591        /// Consumes the builder and constructs a [`StopOperationInput`](crate::input::StopOperationInput)
592        pub fn build(
593            self,
594        ) -> std::result::Result<
595            crate::input::StopOperationInput,
596            aws_smithy_http::operation::BuildError,
597        > {
598            Ok(crate::input::StopOperationInput {
599                services: self.services,
600                hostname: self.hostname,
601            })
602        }
603    }
604}
605#[doc(hidden)]
606pub type StopOperationInputOperationOutputAlias = crate::operation::StopOperation;
607#[doc(hidden)]
608pub type StopOperationInputOperationRetryAlias = ();
609impl StopOperationInput {
610    /// Consumes the builder and constructs an Operation<[`StopOperation`](crate::operation::StopOperation)>
611    #[allow(clippy::let_and_return)]
612    #[allow(clippy::needless_borrow)]
613    pub async fn make_operation(
614        &self,
615        _config: &crate::config::Config,
616    ) -> std::result::Result<
617        aws_smithy_http::operation::Operation<crate::operation::StopOperation, ()>,
618        aws_smithy_http::operation::BuildError,
619    > {
620        fn uri_base(
621            _input: &crate::input::StopOperationInput,
622            output: &mut String,
623        ) -> Result<(), aws_smithy_http::operation::BuildError> {
624            write!(output, "/systemd/stop").expect("formatting should succeed");
625            Ok(())
626        }
627        #[allow(clippy::unnecessary_wraps)]
628        fn update_http_builder(
629            input: &crate::input::StopOperationInput,
630            builder: http::request::Builder,
631        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
632        {
633            let mut uri = String::new();
634            uri_base(input, &mut uri)?;
635            Ok(builder.method("POST").uri(uri))
636        }
637        #[allow(clippy::unnecessary_wraps)]
638        fn request_builder_base(
639            input: &crate::input::StopOperationInput,
640        ) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
641        {
642            #[allow(unused_mut)]
643            let mut builder = update_http_builder(input, http::request::Builder::new())?;
644            builder = aws_smithy_http::header::set_header_if_absent(
645                builder,
646                http::header::HeaderName::from_static("content-type"),
647                "application/json",
648            );
649            Ok(builder)
650        }
651        let properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
652        let request = request_builder_base(&self)?;
653        let body = crate::operation_ser::serialize_operation_crate_operation_stop_operation(&self)?;
654        let request = Self::assemble(request, body);
655        #[allow(unused_mut)]
656        let mut request = aws_smithy_http::operation::Request::from_parts(
657            request.map(aws_smithy_http::body::SdkBody::from),
658            properties,
659        );
660        let op = aws_smithy_http::operation::Operation::new(
661            request,
662            crate::operation::StopOperation::new(),
663        )
664        .with_metadata(aws_smithy_http::operation::Metadata::new(
665            "StopOperation",
666            "DocktorApi",
667        ));
668        Ok(op)
669    }
670    fn assemble(
671        builder: http::request::Builder,
672        body: aws_smithy_http::body::SdkBody,
673    ) -> http::request::Request<aws_smithy_http::body::SdkBody> {
674        let mut builder = builder;
675        if let Some(content_length) = body.content_length() {
676            builder = aws_smithy_http::header::set_header_if_absent(
677                builder,
678                http::header::CONTENT_LENGTH,
679                content_length,
680            );
681        }
682        builder.body(body).expect("should be valid request")
683    }
684    /// Creates a new builder-style object to manufacture [`StopOperationInput`](crate::input::StopOperationInput)
685    pub fn builder() -> crate::input::stop_operation_input::Builder {
686        crate::input::stop_operation_input::Builder::default()
687    }
688}
689
690/// Prometheus target input structure.
691#[non_exhaustive]
692#[derive(std::clone::Clone, std::cmp::PartialEq)]
693pub struct PrometheusTargetOperationInput {}
694impl std::fmt::Debug for PrometheusTargetOperationInput {
695    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
696        let mut formatter = f.debug_struct("PrometheusTargetOperationInput");
697        formatter.finish()
698    }
699}
700
701/// Systemd input structure.
702#[non_exhaustive]
703#[derive(std::clone::Clone, std::cmp::PartialEq)]
704pub struct RestartOperationInput {
705    /// Service name.
706    pub services: std::option::Option<std::vec::Vec<std::string::String>>,
707    /// Hostname.
708    pub hostname: std::option::Option<std::string::String>,
709}
710impl RestartOperationInput {
711    /// Service name.
712    pub fn services(&self) -> std::option::Option<&[std::string::String]> {
713        self.services.as_deref()
714    }
715    /// Hostname.
716    pub fn hostname(&self) -> std::option::Option<&str> {
717        self.hostname.as_deref()
718    }
719}
720impl std::fmt::Debug for RestartOperationInput {
721    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
722        let mut formatter = f.debug_struct("RestartOperationInput");
723        formatter.field("services", &self.services);
724        formatter.field("hostname", &self.hostname);
725        formatter.finish()
726    }
727}
728
729/// Systemd input structure.
730#[non_exhaustive]
731#[derive(std::clone::Clone, std::cmp::PartialEq)]
732pub struct StopOperationInput {
733    /// Service name.
734    pub services: std::option::Option<std::vec::Vec<std::string::String>>,
735    /// Hostname.
736    pub hostname: std::option::Option<std::string::String>,
737}
738impl StopOperationInput {
739    /// Service name.
740    pub fn services(&self) -> std::option::Option<&[std::string::String]> {
741        self.services.as_deref()
742    }
743    /// Hostname.
744    pub fn hostname(&self) -> std::option::Option<&str> {
745        self.hostname.as_deref()
746    }
747}
748impl std::fmt::Debug for StopOperationInput {
749    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
750        let mut formatter = f.debug_struct("StopOperationInput");
751        formatter.field("services", &self.services);
752        formatter.field("hostname", &self.hostname);
753        formatter.finish()
754    }
755}
756
757/// Systemd input structure.
758#[non_exhaustive]
759#[derive(std::clone::Clone, std::cmp::PartialEq)]
760pub struct StartOperationInput {
761    /// Service name.
762    pub services: std::option::Option<std::vec::Vec<std::string::String>>,
763    /// Hostname.
764    pub hostname: std::option::Option<std::string::String>,
765}
766impl StartOperationInput {
767    /// Service name.
768    pub fn services(&self) -> std::option::Option<&[std::string::String]> {
769        self.services.as_deref()
770    }
771    /// Hostname.
772    pub fn hostname(&self) -> std::option::Option<&str> {
773        self.hostname.as_deref()
774    }
775}
776impl std::fmt::Debug for StartOperationInput {
777    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
778        let mut formatter = f.debug_struct("StartOperationInput");
779        formatter.field("services", &self.services);
780        formatter.field("hostname", &self.hostname);
781        formatter.finish()
782    }
783}
784
785/// ListInput structure
786#[non_exhaustive]
787#[derive(std::clone::Clone, std::cmp::PartialEq)]
788pub struct ListOperationInput {}
789impl std::fmt::Debug for ListOperationInput {
790    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
791        let mut formatter = f.debug_struct("ListOperationInput");
792        formatter.finish()
793    }
794}
795
796/// //////////////////////////////////// Model //////////////////////////////////// Service healthcheck input structure
797#[non_exhaustive]
798#[derive(std::clone::Clone, std::cmp::PartialEq)]
799pub struct HealthcheckOperationInput {}
800impl std::fmt::Debug for HealthcheckOperationInput {
801    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
802        let mut formatter = f.debug_struct("HealthcheckOperationInput");
803        formatter.finish()
804    }
805}