#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyClusterMaintenanceInput {
pub cluster_identifier: ::std::option::Option<::std::string::String>,
pub defer_maintenance: ::std::option::Option<bool>,
pub defer_maintenance_identifier: ::std::option::Option<::std::string::String>,
pub defer_maintenance_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub defer_maintenance_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub defer_maintenance_duration: ::std::option::Option<i32>,
}
impl ModifyClusterMaintenanceInput {
pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
self.cluster_identifier.as_deref()
}
pub fn defer_maintenance(&self) -> ::std::option::Option<bool> {
self.defer_maintenance
}
pub fn defer_maintenance_identifier(&self) -> ::std::option::Option<&str> {
self.defer_maintenance_identifier.as_deref()
}
pub fn defer_maintenance_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.defer_maintenance_start_time.as_ref()
}
pub fn defer_maintenance_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.defer_maintenance_end_time.as_ref()
}
pub fn defer_maintenance_duration(&self) -> ::std::option::Option<i32> {
self.defer_maintenance_duration
}
}
impl ModifyClusterMaintenanceInput {
pub fn builder() -> crate::operation::modify_cluster_maintenance::builders::ModifyClusterMaintenanceInputBuilder {
crate::operation::modify_cluster_maintenance::builders::ModifyClusterMaintenanceInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyClusterMaintenanceInputBuilder {
pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) defer_maintenance: ::std::option::Option<bool>,
pub(crate) defer_maintenance_identifier: ::std::option::Option<::std::string::String>,
pub(crate) defer_maintenance_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) defer_maintenance_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) defer_maintenance_duration: ::std::option::Option<i32>,
}
impl ModifyClusterMaintenanceInputBuilder {
pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_identifier = input;
self
}
pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_identifier
}
pub fn defer_maintenance(mut self, input: bool) -> Self {
self.defer_maintenance = ::std::option::Option::Some(input);
self
}
pub fn set_defer_maintenance(mut self, input: ::std::option::Option<bool>) -> Self {
self.defer_maintenance = input;
self
}
pub fn get_defer_maintenance(&self) -> &::std::option::Option<bool> {
&self.defer_maintenance
}
pub fn defer_maintenance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.defer_maintenance_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_defer_maintenance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.defer_maintenance_identifier = input;
self
}
pub fn get_defer_maintenance_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.defer_maintenance_identifier
}
pub fn defer_maintenance_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.defer_maintenance_start_time = ::std::option::Option::Some(input);
self
}
pub fn set_defer_maintenance_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.defer_maintenance_start_time = input;
self
}
pub fn get_defer_maintenance_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.defer_maintenance_start_time
}
pub fn defer_maintenance_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.defer_maintenance_end_time = ::std::option::Option::Some(input);
self
}
pub fn set_defer_maintenance_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.defer_maintenance_end_time = input;
self
}
pub fn get_defer_maintenance_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.defer_maintenance_end_time
}
pub fn defer_maintenance_duration(mut self, input: i32) -> Self {
self.defer_maintenance_duration = ::std::option::Option::Some(input);
self
}
pub fn set_defer_maintenance_duration(mut self, input: ::std::option::Option<i32>) -> Self {
self.defer_maintenance_duration = input;
self
}
pub fn get_defer_maintenance_duration(&self) -> &::std::option::Option<i32> {
&self.defer_maintenance_duration
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::modify_cluster_maintenance::ModifyClusterMaintenanceInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::modify_cluster_maintenance::ModifyClusterMaintenanceInput {
cluster_identifier: self.cluster_identifier,
defer_maintenance: self.defer_maintenance,
defer_maintenance_identifier: self.defer_maintenance_identifier,
defer_maintenance_start_time: self.defer_maintenance_start_time,
defer_maintenance_end_time: self.defer_maintenance_end_time,
defer_maintenance_duration: self.defer_maintenance_duration,
})
}
}