aws-sdk-s3control 1.109.0

AWS SDK for AWS S3 Control
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 UpdateJobStatusInput {
    /// <p>The Amazon Web Services account ID associated with the S3 Batch Operations job.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the job whose status you want to update.</p>
    pub job_id: ::std::option::Option<::std::string::String>,
    /// <p>The status that you want to move the specified job to.</p>
    pub requested_job_status: ::std::option::Option<crate::types::RequestedJobStatus>,
    /// <p>A description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.</p>
    pub status_update_reason: ::std::option::Option<::std::string::String>,
}
impl UpdateJobStatusInput {
    /// <p>The Amazon Web Services account ID associated with the S3 Batch Operations job.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The ID of the job whose status you want to update.</p>
    pub fn job_id(&self) -> ::std::option::Option<&str> {
        self.job_id.as_deref()
    }
    /// <p>The status that you want to move the specified job to.</p>
    pub fn requested_job_status(&self) -> ::std::option::Option<&crate::types::RequestedJobStatus> {
        self.requested_job_status.as_ref()
    }
    /// <p>A description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.</p>
    pub fn status_update_reason(&self) -> ::std::option::Option<&str> {
        self.status_update_reason.as_deref()
    }
}
impl UpdateJobStatusInput {
    /// Creates a new builder-style object to manufacture [`UpdateJobStatusInput`](crate::operation::update_job_status::UpdateJobStatusInput).
    pub fn builder() -> crate::operation::update_job_status::builders::UpdateJobStatusInputBuilder {
        crate::operation::update_job_status::builders::UpdateJobStatusInputBuilder::default()
    }
}

/// A builder for [`UpdateJobStatusInput`](crate::operation::update_job_status::UpdateJobStatusInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateJobStatusInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) job_id: ::std::option::Option<::std::string::String>,
    pub(crate) requested_job_status: ::std::option::Option<crate::types::RequestedJobStatus>,
    pub(crate) status_update_reason: ::std::option::Option<::std::string::String>,
}
impl UpdateJobStatusInputBuilder {
    /// <p>The Amazon Web Services account ID associated with the S3 Batch Operations job.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID associated with the S3 Batch Operations job.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID associated with the S3 Batch Operations job.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The ID of the job whose status you want 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 ID of the job whose status you want 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 ID of the job whose status you want to update.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_id
    }
    /// <p>The status that you want to move the specified job to.</p>
    /// This field is required.
    pub fn requested_job_status(mut self, input: crate::types::RequestedJobStatus) -> Self {
        self.requested_job_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status that you want to move the specified job to.</p>
    pub fn set_requested_job_status(mut self, input: ::std::option::Option<crate::types::RequestedJobStatus>) -> Self {
        self.requested_job_status = input;
        self
    }
    /// <p>The status that you want to move the specified job to.</p>
    pub fn get_requested_job_status(&self) -> &::std::option::Option<crate::types::RequestedJobStatus> {
        &self.requested_job_status
    }
    /// <p>A description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.</p>
    pub fn status_update_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_update_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.</p>
    pub fn set_status_update_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_update_reason = input;
        self
    }
    /// <p>A description of the reason why you want to change the specified job's status. This field can be any string up to the maximum length.</p>
    pub fn get_status_update_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_update_reason
    }
    /// Consumes the builder and constructs a [`UpdateJobStatusInput`](crate::operation::update_job_status::UpdateJobStatusInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_job_status::UpdateJobStatusInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_job_status::UpdateJobStatusInput {
            account_id: self.account_id,
            job_id: self.job_id,
            requested_job_status: self.requested_job_status,
            status_update_reason: self.status_update_reason,
        })
    }
}