pulp_maven_client 0.8.2 → 0.8.3
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 +10 -6
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentArtifactApi.md +111 -61
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsMavenApi.md +265 -130
- data/docs/MavenMavenArtifact.md +12 -11
- data/docs/MavenMavenArtifactResponse.md +24 -23
- data/docs/MavenMavenDistribution.md +20 -19
- data/docs/MavenMavenDistributionResponse.md +32 -31
- data/docs/MavenMavenRemote.md +48 -47
- data/docs/MavenMavenRemoteResponse.md +48 -47
- data/docs/MavenMavenRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/MavenMavenRepository.md +16 -15
- data/docs/MavenMavenRepositoryResponse.md +28 -27
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedmavenMavenArtifactResponseList.md +14 -13
- data/docs/PaginatedmavenMavenDistributionResponseList.md +14 -13
- data/docs/PaginatedmavenMavenRemoteResponseList.md +14 -13
- data/docs/PaginatedmavenMavenRepositoryResponseList.md +14 -13
- data/docs/PatchedmavenMavenDistribution.md +20 -19
- data/docs/PatchedmavenMavenRemote.md +48 -47
- data/docs/PatchedmavenMavenRepository.md +16 -15
- data/docs/PolicyEnum.md +4 -5
- data/docs/PulpMavenApi.md +60 -25
- data/docs/RemotesMavenApi.md +269 -132
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesMavenApi.md +296 -144
- data/docs/RepositoriesMavenVersionsApi.md +152 -82
- data/docs/RepositoryAddCachedContent.md +8 -7
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_maven_client/api/content_artifact_api.rb +20 -14
- data/lib/pulp_maven_client/api/distributions_maven_api.rb +61 -38
- data/lib/pulp_maven_client/api/pulp_maven_api.rb +9 -7
- data/lib/pulp_maven_client/api/remotes_maven_api.rb +76 -50
- data/lib/pulp_maven_client/api/repositories_maven_api.rb +70 -43
- data/lib/pulp_maven_client/api/repositories_maven_versions_api.rb +40 -30
- data/lib/pulp_maven_client/api_client.rb +137 -102
- data/lib/pulp_maven_client/api_error.rb +2 -1
- data/lib/pulp_maven_client/configuration.rb +162 -21
- data/lib/pulp_maven_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_maven_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_maven_client/models/maven_maven_artifact.rb +34 -22
- data/lib/pulp_maven_client/models/maven_maven_artifact_response.rb +34 -24
- data/lib/pulp_maven_client/models/maven_maven_distribution.rb +34 -22
- data/lib/pulp_maven_client/models/maven_maven_distribution_response.rb +36 -24
- data/lib/pulp_maven_client/models/maven_maven_remote.rb +57 -38
- data/lib/pulp_maven_client/models/maven_maven_remote_response.rb +60 -41
- data/lib/pulp_maven_client/models/{maven_maven_remote_response_hidden_fields.rb → maven_maven_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_maven_client/models/maven_maven_repository.rb +32 -37
- data/lib/pulp_maven_client/models/maven_maven_repository_response.rb +34 -39
- data/lib/pulp_maven_client/models/paginated_repository_version_response_list.rb +34 -24
- data/lib/pulp_maven_client/models/paginatedmaven_maven_artifact_response_list.rb +34 -24
- data/lib/pulp_maven_client/models/paginatedmaven_maven_distribution_response_list.rb +34 -24
- data/lib/pulp_maven_client/models/paginatedmaven_maven_remote_response_list.rb +34 -24
- data/lib/pulp_maven_client/models/paginatedmaven_maven_repository_response_list.rb +34 -24
- data/lib/pulp_maven_client/models/patchedmaven_maven_distribution.rb +40 -24
- data/lib/pulp_maven_client/models/patchedmaven_maven_remote.rb +63 -40
- data/lib/pulp_maven_client/models/patchedmaven_maven_repository.rb +35 -38
- data/lib/pulp_maven_client/models/policy_enum.rb +8 -5
- data/lib/pulp_maven_client/models/repair.rb +30 -22
- data/lib/pulp_maven_client/models/repository_add_cached_content.rb +30 -22
- data/lib/pulp_maven_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_maven_client/models/set_label.rb +34 -22
- data/lib/pulp_maven_client/models/set_label_response.rb +34 -22
- data/lib/pulp_maven_client/models/unset_label.rb +32 -22
- data/lib/pulp_maven_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_maven_client/version.rb +2 -2
- data/lib/pulp_maven_client.rb +2 -2
- data/pulp_maven_client.gemspec +9 -6
- data/spec/api/content_artifact_api_spec.rb +4 -4
- data/spec/api/distributions_maven_api_spec.rb +9 -9
- data/spec/api/pulp_maven_api_spec.rb +3 -3
- data/spec/api/remotes_maven_api_spec.rb +16 -15
- data/spec/api/repositories_maven_api_spec.rb +10 -10
- data/spec/api/repositories_maven_versions_api_spec.rb +12 -11
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/maven_maven_artifact_response_spec.rb +15 -20
- data/spec/models/maven_maven_artifact_spec.rb +9 -14
- data/spec/models/maven_maven_distribution_response_spec.rb +19 -24
- data/spec/models/maven_maven_distribution_spec.rb +13 -18
- data/spec/models/{maven_maven_remote_response_hidden_fields_spec.rb → maven_maven_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/maven_maven_remote_response_spec.rb +27 -32
- data/spec/models/maven_maven_remote_spec.rb +27 -32
- data/spec/models/maven_maven_repository_response_spec.rb +17 -22
- data/spec/models/maven_maven_repository_spec.rb +11 -16
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedmaven_maven_artifact_response_list_spec.rb +10 -15
- data/spec/models/paginatedmaven_maven_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedmaven_maven_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedmaven_maven_repository_response_list_spec.rb +10 -15
- data/spec/models/patchedmaven_maven_distribution_spec.rb +13 -18
- data/spec/models/patchedmaven_maven_remote_spec.rb +27 -32
- data/spec/models/patchedmaven_maven_repository_spec.rb +11 -16
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_cached_content_spec.rb +7 -12
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +67 -43
- data/docs/MavenMavenRemoteResponseHiddenFields.md +0 -19
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpMavenClient
|
16
17
|
# Serializer for Maven Repositories.
|
@@ -40,6 +41,11 @@ module PulpMavenClient
|
|
40
41
|
}
|
41
42
|
end
|
42
43
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
45
|
+
def self.acceptable_attributes
|
46
|
+
attribute_map.values
|
47
|
+
end
|
48
|
+
|
43
49
|
# Attribute type mapping.
|
44
50
|
def self.openapi_types
|
45
51
|
{
|
@@ -83,6 +89,8 @@ module PulpMavenClient
|
|
83
89
|
|
84
90
|
if attributes.key?(:'name')
|
85
91
|
self.name = attributes[:'name']
|
92
|
+
else
|
93
|
+
self.name = nil
|
86
94
|
end
|
87
95
|
|
88
96
|
if attributes.key?(:'description')
|
@@ -101,6 +109,7 @@ module PulpMavenClient
|
|
101
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
102
110
|
# @return Array for valid properties with the reasons
|
103
111
|
def list_invalid_properties
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
104
113
|
invalid_properties = Array.new
|
105
114
|
if @name.nil?
|
106
115
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -114,20 +123,16 @@ module PulpMavenClient
|
|
114
123
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
115
124
|
end
|
116
125
|
|
117
|
-
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
118
|
-
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
119
|
-
end
|
120
|
-
|
121
126
|
invalid_properties
|
122
127
|
end
|
123
128
|
|
124
129
|
# Check to see if the all the properties in the model are valid
|
125
130
|
# @return true if the model is valid
|
126
131
|
def valid?
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
127
133
|
return false if @name.nil?
|
128
134
|
return false if @name.to_s.length < 1
|
129
135
|
return false if !@description.nil? && @description.to_s.length < 1
|
130
|
-
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
131
136
|
true
|
132
137
|
end
|
133
138
|
|
@@ -155,16 +160,6 @@ module PulpMavenClient
|
|
155
160
|
@description = description
|
156
161
|
end
|
157
162
|
|
158
|
-
# Custom attribute writer method with validation
|
159
|
-
# @param [Object] retain_repo_versions Value to be assigned
|
160
|
-
def retain_repo_versions=(retain_repo_versions)
|
161
|
-
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
162
|
-
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
163
|
-
end
|
164
|
-
|
165
|
-
@retain_repo_versions = retain_repo_versions
|
166
|
-
end
|
167
|
-
|
168
163
|
# Checks equality by comparing each attribute.
|
169
164
|
# @param [Object] Object to be compared
|
170
165
|
def ==(o)
|
@@ -193,37 +188,33 @@ module PulpMavenClient
|
|
193
188
|
# @param [Hash] attributes Model attributes in the form of hash
|
194
189
|
# @return [Object] Returns the model itself
|
195
190
|
def self.build_from_hash(attributes)
|
196
|
-
new.build_from_hash(attributes)
|
197
|
-
end
|
198
|
-
|
199
|
-
# Builds the object from hash
|
200
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
201
|
-
# @return [Object] Returns the model itself
|
202
|
-
def build_from_hash(attributes)
|
203
191
|
return nil unless attributes.is_a?(Hash)
|
204
|
-
|
205
|
-
|
192
|
+
attributes = attributes.transform_keys(&:to_sym)
|
193
|
+
transformed_hash = {}
|
194
|
+
openapi_types.each_pair do |key, type|
|
195
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
196
|
+
transformed_hash["#{key}"] = nil
|
197
|
+
elsif type =~ /\AArray<(.*)>/i
|
206
198
|
# check to ensure the input is an array given that the attribute
|
207
199
|
# is documented as an array but the input is not
|
208
|
-
if attributes[
|
209
|
-
|
200
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
201
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
210
202
|
end
|
211
|
-
elsif !attributes[
|
212
|
-
|
213
|
-
end
|
203
|
+
elsif !attributes[attribute_map[key]].nil?
|
204
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
205
|
+
end
|
214
206
|
end
|
215
|
-
|
216
|
-
self
|
207
|
+
new(transformed_hash)
|
217
208
|
end
|
218
209
|
|
219
210
|
# Deserializes the data based on type
|
220
211
|
# @param string type Data type
|
221
212
|
# @param string value Value to be deserialized
|
222
213
|
# @return [Object] Deserialized data
|
223
|
-
def _deserialize(type, value)
|
214
|
+
def self._deserialize(type, value)
|
224
215
|
case type.to_sym
|
225
|
-
when :
|
226
|
-
|
216
|
+
when :Time
|
217
|
+
Time.parse(value)
|
227
218
|
when :Date
|
228
219
|
Date.parse(value)
|
229
220
|
when :String
|
@@ -253,7 +244,9 @@ module PulpMavenClient
|
|
253
244
|
end
|
254
245
|
end
|
255
246
|
else # model
|
256
|
-
|
247
|
+
# models (e.g. Pet) or oneOf
|
248
|
+
klass = PulpMavenClient.const_get(type)
|
249
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
257
250
|
end
|
258
251
|
end
|
259
252
|
|
@@ -279,7 +272,7 @@ module PulpMavenClient
|
|
279
272
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
280
273
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
281
274
|
end
|
282
|
-
|
275
|
+
|
283
276
|
hash[param] = _to_hash(value)
|
284
277
|
end
|
285
278
|
hash
|
@@ -302,5 +295,7 @@ module PulpMavenClient
|
|
302
295
|
value
|
303
296
|
end
|
304
297
|
end
|
298
|
+
|
305
299
|
end
|
300
|
+
|
306
301
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpMavenClient
|
16
17
|
# Serializer for Maven Repositories.
|
@@ -61,13 +62,18 @@ module PulpMavenClient
|
|
61
62
|
}
|
62
63
|
end
|
63
64
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
66
|
+
def self.acceptable_attributes
|
67
|
+
attribute_map.values
|
68
|
+
end
|
69
|
+
|
64
70
|
# Attribute type mapping.
|
65
71
|
def self.openapi_types
|
66
72
|
{
|
67
73
|
:'pulp_href' => :'String',
|
68
74
|
:'prn' => :'String',
|
69
|
-
:'pulp_created' => :'
|
70
|
-
:'pulp_last_updated' => :'
|
75
|
+
:'pulp_created' => :'Time',
|
76
|
+
:'pulp_last_updated' => :'Time',
|
71
77
|
:'versions_href' => :'String',
|
72
78
|
:'pulp_labels' => :'Hash<String, String>',
|
73
79
|
:'latest_version_href' => :'String',
|
@@ -134,6 +140,8 @@ module PulpMavenClient
|
|
134
140
|
|
135
141
|
if attributes.key?(:'name')
|
136
142
|
self.name = attributes[:'name']
|
143
|
+
else
|
144
|
+
self.name = nil
|
137
145
|
end
|
138
146
|
|
139
147
|
if attributes.key?(:'description')
|
@@ -152,36 +160,23 @@ module PulpMavenClient
|
|
152
160
|
# Show invalid properties with the reasons. Usually used together with valid?
|
153
161
|
# @return Array for valid properties with the reasons
|
154
162
|
def list_invalid_properties
|
163
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
155
164
|
invalid_properties = Array.new
|
156
165
|
if @name.nil?
|
157
166
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
158
167
|
end
|
159
168
|
|
160
|
-
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
161
|
-
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
162
|
-
end
|
163
|
-
|
164
169
|
invalid_properties
|
165
170
|
end
|
166
171
|
|
167
172
|
# Check to see if the all the properties in the model are valid
|
168
173
|
# @return true if the model is valid
|
169
174
|
def valid?
|
175
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
170
176
|
return false if @name.nil?
|
171
|
-
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
172
177
|
true
|
173
178
|
end
|
174
179
|
|
175
|
-
# Custom attribute writer method with validation
|
176
|
-
# @param [Object] retain_repo_versions Value to be assigned
|
177
|
-
def retain_repo_versions=(retain_repo_versions)
|
178
|
-
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
179
|
-
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
180
|
-
end
|
181
|
-
|
182
|
-
@retain_repo_versions = retain_repo_versions
|
183
|
-
end
|
184
|
-
|
185
180
|
# Checks equality by comparing each attribute.
|
186
181
|
# @param [Object] Object to be compared
|
187
182
|
def ==(o)
|
@@ -216,37 +211,33 @@ module PulpMavenClient
|
|
216
211
|
# @param [Hash] attributes Model attributes in the form of hash
|
217
212
|
# @return [Object] Returns the model itself
|
218
213
|
def self.build_from_hash(attributes)
|
219
|
-
new.build_from_hash(attributes)
|
220
|
-
end
|
221
|
-
|
222
|
-
# Builds the object from hash
|
223
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
-
# @return [Object] Returns the model itself
|
225
|
-
def build_from_hash(attributes)
|
226
214
|
return nil unless attributes.is_a?(Hash)
|
227
|
-
|
228
|
-
|
215
|
+
attributes = attributes.transform_keys(&:to_sym)
|
216
|
+
transformed_hash = {}
|
217
|
+
openapi_types.each_pair do |key, type|
|
218
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
219
|
+
transformed_hash["#{key}"] = nil
|
220
|
+
elsif type =~ /\AArray<(.*)>/i
|
229
221
|
# check to ensure the input is an array given that the attribute
|
230
222
|
# is documented as an array but the input is not
|
231
|
-
if attributes[
|
232
|
-
|
223
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
224
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
233
225
|
end
|
234
|
-
elsif !attributes[
|
235
|
-
|
236
|
-
end
|
226
|
+
elsif !attributes[attribute_map[key]].nil?
|
227
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
228
|
+
end
|
237
229
|
end
|
238
|
-
|
239
|
-
self
|
230
|
+
new(transformed_hash)
|
240
231
|
end
|
241
232
|
|
242
233
|
# Deserializes the data based on type
|
243
234
|
# @param string type Data type
|
244
235
|
# @param string value Value to be deserialized
|
245
236
|
# @return [Object] Deserialized data
|
246
|
-
def _deserialize(type, value)
|
237
|
+
def self._deserialize(type, value)
|
247
238
|
case type.to_sym
|
248
|
-
when :
|
249
|
-
|
239
|
+
when :Time
|
240
|
+
Time.parse(value)
|
250
241
|
when :Date
|
251
242
|
Date.parse(value)
|
252
243
|
when :String
|
@@ -276,7 +267,9 @@ module PulpMavenClient
|
|
276
267
|
end
|
277
268
|
end
|
278
269
|
else # model
|
279
|
-
|
270
|
+
# models (e.g. Pet) or oneOf
|
271
|
+
klass = PulpMavenClient.const_get(type)
|
272
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
280
273
|
end
|
281
274
|
end
|
282
275
|
|
@@ -302,7 +295,7 @@ module PulpMavenClient
|
|
302
295
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
303
296
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
304
297
|
end
|
305
|
-
|
298
|
+
|
306
299
|
hash[param] = _to_hash(value)
|
307
300
|
end
|
308
301
|
hash
|
@@ -325,5 +318,7 @@ module PulpMavenClient
|
|
325
318
|
value
|
326
319
|
end
|
327
320
|
end
|
321
|
+
|
328
322
|
end
|
323
|
+
|
329
324
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpMavenClient
|
16
17
|
class PaginatedRepositoryVersionResponseList
|
@@ -32,6 +33,11 @@ module PulpMavenClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -45,8 +51,6 @@ module PulpMavenClient
|
|
45
51
|
# List of attributes with nullable: true
|
46
52
|
def self.openapi_nullable
|
47
53
|
Set.new([
|
48
|
-
:'_next',
|
49
|
-
:'previous',
|
50
54
|
])
|
51
55
|
end
|
52
56
|
|
@@ -67,6 +71,8 @@ module PulpMavenClient
|
|
67
71
|
|
68
72
|
if attributes.key?(:'count')
|
69
73
|
self.count = attributes[:'count']
|
74
|
+
else
|
75
|
+
self.count = nil
|
70
76
|
end
|
71
77
|
|
72
78
|
if attributes.key?(:'_next')
|
@@ -81,12 +87,15 @@ module PulpMavenClient
|
|
81
87
|
if (value = attributes[:'results']).is_a?(Array)
|
82
88
|
self.results = value
|
83
89
|
end
|
90
|
+
else
|
91
|
+
self.results = nil
|
84
92
|
end
|
85
93
|
end
|
86
94
|
|
87
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
96
|
# @return Array for valid properties with the reasons
|
89
97
|
def list_invalid_properties
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
99
|
invalid_properties = Array.new
|
91
100
|
if @count.nil?
|
92
101
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +111,7 @@ module PulpMavenClient
|
|
102
111
|
# Check to see if the all the properties in the model are valid
|
103
112
|
# @return true if the model is valid
|
104
113
|
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
115
|
return false if @count.nil?
|
106
116
|
return false if @results.nil?
|
107
117
|
true
|
@@ -134,37 +144,33 @@ module PulpMavenClient
|
|
134
144
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
145
|
# @return [Object] Returns the model itself
|
136
146
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
147
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
|
+
transformed_hash = {}
|
150
|
+
openapi_types.each_pair do |key, type|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = nil
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
154
|
# check to ensure the input is an array given that the attribute
|
148
155
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
158
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
161
|
+
end
|
155
162
|
end
|
156
|
-
|
157
|
-
self
|
163
|
+
new(transformed_hash)
|
158
164
|
end
|
159
165
|
|
160
166
|
# Deserializes the data based on type
|
161
167
|
# @param string type Data type
|
162
168
|
# @param string value Value to be deserialized
|
163
169
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
170
|
+
def self._deserialize(type, value)
|
165
171
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
172
|
+
when :Time
|
173
|
+
Time.parse(value)
|
168
174
|
when :Date
|
169
175
|
Date.parse(value)
|
170
176
|
when :String
|
@@ -194,7 +200,9 @@ module PulpMavenClient
|
|
194
200
|
end
|
195
201
|
end
|
196
202
|
else # model
|
197
|
-
|
203
|
+
# models (e.g. Pet) or oneOf
|
204
|
+
klass = PulpMavenClient.const_get(type)
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
206
|
end
|
199
207
|
end
|
200
208
|
|
@@ -220,7 +228,7 @@ module PulpMavenClient
|
|
220
228
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
229
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
230
|
end
|
223
|
-
|
231
|
+
|
224
232
|
hash[param] = _to_hash(value)
|
225
233
|
end
|
226
234
|
hash
|
@@ -243,5 +251,7 @@ module PulpMavenClient
|
|
243
251
|
value
|
244
252
|
end
|
245
253
|
end
|
254
|
+
|
246
255
|
end
|
256
|
+
|
247
257
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpMavenClient
|
16
17
|
class PaginatedmavenMavenArtifactResponseList
|
@@ -32,6 +33,11 @@ module PulpMavenClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -45,8 +51,6 @@ module PulpMavenClient
|
|
45
51
|
# List of attributes with nullable: true
|
46
52
|
def self.openapi_nullable
|
47
53
|
Set.new([
|
48
|
-
:'_next',
|
49
|
-
:'previous',
|
50
54
|
])
|
51
55
|
end
|
52
56
|
|
@@ -67,6 +71,8 @@ module PulpMavenClient
|
|
67
71
|
|
68
72
|
if attributes.key?(:'count')
|
69
73
|
self.count = attributes[:'count']
|
74
|
+
else
|
75
|
+
self.count = nil
|
70
76
|
end
|
71
77
|
|
72
78
|
if attributes.key?(:'_next')
|
@@ -81,12 +87,15 @@ module PulpMavenClient
|
|
81
87
|
if (value = attributes[:'results']).is_a?(Array)
|
82
88
|
self.results = value
|
83
89
|
end
|
90
|
+
else
|
91
|
+
self.results = nil
|
84
92
|
end
|
85
93
|
end
|
86
94
|
|
87
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
96
|
# @return Array for valid properties with the reasons
|
89
97
|
def list_invalid_properties
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
99
|
invalid_properties = Array.new
|
91
100
|
if @count.nil?
|
92
101
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +111,7 @@ module PulpMavenClient
|
|
102
111
|
# Check to see if the all the properties in the model are valid
|
103
112
|
# @return true if the model is valid
|
104
113
|
def valid?
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
115
|
return false if @count.nil?
|
106
116
|
return false if @results.nil?
|
107
117
|
true
|
@@ -134,37 +144,33 @@ module PulpMavenClient
|
|
134
144
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
145
|
# @return [Object] Returns the model itself
|
136
146
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
147
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
|
+
transformed_hash = {}
|
150
|
+
openapi_types.each_pair do |key, type|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = nil
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
154
|
# check to ensure the input is an array given that the attribute
|
148
155
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
158
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
161
|
+
end
|
155
162
|
end
|
156
|
-
|
157
|
-
self
|
163
|
+
new(transformed_hash)
|
158
164
|
end
|
159
165
|
|
160
166
|
# Deserializes the data based on type
|
161
167
|
# @param string type Data type
|
162
168
|
# @param string value Value to be deserialized
|
163
169
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
170
|
+
def self._deserialize(type, value)
|
165
171
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
172
|
+
when :Time
|
173
|
+
Time.parse(value)
|
168
174
|
when :Date
|
169
175
|
Date.parse(value)
|
170
176
|
when :String
|
@@ -194,7 +200,9 @@ module PulpMavenClient
|
|
194
200
|
end
|
195
201
|
end
|
196
202
|
else # model
|
197
|
-
|
203
|
+
# models (e.g. Pet) or oneOf
|
204
|
+
klass = PulpMavenClient.const_get(type)
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
206
|
end
|
199
207
|
end
|
200
208
|
|
@@ -220,7 +228,7 @@ module PulpMavenClient
|
|
220
228
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
229
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
230
|
end
|
223
|
-
|
231
|
+
|
224
232
|
hash[param] = _to_hash(value)
|
225
233
|
end
|
226
234
|
hash
|
@@ -243,5 +251,7 @@ module PulpMavenClient
|
|
243
251
|
value
|
244
252
|
end
|
245
253
|
end
|
254
|
+
|
246
255
|
end
|
256
|
+
|
247
257
|
end
|