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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetFederationTokenOutput {
    /// <p>The credentials to use for federation.</p>
    pub credentials: ::std::option::Option<crate::types::Credentials>,
    /// <p>The URL to sign into the user's instance.</p>
    pub sign_in_url: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub user_arn: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the user. This can be the ID or the ARN of the user.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetFederationTokenOutput {
    /// <p>The credentials to use for federation.</p>
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::Credentials> {
        self.credentials.as_ref()
    }
    /// <p>The URL to sign into the user's instance.</p>
    pub fn sign_in_url(&self) -> ::std::option::Option<&str> {
        self.sign_in_url.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn user_arn(&self) -> ::std::option::Option<&str> {
        self.user_arn.as_deref()
    }
    /// <p>The identifier for the user. This can be the ID or the ARN of the user.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
}
impl ::std::fmt::Debug for GetFederationTokenOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetFederationTokenOutput");
        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
        formatter.field("sign_in_url", &self.sign_in_url);
        formatter.field("user_arn", &self.user_arn);
        formatter.field("user_id", &self.user_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetFederationTokenOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetFederationTokenOutput {
    /// Creates a new builder-style object to manufacture [`GetFederationTokenOutput`](crate::operation::get_federation_token::GetFederationTokenOutput).
    pub fn builder() -> crate::operation::get_federation_token::builders::GetFederationTokenOutputBuilder {
        crate::operation::get_federation_token::builders::GetFederationTokenOutputBuilder::default()
    }
}

/// A builder for [`GetFederationTokenOutput`](crate::operation::get_federation_token::GetFederationTokenOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetFederationTokenOutputBuilder {
    pub(crate) credentials: ::std::option::Option<crate::types::Credentials>,
    pub(crate) sign_in_url: ::std::option::Option<::std::string::String>,
    pub(crate) user_arn: ::std::option::Option<::std::string::String>,
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetFederationTokenOutputBuilder {
    /// <p>The credentials to use for federation.</p>
    pub fn credentials(mut self, input: crate::types::Credentials) -> Self {
        self.credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>The credentials to use for federation.</p>
    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::Credentials>) -> Self {
        self.credentials = input;
        self
    }
    /// <p>The credentials to use for federation.</p>
    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::Credentials> {
        &self.credentials
    }
    /// <p>The URL to sign into the user's instance.</p>
    pub fn sign_in_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sign_in_url = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The URL to sign into the user's instance.</p>
    pub fn set_sign_in_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sign_in_url = input;
        self
    }
    /// <p>The URL to sign into the user's instance.</p>
    pub fn get_sign_in_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.sign_in_url
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn set_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn get_user_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_arn
    }
    /// <p>The identifier for the user. This can be the ID or the ARN of the user.</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>The identifier for the user. This can be the ID or the ARN of the user.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The identifier for the user. This can be the ID or the ARN of the user.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    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 [`GetFederationTokenOutput`](crate::operation::get_federation_token::GetFederationTokenOutput).
    pub fn build(self) -> crate::operation::get_federation_token::GetFederationTokenOutput {
        crate::operation::get_federation_token::GetFederationTokenOutput {
            credentials: self.credentials,
            sign_in_url: self.sign_in_url,
            user_arn: self.user_arn,
            user_id: self.user_id,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for GetFederationTokenOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetFederationTokenOutputBuilder");
        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
        formatter.field("sign_in_url", &self.sign_in_url);
        formatter.field("user_arn", &self.user_arn);
        formatter.field("user_id", &self.user_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}