aws-sdk-batch 1.114.0

AWS SDK for AWS Batch
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 UpdateServiceJobInput {
    /// <p>The Batch job ID of the job to update.</p>
    pub job_id: ::std::option::Option<::std::string::String>,
    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a quota-share or fair-share scheduling policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority within a share.</p>
    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
    pub scheduling_priority: ::std::option::Option<i32>,
}
impl UpdateServiceJobInput {
    /// <p>The Batch job ID of the job to update.</p>
    pub fn job_id(&self) -> ::std::option::Option<&str> {
        self.job_id.as_deref()
    }
    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a quota-share or fair-share scheduling policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority within a share.</p>
    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
    pub fn scheduling_priority(&self) -> ::std::option::Option<i32> {
        self.scheduling_priority
    }
}
impl UpdateServiceJobInput {
    /// Creates a new builder-style object to manufacture [`UpdateServiceJobInput`](crate::operation::update_service_job::UpdateServiceJobInput).
    pub fn builder() -> crate::operation::update_service_job::builders::UpdateServiceJobInputBuilder {
        crate::operation::update_service_job::builders::UpdateServiceJobInputBuilder::default()
    }
}

/// A builder for [`UpdateServiceJobInput`](crate::operation::update_service_job::UpdateServiceJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateServiceJobInputBuilder {
    pub(crate) job_id: ::std::option::Option<::std::string::String>,
    pub(crate) scheduling_priority: ::std::option::Option<i32>,
}
impl UpdateServiceJobInputBuilder {
    /// <p>The Batch job ID of the job to update.</p>
    /// This field is required.
    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Batch job ID of the job to update.</p>
    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_id = input;
        self
    }
    /// <p>The Batch job ID of the job to update.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_id
    }
    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a quota-share or fair-share scheduling policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority within a share.</p>
    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
    /// This field is required.
    pub fn scheduling_priority(mut self, input: i32) -> Self {
        self.scheduling_priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a quota-share or fair-share scheduling policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority within a share.</p>
    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
    pub fn set_scheduling_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.scheduling_priority = input;
        self
    }
    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a quota-share or fair-share scheduling policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority within a share.</p>
    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
    pub fn get_scheduling_priority(&self) -> &::std::option::Option<i32> {
        &self.scheduling_priority
    }
    /// Consumes the builder and constructs a [`UpdateServiceJobInput`](crate::operation::update_service_job::UpdateServiceJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_service_job::UpdateServiceJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_service_job::UpdateServiceJobInput {
            job_id: self.job_id,
            scheduling_priority: self.scheduling_priority,
        })
    }
}