aws-sdk-medialive 1.78.0

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

/// List of actions to create and list of actions to delete.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchUpdateScheduleInput {
    /// Id of the channel whose schedule is being updated.
    pub channel_id: ::std::option::Option<::std::string::String>,
    /// Schedule actions to create in the schedule.
    pub creates: ::std::option::Option<crate::types::BatchScheduleActionCreateRequest>,
    /// Schedule actions to delete from the schedule.
    pub deletes: ::std::option::Option<crate::types::BatchScheduleActionDeleteRequest>,
}
impl BatchUpdateScheduleInput {
    /// Id of the channel whose schedule is being updated.
    pub fn channel_id(&self) -> ::std::option::Option<&str> {
        self.channel_id.as_deref()
    }
    /// Schedule actions to create in the schedule.
    pub fn creates(&self) -> ::std::option::Option<&crate::types::BatchScheduleActionCreateRequest> {
        self.creates.as_ref()
    }
    /// Schedule actions to delete from the schedule.
    pub fn deletes(&self) -> ::std::option::Option<&crate::types::BatchScheduleActionDeleteRequest> {
        self.deletes.as_ref()
    }
}
impl BatchUpdateScheduleInput {
    /// Creates a new builder-style object to manufacture [`BatchUpdateScheduleInput`](crate::operation::batch_update_schedule::BatchUpdateScheduleInput).
    pub fn builder() -> crate::operation::batch_update_schedule::builders::BatchUpdateScheduleInputBuilder {
        crate::operation::batch_update_schedule::builders::BatchUpdateScheduleInputBuilder::default()
    }
}

/// A builder for [`BatchUpdateScheduleInput`](crate::operation::batch_update_schedule::BatchUpdateScheduleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchUpdateScheduleInputBuilder {
    pub(crate) channel_id: ::std::option::Option<::std::string::String>,
    pub(crate) creates: ::std::option::Option<crate::types::BatchScheduleActionCreateRequest>,
    pub(crate) deletes: ::std::option::Option<crate::types::BatchScheduleActionDeleteRequest>,
}
impl BatchUpdateScheduleInputBuilder {
    /// Id of the channel whose schedule is being updated.
    /// This field is required.
    pub fn channel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Id of the channel whose schedule is being updated.
    pub fn set_channel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.channel_id = input;
        self
    }
    /// Id of the channel whose schedule is being updated.
    pub fn get_channel_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_id
    }
    /// Schedule actions to create in the schedule.
    pub fn creates(mut self, input: crate::types::BatchScheduleActionCreateRequest) -> Self {
        self.creates = ::std::option::Option::Some(input);
        self
    }
    /// Schedule actions to create in the schedule.
    pub fn set_creates(mut self, input: ::std::option::Option<crate::types::BatchScheduleActionCreateRequest>) -> Self {
        self.creates = input;
        self
    }
    /// Schedule actions to create in the schedule.
    pub fn get_creates(&self) -> &::std::option::Option<crate::types::BatchScheduleActionCreateRequest> {
        &self.creates
    }
    /// Schedule actions to delete from the schedule.
    pub fn deletes(mut self, input: crate::types::BatchScheduleActionDeleteRequest) -> Self {
        self.deletes = ::std::option::Option::Some(input);
        self
    }
    /// Schedule actions to delete from the schedule.
    pub fn set_deletes(mut self, input: ::std::option::Option<crate::types::BatchScheduleActionDeleteRequest>) -> Self {
        self.deletes = input;
        self
    }
    /// Schedule actions to delete from the schedule.
    pub fn get_deletes(&self) -> &::std::option::Option<crate::types::BatchScheduleActionDeleteRequest> {
        &self.deletes
    }
    /// Consumes the builder and constructs a [`BatchUpdateScheduleInput`](crate::operation::batch_update_schedule::BatchUpdateScheduleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_update_schedule::BatchUpdateScheduleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::batch_update_schedule::BatchUpdateScheduleInput {
            channel_id: self.channel_id,
            creates: self.creates,
            deletes: self.deletes,
        })
    }
}