class Seahorse::Client::ParamValidator
def shape(shape, value, errors, context)
def shape(shape, value, errors, context) case shape when Model::Shapes::Structure structure(shape, value, errors, context) when Model::Shapes::List list(shape, value, errors, context) when Model::Shapes::Map map(shape, value, errors, context) when Model::Shapes::String unless value.is_a?(String) errors << "expected #{context} to be a string" end when Model::Shapes::Integer unless value.is_a?(Integer) errors << "expected #{context} to be an integer" end when Model::Shapes::Float unless value.is_a?(Float) errors << "expected #{context} to be a float" end when Model::Shapes::Timestamp unless value.is_a?(Time) errors << "expected #{context} to be a Time object" end when Model::Shapes::Boolean unless [true, false].include?(value) errors << "expected #{context} to be true or false" end when Model::Shapes::Blob unless io_like?(value) or value.is_a?(String) errors << "expected #{context} to be a string or IO object" end end end