pulpcore_client 3.0.0rc7 → 3.0.0rc8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -22
  3. data/docs/ArtifactsApi.md +4 -4
  4. data/docs/InlineResponse2001.md +1 -1
  5. data/docs/InlineResponse2002.md +1 -1
  6. data/docs/InlineResponse2003.md +1 -1
  7. data/docs/Status.md +3 -1
  8. data/docs/Storage.md +21 -0
  9. data/docs/TasksApi.md +2 -2
  10. data/docs/UploadsApi.md +2 -2
  11. data/docs/WorkersApi.md +2 -2
  12. data/lib/pulpcore_client/api/artifacts_api.rb +11 -7
  13. data/lib/pulpcore_client/api/orphans_api.rb +1 -1
  14. data/lib/pulpcore_client/api/status_api.rb +1 -1
  15. data/lib/pulpcore_client/api/tasks_api.rb +4 -4
  16. data/lib/pulpcore_client/api/uploads_api.rb +4 -4
  17. data/lib/pulpcore_client/api/workers_api.rb +4 -4
  18. data/lib/pulpcore_client/api_client.rb +1 -1
  19. data/lib/pulpcore_client/api_error.rb +1 -1
  20. data/lib/pulpcore_client/configuration.rb +1 -1
  21. data/lib/pulpcore_client/models/artifact.rb +18 -2
  22. data/lib/pulpcore_client/models/async_operation_response.rb +12 -2
  23. data/lib/pulpcore_client/models/content_app_status.rb +12 -2
  24. data/lib/pulpcore_client/models/database_connection.rb +12 -2
  25. data/lib/pulpcore_client/models/inline_response200.rb +14 -2
  26. data/lib/pulpcore_client/models/inline_response2001.rb +15 -3
  27. data/lib/pulpcore_client/models/inline_response2002.rb +15 -3
  28. data/lib/pulpcore_client/models/inline_response2003.rb +15 -3
  29. data/lib/pulpcore_client/models/progress_report.rb +13 -2
  30. data/lib/pulpcore_client/models/redis_connection.rb +12 -2
  31. data/lib/pulpcore_client/models/status.rb +25 -6
  32. data/lib/pulpcore_client/models/{inline_response2004.rb → storage.rb} +106 -41
  33. data/lib/pulpcore_client/models/task.rb +12 -2
  34. data/lib/pulpcore_client/models/task_cancel.rb +12 -2
  35. data/lib/pulpcore_client/models/upload.rb +12 -2
  36. data/lib/pulpcore_client/models/upload_chunk.rb +13 -2
  37. data/lib/pulpcore_client/models/upload_commit.rb +12 -2
  38. data/lib/pulpcore_client/models/upload_detail.rb +12 -2
  39. data/lib/pulpcore_client/models/version.rb +12 -2
  40. data/lib/pulpcore_client/models/worker.rb +12 -2
  41. data/lib/pulpcore_client/version.rb +2 -2
  42. data/lib/pulpcore_client.rb +2 -9
  43. data/pulpcore_client.gemspec +1 -1
  44. data/spec/api/artifacts_api_spec.rb +2 -2
  45. data/spec/api/orphans_api_spec.rb +1 -1
  46. data/spec/api/status_api_spec.rb +1 -1
  47. data/spec/api/tasks_api_spec.rb +2 -2
  48. data/spec/api/uploads_api_spec.rb +2 -2
  49. data/spec/api/workers_api_spec.rb +2 -2
  50. data/spec/api_client_spec.rb +1 -1
  51. data/spec/configuration_spec.rb +1 -1
  52. data/spec/models/artifact_spec.rb +1 -1
  53. data/spec/models/async_operation_response_spec.rb +1 -1
  54. data/spec/models/content_app_status_spec.rb +1 -1
  55. data/spec/models/database_connection_spec.rb +1 -1
  56. data/spec/models/inline_response2001_spec.rb +1 -1
  57. data/spec/models/inline_response2002_spec.rb +1 -1
  58. data/spec/models/inline_response2003_spec.rb +1 -1
  59. data/spec/models/inline_response200_spec.rb +1 -1
  60. data/spec/models/progress_report_spec.rb +1 -1
  61. data/spec/models/redis_connection_spec.rb +1 -1
  62. data/spec/models/status_spec.rb +7 -1
  63. data/spec/models/{content_summary_spec.rb → storage_spec.rb} +10 -10
  64. data/spec/models/task_cancel_spec.rb +1 -1
  65. data/spec/models/task_spec.rb +1 -1
  66. data/spec/models/upload_chunk_spec.rb +1 -1
  67. data/spec/models/upload_commit_spec.rb +1 -1
  68. data/spec/models/upload_detail_spec.rb +1 -1
  69. data/spec/models/upload_spec.rb +1 -1
  70. data/spec/models/version_spec.rb +1 -1
  71. data/spec/models/worker_spec.rb +1 -1
  72. data/spec/spec_helper.rb +1 -1
  73. metadata +6 -34
  74. data/docs/ContentSummary.md +0 -21
  75. data/docs/InlineResponse2004.md +0 -23
  76. data/docs/InlineResponse2005.md +0 -23
  77. data/docs/RepositoriesApi.md +0 -346
  78. data/docs/RepositoriesVersionsApi.md +0 -266
  79. data/docs/Repository.md +0 -29
  80. data/docs/RepositoryVersion.md +0 -25
  81. data/docs/RepositoryVersionCreate.md +0 -21
  82. data/lib/pulpcore_client/api/repositories_api.rb +0 -422
  83. data/lib/pulpcore_client/api/repositories_versions_api.rb +0 -334
  84. data/lib/pulpcore_client/models/content_summary.rb +0 -236
  85. data/lib/pulpcore_client/models/inline_response2005.rb +0 -235
  86. data/lib/pulpcore_client/models/repository.rb +0 -293
  87. data/lib/pulpcore_client/models/repository_version.rb +0 -234
  88. data/lib/pulpcore_client/models/repository_version_create.rb +0 -221
  89. data/spec/api/repositories_api_spec.rb +0 -112
  90. data/spec/api/repositories_versions_api_spec.rb +0 -102
  91. data/spec/models/inline_response2004_spec.rb +0 -59
  92. data/spec/models/inline_response2005_spec.rb +0 -59
  93. data/spec/models/repository_spec.rb +0 -77
  94. data/spec/models/repository_version_create_spec.rb +0 -53
  95. data/spec/models/repository_version_spec.rb +0 -65
@@ -1,235 +0,0 @@
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.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpcoreClient
16
- class InlineResponse2005
17
- attr_accessor :count
18
-
19
- attr_accessor :_next
20
-
21
- attr_accessor :previous
22
-
23
- attr_accessor :results
24
-
25
- # Attribute mapping from ruby-style variable name to JSON key.
26
- def self.attribute_map
27
- {
28
- :'count' => :'count',
29
- :'_next' => :'next',
30
- :'previous' => :'previous',
31
- :'results' => :'results'
32
- }
33
- end
34
-
35
- # Attribute type mapping.
36
- def self.openapi_types
37
- {
38
- :'count' => :'Integer',
39
- :'_next' => :'String',
40
- :'previous' => :'String',
41
- :'results' => :'Array<Worker>'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::InlineResponse2005` initialize method"
50
- end
51
-
52
- # check to see if the attribute exists and convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}) { |(k, v), h|
54
- if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::InlineResponse2005`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
- end
57
- h[k.to_sym] = v
58
- }
59
-
60
- if attributes.key?(:'count')
61
- self.count = attributes[:'count']
62
- end
63
-
64
- if attributes.key?(:'_next')
65
- self._next = attributes[:'_next']
66
- end
67
-
68
- if attributes.key?(:'previous')
69
- self.previous = attributes[:'previous']
70
- end
71
-
72
- if attributes.key?(:'results')
73
- if (value = attributes[:'results']).is_a?(Array)
74
- self.results = value
75
- end
76
- end
77
- end
78
-
79
- # Show invalid properties with the reasons. Usually used together with valid?
80
- # @return Array for valid properties with the reasons
81
- def list_invalid_properties
82
- invalid_properties = Array.new
83
- if @count.nil?
84
- invalid_properties.push('invalid value for "count", count cannot be nil.')
85
- end
86
-
87
- if @results.nil?
88
- invalid_properties.push('invalid value for "results", results cannot be nil.')
89
- end
90
-
91
- invalid_properties
92
- end
93
-
94
- # Check to see if the all the properties in the model are valid
95
- # @return true if the model is valid
96
- def valid?
97
- return false if @count.nil?
98
- return false if @results.nil?
99
- true
100
- end
101
-
102
- # Checks equality by comparing each attribute.
103
- # @param [Object] Object to be compared
104
- def ==(o)
105
- return true if self.equal?(o)
106
- self.class == o.class &&
107
- count == o.count &&
108
- _next == o._next &&
109
- previous == o.previous &&
110
- results == o.results
111
- end
112
-
113
- # @see the `==` method
114
- # @param [Object] Object to be compared
115
- def eql?(o)
116
- self == o
117
- end
118
-
119
- # Calculates hash code according to all attributes.
120
- # @return [Integer] Hash code
121
- def hash
122
- [count, _next, previous, results].hash
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def self.build_from_hash(attributes)
129
- new.build_from_hash(attributes)
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def build_from_hash(attributes)
136
- return nil unless attributes.is_a?(Hash)
137
- self.class.openapi_types.each_pair do |key, type|
138
- if type =~ /\AArray<(.*)>/i
139
- # check to ensure the input is an array given that the attribute
140
- # is documented as an array but the input is not
141
- if attributes[self.class.attribute_map[key]].is_a?(Array)
142
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
- end
144
- elsif !attributes[self.class.attribute_map[key]].nil?
145
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
- end # or else data not found in attributes(hash), not an issue as the data can be optional
147
- end
148
-
149
- self
150
- end
151
-
152
- # Deserializes the data based on type
153
- # @param string type Data type
154
- # @param string value Value to be deserialized
155
- # @return [Object] Deserialized data
156
- def _deserialize(type, value)
157
- case type.to_sym
158
- when :DateTime
159
- DateTime.parse(value)
160
- when :Date
161
- Date.parse(value)
162
- when :String
163
- value.to_s
164
- when :Integer
165
- value.to_i
166
- when :Float
167
- value.to_f
168
- when :Boolean
169
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
- true
171
- else
172
- false
173
- end
174
- when :Object
175
- # generic object (usually a Hash), return directly
176
- value
177
- when /\AArray<(?<inner_type>.+)>\z/
178
- inner_type = Regexp.last_match[:inner_type]
179
- value.map { |v| _deserialize(inner_type, v) }
180
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
- k_type = Regexp.last_match[:k_type]
182
- v_type = Regexp.last_match[:v_type]
183
- {}.tap do |hash|
184
- value.each do |k, v|
185
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
- end
187
- end
188
- else # model
189
- PulpcoreClient.const_get(type).build_from_hash(value)
190
- end
191
- end
192
-
193
- # Returns the string representation of the object
194
- # @return [String] String presentation of the object
195
- def to_s
196
- to_hash.to_s
197
- end
198
-
199
- # to_body is an alias to to_hash (backward compatibility)
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_body
202
- to_hash
203
- end
204
-
205
- # Returns the object in the form of hash
206
- # @return [Hash] Returns the object in the form of hash
207
- def to_hash
208
- hash = {}
209
- self.class.attribute_map.each_pair do |attr, param|
210
- value = self.send(attr)
211
- next if value.nil?
212
- hash[param] = _to_hash(value)
213
- end
214
- hash
215
- end
216
-
217
- # Outputs non-array value in the form of hash
218
- # For object, use to_hash. Otherwise, just return the value
219
- # @param [Object] value Any valid value
220
- # @return [Hash] Returns the value in the form of hash
221
- def _to_hash(value)
222
- if value.is_a?(Array)
223
- value.compact.map { |v| _to_hash(v) }
224
- elsif value.is_a?(Hash)
225
- {}.tap do |hash|
226
- value.each { |k, v| hash[k] = _to_hash(v) }
227
- end
228
- elsif value.respond_to? :to_hash
229
- value.to_hash
230
- else
231
- value
232
- end
233
- end
234
- end
235
- end
@@ -1,293 +0,0 @@
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.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpcoreClient
16
- class Repository
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
- # A unique name for this repository.
27
- attr_accessor :name
28
-
29
- # True if the plugin manages this repository, users typically do not interact with it.
30
- attr_accessor :plugin_managed
31
-
32
- # An optional description.
33
- attr_accessor :description
34
-
35
- # Attribute mapping from ruby-style variable name to JSON key.
36
- def self.attribute_map
37
- {
38
- :'pulp_href' => :'pulp_href',
39
- :'pulp_created' => :'pulp_created',
40
- :'versions_href' => :'versions_href',
41
- :'latest_version_href' => :'latest_version_href',
42
- :'name' => :'name',
43
- :'plugin_managed' => :'plugin_managed',
44
- :'description' => :'description'
45
- }
46
- end
47
-
48
- # Attribute type mapping.
49
- def self.openapi_types
50
- {
51
- :'pulp_href' => :'String',
52
- :'pulp_created' => :'DateTime',
53
- :'versions_href' => :'String',
54
- :'latest_version_href' => :'String',
55
- :'name' => :'String',
56
- :'plugin_managed' => :'Boolean',
57
- :'description' => :'String'
58
- }
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::Repository` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::Repository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
- end
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:'pulp_href')
77
- self.pulp_href = attributes[:'pulp_href']
78
- end
79
-
80
- if attributes.key?(:'pulp_created')
81
- self.pulp_created = attributes[:'pulp_created']
82
- end
83
-
84
- if attributes.key?(:'versions_href')
85
- self.versions_href = attributes[:'versions_href']
86
- end
87
-
88
- if attributes.key?(:'latest_version_href')
89
- self.latest_version_href = attributes[:'latest_version_href']
90
- end
91
-
92
- if attributes.key?(:'name')
93
- self.name = attributes[:'name']
94
- end
95
-
96
- if attributes.key?(:'plugin_managed')
97
- self.plugin_managed = attributes[:'plugin_managed']
98
- end
99
-
100
- if attributes.key?(:'description')
101
- self.description = attributes[:'description']
102
- end
103
- end
104
-
105
- # Show invalid properties with the reasons. Usually used together with valid?
106
- # @return Array for valid properties with the reasons
107
- def list_invalid_properties
108
- invalid_properties = Array.new
109
- if @name.nil?
110
- invalid_properties.push('invalid value for "name", name cannot be nil.')
111
- end
112
-
113
- if @name.to_s.length < 1
114
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
115
- end
116
-
117
- if !@description.nil? && @description.to_s.length < 1
118
- invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
119
- end
120
-
121
- invalid_properties
122
- end
123
-
124
- # Check to see if the all the properties in the model are valid
125
- # @return true if the model is valid
126
- def valid?
127
- return false if @name.nil?
128
- return false if @name.to_s.length < 1
129
- return false if !@description.nil? && @description.to_s.length < 1
130
- true
131
- end
132
-
133
- # Custom attribute writer method with validation
134
- # @param [Object] name Value to be assigned
135
- def name=(name)
136
- if name.nil?
137
- fail ArgumentError, 'name cannot be nil'
138
- end
139
-
140
- if name.to_s.length < 1
141
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
142
- end
143
-
144
- @name = name
145
- end
146
-
147
- # Custom attribute writer method with validation
148
- # @param [Object] description Value to be assigned
149
- def description=(description)
150
- if !description.nil? && description.to_s.length < 1
151
- fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
152
- end
153
-
154
- @description = description
155
- end
156
-
157
- # Checks equality by comparing each attribute.
158
- # @param [Object] Object to be compared
159
- def ==(o)
160
- return true if self.equal?(o)
161
- self.class == o.class &&
162
- pulp_href == o.pulp_href &&
163
- pulp_created == o.pulp_created &&
164
- versions_href == o.versions_href &&
165
- latest_version_href == o.latest_version_href &&
166
- name == o.name &&
167
- plugin_managed == o.plugin_managed &&
168
- description == o.description
169
- end
170
-
171
- # @see the `==` method
172
- # @param [Object] Object to be compared
173
- def eql?(o)
174
- self == o
175
- end
176
-
177
- # Calculates hash code according to all attributes.
178
- # @return [Integer] Hash code
179
- def hash
180
- [pulp_href, pulp_created, versions_href, latest_version_href, name, plugin_managed, description].hash
181
- end
182
-
183
- # Builds the object from hash
184
- # @param [Hash] attributes Model attributes in the form of hash
185
- # @return [Object] Returns the model itself
186
- def self.build_from_hash(attributes)
187
- new.build_from_hash(attributes)
188
- end
189
-
190
- # Builds the object from hash
191
- # @param [Hash] attributes Model attributes in the form of hash
192
- # @return [Object] Returns the model itself
193
- def build_from_hash(attributes)
194
- return nil unless attributes.is_a?(Hash)
195
- self.class.openapi_types.each_pair do |key, type|
196
- if type =~ /\AArray<(.*)>/i
197
- # check to ensure the input is an array given that the attribute
198
- # is documented as an array but the input is not
199
- if attributes[self.class.attribute_map[key]].is_a?(Array)
200
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
201
- end
202
- elsif !attributes[self.class.attribute_map[key]].nil?
203
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
204
- end # or else data not found in attributes(hash), not an issue as the data can be optional
205
- end
206
-
207
- self
208
- end
209
-
210
- # Deserializes the data based on type
211
- # @param string type Data type
212
- # @param string value Value to be deserialized
213
- # @return [Object] Deserialized data
214
- def _deserialize(type, value)
215
- case type.to_sym
216
- when :DateTime
217
- DateTime.parse(value)
218
- when :Date
219
- Date.parse(value)
220
- when :String
221
- value.to_s
222
- when :Integer
223
- value.to_i
224
- when :Float
225
- value.to_f
226
- when :Boolean
227
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
228
- true
229
- else
230
- false
231
- end
232
- when :Object
233
- # generic object (usually a Hash), return directly
234
- value
235
- when /\AArray<(?<inner_type>.+)>\z/
236
- inner_type = Regexp.last_match[:inner_type]
237
- value.map { |v| _deserialize(inner_type, v) }
238
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
239
- k_type = Regexp.last_match[:k_type]
240
- v_type = Regexp.last_match[:v_type]
241
- {}.tap do |hash|
242
- value.each do |k, v|
243
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
244
- end
245
- end
246
- else # model
247
- PulpcoreClient.const_get(type).build_from_hash(value)
248
- end
249
- end
250
-
251
- # Returns the string representation of the object
252
- # @return [String] String presentation of the object
253
- def to_s
254
- to_hash.to_s
255
- end
256
-
257
- # to_body is an alias to to_hash (backward compatibility)
258
- # @return [Hash] Returns the object in the form of hash
259
- def to_body
260
- to_hash
261
- end
262
-
263
- # Returns the object in the form of hash
264
- # @return [Hash] Returns the object in the form of hash
265
- def to_hash
266
- hash = {}
267
- self.class.attribute_map.each_pair do |attr, param|
268
- value = self.send(attr)
269
- next if value.nil?
270
- hash[param] = _to_hash(value)
271
- end
272
- hash
273
- end
274
-
275
- # Outputs non-array value in the form of hash
276
- # For object, use to_hash. Otherwise, just return the value
277
- # @param [Object] value Any valid value
278
- # @return [Hash] Returns the value in the form of hash
279
- def _to_hash(value)
280
- if value.is_a?(Array)
281
- value.compact.map { |v| _to_hash(v) }
282
- elsif value.is_a?(Hash)
283
- {}.tap do |hash|
284
- value.each { |k, v| hash[k] = _to_hash(v) }
285
- end
286
- elsif value.respond_to? :to_hash
287
- value.to_hash
288
- else
289
- value
290
- end
291
- end
292
- end
293
- end