1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// 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,
}
}
}