aws-sdk-emr 1.121.0

AWS SDK for Amazon EMR
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Output of the <code>GetSessionEndpoint</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetSessionEndpointOutput {
    /// <p>The Spark Connect endpoint URL to use in the PySpark client.</p>
    pub endpoint: ::std::option::Option<::std::string::String>,
    /// <p>A time-limited authentication token used to connect to the Spark Connect endpoint.</p>
    pub auth_token: ::std::option::Option<::std::string::String>,
    /// <p>The time at which the authentication token expires. After this time, call <code>GetSessionEndpoint</code> again to obtain a new token.</p>
    pub auth_token_expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.</p>
    pub credentials: ::std::option::Option<crate::types::Credentials>,
    _request_id: Option<String>,
}
impl GetSessionEndpointOutput {
    /// <p>The Spark Connect endpoint URL to use in the PySpark client.</p>
    pub fn endpoint(&self) -> ::std::option::Option<&str> {
        self.endpoint.as_deref()
    }
    /// <p>A time-limited authentication token used to connect to the Spark Connect endpoint.</p>
    pub fn auth_token(&self) -> ::std::option::Option<&str> {
        self.auth_token.as_deref()
    }
    /// <p>The time at which the authentication token expires. After this time, call <code>GetSessionEndpoint</code> again to obtain a new token.</p>
    pub fn auth_token_expiration_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.auth_token_expiration_time.as_ref()
    }
    /// <p>Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.</p>
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::Credentials> {
        self.credentials.as_ref()
    }
}
impl ::std::fmt::Debug for GetSessionEndpointOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetSessionEndpointOutput");
        formatter.field("endpoint", &self.endpoint);
        formatter.field("auth_token", &"*** Sensitive Data Redacted ***");
        formatter.field("auth_token_expiration_time", &self.auth_token_expiration_time);
        formatter.field("credentials", &self.credentials);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GetSessionEndpointOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetSessionEndpointOutput {
    /// Creates a new builder-style object to manufacture [`GetSessionEndpointOutput`](crate::operation::get_session_endpoint::GetSessionEndpointOutput).
    pub fn builder() -> crate::operation::get_session_endpoint::builders::GetSessionEndpointOutputBuilder {
        crate::operation::get_session_endpoint::builders::GetSessionEndpointOutputBuilder::default()
    }
}

/// A builder for [`GetSessionEndpointOutput`](crate::operation::get_session_endpoint::GetSessionEndpointOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetSessionEndpointOutputBuilder {
    pub(crate) endpoint: ::std::option::Option<::std::string::String>,
    pub(crate) auth_token: ::std::option::Option<::std::string::String>,
    pub(crate) auth_token_expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) credentials: ::std::option::Option<crate::types::Credentials>,
    _request_id: Option<String>,
}
impl GetSessionEndpointOutputBuilder {
    /// <p>The Spark Connect endpoint URL to use in the PySpark client.</p>
    /// This field is required.
    pub fn endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Spark Connect endpoint URL to use in the PySpark client.</p>
    pub fn set_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint = input;
        self
    }
    /// <p>The Spark Connect endpoint URL to use in the PySpark client.</p>
    pub fn get_endpoint(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint
    }
    /// <p>A time-limited authentication token used to connect to the Spark Connect endpoint.</p>
    pub fn auth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auth_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A time-limited authentication token used to connect to the Spark Connect endpoint.</p>
    pub fn set_auth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auth_token = input;
        self
    }
    /// <p>A time-limited authentication token used to connect to the Spark Connect endpoint.</p>
    pub fn get_auth_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.auth_token
    }
    /// <p>The time at which the authentication token expires. After this time, call <code>GetSessionEndpoint</code> again to obtain a new token.</p>
    pub fn auth_token_expiration_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.auth_token_expiration_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the authentication token expires. After this time, call <code>GetSessionEndpoint</code> again to obtain a new token.</p>
    pub fn set_auth_token_expiration_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.auth_token_expiration_time = input;
        self
    }
    /// <p>The time at which the authentication token expires. After this time, call <code>GetSessionEndpoint</code> again to obtain a new token.</p>
    pub fn get_auth_token_expiration_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.auth_token_expiration_time
    }
    /// <p>Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.</p>
    pub fn credentials(mut self, input: crate::types::Credentials) -> Self {
        self.credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.</p>
    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::Credentials>) -> Self {
        self.credentials = input;
        self
    }
    /// <p>Username and password used to authenticate with the Spark Connect server when connecting directly over VPC peering.</p>
    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::Credentials> {
        &self.credentials
    }
    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 [`GetSessionEndpointOutput`](crate::operation::get_session_endpoint::GetSessionEndpointOutput).
    pub fn build(self) -> crate::operation::get_session_endpoint::GetSessionEndpointOutput {
        crate::operation::get_session_endpoint::GetSessionEndpointOutput {
            endpoint: self.endpoint,
            auth_token: self.auth_token,
            auth_token_expiration_time: self.auth_token_expiration_time,
            credentials: self.credentials,
            _request_id: self._request_id,
        }
    }
}
impl ::std::fmt::Debug for GetSessionEndpointOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetSessionEndpointOutputBuilder");
        formatter.field("endpoint", &self.endpoint);
        formatter.field("auth_token", &"*** Sensitive Data Redacted ***");
        formatter.field("auth_token_expiration_time", &self.auth_token_expiration_time);
        formatter.field("credentials", &self.credentials);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}