docktor_api_client/
operation.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Operation shape for `HealthcheckOperation`.
3///
4/// This is usually constructed for you using the the fluent builder returned by
5/// [`healthcheck_operation`](crate::client::Client::healthcheck_operation).
6///
7/// See [`crate::client::fluent_builders::HealthcheckOperation`] for more details about the operation.
8#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
9pub struct HealthcheckOperation {
10    _private: (),
11}
12impl HealthcheckOperation {
13    /// Creates a new builder-style object to manufacture [`HealthcheckOperationInput`](crate::input::HealthcheckOperationInput)
14    pub fn builder() -> crate::input::healthcheck_operation_input::Builder {
15        crate::input::healthcheck_operation_input::Builder::default()
16    }
17    /// Creates a new `HealthcheckOperation` operation.
18    pub fn new() -> Self {
19        Self { _private: () }
20    }
21}
22impl aws_smithy_http::response::ParseStrictResponse for HealthcheckOperation {
23    type Output = std::result::Result<
24        crate::output::HealthcheckOperationOutput,
25        crate::error::HealthcheckOperationError,
26    >;
27    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
28        if !response.status().is_success() && response.status().as_u16() != 200 {
29            crate::operation_deser::parse_healthcheck_operation_error(response)
30        } else {
31            crate::operation_deser::parse_healthcheck_operation_response(response)
32        }
33    }
34}
35
36/// Operation shape for `ListOperation`.
37///
38/// This is usually constructed for you using the the fluent builder returned by
39/// [`list_operation`](crate::client::Client::list_operation).
40///
41/// See [`crate::client::fluent_builders::ListOperation`] for more details about the operation.
42#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
43pub struct ListOperation {
44    _private: (),
45}
46impl ListOperation {
47    /// Creates a new builder-style object to manufacture [`ListOperationInput`](crate::input::ListOperationInput)
48    pub fn builder() -> crate::input::list_operation_input::Builder {
49        crate::input::list_operation_input::Builder::default()
50    }
51    /// Creates a new `ListOperation` operation.
52    pub fn new() -> Self {
53        Self { _private: () }
54    }
55}
56impl aws_smithy_http::response::ParseStrictResponse for ListOperation {
57    type Output =
58        std::result::Result<crate::output::ListOperationOutput, crate::error::ListOperationError>;
59    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
60        if !response.status().is_success() && response.status().as_u16() != 200 {
61            crate::operation_deser::parse_list_operation_error(response)
62        } else {
63            crate::operation_deser::parse_list_operation_response(response)
64        }
65    }
66}
67
68/// Operation shape for `PrometheusTargetOperation`.
69///
70/// This is usually constructed for you using the the fluent builder returned by
71/// [`prometheus_target_operation`](crate::client::Client::prometheus_target_operation).
72///
73/// See [`crate::client::fluent_builders::PrometheusTargetOperation`] for more details about the operation.
74#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
75pub struct PrometheusTargetOperation {
76    _private: (),
77}
78impl PrometheusTargetOperation {
79    /// Creates a new builder-style object to manufacture [`PrometheusTargetOperationInput`](crate::input::PrometheusTargetOperationInput)
80    pub fn builder() -> crate::input::prometheus_target_operation_input::Builder {
81        crate::input::prometheus_target_operation_input::Builder::default()
82    }
83    /// Creates a new `PrometheusTargetOperation` operation.
84    pub fn new() -> Self {
85        Self { _private: () }
86    }
87}
88impl aws_smithy_http::response::ParseStrictResponse for PrometheusTargetOperation {
89    type Output = std::result::Result<
90        crate::output::PrometheusTargetOperationOutput,
91        crate::error::PrometheusTargetOperationError,
92    >;
93    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
94        if !response.status().is_success() && response.status().as_u16() != 200 {
95            crate::operation_deser::parse_prometheus_target_operation_error(response)
96        } else {
97            crate::operation_deser::parse_prometheus_target_operation_response(response)
98        }
99    }
100}
101
102/// Operation shape for `RestartOperation`.
103///
104/// This is usually constructed for you using the the fluent builder returned by
105/// [`restart_operation`](crate::client::Client::restart_operation).
106///
107/// See [`crate::client::fluent_builders::RestartOperation`] for more details about the operation.
108#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
109pub struct RestartOperation {
110    _private: (),
111}
112impl RestartOperation {
113    /// Creates a new builder-style object to manufacture [`RestartOperationInput`](crate::input::RestartOperationInput)
114    pub fn builder() -> crate::input::restart_operation_input::Builder {
115        crate::input::restart_operation_input::Builder::default()
116    }
117    /// Creates a new `RestartOperation` operation.
118    pub fn new() -> Self {
119        Self { _private: () }
120    }
121}
122impl aws_smithy_http::response::ParseStrictResponse for RestartOperation {
123    type Output = std::result::Result<
124        crate::output::RestartOperationOutput,
125        crate::error::RestartOperationError,
126    >;
127    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
128        if !response.status().is_success() && response.status().as_u16() != 200 {
129            crate::operation_deser::parse_restart_operation_error(response)
130        } else {
131            crate::operation_deser::parse_restart_operation_response(response)
132        }
133    }
134}
135
136/// Operation shape for `StartOperation`.
137///
138/// This is usually constructed for you using the the fluent builder returned by
139/// [`start_operation`](crate::client::Client::start_operation).
140///
141/// See [`crate::client::fluent_builders::StartOperation`] for more details about the operation.
142#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
143pub struct StartOperation {
144    _private: (),
145}
146impl StartOperation {
147    /// Creates a new builder-style object to manufacture [`StartOperationInput`](crate::input::StartOperationInput)
148    pub fn builder() -> crate::input::start_operation_input::Builder {
149        crate::input::start_operation_input::Builder::default()
150    }
151    /// Creates a new `StartOperation` operation.
152    pub fn new() -> Self {
153        Self { _private: () }
154    }
155}
156impl aws_smithy_http::response::ParseStrictResponse for StartOperation {
157    type Output =
158        std::result::Result<crate::output::StartOperationOutput, crate::error::StartOperationError>;
159    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
160        if !response.status().is_success() && response.status().as_u16() != 200 {
161            crate::operation_deser::parse_start_operation_error(response)
162        } else {
163            crate::operation_deser::parse_start_operation_response(response)
164        }
165    }
166}
167
168/// Operation shape for `StopOperation`.
169///
170/// This is usually constructed for you using the the fluent builder returned by
171/// [`stop_operation`](crate::client::Client::stop_operation).
172///
173/// See [`crate::client::fluent_builders::StopOperation`] for more details about the operation.
174#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
175pub struct StopOperation {
176    _private: (),
177}
178impl StopOperation {
179    /// Creates a new builder-style object to manufacture [`StopOperationInput`](crate::input::StopOperationInput)
180    pub fn builder() -> crate::input::stop_operation_input::Builder {
181        crate::input::stop_operation_input::Builder::default()
182    }
183    /// Creates a new `StopOperation` operation.
184    pub fn new() -> Self {
185        Self { _private: () }
186    }
187}
188impl aws_smithy_http::response::ParseStrictResponse for StopOperation {
189    type Output =
190        std::result::Result<crate::output::StopOperationOutput, crate::error::StopOperationError>;
191    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
192        if !response.status().is_success() && response.status().as_u16() != 200 {
193            crate::operation_deser::parse_stop_operation_error(response)
194        } else {
195            crate::operation_deser::parse_stop_operation_response(response)
196        }
197    }
198}