aws-sdk-medialive 1.76.0

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

/// Placeholder documentation for DescribeScheduleResponse
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeScheduleOutput {
    /// The next token; for use in pagination.
    pub next_token: ::std::option::Option<::std::string::String>,
    /// The list of actions in the schedule.
    pub schedule_actions: ::std::option::Option<::std::vec::Vec<crate::types::ScheduleAction>>,
    _request_id: Option<String>,
}
impl DescribeScheduleOutput {
    /// The next token; for use in pagination.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// The list of actions in the schedule.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.schedule_actions.is_none()`.
    pub fn schedule_actions(&self) -> &[crate::types::ScheduleAction] {
        self.schedule_actions.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for DescribeScheduleOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeScheduleOutput {
    /// Creates a new builder-style object to manufacture [`DescribeScheduleOutput`](crate::operation::describe_schedule::DescribeScheduleOutput).
    pub fn builder() -> crate::operation::describe_schedule::builders::DescribeScheduleOutputBuilder {
        crate::operation::describe_schedule::builders::DescribeScheduleOutputBuilder::default()
    }
}

/// A builder for [`DescribeScheduleOutput`](crate::operation::describe_schedule::DescribeScheduleOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeScheduleOutputBuilder {
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) schedule_actions: ::std::option::Option<::std::vec::Vec<crate::types::ScheduleAction>>,
    _request_id: Option<String>,
}
impl DescribeScheduleOutputBuilder {
    /// The next token; for use in pagination.
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// The next token; for use in pagination.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// The next token; for use in pagination.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Appends an item to `schedule_actions`.
    ///
    /// To override the contents of this collection use [`set_schedule_actions`](Self::set_schedule_actions).
    ///
    /// The list of actions in the schedule.
    pub fn schedule_actions(mut self, input: crate::types::ScheduleAction) -> Self {
        let mut v = self.schedule_actions.unwrap_or_default();
        v.push(input);
        self.schedule_actions = ::std::option::Option::Some(v);
        self
    }
    /// The list of actions in the schedule.
    pub fn set_schedule_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ScheduleAction>>) -> Self {
        self.schedule_actions = input;
        self
    }
    /// The list of actions in the schedule.
    pub fn get_schedule_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ScheduleAction>> {
        &self.schedule_actions
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeScheduleOutput`](crate::operation::describe_schedule::DescribeScheduleOutput).
    pub fn build(self) -> crate::operation::describe_schedule::DescribeScheduleOutput {
        crate::operation::describe_schedule::DescribeScheduleOutput {
            next_token: self.next_token,
            schedule_actions: self.schedule_actions,
            _request_id: self._request_id,
        }
    }
}