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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
// 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 GetMatchingJobOutput {
    /// <p>The ID of the job.</p>
    pub job_id: ::std::string::String,
    /// <p>The current status of the job.</p>
    pub status: crate::types::JobStatus,
    /// <p>The time at which the job was started.</p>
    pub start_time: ::aws_smithy_types::DateTime,
    /// <p>The time at which the job has finished.</p>
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Metrics associated with the execution, specifically total records processed, unique IDs generated, and records the execution skipped.</p>
    pub metrics: ::std::option::Option<crate::types::JobMetrics>,
    /// <p>An object containing an error message, if there was an error.</p>
    pub error_details: ::std::option::Option<crate::types::ErrorDetails>,
    /// <p>A list of <code>OutputSource</code> objects.</p>
    pub output_source_config: ::std::option::Option<::std::vec::Vec<crate::types::JobOutputSource>>,
    _request_id: Option<String>,
}
impl GetMatchingJobOutput {
    /// <p>The ID of the job.</p>
    pub fn job_id(&self) -> &str {
        use std::ops::Deref;
        self.job_id.deref()
    }
    /// <p>The current status of the job.</p>
    pub fn status(&self) -> &crate::types::JobStatus {
        &self.status
    }
    /// <p>The time at which the job was started.</p>
    pub fn start_time(&self) -> &::aws_smithy_types::DateTime {
        &self.start_time
    }
    /// <p>The time at which the job has finished.</p>
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>Metrics associated with the execution, specifically total records processed, unique IDs generated, and records the execution skipped.</p>
    pub fn metrics(&self) -> ::std::option::Option<&crate::types::JobMetrics> {
        self.metrics.as_ref()
    }
    /// <p>An object containing an error message, if there was an error.</p>
    pub fn error_details(&self) -> ::std::option::Option<&crate::types::ErrorDetails> {
        self.error_details.as_ref()
    }
    /// <p>A list of <code>OutputSource</code> objects.</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 `.output_source_config.is_none()`.
    pub fn output_source_config(&self) -> &[crate::types::JobOutputSource] {
        self.output_source_config.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for GetMatchingJobOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetMatchingJobOutput {
    /// Creates a new builder-style object to manufacture [`GetMatchingJobOutput`](crate::operation::get_matching_job::GetMatchingJobOutput).
    pub fn builder() -> crate::operation::get_matching_job::builders::GetMatchingJobOutputBuilder {
        crate::operation::get_matching_job::builders::GetMatchingJobOutputBuilder::default()
    }
}

/// A builder for [`GetMatchingJobOutput`](crate::operation::get_matching_job::GetMatchingJobOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetMatchingJobOutputBuilder {
    pub(crate) job_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::JobStatus>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) metrics: ::std::option::Option<crate::types::JobMetrics>,
    pub(crate) error_details: ::std::option::Option<crate::types::ErrorDetails>,
    pub(crate) output_source_config: ::std::option::Option<::std::vec::Vec<crate::types::JobOutputSource>>,
    _request_id: Option<String>,
}
impl GetMatchingJobOutputBuilder {
    /// <p>The ID of the job.</p>
    /// This field is required.
    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the job.</p>
    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_id = input;
        self
    }
    /// <p>The ID of the job.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_id
    }
    /// <p>The current status of the job.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::JobStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the job.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::JobStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the job.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::JobStatus> {
        &self.status
    }
    /// <p>The time at which the job was started.</p>
    /// This field is required.
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the job was started.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The time at which the job was started.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The time at which the job has finished.</p>
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the job has finished.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>The time at which the job has finished.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// <p>Metrics associated with the execution, specifically total records processed, unique IDs generated, and records the execution skipped.</p>
    pub fn metrics(mut self, input: crate::types::JobMetrics) -> Self {
        self.metrics = ::std::option::Option::Some(input);
        self
    }
    /// <p>Metrics associated with the execution, specifically total records processed, unique IDs generated, and records the execution skipped.</p>
    pub fn set_metrics(mut self, input: ::std::option::Option<crate::types::JobMetrics>) -> Self {
        self.metrics = input;
        self
    }
    /// <p>Metrics associated with the execution, specifically total records processed, unique IDs generated, and records the execution skipped.</p>
    pub fn get_metrics(&self) -> &::std::option::Option<crate::types::JobMetrics> {
        &self.metrics
    }
    /// <p>An object containing an error message, if there was an error.</p>
    pub fn error_details(mut self, input: crate::types::ErrorDetails) -> Self {
        self.error_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object containing an error message, if there was an error.</p>
    pub fn set_error_details(mut self, input: ::std::option::Option<crate::types::ErrorDetails>) -> Self {
        self.error_details = input;
        self
    }
    /// <p>An object containing an error message, if there was an error.</p>
    pub fn get_error_details(&self) -> &::std::option::Option<crate::types::ErrorDetails> {
        &self.error_details
    }
    /// Appends an item to `output_source_config`.
    ///
    /// To override the contents of this collection use [`set_output_source_config`](Self::set_output_source_config).
    ///
    /// <p>A list of <code>OutputSource</code> objects.</p>
    pub fn output_source_config(mut self, input: crate::types::JobOutputSource) -> Self {
        let mut v = self.output_source_config.unwrap_or_default();
        v.push(input);
        self.output_source_config = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of <code>OutputSource</code> objects.</p>
    pub fn set_output_source_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobOutputSource>>) -> Self {
        self.output_source_config = input;
        self
    }
    /// <p>A list of <code>OutputSource</code> objects.</p>
    pub fn get_output_source_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobOutputSource>> {
        &self.output_source_config
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetMatchingJobOutput`](crate::operation::get_matching_job::GetMatchingJobOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`job_id`](crate::operation::get_matching_job::builders::GetMatchingJobOutputBuilder::job_id)
    /// - [`status`](crate::operation::get_matching_job::builders::GetMatchingJobOutputBuilder::status)
    /// - [`start_time`](crate::operation::get_matching_job::builders::GetMatchingJobOutputBuilder::start_time)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_matching_job::GetMatchingJobOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_matching_job::GetMatchingJobOutput {
            job_id: self.job_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "job_id",
                    "job_id was not specified but it is required when building GetMatchingJobOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetMatchingJobOutput",
                )
            })?,
            start_time: self.start_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "start_time",
                    "start_time was not specified but it is required when building GetMatchingJobOutput",
                )
            })?,
            end_time: self.end_time,
            metrics: self.metrics,
            error_details: self.error_details,
            output_source_config: self.output_source_config,
            _request_id: self._request_id,
        })
    }
}