aws-sdk-wickr 1.12.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 RegisterOpentdfConfigOutput {
    /// <p>The OIDC client ID used for authenticating with the OpenTDF provider.</p>
    pub client_id: ::std::string::String,
    /// <p>The domain of the OpenTDF server.</p>
    pub domain: ::std::string::String,
    /// <p>The OIDC client secret used for authenticating with the OpenTDF provider.</p>
    pub client_secret: ::std::string::String,
    /// <p>The provider of the OpenTDF platform.</p>
    pub provider: ::std::string::String,
    _request_id: Option<String>,
}
impl RegisterOpentdfConfigOutput {
    /// <p>The OIDC client ID used for authenticating with the OpenTDF provider.</p>
    pub fn client_id(&self) -> &str {
        use std::ops::Deref;
        self.client_id.deref()
    }
    /// <p>The domain of the OpenTDF server.</p>
    pub fn domain(&self) -> &str {
        use std::ops::Deref;
        self.domain.deref()
    }
    /// <p>The OIDC client secret used for authenticating with the OpenTDF provider.</p>
    pub fn client_secret(&self) -> &str {
        use std::ops::Deref;
        self.client_secret.deref()
    }
    /// <p>The provider of the OpenTDF platform.</p>
    pub fn provider(&self) -> &str {
        use std::ops::Deref;
        self.provider.deref()
    }
}
impl ::std::fmt::Debug for RegisterOpentdfConfigOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RegisterOpentdfConfigOutput");
        formatter.field("client_id", &self.client_id);
        formatter.field("domain", &self.domain);
        formatter.field("client_secret", &"*** Sensitive Data Redacted ***");
        formatter.field("provider", &self.provider);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for RegisterOpentdfConfigOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl RegisterOpentdfConfigOutput {
    /// Creates a new builder-style object to manufacture [`RegisterOpentdfConfigOutput`](crate::operation::register_opentdf_config::RegisterOpentdfConfigOutput).
    pub fn builder() -> crate::operation::register_opentdf_config::builders::RegisterOpentdfConfigOutputBuilder {
        crate::operation::register_opentdf_config::builders::RegisterOpentdfConfigOutputBuilder::default()
    }
}

/// A builder for [`RegisterOpentdfConfigOutput`](crate::operation::register_opentdf_config::RegisterOpentdfConfigOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct RegisterOpentdfConfigOutputBuilder {
    pub(crate) client_id: ::std::option::Option<::std::string::String>,
    pub(crate) domain: ::std::option::Option<::std::string::String>,
    pub(crate) client_secret: ::std::option::Option<::std::string::String>,
    pub(crate) provider: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl RegisterOpentdfConfigOutputBuilder {
    /// <p>The OIDC client ID used for authenticating with the OpenTDF provider.</p>
    /// This field is required.
    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The OIDC client ID used for authenticating with the OpenTDF provider.</p>
    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_id = input;
        self
    }
    /// <p>The OIDC client ID used for authenticating with the OpenTDF provider.</p>
    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_id
    }
    /// <p>The domain of the OpenTDF server.</p>
    /// This field is required.
    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The domain of the OpenTDF server.</p>
    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain = input;
        self
    }
    /// <p>The domain of the OpenTDF server.</p>
    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain
    }
    /// <p>The OIDC client secret used for authenticating with the OpenTDF provider.</p>
    /// This field is required.
    pub fn client_secret(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_secret = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The OIDC client secret used for authenticating with the OpenTDF provider.</p>
    pub fn set_client_secret(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_secret = input;
        self
    }
    /// <p>The OIDC client secret used for authenticating with the OpenTDF provider.</p>
    pub fn get_client_secret(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_secret
    }
    /// <p>The provider of the OpenTDF platform.</p>
    /// This field is required.
    pub fn provider(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.provider = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The provider of the OpenTDF platform.</p>
    pub fn set_provider(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.provider = input;
        self
    }
    /// <p>The provider of the OpenTDF platform.</p>
    pub fn get_provider(&self) -> &::std::option::Option<::std::string::String> {
        &self.provider
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`RegisterOpentdfConfigOutput`](crate::operation::register_opentdf_config::RegisterOpentdfConfigOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`client_id`](crate::operation::register_opentdf_config::builders::RegisterOpentdfConfigOutputBuilder::client_id)
    /// - [`domain`](crate::operation::register_opentdf_config::builders::RegisterOpentdfConfigOutputBuilder::domain)
    /// - [`client_secret`](crate::operation::register_opentdf_config::builders::RegisterOpentdfConfigOutputBuilder::client_secret)
    /// - [`provider`](crate::operation::register_opentdf_config::builders::RegisterOpentdfConfigOutputBuilder::provider)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_opentdf_config::RegisterOpentdfConfigOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::register_opentdf_config::RegisterOpentdfConfigOutput {
            client_id: self.client_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "client_id",
                    "client_id was not specified but it is required when building RegisterOpentdfConfigOutput",
                )
            })?,
            domain: self.domain.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "domain",
                    "domain was not specified but it is required when building RegisterOpentdfConfigOutput",
                )
            })?,
            client_secret: self.client_secret.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "client_secret",
                    "client_secret was not specified but it is required when building RegisterOpentdfConfigOutput",
                )
            })?,
            provider: self.provider.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "provider",
                    "provider was not specified but it is required when building RegisterOpentdfConfigOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for RegisterOpentdfConfigOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RegisterOpentdfConfigOutputBuilder");
        formatter.field("client_id", &self.client_id);
        formatter.field("domain", &self.domain);
        formatter.field("client_secret", &"*** Sensitive Data Redacted ***");
        formatter.field("provider", &self.provider);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}