class PetStore::EnumTest

Included Modules

Defined in:

pet_store/models/enum_test.cr

Constant Summary

ERROR_MESSAGE_FOR_ENUM_DOUBLE = "invalid value for \"enum_double\", must be one of [1.1, -1.2]."
ERROR_MESSAGE_FOR_ENUM_FLOAT = "invalid value for \"enum_float\", must be one of [1.1, -1.2]."
ERROR_MESSAGE_FOR_ENUM_INT32 = "invalid value for \"enum_int32\", must be one of [1, -1]."
ERROR_MESSAGE_FOR_ENUM_INT64 = "invalid value for \"enum_int64\", must be one of [1, -1]."
ERROR_MESSAGE_FOR_ENUM_STRING = "invalid value for \"enum_string\", must be one of [UPPER, lower, ]."
ERROR_MESSAGE_FOR_ENUM_STRING_REQUIRED = "invalid value for \"enum_string_required\", must be one of [UPPER, lower, ]."
VALID_VALUES_FOR_ENUM_DOUBLE = Float64.static_array("1.1", "-1.2")
VALID_VALUES_FOR_ENUM_FLOAT = Float32.static_array("1.1", "-1.2")
VALID_VALUES_FOR_ENUM_INT32 = Int32.static_array("1", "-1")
VALID_VALUES_FOR_ENUM_INT64 = Int64.static_array("1", "-1")
VALID_VALUES_FOR_ENUM_STRING = String.static_array("UPPER", "lower", "")
VALID_VALUES_FOR_ENUM_STRING_REQUIRED = String.static_array("UPPER", "lower", "")

Constructors

Instance Method Summary

Instance methods inherited from module OpenApi::Json

after_initialize after_initialize, eql?(o : self) eql?, to_hash : Hash(String, JSON::Any) to_hash, to_json_any : JSON::Any to_json_any

Class methods inherited from module OpenApi::Json

build_from_hash(hash : Hash) build_from_hash, build_from_json_any(json_any : JSON::Any) build_from_json_any

Instance methods inherited from module OpenApi::Validatable

list_invalid_properties : Array(String) list_invalid_properties, list_invalid_properties_for(key : String) : Array(String) list_invalid_properties_for, valid? : Bool valid?, validate : Nil validate

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, enum_string_required : String | Nil = nil, outer_enum_rquired : PetStore::OuterEnumRquired | Nil = nil, outer_enum_rquired_int64 : PetStore::OuterEnumRquiredInt64 | Nil = PetStore::OuterEnumRquiredInt64.new(3), enum_string : String | Nil = nil, enum_int32 : Int32 | Nil = nil, enum_int64 : Int64 | Nil = nil, enum_float : Float32 | Nil = nil, enum_double : Float64 | Nil = nil, outer_enum : PetStore::OuterEnum | Nil = nil, outer_enum_integer : PetStore::OuterEnumInteger | Nil = nil, outer_enum_default_value : PetStore::OuterEnumDefaultValue | Nil = PetStore::OuterEnumDefaultValue.new("placed"), outer_enum_integer_default_value : PetStore::OuterEnumIntegerDefaultValue | Nil = PetStore::OuterEnumIntegerDefaultValue.new(0)) #

Initializes the object @param [Hash] attributes Model attributes in the form of hash


[View source]

Instance Method Detail

def ==(other : self) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def enum_double : Float64 | Nil #

[View source]
def enum_double=(new_value : Float64 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] enum_double Object to be assigned


[View source]
def enum_float : Float32 | Nil #

[View source]
def enum_float=(new_value : Float32 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] enum_float Object to be assigned


[View source]
def enum_int32 : Int32 | Nil #

[View source]
def enum_int32=(new_value : Int32 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] enum_int32 Object to be assigned


[View source]
def enum_int64 : Int64 | Nil #

[View source]
def enum_int64=(new_value : Int64 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] enum_int64 Object to be assigned


[View source]
def enum_string : String | Nil #

[View source]
def enum_string=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] enum_string Object to be assigned


[View source]
def enum_string_required : String | Nil #

[View source]
def enum_string_required=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] enum_string_required Object to be assigned


[View source]
def hash(hasher) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def list_invalid_properties : Array(String) #

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons


[View source]
def outer_enum : PetStore::OuterEnum | Nil #

[View source]
def outer_enum=(new_value : PetStore::OuterEnum | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] outer_enum Object to be assigned


[View source]
def outer_enum_default_value : PetStore::OuterEnumDefaultValue | Nil #

[View source]
def outer_enum_default_value=(new_value : PetStore::OuterEnumDefaultValue | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] outer_enum_default_value Object to be assigned


[View source]
def outer_enum_integer : PetStore::OuterEnumInteger | Nil #

[View source]
def outer_enum_integer=(new_value : PetStore::OuterEnumInteger | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] outer_enum_integer Object to be assigned


[View source]
def outer_enum_integer_default_value : PetStore::OuterEnumIntegerDefaultValue | Nil #

[View source]
def outer_enum_integer_default_value=(new_value : PetStore::OuterEnumIntegerDefaultValue | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] outer_enum_integer_default_value Object to be assigned


[View source]
def outer_enum_present=(outer_enum_present : Bool) #

[View source]
def outer_enum_present? : Bool #

[View source]
def outer_enum_rquired : PetStore::OuterEnumRquired | Nil #

[View source]
def outer_enum_rquired=(new_value : PetStore::OuterEnumRquired | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] outer_enum_rquired Object to be assigned


[View source]
def outer_enum_rquired_int64 : PetStore::OuterEnumRquiredInt64 | Nil #

[View source]
def outer_enum_rquired_int64=(new_value : PetStore::OuterEnumRquiredInt64 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] outer_enum_rquired_int64 Object to be assigned


[View source]
def valid? : Bool #

Check to see if the all the properties in the model are valid @return true if the model is valid


[View source]