Class: ChatRoomAnnouncement

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

ANNOUNCEMENTSEQ =
1
TYPE =
2
CONTENTS =
3
CREATORMID =
4
CREATEDTIME =
5
DELETEPERMISSION =
6
FIELDS =
{
  ANNOUNCEMENTSEQ => {:type => ::Thrift::Types::I64, :name => 'announcementSeq'},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::J0_a_e_a_b_o7},
  CONTENTS => {:type => ::Thrift::Types::STRUCT, :name => 'contents', :class => ::ChatRoomAnnouncementContents},
  CREATORMID => {:type => ::Thrift::Types::STRING, :name => 'creatorMid'},
  CREATEDTIME => {:type => ::Thrift::Types::I64, :name => 'createdTime'},
  DELETEPERMISSION => {:type => ::Thrift::Types::I32, :name => 'deletePermission', :optional => true, :enum_class => ::J0_a_e_a_b_n7}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



12124
12125
12126
12127
12128
12129
12130
12131
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 12124

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