aws-sdk-emrserverless 1.103.0

AWS SDK for EMR Serverless
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, ::std::fmt::Debug)]
pub struct GetJobRunInput {
    /// <p>The ID of the application on which the job run is submitted.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the job run.</p>
    pub job_run_id: ::std::option::Option<::std::string::String>,
    /// <p>An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.</p>
    pub attempt: ::std::option::Option<i32>,
}
impl GetJobRunInput {
    /// <p>The ID of the application on which the job run is submitted.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The ID of the job run.</p>
    pub fn job_run_id(&self) -> ::std::option::Option<&str> {
        self.job_run_id.as_deref()
    }
    /// <p>An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.</p>
    pub fn attempt(&self) -> ::std::option::Option<i32> {
        self.attempt
    }
}
impl GetJobRunInput {
    /// Creates a new builder-style object to manufacture [`GetJobRunInput`](crate::operation::get_job_run::GetJobRunInput).
    pub fn builder() -> crate::operation::get_job_run::builders::GetJobRunInputBuilder {
        crate::operation::get_job_run::builders::GetJobRunInputBuilder::default()
    }
}

/// A builder for [`GetJobRunInput`](crate::operation::get_job_run::GetJobRunInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetJobRunInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) job_run_id: ::std::option::Option<::std::string::String>,
    pub(crate) attempt: ::std::option::Option<i32>,
}
impl GetJobRunInputBuilder {
    /// <p>The ID of the application on which the job run is submitted.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the application on which the job run is submitted.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The ID of the application on which the job run is submitted.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The ID of the job run.</p>
    /// This field is required.
    pub fn job_run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_run_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the job run.</p>
    pub fn set_job_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_run_id = input;
        self
    }
    /// <p>The ID of the job run.</p>
    pub fn get_job_run_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_run_id
    }
    /// <p>An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.</p>
    pub fn attempt(mut self, input: i32) -> Self {
        self.attempt = ::std::option::Option::Some(input);
        self
    }
    /// <p>An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.</p>
    pub fn set_attempt(mut self, input: ::std::option::Option<i32>) -> Self {
        self.attempt = input;
        self
    }
    /// <p>An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.</p>
    pub fn get_attempt(&self) -> &::std::option::Option<i32> {
        &self.attempt
    }
    /// Consumes the builder and constructs a [`GetJobRunInput`](crate::operation::get_job_run::GetJobRunInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_job_run::GetJobRunInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_job_run::GetJobRunInput {
            application_id: self.application_id,
            job_run_id: self.job_run_id,
            attempt: self.attempt,
        })
    }
}