#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct HealthcheckOperation {
_private: (),
}
impl HealthcheckOperation {
pub fn new() -> Self {
Self { _private: () }
}
}
pub struct HealthcheckOperationOperationInputWrapper(pub crate::input::HealthcheckOperationInput);
#[async_trait::async_trait]
impl<B> axum_core::extract::FromRequest<B> for HealthcheckOperationOperationInputWrapper
where
B: aws_smithy_http_server::HttpBody + Send,
B::Data: Send,
B::Error: Into<aws_smithy_http_server::BoxError>,
aws_smithy_http_server::rejection::SmithyRejection:
From<<B as aws_smithy_http_server::HttpBody>::Error>,
{
type Rejection = aws_smithy_http_server::rejection::SmithyRejection;
async fn from_request(
req: &mut axum_core::extract::RequestParts<B>,
) -> Result<Self, Self::Rejection> {
Ok(HealthcheckOperationOperationInputWrapper(
crate::operation_deser::parse_healthcheck_operation_request(req).await?,
))
}
}
pub enum HealthcheckOperationOperationOutputWrapper {
Output(crate::output::HealthcheckOperationOutput),
Error(crate::error::HealthcheckOperationError),
}
#[async_trait::async_trait]
impl axum_core::response::IntoResponse for HealthcheckOperationOperationOutputWrapper {
fn into_response(self) -> axum_core::response::Response {
let mut response = match self {
Self::Output(o) => {
match crate::operation_ser::serialize_healthcheck_operation_response(&o) {
Ok(response) => response,
Err(e) => e.into_response(),
}
}
Self::Error(err) => {
match crate::operation_ser::serialize_healthcheck_operation_error(&err) {
Ok(mut response) => {
response.extensions_mut().insert(
aws_smithy_http_server::ExtensionModeledError::new(err.name()),
);
response
}
Err(e) => e.into_response(),
}
}
};
response
.extensions_mut()
.insert(aws_smithy_http_server::RequestExtensions::new(
"org.crisidev.docktor",
"HealthcheckOperation",
));
response
}
}
impl
From<Result<crate::output::HealthcheckOperationOutput, crate::error::HealthcheckOperationError>>
for HealthcheckOperationOperationOutputWrapper
{
fn from(
res: Result<
crate::output::HealthcheckOperationOutput,
crate::error::HealthcheckOperationError,
>,
) -> Self {
match res {
Ok(v) => Self::Output(v),
Err(e) => Self::Error(e),
}
}
}
impl From<HealthcheckOperationOperationInputWrapper> for crate::input::HealthcheckOperationInput {
fn from(i: HealthcheckOperationOperationInputWrapper) -> Self {
i.0
}
}
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct ListOperation {
_private: (),
}
impl ListOperation {
pub fn new() -> Self {
Self { _private: () }
}
}
pub struct ListOperationOperationInputWrapper(pub crate::input::ListOperationInput);
#[async_trait::async_trait]
impl<B> axum_core::extract::FromRequest<B> for ListOperationOperationInputWrapper
where
B: aws_smithy_http_server::HttpBody + Send,
B::Data: Send,
B::Error: Into<aws_smithy_http_server::BoxError>,
aws_smithy_http_server::rejection::SmithyRejection:
From<<B as aws_smithy_http_server::HttpBody>::Error>,
{
type Rejection = aws_smithy_http_server::rejection::SmithyRejection;
async fn from_request(
req: &mut axum_core::extract::RequestParts<B>,
) -> Result<Self, Self::Rejection> {
Ok(ListOperationOperationInputWrapper(
crate::operation_deser::parse_list_operation_request(req).await?,
))
}
}
pub struct ListOperationOperationOutputWrapper(pub crate::output::ListOperationOutput);
#[async_trait::async_trait]
impl axum_core::response::IntoResponse for ListOperationOperationOutputWrapper {
fn into_response(self) -> axum_core::response::Response {
match crate::operation_ser::serialize_list_operation_response(&self.0) {
Ok(response) => response,
Err(e) => e.into_response(),
}
}
}
impl From<crate::output::ListOperationOutput> for ListOperationOperationOutputWrapper {
fn from(o: crate::output::ListOperationOutput) -> Self {
Self(o)
}
}
impl From<ListOperationOperationInputWrapper> for crate::input::ListOperationInput {
fn from(i: ListOperationOperationInputWrapper) -> Self {
i.0
}
}
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct PrometheusTargetOperation {
_private: (),
}
impl PrometheusTargetOperation {
pub fn new() -> Self {
Self { _private: () }
}
}
pub struct PrometheusTargetOperationOperationInputWrapper(
pub crate::input::PrometheusTargetOperationInput,
);
#[async_trait::async_trait]
impl<B> axum_core::extract::FromRequest<B> for PrometheusTargetOperationOperationInputWrapper
where
B: aws_smithy_http_server::HttpBody + Send,
B::Data: Send,
B::Error: Into<aws_smithy_http_server::BoxError>,
aws_smithy_http_server::rejection::SmithyRejection:
From<<B as aws_smithy_http_server::HttpBody>::Error>,
{
type Rejection = aws_smithy_http_server::rejection::SmithyRejection;
async fn from_request(
req: &mut axum_core::extract::RequestParts<B>,
) -> Result<Self, Self::Rejection> {
Ok(PrometheusTargetOperationOperationInputWrapper(
crate::operation_deser::parse_prometheus_target_operation_request(req).await?,
))
}
}
pub enum PrometheusTargetOperationOperationOutputWrapper {
Output(crate::output::PrometheusTargetOperationOutput),
Error(crate::error::PrometheusTargetOperationError),
}
#[async_trait::async_trait]
impl axum_core::response::IntoResponse for PrometheusTargetOperationOperationOutputWrapper {
fn into_response(self) -> axum_core::response::Response {
let mut response = match self {
Self::Output(o) => {
match crate::operation_ser::serialize_prometheus_target_operation_response(&o) {
Ok(response) => response,
Err(e) => e.into_response(),
}
}
Self::Error(err) => {
match crate::operation_ser::serialize_prometheus_target_operation_error(&err) {
Ok(mut response) => {
response.extensions_mut().insert(
aws_smithy_http_server::ExtensionModeledError::new(err.name()),
);
response
}
Err(e) => e.into_response(),
}
}
};
response
.extensions_mut()
.insert(aws_smithy_http_server::RequestExtensions::new(
"org.crisidev.docktor",
"PrometheusTargetOperation",
));
response
}
}
impl
From<
Result<
crate::output::PrometheusTargetOperationOutput,
crate::error::PrometheusTargetOperationError,
>,
> for PrometheusTargetOperationOperationOutputWrapper
{
fn from(
res: Result<
crate::output::PrometheusTargetOperationOutput,
crate::error::PrometheusTargetOperationError,
>,
) -> Self {
match res {
Ok(v) => Self::Output(v),
Err(e) => Self::Error(e),
}
}
}
impl From<PrometheusTargetOperationOperationInputWrapper>
for crate::input::PrometheusTargetOperationInput
{
fn from(i: PrometheusTargetOperationOperationInputWrapper) -> Self {
i.0
}
}
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct RestartOperation {
_private: (),
}
impl RestartOperation {
pub fn new() -> Self {
Self { _private: () }
}
}
pub struct RestartOperationOperationInputWrapper(pub crate::input::RestartOperationInput);
#[async_trait::async_trait]
impl<B> axum_core::extract::FromRequest<B> for RestartOperationOperationInputWrapper
where
B: aws_smithy_http_server::HttpBody + Send,
B::Data: Send,
B::Error: Into<aws_smithy_http_server::BoxError>,
aws_smithy_http_server::rejection::SmithyRejection:
From<<B as aws_smithy_http_server::HttpBody>::Error>,
{
type Rejection = aws_smithy_http_server::rejection::SmithyRejection;
async fn from_request(
req: &mut axum_core::extract::RequestParts<B>,
) -> Result<Self, Self::Rejection> {
Ok(RestartOperationOperationInputWrapper(
crate::operation_deser::parse_restart_operation_request(req).await?,
))
}
}
pub enum RestartOperationOperationOutputWrapper {
Output(crate::output::RestartOperationOutput),
Error(crate::error::RestartOperationError),
}
#[async_trait::async_trait]
impl axum_core::response::IntoResponse for RestartOperationOperationOutputWrapper {
fn into_response(self) -> axum_core::response::Response {
let mut response = match self {
Self::Output(o) => {
match crate::operation_ser::serialize_restart_operation_response(&o) {
Ok(response) => response,
Err(e) => e.into_response(),
}
}
Self::Error(err) => {
match crate::operation_ser::serialize_restart_operation_error(&err) {
Ok(mut response) => {
response.extensions_mut().insert(
aws_smithy_http_server::ExtensionModeledError::new(err.name()),
);
response
}
Err(e) => e.into_response(),
}
}
};
response
.extensions_mut()
.insert(aws_smithy_http_server::RequestExtensions::new(
"org.crisidev.docktor",
"RestartOperation",
));
response
}
}
impl From<Result<crate::output::RestartOperationOutput, crate::error::RestartOperationError>>
for RestartOperationOperationOutputWrapper
{
fn from(
res: Result<crate::output::RestartOperationOutput, crate::error::RestartOperationError>,
) -> Self {
match res {
Ok(v) => Self::Output(v),
Err(e) => Self::Error(e),
}
}
}
impl From<RestartOperationOperationInputWrapper> for crate::input::RestartOperationInput {
fn from(i: RestartOperationOperationInputWrapper) -> Self {
i.0
}
}
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct StartOperation {
_private: (),
}
impl StartOperation {
pub fn new() -> Self {
Self { _private: () }
}
}
pub struct StartOperationOperationInputWrapper(pub crate::input::StartOperationInput);
#[async_trait::async_trait]
impl<B> axum_core::extract::FromRequest<B> for StartOperationOperationInputWrapper
where
B: aws_smithy_http_server::HttpBody + Send,
B::Data: Send,
B::Error: Into<aws_smithy_http_server::BoxError>,
aws_smithy_http_server::rejection::SmithyRejection:
From<<B as aws_smithy_http_server::HttpBody>::Error>,
{
type Rejection = aws_smithy_http_server::rejection::SmithyRejection;
async fn from_request(
req: &mut axum_core::extract::RequestParts<B>,
) -> Result<Self, Self::Rejection> {
Ok(StartOperationOperationInputWrapper(
crate::operation_deser::parse_start_operation_request(req).await?,
))
}
}
pub enum StartOperationOperationOutputWrapper {
Output(crate::output::StartOperationOutput),
Error(crate::error::StartOperationError),
}
#[async_trait::async_trait]
impl axum_core::response::IntoResponse for StartOperationOperationOutputWrapper {
fn into_response(self) -> axum_core::response::Response {
let mut response = match self {
Self::Output(o) => match crate::operation_ser::serialize_start_operation_response(&o) {
Ok(response) => response,
Err(e) => e.into_response(),
},
Self::Error(err) => match crate::operation_ser::serialize_start_operation_error(&err) {
Ok(mut response) => {
response.extensions_mut().insert(
aws_smithy_http_server::ExtensionModeledError::new(err.name()),
);
response
}
Err(e) => e.into_response(),
},
};
response
.extensions_mut()
.insert(aws_smithy_http_server::RequestExtensions::new(
"org.crisidev.docktor",
"StartOperation",
));
response
}
}
impl From<Result<crate::output::StartOperationOutput, crate::error::StartOperationError>>
for StartOperationOperationOutputWrapper
{
fn from(
res: Result<crate::output::StartOperationOutput, crate::error::StartOperationError>,
) -> Self {
match res {
Ok(v) => Self::Output(v),
Err(e) => Self::Error(e),
}
}
}
impl From<StartOperationOperationInputWrapper> for crate::input::StartOperationInput {
fn from(i: StartOperationOperationInputWrapper) -> Self {
i.0
}
}
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct StopOperation {
_private: (),
}
impl StopOperation {
pub fn new() -> Self {
Self { _private: () }
}
}
pub struct StopOperationOperationInputWrapper(pub crate::input::StopOperationInput);
#[async_trait::async_trait]
impl<B> axum_core::extract::FromRequest<B> for StopOperationOperationInputWrapper
where
B: aws_smithy_http_server::HttpBody + Send,
B::Data: Send,
B::Error: Into<aws_smithy_http_server::BoxError>,
aws_smithy_http_server::rejection::SmithyRejection:
From<<B as aws_smithy_http_server::HttpBody>::Error>,
{
type Rejection = aws_smithy_http_server::rejection::SmithyRejection;
async fn from_request(
req: &mut axum_core::extract::RequestParts<B>,
) -> Result<Self, Self::Rejection> {
Ok(StopOperationOperationInputWrapper(
crate::operation_deser::parse_stop_operation_request(req).await?,
))
}
}
pub enum StopOperationOperationOutputWrapper {
Output(crate::output::StopOperationOutput),
Error(crate::error::StopOperationError),
}
#[async_trait::async_trait]
impl axum_core::response::IntoResponse for StopOperationOperationOutputWrapper {
fn into_response(self) -> axum_core::response::Response {
let mut response = match self {
Self::Output(o) => match crate::operation_ser::serialize_stop_operation_response(&o) {
Ok(response) => response,
Err(e) => e.into_response(),
},
Self::Error(err) => match crate::operation_ser::serialize_stop_operation_error(&err) {
Ok(mut response) => {
response.extensions_mut().insert(
aws_smithy_http_server::ExtensionModeledError::new(err.name()),
);
response
}
Err(e) => e.into_response(),
},
};
response
.extensions_mut()
.insert(aws_smithy_http_server::RequestExtensions::new(
"org.crisidev.docktor",
"StopOperation",
));
response
}
}
impl From<Result<crate::output::StopOperationOutput, crate::error::StopOperationError>>
for StopOperationOperationOutputWrapper
{
fn from(
res: Result<crate::output::StopOperationOutput, crate::error::StopOperationError>,
) -> Self {
match res {
Ok(v) => Self::Output(v),
Err(e) => Self::Error(e),
}
}
}
impl From<StopOperationOperationInputWrapper> for crate::input::StopOperationInput {
fn from(i: StopOperationOperationInputWrapper) -> Self {
i.0
}
}