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 details for the CreateJob request.</p>
7    pub details: ::std::option::Option<crate::types::RequestDetails>,
8    /// <p>The type of job to be created.</p>
9    pub r#type: ::std::option::Option<crate::types::Type>,
10}
11impl CreateJobInput {
12    /// <p>The details for the CreateJob request.</p>
13    pub fn details(&self) -> ::std::option::Option<&crate::types::RequestDetails> {
14        self.details.as_ref()
15    }
16    /// <p>The type of job to be created.</p>
17    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
18        self.r#type.as_ref()
19    }
20}
21impl CreateJobInput {
22    /// Creates a new builder-style object to manufacture [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
23    pub fn builder() -> crate::operation::create_job::builders::CreateJobInputBuilder {
24        crate::operation::create_job::builders::CreateJobInputBuilder::default()
25    }
26}
27
28/// A builder for [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct CreateJobInputBuilder {
32    pub(crate) details: ::std::option::Option<crate::types::RequestDetails>,
33    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
34}
35impl CreateJobInputBuilder {
36    /// <p>The details for the CreateJob request.</p>
37    /// This field is required.
38    pub fn details(mut self, input: crate::types::RequestDetails) -> Self {
39        self.details = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The details for the CreateJob request.</p>
43    pub fn set_details(mut self, input: ::std::option::Option<crate::types::RequestDetails>) -> Self {
44        self.details = input;
45        self
46    }
47    /// <p>The details for the CreateJob request.</p>
48    pub fn get_details(&self) -> &::std::option::Option<crate::types::RequestDetails> {
49        &self.details
50    }
51    /// <p>The type of job to be created.</p>
52    /// This field is required.
53    pub fn r#type(mut self, input: crate::types::Type) -> Self {
54        self.r#type = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>The type of job to be created.</p>
58    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
59        self.r#type = input;
60        self
61    }
62    /// <p>The type of job to be created.</p>
63    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
64        &self.r#type
65    }
66    /// Consumes the builder and constructs a [`CreateJobInput`](crate::operation::create_job::CreateJobInput).
67    pub fn build(self) -> ::std::result::Result<crate::operation::create_job::CreateJobInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::create_job::CreateJobInput {
69            details: self.details,
70            r#type: self.r#type,
71        })
72    }
73}