pub struct Builder { /* private fields */ }Expand description
A builder for DevicePoolCompatibilityResult.
Implementations§
source§impl Builder
impl Builder
sourcepub fn device(self, input: Device) -> Self
pub fn device(self, input: Device) -> Self
The device (phone or tablet) to return information about.
sourcepub fn set_device(self, input: Option<Device>) -> Self
pub fn set_device(self, input: Option<Device>) -> Self
The device (phone or tablet) to return information about.
Examples found in repository?
src/json_deser.rs (lines 8126-8128)
8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163
pub(crate) fn deser_structure_crate_model_device_pool_compatibility_result<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DevicePoolCompatibilityResult>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::device_pool_compatibility_result::Builder::default();
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() {
"device" => {
builder = builder.set_device(
crate::json_deser::deser_structure_crate_model_device(tokens)?,
);
}
"compatible" => {
builder = builder.set_compatible(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"incompatibilityMessages" => {
builder = builder.set_incompatibility_messages(
crate::json_deser::deser_list_com_amazonaws_devicefarm_incompatibility_messages(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
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn compatible(self, input: bool) -> Self
pub fn compatible(self, input: bool) -> Self
Whether the result was compatible with the device pool.
sourcepub fn set_compatible(self, input: Option<bool>) -> Self
pub fn set_compatible(self, input: Option<bool>) -> Self
Whether the result was compatible with the device pool.
Examples found in repository?
src/json_deser.rs (lines 8131-8135)
8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163
pub(crate) fn deser_structure_crate_model_device_pool_compatibility_result<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DevicePoolCompatibilityResult>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::device_pool_compatibility_result::Builder::default();
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() {
"device" => {
builder = builder.set_device(
crate::json_deser::deser_structure_crate_model_device(tokens)?,
);
}
"compatible" => {
builder = builder.set_compatible(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"incompatibilityMessages" => {
builder = builder.set_incompatibility_messages(
crate::json_deser::deser_list_com_amazonaws_devicefarm_incompatibility_messages(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
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn incompatibility_messages(self, input: IncompatibilityMessage) -> Self
pub fn incompatibility_messages(self, input: IncompatibilityMessage) -> Self
Appends an item to incompatibility_messages.
To override the contents of this collection use set_incompatibility_messages.
Information about the compatibility.
sourcepub fn set_incompatibility_messages(
self,
input: Option<Vec<IncompatibilityMessage>>
) -> Self
pub fn set_incompatibility_messages(
self,
input: Option<Vec<IncompatibilityMessage>>
) -> Self
Information about the compatibility.
Examples found in repository?
src/json_deser.rs (lines 8138-8140)
8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163
pub(crate) fn deser_structure_crate_model_device_pool_compatibility_result<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DevicePoolCompatibilityResult>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::device_pool_compatibility_result::Builder::default();
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() {
"device" => {
builder = builder.set_device(
crate::json_deser::deser_structure_crate_model_device(tokens)?,
);
}
"compatible" => {
builder = builder.set_compatible(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"incompatibilityMessages" => {
builder = builder.set_incompatibility_messages(
crate::json_deser::deser_list_com_amazonaws_devicefarm_incompatibility_messages(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
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}sourcepub fn build(self) -> DevicePoolCompatibilityResult
pub fn build(self) -> DevicePoolCompatibilityResult
Consumes the builder and constructs a DevicePoolCompatibilityResult.
Examples found in repository?
src/json_deser.rs (line 8155)
8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163
pub(crate) fn deser_structure_crate_model_device_pool_compatibility_result<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DevicePoolCompatibilityResult>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::device_pool_compatibility_result::Builder::default();
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() {
"device" => {
builder = builder.set_device(
crate::json_deser::deser_structure_crate_model_device(tokens)?,
);
}
"compatible" => {
builder = builder.set_compatible(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"incompatibilityMessages" => {
builder = builder.set_incompatibility_messages(
crate::json_deser::deser_list_com_amazonaws_devicefarm_incompatibility_messages(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
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}