aws-sdk-scheduler 0.2.0

AWS SDK for Amazon EventBridge Scheduler
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Operation shape for `CreateSchedule`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`create_schedule`](crate::client::Client::create_schedule).
///
/// See [`crate::client::fluent_builders::CreateSchedule`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct CreateSchedule {
    _private: (),
}
impl CreateSchedule {
    /// Creates a new builder-style object to manufacture [`CreateScheduleInput`](crate::input::CreateScheduleInput).
    pub fn builder() -> crate::input::create_schedule_input::Builder {
        crate::input::create_schedule_input::Builder::default()
    }
    /// Creates a new `CreateSchedule` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for CreateSchedule {
    type Output =
        std::result::Result<crate::output::CreateScheduleOutput, crate::error::CreateScheduleError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_create_schedule_error(response)
        } else {
            crate::operation_deser::parse_create_schedule_response(response)
        }
    }
}

/// Operation shape for `CreateScheduleGroup`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`create_schedule_group`](crate::client::Client::create_schedule_group).
///
/// See [`crate::client::fluent_builders::CreateScheduleGroup`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct CreateScheduleGroup {
    _private: (),
}
impl CreateScheduleGroup {
    /// Creates a new builder-style object to manufacture [`CreateScheduleGroupInput`](crate::input::CreateScheduleGroupInput).
    pub fn builder() -> crate::input::create_schedule_group_input::Builder {
        crate::input::create_schedule_group_input::Builder::default()
    }
    /// Creates a new `CreateScheduleGroup` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for CreateScheduleGroup {
    type Output = std::result::Result<
        crate::output::CreateScheduleGroupOutput,
        crate::error::CreateScheduleGroupError,
    >;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_create_schedule_group_error(response)
        } else {
            crate::operation_deser::parse_create_schedule_group_response(response)
        }
    }
}

/// Operation shape for `DeleteSchedule`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`delete_schedule`](crate::client::Client::delete_schedule).
///
/// See [`crate::client::fluent_builders::DeleteSchedule`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct DeleteSchedule {
    _private: (),
}
impl DeleteSchedule {
    /// Creates a new builder-style object to manufacture [`DeleteScheduleInput`](crate::input::DeleteScheduleInput).
    pub fn builder() -> crate::input::delete_schedule_input::Builder {
        crate::input::delete_schedule_input::Builder::default()
    }
    /// Creates a new `DeleteSchedule` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for DeleteSchedule {
    type Output =
        std::result::Result<crate::output::DeleteScheduleOutput, crate::error::DeleteScheduleError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_delete_schedule_error(response)
        } else {
            crate::operation_deser::parse_delete_schedule_response(response)
        }
    }
}

/// Operation shape for `DeleteScheduleGroup`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`delete_schedule_group`](crate::client::Client::delete_schedule_group).
///
/// See [`crate::client::fluent_builders::DeleteScheduleGroup`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct DeleteScheduleGroup {
    _private: (),
}
impl DeleteScheduleGroup {
    /// Creates a new builder-style object to manufacture [`DeleteScheduleGroupInput`](crate::input::DeleteScheduleGroupInput).
    pub fn builder() -> crate::input::delete_schedule_group_input::Builder {
        crate::input::delete_schedule_group_input::Builder::default()
    }
    /// Creates a new `DeleteScheduleGroup` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for DeleteScheduleGroup {
    type Output = std::result::Result<
        crate::output::DeleteScheduleGroupOutput,
        crate::error::DeleteScheduleGroupError,
    >;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_delete_schedule_group_error(response)
        } else {
            crate::operation_deser::parse_delete_schedule_group_response(response)
        }
    }
}

/// Operation shape for `GetSchedule`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get_schedule`](crate::client::Client::get_schedule).
///
/// See [`crate::client::fluent_builders::GetSchedule`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct GetSchedule {
    _private: (),
}
impl GetSchedule {
    /// Creates a new builder-style object to manufacture [`GetScheduleInput`](crate::input::GetScheduleInput).
    pub fn builder() -> crate::input::get_schedule_input::Builder {
        crate::input::get_schedule_input::Builder::default()
    }
    /// Creates a new `GetSchedule` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for GetSchedule {
    type Output =
        std::result::Result<crate::output::GetScheduleOutput, crate::error::GetScheduleError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_get_schedule_error(response)
        } else {
            crate::operation_deser::parse_get_schedule_response(response)
        }
    }
}

/// Operation shape for `GetScheduleGroup`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get_schedule_group`](crate::client::Client::get_schedule_group).
///
/// See [`crate::client::fluent_builders::GetScheduleGroup`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct GetScheduleGroup {
    _private: (),
}
impl GetScheduleGroup {
    /// Creates a new builder-style object to manufacture [`GetScheduleGroupInput`](crate::input::GetScheduleGroupInput).
    pub fn builder() -> crate::input::get_schedule_group_input::Builder {
        crate::input::get_schedule_group_input::Builder::default()
    }
    /// Creates a new `GetScheduleGroup` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for GetScheduleGroup {
    type Output = std::result::Result<
        crate::output::GetScheduleGroupOutput,
        crate::error::GetScheduleGroupError,
    >;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_get_schedule_group_error(response)
        } else {
            crate::operation_deser::parse_get_schedule_group_response(response)
        }
    }
}

/// Operation shape for `ListScheduleGroups`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`list_schedule_groups`](crate::client::Client::list_schedule_groups).
///
/// See [`crate::client::fluent_builders::ListScheduleGroups`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct ListScheduleGroups {
    _private: (),
}
impl ListScheduleGroups {
    /// Creates a new builder-style object to manufacture [`ListScheduleGroupsInput`](crate::input::ListScheduleGroupsInput).
    pub fn builder() -> crate::input::list_schedule_groups_input::Builder {
        crate::input::list_schedule_groups_input::Builder::default()
    }
    /// Creates a new `ListScheduleGroups` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for ListScheduleGroups {
    type Output = std::result::Result<
        crate::output::ListScheduleGroupsOutput,
        crate::error::ListScheduleGroupsError,
    >;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_list_schedule_groups_error(response)
        } else {
            crate::operation_deser::parse_list_schedule_groups_response(response)
        }
    }
}

/// Operation shape for `ListSchedules`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`list_schedules`](crate::client::Client::list_schedules).
///
/// See [`crate::client::fluent_builders::ListSchedules`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct ListSchedules {
    _private: (),
}
impl ListSchedules {
    /// Creates a new builder-style object to manufacture [`ListSchedulesInput`](crate::input::ListSchedulesInput).
    pub fn builder() -> crate::input::list_schedules_input::Builder {
        crate::input::list_schedules_input::Builder::default()
    }
    /// Creates a new `ListSchedules` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for ListSchedules {
    type Output =
        std::result::Result<crate::output::ListSchedulesOutput, crate::error::ListSchedulesError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_list_schedules_error(response)
        } else {
            crate::operation_deser::parse_list_schedules_response(response)
        }
    }
}

/// Operation shape for `ListTagsForResource`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`list_tags_for_resource`](crate::client::Client::list_tags_for_resource).
///
/// See [`crate::client::fluent_builders::ListTagsForResource`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct ListTagsForResource {
    _private: (),
}
impl ListTagsForResource {
    /// Creates a new builder-style object to manufacture [`ListTagsForResourceInput`](crate::input::ListTagsForResourceInput).
    pub fn builder() -> crate::input::list_tags_for_resource_input::Builder {
        crate::input::list_tags_for_resource_input::Builder::default()
    }
    /// Creates a new `ListTagsForResource` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for ListTagsForResource {
    type Output = std::result::Result<
        crate::output::ListTagsForResourceOutput,
        crate::error::ListTagsForResourceError,
    >;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_list_tags_for_resource_error(response)
        } else {
            crate::operation_deser::parse_list_tags_for_resource_response(response)
        }
    }
}

/// Operation shape for `TagResource`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`tag_resource`](crate::client::Client::tag_resource).
///
/// See [`crate::client::fluent_builders::TagResource`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct TagResource {
    _private: (),
}
impl TagResource {
    /// Creates a new builder-style object to manufacture [`TagResourceInput`](crate::input::TagResourceInput).
    pub fn builder() -> crate::input::tag_resource_input::Builder {
        crate::input::tag_resource_input::Builder::default()
    }
    /// Creates a new `TagResource` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for TagResource {
    type Output =
        std::result::Result<crate::output::TagResourceOutput, crate::error::TagResourceError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_tag_resource_error(response)
        } else {
            crate::operation_deser::parse_tag_resource_response(response)
        }
    }
}

/// Operation shape for `UntagResource`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`untag_resource`](crate::client::Client::untag_resource).
///
/// See [`crate::client::fluent_builders::UntagResource`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct UntagResource {
    _private: (),
}
impl UntagResource {
    /// Creates a new builder-style object to manufacture [`UntagResourceInput`](crate::input::UntagResourceInput).
    pub fn builder() -> crate::input::untag_resource_input::Builder {
        crate::input::untag_resource_input::Builder::default()
    }
    /// Creates a new `UntagResource` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for UntagResource {
    type Output =
        std::result::Result<crate::output::UntagResourceOutput, crate::error::UntagResourceError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_untag_resource_error(response)
        } else {
            crate::operation_deser::parse_untag_resource_response(response)
        }
    }
}

/// Operation shape for `UpdateSchedule`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`update_schedule`](crate::client::Client::update_schedule).
///
/// See [`crate::client::fluent_builders::UpdateSchedule`] for more details about the operation.
#[derive(std::clone::Clone, std::default::Default, std::fmt::Debug)]
pub struct UpdateSchedule {
    _private: (),
}
impl UpdateSchedule {
    /// Creates a new builder-style object to manufacture [`UpdateScheduleInput`](crate::input::UpdateScheduleInput).
    pub fn builder() -> crate::input::update_schedule_input::Builder {
        crate::input::update_schedule_input::Builder::default()
    }
    /// Creates a new `UpdateSchedule` operation.
    pub fn new() -> Self {
        Self { _private: () }
    }
}
impl aws_smithy_http::response::ParseStrictResponse for UpdateSchedule {
    type Output =
        std::result::Result<crate::output::UpdateScheduleOutput, crate::error::UpdateScheduleError>;
    fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
        if !response.status().is_success() && response.status().as_u16() != 200 {
            crate::operation_deser::parse_update_schedule_error(response)
        } else {
            crate::operation_deser::parse_update_schedule_response(response)
        }
    }
}

/// Operation customization and supporting types
pub mod customize;