Class: CMV4APIClient::FieldType

Inherits:
Object
  • Object
show all
Defined in:
lib/cmv4-openapi-client/models/field_type.rb

Constant Summary collapse

TEXT =
"text".freeze
LONG_TEXT =
"longtext".freeze
NUMBER =
"number".freeze
BOOLEAN =
"boolean".freeze
DATE_TIME =
"datetime".freeze
GUID =
"guid".freeze
HIERARCHY =
"hierarchy".freeze
CLASSIFICATION =
"classification".freeze
CLASSIFICATION_GROUP =
"classificationgroup".freeze
IDENTITY =
"identity".freeze
ATTACHMENT =
"attachment".freeze
IMAGE =
"image".freeze
GEOGRAPHY =
"geography".freeze
COORDINATE =
"coordinate".freeze
AGGREGATE =
"aggregate".freeze
CALCULATED =
"calculated".freeze
LOOKUP =
"lookup".freeze
"related".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



39
40
41
# File 'lib/cmv4-openapi-client/models/field_type.rb', line 39

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



46
47
48
49
50
# File 'lib/cmv4-openapi-client/models/field_type.rb', line 46

def build_from_hash(value)
  constantValues = FieldType.constants.select { |c| FieldType::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #FieldType" if constantValues.empty?
  value
end