pulp_container_client 2.17.0 → 2.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -6
  3. data/docs/ContainerContainerDistribution.md +6 -6
  4. data/docs/ContainerContainerDistributionResponse.md +12 -10
  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 +3 -3
  11. data/docs/ContainerContainerPushRepositoryResponse.md +12 -12
  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 +6 -6
  22. data/docs/PatchedcontainerContainerPullThroughDistribution.md +35 -0
  23. data/docs/PatchedcontainerContainerPullThroughRemote.md +57 -0
  24. data/docs/PatchedcontainerContainerPushRepository.md +3 -3
  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 +52 -52
  36. data/lib/pulp_container_client/models/container_container_distribution_response.rb +60 -50
  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 +30 -30
  43. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +47 -47
  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 +43 -43
  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 +30 -30
  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 +14 -8
  64. data/spec/models/container_container_distribution_spec.rb +5 -5
  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 +8 -8
  71. data/spec/models/container_container_push_repository_spec.rb +3 -3
  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 +5 -5
  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 +3 -3
  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 +102 -58
@@ -0,0 +1,349 @@
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 specialized pull-through distribution referencing sub-distributions.
17
+ class ContainerContainerPullThroughDistributionResponse
18
+ # An optional content-guard. If none is specified, a default one will be used.
19
+ attr_accessor :content_guard
20
+
21
+ attr_accessor :pulp_labels
22
+
23
+ attr_accessor :pulp_href
24
+
25
+ # A unique name. Ex, `rawhide` and `stable`.
26
+ attr_accessor :name
27
+
28
+ # The latest RepositoryVersion for this Repository will be served.
29
+ attr_accessor :repository
30
+
31
+ # Timestamp of creation.
32
+ attr_accessor :pulp_created
33
+
34
+ # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
35
+ attr_accessor :base_path
36
+
37
+ # Whether this distribution should be shown in the content app.
38
+ attr_accessor :hidden
39
+
40
+ # Remote that can be used to fetch content when using pull-through caching.
41
+ attr_accessor :remote
42
+
43
+ # Distributions created after pulling content through cache
44
+ attr_accessor :distributions
45
+
46
+ # Namespace this distribution belongs to.
47
+ attr_accessor :namespace
48
+
49
+ # Restrict pull access to explicitly authorized users. Related distributions inherit this value. Defaults to unrestricted pull access.
50
+ attr_accessor :private
51
+
52
+ # An optional description.
53
+ attr_accessor :description
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'content_guard' => :'content_guard',
59
+ :'pulp_labels' => :'pulp_labels',
60
+ :'pulp_href' => :'pulp_href',
61
+ :'name' => :'name',
62
+ :'repository' => :'repository',
63
+ :'pulp_created' => :'pulp_created',
64
+ :'base_path' => :'base_path',
65
+ :'hidden' => :'hidden',
66
+ :'remote' => :'remote',
67
+ :'distributions' => :'distributions',
68
+ :'namespace' => :'namespace',
69
+ :'private' => :'private',
70
+ :'description' => :'description'
71
+ }
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'content_guard' => :'String',
78
+ :'pulp_labels' => :'Hash<String, String>',
79
+ :'pulp_href' => :'String',
80
+ :'name' => :'String',
81
+ :'repository' => :'String',
82
+ :'pulp_created' => :'DateTime',
83
+ :'base_path' => :'String',
84
+ :'hidden' => :'Boolean',
85
+ :'remote' => :'String',
86
+ :'distributions' => :'Array<String>',
87
+ :'namespace' => :'String',
88
+ :'private' => :'Boolean',
89
+ :'description' => :'String'
90
+ }
91
+ end
92
+
93
+ # List of attributes with nullable: true
94
+ def self.openapi_nullable
95
+ Set.new([
96
+ :'repository',
97
+ :'description'
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPullThroughDistributionResponse` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPullThroughDistributionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'content_guard')
117
+ self.content_guard = attributes[:'content_guard']
118
+ end
119
+
120
+ if attributes.key?(:'pulp_labels')
121
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
122
+ self.pulp_labels = value
123
+ end
124
+ end
125
+
126
+ if attributes.key?(:'pulp_href')
127
+ self.pulp_href = attributes[:'pulp_href']
128
+ end
129
+
130
+ if attributes.key?(:'name')
131
+ self.name = attributes[:'name']
132
+ end
133
+
134
+ if attributes.key?(:'repository')
135
+ self.repository = attributes[:'repository']
136
+ end
137
+
138
+ if attributes.key?(:'pulp_created')
139
+ self.pulp_created = attributes[:'pulp_created']
140
+ end
141
+
142
+ if attributes.key?(:'base_path')
143
+ self.base_path = attributes[:'base_path']
144
+ end
145
+
146
+ if attributes.key?(:'hidden')
147
+ self.hidden = attributes[:'hidden']
148
+ else
149
+ self.hidden = false
150
+ end
151
+
152
+ if attributes.key?(:'remote')
153
+ self.remote = attributes[:'remote']
154
+ end
155
+
156
+ if attributes.key?(:'distributions')
157
+ if (value = attributes[:'distributions']).is_a?(Array)
158
+ self.distributions = value
159
+ end
160
+ end
161
+
162
+ if attributes.key?(:'namespace')
163
+ self.namespace = attributes[:'namespace']
164
+ end
165
+
166
+ if attributes.key?(:'private')
167
+ self.private = attributes[:'private']
168
+ end
169
+
170
+ if attributes.key?(:'description')
171
+ self.description = attributes[:'description']
172
+ end
173
+ end
174
+
175
+ # Show invalid properties with the reasons. Usually used together with valid?
176
+ # @return Array for valid properties with the reasons
177
+ def list_invalid_properties
178
+ invalid_properties = Array.new
179
+ if @name.nil?
180
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
181
+ end
182
+
183
+ if @base_path.nil?
184
+ invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
185
+ end
186
+
187
+ if @remote.nil?
188
+ invalid_properties.push('invalid value for "remote", remote cannot be nil.')
189
+ end
190
+
191
+ invalid_properties
192
+ end
193
+
194
+ # Check to see if the all the properties in the model are valid
195
+ # @return true if the model is valid
196
+ def valid?
197
+ return false if @name.nil?
198
+ return false if @base_path.nil?
199
+ return false if @remote.nil?
200
+ true
201
+ end
202
+
203
+ # Checks equality by comparing each attribute.
204
+ # @param [Object] Object to be compared
205
+ def ==(o)
206
+ return true if self.equal?(o)
207
+ self.class == o.class &&
208
+ content_guard == o.content_guard &&
209
+ pulp_labels == o.pulp_labels &&
210
+ pulp_href == o.pulp_href &&
211
+ name == o.name &&
212
+ repository == o.repository &&
213
+ pulp_created == o.pulp_created &&
214
+ base_path == o.base_path &&
215
+ hidden == o.hidden &&
216
+ remote == o.remote &&
217
+ distributions == o.distributions &&
218
+ namespace == o.namespace &&
219
+ private == o.private &&
220
+ description == o.description
221
+ end
222
+
223
+ # @see the `==` method
224
+ # @param [Object] Object to be compared
225
+ def eql?(o)
226
+ self == o
227
+ end
228
+
229
+ # Calculates hash code according to all attributes.
230
+ # @return [Integer] Hash code
231
+ def hash
232
+ [content_guard, pulp_labels, pulp_href, name, repository, pulp_created, base_path, hidden, remote, distributions, namespace, private, description].hash
233
+ end
234
+
235
+ # Builds the object from hash
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ # @return [Object] Returns the model itself
238
+ def self.build_from_hash(attributes)
239
+ new.build_from_hash(attributes)
240
+ end
241
+
242
+ # Builds the object from hash
243
+ # @param [Hash] attributes Model attributes in the form of hash
244
+ # @return [Object] Returns the model itself
245
+ def build_from_hash(attributes)
246
+ return nil unless attributes.is_a?(Hash)
247
+ self.class.openapi_types.each_pair do |key, type|
248
+ if type =~ /\AArray<(.*)>/i
249
+ # check to ensure the input is an array given that the attribute
250
+ # is documented as an array but the input is not
251
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
252
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
253
+ end
254
+ elsif !attributes[self.class.attribute_map[key]].nil?
255
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
256
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
257
+ end
258
+
259
+ self
260
+ end
261
+
262
+ # Deserializes the data based on type
263
+ # @param string type Data type
264
+ # @param string value Value to be deserialized
265
+ # @return [Object] Deserialized data
266
+ def _deserialize(type, value)
267
+ case type.to_sym
268
+ when :DateTime
269
+ DateTime.parse(value)
270
+ when :Date
271
+ Date.parse(value)
272
+ when :String
273
+ value.to_s
274
+ when :Integer
275
+ value.to_i
276
+ when :Float
277
+ value.to_f
278
+ when :Boolean
279
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
280
+ true
281
+ else
282
+ false
283
+ end
284
+ when :Object
285
+ # generic object (usually a Hash), return directly
286
+ value
287
+ when /\AArray<(?<inner_type>.+)>\z/
288
+ inner_type = Regexp.last_match[:inner_type]
289
+ value.map { |v| _deserialize(inner_type, v) }
290
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
291
+ k_type = Regexp.last_match[:k_type]
292
+ v_type = Regexp.last_match[:v_type]
293
+ {}.tap do |hash|
294
+ value.each do |k, v|
295
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
296
+ end
297
+ end
298
+ else # model
299
+ PulpContainerClient.const_get(type).build_from_hash(value)
300
+ end
301
+ end
302
+
303
+ # Returns the string representation of the object
304
+ # @return [String] String presentation of the object
305
+ def to_s
306
+ to_hash.to_s
307
+ end
308
+
309
+ # to_body is an alias to to_hash (backward compatibility)
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_body
312
+ to_hash
313
+ end
314
+
315
+ # Returns the object in the form of hash
316
+ # @return [Hash] Returns the object in the form of hash
317
+ def to_hash
318
+ hash = {}
319
+ self.class.attribute_map.each_pair do |attr, param|
320
+ value = self.send(attr)
321
+ if value.nil?
322
+ is_nullable = self.class.openapi_nullable.include?(attr)
323
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
324
+ end
325
+
326
+ hash[param] = _to_hash(value)
327
+ end
328
+ hash
329
+ end
330
+
331
+ # Outputs non-array value in the form of hash
332
+ # For object, use to_hash. Otherwise, just return the value
333
+ # @param [Object] value Any valid value
334
+ # @return [Hash] Returns the value in the form of hash
335
+ def _to_hash(value)
336
+ if value.is_a?(Array)
337
+ value.compact.map { |v| _to_hash(v) }
338
+ elsif value.is_a?(Hash)
339
+ {}.tap do |hash|
340
+ value.each { |k, v| hash[k] = _to_hash(v) }
341
+ end
342
+ elsif value.respond_to? :to_hash
343
+ value.to_hash
344
+ else
345
+ value
346
+ end
347
+ end
348
+ end
349
+ end