aws-sdk-redshift 1.106.0

AWS SDK for Amazon Redshift
Documentation
// 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 ModifyClusterMaintenanceInput {
    /// <p>A unique identifier for the cluster.</p>
    pub cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>A boolean indicating whether to enable the deferred maintenance window.</p>
    pub defer_maintenance: ::std::option::Option<bool>,
    /// <p>A unique identifier for the deferred maintenance window.</p>
    pub defer_maintenance_identifier: ::std::option::Option<::std::string::String>,
    /// <p>A timestamp indicating the start time for the deferred maintenance window.</p>
    pub defer_maintenance_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.</p>
    pub defer_maintenance_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 60 days or less.</p>
    pub defer_maintenance_duration: ::std::option::Option<i32>,
}
impl ModifyClusterMaintenanceInput {
    /// <p>A unique identifier for the cluster.</p>
    pub fn cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.cluster_identifier.as_deref()
    }
    /// <p>A boolean indicating whether to enable the deferred maintenance window.</p>
    pub fn defer_maintenance(&self) -> ::std::option::Option<bool> {
        self.defer_maintenance
    }
    /// <p>A unique identifier for the deferred maintenance window.</p>
    pub fn defer_maintenance_identifier(&self) -> ::std::option::Option<&str> {
        self.defer_maintenance_identifier.as_deref()
    }
    /// <p>A timestamp indicating the start time for the deferred maintenance window.</p>
    pub fn defer_maintenance_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.defer_maintenance_start_time.as_ref()
    }
    /// <p>A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.</p>
    pub fn defer_maintenance_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.defer_maintenance_end_time.as_ref()
    }
    /// <p>An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 60 days or less.</p>
    pub fn defer_maintenance_duration(&self) -> ::std::option::Option<i32> {
        self.defer_maintenance_duration
    }
}
impl ModifyClusterMaintenanceInput {
    /// Creates a new builder-style object to manufacture [`ModifyClusterMaintenanceInput`](crate::operation::modify_cluster_maintenance::ModifyClusterMaintenanceInput).
    pub fn builder() -> crate::operation::modify_cluster_maintenance::builders::ModifyClusterMaintenanceInputBuilder {
        crate::operation::modify_cluster_maintenance::builders::ModifyClusterMaintenanceInputBuilder::default()
    }
}

/// A builder for [`ModifyClusterMaintenanceInput`](crate::operation::modify_cluster_maintenance::ModifyClusterMaintenanceInput).
#[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 {
    /// <p>A unique identifier for the cluster.</p>
    /// This field is required.
    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
    }
    /// <p>A unique identifier for the cluster.</p>
    pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_identifier = input;
        self
    }
    /// <p>A unique identifier for the cluster.</p>
    pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_identifier
    }
    /// <p>A boolean indicating whether to enable the deferred maintenance window.</p>
    pub fn defer_maintenance(mut self, input: bool) -> Self {
        self.defer_maintenance = ::std::option::Option::Some(input);
        self
    }
    /// <p>A boolean indicating whether to enable the deferred maintenance window.</p>
    pub fn set_defer_maintenance(mut self, input: ::std::option::Option<bool>) -> Self {
        self.defer_maintenance = input;
        self
    }
    /// <p>A boolean indicating whether to enable the deferred maintenance window.</p>
    pub fn get_defer_maintenance(&self) -> &::std::option::Option<bool> {
        &self.defer_maintenance
    }
    /// <p>A unique identifier for the deferred maintenance window.</p>
    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
    }
    /// <p>A unique identifier for the deferred maintenance window.</p>
    pub fn set_defer_maintenance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.defer_maintenance_identifier = input;
        self
    }
    /// <p>A unique identifier for the deferred maintenance window.</p>
    pub fn get_defer_maintenance_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.defer_maintenance_identifier
    }
    /// <p>A timestamp indicating the start time for the deferred maintenance window.</p>
    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
    }
    /// <p>A timestamp indicating the start time for the deferred maintenance window.</p>
    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
    }
    /// <p>A timestamp indicating the start time for the deferred maintenance window.</p>
    pub fn get_defer_maintenance_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.defer_maintenance_start_time
    }
    /// <p>A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.</p>
    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
    }
    /// <p>A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.</p>
    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
    }
    /// <p>A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.</p>
    pub fn get_defer_maintenance_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.defer_maintenance_end_time
    }
    /// <p>An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 60 days or less.</p>
    pub fn defer_maintenance_duration(mut self, input: i32) -> Self {
        self.defer_maintenance_duration = ::std::option::Option::Some(input);
        self
    }
    /// <p>An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 60 days or less.</p>
    pub fn set_defer_maintenance_duration(mut self, input: ::std::option::Option<i32>) -> Self {
        self.defer_maintenance_duration = input;
        self
    }
    /// <p>An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 60 days or less.</p>
    pub fn get_defer_maintenance_duration(&self) -> &::std::option::Option<i32> {
        &self.defer_maintenance_duration
    }
    /// Consumes the builder and constructs a [`ModifyClusterMaintenanceInput`](crate::operation::modify_cluster_maintenance::ModifyClusterMaintenanceInput).
    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,
        })
    }
}