aws-sdk-wickr 1.8.0

AWS SDK for AWS Wickr Admin API
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::register_oidc_config::_register_oidc_config_input::RegisterOidcConfigInputBuilder;

pub use crate::operation::register_oidc_config::_register_oidc_config_output::RegisterOidcConfigOutputBuilder;

impl crate::operation::register_oidc_config::builders::RegisterOidcConfigInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::register_oidc_config::RegisterOidcConfigOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::register_oidc_config::RegisterOidcConfigError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.register_oidc_config();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `RegisterOidcConfig`.
///
/// <p>Registers and saves an OpenID Connect (OIDC) configuration for a Wickr network, enabling Single Sign-On (SSO) authentication through an identity provider.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct RegisterOidcConfigFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::register_oidc_config::builders::RegisterOidcConfigInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::register_oidc_config::RegisterOidcConfigOutput,
        crate::operation::register_oidc_config::RegisterOidcConfigError,
    > for RegisterOidcConfigFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::register_oidc_config::RegisterOidcConfigOutput,
            crate::operation::register_oidc_config::RegisterOidcConfigError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl RegisterOidcConfigFluentBuilder {
    /// Creates a new `RegisterOidcConfigFluentBuilder`.
    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 RegisterOidcConfig as a reference.
    pub fn as_input(&self) -> &crate::operation::register_oidc_config::builders::RegisterOidcConfigInputBuilder {
        &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::register_oidc_config::RegisterOidcConfigOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::register_oidc_config::RegisterOidcConfigError,
            ::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::register_oidc_config::RegisterOidcConfig::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::register_oidc_config::RegisterOidcConfig::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::register_oidc_config::RegisterOidcConfigOutput,
        crate::operation::register_oidc_config::RegisterOidcConfigError,
        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 ID of the Wickr network for which OIDC will be configured.</p>
    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.network_id(input.into());
        self
    }
    /// <p>The ID of the Wickr network for which OIDC will be configured.</p>
    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_network_id(input);
        self
    }
    /// <p>The ID of the Wickr network for which OIDC will be configured.</p>
    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_network_id()
    }
    /// <p>Custom identifier your end users will use to sign in with SSO.</p>
    pub fn company_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.company_id(input.into());
        self
    }
    /// <p>Custom identifier your end users will use to sign in with SSO.</p>
    pub fn set_company_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_company_id(input);
        self
    }
    /// <p>Custom identifier your end users will use to sign in with SSO.</p>
    pub fn get_company_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_company_id()
    }
    /// <p>A custom field mapping to extract the username from the OIDC token (optional).</p><note>
    /// <p>The customUsername is only required if you use something other than email as the username field.</p>
    /// </note>
    pub fn custom_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.custom_username(input.into());
        self
    }
    /// <p>A custom field mapping to extract the username from the OIDC token (optional).</p><note>
    /// <p>The customUsername is only required if you use something other than email as the username field.</p>
    /// </note>
    pub fn set_custom_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_custom_username(input);
        self
    }
    /// <p>A custom field mapping to extract the username from the OIDC token (optional).</p><note>
    /// <p>The customUsername is only required if you use something other than email as the username field.</p>
    /// </note>
    pub fn get_custom_username(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_custom_username()
    }
    /// <p>Additional authentication parameters to include in the OIDC flow (optional).</p>
    pub fn extra_auth_params(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.extra_auth_params(input.into());
        self
    }
    /// <p>Additional authentication parameters to include in the OIDC flow (optional).</p>
    pub fn set_extra_auth_params(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_extra_auth_params(input);
        self
    }
    /// <p>Additional authentication parameters to include in the OIDC flow (optional).</p>
    pub fn get_extra_auth_params(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_extra_auth_params()
    }
    /// <p>The issuer URL of the OIDC provider (e.g., 'https://login.example.com').</p>
    pub fn issuer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.issuer(input.into());
        self
    }
    /// <p>The issuer URL of the OIDC provider (e.g., 'https://login.example.com').</p>
    pub fn set_issuer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_issuer(input);
        self
    }
    /// <p>The issuer URL of the OIDC provider (e.g., 'https://login.example.com').</p>
    pub fn get_issuer(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_issuer()
    }
    /// <p>The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').</p>
    pub fn scopes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.scopes(input.into());
        self
    }
    /// <p>The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').</p>
    pub fn set_scopes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_scopes(input);
        self
    }
    /// <p>The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').</p>
    pub fn get_scopes(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_scopes()
    }
    /// <p>The client secret for authenticating with the OIDC provider (optional).</p>
    pub fn secret(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.secret(input.into());
        self
    }
    /// <p>The client secret for authenticating with the OIDC provider (optional).</p>
    pub fn set_secret(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_secret(input);
        self
    }
    /// <p>The client secret for authenticating with the OIDC provider (optional).</p>
    pub fn get_secret(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_secret()
    }
    /// <p>The buffer time in minutes before the SSO token expires to refresh it (optional).</p>
    pub fn sso_token_buffer_minutes(mut self, input: i32) -> Self {
        self.inner = self.inner.sso_token_buffer_minutes(input);
        self
    }
    /// <p>The buffer time in minutes before the SSO token expires to refresh it (optional).</p>
    pub fn set_sso_token_buffer_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_sso_token_buffer_minutes(input);
        self
    }
    /// <p>The buffer time in minutes before the SSO token expires to refresh it (optional).</p>
    pub fn get_sso_token_buffer_minutes(&self) -> &::std::option::Option<i32> {
        self.inner.get_sso_token_buffer_minutes()
    }
    /// <p>Unique identifier provided by your identity provider to authenticate the access request. Also referred to as clientID.</p>
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.user_id(input.into());
        self
    }
    /// <p>Unique identifier provided by your identity provider to authenticate the access request. Also referred to as clientID.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_user_id(input);
        self
    }
    /// <p>Unique identifier provided by your identity provider to authenticate the access request. Also referred to as clientID.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_user_id()
    }
}