#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSnapshotScheduleInput {
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 dry_run: ::std::option::Option<bool>,
pub next_invocations: ::std::option::Option<i32>,
}
impl CreateSnapshotScheduleInput {
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 dry_run(&self) -> ::std::option::Option<bool> {
self.dry_run
}
pub fn next_invocations(&self) -> ::std::option::Option<i32> {
self.next_invocations
}
}
impl CreateSnapshotScheduleInput {
pub fn builder() -> crate::operation::create_snapshot_schedule::builders::CreateSnapshotScheduleInputBuilder {
crate::operation::create_snapshot_schedule::builders::CreateSnapshotScheduleInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSnapshotScheduleInputBuilder {
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) dry_run: ::std::option::Option<bool>,
pub(crate) next_invocations: ::std::option::Option<i32>,
}
impl CreateSnapshotScheduleInputBuilder {
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 dry_run(mut self, input: bool) -> Self {
self.dry_run = ::std::option::Option::Some(input);
self
}
pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
self.dry_run = input;
self
}
pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
&self.dry_run
}
pub fn next_invocations(mut self, input: i32) -> Self {
self.next_invocations = ::std::option::Option::Some(input);
self
}
pub fn set_next_invocations(mut self, input: ::std::option::Option<i32>) -> Self {
self.next_invocations = input;
self
}
pub fn get_next_invocations(&self) -> &::std::option::Option<i32> {
&self.next_invocations
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_snapshot_schedule::CreateSnapshotScheduleInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_snapshot_schedule::CreateSnapshotScheduleInput {
schedule_definitions: self.schedule_definitions,
schedule_identifier: self.schedule_identifier,
schedule_description: self.schedule_description,
tags: self.tags,
dry_run: self.dry_run,
next_invocations: self.next_invocations,
})
}
}