pulpcore_client 3.3.1 → 3.4.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.
- checksums.yaml +4 -4
- data/README.md +20 -14
- data/docs/{Artifact.md → ArtifactRead.md} +2 -2
- data/docs/ArtifactsApi.md +5 -5
- data/docs/ExportersCoreExportsApi.md +13 -13
- data/docs/ExportersPulpApi.md +9 -9
- data/docs/{Import.md → ImportRead.md} +2 -2
- data/docs/ImportersCoreImportsApi.md +13 -13
- data/docs/ImportersPulpApi.md +9 -9
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/OrphansApi.md +1 -1
- data/docs/PulpExport.md +12 -6
- data/docs/PulpExportRead.md +27 -0
- data/docs/PulpExporterRead.md +27 -0
- data/docs/PulpImporterRead.md +23 -0
- data/docs/{SigningService.md → SigningServiceRead.md} +2 -2
- data/docs/SigningServicesApi.md +3 -3
- data/docs/StatusApi.md +1 -1
- data/docs/{TaskGroup.md → TaskGroupRead.md} +4 -2
- data/docs/TaskGroupsApi.md +3 -3
- data/docs/TaskRead.md +43 -0
- data/docs/TasksApi.md +3 -3
- data/docs/{UploadDetail.md → UploadDetailRead.md} +2 -2
- data/docs/UploadRead.md +23 -0
- data/docs/UploadsApi.md +5 -5
- data/docs/Worker.md +3 -3
- data/docs/WorkerRead.md +23 -0
- data/docs/WorkersApi.md +3 -3
- data/lib/pulpcore_client/api/artifacts_api.rb +6 -6
- data/lib/pulpcore_client/api/exporters_core_exports_api.rb +21 -21
- data/lib/pulpcore_client/api/exporters_pulp_api.rb +12 -12
- data/lib/pulpcore_client/api/importers_core_imports_api.rb +21 -21
- data/lib/pulpcore_client/api/importers_pulp_api.rb +12 -12
- data/lib/pulpcore_client/api/signing_services_api.rb +3 -3
- data/lib/pulpcore_client/api/task_groups_api.rb +3 -3
- data/lib/pulpcore_client/api/tasks_api.rb +3 -3
- data/lib/pulpcore_client/api/uploads_api.rb +6 -6
- data/lib/pulpcore_client/api/workers_api.rb +3 -3
- data/lib/pulpcore_client/configuration.rb +2 -2
- data/lib/pulpcore_client/models/{artifact.rb → artifact_read.rb} +3 -3
- data/lib/pulpcore_client/models/{import.rb → import_read.rb} +3 -3
- data/lib/pulpcore_client/models/inline_response200.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2001.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2002.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2003.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2004.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2005.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2006.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2007.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2008.rb +1 -1
- data/lib/pulpcore_client/models/inline_response2009.rb +1 -1
- data/lib/pulpcore_client/models/pulp_export.rb +59 -49
- data/lib/pulpcore_client/models/pulp_export_read.rb +259 -0
- data/lib/pulpcore_client/models/pulp_exporter.rb +1 -0
- data/lib/pulpcore_client/models/pulp_exporter_read.rb +311 -0
- data/lib/pulpcore_client/models/pulp_importer_read.rb +262 -0
- data/lib/pulpcore_client/models/{signing_service.rb → signing_service_read.rb} +3 -3
- data/lib/pulpcore_client/models/{task_group.rb → task_group_read.rb} +19 -4
- data/lib/pulpcore_client/models/task_read.rb +383 -0
- data/lib/pulpcore_client/models/{upload_detail.rb → upload_detail_read.rb} +3 -3
- data/lib/pulpcore_client/models/upload_read.rb +241 -0
- data/lib/pulpcore_client/models/worker.rb +10 -10
- data/lib/pulpcore_client/models/worker_read.rb +251 -0
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +11 -5
- data/spec/api/artifacts_api_spec.rb +2 -2
- data/spec/api/exporters_core_exports_api_spec.rb +3 -3
- data/spec/api/exporters_pulp_api_spec.rb +4 -4
- data/spec/api/importers_core_imports_api_spec.rb +3 -3
- data/spec/api/importers_pulp_api_spec.rb +4 -4
- data/spec/api/signing_services_api_spec.rb +1 -1
- data/spec/api/task_groups_api_spec.rb +1 -1
- data/spec/api/tasks_api_spec.rb +1 -1
- data/spec/api/uploads_api_spec.rb +2 -2
- data/spec/api/workers_api_spec.rb +1 -1
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/{artifact_spec.rb → artifact_read_spec.rb} +6 -6
- data/spec/models/{import_spec.rb → import_read_spec.rb} +6 -6
- data/spec/models/pulp_export_read_spec.rb +71 -0
- data/spec/models/pulp_export_spec.rb +20 -2
- data/spec/models/pulp_exporter_read_spec.rb +71 -0
- data/spec/models/pulp_importer_read_spec.rb +59 -0
- data/spec/models/{signing_service_spec.rb → signing_service_read_spec.rb} +6 -6
- data/spec/models/{task_group_spec.rb → task_group_read_spec.rb} +12 -6
- data/spec/models/task_read_spec.rb +119 -0
- data/spec/models/{upload_detail_spec.rb → upload_detail_read_spec.rb} +6 -6
- data/spec/models/upload_read_spec.rb +59 -0
- data/spec/models/worker_read_spec.rb +59 -0
- data/spec/models/worker_spec.rb +2 -2
- metadata +46 -22
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpcoreClient
|
|
16
|
+
class PulpExporterRead
|
|
17
|
+
attr_accessor :pulp_href
|
|
18
|
+
|
|
19
|
+
# Timestamp of creation.
|
|
20
|
+
attr_accessor :pulp_created
|
|
21
|
+
|
|
22
|
+
# Unique name of the file system exporter.
|
|
23
|
+
attr_accessor :name
|
|
24
|
+
|
|
25
|
+
# File system directory to store exported tar.gzs.
|
|
26
|
+
attr_accessor :path
|
|
27
|
+
|
|
28
|
+
attr_accessor :repositories
|
|
29
|
+
|
|
30
|
+
# Last attempted export for this PulpExporter
|
|
31
|
+
attr_accessor :last_export
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'pulp_href' => :'pulp_href',
|
|
37
|
+
:'pulp_created' => :'pulp_created',
|
|
38
|
+
:'name' => :'name',
|
|
39
|
+
:'path' => :'path',
|
|
40
|
+
:'repositories' => :'repositories',
|
|
41
|
+
:'last_export' => :'last_export'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'pulp_href' => :'String',
|
|
49
|
+
:'pulp_created' => :'DateTime',
|
|
50
|
+
:'name' => :'String',
|
|
51
|
+
:'path' => :'String',
|
|
52
|
+
:'repositories' => :'Array<String>',
|
|
53
|
+
:'last_export' => :'String'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
:'last_export'
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PulpExporterRead` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PulpExporterRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'pulp_href')
|
|
80
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'pulp_created')
|
|
84
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'name')
|
|
88
|
+
self.name = attributes[:'name']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'path')
|
|
92
|
+
self.path = attributes[:'path']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'repositories')
|
|
96
|
+
if (value = attributes[:'repositories']).is_a?(Array)
|
|
97
|
+
self.repositories = value
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'last_export')
|
|
102
|
+
self.last_export = attributes[:'last_export']
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @name.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @name.to_s.length < 1
|
|
115
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @path.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @path.to_s.length < 1
|
|
123
|
+
invalid_properties.push('invalid value for "path", the character length must be great than or equal to 1.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @repositories.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "repositories", repositories cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
invalid_properties
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Check to see if the all the properties in the model are valid
|
|
134
|
+
# @return true if the model is valid
|
|
135
|
+
def valid?
|
|
136
|
+
return false if @name.nil?
|
|
137
|
+
return false if @name.to_s.length < 1
|
|
138
|
+
return false if @path.nil?
|
|
139
|
+
return false if @path.to_s.length < 1
|
|
140
|
+
return false if @repositories.nil?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] name Value to be assigned
|
|
146
|
+
def name=(name)
|
|
147
|
+
if name.nil?
|
|
148
|
+
fail ArgumentError, 'name cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if name.to_s.length < 1
|
|
152
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@name = name
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] path Value to be assigned
|
|
160
|
+
def path=(path)
|
|
161
|
+
if path.nil?
|
|
162
|
+
fail ArgumentError, 'path cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if path.to_s.length < 1
|
|
166
|
+
fail ArgumentError, 'invalid value for "path", the character length must be great than or equal to 1.'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@path = path
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Checks equality by comparing each attribute.
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def ==(o)
|
|
175
|
+
return true if self.equal?(o)
|
|
176
|
+
self.class == o.class &&
|
|
177
|
+
pulp_href == o.pulp_href &&
|
|
178
|
+
pulp_created == o.pulp_created &&
|
|
179
|
+
name == o.name &&
|
|
180
|
+
path == o.path &&
|
|
181
|
+
repositories == o.repositories &&
|
|
182
|
+
last_export == o.last_export
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# @see the `==` method
|
|
186
|
+
# @param [Object] Object to be compared
|
|
187
|
+
def eql?(o)
|
|
188
|
+
self == o
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Calculates hash code according to all attributes.
|
|
192
|
+
# @return [Integer] Hash code
|
|
193
|
+
def hash
|
|
194
|
+
[pulp_href, pulp_created, name, path, repositories, last_export].hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Builds the object from hash
|
|
198
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
199
|
+
# @return [Object] Returns the model itself
|
|
200
|
+
def self.build_from_hash(attributes)
|
|
201
|
+
new.build_from_hash(attributes)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Builds the object from hash
|
|
205
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
206
|
+
# @return [Object] Returns the model itself
|
|
207
|
+
def build_from_hash(attributes)
|
|
208
|
+
return nil unless attributes.is_a?(Hash)
|
|
209
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
210
|
+
if type =~ /\AArray<(.*)>/i
|
|
211
|
+
# check to ensure the input is an array given that the attribute
|
|
212
|
+
# is documented as an array but the input is not
|
|
213
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
214
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
215
|
+
end
|
|
216
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
217
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
218
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
self
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Deserializes the data based on type
|
|
225
|
+
# @param string type Data type
|
|
226
|
+
# @param string value Value to be deserialized
|
|
227
|
+
# @return [Object] Deserialized data
|
|
228
|
+
def _deserialize(type, value)
|
|
229
|
+
case type.to_sym
|
|
230
|
+
when :DateTime
|
|
231
|
+
DateTime.parse(value)
|
|
232
|
+
when :Date
|
|
233
|
+
Date.parse(value)
|
|
234
|
+
when :String
|
|
235
|
+
value.to_s
|
|
236
|
+
when :Integer
|
|
237
|
+
value.to_i
|
|
238
|
+
when :Float
|
|
239
|
+
value.to_f
|
|
240
|
+
when :Boolean
|
|
241
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
242
|
+
true
|
|
243
|
+
else
|
|
244
|
+
false
|
|
245
|
+
end
|
|
246
|
+
when :Object
|
|
247
|
+
# generic object (usually a Hash), return directly
|
|
248
|
+
value
|
|
249
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
250
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
251
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
252
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
253
|
+
k_type = Regexp.last_match[:k_type]
|
|
254
|
+
v_type = Regexp.last_match[:v_type]
|
|
255
|
+
{}.tap do |hash|
|
|
256
|
+
value.each do |k, v|
|
|
257
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
else # model
|
|
261
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Returns the string representation of the object
|
|
266
|
+
# @return [String] String presentation of the object
|
|
267
|
+
def to_s
|
|
268
|
+
to_hash.to_s
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
272
|
+
# @return [Hash] Returns the object in the form of hash
|
|
273
|
+
def to_body
|
|
274
|
+
to_hash
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Returns the object in the form of hash
|
|
278
|
+
# @return [Hash] Returns the object in the form of hash
|
|
279
|
+
def to_hash
|
|
280
|
+
hash = {}
|
|
281
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
282
|
+
value = self.send(attr)
|
|
283
|
+
if value.nil?
|
|
284
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
285
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
hash[param] = _to_hash(value)
|
|
289
|
+
end
|
|
290
|
+
hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Outputs non-array value in the form of hash
|
|
294
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
295
|
+
# @param [Object] value Any valid value
|
|
296
|
+
# @return [Hash] Returns the value in the form of hash
|
|
297
|
+
def _to_hash(value)
|
|
298
|
+
if value.is_a?(Array)
|
|
299
|
+
value.compact.map { |v| _to_hash(v) }
|
|
300
|
+
elsif value.is_a?(Hash)
|
|
301
|
+
{}.tap do |hash|
|
|
302
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
303
|
+
end
|
|
304
|
+
elsif value.respond_to? :to_hash
|
|
305
|
+
value.to_hash
|
|
306
|
+
else
|
|
307
|
+
value
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
end
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpcoreClient
|
|
16
|
+
class PulpImporterRead
|
|
17
|
+
attr_accessor :pulp_href
|
|
18
|
+
|
|
19
|
+
# Timestamp of creation.
|
|
20
|
+
attr_accessor :pulp_created
|
|
21
|
+
|
|
22
|
+
# Unique name of the Importer.
|
|
23
|
+
attr_accessor :name
|
|
24
|
+
|
|
25
|
+
# Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\".
|
|
26
|
+
attr_accessor :repo_mapping
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'pulp_href' => :'pulp_href',
|
|
32
|
+
:'pulp_created' => :'pulp_created',
|
|
33
|
+
:'name' => :'name',
|
|
34
|
+
:'repo_mapping' => :'repo_mapping'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'pulp_href' => :'String',
|
|
42
|
+
:'pulp_created' => :'DateTime',
|
|
43
|
+
:'name' => :'String',
|
|
44
|
+
:'repo_mapping' => :'Hash<String, String>'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PulpImporterRead` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PulpImporterRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
65
|
+
end
|
|
66
|
+
h[k.to_sym] = v
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if attributes.key?(:'pulp_href')
|
|
70
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'pulp_created')
|
|
74
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'name')
|
|
78
|
+
self.name = attributes[:'name']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'repo_mapping')
|
|
82
|
+
if (value = attributes[:'repo_mapping']).is_a?(Hash)
|
|
83
|
+
self.repo_mapping = value
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
if @name.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if @name.to_s.length < 1
|
|
97
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
return false if @name.nil?
|
|
107
|
+
return false if @name.to_s.length < 1
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Custom attribute writer method with validation
|
|
112
|
+
# @param [Object] name Value to be assigned
|
|
113
|
+
def name=(name)
|
|
114
|
+
if name.nil?
|
|
115
|
+
fail ArgumentError, 'name cannot be nil'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if name.to_s.length < 1
|
|
119
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
@name = name
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Checks equality by comparing each attribute.
|
|
126
|
+
# @param [Object] Object to be compared
|
|
127
|
+
def ==(o)
|
|
128
|
+
return true if self.equal?(o)
|
|
129
|
+
self.class == o.class &&
|
|
130
|
+
pulp_href == o.pulp_href &&
|
|
131
|
+
pulp_created == o.pulp_created &&
|
|
132
|
+
name == o.name &&
|
|
133
|
+
repo_mapping == o.repo_mapping
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# @see the `==` method
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def eql?(o)
|
|
139
|
+
self == o
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Calculates hash code according to all attributes.
|
|
143
|
+
# @return [Integer] Hash code
|
|
144
|
+
def hash
|
|
145
|
+
[pulp_href, pulp_created, name, repo_mapping].hash
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Builds the object from hash
|
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
150
|
+
# @return [Object] Returns the model itself
|
|
151
|
+
def self.build_from_hash(attributes)
|
|
152
|
+
new.build_from_hash(attributes)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Builds the object from hash
|
|
156
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
|
+
# @return [Object] Returns the model itself
|
|
158
|
+
def build_from_hash(attributes)
|
|
159
|
+
return nil unless attributes.is_a?(Hash)
|
|
160
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
161
|
+
if type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
168
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
169
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
self
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Deserializes the data based on type
|
|
176
|
+
# @param string type Data type
|
|
177
|
+
# @param string value Value to be deserialized
|
|
178
|
+
# @return [Object] Deserialized data
|
|
179
|
+
def _deserialize(type, value)
|
|
180
|
+
case type.to_sym
|
|
181
|
+
when :DateTime
|
|
182
|
+
DateTime.parse(value)
|
|
183
|
+
when :Date
|
|
184
|
+
Date.parse(value)
|
|
185
|
+
when :String
|
|
186
|
+
value.to_s
|
|
187
|
+
when :Integer
|
|
188
|
+
value.to_i
|
|
189
|
+
when :Float
|
|
190
|
+
value.to_f
|
|
191
|
+
when :Boolean
|
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
193
|
+
true
|
|
194
|
+
else
|
|
195
|
+
false
|
|
196
|
+
end
|
|
197
|
+
when :Object
|
|
198
|
+
# generic object (usually a Hash), return directly
|
|
199
|
+
value
|
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each do |k, v|
|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
else # model
|
|
212
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the string representation of the object
|
|
217
|
+
# @return [String] String presentation of the object
|
|
218
|
+
def to_s
|
|
219
|
+
to_hash.to_s
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_body
|
|
225
|
+
to_hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the object in the form of hash
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_hash
|
|
231
|
+
hash = {}
|
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
233
|
+
value = self.send(attr)
|
|
234
|
+
if value.nil?
|
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
hash[param] = _to_hash(value)
|
|
240
|
+
end
|
|
241
|
+
hash
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Outputs non-array value in the form of hash
|
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
246
|
+
# @param [Object] value Any valid value
|
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
|
248
|
+
def _to_hash(value)
|
|
249
|
+
if value.is_a?(Array)
|
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
|
251
|
+
elsif value.is_a?(Hash)
|
|
252
|
+
{}.tap do |hash|
|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
254
|
+
end
|
|
255
|
+
elsif value.respond_to? :to_hash
|
|
256
|
+
value.to_hash
|
|
257
|
+
else
|
|
258
|
+
value
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module PulpcoreClient
|
|
16
|
-
class
|
|
16
|
+
class SigningServiceRead
|
|
17
17
|
attr_accessor :pulp_href
|
|
18
18
|
|
|
19
19
|
# Timestamp of creation.
|
|
@@ -55,13 +55,13 @@ module PulpcoreClient
|
|
|
55
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
56
|
def initialize(attributes = {})
|
|
57
57
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::SigningServiceRead` initialize method"
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
62
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
63
63
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
64
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::
|
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::SigningServiceRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
65
65
|
end
|
|
66
66
|
h[k.to_sym] = v
|
|
67
67
|
}
|
|
@@ -13,12 +13,15 @@ OpenAPI Generator version: 4.2.3
|
|
|
13
13
|
require 'date'
|
|
14
14
|
|
|
15
15
|
module PulpcoreClient
|
|
16
|
-
class
|
|
16
|
+
class TaskGroupRead
|
|
17
17
|
attr_accessor :pulp_href
|
|
18
18
|
|
|
19
19
|
# A description of the task group.
|
|
20
20
|
attr_accessor :description
|
|
21
21
|
|
|
22
|
+
# Whether all tasks have been spawned for this task group.
|
|
23
|
+
attr_accessor :all_tasks_dispatched
|
|
24
|
+
|
|
22
25
|
# Number of tasks in the 'waiting' state
|
|
23
26
|
attr_accessor :waiting
|
|
24
27
|
|
|
@@ -42,6 +45,7 @@ module PulpcoreClient
|
|
|
42
45
|
{
|
|
43
46
|
:'pulp_href' => :'pulp_href',
|
|
44
47
|
:'description' => :'description',
|
|
48
|
+
:'all_tasks_dispatched' => :'all_tasks_dispatched',
|
|
45
49
|
:'waiting' => :'waiting',
|
|
46
50
|
:'skipped' => :'skipped',
|
|
47
51
|
:'running' => :'running',
|
|
@@ -56,6 +60,7 @@ module PulpcoreClient
|
|
|
56
60
|
{
|
|
57
61
|
:'pulp_href' => :'String',
|
|
58
62
|
:'description' => :'String',
|
|
63
|
+
:'all_tasks_dispatched' => :'Boolean',
|
|
59
64
|
:'waiting' => :'Integer',
|
|
60
65
|
:'skipped' => :'Integer',
|
|
61
66
|
:'running' => :'Integer',
|
|
@@ -75,13 +80,13 @@ module PulpcoreClient
|
|
|
75
80
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
81
|
def initialize(attributes = {})
|
|
77
82
|
if (!attributes.is_a?(Hash))
|
|
78
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::TaskGroupRead` initialize method"
|
|
79
84
|
end
|
|
80
85
|
|
|
81
86
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
87
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
83
88
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
84
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::
|
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::TaskGroupRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
85
90
|
end
|
|
86
91
|
h[k.to_sym] = v
|
|
87
92
|
}
|
|
@@ -94,6 +99,10 @@ module PulpcoreClient
|
|
|
94
99
|
self.description = attributes[:'description']
|
|
95
100
|
end
|
|
96
101
|
|
|
102
|
+
if attributes.key?(:'all_tasks_dispatched')
|
|
103
|
+
self.all_tasks_dispatched = attributes[:'all_tasks_dispatched']
|
|
104
|
+
end
|
|
105
|
+
|
|
97
106
|
if attributes.key?(:'waiting')
|
|
98
107
|
self.waiting = attributes[:'waiting']
|
|
99
108
|
end
|
|
@@ -131,6 +140,10 @@ module PulpcoreClient
|
|
|
131
140
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
132
141
|
end
|
|
133
142
|
|
|
143
|
+
if @all_tasks_dispatched.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "all_tasks_dispatched", all_tasks_dispatched cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
134
147
|
invalid_properties
|
|
135
148
|
end
|
|
136
149
|
|
|
@@ -139,6 +152,7 @@ module PulpcoreClient
|
|
|
139
152
|
def valid?
|
|
140
153
|
return false if @description.nil?
|
|
141
154
|
return false if @description.to_s.length < 1
|
|
155
|
+
return false if @all_tasks_dispatched.nil?
|
|
142
156
|
true
|
|
143
157
|
end
|
|
144
158
|
|
|
@@ -163,6 +177,7 @@ module PulpcoreClient
|
|
|
163
177
|
self.class == o.class &&
|
|
164
178
|
pulp_href == o.pulp_href &&
|
|
165
179
|
description == o.description &&
|
|
180
|
+
all_tasks_dispatched == o.all_tasks_dispatched &&
|
|
166
181
|
waiting == o.waiting &&
|
|
167
182
|
skipped == o.skipped &&
|
|
168
183
|
running == o.running &&
|
|
@@ -180,7 +195,7 @@ module PulpcoreClient
|
|
|
180
195
|
# Calculates hash code according to all attributes.
|
|
181
196
|
# @return [Integer] Hash code
|
|
182
197
|
def hash
|
|
183
|
-
[pulp_href, description, waiting, skipped, running, completed, canceled, failed].hash
|
|
198
|
+
[pulp_href, description, all_tasks_dispatched, waiting, skipped, running, completed, canceled, failed].hash
|
|
184
199
|
end
|
|
185
200
|
|
|
186
201
|
# Builds the object from hash
|