Class: GeocodeRelation

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/thrift/geocoder_types.rb

Constant Summary collapse

RELATIONTYPE =
1
RELATEDID =
2
FIELDS =
{
  RELATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'relationType', :optional => true, :enum_class => ::GeocodeRelationType},
  RELATEDID => {:type => ::Thrift::Types::STRING, :name => 'relatedId', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



213
# File 'lib/thrift/geocoder_types.rb', line 213

def struct_fields; FIELDS; end

#validateObject



215
216
217
218
219
# File 'lib/thrift/geocoder_types.rb', line 215

def validate
  unless @relationType.nil? || ::GeocodeRelationType::VALID_VALUES.include?(@relationType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field relationType!')
  end
end