Class: Location

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

TITLE =
1
ADDRESS =
2
LATITUDE =
3
LONGITUDE =
4
PHONE =
5
CATEGORYID =
6
PROVIDER =
7
ACCURACY =
8
ALTITUDEMETERS =
9
FIELDS =
{
  TITLE => {:type => ::Thrift::Types::STRING, :name => 'title'},
  ADDRESS => {:type => ::Thrift::Types::STRING, :name => 'address'},
  LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude'},
  LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude'},
  PHONE => {:type => ::Thrift::Types::STRING, :name => 'phone'},
  CATEGORYID => {:type => ::Thrift::Types::STRING, :name => 'categoryId', :optional => true},
  PROVIDER => {:type => ::Thrift::Types::I32, :name => 'provider', :optional => true, :enum_class => ::J0_a_e_a_b_pe},
  ACCURACY => {:type => ::Thrift::Types::STRUCT, :name => 'accuracy', :class => ::GeolocationAccuracy, :optional => true},
  ALTITUDEMETERS => {:type => ::Thrift::Types::DOUBLE, :name => 'altitudeMeters', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



13220
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13220

def struct_fields; FIELDS; end

#validateObject



13222
13223
13224
13225
13226
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13222

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