Struct aws_sdk_lexmodelsv2::output::delete_export_output::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for DeleteExportOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn export_id(self, input: impl Into<String>) -> Self
pub fn export_id(self, input: impl Into<String>) -> Self
The unique identifier of the deleted export.
sourcepub fn set_export_id(self, input: Option<String>) -> Self
pub fn set_export_id(self, input: Option<String>) -> Self
The unique identifier of the deleted export.
Examples found in repository?
src/json_deser.rs (lines 1978-1984)
1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019
pub(crate) fn deser_operation_crate_operation_delete_export(
value: &[u8],
mut builder: crate::output::delete_export_output::Builder,
) -> Result<
crate::output::delete_export_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() {
"exportId" => {
builder = builder.set_export_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"exportStatus" => {
builder = builder.set_export_status(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::ExportStatus::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 export_status(self, input: ExportStatus) -> Self
pub fn export_status(self, input: ExportStatus) -> Self
The current status of the deletion. When the deletion is complete, the export will no longer be returned by the ListExports operation and calls to the DescribeExport operation with the export identifier will fail.
sourcepub fn set_export_status(self, input: Option<ExportStatus>) -> Self
pub fn set_export_status(self, input: Option<ExportStatus>) -> Self
The current status of the deletion. When the deletion is complete, the export will no longer be returned by the ListExports operation and calls to the DescribeExport operation with the export identifier will fail.
Examples found in repository?
src/json_deser.rs (lines 1987-1996)
1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019
pub(crate) fn deser_operation_crate_operation_delete_export(
value: &[u8],
mut builder: crate::output::delete_export_output::Builder,
) -> Result<
crate::output::delete_export_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() {
"exportId" => {
builder = builder.set_export_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"exportStatus" => {
builder = builder.set_export_status(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::ExportStatus::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) -> DeleteExportOutput
pub fn build(self) -> DeleteExportOutput
Consumes the builder and constructs a DeleteExportOutput.
Examples found in repository?
src/operation_deser.rs (line 2605)
2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607
pub fn parse_delete_export_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::DeleteExportOutput, crate::error::DeleteExportError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::delete_export_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_delete_export(
response.body().as_ref(),
output,
)
.map_err(crate::error::DeleteExportError::unhandled)?;
output.build()
})
}