pub struct Builder { /* private fields */ }
Expand description
A builder for ExportBackupPlanTemplateOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn backup_plan_template_json(self, input: impl Into<String>) -> Self
pub fn backup_plan_template_json(self, input: impl Into<String>) -> Self
The body of a backup plan template in JSON format.
This is a signed JSON document that cannot be modified before being passed to GetBackupPlanFromJSON.
sourcepub fn set_backup_plan_template_json(self, input: Option<String>) -> Self
pub fn set_backup_plan_template_json(self, input: Option<String>) -> Self
The body of a backup plan template in JSON format.
This is a signed JSON document that cannot be modified before being passed to GetBackupPlanFromJSON.
Examples found in repository?
src/json_deser.rs (lines 2333-2339)
2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362
pub(crate) fn deser_operation_crate_operation_export_backup_plan_template(
value: &[u8],
mut builder: crate::output::export_backup_plan_template_output::Builder,
) -> Result<
crate::output::export_backup_plan_template_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() {
"BackupPlanTemplateJson" => {
builder = builder.set_backup_plan_template_json(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.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) -> ExportBackupPlanTemplateOutput
pub fn build(self) -> ExportBackupPlanTemplateOutput
Consumes the builder and constructs a ExportBackupPlanTemplateOutput
.
Examples found in repository?
src/operation_deser.rs (line 3088)
3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090
pub fn parse_export_backup_plan_template_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ExportBackupPlanTemplateOutput,
crate::error::ExportBackupPlanTemplateError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::export_backup_plan_template_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_export_backup_plan_template(
response.body().as_ref(),
output,
)
.map_err(crate::error::ExportBackupPlanTemplateError::unhandled)?;
output.build()
})
}