pulp_container_client 2.16.4 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -6
  3. data/docs/ContainerContainerDistribution.md +7 -7
  4. data/docs/ContainerContainerDistributionResponse.md +10 -8
  5. data/docs/ContainerContainerPullThroughDistribution.md +35 -0
  6. data/docs/ContainerContainerPullThroughDistributionResponse.md +41 -0
  7. data/docs/ContainerContainerPullThroughRemote.md +57 -0
  8. data/docs/ContainerContainerPullThroughRemoteResponse.md +55 -0
  9. data/docs/{ContainerContainerRemoteResponseHiddenFields.md → ContainerContainerPullThroughRemoteResponseHiddenFields.md} +2 -2
  10. data/docs/ContainerContainerPushRepository.md +5 -5
  11. data/docs/ContainerContainerPushRepositoryResponse.md +13 -13
  12. data/docs/ContainerContainerRemote.md +1 -1
  13. data/docs/ContainerContainerRemoteResponse.md +2 -2
  14. data/docs/ContentBlobsApi.md +2 -0
  15. data/docs/ContentManifestsApi.md +2 -0
  16. data/docs/ContentSignaturesApi.md +2 -0
  17. data/docs/ContentTagsApi.md +2 -0
  18. data/docs/DistributionsPullThroughApi.md +736 -0
  19. data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +23 -0
  20. data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +23 -0
  21. data/docs/PatchedcontainerContainerDistribution.md +7 -7
  22. data/docs/PatchedcontainerContainerPullThroughDistribution.md +35 -0
  23. data/docs/PatchedcontainerContainerPullThroughRemote.md +57 -0
  24. data/docs/PatchedcontainerContainerPushRepository.md +5 -5
  25. data/docs/PatchedcontainerContainerRemote.md +1 -1
  26. data/docs/{PolicyEnum.md → Policy762Enum.md} +2 -2
  27. data/docs/Policy8e2Enum.md +16 -0
  28. data/docs/RemotesPullThroughApi.md +734 -0
  29. data/lib/pulp_container_client/api/content_blobs_api.rb +3 -0
  30. data/lib/pulp_container_client/api/content_manifests_api.rb +3 -0
  31. data/lib/pulp_container_client/api/content_signatures_api.rb +3 -0
  32. data/lib/pulp_container_client/api/content_tags_api.rb +3 -0
  33. data/lib/pulp_container_client/api/distributions_pull_through_api.rb +907 -0
  34. data/lib/pulp_container_client/api/remotes_pull_through_api.rb +904 -0
  35. data/lib/pulp_container_client/models/container_container_distribution.rb +26 -26
  36. data/lib/pulp_container_client/models/container_container_distribution_response.rb +43 -33
  37. data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +373 -0
  38. data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +349 -0
  39. data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +668 -0
  40. data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +496 -0
  41. data/lib/pulp_container_client/models/{container_container_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields.rb} +3 -3
  42. data/lib/pulp_container_client/models/container_container_push_repository.rb +47 -47
  43. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +56 -56
  44. data/lib/pulp_container_client/models/container_container_remote.rb +1 -1
  45. data/lib/pulp_container_client/models/container_container_remote_response.rb +2 -2
  46. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +237 -0
  47. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +237 -0
  48. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +26 -26
  49. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +350 -0
  50. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +650 -0
  51. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +39 -39
  52. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +1 -1
  53. data/lib/pulp_container_client/models/{policy_enum.rb → policy762_enum.rb} +3 -3
  54. data/lib/pulp_container_client/models/policy8e2_enum.rb +35 -0
  55. data/lib/pulp_container_client/version.rb +1 -1
  56. data/lib/pulp_container_client.rb +13 -2
  57. data/spec/api/content_blobs_api_spec.rb +1 -0
  58. data/spec/api/content_manifests_api_spec.rb +1 -0
  59. data/spec/api/content_signatures_api_spec.rb +1 -0
  60. data/spec/api/content_tags_api_spec.rb +1 -0
  61. data/spec/api/distributions_pull_through_api_spec.rb +215 -0
  62. data/spec/api/remotes_pull_through_api_spec.rb +214 -0
  63. data/spec/models/container_container_distribution_response_spec.rb +12 -6
  64. data/spec/models/container_container_distribution_spec.rb +4 -4
  65. data/spec/models/container_container_pull_through_distribution_response_spec.rb +113 -0
  66. data/spec/models/container_container_pull_through_distribution_spec.rb +95 -0
  67. data/spec/models/{container_container_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_spec.rb} +6 -6
  68. data/spec/models/container_container_pull_through_remote_response_spec.rb +155 -0
  69. data/spec/models/container_container_pull_through_remote_spec.rb +161 -0
  70. data/spec/models/container_container_push_repository_response_spec.rb +7 -7
  71. data/spec/models/container_container_push_repository_spec.rb +4 -4
  72. data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +59 -0
  73. data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +59 -0
  74. data/spec/models/patchedcontainer_container_distribution_spec.rb +4 -4
  75. data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +95 -0
  76. data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +161 -0
  77. data/spec/models/patchedcontainer_container_push_repository_spec.rb +4 -4
  78. data/spec/models/{policy_enum_spec.rb → policy762_enum_spec.rb} +6 -6
  79. data/spec/models/policy8e2_enum_spec.rb +35 -0
  80. metadata +103 -59
@@ -0,0 +1,496 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpContainerClient
16
+ # A serializer for a remote used in the pull-through distribution.
17
+ class ContainerContainerPullThroughRemoteResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # A unique name for this remote.
24
+ attr_accessor :name
25
+
26
+ # The URL of an external content source.
27
+ attr_accessor :url
28
+
29
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
30
+ attr_accessor :ca_cert
31
+
32
+ # A PEM encoded client certificate used for authentication.
33
+ attr_accessor :client_cert
34
+
35
+ # If True, TLS peer validation must be performed.
36
+ attr_accessor :tls_validation
37
+
38
+ # The proxy URL. Format: scheme://host:port
39
+ attr_accessor :proxy_url
40
+
41
+ attr_accessor :pulp_labels
42
+
43
+ # Timestamp of the most recent update of the remote.
44
+ attr_accessor :pulp_last_updated
45
+
46
+ # Total number of simultaneous connections. If not set then the default value will be used.
47
+ attr_accessor :download_concurrency
48
+
49
+ # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
50
+ attr_accessor :max_retries
51
+
52
+ attr_accessor :policy
53
+
54
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
55
+ attr_accessor :total_timeout
56
+
57
+ # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
58
+ attr_accessor :connect_timeout
59
+
60
+ # aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
61
+ attr_accessor :sock_connect_timeout
62
+
63
+ # aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
64
+ attr_accessor :sock_read_timeout
65
+
66
+ # Headers for aiohttp.Clientsession
67
+ attr_accessor :headers
68
+
69
+ # Limits requests per second for each concurrent downloader
70
+ attr_accessor :rate_limit
71
+
72
+ # List of hidden (write only) fields
73
+ attr_accessor :hidden_fields
74
+
75
+ # Attribute mapping from ruby-style variable name to JSON key.
76
+ def self.attribute_map
77
+ {
78
+ :'pulp_href' => :'pulp_href',
79
+ :'pulp_created' => :'pulp_created',
80
+ :'name' => :'name',
81
+ :'url' => :'url',
82
+ :'ca_cert' => :'ca_cert',
83
+ :'client_cert' => :'client_cert',
84
+ :'tls_validation' => :'tls_validation',
85
+ :'proxy_url' => :'proxy_url',
86
+ :'pulp_labels' => :'pulp_labels',
87
+ :'pulp_last_updated' => :'pulp_last_updated',
88
+ :'download_concurrency' => :'download_concurrency',
89
+ :'max_retries' => :'max_retries',
90
+ :'policy' => :'policy',
91
+ :'total_timeout' => :'total_timeout',
92
+ :'connect_timeout' => :'connect_timeout',
93
+ :'sock_connect_timeout' => :'sock_connect_timeout',
94
+ :'sock_read_timeout' => :'sock_read_timeout',
95
+ :'headers' => :'headers',
96
+ :'rate_limit' => :'rate_limit',
97
+ :'hidden_fields' => :'hidden_fields'
98
+ }
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.openapi_types
103
+ {
104
+ :'pulp_href' => :'String',
105
+ :'pulp_created' => :'DateTime',
106
+ :'name' => :'String',
107
+ :'url' => :'String',
108
+ :'ca_cert' => :'String',
109
+ :'client_cert' => :'String',
110
+ :'tls_validation' => :'Boolean',
111
+ :'proxy_url' => :'String',
112
+ :'pulp_labels' => :'Hash<String, String>',
113
+ :'pulp_last_updated' => :'DateTime',
114
+ :'download_concurrency' => :'Integer',
115
+ :'max_retries' => :'Integer',
116
+ :'policy' => :'Policy8e2Enum',
117
+ :'total_timeout' => :'Float',
118
+ :'connect_timeout' => :'Float',
119
+ :'sock_connect_timeout' => :'Float',
120
+ :'sock_read_timeout' => :'Float',
121
+ :'headers' => :'Array<Object>',
122
+ :'rate_limit' => :'Integer',
123
+ :'hidden_fields' => :'Array<ContainerContainerPullThroughRemoteResponseHiddenFields>'
124
+ }
125
+ end
126
+
127
+ # List of attributes with nullable: true
128
+ def self.openapi_nullable
129
+ Set.new([
130
+ :'ca_cert',
131
+ :'client_cert',
132
+ :'proxy_url',
133
+ :'download_concurrency',
134
+ :'max_retries',
135
+ :'total_timeout',
136
+ :'connect_timeout',
137
+ :'sock_connect_timeout',
138
+ :'sock_read_timeout',
139
+ :'rate_limit',
140
+ ])
141
+ end
142
+
143
+ # Initializes the object
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ def initialize(attributes = {})
146
+ if (!attributes.is_a?(Hash))
147
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPullThroughRemoteResponse` initialize method"
148
+ end
149
+
150
+ # check to see if the attribute exists and convert string to symbol for hash key
151
+ attributes = attributes.each_with_object({}) { |(k, v), h|
152
+ if (!self.class.attribute_map.key?(k.to_sym))
153
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPullThroughRemoteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
154
+ end
155
+ h[k.to_sym] = v
156
+ }
157
+
158
+ if attributes.key?(:'pulp_href')
159
+ self.pulp_href = attributes[:'pulp_href']
160
+ end
161
+
162
+ if attributes.key?(:'pulp_created')
163
+ self.pulp_created = attributes[:'pulp_created']
164
+ end
165
+
166
+ if attributes.key?(:'name')
167
+ self.name = attributes[:'name']
168
+ end
169
+
170
+ if attributes.key?(:'url')
171
+ self.url = attributes[:'url']
172
+ end
173
+
174
+ if attributes.key?(:'ca_cert')
175
+ self.ca_cert = attributes[:'ca_cert']
176
+ end
177
+
178
+ if attributes.key?(:'client_cert')
179
+ self.client_cert = attributes[:'client_cert']
180
+ end
181
+
182
+ if attributes.key?(:'tls_validation')
183
+ self.tls_validation = attributes[:'tls_validation']
184
+ end
185
+
186
+ if attributes.key?(:'proxy_url')
187
+ self.proxy_url = attributes[:'proxy_url']
188
+ end
189
+
190
+ if attributes.key?(:'pulp_labels')
191
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
192
+ self.pulp_labels = value
193
+ end
194
+ end
195
+
196
+ if attributes.key?(:'pulp_last_updated')
197
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
198
+ end
199
+
200
+ if attributes.key?(:'download_concurrency')
201
+ self.download_concurrency = attributes[:'download_concurrency']
202
+ end
203
+
204
+ if attributes.key?(:'max_retries')
205
+ self.max_retries = attributes[:'max_retries']
206
+ end
207
+
208
+ if attributes.key?(:'policy')
209
+ self.policy = attributes[:'policy']
210
+ end
211
+
212
+ if attributes.key?(:'total_timeout')
213
+ self.total_timeout = attributes[:'total_timeout']
214
+ end
215
+
216
+ if attributes.key?(:'connect_timeout')
217
+ self.connect_timeout = attributes[:'connect_timeout']
218
+ end
219
+
220
+ if attributes.key?(:'sock_connect_timeout')
221
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
222
+ end
223
+
224
+ if attributes.key?(:'sock_read_timeout')
225
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
226
+ end
227
+
228
+ if attributes.key?(:'headers')
229
+ if (value = attributes[:'headers']).is_a?(Array)
230
+ self.headers = value
231
+ end
232
+ end
233
+
234
+ if attributes.key?(:'rate_limit')
235
+ self.rate_limit = attributes[:'rate_limit']
236
+ end
237
+
238
+ if attributes.key?(:'hidden_fields')
239
+ if (value = attributes[:'hidden_fields']).is_a?(Array)
240
+ self.hidden_fields = value
241
+ end
242
+ end
243
+ end
244
+
245
+ # Show invalid properties with the reasons. Usually used together with valid?
246
+ # @return Array for valid properties with the reasons
247
+ def list_invalid_properties
248
+ invalid_properties = Array.new
249
+ if @name.nil?
250
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
251
+ end
252
+
253
+ if @url.nil?
254
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
255
+ end
256
+
257
+ if !@download_concurrency.nil? && @download_concurrency < 1
258
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
259
+ end
260
+
261
+ if !@total_timeout.nil? && @total_timeout < 0.0
262
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
263
+ end
264
+
265
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
266
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
267
+ end
268
+
269
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
270
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
271
+ end
272
+
273
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
274
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
275
+ end
276
+
277
+ invalid_properties
278
+ end
279
+
280
+ # Check to see if the all the properties in the model are valid
281
+ # @return true if the model is valid
282
+ def valid?
283
+ return false if @name.nil?
284
+ return false if @url.nil?
285
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
286
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
287
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
288
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
289
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
290
+ true
291
+ end
292
+
293
+ # Custom attribute writer method with validation
294
+ # @param [Object] download_concurrency Value to be assigned
295
+ def download_concurrency=(download_concurrency)
296
+ if !download_concurrency.nil? && download_concurrency < 1
297
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
298
+ end
299
+
300
+ @download_concurrency = download_concurrency
301
+ end
302
+
303
+ # Custom attribute writer method with validation
304
+ # @param [Object] total_timeout Value to be assigned
305
+ def total_timeout=(total_timeout)
306
+ if !total_timeout.nil? && total_timeout < 0.0
307
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
308
+ end
309
+
310
+ @total_timeout = total_timeout
311
+ end
312
+
313
+ # Custom attribute writer method with validation
314
+ # @param [Object] connect_timeout Value to be assigned
315
+ def connect_timeout=(connect_timeout)
316
+ if !connect_timeout.nil? && connect_timeout < 0.0
317
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
318
+ end
319
+
320
+ @connect_timeout = connect_timeout
321
+ end
322
+
323
+ # Custom attribute writer method with validation
324
+ # @param [Object] sock_connect_timeout Value to be assigned
325
+ def sock_connect_timeout=(sock_connect_timeout)
326
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
327
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
328
+ end
329
+
330
+ @sock_connect_timeout = sock_connect_timeout
331
+ end
332
+
333
+ # Custom attribute writer method with validation
334
+ # @param [Object] sock_read_timeout Value to be assigned
335
+ def sock_read_timeout=(sock_read_timeout)
336
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
337
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
338
+ end
339
+
340
+ @sock_read_timeout = sock_read_timeout
341
+ end
342
+
343
+ # Checks equality by comparing each attribute.
344
+ # @param [Object] Object to be compared
345
+ def ==(o)
346
+ return true if self.equal?(o)
347
+ self.class == o.class &&
348
+ pulp_href == o.pulp_href &&
349
+ pulp_created == o.pulp_created &&
350
+ name == o.name &&
351
+ url == o.url &&
352
+ ca_cert == o.ca_cert &&
353
+ client_cert == o.client_cert &&
354
+ tls_validation == o.tls_validation &&
355
+ proxy_url == o.proxy_url &&
356
+ pulp_labels == o.pulp_labels &&
357
+ pulp_last_updated == o.pulp_last_updated &&
358
+ download_concurrency == o.download_concurrency &&
359
+ max_retries == o.max_retries &&
360
+ policy == o.policy &&
361
+ total_timeout == o.total_timeout &&
362
+ connect_timeout == o.connect_timeout &&
363
+ sock_connect_timeout == o.sock_connect_timeout &&
364
+ sock_read_timeout == o.sock_read_timeout &&
365
+ headers == o.headers &&
366
+ rate_limit == o.rate_limit &&
367
+ hidden_fields == o.hidden_fields
368
+ end
369
+
370
+ # @see the `==` method
371
+ # @param [Object] Object to be compared
372
+ def eql?(o)
373
+ self == o
374
+ end
375
+
376
+ # Calculates hash code according to all attributes.
377
+ # @return [Integer] Hash code
378
+ def hash
379
+ [pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, hidden_fields].hash
380
+ end
381
+
382
+ # Builds the object from hash
383
+ # @param [Hash] attributes Model attributes in the form of hash
384
+ # @return [Object] Returns the model itself
385
+ def self.build_from_hash(attributes)
386
+ new.build_from_hash(attributes)
387
+ end
388
+
389
+ # Builds the object from hash
390
+ # @param [Hash] attributes Model attributes in the form of hash
391
+ # @return [Object] Returns the model itself
392
+ def build_from_hash(attributes)
393
+ return nil unless attributes.is_a?(Hash)
394
+ self.class.openapi_types.each_pair do |key, type|
395
+ if type =~ /\AArray<(.*)>/i
396
+ # check to ensure the input is an array given that the attribute
397
+ # is documented as an array but the input is not
398
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
399
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
400
+ end
401
+ elsif !attributes[self.class.attribute_map[key]].nil?
402
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
403
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
404
+ end
405
+
406
+ self
407
+ end
408
+
409
+ # Deserializes the data based on type
410
+ # @param string type Data type
411
+ # @param string value Value to be deserialized
412
+ # @return [Object] Deserialized data
413
+ def _deserialize(type, value)
414
+ case type.to_sym
415
+ when :DateTime
416
+ DateTime.parse(value)
417
+ when :Date
418
+ Date.parse(value)
419
+ when :String
420
+ value.to_s
421
+ when :Integer
422
+ value.to_i
423
+ when :Float
424
+ value.to_f
425
+ when :Boolean
426
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
427
+ true
428
+ else
429
+ false
430
+ end
431
+ when :Object
432
+ # generic object (usually a Hash), return directly
433
+ value
434
+ when /\AArray<(?<inner_type>.+)>\z/
435
+ inner_type = Regexp.last_match[:inner_type]
436
+ value.map { |v| _deserialize(inner_type, v) }
437
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
438
+ k_type = Regexp.last_match[:k_type]
439
+ v_type = Regexp.last_match[:v_type]
440
+ {}.tap do |hash|
441
+ value.each do |k, v|
442
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
443
+ end
444
+ end
445
+ else # model
446
+ PulpContainerClient.const_get(type).build_from_hash(value)
447
+ end
448
+ end
449
+
450
+ # Returns the string representation of the object
451
+ # @return [String] String presentation of the object
452
+ def to_s
453
+ to_hash.to_s
454
+ end
455
+
456
+ # to_body is an alias to to_hash (backward compatibility)
457
+ # @return [Hash] Returns the object in the form of hash
458
+ def to_body
459
+ to_hash
460
+ end
461
+
462
+ # Returns the object in the form of hash
463
+ # @return [Hash] Returns the object in the form of hash
464
+ def to_hash
465
+ hash = {}
466
+ self.class.attribute_map.each_pair do |attr, param|
467
+ value = self.send(attr)
468
+ if value.nil?
469
+ is_nullable = self.class.openapi_nullable.include?(attr)
470
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
471
+ end
472
+
473
+ hash[param] = _to_hash(value)
474
+ end
475
+ hash
476
+ end
477
+
478
+ # Outputs non-array value in the form of hash
479
+ # For object, use to_hash. Otherwise, just return the value
480
+ # @param [Object] value Any valid value
481
+ # @return [Hash] Returns the value in the form of hash
482
+ def _to_hash(value)
483
+ if value.is_a?(Array)
484
+ value.compact.map { |v| _to_hash(v) }
485
+ elsif value.is_a?(Hash)
486
+ {}.tap do |hash|
487
+ value.each { |k, v| hash[k] = _to_hash(v) }
488
+ end
489
+ elsif value.respond_to? :to_hash
490
+ value.to_hash
491
+ else
492
+ value
493
+ end
494
+ end
495
+ end
496
+ end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module PulpContainerClient
16
- class ContainerContainerRemoteResponseHiddenFields
16
+ class ContainerContainerPullThroughRemoteResponseHiddenFields
17
17
  attr_accessor :name
18
18
 
19
19
  attr_accessor :is_set
@@ -44,13 +44,13 @@ module PulpContainerClient
44
44
  # @param [Hash] attributes Model attributes in the form of hash
45
45
  def initialize(attributes = {})
46
46
  if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerRemoteResponseHiddenFields` initialize method"
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPullThroughRemoteResponseHiddenFields` initialize method"
48
48
  end
49
49
 
50
50
  # check to see if the attribute exists and convert string to symbol for hash key
51
51
  attributes = attributes.each_with_object({}) { |(k, v), h|
52
52
  if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerRemoteResponseHiddenFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPullThroughRemoteResponseHiddenFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
54
  end
55
55
  h[k.to_sym] = v
56
56
  }