pub struct Builder { /* private fields */ }
Expand description
A builder for GetBrowserSettingsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn browser_settings(self, input: BrowserSettings) -> Self
pub fn browser_settings(self, input: BrowserSettings) -> Self
The browser settings.
sourcepub fn set_browser_settings(self, input: Option<BrowserSettings>) -> Self
pub fn set_browser_settings(self, input: Option<BrowserSettings>) -> Self
The browser settings.
Examples found in repository?
src/json_deser.rs (lines 1030-1034)
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057
pub(crate) fn deser_operation_crate_operation_get_browser_settings(
value: &[u8],
mut builder: crate::output::get_browser_settings_output::Builder,
) -> Result<
crate::output::get_browser_settings_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() {
"browserSettings" => {
builder = builder.set_browser_settings(
crate::json_deser::deser_structure_crate_model_browser_settings(
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) -> GetBrowserSettingsOutput
pub fn build(self) -> GetBrowserSettingsOutput
Consumes the builder and constructs a GetBrowserSettingsOutput
.
Examples found in repository?
src/operation_deser.rs (line 2993)
2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995
pub fn parse_get_browser_settings_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GetBrowserSettingsOutput,
crate::error::GetBrowserSettingsError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::get_browser_settings_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_get_browser_settings(
response.body().as_ref(),
output,
)
.map_err(crate::error::GetBrowserSettingsError::unhandled)?;
output.build()
})
}