#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSnapshotScheduleOutput {
pub schedule_definitions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub schedule_identifier: ::std::option::Option<::std::string::String>,
pub schedule_description: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub next_invocations: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>,
pub associated_cluster_count: ::std::option::Option<i32>,
pub associated_clusters: ::std::option::Option<::std::vec::Vec<crate::types::ClusterAssociatedToSchedule>>,
_request_id: Option<String>,
}
impl CreateSnapshotScheduleOutput {
pub fn schedule_definitions(&self) -> &[::std::string::String] {
self.schedule_definitions.as_deref().unwrap_or_default()
}
pub fn schedule_identifier(&self) -> ::std::option::Option<&str> {
self.schedule_identifier.as_deref()
}
pub fn schedule_description(&self) -> ::std::option::Option<&str> {
self.schedule_description.as_deref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn next_invocations(&self) -> &[::aws_smithy_types::DateTime] {
self.next_invocations.as_deref().unwrap_or_default()
}
pub fn associated_cluster_count(&self) -> ::std::option::Option<i32> {
self.associated_cluster_count
}
pub fn associated_clusters(&self) -> &[crate::types::ClusterAssociatedToSchedule] {
self.associated_clusters.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for CreateSnapshotScheduleOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateSnapshotScheduleOutput {
pub fn builder() -> crate::operation::create_snapshot_schedule::builders::CreateSnapshotScheduleOutputBuilder {
crate::operation::create_snapshot_schedule::builders::CreateSnapshotScheduleOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSnapshotScheduleOutputBuilder {
pub(crate) schedule_definitions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) schedule_identifier: ::std::option::Option<::std::string::String>,
pub(crate) schedule_description: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) next_invocations: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>,
pub(crate) associated_cluster_count: ::std::option::Option<i32>,
pub(crate) associated_clusters: ::std::option::Option<::std::vec::Vec<crate::types::ClusterAssociatedToSchedule>>,
_request_id: Option<String>,
}
impl CreateSnapshotScheduleOutputBuilder {
pub fn schedule_definitions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.schedule_definitions.unwrap_or_default();
v.push(input.into());
self.schedule_definitions = ::std::option::Option::Some(v);
self
}
pub fn set_schedule_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.schedule_definitions = input;
self
}
pub fn get_schedule_definitions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.schedule_definitions
}
pub fn schedule_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.schedule_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_schedule_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.schedule_identifier = input;
self
}
pub fn get_schedule_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.schedule_identifier
}
pub fn schedule_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.schedule_description = ::std::option::Option::Some(input.into());
self
}
pub fn set_schedule_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.schedule_description = input;
self
}
pub fn get_schedule_description(&self) -> &::std::option::Option<::std::string::String> {
&self.schedule_description
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn next_invocations(mut self, input: ::aws_smithy_types::DateTime) -> Self {
let mut v = self.next_invocations.unwrap_or_default();
v.push(input);
self.next_invocations = ::std::option::Option::Some(v);
self
}
pub fn set_next_invocations(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>>) -> Self {
self.next_invocations = input;
self
}
pub fn get_next_invocations(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::DateTime>> {
&self.next_invocations
}
pub fn associated_cluster_count(mut self, input: i32) -> Self {
self.associated_cluster_count = ::std::option::Option::Some(input);
self
}
pub fn set_associated_cluster_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.associated_cluster_count = input;
self
}
pub fn get_associated_cluster_count(&self) -> &::std::option::Option<i32> {
&self.associated_cluster_count
}
pub fn associated_clusters(mut self, input: crate::types::ClusterAssociatedToSchedule) -> Self {
let mut v = self.associated_clusters.unwrap_or_default();
v.push(input);
self.associated_clusters = ::std::option::Option::Some(v);
self
}
pub fn set_associated_clusters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterAssociatedToSchedule>>) -> Self {
self.associated_clusters = input;
self
}
pub fn get_associated_clusters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterAssociatedToSchedule>> {
&self.associated_clusters
}
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
}
pub fn build(self) -> crate::operation::create_snapshot_schedule::CreateSnapshotScheduleOutput {
crate::operation::create_snapshot_schedule::CreateSnapshotScheduleOutput {
schedule_definitions: self.schedule_definitions,
schedule_identifier: self.schedule_identifier,
schedule_description: self.schedule_description,
tags: self.tags,
next_invocations: self.next_invocations,
associated_cluster_count: self.associated_cluster_count,
associated_clusters: self.associated_clusters,
_request_id: self._request_id,
}
}
}