Class: SongtradrApiClientRuby::UserDTO

Inherits:
Object
  • Object
show all
Defined in:
lib/songtradr_api_client_ruby/models/user_dto.rb

Overview

All details on a user.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UserDTO

Initializes the object

Parameters:

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

    Model attributes in the form of hash



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
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
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 168

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#adminObject

Returns the value of attribute admin.



79
80
81
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 79

def admin
  @admin
end

#artist_detail_allowedObject

Returns the value of attribute artist_detail_allowed.



33
34
35
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 33

def artist_detail_allowed
  @artist_detail_allowed
end

#audience_allowedObject

Returns the value of attribute audience_allowed.



65
66
67
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 65

def audience_allowed
  @audience_allowed
end

#audiotagging_allowedObject

Returns the value of attribute audiotagging_allowed.



45
46
47
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 45

def audiotagging_allowed
  @audiotagging_allowed
end

#b2b_allowedObject

Returns the value of attribute b2b_allowed.



47
48
49
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 47

def b2b_allowed
  @b2b_allowed
end

#company_nameObject

Returns the value of attribute company_name.



23
24
25
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 23

def company_name
  @company_name
end

#confirmedObject

Returns the value of attribute confirmed.



73
74
75
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 73

def confirmed
  @confirmed
end

#editor_allowedObject

Returns the value of attribute editor_allowed.



49
50
51
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 49

def editor_allowed
  @editor_allowed
end

#email_addressObject

Returns the value of attribute email_address.



21
22
23
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 21

def email_address
  @email_address
end

#fingerprint_allowedObject

Returns the value of attribute fingerprint_allowed.



43
44
45
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 43

def fingerprint_allowed
  @fingerprint_allowed
end

#full_search_allowedObject

Returns the value of attribute full_search_allowed.



27
28
29
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 27

def full_search_allowed
  @full_search_allowed
end

#genres_allowedObject

Returns the value of attribute genres_allowed.



53
54
55
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 53

def genres_allowed
  @genres_allowed
end

#insights_allowedObject

Returns the value of attribute insights_allowed.



51
52
53
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 51

def insights_allowed
  @insights_allowed
end

#instrumentation_allowedObject

Returns the value of attribute instrumentation_allowed.



57
58
59
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 57

def instrumentation_allowed
  @instrumentation_allowed
end

#is_adminObject

Returns the value of attribute is_admin.



25
26
27
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 25

def is_admin
  @is_admin
end

#languageObject

Returns the value of attribute language.



75
76
77
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 75

def language
  @language
end

#moods_allowedObject

Returns the value of attribute moods_allowed.



55
56
57
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 55

def moods_allowed
  @moods_allowed
end

#origin_allowedObject

Returns the value of attribute origin_allowed.



67
68
69
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 67

def origin_allowed
  @origin_allowed
end

#playlist_prediction_allowedObject

Returns the value of attribute playlist_prediction_allowed.



35
36
37
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 35

def playlist_prediction_allowed
  @playlist_prediction_allowed
end

#quality_allowedObject

Returns the value of attribute quality_allowed.



69
70
71
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 69

def quality_allowed
  @quality_allowed
end

#recording_detail_allowedObject

Returns the value of attribute recording_detail_allowed.



31
32
33
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 31

def recording_detail_allowed
  @recording_detail_allowed
end

#recording_endpoints_allowedObject

Returns the value of attribute recording_endpoints_allowed.



77
78
79
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 77

def recording_endpoints_allowed
  @recording_endpoints_allowed
end

#reduced_musical_featuresObject

Returns the value of attribute reduced_musical_features.



71
72
73
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 71

def reduced_musical_features
  @reduced_musical_features
end

#rhythm_features_allowedObject

Returns the value of attribute rhythm_features_allowed.



63
64
65
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 63

def rhythm_features_allowed
  @rhythm_features_allowed
end

#signup_allowedObject

Returns the value of attribute signup_allowed.



39
40
41
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 39

def 
  @signup_allowed
end

#sound_features_allowedObject

Returns the value of attribute sound_features_allowed.



59
60
61
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 59

def sound_features_allowed
  @sound_features_allowed
end

#tonal_features_allowedObject

Returns the value of attribute tonal_features_allowed.



61
62
63
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 61

def tonal_features_allowed
  @tonal_features_allowed
end

#upload_allowedObject

Returns the value of attribute upload_allowed.



41
42
43
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 41

def upload_allowed
  @upload_allowed
end

#usernameObject

Returns the value of attribute username.



19
20
21
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 19

def username
  @username
end

#voice_search_allowedObject

Returns the value of attribute voice_search_allowed.



29
30
31
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 29

def voice_search_allowed
  @voice_search_allowed
end

#widgets_allowedObject

Returns the value of attribute widgets_allowed.



37
38
39
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 37

def widgets_allowed
  @widgets_allowed
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 601

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = SongtradrApiClientRuby.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



119
120
121
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 119

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 82

def self.attribute_map
  {
    :'username' => :'username',
    :'email_address' => :'emailAddress',
    :'company_name' => :'companyName',
    :'is_admin' => :'isAdmin',
    :'full_search_allowed' => :'fullSearchAllowed',
    :'voice_search_allowed' => :'voiceSearchAllowed',
    :'recording_detail_allowed' => :'recordingDetailAllowed',
    :'artist_detail_allowed' => :'artistDetailAllowed',
    :'playlist_prediction_allowed' => :'playlistPredictionAllowed',
    :'widgets_allowed' => :'widgetsAllowed',
    :'signup_allowed' => :'signupAllowed',
    :'upload_allowed' => :'uploadAllowed',
    :'fingerprint_allowed' => :'fingerprintAllowed',
    :'audiotagging_allowed' => :'audiotaggingAllowed',
    :'b2b_allowed' => :'b2bAllowed',
    :'editor_allowed' => :'editorAllowed',
    :'insights_allowed' => :'insightsAllowed',
    :'genres_allowed' => :'genresAllowed',
    :'moods_allowed' => :'moodsAllowed',
    :'instrumentation_allowed' => :'instrumentationAllowed',
    :'sound_features_allowed' => :'soundFeaturesAllowed',
    :'tonal_features_allowed' => :'tonalFeaturesAllowed',
    :'rhythm_features_allowed' => :'rhythmFeaturesAllowed',
    :'audience_allowed' => :'audienceAllowed',
    :'origin_allowed' => :'originAllowed',
    :'quality_allowed' => :'qualityAllowed',
    :'reduced_musical_features' => :'reducedMusicalFeatures',
    :'confirmed' => :'confirmed',
    :'language' => :'language',
    :'recording_endpoints_allowed' => :'recordingEndpointsAllowed',
    :'admin' => :'admin'
  }
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



577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 577

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_nullableObject

List of attributes with nullable: true



161
162
163
164
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 161

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 124

def self.openapi_types
  {
    :'username' => :'String',
    :'email_address' => :'String',
    :'company_name' => :'String',
    :'is_admin' => :'Boolean',
    :'full_search_allowed' => :'Boolean',
    :'voice_search_allowed' => :'Boolean',
    :'recording_detail_allowed' => :'Boolean',
    :'artist_detail_allowed' => :'Boolean',
    :'playlist_prediction_allowed' => :'Boolean',
    :'widgets_allowed' => :'Boolean',
    :'signup_allowed' => :'Boolean',
    :'upload_allowed' => :'Boolean',
    :'fingerprint_allowed' => :'Boolean',
    :'audiotagging_allowed' => :'Boolean',
    :'b2b_allowed' => :'Boolean',
    :'editor_allowed' => :'Boolean',
    :'insights_allowed' => :'Boolean',
    :'genres_allowed' => :'Boolean',
    :'moods_allowed' => :'Boolean',
    :'instrumentation_allowed' => :'Boolean',
    :'sound_features_allowed' => :'Boolean',
    :'tonal_features_allowed' => :'Boolean',
    :'rhythm_features_allowed' => :'Boolean',
    :'audience_allowed' => :'Boolean',
    :'origin_allowed' => :'Boolean',
    :'quality_allowed' => :'Boolean',
    :'reduced_musical_features' => :'Boolean',
    :'confirmed' => :'Boolean',
    :'language' => :'String',
    :'recording_endpoints_allowed' => :'Boolean',
    :'admin' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 526

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      username == o.username &&
      email_address == o.email_address &&
      company_name == o.company_name &&
      is_admin == o.is_admin &&
      full_search_allowed == o.full_search_allowed &&
      voice_search_allowed == o.voice_search_allowed &&
      recording_detail_allowed == o.recording_detail_allowed &&
      artist_detail_allowed == o.artist_detail_allowed &&
      playlist_prediction_allowed == o.playlist_prediction_allowed &&
      widgets_allowed == o.widgets_allowed &&
       == o. &&
      upload_allowed == o.upload_allowed &&
      fingerprint_allowed == o.fingerprint_allowed &&
      audiotagging_allowed == o.audiotagging_allowed &&
      b2b_allowed == o.b2b_allowed &&
      editor_allowed == o.editor_allowed &&
      insights_allowed == o.insights_allowed &&
      genres_allowed == o.genres_allowed &&
      moods_allowed == o.moods_allowed &&
      instrumentation_allowed == o.instrumentation_allowed &&
      sound_features_allowed == o.sound_features_allowed &&
      tonal_features_allowed == o.tonal_features_allowed &&
      rhythm_features_allowed == o.rhythm_features_allowed &&
      audience_allowed == o.audience_allowed &&
      origin_allowed == o.origin_allowed &&
      quality_allowed == o.quality_allowed &&
      reduced_musical_features == o.reduced_musical_features &&
      confirmed == o.confirmed &&
      language == o.language &&
      recording_endpoints_allowed == o.recording_endpoints_allowed &&
      admin == o.admin
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 672

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


564
565
566
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 564

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



570
571
572
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 570

def hash
  [username, email_address, company_name, is_admin, full_search_allowed, voice_search_allowed, recording_detail_allowed, artist_detail_allowed, playlist_prediction_allowed, widgets_allowed, , upload_allowed, fingerprint_allowed, audiotagging_allowed, b2b_allowed, editor_allowed, insights_allowed, genres_allowed, moods_allowed, instrumentation_allowed, sound_features_allowed, tonal_features_allowed, rhythm_features_allowed, audience_allowed, origin_allowed, quality_allowed, reduced_musical_features, confirmed, language, recording_endpoints_allowed, admin].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 366

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



648
649
650
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 648

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 654

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



642
643
644
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 642

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



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
521
522
# File 'lib/songtradr_api_client_ruby/models/user_dto.rb', line 490

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @username.nil?
  return false if @email_address.nil?
  return false if @is_admin.nil?
  return false if @full_search_allowed.nil?
  return false if @voice_search_allowed.nil?
  return false if @recording_detail_allowed.nil?
  return false if @artist_detail_allowed.nil?
  return false if @playlist_prediction_allowed.nil?
  return false if @widgets_allowed.nil?
  return false if @signup_allowed.nil?
  return false if @upload_allowed.nil?
  return false if @fingerprint_allowed.nil?
  return false if @audiotagging_allowed.nil?
  return false if @b2b_allowed.nil?
  return false if @editor_allowed.nil?
  return false if @insights_allowed.nil?
  return false if @genres_allowed.nil?
  return false if @moods_allowed.nil?
  return false if @instrumentation_allowed.nil?
  return false if @sound_features_allowed.nil?
  return false if @tonal_features_allowed.nil?
  return false if @rhythm_features_allowed.nil?
  return false if @audience_allowed.nil?
  return false if @origin_allowed.nil?
  return false if @quality_allowed.nil?
  return false if @reduced_musical_features.nil?
  return false if @confirmed.nil?
  return false if @language.nil?
  return false if @recording_endpoints_allowed.nil?
  true
end