Class: DdrClient::PatchResourcesMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/ddr_client/models/patch_resources_metadata.rb

Overview

Resource metadata

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PatchResourcesMetadata

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
469
470
471
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
521
522
523
524
525
526
527
528
529
530
531
532
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 307

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'abstract')
    self.abstract = attributes[:'abstract']
  end

  if attributes.has_key?(:'accessRights')
    self.access_rights = attributes[:'accessRights']
  end

  if attributes.has_key?(:'alternative')
    self.alternative = attributes[:'alternative']
  end

  if attributes.has_key?(:'available')
    self.available = attributes[:'available']
  end

  if attributes.has_key?(:'contributor')
    self.contributor = attributes[:'contributor']
  end

  if attributes.has_key?(:'creator')
    self.creator = attributes[:'creator']
  end

  if attributes.has_key?(:'date')
    self.date = attributes[:'date']
  end

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

  if attributes.has_key?(:'extent')
    self.extent = attributes[:'extent']
  end

  if attributes.has_key?(:'format')
    self.format = attributes[:'format']
  end

  if attributes.has_key?(:'hasPart')
    self.has_part = attributes[:'hasPart']
  end

  if attributes.has_key?(:'identifier')
    self.identifier = attributes[:'identifier']
  end

  if attributes.has_key?(:'isFormatOf')
    self.is_format_of = attributes[:'isFormatOf']
  end

  if attributes.has_key?(:'isPartOf')
    self.is_part_of = attributes[:'isPartOf']
  end

  if attributes.has_key?(:'language')
    self.language = attributes[:'language']
  end

  if attributes.has_key?(:'medium')
    self.medium = attributes[:'medium']
  end

  if attributes.has_key?(:'provenance')
    self.provenance = attributes[:'provenance']
  end

  if attributes.has_key?(:'publisher')
    self.publisher = attributes[:'publisher']
  end

  if attributes.has_key?(:'relation')
    self.relation = attributes[:'relation']
  end

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

  if attributes.has_key?(:'spatial')
    self.spatial = attributes[:'spatial']
  end

  if attributes.has_key?(:'subject')
    self.subject = attributes[:'subject']
  end

  if attributes.has_key?(:'title')
    self.title = attributes[:'title']
  end

  if attributes.has_key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.has_key?(:'admin_set')
    self.admin_set = attributes[:'admin_set']
  end

  if attributes.has_key?(:'aleph_id')
    self.aleph_id = attributes[:'aleph_id']
  end

  if attributes.has_key?(:'aspace_id')
    self.aspace_id = attributes[:'aspace_id']
  end

  if attributes.has_key?(:'contentdm_id')
    self.contentdm_id = attributes[:'contentdm_id']
  end

  if attributes.has_key?(:'display_format')
    self.display_format = attributes[:'display_format']
  end

  if attributes.has_key?(:'doi')
    self.doi = attributes[:'doi']
  end

  if attributes.has_key?(:'ead_id')
    self.ead_id = attributes[:'ead_id']
  end

  if attributes.has_key?(:'fcrepo3_pid')
    self.fcrepo3_pid = attributes[:'fcrepo3_pid']
  end

  if attributes.has_key?(:'ingested_by')
    self.ingested_by = attributes[:'ingested_by']
  end

  if attributes.has_key?(:'ingestion_date')
    self.ingestion_date = attributes[:'ingestion_date']
  end

  if attributes.has_key?(:'local_id')
    self.local_id = attributes[:'local_id']
  end

  if attributes.has_key?(:'nested_path')
    self.nested_path = attributes[:'nested_path']
  end

  if attributes.has_key?(:'permanent_id')
    self.permanent_id = attributes[:'permanent_id']
  end

  if attributes.has_key?(:'permanent_url')
    self.permanent_url = attributes[:'permanent_url']
  end

  if attributes.has_key?(:'research_help_contact')
    self.research_help_contact = attributes[:'research_help_contact']
  end

  if attributes.has_key?(:'rights_note')
    self.rights_note = attributes[:'rights_note']
  end

  if attributes.has_key?(:'workflow_state')
    self.workflow_state = attributes[:'workflow_state']
  end

  if attributes.has_key?(:'biblical_book')
    self.biblical_book = attributes[:'biblical_book']
  end

  if attributes.has_key?(:'category')
    self.category = attributes[:'category']
  end

  if attributes.has_key?(:'chapter_and_verse')
    self.chapter_and_verse = attributes[:'chapter_and_verse']
  end

  if attributes.has_key?(:'company')
    self.company = attributes[:'company']
  end

  if attributes.has_key?(:'headline')
    self.headline = attributes[:'headline']
  end

  if attributes.has_key?(:'issue_number')
    self.issue_number = attributes[:'issue_number']
  end

  if attributes.has_key?(:'placement_company')
    self.placement_company = attributes[:'placement_company']
  end

  if attributes.has_key?(:'product')
    self.product = attributes[:'product']
  end

  if attributes.has_key?(:'publication')
    self.publication = attributes[:'publication']
  end

  if attributes.has_key?(:'series')
    self.series = attributes[:'series']
  end

  if attributes.has_key?(:'setting')
    self.setting = attributes[:'setting']
  end

  if attributes.has_key?(:'sponsor')
    self.sponsor = attributes[:'sponsor']
  end

  if attributes.has_key?(:'tone')
    self.tone = attributes[:'tone']
  end

  if attributes.has_key?(:'volume')
    self.volume = attributes[:'volume']
  end
end

Instance Attribute Details

#abstractObject



19
20
21
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 19

def abstract
  @abstract
end

#access_rightsObject



22
23
24
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 22

def access_rights
  @access_rights
end

#admin_setObject

Administrative group to which the collection belongs



91
92
93
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 91

def admin_set
  @admin_set
end

#aleph_idObject

Aleph identifier



94
95
96
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 94

def aleph_id
  @aleph_id
end

#alternativeObject



25
26
27
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 25

def alternative
  @alternative
end

#aspace_idObject

ArchivesSpace identifier



97
98
99
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 97

def aspace_id
  @aspace_id
end

#availableObject



28
29
30
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 28

def available
  @available
end

#biblical_bookObject

Biblical Book



142
143
144
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 142

def biblical_book
  @biblical_book
end

#categoryObject

Category



145
146
147
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 145

def category
  @category
end

#chapter_and_verseObject

Chapter And Verse



148
149
150
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 148

def chapter_and_verse
  @chapter_and_verse
end

#companyObject

Company



151
152
153
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 151

def company
  @company
end

#contentdm_idObject

CONTENTdm identifier (deprecated)



100
101
102
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 100

def contentdm_id
  @contentdm_id
end

#contributorObject



31
32
33
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 31

def contributor
  @contributor
end

#creatorObject



34
35
36
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 34

def creator
  @creator
end

#dateObject



37
38
39
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 37

def date
  @date
end

#descriptionObject



40
41
42
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 40

def description
  @description
end

#display_formatObject

Display Format



103
104
105
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 103

def display_format
  @display_format
end

#doiObject

Digital Object Identifier (doi.org)



106
107
108
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 106

def doi
  @doi
end

#ead_idObject

Source collection identifier



109
110
111
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 109

def ead_id
  @ead_id
end

#extentObject



43
44
45
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 43

def extent
  @extent
end

#fcrepo3_pidObject

Resource ID from defunct Fedora 3 repository



112
113
114
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 112

def fcrepo3_pid
  @fcrepo3_pid
end

#formatObject



46
47
48
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 46

def format
  @format
end

#has_partObject



49
50
51
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 49

def has_part
  @has_part
end

#headlineObject

Headline



154
155
156
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 154

def headline
  @headline
end

#identifierObject



52
53
54
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 52

def identifier
  @identifier
end

#ingested_byObject

Person or entity responsible for ingest



115
116
117
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 115

def ingested_by
  @ingested_by
end

#ingestion_dateObject

Date/time of original ingest (may differ from created_at)



118
119
120
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 118

def ingestion_date
  @ingestion_date
end

#is_format_ofObject



55
56
57
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 55

def is_format_of
  @is_format_of
end

#is_part_ofObject



58
59
60
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 58

def is_part_of
  @is_part_of
end

#issue_numberObject

Issue Number



157
158
159
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 157

def issue_number
  @issue_number
end

#languageObject



61
62
63
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 61

def language
  @language
end

#local_idObject

Digital Collections identifier



121
122
123
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 121

def local_id
  @local_id
end

#mediumObject



64
65
66
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 64

def medium
  @medium
end

#nested_pathObject

Path to original file from root ingest folder



124
125
126
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 124

def nested_path
  @nested_path
end

#permanent_idObject

Permanent identifier (ARK) assigned to the resource



127
128
129
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 127

def permanent_id
  @permanent_id
end

#permanent_urlObject

Permalink to the end-user representation of the resource.



130
131
132
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 130

def permanent_url
  @permanent_url
end

#placement_companyObject

Placement Company



160
161
162
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 160

def placement_company
  @placement_company
end

#productObject

Product



163
164
165
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 163

def product
  @product
end

#provenanceObject



67
68
69
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 67

def provenance
  @provenance
end

#publicationObject

Publication



166
167
168
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 166

def publication
  @publication
end

#publisherObject



70
71
72
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 70

def publisher
  @publisher
end

#relationObject



73
74
75
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 73

def relation
  @relation
end

#research_help_contactObject

Research Help Contact



133
134
135
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 133

def research_help_contact
  @research_help_contact
end

#rightsObject



76
77
78
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 76

def rights
  @rights
end

#rights_noteObject

Rights Note



136
137
138
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 136

def rights_note
  @rights_note
end

#seriesObject

Series



169
170
171
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 169

def series
  @series
end

#settingObject

Setting



172
173
174
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 172

def setting
  @setting
end

#spatialObject



79
80
81
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 79

def spatial
  @spatial
end

Sponsor



175
176
177
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 175

def sponsor
  @sponsor
end

#subjectObject



82
83
84
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 82

def subject
  @subject
end

#titleObject



85
86
87
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 85

def title
  @title
end

#toneObject

Tone



178
179
180
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 178

def tone
  @tone
end

#typeObject



88
89
90
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 88

def type
  @type
end

#volumeObject

Volume



181
182
183
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 181

def volume
  @volume
end

#workflow_stateObject

Workflow State



139
140
141
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 139

def workflow_state
  @workflow_state
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 184

def self.attribute_map
  {
    :'abstract' => :'abstract',
    :'access_rights' => :'accessRights',
    :'alternative' => :'alternative',
    :'available' => :'available',
    :'contributor' => :'contributor',
    :'creator' => :'creator',
    :'date' => :'date',
    :'description' => :'description',
    :'extent' => :'extent',
    :'format' => :'format',
    :'has_part' => :'hasPart',
    :'identifier' => :'identifier',
    :'is_format_of' => :'isFormatOf',
    :'is_part_of' => :'isPartOf',
    :'language' => :'language',
    :'medium' => :'medium',
    :'provenance' => :'provenance',
    :'publisher' => :'publisher',
    :'relation' => :'relation',
    :'rights' => :'rights',
    :'spatial' => :'spatial',
    :'subject' => :'subject',
    :'title' => :'title',
    :'type' => :'type',
    :'admin_set' => :'admin_set',
    :'aleph_id' => :'aleph_id',
    :'aspace_id' => :'aspace_id',
    :'contentdm_id' => :'contentdm_id',
    :'display_format' => :'display_format',
    :'doi' => :'doi',
    :'ead_id' => :'ead_id',
    :'fcrepo3_pid' => :'fcrepo3_pid',
    :'ingested_by' => :'ingested_by',
    :'ingestion_date' => :'ingestion_date',
    :'local_id' => :'local_id',
    :'nested_path' => :'nested_path',
    :'permanent_id' => :'permanent_id',
    :'permanent_url' => :'permanent_url',
    :'research_help_contact' => :'research_help_contact',
    :'rights_note' => :'rights_note',
    :'workflow_state' => :'workflow_state',
    :'biblical_book' => :'biblical_book',
    :'category' => :'category',
    :'chapter_and_verse' => :'chapter_and_verse',
    :'company' => :'company',
    :'headline' => :'headline',
    :'issue_number' => :'issue_number',
    :'placement_company' => :'placement_company',
    :'product' => :'product',
    :'publication' => :'publication',
    :'series' => :'series',
    :'setting' => :'setting',
    :'sponsor' => :'sponsor',
    :'tone' => :'tone',
    :'volume' => :'volume'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 245

def self.swagger_types
  {
    :'abstract' => :'String',
    :'access_rights' => :'String',
    :'alternative' => :'String',
    :'available' => :'String',
    :'contributor' => :'String',
    :'creator' => :'String',
    :'date' => :'String',
    :'description' => :'String',
    :'extent' => :'String',
    :'format' => :'String',
    :'has_part' => :'String',
    :'identifier' => :'String',
    :'is_format_of' => :'String',
    :'is_part_of' => :'String',
    :'language' => :'String',
    :'medium' => :'String',
    :'provenance' => :'String',
    :'publisher' => :'String',
    :'relation' => :'String',
    :'rights' => :'String',
    :'spatial' => :'String',
    :'subject' => :'String',
    :'title' => :'String',
    :'type' => :'String',
    :'admin_set' => :'String',
    :'aleph_id' => :'String',
    :'aspace_id' => :'String',
    :'contentdm_id' => :'String',
    :'display_format' => :'String',
    :'doi' => :'String',
    :'ead_id' => :'String',
    :'fcrepo3_pid' => :'String',
    :'ingested_by' => :'String',
    :'ingestion_date' => :'String',
    :'local_id' => :'String',
    :'nested_path' => :'String',
    :'permanent_id' => :'String',
    :'permanent_url' => :'String',
    :'research_help_contact' => :'String',
    :'rights_note' => :'String',
    :'workflow_state' => :'String',
    :'biblical_book' => :'String',
    :'category' => :'String',
    :'chapter_and_verse' => :'String',
    :'company' => :'String',
    :'headline' => :'String',
    :'issue_number' => :'String',
    :'placement_company' => :'String',
    :'product' => :'String',
    :'publication' => :'String',
    :'series' => :'String',
    :'setting' => :'String',
    :'sponsor' => :'String',
    :'tone' => :'String',
    :'volume' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 549

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      abstract == o.abstract &&
      access_rights == o.access_rights &&
      alternative == o.alternative &&
      available == o.available &&
      contributor == o.contributor &&
      creator == o.creator &&
      date == o.date &&
      description == o.description &&
      extent == o.extent &&
      format == o.format &&
      has_part == o.has_part &&
      identifier == o.identifier &&
      is_format_of == o.is_format_of &&
      is_part_of == o.is_part_of &&
      language == o.language &&
      medium == o.medium &&
      provenance == o.provenance &&
      publisher == o.publisher &&
      relation == o.relation &&
      rights == o.rights &&
      spatial == o.spatial &&
      subject == o.subject &&
      title == o.title &&
      type == o.type &&
      admin_set == o.admin_set &&
      aleph_id == o.aleph_id &&
      aspace_id == o.aspace_id &&
      contentdm_id == o.contentdm_id &&
      display_format == o.display_format &&
      doi == o.doi &&
      ead_id == o.ead_id &&
      fcrepo3_pid == o.fcrepo3_pid &&
      ingested_by == o.ingested_by &&
      ingestion_date == o.ingestion_date &&
      local_id == o.local_id &&
      nested_path == o.nested_path &&
      permanent_id == o.permanent_id &&
      permanent_url == o.permanent_url &&
      research_help_contact == o.research_help_contact &&
      rights_note == o.rights_note &&
      workflow_state == o.workflow_state &&
      biblical_book == o.biblical_book &&
      category == o.category &&
      chapter_and_verse == o.chapter_and_verse &&
      company == o.company &&
      headline == o.headline &&
      issue_number == o.issue_number &&
      placement_company == o.placement_company &&
      product == o.product &&
      publication == o.publication &&
      series == o.series &&
      setting == o.setting &&
      sponsor == o.sponsor &&
      tone == o.tone &&
      volume == o.volume
end

#_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



645
646
647
648
649
650
651
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
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 645

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = DdrClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
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



711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 711

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

#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



624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 624

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if 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[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


611
612
613
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 611

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



617
618
619
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 617

def hash
  [abstract, access_rights, alternative, available, contributor, creator, date, description, extent, format, has_part, identifier, is_format_of, is_part_of, language, medium, provenance, publisher, relation, rights, spatial, subject, title, type, admin_set, aleph_id, aspace_id, contentdm_id, display_format, doi, ead_id, fcrepo3_pid, ingested_by, ingestion_date, local_id, nested_path, permanent_id, permanent_url, research_help_contact, rights_note, workflow_state, biblical_book, category, chapter_and_verse, company, headline, issue_number, placement_company, product, publication, series, setting, sponsor, tone, volume].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



536
537
538
539
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 536

def list_invalid_properties
  invalid_properties = Array.new
  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



691
692
693
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 691

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



697
698
699
700
701
702
703
704
705
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 697

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



685
686
687
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 685

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



543
544
545
# File 'lib/ddr_client/models/patch_resources_metadata.rb', line 543

def valid?
  true
end