aws_sdk_dataexchange/operation/create_job/
_create_job_input.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// 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 details for the CreateJob request.</p>
    pub details: ::std::option::Option<crate::types::RequestDetails>,
    /// <p>The type of job to be created.</p>
    pub r#type: ::std::option::Option<crate::types::Type>,
}
impl CreateJobInput {
    /// <p>The details for the CreateJob request.</p>
    pub fn details(&self) -> ::std::option::Option<&crate::types::RequestDetails> {
        self.details.as_ref()
    }
    /// <p>The type of job to be created.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
        self.r#type.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) details: ::std::option::Option<crate::types::RequestDetails>,
    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
}
impl CreateJobInputBuilder {
    /// <p>The details for the CreateJob request.</p>
    /// This field is required.
    pub fn details(mut self, input: crate::types::RequestDetails) -> Self {
        self.details = ::std::option::Option::Some(input);
        self
    }
    /// <p>The details for the CreateJob request.</p>
    pub fn set_details(mut self, input: ::std::option::Option<crate::types::RequestDetails>) -> Self {
        self.details = input;
        self
    }
    /// <p>The details for the CreateJob request.</p>
    pub fn get_details(&self) -> &::std::option::Option<crate::types::RequestDetails> {
        &self.details
    }
    /// <p>The type of job to be created.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::Type) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of job to be created.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of job to be created.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
        &self.r#type
    }
    /// 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 {
            details: self.details,
            r#type: self.r#type,
        })
    }
}