Class: PushRecvReport

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

PUSHTRACKINGID =
1
RECVTIMESTAMP =
2
BATTERY =
3
BATTERYMODE =
4
CLIENTNETWORKTYPE =
5
CARRIERCODE =
6
DISPLAYTIMESTAMP =
7
FIELDS =
{
  PUSHTRACKINGID => {:type => ::Thrift::Types::STRING, :name => 'pushTrackingId'},
  RECVTIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'recvTimestamp'},
  BATTERY => {:type => ::Thrift::Types::I32, :name => 'battery'},
  BATTERYMODE => {:type => ::Thrift::Types::I32, :name => 'batteryMode', :enum_class => ::P0_a_e_a_b_t1},
  CLIENTNETWORKTYPE => {:type => ::Thrift::Types::I32, :name => 'clientNetworkType', :enum_class => ::P0_a_e_a_b_t7},
  CARRIERCODE => {:type => ::Thrift::Types::STRING, :name => 'carrierCode'},
  DISPLAYTIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'displayTimestamp', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



16828
16829
16830
16831
16832
16833
16834
16835
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 16828

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