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
// 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 GetCalendarStateInput {
/// <p>The names of Amazon Resource Names (ARNs) of the Systems Manager documents (SSM documents) that represent the calendar entries for which you want to get the state.</p>
pub calendar_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>(Optional) The specific time for which you want to get calendar state information, in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you don't specify a value or <code>AtTime</code>, the current time is used.</p>
pub at_time: ::std::option::Option<::std::string::String>,
}
impl GetCalendarStateInput {
/// <p>The names of Amazon Resource Names (ARNs) of the Systems Manager documents (SSM documents) that represent the calendar entries for which you want to get the state.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.calendar_names.is_none()`.
pub fn calendar_names(&self) -> &[::std::string::String] {
self.calendar_names.as_deref().unwrap_or_default()
}
/// <p>(Optional) The specific time for which you want to get calendar state information, in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you don't specify a value or <code>AtTime</code>, the current time is used.</p>
pub fn at_time(&self) -> ::std::option::Option<&str> {
self.at_time.as_deref()
}
}
impl GetCalendarStateInput {
/// Creates a new builder-style object to manufacture [`GetCalendarStateInput`](crate::operation::get_calendar_state::GetCalendarStateInput).
pub fn builder() -> crate::operation::get_calendar_state::builders::GetCalendarStateInputBuilder {
crate::operation::get_calendar_state::builders::GetCalendarStateInputBuilder::default()
}
}
/// A builder for [`GetCalendarStateInput`](crate::operation::get_calendar_state::GetCalendarStateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetCalendarStateInputBuilder {
pub(crate) calendar_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) at_time: ::std::option::Option<::std::string::String>,
}
impl GetCalendarStateInputBuilder {
/// Appends an item to `calendar_names`.
///
/// To override the contents of this collection use [`set_calendar_names`](Self::set_calendar_names).
///
/// <p>The names of Amazon Resource Names (ARNs) of the Systems Manager documents (SSM documents) that represent the calendar entries for which you want to get the state.</p>
pub fn calendar_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.calendar_names.unwrap_or_default();
v.push(input.into());
self.calendar_names = ::std::option::Option::Some(v);
self
}
/// <p>The names of Amazon Resource Names (ARNs) of the Systems Manager documents (SSM documents) that represent the calendar entries for which you want to get the state.</p>
pub fn set_calendar_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.calendar_names = input;
self
}
/// <p>The names of Amazon Resource Names (ARNs) of the Systems Manager documents (SSM documents) that represent the calendar entries for which you want to get the state.</p>
pub fn get_calendar_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.calendar_names
}
/// <p>(Optional) The specific time for which you want to get calendar state information, in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you don't specify a value or <code>AtTime</code>, the current time is used.</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>(Optional) The specific time for which you want to get calendar state information, in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you don't specify a value or <code>AtTime</code>, the current time is used.</p>
pub fn set_at_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.at_time = input;
self
}
/// <p>(Optional) The specific time for which you want to get calendar state information, in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you don't specify a value or <code>AtTime</code>, the current time is used.</p>
pub fn get_at_time(&self) -> &::std::option::Option<::std::string::String> {
&self.at_time
}
/// Consumes the builder and constructs a [`GetCalendarStateInput`](crate::operation::get_calendar_state::GetCalendarStateInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_calendar_state::GetCalendarStateInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_calendar_state::GetCalendarStateInput {
calendar_names: self.calendar_names,
at_time: self.at_time,
})
}
}