Class: Chat

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

TYPE =
1
CHATMID =
2
CREATEDTIME =
3
NOTIFICATIONDISABLED =
4
FAVORITETIMESTAMP =
5
CHATNAME =
6
PICTUREPATH =
7
EXTRA =
8
FIELDS =
{
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::P0_a_e_a_b_r7},
  CHATMID => {:type => ::Thrift::Types::STRING, :name => 'chatMid'},
  CREATEDTIME => {:type => ::Thrift::Types::I64, :name => 'createdTime'},
  NOTIFICATIONDISABLED => {:type => ::Thrift::Types::BOOL, :name => 'notificationDisabled'},
  FAVORITETIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'favoriteTimestamp', :optional => true},
  CHATNAME => {:type => ::Thrift::Types::STRING, :name => 'chatName', :optional => true},
  PICTUREPATH => {:type => ::Thrift::Types::STRING, :name => 'picturePath', :optional => true},
  EXTRA => {:type => ::Thrift::Types::STRUCT, :name => 'extra', :class => ::Extra, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



13525
13526
13527
13528
13529
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13525

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