// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_maintenance_start_time::_update_maintenance_start_time_input::UpdateMaintenanceStartTimeInputBuilder;
pub use crate::operation::update_maintenance_start_time::_update_maintenance_start_time_output::UpdateMaintenanceStartTimeOutputBuilder;
impl crate::operation::update_maintenance_start_time::builders::UpdateMaintenanceStartTimeInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.update_maintenance_start_time();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `UpdateMaintenanceStartTime`.
///
/// <p>Updates a gateway's maintenance window schedule, with settings for monthly or weekly cadence, specific day and time to begin maintenance, and which types of updates to apply. Time configuration uses the gateway's time zone. You can pass values for a complete maintenance schedule, or update policy, or both. Previous values will persist for whichever setting you choose not to modify. If an incomplete or invalid maintenance schedule is passed, the entire request will be rejected with an error and no changes will occur.</p>
/// <p>A complete maintenance schedule must include values for <i>both</i> <code>MinuteOfHour</code> and <code>HourOfDay</code>, and <i>either</i> <code>DayOfMonth</code> <i>or</i> <code>DayOfWeek</code>.</p><note>
/// <p>We recommend keeping maintenance updates turned on, except in specific use cases where the brief disruptions caused by updating the gateway could critically impact your deployment.</p>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateMaintenanceStartTimeFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::update_maintenance_start_time::builders::UpdateMaintenanceStartTimeInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeOutput,
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeError,
> for UpdateMaintenanceStartTimeFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeOutput,
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl UpdateMaintenanceStartTimeFluentBuilder {
/// Creates a new `UpdateMaintenanceStartTimeFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the UpdateMaintenanceStartTime as a reference.
pub fn as_input(&self) -> &crate::operation::update_maintenance_start_time::builders::UpdateMaintenanceStartTimeInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTime::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTime::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeOutput,
crate::operation::update_maintenance_start_time::UpdateMaintenanceStartTimeError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub fn gateway_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.gateway_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub fn set_gateway_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_gateway_arn(input);
self
}
/// <p>The Amazon Resource Name (ARN) of the gateway. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
pub fn get_gateway_arn(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_gateway_arn()
}
/// <p>The hour component of the maintenance start time represented as <i>hh</i>, where <i>hh</i> is the hour (00 to 23). The hour of the day is in the time zone of the gateway.</p>
pub fn hour_of_day(mut self, input: i32) -> Self {
self.inner = self.inner.hour_of_day(input);
self
}
/// <p>The hour component of the maintenance start time represented as <i>hh</i>, where <i>hh</i> is the hour (00 to 23). The hour of the day is in the time zone of the gateway.</p>
pub fn set_hour_of_day(mut self, input: ::std::option::Option<i32>) -> Self {
self.inner = self.inner.set_hour_of_day(input);
self
}
/// <p>The hour component of the maintenance start time represented as <i>hh</i>, where <i>hh</i> is the hour (00 to 23). The hour of the day is in the time zone of the gateway.</p>
pub fn get_hour_of_day(&self) -> &::std::option::Option<i32> {
self.inner.get_hour_of_day()
}
/// <p>The minute component of the maintenance start time represented as <i>mm</i>, where <i>mm</i> is the minute (00 to 59). The minute of the hour is in the time zone of the gateway.</p>
pub fn minute_of_hour(mut self, input: i32) -> Self {
self.inner = self.inner.minute_of_hour(input);
self
}
/// <p>The minute component of the maintenance start time represented as <i>mm</i>, where <i>mm</i> is the minute (00 to 59). The minute of the hour is in the time zone of the gateway.</p>
pub fn set_minute_of_hour(mut self, input: ::std::option::Option<i32>) -> Self {
self.inner = self.inner.set_minute_of_hour(input);
self
}
/// <p>The minute component of the maintenance start time represented as <i>mm</i>, where <i>mm</i> is the minute (00 to 59). The minute of the hour is in the time zone of the gateway.</p>
pub fn get_minute_of_hour(&self) -> &::std::option::Option<i32> {
self.inner.get_minute_of_hour()
}
/// <p>The day of the week component of the maintenance start time week represented as an ordinal number from 0 to 6, where 0 represents Sunday and 6 represents Saturday.</p>
pub fn day_of_week(mut self, input: i32) -> Self {
self.inner = self.inner.day_of_week(input);
self
}
/// <p>The day of the week component of the maintenance start time week represented as an ordinal number from 0 to 6, where 0 represents Sunday and 6 represents Saturday.</p>
pub fn set_day_of_week(mut self, input: ::std::option::Option<i32>) -> Self {
self.inner = self.inner.set_day_of_week(input);
self
}
/// <p>The day of the week component of the maintenance start time week represented as an ordinal number from 0 to 6, where 0 represents Sunday and 6 represents Saturday.</p>
pub fn get_day_of_week(&self) -> &::std::option::Option<i32> {
self.inner.get_day_of_week()
}
/// <p>The day of the month component of the maintenance start time represented as an ordinal number from 1 to 28, where 1 represents the first day of the month. It is not possible to set the maintenance schedule to start on days 29 through 31.</p>
pub fn day_of_month(mut self, input: i32) -> Self {
self.inner = self.inner.day_of_month(input);
self
}
/// <p>The day of the month component of the maintenance start time represented as an ordinal number from 1 to 28, where 1 represents the first day of the month. It is not possible to set the maintenance schedule to start on days 29 through 31.</p>
pub fn set_day_of_month(mut self, input: ::std::option::Option<i32>) -> Self {
self.inner = self.inner.set_day_of_month(input);
self
}
/// <p>The day of the month component of the maintenance start time represented as an ordinal number from 1 to 28, where 1 represents the first day of the month. It is not possible to set the maintenance schedule to start on days 29 through 31.</p>
pub fn get_day_of_month(&self) -> &::std::option::Option<i32> {
self.inner.get_day_of_month()
}
/// <p>A set of variables indicating the software update preferences for the gateway.</p>
/// <p>Includes <code>AutomaticUpdatePolicy</code> field with the following inputs:</p>
/// <p><code>ALL_VERSIONS</code> - Enables regular gateway maintenance updates.</p>
/// <p><code>EMERGENCY_VERSIONS_ONLY</code> - Disables regular gateway maintenance updates. The gateway will still receive emergency version updates on rare occasions if necessary to remedy highly critical security or durability issues. You will be notified before an emergency version update is applied. These updates are applied during your gateway's scheduled maintenance window.</p>
pub fn software_update_preferences(mut self, input: crate::types::SoftwareUpdatePreferences) -> Self {
self.inner = self.inner.software_update_preferences(input);
self
}
/// <p>A set of variables indicating the software update preferences for the gateway.</p>
/// <p>Includes <code>AutomaticUpdatePolicy</code> field with the following inputs:</p>
/// <p><code>ALL_VERSIONS</code> - Enables regular gateway maintenance updates.</p>
/// <p><code>EMERGENCY_VERSIONS_ONLY</code> - Disables regular gateway maintenance updates. The gateway will still receive emergency version updates on rare occasions if necessary to remedy highly critical security or durability issues. You will be notified before an emergency version update is applied. These updates are applied during your gateway's scheduled maintenance window.</p>
pub fn set_software_update_preferences(mut self, input: ::std::option::Option<crate::types::SoftwareUpdatePreferences>) -> Self {
self.inner = self.inner.set_software_update_preferences(input);
self
}
/// <p>A set of variables indicating the software update preferences for the gateway.</p>
/// <p>Includes <code>AutomaticUpdatePolicy</code> field with the following inputs:</p>
/// <p><code>ALL_VERSIONS</code> - Enables regular gateway maintenance updates.</p>
/// <p><code>EMERGENCY_VERSIONS_ONLY</code> - Disables regular gateway maintenance updates. The gateway will still receive emergency version updates on rare occasions if necessary to remedy highly critical security or durability issues. You will be notified before an emergency version update is applied. These updates are applied during your gateway's scheduled maintenance window.</p>
pub fn get_software_update_preferences(&self) -> &::std::option::Option<crate::types::SoftwareUpdatePreferences> {
self.inner.get_software_update_preferences()
}
}