Struct aws_sdk_personalize::model::hyper_parameter_ranges::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for HyperParameterRanges.
Implementations§
source§impl Builder
impl Builder
sourcepub fn integer_hyper_parameter_ranges(
self,
input: IntegerHyperParameterRange
) -> Self
pub fn integer_hyper_parameter_ranges(
self,
input: IntegerHyperParameterRange
) -> Self
Appends an item to integer_hyper_parameter_ranges.
To override the contents of this collection use set_integer_hyper_parameter_ranges.
The integer-valued hyperparameters and their ranges.
sourcepub fn set_integer_hyper_parameter_ranges(
self,
input: Option<Vec<IntegerHyperParameterRange>>
) -> Self
pub fn set_integer_hyper_parameter_ranges(
self,
input: Option<Vec<IntegerHyperParameterRange>>
) -> Self
The integer-valued hyperparameters and their ranges.
Examples found in repository?
9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152
pub(crate) fn deser_structure_crate_model_hyper_parameter_ranges<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::HyperParameterRanges>,
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::hyper_parameter_ranges::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() {
"integerHyperParameterRanges" => {
builder = builder.set_integer_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_integer_hyper_parameter_ranges(tokens)?
);
}
"continuousHyperParameterRanges" => {
builder = builder.set_continuous_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_continuous_hyper_parameter_ranges(tokens)?
);
}
"categoricalHyperParameterRanges" => {
builder = builder.set_categorical_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_categorical_hyper_parameter_ranges(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 continuous_hyper_parameter_ranges(
self,
input: ContinuousHyperParameterRange
) -> Self
pub fn continuous_hyper_parameter_ranges(
self,
input: ContinuousHyperParameterRange
) -> Self
Appends an item to continuous_hyper_parameter_ranges.
To override the contents of this collection use set_continuous_hyper_parameter_ranges.
The continuous hyperparameters and their ranges.
sourcepub fn set_continuous_hyper_parameter_ranges(
self,
input: Option<Vec<ContinuousHyperParameterRange>>
) -> Self
pub fn set_continuous_hyper_parameter_ranges(
self,
input: Option<Vec<ContinuousHyperParameterRange>>
) -> Self
The continuous hyperparameters and their ranges.
Examples found in repository?
9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152
pub(crate) fn deser_structure_crate_model_hyper_parameter_ranges<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::HyperParameterRanges>,
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::hyper_parameter_ranges::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() {
"integerHyperParameterRanges" => {
builder = builder.set_integer_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_integer_hyper_parameter_ranges(tokens)?
);
}
"continuousHyperParameterRanges" => {
builder = builder.set_continuous_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_continuous_hyper_parameter_ranges(tokens)?
);
}
"categoricalHyperParameterRanges" => {
builder = builder.set_categorical_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_categorical_hyper_parameter_ranges(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 categorical_hyper_parameter_ranges(
self,
input: CategoricalHyperParameterRange
) -> Self
pub fn categorical_hyper_parameter_ranges(
self,
input: CategoricalHyperParameterRange
) -> Self
Appends an item to categorical_hyper_parameter_ranges.
To override the contents of this collection use set_categorical_hyper_parameter_ranges.
The categorical hyperparameters and their ranges.
sourcepub fn set_categorical_hyper_parameter_ranges(
self,
input: Option<Vec<CategoricalHyperParameterRange>>
) -> Self
pub fn set_categorical_hyper_parameter_ranges(
self,
input: Option<Vec<CategoricalHyperParameterRange>>
) -> Self
The categorical hyperparameters and their ranges.
Examples found in repository?
9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152
pub(crate) fn deser_structure_crate_model_hyper_parameter_ranges<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::HyperParameterRanges>,
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::hyper_parameter_ranges::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() {
"integerHyperParameterRanges" => {
builder = builder.set_integer_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_integer_hyper_parameter_ranges(tokens)?
);
}
"continuousHyperParameterRanges" => {
builder = builder.set_continuous_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_continuous_hyper_parameter_ranges(tokens)?
);
}
"categoricalHyperParameterRanges" => {
builder = builder.set_categorical_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_categorical_hyper_parameter_ranges(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) -> HyperParameterRanges
pub fn build(self) -> HyperParameterRanges
Consumes the builder and constructs a HyperParameterRanges.
Examples found in repository?
9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152
pub(crate) fn deser_structure_crate_model_hyper_parameter_ranges<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::HyperParameterRanges>,
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::hyper_parameter_ranges::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() {
"integerHyperParameterRanges" => {
builder = builder.set_integer_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_integer_hyper_parameter_ranges(tokens)?
);
}
"continuousHyperParameterRanges" => {
builder = builder.set_continuous_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_continuous_hyper_parameter_ranges(tokens)?
);
}
"categoricalHyperParameterRanges" => {
builder = builder.set_categorical_hyper_parameter_ranges(
crate::json_deser::deser_list_com_amazonaws_personalize_categorical_hyper_parameter_ranges(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",
),
),
}
}