aws-sdk-connect 1.183.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 CreateAuthCodeOutput {
    /// <p>The authorization code to use for establishing a session.</p>
    pub auth_code: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the session created with the authorization code.</p>
    pub session_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of entity associated with the authorization code.</p>
    pub entity_type: ::std::option::Option<crate::types::AuthCodeEntityType>,
    /// <p>The identifier of the entity associated with the authorization code.</p>
    pub entity_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateAuthCodeOutput {
    /// <p>The authorization code to use for establishing a session.</p>
    pub fn auth_code(&self) -> ::std::option::Option<&str> {
        self.auth_code.as_deref()
    }
    /// <p>The identifier of the session created with the authorization code.</p>
    pub fn session_id(&self) -> ::std::option::Option<&str> {
        self.session_id.as_deref()
    }
    /// <p>The type of entity associated with the authorization code.</p>
    pub fn entity_type(&self) -> ::std::option::Option<&crate::types::AuthCodeEntityType> {
        self.entity_type.as_ref()
    }
    /// <p>The identifier of the entity associated with the authorization code.</p>
    pub fn entity_id(&self) -> ::std::option::Option<&str> {
        self.entity_id.as_deref()
    }
}
impl ::std::fmt::Debug for CreateAuthCodeOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAuthCodeOutput");
        formatter.field("auth_code", &"*** Sensitive Data Redacted ***");
        formatter.field("session_id", &self.session_id);
        formatter.field("entity_type", &self.entity_type);
        formatter.field("entity_id", &self.entity_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for CreateAuthCodeOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateAuthCodeOutput {
    /// Creates a new builder-style object to manufacture [`CreateAuthCodeOutput`](crate::operation::create_auth_code::CreateAuthCodeOutput).
    pub fn builder() -> crate::operation::create_auth_code::builders::CreateAuthCodeOutputBuilder {
        crate::operation::create_auth_code::builders::CreateAuthCodeOutputBuilder::default()
    }
}

/// A builder for [`CreateAuthCodeOutput`](crate::operation::create_auth_code::CreateAuthCodeOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAuthCodeOutputBuilder {
    pub(crate) auth_code: ::std::option::Option<::std::string::String>,
    pub(crate) session_id: ::std::option::Option<::std::string::String>,
    pub(crate) entity_type: ::std::option::Option<crate::types::AuthCodeEntityType>,
    pub(crate) entity_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateAuthCodeOutputBuilder {
    /// <p>The authorization code to use for establishing a session.</p>
    pub fn auth_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auth_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The authorization code to use for establishing a session.</p>
    pub fn set_auth_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auth_code = input;
        self
    }
    /// <p>The authorization code to use for establishing a session.</p>
    pub fn get_auth_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.auth_code
    }
    /// <p>The identifier of the session created with the authorization code.</p>
    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the session created with the authorization code.</p>
    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_id = input;
        self
    }
    /// <p>The identifier of the session created with the authorization code.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_id
    }
    /// <p>The type of entity associated with the authorization code.</p>
    pub fn entity_type(mut self, input: crate::types::AuthCodeEntityType) -> Self {
        self.entity_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of entity associated with the authorization code.</p>
    pub fn set_entity_type(mut self, input: ::std::option::Option<crate::types::AuthCodeEntityType>) -> Self {
        self.entity_type = input;
        self
    }
    /// <p>The type of entity associated with the authorization code.</p>
    pub fn get_entity_type(&self) -> &::std::option::Option<crate::types::AuthCodeEntityType> {
        &self.entity_type
    }
    /// <p>The identifier of the entity associated with the authorization code.</p>
    pub fn entity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.entity_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the entity associated with the authorization code.</p>
    pub fn set_entity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.entity_id = input;
        self
    }
    /// <p>The identifier of the entity associated with the authorization code.</p>
    pub fn get_entity_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.entity_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 [`CreateAuthCodeOutput`](crate::operation::create_auth_code::CreateAuthCodeOutput).
    pub fn build(self) -> crate::operation::create_auth_code::CreateAuthCodeOutput {
        crate::operation::create_auth_code::CreateAuthCodeOutput {
            auth_code: self.auth_code,
            session_id: self.session_id,
            entity_type: self.entity_type,
            entity_id: self.entity_id,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for CreateAuthCodeOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAuthCodeOutputBuilder");
        formatter.field("auth_code", &"*** Sensitive Data Redacted ***");
        formatter.field("session_id", &self.session_id);
        formatter.field("entity_type", &self.entity_type);
        formatter.field("entity_id", &self.entity_id);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}