pulp_container_client 2.16.4 → 2.18.0
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 +7 -7
- data/docs/ContainerContainerDistributionResponse.md +10 -8
- 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 +5 -5
- data/docs/ContainerContainerPushRepositoryResponse.md +13 -13
- 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 +7 -7
- data/docs/PatchedcontainerContainerPullThroughDistribution.md +35 -0
- data/docs/PatchedcontainerContainerPullThroughRemote.md +57 -0
- data/docs/PatchedcontainerContainerPushRepository.md +5 -5
- 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 +26 -26
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +43 -33
- 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 +47 -47
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +56 -56
- 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 +26 -26
- 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 +39 -39
- 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 +12 -6
- data/spec/models/container_container_distribution_spec.rb +4 -4
- 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 +7 -7
- data/spec/models/container_container_push_repository_spec.rb +4 -4
- 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 +4 -4
- 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 +4 -4
- data/spec/models/{policy_enum_spec.rb → policy762_enum_spec.rb} +6 -6
- data/spec/models/policy8e2_enum_spec.rb +35 -0
- metadata +103 -59
data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb
ADDED
@@ -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
|
+
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
22
|
+
attr_accessor :base_path
|
23
|
+
|
24
|
+
attr_accessor :pulp_href
|
25
|
+
|
26
|
+
# Whether this distribution should be shown in the content app.
|
27
|
+
attr_accessor :hidden
|
28
|
+
|
29
|
+
attr_accessor :pulp_labels
|
30
|
+
|
31
|
+
# A unique name. Ex, `rawhide` and `stable`.
|
32
|
+
attr_accessor :name
|
33
|
+
|
34
|
+
# The latest RepositoryVersion for this Repository will be served.
|
35
|
+
attr_accessor :repository
|
36
|
+
|
37
|
+
# Timestamp of creation.
|
38
|
+
attr_accessor :pulp_created
|
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
|
+
:'base_path' => :'base_path',
|
60
|
+
:'pulp_href' => :'pulp_href',
|
61
|
+
:'hidden' => :'hidden',
|
62
|
+
:'pulp_labels' => :'pulp_labels',
|
63
|
+
:'name' => :'name',
|
64
|
+
:'repository' => :'repository',
|
65
|
+
:'pulp_created' => :'pulp_created',
|
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
|
+
:'base_path' => :'String',
|
79
|
+
:'pulp_href' => :'String',
|
80
|
+
:'hidden' => :'Boolean',
|
81
|
+
:'pulp_labels' => :'Hash<String, String>',
|
82
|
+
:'name' => :'String',
|
83
|
+
:'repository' => :'String',
|
84
|
+
:'pulp_created' => :'DateTime',
|
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?(:'base_path')
|
121
|
+
self.base_path = attributes[:'base_path']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'pulp_href')
|
125
|
+
self.pulp_href = attributes[:'pulp_href']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'hidden')
|
129
|
+
self.hidden = attributes[:'hidden']
|
130
|
+
else
|
131
|
+
self.hidden = false
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'pulp_labels')
|
135
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
136
|
+
self.pulp_labels = value
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'name')
|
141
|
+
self.name = attributes[:'name']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'repository')
|
145
|
+
self.repository = attributes[:'repository']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'pulp_created')
|
149
|
+
self.pulp_created = attributes[:'pulp_created']
|
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 @base_path.nil?
|
180
|
+
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
181
|
+
end
|
182
|
+
|
183
|
+
if @name.nil?
|
184
|
+
invalid_properties.push('invalid value for "name", name 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 @base_path.nil?
|
198
|
+
return false if @name.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
|
+
base_path == o.base_path &&
|
210
|
+
pulp_href == o.pulp_href &&
|
211
|
+
hidden == o.hidden &&
|
212
|
+
pulp_labels == o.pulp_labels &&
|
213
|
+
name == o.name &&
|
214
|
+
repository == o.repository &&
|
215
|
+
pulp_created == o.pulp_created &&
|
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, base_path, pulp_href, hidden, pulp_labels, name, repository, pulp_created, 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
|