Class: FlatApi::ScoreDetails

Inherits:
ApiModelBase show all
Defined in:
lib/flat_api/models/score_details.rb

Overview

The score and all its details

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ScoreDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/flat_api/models/score_details.rb', line 265

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `FlatApi::ScoreDetails` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::ScoreDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'id')
    self.id = attributes[:'id']
  else
    self.id = nil
  end

  if attributes.key?(:'sharing_key')
    self.sharing_key = attributes[:'sharing_key']
  end

  if attributes.key?(:'title')
    self.title = attributes[:'title']
  else
    self.title = nil
  end

  if attributes.key?(:'privacy')
    self.privacy = attributes[:'privacy']
  else
    self.privacy = 'private'
  end

  if attributes.key?(:'user')
    self.user = attributes[:'user']
  else
    self.user = nil
  end

  if attributes.key?(:'html_url')
    self.html_url = attributes[:'html_url']
  else
    self.html_url = nil
  end

  if attributes.key?(:'edit_html_url')
    self.edit_html_url = attributes[:'edit_html_url']
  else
    self.edit_html_url = nil
  end

  if attributes.key?(:'subtitle')
    self.subtitle = attributes[:'subtitle']
  end

  if attributes.key?(:'lyricist')
    self.lyricist = attributes[:'lyricist']
  end

  if attributes.key?(:'arranger')
    self.arranger = attributes[:'arranger']
  end

  if attributes.key?(:'composer')
    self.composer = attributes[:'composer']
  end

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'tags')
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = value
    end
  end

  if attributes.key?(:'creation_type')
    self.creation_type = attributes[:'creation_type']
  end

  if attributes.key?(:'license')
    self.license = attributes[:'license']
  end

  if attributes.key?(:'license_text')
    self.license_text = attributes[:'license_text']
  end

  if attributes.key?(:'duration_time')
    self.duration_time = attributes[:'duration_time']
  end

  if attributes.key?(:'number_measures')
    self.number_measures = attributes[:'number_measures']
  end

  if attributes.key?(:'main_tempo_qpm')
    self.main_tempo_qpm = attributes[:'main_tempo_qpm']
  end

  if attributes.key?(:'main_key_signature')
    self.main_key_signature = attributes[:'main_key_signature']
  end

  if attributes.key?(:'rights')
    self.rights = attributes[:'rights']
  end

  if attributes.key?(:'collaborators')
    if (value = attributes[:'collaborators']).is_a?(Array)
      self.collaborators = value
    end
  else
    self.collaborators = nil
  end

  if attributes.key?(:'creation_date')
    self.creation_date = attributes[:'creation_date']
  else
    self.creation_date = nil
  end

  if attributes.key?(:'modification_date')
    self.modification_date = attributes[:'modification_date']
  end

  if attributes.key?(:'publication_date')
    self.publication_date = attributes[:'publication_date']
  end

  if attributes.key?(:'scheduled_deletion_date')
    self.scheduled_deletion_date = attributes[:'scheduled_deletion_date']
  end

  if attributes.key?(:'highlighted_date')
    self.highlighted_date = attributes[:'highlighted_date']
  end

  if attributes.key?(:'organization')
    self.organization = attributes[:'organization']
  end

  if attributes.key?(:'parent_score')
    self.parent_score = attributes[:'parent_score']
  end

  if attributes.key?(:'instruments')
    if (value = attributes[:'instruments']).is_a?(Array)
      self.instruments = value
    end
  else
    self.instruments = nil
  end

  if attributes.key?(:'instruments_names')
    if (value = attributes[:'instruments_names']).is_a?(Array)
      self.instruments_names = value
    end
  else
    self.instruments_names = nil
  end

  if attributes.key?(:'samples')
    if (value = attributes[:'samples']).is_a?(Array)
      self.samples = value
    end
  else
    self.samples = nil
  end

  if attributes.key?(:'google_drive_file_id')
    self.google_drive_file_id = attributes[:'google_drive_file_id']
  end

  if attributes.key?(:'likes')
    self.likes = attributes[:'likes']
  end

  if attributes.key?(:'comments')
    self.comments = attributes[:'comments']
  end

  if attributes.key?(:'views')
    self.views = attributes[:'views']
  end

  if attributes.key?(:'plays')
    self.plays = attributes[:'plays']
  end

  if attributes.key?(:'collections')
    if (value = attributes[:'collections']).is_a?(Array)
      self.collections = value
    end
  end

  if attributes.key?(:'me')
    self.me = attributes[:'me']
  end
end

Instance Attribute Details

#arrangerObject

Arranger of the score



45
46
47
# File 'lib/flat_api/models/score_details.rb', line 45

def arranger
  @arranger
end

#collaboratorsObject

The list of the collaborators of the score



78
79
80
# File 'lib/flat_api/models/score_details.rb', line 78

def collaborators
  @collaborators
end

#collectionsObject

The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them.



122
123
124
# File 'lib/flat_api/models/score_details.rb', line 122

def collections
  @collections
end

#commentsObject

Returns the value of attribute comments.



115
116
117
# File 'lib/flat_api/models/score_details.rb', line 115

def comments
  @comments
end

#composerObject

Composer of the score



48
49
50
# File 'lib/flat_api/models/score_details.rb', line 48

def composer
  @composer
end

#creation_dateObject

The date when the score was created



81
82
83
# File 'lib/flat_api/models/score_details.rb', line 81

def creation_date
  @creation_date
end

#creation_typeObject

Returns the value of attribute creation_type.



56
57
58
# File 'lib/flat_api/models/score_details.rb', line 56

def creation_type
  @creation_type
end

#descriptionObject

Description of the creation



51
52
53
# File 'lib/flat_api/models/score_details.rb', line 51

def description
  @description
end

#duration_timeObject

In seconds, an approximative duration of the score



64
65
66
# File 'lib/flat_api/models/score_details.rb', line 64

def duration_time
  @duration_time
end

#edit_html_urlObject

The url where the score can be edited in a web browser



36
37
38
# File 'lib/flat_api/models/score_details.rb', line 36

def edit_html_url
  @edit_html_url
end

#google_drive_file_idObject

If the user uses Google Drive and the score exists on Google Drive, this field will contain the unique identifier of the Flat score on Google Drive. You can access the document using the url: https://drive.google.com/open?id={googleDriveFileId}



111
112
113
# File 'lib/flat_api/models/score_details.rb', line 111

def google_drive_file_id
  @google_drive_file_id
end

#highlighted_dateObject

The date when the score was highlighted (featured) on our community



93
94
95
# File 'lib/flat_api/models/score_details.rb', line 93

def highlighted_date
  @highlighted_date
end

#html_urlObject

The url where the score can be viewed in a web browser



33
34
35
# File 'lib/flat_api/models/score_details.rb', line 33

def html_url
  @html_url
end

#idObject

The unique identifier of the score



20
21
22
# File 'lib/flat_api/models/score_details.rb', line 20

def id
  @id
end

#instrumentsObject

An array of the instrument identifiers used in the last version of the score. This is mainly used to display a list of the instruments in the Flat's UI or instruments icons. The format of the strings is {instrument-group}.{instrument-id}.



102
103
104
# File 'lib/flat_api/models/score_details.rb', line 102

def instruments
  @instruments
end

#instruments_namesObject

An array of the instrument names used in the last version of the score. This list is localized and ready-to-display and will match the indexes from the instruments list.



105
106
107
# File 'lib/flat_api/models/score_details.rb', line 105

def instruments_names
  @instruments_names
end

#licenseObject

Returns the value of attribute license.



58
59
60
# File 'lib/flat_api/models/score_details.rb', line 58

def license
  @license
end

#license_textObject

Additional license text written on the exported/printed score



61
62
63
# File 'lib/flat_api/models/score_details.rb', line 61

def license_text
  @license_text
end

#likesObject

Returns the value of attribute likes.



113
114
115
# File 'lib/flat_api/models/score_details.rb', line 113

def likes
  @likes
end

#lyricistObject

Lyricist of the score



42
43
44
# File 'lib/flat_api/models/score_details.rb', line 42

def lyricist
  @lyricist
end

#main_key_signatureObject

The main key signature of the score (expressed between -7 and 7).



73
74
75
# File 'lib/flat_api/models/score_details.rb', line 73

def main_key_signature
  @main_key_signature
end

#main_tempo_qpmObject

The main tempo of the score (in QPM)



70
71
72
# File 'lib/flat_api/models/score_details.rb', line 70

def main_tempo_qpm
  @main_tempo_qpm
end

#meObject

Returns the value of attribute me.



124
125
126
# File 'lib/flat_api/models/score_details.rb', line 124

def me
  @me
end

#modification_dateObject

The date of the last revision of the score



84
85
86
# File 'lib/flat_api/models/score_details.rb', line 84

def modification_date
  @modification_date
end

#number_measuresObject

The number of measures in the score



67
68
69
# File 'lib/flat_api/models/score_details.rb', line 67

def number_measures
  @number_measures
end

#organizationObject

If the score has been created in an organization, the identifier of this organization. This property is especially used with the score privacy organizationPublic.



96
97
98
# File 'lib/flat_api/models/score_details.rb', line 96

def organization
  @organization
end

#parent_scoreObject

If the score has been forked, the unique identifier of the parent score.



99
100
101
# File 'lib/flat_api/models/score_details.rb', line 99

def parent_score
  @parent_score
end

#playsObject

Returns the value of attribute plays.



119
120
121
# File 'lib/flat_api/models/score_details.rb', line 119

def plays
  @plays
end

#privacyObject

Returns the value of attribute privacy.



28
29
30
# File 'lib/flat_api/models/score_details.rb', line 28

def privacy
  @privacy
end

#publication_dateObject

The date when the score was published on Flat



87
88
89
# File 'lib/flat_api/models/score_details.rb', line 87

def publication_date
  @publication_date
end

#rightsObject

Returns the value of attribute rights.



75
76
77
# File 'lib/flat_api/models/score_details.rb', line 75

def rights
  @rights
end

#samplesObject

An array of the audio samples identifiers used the different score parts. The format of the strings is {instrument-group}.{sample-id}.



108
109
110
# File 'lib/flat_api/models/score_details.rb', line 108

def samples
  @samples
end

#scheduled_deletion_dateObject

The date when the score will be definitively deleted. This date can be in the past if the score will be deleted at the next deletion batch, in this case you can display something like "Deleted shortly". Schedule: * For all paying users, the scores will be definitively deleted after 90 days. * For free users, the scores are no longer available after 24 hours, an can be restored with a paying account up to 90 days.



90
91
92
# File 'lib/flat_api/models/score_details.rb', line 90

def scheduled_deletion_date
  @scheduled_deletion_date
end

#sharing_keyObject

The private sharing key of the score (available when the privacy mode is set to privateLink)



23
24
25
# File 'lib/flat_api/models/score_details.rb', line 23

def sharing_key
  @sharing_key
end

#subtitleObject

Subtitle of the score



39
40
41
# File 'lib/flat_api/models/score_details.rb', line 39

def subtitle
  @subtitle
end

#tagsObject

Tags describing the score



54
55
56
# File 'lib/flat_api/models/score_details.rb', line 54

def tags
  @tags
end

#titleObject

The title of the score



26
27
28
# File 'lib/flat_api/models/score_details.rb', line 26

def title
  @title
end

#userObject

Returns the value of attribute user.



30
31
32
# File 'lib/flat_api/models/score_details.rb', line 30

def user
  @user
end

#viewsObject

Returns the value of attribute views.



117
118
119
# File 'lib/flat_api/models/score_details.rb', line 117

def views
  @views
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



194
195
196
# File 'lib/flat_api/models/score_details.rb', line 194

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



199
200
201
# File 'lib/flat_api/models/score_details.rb', line 199

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/flat_api/models/score_details.rb', line 149

def self.attribute_map
  {
    :'id' => :'id',
    :'sharing_key' => :'sharingKey',
    :'title' => :'title',
    :'privacy' => :'privacy',
    :'user' => :'user',
    :'html_url' => :'htmlUrl',
    :'edit_html_url' => :'editHtmlUrl',
    :'subtitle' => :'subtitle',
    :'lyricist' => :'lyricist',
    :'arranger' => :'arranger',
    :'composer' => :'composer',
    :'description' => :'description',
    :'tags' => :'tags',
    :'creation_type' => :'creationType',
    :'license' => :'license',
    :'license_text' => :'licenseText',
    :'duration_time' => :'durationTime',
    :'number_measures' => :'numberMeasures',
    :'main_tempo_qpm' => :'mainTempoQpm',
    :'main_key_signature' => :'mainKeySignature',
    :'rights' => :'rights',
    :'collaborators' => :'collaborators',
    :'creation_date' => :'creationDate',
    :'modification_date' => :'modificationDate',
    :'publication_date' => :'publicationDate',
    :'scheduled_deletion_date' => :'scheduledDeletionDate',
    :'highlighted_date' => :'highlightedDate',
    :'organization' => :'organization',
    :'parent_score' => :'parentScore',
    :'instruments' => :'instruments',
    :'instruments_names' => :'instrumentsNames',
    :'samples' => :'samples',
    :'google_drive_file_id' => :'googleDriveFileId',
    :'likes' => :'likes',
    :'comments' => :'comments',
    :'views' => :'views',
    :'plays' => :'plays',
    :'collections' => :'collections',
    :'me' => :'me'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
# File 'lib/flat_api/models/score_details.rb', line 711

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_all_ofObject

List of class defined in allOf (OpenAPI v3)



257
258
259
260
261
# File 'lib/flat_api/models/score_details.rb', line 257

def self.openapi_all_of
  [
  :'ScoreSummary'
  ]
end

.openapi_nullableObject

List of attributes with nullable: true



249
250
251
252
253
254
# File 'lib/flat_api/models/score_details.rb', line 249

def self.openapi_nullable
  Set.new([
    :'creation_type',
    :'license',
  ])
end

.openapi_typesObject

Attribute type mapping.



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/flat_api/models/score_details.rb', line 204

def self.openapi_types
  {
    :'id' => :'String',
    :'sharing_key' => :'String',
    :'title' => :'String',
    :'privacy' => :'ScorePrivacy',
    :'user' => :'UserPublic',
    :'html_url' => :'String',
    :'edit_html_url' => :'String',
    :'subtitle' => :'String',
    :'lyricist' => :'String',
    :'arranger' => :'String',
    :'composer' => :'String',
    :'description' => :'String',
    :'tags' => :'Array<String>',
    :'creation_type' => :'ScoreCreationType',
    :'license' => :'ScoreLicense',
    :'license_text' => :'String',
    :'duration_time' => :'Float',
    :'number_measures' => :'Integer',
    :'main_tempo_qpm' => :'Float',
    :'main_key_signature' => :'Float',
    :'rights' => :'ResourceRights',
    :'collaborators' => :'Array<ResourceCollaborator>',
    :'creation_date' => :'Time',
    :'modification_date' => :'Time',
    :'publication_date' => :'Time',
    :'scheduled_deletion_date' => :'Time',
    :'highlighted_date' => :'Time',
    :'organization' => :'String',
    :'parent_score' => :'String',
    :'instruments' => :'Array<String>',
    :'instruments_names' => :'Array<String>',
    :'samples' => :'Array<String>',
    :'google_drive_file_id' => :'String',
    :'likes' => :'ScoreLikesCounts',
    :'comments' => :'ScoreCommentsCounts',
    :'views' => :'ScoreViewsCounts',
    :'plays' => :'ScorePlaysCounts',
    :'collections' => :'Array<String>',
    :'me' => :'ScoreDetailsAllOfMe'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
# File 'lib/flat_api/models/score_details.rb', line 652

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      sharing_key == o.sharing_key &&
      title == o.title &&
      privacy == o.privacy &&
      user == o.user &&
      html_url == o.html_url &&
      edit_html_url == o.edit_html_url &&
      subtitle == o.subtitle &&
      lyricist == o.lyricist &&
      arranger == o.arranger &&
      composer == o.composer &&
      description == o.description &&
      tags == o.tags &&
      creation_type == o.creation_type &&
      license == o.license &&
      license_text == o.license_text &&
      duration_time == o.duration_time &&
      number_measures == o.number_measures &&
      main_tempo_qpm == o.main_tempo_qpm &&
      main_key_signature == o.main_key_signature &&
      rights == o.rights &&
      collaborators == o.collaborators &&
      creation_date == o.creation_date &&
      modification_date == o.modification_date &&
      publication_date == o.publication_date &&
      scheduled_deletion_date == o.scheduled_deletion_date &&
      highlighted_date == o.highlighted_date &&
      organization == o.organization &&
      parent_score == o.parent_score &&
      instruments == o.instruments &&
      instruments_names == o.instruments_names &&
      samples == o.samples &&
      google_drive_file_id == o.google_drive_file_id &&
      likes == o.likes &&
      comments == o.comments &&
      views == o.views &&
      plays == o.plays &&
      collections == o.collections &&
      me == o.me
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


698
699
700
# File 'lib/flat_api/models/score_details.rb', line 698

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



704
705
706
# File 'lib/flat_api/models/score_details.rb', line 704

def hash
  [id, sharing_key, title, privacy, user, html_url, edit_html_url, subtitle, lyricist, arranger, composer, description, tags, creation_type, license, license_text, duration_time, number_measures, main_tempo_qpm, main_key_signature, rights, collaborators, creation_date, modification_date, publication_date, scheduled_deletion_date, highlighted_date, organization, parent_score, instruments, instruments_names, samples, google_drive_file_id, likes, comments, views, plays, collections, me].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/flat_api/models/score_details.rb', line 472

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @id.nil?
    invalid_properties.push('invalid value for "id", id cannot be nil.')
  end

  if @title.nil?
    invalid_properties.push('invalid value for "title", title cannot be nil.')
  end

  if @privacy.nil?
    invalid_properties.push('invalid value for "privacy", privacy cannot be nil.')
  end

  if @user.nil?
    invalid_properties.push('invalid value for "user", user cannot be nil.')
  end

  if @html_url.nil?
    invalid_properties.push('invalid value for "html_url", html_url cannot be nil.')
  end

  if @edit_html_url.nil?
    invalid_properties.push('invalid value for "edit_html_url", edit_html_url cannot be nil.')
  end

  if @collaborators.nil?
    invalid_properties.push('invalid value for "collaborators", collaborators cannot be nil.')
  end

  if @creation_date.nil?
    invalid_properties.push('invalid value for "creation_date", creation_date cannot be nil.')
  end

  if @instruments.nil?
    invalid_properties.push('invalid value for "instruments", instruments cannot be nil.')
  end

  if @instruments_names.nil?
    invalid_properties.push('invalid value for "instruments_names", instruments_names cannot be nil.')
  end

  if @samples.nil?
    invalid_properties.push('invalid value for "samples", samples cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/flat_api/models/score_details.rb', line 733

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/flat_api/models/score_details.rb', line 524

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @id.nil?
  return false if @title.nil?
  return false if @privacy.nil?
  return false if @user.nil?
  return false if @html_url.nil?
  return false if @edit_html_url.nil?
  return false if @collaborators.nil?
  return false if @creation_date.nil?
  return false if @instruments.nil?
  return false if @instruments_names.nil?
  return false if @samples.nil?
  true
end