Class: PulpDebClient::DebSourcePackageResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/pulp_deb_client/models/deb_source_package_response.rb

Overview

A Serializer for DscFile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DebSourcePackageResponse

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 180

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebSourcePackageResponse` 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 `PulpDebClient::DebSourcePackageResponse`. 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?(:'pulp_href')
    self.pulp_href = attributes[:'pulp_href']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#architectureObject

Returns the value of attribute architecture.



44
45
46
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 44

def architecture
  @architecture
end

#artifactsObject

A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {‘relative/path’: ‘/artifacts/1/’



30
31
32
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 30

def artifacts
  @artifacts
end

#binaryObject

Returns the value of attribute binary.



42
43
44
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 42

def binary
  @binary
end

#build_conflictsObject

Returns the value of attribute build_conflicts.



84
85
86
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 84

def build_conflicts
  @build_conflicts
end

#build_conflicts_archObject

Returns the value of attribute build_conflicts_arch.



88
89
90
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 88

def build_conflicts_arch
  @build_conflicts_arch
end

#build_conflicts_indepObject

Returns the value of attribute build_conflicts_indep.



86
87
88
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 86

def build_conflicts_indep
  @build_conflicts_indep
end

#build_dependsObject

Returns the value of attribute build_depends.



78
79
80
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 78

def build_depends
  @build_depends
end

#build_depends_archObject

Returns the value of attribute build_depends_arch.



82
83
84
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 82

def build_depends_arch
  @build_depends_arch
end

#build_depends_indepObject

Returns the value of attribute build_depends_indep.



80
81
82
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 80

def build_depends_indep
  @build_depends_indep
end

#dgitObject

Returns the value of attribute dgit.



74
75
76
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 74

def dgit
  @dgit
end

#formatObject

Returns the value of attribute format.



38
39
40
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 38

def format
  @format
end

#homepageObject

Returns the value of attribute homepage.



52
53
54
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 52

def homepage
  @homepage
end

#maintainerObject

Returns the value of attribute maintainer.



48
49
50
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 48

def maintainer
  @maintainer
end

#package_listObject

Returns the value of attribute package_list.



90
91
92
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 90

def package_list
  @package_list
end

#prnObject

The Pulp Resource Name (PRN).



21
22
23
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 21

def prn
  @prn
end

#pulp_createdObject

Timestamp of creation.



24
25
26
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 24

def pulp_created
  @pulp_created
end

#pulp_hrefObject

Returns the value of attribute pulp_href.



18
19
20
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 18

def pulp_href
  @pulp_href
end

#pulp_last_updatedObject

Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.



27
28
29
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 27

def pulp_last_updated
  @pulp_last_updated
end

#relative_pathObject

Relative path of the Debian Source Control (dsc) file.It is normally advised to let Pulp generate this.



33
34
35
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 33

def relative_path
  @relative_path
end

#sha256Object

sha256 digest of the dsc file.



36
37
38
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 36

def sha256
  @sha256
end

#sourceObject

Returns the value of attribute source.



40
41
42
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 40

def source
  @source
end

#standards_versionObject

Returns the value of attribute standards_version.



76
77
78
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 76

def standards_version
  @standards_version
end

#testsuiteObject

Returns the value of attribute testsuite.



72
73
74
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 72

def testsuite
  @testsuite
end

#uploadersObject

Returns the value of attribute uploaders.



50
51
52
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 50

def uploaders
  @uploaders
end

#vcs_archObject

Returns the value of attribute vcs_arch.



56
57
58
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 56

def vcs_arch
  @vcs_arch
end

#vcs_browserObject

Returns the value of attribute vcs_browser.



54
55
56
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 54

def vcs_browser
  @vcs_browser
end

#vcs_bzrObject

Returns the value of attribute vcs_bzr.



58
59
60
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 58

def vcs_bzr
  @vcs_bzr
end

#vcs_cvsObject

Returns the value of attribute vcs_cvs.



60
61
62
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 60

def vcs_cvs
  @vcs_cvs
end

#vcs_darcsObject

Returns the value of attribute vcs_darcs.



62
63
64
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 62

def vcs_darcs
  @vcs_darcs
end

#vcs_gitObject

Returns the value of attribute vcs_git.



64
65
66
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 64

def vcs_git
  @vcs_git
end

#vcs_hgObject

Returns the value of attribute vcs_hg.



66
67
68
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 66

def vcs_hg
  @vcs_hg
end

#vcs_mtnObject

Returns the value of attribute vcs_mtn.



68
69
70
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 68

def vcs_mtn
  @vcs_mtn
end

#vcs_snvObject

Returns the value of attribute vcs_snv.



70
71
72
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 70

def vcs_snv
  @vcs_snv
end

#versionObject

Returns the value of attribute version.



46
47
48
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 46

def version
  @version
end

Class Method Details

.attribute_mapObject

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



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 93

def self.attribute_map
  {
    :'pulp_href' => :'pulp_href',
    :'prn' => :'prn',
    :'pulp_created' => :'pulp_created',
    :'pulp_last_updated' => :'pulp_last_updated',
    :'artifacts' => :'artifacts',
    :'relative_path' => :'relative_path',
    :'sha256' => :'sha256',
    :'format' => :'format',
    :'source' => :'source',
    :'binary' => :'binary',
    :'architecture' => :'architecture',
    :'version' => :'version',
    :'maintainer' => :'maintainer',
    :'uploaders' => :'uploaders',
    :'homepage' => :'homepage',
    :'vcs_browser' => :'vcs_browser',
    :'vcs_arch' => :'vcs_arch',
    :'vcs_bzr' => :'vcs_bzr',
    :'vcs_cvs' => :'vcs_cvs',
    :'vcs_darcs' => :'vcs_darcs',
    :'vcs_git' => :'vcs_git',
    :'vcs_hg' => :'vcs_hg',
    :'vcs_mtn' => :'vcs_mtn',
    :'vcs_snv' => :'vcs_snv',
    :'testsuite' => :'testsuite',
    :'dgit' => :'dgit',
    :'standards_version' => :'standards_version',
    :'build_depends' => :'build_depends',
    :'build_depends_indep' => :'build_depends_indep',
    :'build_depends_arch' => :'build_depends_arch',
    :'build_conflicts' => :'build_conflicts',
    :'build_conflicts_indep' => :'build_conflicts_indep',
    :'build_conflicts_arch' => :'build_conflicts_arch',
    :'package_list' => :'package_list'
  }
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



404
405
406
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 404

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



173
174
175
176
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 173

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

.openapi_typesObject

Attribute type mapping.



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
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 133

def self.openapi_types
  {
    :'pulp_href' => :'String',
    :'prn' => :'String',
    :'pulp_created' => :'DateTime',
    :'pulp_last_updated' => :'DateTime',
    :'artifacts' => :'Object',
    :'relative_path' => :'String',
    :'sha256' => :'String',
    :'format' => :'String',
    :'source' => :'String',
    :'binary' => :'String',
    :'architecture' => :'String',
    :'version' => :'String',
    :'maintainer' => :'String',
    :'uploaders' => :'String',
    :'homepage' => :'String',
    :'vcs_browser' => :'String',
    :'vcs_arch' => :'String',
    :'vcs_bzr' => :'String',
    :'vcs_cvs' => :'String',
    :'vcs_darcs' => :'String',
    :'vcs_git' => :'String',
    :'vcs_hg' => :'String',
    :'vcs_mtn' => :'String',
    :'vcs_snv' => :'String',
    :'testsuite' => :'String',
    :'dgit' => :'String',
    :'standards_version' => :'String',
    :'build_depends' => :'String',
    :'build_depends_indep' => :'String',
    :'build_depends_arch' => :'String',
    :'build_conflicts' => :'String',
    :'build_conflicts_indep' => :'String',
    :'build_conflicts_arch' => :'String',
    :'package_list' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 350

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      pulp_href == o.pulp_href &&
      prn == o.prn &&
      pulp_created == o.pulp_created &&
      pulp_last_updated == o.pulp_last_updated &&
      artifacts == o.artifacts &&
      relative_path == o.relative_path &&
      sha256 == o.sha256 &&
      format == o.format &&
      source == o.source &&
      binary == o.binary &&
      architecture == o.architecture &&
      version == o.version &&
      maintainer == o.maintainer &&
      uploaders == o.uploaders &&
      homepage == o.homepage &&
      vcs_browser == o.vcs_browser &&
      vcs_arch == o.vcs_arch &&
      vcs_bzr == o.vcs_bzr &&
      vcs_cvs == o.vcs_cvs &&
      vcs_darcs == o.vcs_darcs &&
      vcs_git == o.vcs_git &&
      vcs_hg == o.vcs_hg &&
      vcs_mtn == o.vcs_mtn &&
      vcs_snv == o.vcs_snv &&
      testsuite == o.testsuite &&
      dgit == o.dgit &&
      standards_version == o.standards_version &&
      build_depends == o.build_depends &&
      build_depends_indep == o.build_depends_indep &&
      build_depends_arch == o.build_depends_arch &&
      build_conflicts == o.build_conflicts &&
      build_conflicts_indep == o.build_conflicts_indep &&
      build_conflicts_arch == o.build_conflicts_arch &&
      package_list == o.package_list
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



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
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 432

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
    PulpDebClient.const_get(type).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



501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 501

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



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 411

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_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


391
392
393
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 391

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



397
398
399
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 397

def hash
  [pulp_href, prn, pulp_created, pulp_last_updated, artifacts, relative_path, sha256, format, source, binary, architecture, version, maintainer, uploaders, homepage, vcs_browser, vcs_arch, vcs_bzr, vcs_cvs, vcs_darcs, vcs_git, vcs_hg, vcs_mtn, vcs_snv, testsuite, dgit, standards_version, build_depends, build_depends_indep, build_depends_arch, build_conflicts, build_conflicts_indep, build_conflicts_arch, package_list].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



332
333
334
335
336
337
338
339
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 332

def list_invalid_properties
  invalid_properties = Array.new
  if @artifacts.nil?
    invalid_properties.push('invalid value for "artifacts", artifacts 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



477
478
479
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 477

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



483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 483

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



471
472
473
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 471

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



343
344
345
346
# File 'lib/pulp_deb_client/models/deb_source_package_response.rb', line 343

def valid?
  return false if @artifacts.nil?
  true
end