pub struct Builder { /* private fields */ }Expand description
A builder for AcknowledgeJobOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn status(self, input: JobStatus) -> Self
pub fn status(self, input: JobStatus) -> Self
Whether the job worker has received the specified job.
sourcepub fn set_status(self, input: Option<JobStatus>) -> Self
pub fn set_status(self, input: Option<JobStatus>) -> Self
Whether the job worker has received the specified job.
Examples found in repository?
src/json_deser.rs (lines 173-182)
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
pub(crate) fn deser_operation_crate_operation_acknowledge_job(
value: &[u8],
mut builder: crate::output::acknowledge_job_output::Builder,
) -> Result<
crate::output::acknowledge_job_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"status" => {
builder = builder.set_status(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::JobStatus::from(u.as_ref()))
})
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}sourcepub fn build(self) -> AcknowledgeJobOutput
pub fn build(self) -> AcknowledgeJobOutput
Consumes the builder and constructs a AcknowledgeJobOutput.
Examples found in repository?
src/operation_deser.rs (line 83)
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
pub fn parse_acknowledge_job_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::AcknowledgeJobOutput, crate::error::AcknowledgeJobError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::acknowledge_job_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_acknowledge_job(
response.body().as_ref(),
output,
)
.map_err(crate::error::AcknowledgeJobError::unhandled)?;
output.build()
})
}