Class: AbuseReport

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

REPORTSOURCE =
1
APPLICATIONTYPE =
2
SPAMMERREASONS =
3
ABUSEMESSAGES =
4
METADATA =
5
FIELDS =
{
  REPORTSOURCE => {:type => ::Thrift::Types::I32, :name => 'reportSource', :enum_class => ::P0_a_e_a_b_qf},
  APPLICATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'applicationType', :enum_class => ::P0_a_e_a_b_z},
  SPAMMERREASONS => {:type => ::Thrift::Types::LIST, :name => 'spammerReasons', :element => {:type => ::Thrift::Types::I32, :enum_class => ::P0_a_e_a_b_mg}},
  ABUSEMESSAGES => {:type => ::Thrift::Types::LIST, :name => 'abuseMessages', :element => {:type => ::Thrift::Types::STRUCT, :class => ::AbuseMessage}},
  METADATA => {:type => ::Thrift::Types::MAP, :name => 'metadata', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



15588
15589
15590
15591
15592
15593
15594
15595
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 15588

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