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>Input to the <code>GetSessionEndpoint</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetSessionEndpointInput {
    /// <p>The ID of the cluster that the session belongs to.</p>
    pub cluster_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the session.</p>
    pub session_id: ::std::option::Option<::std::string::String>,
}
impl GetSessionEndpointInput {
    /// <p>The ID of the cluster that the session belongs to.</p>
    pub fn cluster_id(&self) -> ::std::option::Option<&str> {
        self.cluster_id.as_deref()
    }
    /// <p>The ID of the session.</p>
    pub fn session_id(&self) -> ::std::option::Option<&str> {
        self.session_id.as_deref()
    }
}
impl GetSessionEndpointInput {
    /// Creates a new builder-style object to manufacture [`GetSessionEndpointInput`](crate::operation::get_session_endpoint::GetSessionEndpointInput).
    pub fn builder() -> crate::operation::get_session_endpoint::builders::GetSessionEndpointInputBuilder {
        crate::operation::get_session_endpoint::builders::GetSessionEndpointInputBuilder::default()
    }
}

/// A builder for [`GetSessionEndpointInput`](crate::operation::get_session_endpoint::GetSessionEndpointInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSessionEndpointInputBuilder {
    pub(crate) cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) session_id: ::std::option::Option<::std::string::String>,
}
impl GetSessionEndpointInputBuilder {
    /// <p>The ID of the cluster that the session belongs to.</p>
    /// This field is required.
    pub fn cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the cluster that the session belongs to.</p>
    pub fn set_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_id = input;
        self
    }
    /// <p>The ID of the cluster that the session belongs to.</p>
    pub fn get_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_id
    }
    /// <p>The ID of the session.</p>
    /// This field is required.
    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 ID of the session.</p>
    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_id = input;
        self
    }
    /// <p>The ID of the session.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_id
    }
    /// Consumes the builder and constructs a [`GetSessionEndpointInput`](crate::operation::get_session_endpoint::GetSessionEndpointInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_session_endpoint::GetSessionEndpointInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_session_endpoint::GetSessionEndpointInput {
            cluster_id: self.cluster_id,
            session_id: self.session_id,
        })
    }
}