aws-sdk-s3control 1.119.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 ListJobsInput {
    /// <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 <code>List Jobs</code> request returns jobs that match the statuses listed in this element.</p>
    pub job_statuses: ::std::option::Option<::std::vec::Vec<crate::types::JobStatus>>,
    /// <p>A pagination token to request the next page of results. Use the token that Amazon S3 returned in the <code>NextToken</code> element of the <code>ListJobsResult</code> from the previous <code>List Jobs</code> request.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of jobs that Amazon S3 will include in the <code>List Jobs</code> response. If there are more jobs than this number, the response will include a pagination token in the <code>NextToken</code> field to enable you to retrieve the next page of results.</p>
    pub max_results: ::std::option::Option<i32>,
}
impl ListJobsInput {
    /// <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 <code>List Jobs</code> request returns jobs that match the statuses listed in this element.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.job_statuses.is_none()`.
    pub fn job_statuses(&self) -> &[crate::types::JobStatus] {
        self.job_statuses.as_deref().unwrap_or_default()
    }
    /// <p>A pagination token to request the next page of results. Use the token that Amazon S3 returned in the <code>NextToken</code> element of the <code>ListJobsResult</code> from the previous <code>List Jobs</code> request.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of jobs that Amazon S3 will include in the <code>List Jobs</code> response. If there are more jobs than this number, the response will include a pagination token in the <code>NextToken</code> field to enable you to retrieve the next page of results.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl ListJobsInput {
    /// Creates a new builder-style object to manufacture [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
    pub fn builder() -> crate::operation::list_jobs::builders::ListJobsInputBuilder {
        crate::operation::list_jobs::builders::ListJobsInputBuilder::default()
    }
}

/// A builder for [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListJobsInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) job_statuses: ::std::option::Option<::std::vec::Vec<crate::types::JobStatus>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl ListJobsInputBuilder {
    /// <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
    }
    /// Appends an item to `job_statuses`.
    ///
    /// To override the contents of this collection use [`set_job_statuses`](Self::set_job_statuses).
    ///
    /// <p>The <code>List Jobs</code> request returns jobs that match the statuses listed in this element.</p>
    pub fn job_statuses(mut self, input: crate::types::JobStatus) -> Self {
        let mut v = self.job_statuses.unwrap_or_default();
        v.push(input);
        self.job_statuses = ::std::option::Option::Some(v);
        self
    }
    /// <p>The <code>List Jobs</code> request returns jobs that match the statuses listed in this element.</p>
    pub fn set_job_statuses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobStatus>>) -> Self {
        self.job_statuses = input;
        self
    }
    /// <p>The <code>List Jobs</code> request returns jobs that match the statuses listed in this element.</p>
    pub fn get_job_statuses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobStatus>> {
        &self.job_statuses
    }
    /// <p>A pagination token to request the next page of results. Use the token that Amazon S3 returned in the <code>NextToken</code> element of the <code>ListJobsResult</code> from the previous <code>List Jobs</code> request.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A pagination token to request the next page of results. Use the token that Amazon S3 returned in the <code>NextToken</code> element of the <code>ListJobsResult</code> from the previous <code>List Jobs</code> request.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>A pagination token to request the next page of results. Use the token that Amazon S3 returned in the <code>NextToken</code> element of the <code>ListJobsResult</code> from the previous <code>List Jobs</code> request.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of jobs that Amazon S3 will include in the <code>List Jobs</code> response. If there are more jobs than this number, the response will include a pagination token in the <code>NextToken</code> field to enable you to retrieve the next page of results.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of jobs that Amazon S3 will include in the <code>List Jobs</code> response. If there are more jobs than this number, the response will include a pagination token in the <code>NextToken</code> field to enable you to retrieve the next page of results.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of jobs that Amazon S3 will include in the <code>List Jobs</code> response. If there are more jobs than this number, the response will include a pagination token in the <code>NextToken</code> field to enable you to retrieve the next page of results.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`ListJobsInput`](crate::operation::list_jobs::ListJobsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_jobs::ListJobsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_jobs::ListJobsInput {
            account_id: self.account_id,
            job_statuses: self.job_statuses,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}