Class: Message
- Inherits:
-
Object
- Object
- Message
- 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 => ::P0_a_e_a_b_ad}, 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 => ::P0_a_e_a_b_d9}, 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 => ::P0_a_e_a_b_fd}, READCOUNT => {:type => ::Thrift::Types::I32, :name => 'readCount', :optional => true}, RELATEDMESSAGESERVICECODE => {:type => ::Thrift::Types::I32, :name => 'relatedMessageServiceCode', :optional => true, :enum_class => ::P0_a_e_a_b_ag}, APPEXTENSIONTYPE => {:type => ::Thrift::Types::I32, :name => 'appExtensionType', :optional => true, :enum_class => ::P0_a_e_a_b_y} }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
14529 |
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 14529 def struct_fields; FIELDS; end |
#validate ⇒ Object
14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 |
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 14531 def validate unless @toType.nil? || ::P0_a_e_a_b_ad::VALID_VALUES.include?(@toType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field toType!') end unless @contentType.nil? || ::P0_a_e_a_b_d9::VALID_VALUES.include?(@contentType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field contentType!') end unless @messageRelationType.nil? || ::P0_a_e_a_b_fd::VALID_VALUES.include?(@messageRelationType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field messageRelationType!') end unless @relatedMessageServiceCode.nil? || ::P0_a_e_a_b_ag::VALID_VALUES.include?(@relatedMessageServiceCode) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field relatedMessageServiceCode!') end unless @appExtensionType.nil? || ::P0_a_e_a_b_y::VALID_VALUES.include?(@appExtensionType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field appExtensionType!') end end |