aws-sdk-ssm 1.112.0

AWS SDK for Amazon Simple Systems Manager (SSM)
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetCalendarStateOutput {
    /// <p>The state of the calendar. An <code>OPEN</code> calendar indicates that actions are allowed to proceed, and a <code>CLOSED</code> calendar indicates that actions aren't allowed to proceed.</p>
    pub state: ::std::option::Option<crate::types::CalendarState>,
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that you specified in your command. If you don't specify a time, <code>GetCalendarState</code> uses the current time.</p>
    pub at_time: ::std::option::Option<::std::string::String>,
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that the calendar state will change. If the current calendar state is <code>OPEN</code>, <code>NextTransitionTime</code> indicates when the calendar state changes to <code>CLOSED</code>, and vice-versa.</p>
    pub next_transition_time: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetCalendarStateOutput {
    /// <p>The state of the calendar. An <code>OPEN</code> calendar indicates that actions are allowed to proceed, and a <code>CLOSED</code> calendar indicates that actions aren't allowed to proceed.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::CalendarState> {
        self.state.as_ref()
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that you specified in your command. If you don't specify a time, <code>GetCalendarState</code> uses the current time.</p>
    pub fn at_time(&self) -> ::std::option::Option<&str> {
        self.at_time.as_deref()
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that the calendar state will change. If the current calendar state is <code>OPEN</code>, <code>NextTransitionTime</code> indicates when the calendar state changes to <code>CLOSED</code>, and vice-versa.</p>
    pub fn next_transition_time(&self) -> ::std::option::Option<&str> {
        self.next_transition_time.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetCalendarStateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetCalendarStateOutput {
    /// Creates a new builder-style object to manufacture [`GetCalendarStateOutput`](crate::operation::get_calendar_state::GetCalendarStateOutput).
    pub fn builder() -> crate::operation::get_calendar_state::builders::GetCalendarStateOutputBuilder {
        crate::operation::get_calendar_state::builders::GetCalendarStateOutputBuilder::default()
    }
}

/// A builder for [`GetCalendarStateOutput`](crate::operation::get_calendar_state::GetCalendarStateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetCalendarStateOutputBuilder {
    pub(crate) state: ::std::option::Option<crate::types::CalendarState>,
    pub(crate) at_time: ::std::option::Option<::std::string::String>,
    pub(crate) next_transition_time: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetCalendarStateOutputBuilder {
    /// <p>The state of the calendar. An <code>OPEN</code> calendar indicates that actions are allowed to proceed, and a <code>CLOSED</code> calendar indicates that actions aren't allowed to proceed.</p>
    pub fn state(mut self, input: crate::types::CalendarState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the calendar. An <code>OPEN</code> calendar indicates that actions are allowed to proceed, and a <code>CLOSED</code> calendar indicates that actions aren't allowed to proceed.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::CalendarState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the calendar. An <code>OPEN</code> calendar indicates that actions are allowed to proceed, and a <code>CLOSED</code> calendar indicates that actions aren't allowed to proceed.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::CalendarState> {
        &self.state
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that you specified in your command. If you don't specify a time, <code>GetCalendarState</code> uses the current time.</p>
    pub fn at_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.at_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that you specified in your command. If you don't specify a time, <code>GetCalendarState</code> uses the current time.</p>
    pub fn set_at_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.at_time = input;
        self
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that you specified in your command. If you don't specify a time, <code>GetCalendarState</code> uses the current time.</p>
    pub fn get_at_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.at_time
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that the calendar state will change. If the current calendar state is <code>OPEN</code>, <code>NextTransitionTime</code> indicates when the calendar state changes to <code>CLOSED</code>, and vice-versa.</p>
    pub fn next_transition_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_transition_time = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that the calendar state will change. If the current calendar state is <code>OPEN</code>, <code>NextTransitionTime</code> indicates when the calendar state changes to <code>CLOSED</code>, and vice-versa.</p>
    pub fn set_next_transition_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_transition_time = input;
        self
    }
    /// <p>The time, as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string, that the calendar state will change. If the current calendar state is <code>OPEN</code>, <code>NextTransitionTime</code> indicates when the calendar state changes to <code>CLOSED</code>, and vice-versa.</p>
    pub fn get_next_transition_time(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_transition_time
    }
    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 [`GetCalendarStateOutput`](crate::operation::get_calendar_state::GetCalendarStateOutput).
    pub fn build(self) -> crate::operation::get_calendar_state::GetCalendarStateOutput {
        crate::operation::get_calendar_state::GetCalendarStateOutput {
            state: self.state,
            at_time: self.at_time,
            next_transition_time: self.next_transition_time,
            _request_id: self._request_id,
        }
    }
}