Struct aws_sdk_memorydb::output::create_user_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CreateUserOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_user(self, input: Option<User>) -> Self
pub fn set_user(self, input: Option<User>) -> Self
The newly-created user.
Examples found in repository?
src/json_deser.rs (line 2210)
2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233
pub(crate) fn deser_operation_crate_operation_create_user(
value: &[u8],
mut builder: crate::output::create_user_output::Builder,
) -> Result<
crate::output::create_user_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() {
"User" => {
builder = builder
.set_user(crate::json_deser::deser_structure_crate_model_user(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) -> CreateUserOutput
pub fn build(self) -> CreateUserOutput
Consumes the builder and constructs a CreateUserOutput
.
Examples found in repository?
src/operation_deser.rs (line 1371)
1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373
pub fn parse_create_user_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateUserOutput, crate::error::CreateUserError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_user_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_user(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateUserError::unhandled)?;
output.build()
})
}