aws-sdk-wickr 1.1.0

AWS SDK for AWS Wickr Admin API
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)]
pub struct RegisterOidcConfigInput {
    /// <p>The ID of the Wickr network for which OIDC will be configured.</p>
    pub network_id: ::std::option::Option<::std::string::String>,
    /// <p>Custom identifier your end users will use to sign in with SSO.</p>
    pub company_id: ::std::option::Option<::std::string::String>,
    /// <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 custom_username: ::std::option::Option<::std::string::String>,
    /// <p>Additional authentication parameters to include in the OIDC flow (optional).</p>
    pub extra_auth_params: ::std::option::Option<::std::string::String>,
    /// <p>The issuer URL of the OIDC provider (e.g., 'https://login.example.com').</p>
    pub issuer: ::std::option::Option<::std::string::String>,
    /// <p>The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').</p>
    pub scopes: ::std::option::Option<::std::string::String>,
    /// <p>The client secret for authenticating with the OIDC provider (optional).</p>
    pub secret: ::std::option::Option<::std::string::String>,
    /// <p>The buffer time in minutes before the SSO token expires to refresh it (optional).</p>
    pub sso_token_buffer_minutes: ::std::option::Option<i32>,
    /// <p>Unique identifier provided by your identity provider to authenticate the access request. Also referred to as clientID.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
}
impl RegisterOidcConfigInput {
    /// <p>The ID of the Wickr network for which OIDC will be configured.</p>
    pub fn network_id(&self) -> ::std::option::Option<&str> {
        self.network_id.as_deref()
    }
    /// <p>Custom identifier your end users will use to sign in with SSO.</p>
    pub fn company_id(&self) -> ::std::option::Option<&str> {
        self.company_id.as_deref()
    }
    /// <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(&self) -> ::std::option::Option<&str> {
        self.custom_username.as_deref()
    }
    /// <p>Additional authentication parameters to include in the OIDC flow (optional).</p>
    pub fn extra_auth_params(&self) -> ::std::option::Option<&str> {
        self.extra_auth_params.as_deref()
    }
    /// <p>The issuer URL of the OIDC provider (e.g., 'https://login.example.com').</p>
    pub fn issuer(&self) -> ::std::option::Option<&str> {
        self.issuer.as_deref()
    }
    /// <p>The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').</p>
    pub fn scopes(&self) -> ::std::option::Option<&str> {
        self.scopes.as_deref()
    }
    /// <p>The client secret for authenticating with the OIDC provider (optional).</p>
    pub fn secret(&self) -> ::std::option::Option<&str> {
        self.secret.as_deref()
    }
    /// <p>The buffer time in minutes before the SSO token expires to refresh it (optional).</p>
    pub fn sso_token_buffer_minutes(&self) -> ::std::option::Option<i32> {
        self.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(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
impl ::std::fmt::Debug for RegisterOidcConfigInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RegisterOidcConfigInput");
        formatter.field("network_id", &self.network_id);
        formatter.field("company_id", &self.company_id);
        formatter.field("custom_username", &self.custom_username);
        formatter.field("extra_auth_params", &self.extra_auth_params);
        formatter.field("issuer", &self.issuer);
        formatter.field("scopes", &self.scopes);
        formatter.field("secret", &"*** Sensitive Data Redacted ***");
        formatter.field("sso_token_buffer_minutes", &self.sso_token_buffer_minutes);
        formatter.field("user_id", &self.user_id);
        formatter.finish()
    }
}
impl RegisterOidcConfigInput {
    /// Creates a new builder-style object to manufacture [`RegisterOidcConfigInput`](crate::operation::register_oidc_config::RegisterOidcConfigInput).
    pub fn builder() -> crate::operation::register_oidc_config::builders::RegisterOidcConfigInputBuilder {
        crate::operation::register_oidc_config::builders::RegisterOidcConfigInputBuilder::default()
    }
}

/// A builder for [`RegisterOidcConfigInput`](crate::operation::register_oidc_config::RegisterOidcConfigInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct RegisterOidcConfigInputBuilder {
    pub(crate) network_id: ::std::option::Option<::std::string::String>,
    pub(crate) company_id: ::std::option::Option<::std::string::String>,
    pub(crate) custom_username: ::std::option::Option<::std::string::String>,
    pub(crate) extra_auth_params: ::std::option::Option<::std::string::String>,
    pub(crate) issuer: ::std::option::Option<::std::string::String>,
    pub(crate) scopes: ::std::option::Option<::std::string::String>,
    pub(crate) secret: ::std::option::Option<::std::string::String>,
    pub(crate) sso_token_buffer_minutes: ::std::option::Option<i32>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
}
impl RegisterOidcConfigInputBuilder {
    /// <p>The ID of the Wickr network for which OIDC will be configured.</p>
    /// This field is required.
    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_id = ::std::option::Option::Some(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.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.network_id
    }
    /// <p>Custom identifier your end users will use to sign in with SSO.</p>
    /// This field is required.
    pub fn company_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.company_id = ::std::option::Option::Some(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.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.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.custom_username = ::std::option::Option::Some(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.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.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.extra_auth_params = ::std::option::Option::Some(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.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.extra_auth_params
    }
    /// <p>The issuer URL of the OIDC provider (e.g., 'https://login.example.com').</p>
    /// This field is required.
    pub fn issuer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.issuer = ::std::option::Option::Some(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.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.issuer
    }
    /// <p>The OAuth scopes to request from the OIDC provider (e.g., 'openid profile email').</p>
    /// This field is required.
    pub fn scopes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.scopes = ::std::option::Option::Some(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.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.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.secret = ::std::option::Option::Some(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.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.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.sso_token_buffer_minutes = ::std::option::Option::Some(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.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.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.user_id = ::std::option::Option::Some(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.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.user_id
    }
    /// Consumes the builder and constructs a [`RegisterOidcConfigInput`](crate::operation::register_oidc_config::RegisterOidcConfigInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_oidc_config::RegisterOidcConfigInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::register_oidc_config::RegisterOidcConfigInput {
            network_id: self.network_id,
            company_id: self.company_id,
            custom_username: self.custom_username,
            extra_auth_params: self.extra_auth_params,
            issuer: self.issuer,
            scopes: self.scopes,
            secret: self.secret,
            sso_token_buffer_minutes: self.sso_token_buffer_minutes,
            user_id: self.user_id,
        })
    }
}
impl ::std::fmt::Debug for RegisterOidcConfigInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RegisterOidcConfigInputBuilder");
        formatter.field("network_id", &self.network_id);
        formatter.field("company_id", &self.company_id);
        formatter.field("custom_username", &self.custom_username);
        formatter.field("extra_auth_params", &self.extra_auth_params);
        formatter.field("issuer", &self.issuer);
        formatter.field("scopes", &self.scopes);
        formatter.field("secret", &"*** Sensitive Data Redacted ***");
        formatter.field("sso_token_buffer_minutes", &self.sso_token_buffer_minutes);
        formatter.field("user_id", &self.user_id);
        formatter.finish()
    }
}