Skip to main content

aws_sdk_dataexchange/operation/create_job/
_create_job_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateJobInput {
6    /// <p>The configuration for the asset, including tags to be applied to assets created by the job.</p>
7    pub asset_configuration: ::std::option::Option<crate::types::AssetConfiguration>,
8    /// <p>The details for the CreateJob request.</p>
9    pub details: ::std::option::Option<crate::types::RequestDetails>,
10    /// <p>The type of job to be created.</p>
11    pub r#type: ::std::option::Option<crate::types::Type>,
12}
13impl CreateJobInput {
14    /// <p>The configuration for the asset, including tags to be applied to assets created by the job.</p>
15    pub fn asset_configuration(&self) -> ::std::option::Option<&crate::types::AssetConfiguration> {
16        self.asset_configuration.as_ref()
17    }
18    /// <p>The details for the CreateJob request.</p>
19    pub fn details(&self) -> ::std::option::Option<&crate::types::RequestDetails> {
20        self.details.as_ref()
21    }
22    /// <p>The type of job to be created.</p>
23    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
24        self.r#type.as_ref()
25    }
26}
27impl CreateJobInput {
28    /// Creates a new builder-style object to manufacture [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
29    pub fn builder() -> crate::operation::create_job::builders::CreateJobInputBuilder {
30        crate::operation::create_job::builders::CreateJobInputBuilder::default()
31    }
32}
33
34/// A builder for [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct CreateJobInputBuilder {
38    pub(crate) asset_configuration: ::std::option::Option<crate::types::AssetConfiguration>,
39    pub(crate) details: ::std::option::Option<crate::types::RequestDetails>,
40    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
41}
42impl CreateJobInputBuilder {
43    /// <p>The configuration for the asset, including tags to be applied to assets created by the job.</p>
44    pub fn asset_configuration(mut self, input: crate::types::AssetConfiguration) -> Self {
45        self.asset_configuration = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>The configuration for the asset, including tags to be applied to assets created by the job.</p>
49    pub fn set_asset_configuration(mut self, input: ::std::option::Option<crate::types::AssetConfiguration>) -> Self {
50        self.asset_configuration = input;
51        self
52    }
53    /// <p>The configuration for the asset, including tags to be applied to assets created by the job.</p>
54    pub fn get_asset_configuration(&self) -> &::std::option::Option<crate::types::AssetConfiguration> {
55        &self.asset_configuration
56    }
57    /// <p>The details for the CreateJob request.</p>
58    /// This field is required.
59    pub fn details(mut self, input: crate::types::RequestDetails) -> Self {
60        self.details = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The details for the CreateJob request.</p>
64    pub fn set_details(mut self, input: ::std::option::Option<crate::types::RequestDetails>) -> Self {
65        self.details = input;
66        self
67    }
68    /// <p>The details for the CreateJob request.</p>
69    pub fn get_details(&self) -> &::std::option::Option<crate::types::RequestDetails> {
70        &self.details
71    }
72    /// <p>The type of job to be created.</p>
73    /// This field is required.
74    pub fn r#type(mut self, input: crate::types::Type) -> Self {
75        self.r#type = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The type of job to be created.</p>
79    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
80        self.r#type = input;
81        self
82    }
83    /// <p>The type of job to be created.</p>
84    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
85        &self.r#type
86    }
87    /// Consumes the builder and constructs a [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::create_job::CreateJobInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::create_job::CreateJobInput {
90            asset_configuration: self.asset_configuration,
91            details: self.details,
92            r#type: self.r#type,
93        })
94    }
95}