pulp_container_client 2.0.0b3 → 2.0.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 (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +69 -57
  3. data/docs/{ContainerBlob.md → ContainerBlobResponse.md} +2 -2
  4. data/docs/ContainerContainerDistribution.md +6 -12
  5. data/docs/ContainerContainerDistributionResponse.md +31 -0
  6. data/docs/ContainerContainerPushRepository.md +4 -10
  7. data/docs/ContainerContainerPushRepositoryResponse.md +29 -0
  8. data/docs/ContainerContainerRemote.md +8 -12
  9. data/docs/ContainerContainerRemoteResponse.md +49 -0
  10. data/docs/ContainerContainerRepository.md +4 -10
  11. data/docs/ContainerContainerRepositoryResponse.md +29 -0
  12. data/docs/ContainerContentRedirectContentGuard.md +1 -5
  13. data/docs/ContainerContentRedirectContentGuardResponse.md +23 -0
  14. data/docs/{ContainerManifest.md → ContainerManifestResponse.md} +2 -2
  15. data/docs/{ContainerTag.md → ContainerTagResponse.md} +2 -4
  16. data/docs/ContentBlobsApi.md +24 -24
  17. data/docs/ContentManifestsApi.md +24 -24
  18. data/docs/ContentSummary.md +3 -3
  19. data/docs/ContentSummaryResponse.md +21 -0
  20. data/docs/ContentTagsApi.md +26 -26
  21. data/docs/ContentguardsContentRedirectApi.md +55 -55
  22. data/docs/DistributionsContainerApi.md +108 -60
  23. data/docs/InlineResponse200.md +3 -3
  24. data/docs/InlineResponse2001.md +3 -3
  25. data/docs/InlineResponse2002.md +3 -3
  26. data/docs/InlineResponse2003.md +3 -3
  27. data/docs/InlineResponse2004.md +3 -3
  28. data/docs/InlineResponse2005.md +3 -3
  29. data/docs/InlineResponse2006.md +3 -3
  30. data/docs/InlineResponse2007.md +3 -3
  31. data/docs/InlineResponse2008.md +3 -3
  32. data/docs/ManifestCopy.md +1 -1
  33. data/docs/OCIBuildImage.md +23 -0
  34. data/docs/PatchedcontainerContainerDistribution.md +25 -0
  35. data/docs/PatchedcontainerContainerRemote.md +43 -0
  36. data/docs/PatchedcontainerContainerRepository.md +21 -0
  37. data/docs/PatchedcontainerContentRedirectContentGuard.md +19 -0
  38. data/docs/PolicyEnum.md +16 -0
  39. data/docs/RecursiveManage.md +1 -1
  40. data/docs/RemotesContainerApi.md +125 -65
  41. data/docs/RepositoriesContainerApi.md +158 -134
  42. data/docs/RepositoriesContainerPushApi.md +44 -148
  43. data/docs/RepositoriesContainerVersionsApi.md +190 -126
  44. data/docs/RepositorySyncURL.md +1 -1
  45. data/docs/RepositoryVersion.md +1 -9
  46. data/docs/RepositoryVersionResponse.md +25 -0
  47. data/docs/TagCopy.md +1 -1
  48. data/docs/TokenApi.md +8 -16
  49. data/lib/pulp_container_client/api/content_blobs_api.rb +38 -34
  50. data/lib/pulp_container_client/api/content_manifests_api.rb +38 -34
  51. data/lib/pulp_container_client/api/content_tags_api.rb +41 -37
  52. data/lib/pulp_container_client/api/contentguards_content_redirect_api.rb +90 -90
  53. data/lib/pulp_container_client/api/distributions_container_api.rb +153 -90
  54. data/lib/pulp_container_client/api/remotes_container_api.rb +181 -100
  55. data/lib/pulp_container_client/api/repositories_container_api.rb +245 -222
  56. data/lib/pulp_container_client/api/repositories_container_push_api.rb +66 -197
  57. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +278 -188
  58. data/lib/pulp_container_client/api/token_api.rb +8 -14
  59. data/lib/pulp_container_client/api_client.rb +2 -2
  60. data/lib/pulp_container_client/api_error.rb +2 -2
  61. data/lib/pulp_container_client/configuration.rb +3 -3
  62. data/lib/pulp_container_client/models/async_operation_response.rb +3 -2
  63. data/lib/pulp_container_client/models/{container_blob.rb → container_blob_response.rb} +6 -43
  64. data/lib/pulp_container_client/models/container_container_distribution.rb +29 -110
  65. data/lib/pulp_container_client/models/container_container_distribution_response.rb +289 -0
  66. data/lib/pulp_container_client/models/container_container_push_repository.rb +18 -78
  67. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +271 -0
  68. data/lib/pulp_container_client/models/container_container_remote.rb +29 -227
  69. data/lib/pulp_container_client/models/container_container_remote_response.rb +409 -0
  70. data/lib/pulp_container_client/models/container_container_repository.rb +18 -78
  71. data/lib/pulp_container_client/models/container_container_repository_response.rb +271 -0
  72. data/lib/pulp_container_client/models/container_content_redirect_content_guard.rb +4 -56
  73. data/lib/pulp_container_client/models/container_content_redirect_content_guard_response.rb +243 -0
  74. data/lib/pulp_container_client/models/{container_manifest.rb → container_manifest_response.rb} +6 -43
  75. data/lib/pulp_container_client/models/{container_tag.rb → container_tag_response.rb} +7 -40
  76. data/lib/pulp_container_client/models/content_summary.rb +9 -15
  77. data/lib/pulp_container_client/models/content_summary_response.rb +240 -0
  78. data/lib/pulp_container_client/models/inline_response200.rb +3 -13
  79. data/lib/pulp_container_client/models/inline_response2001.rb +3 -13
  80. data/lib/pulp_container_client/models/inline_response2002.rb +3 -13
  81. data/lib/pulp_container_client/models/inline_response2003.rb +3 -13
  82. data/lib/pulp_container_client/models/inline_response2004.rb +3 -13
  83. data/lib/pulp_container_client/models/inline_response2005.rb +3 -13
  84. data/lib/pulp_container_client/models/inline_response2006.rb +3 -13
  85. data/lib/pulp_container_client/models/inline_response2007.rb +3 -13
  86. data/lib/pulp_container_client/models/inline_response2008.rb +3 -13
  87. data/lib/pulp_container_client/models/manifest_copy.rb +4 -3
  88. data/lib/pulp_container_client/models/oci_build_image.rb +240 -0
  89. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +250 -0
  90. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +365 -0
  91. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +229 -0
  92. data/lib/pulp_container_client/models/patchedcontainer_content_redirect_content_guard.rb +219 -0
  93. data/lib/pulp_container_client/models/policy_enum.rb +37 -0
  94. data/lib/pulp_container_client/models/recursive_manage.rb +4 -3
  95. data/lib/pulp_container_client/models/repository_sync_url.rb +3 -8
  96. data/lib/pulp_container_client/models/repository_version.rb +7 -43
  97. data/lib/pulp_container_client/models/repository_version_response.rb +246 -0
  98. data/lib/pulp_container_client/models/tag_copy.rb +4 -3
  99. data/lib/pulp_container_client/models/tag_image.rb +3 -40
  100. data/lib/pulp_container_client/models/un_tag_image.rb +3 -21
  101. data/lib/pulp_container_client/version.rb +3 -3
  102. data/lib/pulp_container_client.rb +18 -5
  103. data/pulp_container_client.gemspec +4 -4
  104. data/spec/api/content_blobs_api_spec.rb +11 -11
  105. data/spec/api/content_manifests_api_spec.rb +11 -11
  106. data/spec/api/content_tags_api_spec.rb +12 -12
  107. data/spec/api/contentguards_content_redirect_api_spec.rb +17 -17
  108. data/spec/api/distributions_container_api_spec.rb +39 -18
  109. data/spec/api/remotes_container_api_spec.rb +48 -21
  110. data/spec/api/repositories_container_api_spec.rb +41 -32
  111. data/spec/api/repositories_container_push_api_spec.rb +17 -40
  112. data/spec/api/repositories_container_versions_api_spec.rb +76 -46
  113. data/spec/api/token_api_spec.rb +4 -6
  114. data/spec/api_client_spec.rb +2 -2
  115. data/spec/configuration_spec.rb +2 -2
  116. data/spec/models/async_operation_response_spec.rb +2 -2
  117. data/spec/models/{container_blob_spec.rb → container_blob_response_spec.rb} +8 -8
  118. data/spec/models/container_container_distribution_response_spec.rb +83 -0
  119. data/spec/models/container_container_distribution_spec.rb +5 -23
  120. data/spec/models/container_container_push_repository_response_spec.rb +77 -0
  121. data/spec/models/container_container_push_repository_spec.rb +5 -23
  122. data/spec/models/container_container_remote_response_spec.rb +137 -0
  123. data/spec/models/container_container_remote_spec.rb +7 -23
  124. data/spec/models/container_container_repository_response_spec.rb +77 -0
  125. data/spec/models/container_container_repository_spec.rb +5 -23
  126. data/spec/models/container_content_redirect_content_guard_response_spec.rb +59 -0
  127. data/spec/models/container_content_redirect_content_guard_spec.rb +2 -14
  128. data/spec/models/{container_manifest_spec.rb → container_manifest_response_spec.rb} +8 -8
  129. data/spec/models/{container_tag_spec.rb → container_tag_response_spec.rb} +8 -14
  130. data/spec/models/content_summary_response_spec.rb +53 -0
  131. data/spec/models/content_summary_spec.rb +2 -2
  132. data/spec/models/inline_response2001_spec.rb +2 -2
  133. data/spec/models/inline_response2002_spec.rb +2 -2
  134. data/spec/models/inline_response2003_spec.rb +2 -2
  135. data/spec/models/inline_response2004_spec.rb +2 -2
  136. data/spec/models/inline_response2005_spec.rb +2 -2
  137. data/spec/models/inline_response2006_spec.rb +2 -2
  138. data/spec/models/inline_response2007_spec.rb +2 -2
  139. data/spec/models/inline_response2008_spec.rb +2 -2
  140. data/spec/models/inline_response200_spec.rb +2 -2
  141. data/spec/models/manifest_copy_spec.rb +2 -2
  142. data/spec/models/oci_build_image_spec.rb +59 -0
  143. data/spec/models/patchedcontainer_container_distribution_spec.rb +65 -0
  144. data/spec/models/patchedcontainer_container_remote_spec.rb +119 -0
  145. data/spec/models/patchedcontainer_container_repository_spec.rb +53 -0
  146. data/spec/models/patchedcontainer_content_redirect_content_guard_spec.rb +47 -0
  147. data/spec/models/policy_enum_spec.rb +35 -0
  148. data/spec/models/recursive_manage_spec.rb +2 -2
  149. data/spec/models/repository_sync_url_spec.rb +2 -2
  150. data/spec/models/repository_version_response_spec.rb +65 -0
  151. data/spec/models/repository_version_spec.rb +2 -26
  152. data/spec/models/tag_copy_spec.rb +2 -2
  153. data/spec/models/tag_image_spec.rb +2 -2
  154. data/spec/models/un_tag_image_spec.rb +2 -2
  155. data/spec/spec_helper.rb +2 -2
  156. metadata +93 -41
@@ -0,0 +1,409 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpContainerClient
16
+ # A Serializer for ContainerRemote.
17
+ class ContainerContainerRemoteResponse
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
+ # A PEM encoded private key used for authentication.
36
+ attr_accessor :client_key
37
+
38
+ # If True, TLS peer validation must be performed.
39
+ attr_accessor :tls_validation
40
+
41
+ # The proxy URL. Format: scheme://user:password@host:port
42
+ attr_accessor :proxy_url
43
+
44
+ # The username to be used for authentication when syncing.
45
+ attr_accessor :username
46
+
47
+ # The password to be used for authentication when syncing.
48
+ attr_accessor :password
49
+
50
+ # Timestamp of the most recent update of the remote.
51
+ attr_accessor :pulp_last_updated
52
+
53
+ # Total number of simultaneous connections.
54
+ attr_accessor :download_concurrency
55
+
56
+ # immediate - All manifests and blobs are downloaded and saved during a sync. on_demand - Only tags and manifests are downloaded. Blobs are not downloaded until they are requested for the first time by a client. streamed - Blobs are streamed to the client with every request and never saved.
57
+ attr_accessor :policy
58
+
59
+ # Name of the upstream repository
60
+ attr_accessor :upstream_name
61
+
62
+ # A list of tags to include during sync. Wildcards *, ? are recognized. 'include_tags' is evaluated before 'exclude_tags'.
63
+ attr_accessor :include_tags
64
+
65
+ # A list of tags to exclude during sync. Wildcards *, ? are recognized. 'exclude_tags' is evaluated after 'include_tags'.
66
+ attr_accessor :exclude_tags
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'pulp_href' => :'pulp_href',
72
+ :'pulp_created' => :'pulp_created',
73
+ :'name' => :'name',
74
+ :'url' => :'url',
75
+ :'ca_cert' => :'ca_cert',
76
+ :'client_cert' => :'client_cert',
77
+ :'client_key' => :'client_key',
78
+ :'tls_validation' => :'tls_validation',
79
+ :'proxy_url' => :'proxy_url',
80
+ :'username' => :'username',
81
+ :'password' => :'password',
82
+ :'pulp_last_updated' => :'pulp_last_updated',
83
+ :'download_concurrency' => :'download_concurrency',
84
+ :'policy' => :'policy',
85
+ :'upstream_name' => :'upstream_name',
86
+ :'include_tags' => :'include_tags',
87
+ :'exclude_tags' => :'exclude_tags'
88
+ }
89
+ end
90
+
91
+ # Attribute type mapping.
92
+ def self.openapi_types
93
+ {
94
+ :'pulp_href' => :'String',
95
+ :'pulp_created' => :'DateTime',
96
+ :'name' => :'String',
97
+ :'url' => :'String',
98
+ :'ca_cert' => :'String',
99
+ :'client_cert' => :'String',
100
+ :'client_key' => :'String',
101
+ :'tls_validation' => :'Boolean',
102
+ :'proxy_url' => :'String',
103
+ :'username' => :'String',
104
+ :'password' => :'String',
105
+ :'pulp_last_updated' => :'DateTime',
106
+ :'download_concurrency' => :'Integer',
107
+ :'policy' => :'PolicyEnum',
108
+ :'upstream_name' => :'String',
109
+ :'include_tags' => :'Array<String>',
110
+ :'exclude_tags' => :'Array<String>'
111
+ }
112
+ end
113
+
114
+ # List of attributes with nullable: true
115
+ def self.openapi_nullable
116
+ Set.new([
117
+ :'ca_cert',
118
+ :'client_cert',
119
+ :'client_key',
120
+ :'proxy_url',
121
+ :'username',
122
+ :'password',
123
+ :'include_tags',
124
+ :'exclude_tags'
125
+ ])
126
+ end
127
+
128
+ # Initializes the object
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ def initialize(attributes = {})
131
+ if (!attributes.is_a?(Hash))
132
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerRemoteResponse` initialize method"
133
+ end
134
+
135
+ # check to see if the attribute exists and convert string to symbol for hash key
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!self.class.attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerRemoteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'pulp_href')
144
+ self.pulp_href = attributes[:'pulp_href']
145
+ end
146
+
147
+ if attributes.key?(:'pulp_created')
148
+ self.pulp_created = attributes[:'pulp_created']
149
+ end
150
+
151
+ if attributes.key?(:'name')
152
+ self.name = attributes[:'name']
153
+ end
154
+
155
+ if attributes.key?(:'url')
156
+ self.url = attributes[:'url']
157
+ end
158
+
159
+ if attributes.key?(:'ca_cert')
160
+ self.ca_cert = attributes[:'ca_cert']
161
+ end
162
+
163
+ if attributes.key?(:'client_cert')
164
+ self.client_cert = attributes[:'client_cert']
165
+ end
166
+
167
+ if attributes.key?(:'client_key')
168
+ self.client_key = attributes[:'client_key']
169
+ end
170
+
171
+ if attributes.key?(:'tls_validation')
172
+ self.tls_validation = attributes[:'tls_validation']
173
+ end
174
+
175
+ if attributes.key?(:'proxy_url')
176
+ self.proxy_url = attributes[:'proxy_url']
177
+ end
178
+
179
+ if attributes.key?(:'username')
180
+ self.username = attributes[:'username']
181
+ end
182
+
183
+ if attributes.key?(:'password')
184
+ self.password = attributes[:'password']
185
+ end
186
+
187
+ if attributes.key?(:'pulp_last_updated')
188
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
189
+ end
190
+
191
+ if attributes.key?(:'download_concurrency')
192
+ self.download_concurrency = attributes[:'download_concurrency']
193
+ end
194
+
195
+ if attributes.key?(:'policy')
196
+ self.policy = attributes[:'policy']
197
+ end
198
+
199
+ if attributes.key?(:'upstream_name')
200
+ self.upstream_name = attributes[:'upstream_name']
201
+ end
202
+
203
+ if attributes.key?(:'include_tags')
204
+ if (value = attributes[:'include_tags']).is_a?(Array)
205
+ self.include_tags = value
206
+ end
207
+ end
208
+
209
+ if attributes.key?(:'exclude_tags')
210
+ if (value = attributes[:'exclude_tags']).is_a?(Array)
211
+ self.exclude_tags = value
212
+ end
213
+ end
214
+ end
215
+
216
+ # Show invalid properties with the reasons. Usually used together with valid?
217
+ # @return Array for valid properties with the reasons
218
+ def list_invalid_properties
219
+ invalid_properties = Array.new
220
+ if @name.nil?
221
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
222
+ end
223
+
224
+ if @url.nil?
225
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
226
+ end
227
+
228
+ if !@download_concurrency.nil? && @download_concurrency < 1
229
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
230
+ end
231
+
232
+ if @upstream_name.nil?
233
+ invalid_properties.push('invalid value for "upstream_name", upstream_name cannot be nil.')
234
+ end
235
+
236
+ invalid_properties
237
+ end
238
+
239
+ # Check to see if the all the properties in the model are valid
240
+ # @return true if the model is valid
241
+ def valid?
242
+ return false if @name.nil?
243
+ return false if @url.nil?
244
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
245
+ return false if @upstream_name.nil?
246
+ true
247
+ end
248
+
249
+ # Custom attribute writer method with validation
250
+ # @param [Object] download_concurrency Value to be assigned
251
+ def download_concurrency=(download_concurrency)
252
+ if !download_concurrency.nil? && download_concurrency < 1
253
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
254
+ end
255
+
256
+ @download_concurrency = download_concurrency
257
+ end
258
+
259
+ # Checks equality by comparing each attribute.
260
+ # @param [Object] Object to be compared
261
+ def ==(o)
262
+ return true if self.equal?(o)
263
+ self.class == o.class &&
264
+ pulp_href == o.pulp_href &&
265
+ pulp_created == o.pulp_created &&
266
+ name == o.name &&
267
+ url == o.url &&
268
+ ca_cert == o.ca_cert &&
269
+ client_cert == o.client_cert &&
270
+ client_key == o.client_key &&
271
+ tls_validation == o.tls_validation &&
272
+ proxy_url == o.proxy_url &&
273
+ username == o.username &&
274
+ password == o.password &&
275
+ pulp_last_updated == o.pulp_last_updated &&
276
+ download_concurrency == o.download_concurrency &&
277
+ policy == o.policy &&
278
+ upstream_name == o.upstream_name &&
279
+ include_tags == o.include_tags &&
280
+ exclude_tags == o.exclude_tags
281
+ end
282
+
283
+ # @see the `==` method
284
+ # @param [Object] Object to be compared
285
+ def eql?(o)
286
+ self == o
287
+ end
288
+
289
+ # Calculates hash code according to all attributes.
290
+ # @return [Integer] Hash code
291
+ def hash
292
+ [pulp_href, pulp_created, name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, pulp_last_updated, download_concurrency, policy, upstream_name, include_tags, exclude_tags].hash
293
+ end
294
+
295
+ # Builds the object from hash
296
+ # @param [Hash] attributes Model attributes in the form of hash
297
+ # @return [Object] Returns the model itself
298
+ def self.build_from_hash(attributes)
299
+ new.build_from_hash(attributes)
300
+ end
301
+
302
+ # Builds the object from hash
303
+ # @param [Hash] attributes Model attributes in the form of hash
304
+ # @return [Object] Returns the model itself
305
+ def build_from_hash(attributes)
306
+ return nil unless attributes.is_a?(Hash)
307
+ self.class.openapi_types.each_pair do |key, type|
308
+ if type =~ /\AArray<(.*)>/i
309
+ # check to ensure the input is an array given that the attribute
310
+ # is documented as an array but the input is not
311
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
312
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
313
+ end
314
+ elsif !attributes[self.class.attribute_map[key]].nil?
315
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
316
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
317
+ end
318
+
319
+ self
320
+ end
321
+
322
+ # Deserializes the data based on type
323
+ # @param string type Data type
324
+ # @param string value Value to be deserialized
325
+ # @return [Object] Deserialized data
326
+ def _deserialize(type, value)
327
+ case type.to_sym
328
+ when :DateTime
329
+ DateTime.parse(value)
330
+ when :Date
331
+ Date.parse(value)
332
+ when :String
333
+ value.to_s
334
+ when :Integer
335
+ value.to_i
336
+ when :Float
337
+ value.to_f
338
+ when :Boolean
339
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
340
+ true
341
+ else
342
+ false
343
+ end
344
+ when :Object
345
+ # generic object (usually a Hash), return directly
346
+ value
347
+ when /\AArray<(?<inner_type>.+)>\z/
348
+ inner_type = Regexp.last_match[:inner_type]
349
+ value.map { |v| _deserialize(inner_type, v) }
350
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
351
+ k_type = Regexp.last_match[:k_type]
352
+ v_type = Regexp.last_match[:v_type]
353
+ {}.tap do |hash|
354
+ value.each do |k, v|
355
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
356
+ end
357
+ end
358
+ else # model
359
+ PulpContainerClient.const_get(type).build_from_hash(value)
360
+ end
361
+ end
362
+
363
+ # Returns the string representation of the object
364
+ # @return [String] String presentation of the object
365
+ def to_s
366
+ to_hash.to_s
367
+ end
368
+
369
+ # to_body is an alias to to_hash (backward compatibility)
370
+ # @return [Hash] Returns the object in the form of hash
371
+ def to_body
372
+ to_hash
373
+ end
374
+
375
+ # Returns the object in the form of hash
376
+ # @return [Hash] Returns the object in the form of hash
377
+ def to_hash
378
+ hash = {}
379
+ self.class.attribute_map.each_pair do |attr, param|
380
+ value = self.send(attr)
381
+ if value.nil?
382
+ is_nullable = self.class.openapi_nullable.include?(attr)
383
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
384
+ end
385
+
386
+ hash[param] = _to_hash(value)
387
+ end
388
+ hash
389
+ end
390
+
391
+ # Outputs non-array value in the form of hash
392
+ # For object, use to_hash. Otherwise, just return the value
393
+ # @param [Object] value Any valid value
394
+ # @return [Hash] Returns the value in the form of hash
395
+ def _to_hash(value)
396
+ if value.is_a?(Array)
397
+ value.compact.map { |v| _to_hash(v) }
398
+ elsif value.is_a?(Hash)
399
+ {}.tap do |hash|
400
+ value.each { |k, v| hash[k] = _to_hash(v) }
401
+ end
402
+ elsif value.respond_to? :to_hash
403
+ value.to_hash
404
+ else
405
+ value
406
+ end
407
+ end
408
+ end
409
+ end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,50 +13,39 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpContainerClient
16
+ # Serializer for Container Repositories.
16
17
  class ContainerContainerRepository
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
- attr_accessor :versions_href
23
-
24
- attr_accessor :latest_version_href
25
-
26
18
  # A unique name for this repository.
27
19
  attr_accessor :name
28
20
 
29
21
  # An optional description.
30
22
  attr_accessor :description
31
23
 
24
+ attr_accessor :remote
25
+
32
26
  # Attribute mapping from ruby-style variable name to JSON key.
33
27
  def self.attribute_map
34
28
  {
35
- :'pulp_href' => :'pulp_href',
36
- :'pulp_created' => :'pulp_created',
37
- :'versions_href' => :'versions_href',
38
- :'latest_version_href' => :'latest_version_href',
39
29
  :'name' => :'name',
40
- :'description' => :'description'
30
+ :'description' => :'description',
31
+ :'remote' => :'remote'
41
32
  }
42
33
  end
43
34
 
44
35
  # Attribute type mapping.
45
36
  def self.openapi_types
46
37
  {
47
- :'pulp_href' => :'String',
48
- :'pulp_created' => :'DateTime',
49
- :'versions_href' => :'String',
50
- :'latest_version_href' => :'String',
51
38
  :'name' => :'String',
52
- :'description' => :'String'
39
+ :'description' => :'String',
40
+ :'remote' => :'String'
53
41
  }
54
42
  end
55
43
 
56
44
  # List of attributes with nullable: true
57
45
  def self.openapi_nullable
58
46
  Set.new([
59
- :'description'
47
+ :'description',
48
+ :'remote'
60
49
  ])
61
50
  end
62
51
 
@@ -75,22 +64,6 @@ module PulpContainerClient
75
64
  h[k.to_sym] = v
76
65
  }
77
66
 
78
- if attributes.key?(:'pulp_href')
79
- self.pulp_href = attributes[:'pulp_href']
80
- end
81
-
82
- if attributes.key?(:'pulp_created')
83
- self.pulp_created = attributes[:'pulp_created']
84
- end
85
-
86
- if attributes.key?(:'versions_href')
87
- self.versions_href = attributes[:'versions_href']
88
- end
89
-
90
- if attributes.key?(:'latest_version_href')
91
- self.latest_version_href = attributes[:'latest_version_href']
92
- end
93
-
94
67
  if attributes.key?(:'name')
95
68
  self.name = attributes[:'name']
96
69
  end
@@ -98,6 +71,10 @@ module PulpContainerClient
98
71
  if attributes.key?(:'description')
99
72
  self.description = attributes[:'description']
100
73
  end
74
+
75
+ if attributes.key?(:'remote')
76
+ self.remote = attributes[:'remote']
77
+ end
101
78
  end
102
79
 
103
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,14 +85,6 @@ module PulpContainerClient
108
85
  invalid_properties.push('invalid value for "name", name cannot be nil.')
109
86
  end
110
87
 
111
- if @name.to_s.length < 1
112
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
113
- end
114
-
115
- if !@description.nil? && @description.to_s.length < 1
116
- invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
117
- end
118
-
119
88
  invalid_properties
120
89
  end
121
90
 
@@ -123,46 +92,17 @@ module PulpContainerClient
123
92
  # @return true if the model is valid
124
93
  def valid?
125
94
  return false if @name.nil?
126
- return false if @name.to_s.length < 1
127
- return false if !@description.nil? && @description.to_s.length < 1
128
95
  true
129
96
  end
130
97
 
131
- # Custom attribute writer method with validation
132
- # @param [Object] name Value to be assigned
133
- def name=(name)
134
- if name.nil?
135
- fail ArgumentError, 'name cannot be nil'
136
- end
137
-
138
- if name.to_s.length < 1
139
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
140
- end
141
-
142
- @name = name
143
- end
144
-
145
- # Custom attribute writer method with validation
146
- # @param [Object] description Value to be assigned
147
- def description=(description)
148
- if !description.nil? && description.to_s.length < 1
149
- fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
150
- end
151
-
152
- @description = description
153
- end
154
-
155
98
  # Checks equality by comparing each attribute.
156
99
  # @param [Object] Object to be compared
157
100
  def ==(o)
158
101
  return true if self.equal?(o)
159
102
  self.class == o.class &&
160
- pulp_href == o.pulp_href &&
161
- pulp_created == o.pulp_created &&
162
- versions_href == o.versions_href &&
163
- latest_version_href == o.latest_version_href &&
164
103
  name == o.name &&
165
- description == o.description
104
+ description == o.description &&
105
+ remote == o.remote
166
106
  end
167
107
 
168
108
  # @see the `==` method
@@ -174,7 +114,7 @@ module PulpContainerClient
174
114
  # Calculates hash code according to all attributes.
175
115
  # @return [Integer] Hash code
176
116
  def hash
177
- [pulp_href, pulp_created, versions_href, latest_version_href, name, description].hash
117
+ [name, description, remote].hash
178
118
  end
179
119
 
180
120
  # Builds the object from hash