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