aws-sdk-connect 1.153.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_hours_of_operation_override::_update_hours_of_operation_override_output::UpdateHoursOfOperationOverrideOutputBuilder;

pub use crate::operation::update_hours_of_operation_override::_update_hours_of_operation_override_input::UpdateHoursOfOperationOverrideInputBuilder;

impl crate::operation::update_hours_of_operation_override::builders::UpdateHoursOfOperationOverrideInputBuilder {
    /// 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_hours_of_operation_override::UpdateHoursOfOperationOverrideOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_hours_of_operation_override();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateHoursOfOperationOverride`.
///
/// <p>Update the hours of operation override.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateHoursOfOperationOverrideFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_hours_of_operation_override::builders::UpdateHoursOfOperationOverrideInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideOutput,
        crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideError,
    > for UpdateHoursOfOperationOverrideFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideOutput,
            crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateHoursOfOperationOverrideFluentBuilder {
    /// Creates a new `UpdateHoursOfOperationOverrideFluentBuilder`.
    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 UpdateHoursOfOperationOverride as a reference.
    pub fn as_input(&self) -> &crate::operation::update_hours_of_operation_override::builders::UpdateHoursOfOperationOverrideInputBuilder {
        &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_hours_of_operation_override::UpdateHoursOfOperationOverrideOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideError,
            ::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_hours_of_operation_override::UpdateHoursOfOperationOverride::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverride::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_hours_of_operation_override::UpdateHoursOfOperationOverrideOutput,
        crate::operation::update_hours_of_operation_override::UpdateHoursOfOperationOverrideError,
        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 identifier of the Amazon Connect instance.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.instance_id(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_instance_id(input);
        self
    }
    /// <p>The identifier of the Amazon Connect instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_instance_id()
    }
    /// <p>The identifier for the hours of operation.</p>
    pub fn hours_of_operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.hours_of_operation_id(input.into());
        self
    }
    /// <p>The identifier for the hours of operation.</p>
    pub fn set_hours_of_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_hours_of_operation_id(input);
        self
    }
    /// <p>The identifier for the hours of operation.</p>
    pub fn get_hours_of_operation_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_hours_of_operation_id()
    }
    /// <p>The identifier for the hours of operation override.</p>
    pub fn hours_of_operation_override_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.hours_of_operation_override_id(input.into());
        self
    }
    /// <p>The identifier for the hours of operation override.</p>
    pub fn set_hours_of_operation_override_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_hours_of_operation_override_id(input);
        self
    }
    /// <p>The identifier for the hours of operation override.</p>
    pub fn get_hours_of_operation_override_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_hours_of_operation_override_id()
    }
    /// <p>The name of the hours of operation override.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>The name of the hours of operation override.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>The name of the hours of operation override.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The description of the hours of operation override.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>The description of the hours of operation override.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>The description of the hours of operation override.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    ///
    /// Appends an item to `Config`.
    ///
    /// To override the contents of this collection use [`set_config`](Self::set_config).
    ///
    /// <p>Configuration information for the hours of operation override: day, start time, and end time.</p>
    pub fn config(mut self, input: crate::types::HoursOfOperationOverrideConfig) -> Self {
        self.inner = self.inner.config(input);
        self
    }
    /// <p>Configuration information for the hours of operation override: day, start time, and end time.</p>
    pub fn set_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HoursOfOperationOverrideConfig>>) -> Self {
        self.inner = self.inner.set_config(input);
        self
    }
    /// <p>Configuration information for the hours of operation override: day, start time, and end time.</p>
    pub fn get_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HoursOfOperationOverrideConfig>> {
        self.inner.get_config()
    }
    /// <p>The date from when the hours of operation override would be effective.</p>
    pub fn effective_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.effective_from(input.into());
        self
    }
    /// <p>The date from when the hours of operation override would be effective.</p>
    pub fn set_effective_from(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_effective_from(input);
        self
    }
    /// <p>The date from when the hours of operation override would be effective.</p>
    pub fn get_effective_from(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_effective_from()
    }
    /// <p>The date until the hours of operation override is effective.</p>
    pub fn effective_till(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.effective_till(input.into());
        self
    }
    /// <p>The date until the hours of operation override is effective.</p>
    pub fn set_effective_till(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_effective_till(input);
        self
    }
    /// <p>The date until the hours of operation override is effective.</p>
    pub fn get_effective_till(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_effective_till()
    }
    /// <p>Configuration for a recurring event.</p>
    pub fn recurrence_config(mut self, input: crate::types::RecurrenceConfig) -> Self {
        self.inner = self.inner.recurrence_config(input);
        self
    }
    /// <p>Configuration for a recurring event.</p>
    pub fn set_recurrence_config(mut self, input: ::std::option::Option<crate::types::RecurrenceConfig>) -> Self {
        self.inner = self.inner.set_recurrence_config(input);
        self
    }
    /// <p>Configuration for a recurring event.</p>
    pub fn get_recurrence_config(&self) -> &::std::option::Option<crate::types::RecurrenceConfig> {
        self.inner.get_recurrence_config()
    }
    /// <p>Whether the override will be defined as a <i>standard</i> or as a <i>recurring event</i>.</p>
    /// <p>For more information about how override types are applied, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/connect/latest/adminguide/hours-of-operation-overrides.html">Build your list of overrides</a> in the <i> Administrator Guide</i>.</p>
    pub fn override_type(mut self, input: crate::types::OverrideType) -> Self {
        self.inner = self.inner.override_type(input);
        self
    }
    /// <p>Whether the override will be defined as a <i>standard</i> or as a <i>recurring event</i>.</p>
    /// <p>For more information about how override types are applied, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/connect/latest/adminguide/hours-of-operation-overrides.html">Build your list of overrides</a> in the <i> Administrator Guide</i>.</p>
    pub fn set_override_type(mut self, input: ::std::option::Option<crate::types::OverrideType>) -> Self {
        self.inner = self.inner.set_override_type(input);
        self
    }
    /// <p>Whether the override will be defined as a <i>standard</i> or as a <i>recurring event</i>.</p>
    /// <p>For more information about how override types are applied, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/connect/latest/adminguide/hours-of-operation-overrides.html">Build your list of overrides</a> in the <i> Administrator Guide</i>.</p>
    pub fn get_override_type(&self) -> &::std::option::Option<crate::types::OverrideType> {
        self.inner.get_override_type()
    }
}