Class: SpotItem

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

NAME =
2
PHONE =
3
CATEGORY =
4
MID =
5
COUNTRYAREACODE =
6
FREEPHONECALLABLE =
10
FIELDS =
{
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  PHONE => {:type => ::Thrift::Types::STRING, :name => 'phone'},
  CATEGORY => {:type => ::Thrift::Types::I32, :name => 'category', :enum_class => ::P0_a_e_a_b_ng},
  MID => {:type => ::Thrift::Types::STRING, :name => 'mid'},
  COUNTRYAREACODE => {:type => ::Thrift::Types::STRING, :name => 'countryAreaCode'},
  FREEPHONECALLABLE => {:type => ::Thrift::Types::BOOL, :name => 'freePhoneCallable'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



8982
8983
8984
8985
8986
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 8982

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