pub struct Builder { /* private fields */ }
Expand description

A builder for HyperParameterRanges.

Implementations§

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.

The integer-valued hyperparameters and their ranges.

Examples found in repository?
src/json_deser.rs (lines 9117-9119)
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",
            ),
        ),
    }
}

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.

The continuous hyperparameters and their ranges.

Examples found in repository?
src/json_deser.rs (lines 9122-9124)
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",
            ),
        ),
    }
}

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.

The categorical hyperparameters and their ranges.

Examples found in repository?
src/json_deser.rs (lines 9127-9129)
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",
            ),
        ),
    }
}

Consumes the builder and constructs a HyperParameterRanges.

Examples found in repository?
src/json_deser.rs (line 9144)
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",
            ),
        ),
    }
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more