pub struct Builder { /* private fields */ }Expand description
A builder for CreateTemplateAliasOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn template_alias(self, input: TemplateAlias) -> Self
pub fn template_alias(self, input: TemplateAlias) -> Self
Information about the template alias.
sourcepub fn set_template_alias(self, input: Option<TemplateAlias>) -> Self
pub fn set_template_alias(self, input: Option<TemplateAlias>) -> Self
Information about the template alias.
Examples found in repository?
src/json_deser.rs (lines 1914-1916)
1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939
pub(crate) fn deser_operation_crate_operation_create_template_alias(
value: &[u8],
mut builder: crate::output::create_template_alias_output::Builder,
) -> Result<
crate::output::create_template_alias_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() {
"RequestId" => {
builder = builder.set_request_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"TemplateAlias" => {
builder = builder.set_template_alias(
crate::json_deser::deser_structure_crate_model_template_alias(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 set_status(self, input: Option<i32>) -> Self
pub fn set_status(self, input: Option<i32>) -> Self
The HTTP status of the request.
Examples found in repository?
src/operation_deser.rs (line 2829)
2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832
pub fn parse_create_template_alias_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::CreateTemplateAliasOutput,
crate::error::CreateTemplateAliasError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_template_alias_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_template_alias(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateTemplateAliasError::unhandled)?;
output = output.set_status(Some(response.status().as_u16() as _));
output.build()
})
}sourcepub fn request_id(self, input: impl Into<String>) -> Self
pub fn request_id(self, input: impl Into<String>) -> Self
The Amazon Web Services request ID for this operation.
sourcepub fn set_request_id(self, input: Option<String>) -> Self
pub fn set_request_id(self, input: Option<String>) -> Self
The Amazon Web Services request ID for this operation.
Examples found in repository?
src/json_deser.rs (lines 1905-1911)
1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939
pub(crate) fn deser_operation_crate_operation_create_template_alias(
value: &[u8],
mut builder: crate::output::create_template_alias_output::Builder,
) -> Result<
crate::output::create_template_alias_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() {
"RequestId" => {
builder = builder.set_request_id(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"TemplateAlias" => {
builder = builder.set_template_alias(
crate::json_deser::deser_structure_crate_model_template_alias(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) -> CreateTemplateAliasOutput
pub fn build(self) -> CreateTemplateAliasOutput
Consumes the builder and constructs a CreateTemplateAliasOutput.
Examples found in repository?
src/operation_deser.rs (line 2830)
2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832
pub fn parse_create_template_alias_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::CreateTemplateAliasOutput,
crate::error::CreateTemplateAliasError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_template_alias_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_template_alias(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateTemplateAliasError::unhandled)?;
output = output.set_status(Some(response.status().as_u16() as _));
output.build()
})
}