pub struct Builder { /* private fields */ }
Expand description
A builder for CreateUpdatedImageOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_image(self, input: Option<Image>) -> Self
pub fn set_image(self, input: Option<Image>) -> Self
Describes an image.
Examples found in repository?
src/json_deser.rs (lines 1278-1280)
1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
pub(crate) fn deser_operation_crate_operation_create_updated_image(
value: &[u8],
mut builder: crate::output::create_updated_image_output::Builder,
) -> Result<
crate::output::create_updated_image_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() {
"image" => {
builder = builder.set_image(
crate::json_deser::deser_structure_crate_model_image(tokens)?,
);
}
"canUpdateImage" => {
builder = builder.set_can_update_image(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
_ => 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 can_update_image(self, input: bool) -> Self
pub fn can_update_image(self, input: bool) -> Self
Indicates whether a new image can be created.
sourcepub fn set_can_update_image(self, input: Option<bool>) -> Self
pub fn set_can_update_image(self, input: Option<bool>) -> Self
Indicates whether a new image can be created.
Examples found in repository?
src/json_deser.rs (lines 1283-1287)
1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
pub(crate) fn deser_operation_crate_operation_create_updated_image(
value: &[u8],
mut builder: crate::output::create_updated_image_output::Builder,
) -> Result<
crate::output::create_updated_image_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() {
"image" => {
builder = builder.set_image(
crate::json_deser::deser_structure_crate_model_image(tokens)?,
);
}
"canUpdateImage" => {
builder = builder.set_can_update_image(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
_ => 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) -> CreateUpdatedImageOutput
pub fn build(self) -> CreateUpdatedImageOutput
Consumes the builder and constructs a CreateUpdatedImageOutput
.
Examples found in repository?
src/operation_deser.rs (line 2081)
2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083
pub fn parse_create_updated_image_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::CreateUpdatedImageOutput,
crate::error::CreateUpdatedImageError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_updated_image_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_updated_image(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateUpdatedImageError::unhandled)?;
output.build()
})
}