Struct aws_sdk_computeoptimizer::output::export_lambda_function_recommendations_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ExportLambdaFunctionRecommendationsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn job_id(self, input: impl Into<String>) -> Self
pub fn job_id(self, input: impl Into<String>) -> Self
The identification number of the export job.
Use the DescribeRecommendationExportJobs
action, and specify the job ID to view the status of an export job.
sourcepub fn set_job_id(self, input: Option<String>) -> Self
pub fn set_job_id(self, input: Option<String>) -> Self
The identification number of the export job.
Use the DescribeRecommendationExportJobs
action, and specify the job ID to view the status of an export job.
Examples found in repository?
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717
pub(crate) fn deser_operation_crate_operation_export_lambda_function_recommendations(
value: &[u8],
mut builder: crate::output::export_lambda_function_recommendations_output::Builder,
) -> Result<
crate::output::export_lambda_function_recommendations_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() {
"jobId" => {
builder = builder.set_job_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"s3Destination" => {
builder = builder.set_s3_destination(
crate::json_deser::deser_structure_crate_model_s3_destination(tokens)?,
);
}
_ => 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 s3_destination(self, input: S3Destination) -> Self
pub fn s3_destination(self, input: S3Destination) -> Self
Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object keys of a recommendations export file, and its associated metadata file.
sourcepub fn set_s3_destination(self, input: Option<S3Destination>) -> Self
pub fn set_s3_destination(self, input: Option<S3Destination>) -> Self
Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object keys of a recommendations export file, and its associated metadata file.
Examples found in repository?
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717
pub(crate) fn deser_operation_crate_operation_export_lambda_function_recommendations(
value: &[u8],
mut builder: crate::output::export_lambda_function_recommendations_output::Builder,
) -> Result<
crate::output::export_lambda_function_recommendations_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() {
"jobId" => {
builder = builder.set_job_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"s3Destination" => {
builder = builder.set_s3_destination(
crate::json_deser::deser_structure_crate_model_s3_destination(tokens)?,
);
}
_ => 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) -> ExportLambdaFunctionRecommendationsOutput
pub fn build(self) -> ExportLambdaFunctionRecommendationsOutput
Consumes the builder and constructs a ExportLambdaFunctionRecommendationsOutput
.
Examples found in repository?
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918
pub fn parse_export_lambda_function_recommendations_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ExportLambdaFunctionRecommendationsOutput,
crate::error::ExportLambdaFunctionRecommendationsError,
> {
Ok({
#[allow(unused_mut)]
let mut output =
crate::output::export_lambda_function_recommendations_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_export_lambda_function_recommendations(response.body().as_ref(), output).map_err(crate::error::ExportLambdaFunctionRecommendationsError::unhandled)?;
output.build()
})
}