pub struct Builder { /* private fields */ }
Expand description
A builder for UpdateUserSettingsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn user_settings(self, input: UserSettings) -> Self
pub fn user_settings(self, input: UserSettings) -> Self
The user settings.
sourcepub fn set_user_settings(self, input: Option<UserSettings>) -> Self
pub fn set_user_settings(self, input: Option<UserSettings>) -> Self
The user settings.
Examples found in repository?
src/json_deser.rs (lines 2147-2149)
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172
pub(crate) fn deser_operation_crate_operation_update_user_settings(
value: &[u8],
mut builder: crate::output::update_user_settings_output::Builder,
) -> Result<
crate::output::update_user_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() {
"userSettings" => {
builder = builder.set_user_settings(
crate::json_deser::deser_structure_crate_model_user_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) -> UpdateUserSettingsOutput
pub fn build(self) -> UpdateUserSettingsOutput
Consumes the builder and constructs a UpdateUserSettingsOutput
.
Examples found in repository?
src/operation_deser.rs (line 5937)
5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939
pub fn parse_update_user_settings_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateUserSettingsOutput,
crate::error::UpdateUserSettingsError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::update_user_settings_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_update_user_settings(
response.body().as_ref(),
output,
)
.map_err(crate::error::UpdateUserSettingsError::unhandled)?;
output.build()
})
}