aws-sdk-mediaconnect 0.25.0

AWS SDK for AWS MediaConnect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// The maintenance setting of a flow
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Maintenance {
    /// A day of a week when the maintenance will happen. Use Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday.
    #[doc(hidden)]
    pub maintenance_day: std::option::Option<crate::types::MaintenanceDay>,
    /// The Maintenance has to be performed before this deadline in ISO UTC format. Example: 2021-01-30T08:30:00Z.
    #[doc(hidden)]
    pub maintenance_deadline: std::option::Option<std::string::String>,
    /// A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30.
    #[doc(hidden)]
    pub maintenance_scheduled_date: std::option::Option<std::string::String>,
    /// UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00.
    #[doc(hidden)]
    pub maintenance_start_hour: std::option::Option<std::string::String>,
}
impl Maintenance {
    /// A day of a week when the maintenance will happen. Use Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday.
    pub fn maintenance_day(&self) -> std::option::Option<&crate::types::MaintenanceDay> {
        self.maintenance_day.as_ref()
    }
    /// The Maintenance has to be performed before this deadline in ISO UTC format. Example: 2021-01-30T08:30:00Z.
    pub fn maintenance_deadline(&self) -> std::option::Option<&str> {
        self.maintenance_deadline.as_deref()
    }
    /// A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30.
    pub fn maintenance_scheduled_date(&self) -> std::option::Option<&str> {
        self.maintenance_scheduled_date.as_deref()
    }
    /// UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00.
    pub fn maintenance_start_hour(&self) -> std::option::Option<&str> {
        self.maintenance_start_hour.as_deref()
    }
}
impl Maintenance {
    /// Creates a new builder-style object to manufacture [`Maintenance`](crate::types::Maintenance).
    pub fn builder() -> crate::types::builders::MaintenanceBuilder {
        crate::types::builders::MaintenanceBuilder::default()
    }
}

/// A builder for [`Maintenance`](crate::types::Maintenance).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct MaintenanceBuilder {
    pub(crate) maintenance_day: std::option::Option<crate::types::MaintenanceDay>,
    pub(crate) maintenance_deadline: std::option::Option<std::string::String>,
    pub(crate) maintenance_scheduled_date: std::option::Option<std::string::String>,
    pub(crate) maintenance_start_hour: std::option::Option<std::string::String>,
}
impl MaintenanceBuilder {
    /// A day of a week when the maintenance will happen. Use Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday.
    pub fn maintenance_day(mut self, input: crate::types::MaintenanceDay) -> Self {
        self.maintenance_day = Some(input);
        self
    }
    /// A day of a week when the maintenance will happen. Use Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday.
    pub fn set_maintenance_day(
        mut self,
        input: std::option::Option<crate::types::MaintenanceDay>,
    ) -> Self {
        self.maintenance_day = input;
        self
    }
    /// The Maintenance has to be performed before this deadline in ISO UTC format. Example: 2021-01-30T08:30:00Z.
    pub fn maintenance_deadline(mut self, input: impl Into<std::string::String>) -> Self {
        self.maintenance_deadline = Some(input.into());
        self
    }
    /// The Maintenance has to be performed before this deadline in ISO UTC format. Example: 2021-01-30T08:30:00Z.
    pub fn set_maintenance_deadline(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.maintenance_deadline = input;
        self
    }
    /// A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30.
    pub fn maintenance_scheduled_date(mut self, input: impl Into<std::string::String>) -> Self {
        self.maintenance_scheduled_date = Some(input.into());
        self
    }
    /// A scheduled date in ISO UTC format when the maintenance will happen. Use YYYY-MM-DD format. Example: 2021-01-30.
    pub fn set_maintenance_scheduled_date(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.maintenance_scheduled_date = input;
        self
    }
    /// UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00.
    pub fn maintenance_start_hour(mut self, input: impl Into<std::string::String>) -> Self {
        self.maintenance_start_hour = Some(input.into());
        self
    }
    /// UTC time when the maintenance will happen. Use 24-hour HH:MM format. Minutes must be 00. Example: 13:00. The default value is 02:00.
    pub fn set_maintenance_start_hour(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.maintenance_start_hour = input;
        self
    }
    /// Consumes the builder and constructs a [`Maintenance`](crate::types::Maintenance).
    pub fn build(self) -> crate::types::Maintenance {
        crate::types::Maintenance {
            maintenance_day: self.maintenance_day,
            maintenance_deadline: self.maintenance_deadline,
            maintenance_scheduled_date: self.maintenance_scheduled_date,
            maintenance_start_hour: self.maintenance_start_hour,
        }
    }
}