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 => ::P0_a_e_a_b_p7},
  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 => ::P0_a_e_a_b_o7}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



13432
13433
13434
13435
13436
13437
13438
13439
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13432

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