pub struct Builder { /* private fields */ }Expand description
A builder for CreateDevicePoolOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn device_pool(self, input: DevicePool) -> Self
pub fn device_pool(self, input: DevicePool) -> Self
The newly created device pool.
sourcepub fn set_device_pool(self, input: Option<DevicePool>) -> Self
pub fn set_device_pool(self, input: Option<DevicePool>) -> Self
The newly created device pool.
Examples found in repository?
src/json_deser.rs (lines 222-224)
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
pub(crate) fn deser_operation_crate_operation_create_device_pool(
value: &[u8],
mut builder: crate::output::create_device_pool_output::Builder,
) -> Result<
crate::output::create_device_pool_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() {
"devicePool" => {
builder = builder.set_device_pool(
crate::json_deser::deser_structure_crate_model_device_pool(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) -> CreateDevicePoolOutput
pub fn build(self) -> CreateDevicePoolOutput
Consumes the builder and constructs a CreateDevicePoolOutput.
Examples found in repository?
src/operation_deser.rs (line 104)
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
pub fn parse_create_device_pool_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::CreateDevicePoolOutput, crate::error::CreateDevicePoolError>
{
Ok({
#[allow(unused_mut)]
let mut output = crate::output::create_device_pool_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_create_device_pool(
response.body().as_ref(),
output,
)
.map_err(crate::error::CreateDevicePoolError::unhandled)?;
output.build()
})
}