aws-sdk-s3control 1.108.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 CreateJobInput {
    /// <p>The Amazon Web Services account ID that creates the job.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether confirmation is required before Amazon S3 runs the job. Confirmation is only required for jobs created through the Amazon S3 console.</p>
    pub confirmation_required: ::std::option::Option<bool>,
    /// <p>The action that you want this job to perform on every object listed in the manifest. For more information about the available actions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html">Operations</a> in the <i>Amazon S3 User Guide</i>.</p>
    pub operation: ::std::option::Option<crate::types::JobOperation>,
    /// <p>Configuration parameters for the optional job-completion report.</p>
    pub report: ::std::option::Option<crate::types::JobReport>,
    /// <p>An idempotency token to ensure that you don't accidentally submit the same request twice. You can use any string up to the maximum length.</p>
    pub client_request_token: ::std::option::Option<::std::string::String>,
    /// <p>Configuration parameters for the manifest.</p>
    pub manifest: ::std::option::Option<crate::types::JobManifest>,
    /// <p>A description for this job. You can use any string within the permitted length. Descriptions don't need to be unique and can be used for multiple jobs.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The numerical priority for this job. Higher numbers indicate higher priority.</p>
    pub priority: ::std::option::Option<i32>,
    /// <p>The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) role that Batch Operations will use to run this job's action on every object in the manifest.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>A set of tags to associate with the S3 Batch Operations job. This is an optional parameter.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::S3Tag>>,
    /// <p>The attribute container for the ManifestGenerator details. Jobs must be created with either a manifest file or a ManifestGenerator, but not both.</p>
    pub manifest_generator: ::std::option::Option<crate::types::JobManifestGenerator>,
}
impl CreateJobInput {
    /// <p>The Amazon Web Services account ID that creates the job.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>Indicates whether confirmation is required before Amazon S3 runs the job. Confirmation is only required for jobs created through the Amazon S3 console.</p>
    pub fn confirmation_required(&self) -> ::std::option::Option<bool> {
        self.confirmation_required
    }
    /// <p>The action that you want this job to perform on every object listed in the manifest. For more information about the available actions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html">Operations</a> in the <i>Amazon S3 User Guide</i>.</p>
    pub fn operation(&self) -> ::std::option::Option<&crate::types::JobOperation> {
        self.operation.as_ref()
    }
    /// <p>Configuration parameters for the optional job-completion report.</p>
    pub fn report(&self) -> ::std::option::Option<&crate::types::JobReport> {
        self.report.as_ref()
    }
    /// <p>An idempotency token to ensure that you don't accidentally submit the same request twice. You can use any string up to the maximum length.</p>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
    /// <p>Configuration parameters for the manifest.</p>
    pub fn manifest(&self) -> ::std::option::Option<&crate::types::JobManifest> {
        self.manifest.as_ref()
    }
    /// <p>A description for this job. You can use any string within the permitted length. Descriptions don't need to be unique and can be used for multiple jobs.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The numerical priority for this job. Higher numbers indicate higher priority.</p>
    pub fn priority(&self) -> ::std::option::Option<i32> {
        self.priority
    }
    /// <p>The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) role that Batch Operations will use to run this job's action on every object in the manifest.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>A set of tags to associate with the S3 Batch Operations job. This is an optional parameter.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::S3Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The attribute container for the ManifestGenerator details. Jobs must be created with either a manifest file or a ManifestGenerator, but not both.</p>
    pub fn manifest_generator(&self) -> ::std::option::Option<&crate::types::JobManifestGenerator> {
        self.manifest_generator.as_ref()
    }
}
impl CreateJobInput {
    /// Creates a new builder-style object to manufacture [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
    pub fn builder() -> crate::operation::create_job::builders::CreateJobInputBuilder {
        crate::operation::create_job::builders::CreateJobInputBuilder::default()
    }
}

/// A builder for [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateJobInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) confirmation_required: ::std::option::Option<bool>,
    pub(crate) operation: ::std::option::Option<crate::types::JobOperation>,
    pub(crate) report: ::std::option::Option<crate::types::JobReport>,
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
    pub(crate) manifest: ::std::option::Option<crate::types::JobManifest>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) priority: ::std::option::Option<i32>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::S3Tag>>,
    pub(crate) manifest_generator: ::std::option::Option<crate::types::JobManifestGenerator>,
}
impl CreateJobInputBuilder {
    /// <p>The Amazon Web Services account ID that creates the 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 that creates the 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 that creates the job.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>Indicates whether confirmation is required before Amazon S3 runs the job. Confirmation is only required for jobs created through the Amazon S3 console.</p>
    pub fn confirmation_required(mut self, input: bool) -> Self {
        self.confirmation_required = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether confirmation is required before Amazon S3 runs the job. Confirmation is only required for jobs created through the Amazon S3 console.</p>
    pub fn set_confirmation_required(mut self, input: ::std::option::Option<bool>) -> Self {
        self.confirmation_required = input;
        self
    }
    /// <p>Indicates whether confirmation is required before Amazon S3 runs the job. Confirmation is only required for jobs created through the Amazon S3 console.</p>
    pub fn get_confirmation_required(&self) -> &::std::option::Option<bool> {
        &self.confirmation_required
    }
    /// <p>The action that you want this job to perform on every object listed in the manifest. For more information about the available actions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html">Operations</a> in the <i>Amazon S3 User Guide</i>.</p>
    /// This field is required.
    pub fn operation(mut self, input: crate::types::JobOperation) -> Self {
        self.operation = ::std::option::Option::Some(input);
        self
    }
    /// <p>The action that you want this job to perform on every object listed in the manifest. For more information about the available actions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html">Operations</a> in the <i>Amazon S3 User Guide</i>.</p>
    pub fn set_operation(mut self, input: ::std::option::Option<crate::types::JobOperation>) -> Self {
        self.operation = input;
        self
    }
    /// <p>The action that you want this job to perform on every object listed in the manifest. For more information about the available actions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-operations.html">Operations</a> in the <i>Amazon S3 User Guide</i>.</p>
    pub fn get_operation(&self) -> &::std::option::Option<crate::types::JobOperation> {
        &self.operation
    }
    /// <p>Configuration parameters for the optional job-completion report.</p>
    /// This field is required.
    pub fn report(mut self, input: crate::types::JobReport) -> Self {
        self.report = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration parameters for the optional job-completion report.</p>
    pub fn set_report(mut self, input: ::std::option::Option<crate::types::JobReport>) -> Self {
        self.report = input;
        self
    }
    /// <p>Configuration parameters for the optional job-completion report.</p>
    pub fn get_report(&self) -> &::std::option::Option<crate::types::JobReport> {
        &self.report
    }
    /// <p>An idempotency token to ensure that you don't accidentally submit the same request twice. You can use any string up to the maximum length.</p>
    /// This field is required.
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An idempotency token to ensure that you don't accidentally submit the same request twice. You can use any string up to the maximum length.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>An idempotency token to ensure that you don't accidentally submit the same request twice. You can use any string up to the maximum length.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// <p>Configuration parameters for the manifest.</p>
    pub fn manifest(mut self, input: crate::types::JobManifest) -> Self {
        self.manifest = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration parameters for the manifest.</p>
    pub fn set_manifest(mut self, input: ::std::option::Option<crate::types::JobManifest>) -> Self {
        self.manifest = input;
        self
    }
    /// <p>Configuration parameters for the manifest.</p>
    pub fn get_manifest(&self) -> &::std::option::Option<crate::types::JobManifest> {
        &self.manifest
    }
    /// <p>A description for this job. You can use any string within the permitted length. Descriptions don't need to be unique and can be used for multiple jobs.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description for this job. You can use any string within the permitted length. Descriptions don't need to be unique and can be used for multiple jobs.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for this job. You can use any string within the permitted length. Descriptions don't need to be unique and can be used for multiple jobs.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The numerical priority for this job. Higher numbers indicate higher priority.</p>
    /// This field is required.
    pub fn priority(mut self, input: i32) -> Self {
        self.priority = ::std::option::Option::Some(input);
        self
    }
    /// <p>The numerical priority for this job. Higher numbers indicate higher priority.</p>
    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
        self.priority = input;
        self
    }
    /// <p>The numerical priority for this job. Higher numbers indicate higher priority.</p>
    pub fn get_priority(&self) -> &::std::option::Option<i32> {
        &self.priority
    }
    /// <p>The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) role that Batch Operations will use to run this job's action on every object in the manifest.</p>
    /// This field is required.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) role that Batch Operations will use to run this job's action on every object in the manifest.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the Identity and Access Management (IAM) role that Batch Operations will use to run this job's action on every object in the manifest.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A set of tags to associate with the S3 Batch Operations job. This is an optional parameter.</p>
    pub fn tags(mut self, input: crate::types::S3Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>A set of tags to associate with the S3 Batch Operations job. This is an optional parameter.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::S3Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A set of tags to associate with the S3 Batch Operations job. This is an optional parameter.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::S3Tag>> {
        &self.tags
    }
    /// <p>The attribute container for the ManifestGenerator details. Jobs must be created with either a manifest file or a ManifestGenerator, but not both.</p>
    pub fn manifest_generator(mut self, input: crate::types::JobManifestGenerator) -> Self {
        self.manifest_generator = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attribute container for the ManifestGenerator details. Jobs must be created with either a manifest file or a ManifestGenerator, but not both.</p>
    pub fn set_manifest_generator(mut self, input: ::std::option::Option<crate::types::JobManifestGenerator>) -> Self {
        self.manifest_generator = input;
        self
    }
    /// <p>The attribute container for the ManifestGenerator details. Jobs must be created with either a manifest file or a ManifestGenerator, but not both.</p>
    pub fn get_manifest_generator(&self) -> &::std::option::Option<crate::types::JobManifestGenerator> {
        &self.manifest_generator
    }
    /// Consumes the builder and constructs a [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_job::CreateJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_job::CreateJobInput {
            account_id: self.account_id,
            confirmation_required: self.confirmation_required,
            operation: self.operation,
            report: self.report,
            client_request_token: self.client_request_token,
            manifest: self.manifest,
            description: self.description,
            priority: self.priority,
            role_arn: self.role_arn,
            tags: self.tags,
            manifest_generator: self.manifest_generator,
        })
    }
}