aws-sdk-workmail 1.94.0

AWS SDK for Amazon WorkMail
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::get_mobile_device_access_effect::_get_mobile_device_access_effect_output::GetMobileDeviceAccessEffectOutputBuilder;

pub use crate::operation::get_mobile_device_access_effect::_get_mobile_device_access_effect_input::GetMobileDeviceAccessEffectInputBuilder;

impl crate::operation::get_mobile_device_access_effect::builders::GetMobileDeviceAccessEffectInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.get_mobile_device_access_effect();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `GetMobileDeviceAccessEffect`.
///
/// <p>Simulates the effect of the mobile device access rules for the given attributes of a sample access event. Use this method to test the effects of the current set of mobile device access rules for the WorkMail organization for a particular user's attributes.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct GetMobileDeviceAccessEffectFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::get_mobile_device_access_effect::builders::GetMobileDeviceAccessEffectInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectOutput,
        crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectError,
    > for GetMobileDeviceAccessEffectFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectOutput,
            crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl GetMobileDeviceAccessEffectFluentBuilder {
    /// Creates a new `GetMobileDeviceAccessEffectFluentBuilder`.
    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 GetMobileDeviceAccessEffect as a reference.
    pub fn as_input(&self) -> &crate::operation::get_mobile_device_access_effect::builders::GetMobileDeviceAccessEffectInputBuilder {
        &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::get_mobile_device_access_effect::GetMobileDeviceAccessEffectOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectError,
            ::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::get_mobile_device_access_effect::GetMobileDeviceAccessEffect::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffect::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::get_mobile_device_access_effect::GetMobileDeviceAccessEffectOutput,
        crate::operation::get_mobile_device_access_effect::GetMobileDeviceAccessEffectError,
        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 WorkMail organization to simulate the access effect for.</p>
    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.organization_id(input.into());
        self
    }
    /// <p>The WorkMail organization to simulate the access effect for.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_organization_id(input);
        self
    }
    /// <p>The WorkMail organization to simulate the access effect for.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_organization_id()
    }
    /// <p>Device type the simulated user will report.</p>
    pub fn device_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.device_type(input.into());
        self
    }
    /// <p>Device type the simulated user will report.</p>
    pub fn set_device_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_device_type(input);
        self
    }
    /// <p>Device type the simulated user will report.</p>
    pub fn get_device_type(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_device_type()
    }
    /// <p>Device model the simulated user will report.</p>
    pub fn device_model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.device_model(input.into());
        self
    }
    /// <p>Device model the simulated user will report.</p>
    pub fn set_device_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_device_model(input);
        self
    }
    /// <p>Device model the simulated user will report.</p>
    pub fn get_device_model(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_device_model()
    }
    /// <p>Device operating system the simulated user will report.</p>
    pub fn device_operating_system(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.device_operating_system(input.into());
        self
    }
    /// <p>Device operating system the simulated user will report.</p>
    pub fn set_device_operating_system(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_device_operating_system(input);
        self
    }
    /// <p>Device operating system the simulated user will report.</p>
    pub fn get_device_operating_system(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_device_operating_system()
    }
    /// <p>Device user agent the simulated user will report.</p>
    pub fn device_user_agent(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.device_user_agent(input.into());
        self
    }
    /// <p>Device user agent the simulated user will report.</p>
    pub fn set_device_user_agent(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_device_user_agent(input);
        self
    }
    /// <p>Device user agent the simulated user will report.</p>
    pub fn get_device_user_agent(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_device_user_agent()
    }
}