Class: TrackForm

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/track_types.rb

Constant Summary collapse

ID =
1
TITLE =
2
IMAGES =
3
AUDIOID =
4
ALBUMID =
5
UID =
6
UPLOADSOURCE =
7
USERSOURCE =
8
CATEGORYID =
9
MUSICCATEGORY =
10
INTRO =
11
RICHINTRO =
12
LYRIC =
13
TAGS =
14
LANGUAGE =
15
AUTHOR =
16
ANNOUNCER =
17
SIGNER =
18
RESIGNER =
19
SINGERCATEGORY =
20
COMPOSER =
21
ARRANGEMENT =
22
POSTPRODUCTION =
23
ACTIVITYID =
24
ISCRAWLER =
25
THIRDPARTYS =
26
SHARECONTENT =
27
CLIENTINFO =
28
FIELDS =
{
  ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
  TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
  IMAGES => {:type => ::Thrift::Types::LIST, :name => 'images', :element => {:type => ::Thrift::Types::STRUCT, :class => ::TrackPicForm}, :optional => true},
  AUDIOID => {:type => ::Thrift::Types::I64, :name => 'audioId', :optional => true},
  ALBUMID => {:type => ::Thrift::Types::I64, :name => 'albumId', :optional => true},
  UID => {:type => ::Thrift::Types::I64, :name => 'uid', :optional => true},
  UPLOADSOURCE => {:type => ::Thrift::Types::I32, :name => 'uploadSource', :optional => true, :enum_class => ::UploadSource},
  USERSOURCE => {:type => ::Thrift::Types::I32, :name => 'userSource', :optional => true, :enum_class => ::UserSource},
  CATEGORYID => {:type => ::Thrift::Types::I32, :name => 'categoryId', :optional => true},
  MUSICCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'musicCategory', :optional => true},
  INTRO => {:type => ::Thrift::Types::STRING, :name => 'intro', :optional => true},
  RICHINTRO => {:type => ::Thrift::Types::STRING, :name => 'richIntro', :optional => true},
  LYRIC => {:type => ::Thrift::Types::STRING, :name => 'lyric', :optional => true},
  TAGS => {:type => ::Thrift::Types::STRING, :name => 'tags', :optional => true},
  LANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'language', :optional => true},
  AUTHOR => {:type => ::Thrift::Types::STRING, :name => 'author', :optional => true},
  ANNOUNCER => {:type => ::Thrift::Types::STRING, :name => 'announcer', :optional => true},
  SIGNER => {:type => ::Thrift::Types::STRING, :name => 'signer', :optional => true},
  RESIGNER => {:type => ::Thrift::Types::STRING, :name => 'reSigner', :optional => true},
  SINGERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'singerCategory', :optional => true},
  COMPOSER => {:type => ::Thrift::Types::STRING, :name => 'composer', :optional => true},
  ARRANGEMENT => {:type => ::Thrift::Types::STRING, :name => 'arrangement', :optional => true},
  POSTPRODUCTION => {:type => ::Thrift::Types::STRING, :name => 'postProduction', :optional => true},
  ACTIVITYID => {:type => ::Thrift::Types::I64, :name => 'activityId', :optional => true},
  ISCRAWLER => {:type => ::Thrift::Types::BOOL, :name => 'isCrawler', :optional => true},
  THIRDPARTYS => {:type => ::Thrift::Types::STRING, :name => 'thirdpartys', :optional => true},
  SHARECONTENT => {:type => ::Thrift::Types::STRING, :name => 'shareContent', :optional => true},
  CLIENTINFO => {:type => ::Thrift::Types::STRUCT, :name => 'clientInfo', :class => ::ClientInfo, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



284
# File 'lib/track_types.rb', line 284

def struct_fields; FIELDS; end

#validateObject



286
287
288
289
290
291
292
293
# File 'lib/track_types.rb', line 286

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