Class: Message

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

FROM_ =
1
TO =
2
TOTYPE =
3
ID =
4
CREATEDTIME =
5
DELIVEREDTIME =
6
TEXT =
10
LOCATION =
11
HASCONTENT =
14
CONTENTTYPE =
15
CONTENTMETADATA =
18
CONTENTPREVIEW =
17
SESSIONID =
19
CHUNKS =
20
RELATEDMESSAGEID =
21
MESSAGERELATIONTYPE =
22
READCOUNT =
23
RELATEDMESSAGESERVICECODE =
24
APPEXTENSIONTYPE =
25
FIELDS =
{
  FROM_ => {:type => ::Thrift::Types::STRING, :name => 'from_'},
  TO => {:type => ::Thrift::Types::STRING, :name => 'to'},
  TOTYPE => {:type => ::Thrift::Types::I32, :name => 'toType', :enum_class => ::J0_a_e_a_b_zc},
  ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
  CREATEDTIME => {:type => ::Thrift::Types::I64, :name => 'createdTime'},
  DELIVEREDTIME => {:type => ::Thrift::Types::I64, :name => 'deliveredTime'},
  TEXT => {:type => ::Thrift::Types::STRING, :name => 'text'},
  LOCATION => {:type => ::Thrift::Types::STRUCT, :name => 'location', :class => ::Location},
  HASCONTENT => {:type => ::Thrift::Types::BOOL, :name => 'hasContent'},
  CONTENTTYPE => {:type => ::Thrift::Types::I32, :name => 'contentType', :enum_class => ::J0_a_e_a_b_c9},
  CONTENTMETADATA => {:type => ::Thrift::Types::MAP, :name => 'contentMetadata', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
  CONTENTPREVIEW => {:type => ::Thrift::Types::STRING, :name => 'contentPreview'},
  SESSIONID => {:type => ::Thrift::Types::BYTE, :name => 'sessionId'},
  CHUNKS => {:type => ::Thrift::Types::LIST, :name => 'chunks', :element => {:type => ::Thrift::Types::STRING}},
  RELATEDMESSAGEID => {:type => ::Thrift::Types::STRING, :name => 'relatedMessageId', :optional => true},
  MESSAGERELATIONTYPE => {:type => ::Thrift::Types::I32, :name => 'messageRelationType', :optional => true, :enum_class => ::J0_a_e_a_b_ed},
  READCOUNT => {:type => ::Thrift::Types::I32, :name => 'readCount', :optional => true},
  RELATEDMESSAGESERVICECODE => {:type => ::Thrift::Types::I32, :name => 'relatedMessageServiceCode', :optional => true, :enum_class => ::J0_a_e_a_b_zf},
  APPEXTENSIONTYPE => {:type => ::Thrift::Types::I32, :name => 'appExtensionType', :optional => true, :enum_class => ::J0_a_e_a_b_x}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13277

def validate
  unless @toType.nil? || ::J0_a_e_a_b_zc::VALID_VALUES.include?(@toType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field toType!')
  end
  unless @contentType.nil? || ::J0_a_e_a_b_c9::VALID_VALUES.include?(@contentType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field contentType!')
  end
  unless @messageRelationType.nil? || ::J0_a_e_a_b_ed::VALID_VALUES.include?(@messageRelationType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field messageRelationType!')
  end
  unless @relatedMessageServiceCode.nil? || ::J0_a_e_a_b_zf::VALID_VALUES.include?(@relatedMessageServiceCode)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field relatedMessageServiceCode!')
  end
  unless @appExtensionType.nil? || ::J0_a_e_a_b_x::VALID_VALUES.include?(@appExtensionType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field appExtensionType!')
  end
end