pulp_maven_client 0.8.1 → 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 +11 -7
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentArtifactApi.md +116 -64
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsMavenApi.md +267 -130
- data/docs/MavenMavenArtifact.md +12 -11
- data/docs/MavenMavenArtifactResponse.md +24 -21
- data/docs/MavenMavenDistribution.md +20 -19
- data/docs/MavenMavenDistributionResponse.md +32 -27
- data/docs/MavenMavenRemote.md +48 -47
- data/docs/MavenMavenRemoteResponse.md +48 -45
- data/docs/MavenMavenRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/MavenMavenRepository.md +16 -15
- data/docs/MavenMavenRepositoryResponse.md +28 -25
- 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 +61 -26
- data/docs/RemotesMavenApi.md +271 -132
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesMavenApi.md +300 -146
- data/docs/RepositoriesMavenVersionsApi.md +155 -83
- data/docs/RepositoryAddCachedContent.md +8 -7
- data/docs/RepositoryVersionResponse.md +22 -19
- 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 +31 -22
- data/lib/pulp_maven_client/api/distributions_maven_api.rb +66 -40
- data/lib/pulp_maven_client/api/pulp_maven_api.rb +9 -7
- data/lib/pulp_maven_client/api/remotes_maven_api.rb +81 -52
- data/lib/pulp_maven_client/api/repositories_maven_api.rb +79 -49
- data/lib/pulp_maven_client/api/repositories_maven_versions_api.rb +50 -37
- 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 +45 -25
- data/lib/pulp_maven_client/models/maven_maven_distribution.rb +34 -22
- data/lib/pulp_maven_client/models/maven_maven_distribution_response.rb +57 -25
- data/lib/pulp_maven_client/models/maven_maven_remote.rb +57 -38
- data/lib/pulp_maven_client/models/maven_maven_remote_response.rb +71 -42
- 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 +45 -40
- 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 +44 -26
- 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 +9 -8
- data/spec/api/distributions_maven_api_spec.rb +11 -10
- data/spec/api/pulp_maven_api_spec.rb +3 -3
- data/spec/api/remotes_maven_api_spec.rb +18 -16
- data/spec/api/repositories_maven_api_spec.rb +14 -13
- data/spec/api/repositories_maven_versions_api_spec.rb +16 -14
- 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 +20 -19
- data/spec/models/maven_maven_artifact_spec.rb +9 -14
- data/spec/models/maven_maven_distribution_response_spec.rb +29 -22
- 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 +32 -31
- data/spec/models/maven_maven_remote_spec.rb +27 -32
- data/spec/models/maven_maven_repository_response_spec.rb +22 -21
- 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 +19 -18
- 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 +78 -54
- 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 asynchronous operations.
|
@@ -25,6 +26,11 @@ module PulpMavenClient
|
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
28
34
|
# Attribute type mapping.
|
29
35
|
def self.openapi_types
|
30
36
|
{
|
@@ -55,12 +61,15 @@ module PulpMavenClient
|
|
55
61
|
|
56
62
|
if attributes.key?(:'task')
|
57
63
|
self.task = attributes[:'task']
|
64
|
+
else
|
65
|
+
self.task = nil
|
58
66
|
end
|
59
67
|
end
|
60
68
|
|
61
69
|
# Show invalid properties with the reasons. Usually used together with valid?
|
62
70
|
# @return Array for valid properties with the reasons
|
63
71
|
def list_invalid_properties
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
64
73
|
invalid_properties = Array.new
|
65
74
|
if @task.nil?
|
66
75
|
invalid_properties.push('invalid value for "task", task cannot be nil.')
|
@@ -72,6 +81,7 @@ module PulpMavenClient
|
|
72
81
|
# Check to see if the all the properties in the model are valid
|
73
82
|
# @return true if the model is valid
|
74
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
85
|
return false if @task.nil?
|
76
86
|
true
|
77
87
|
end
|
@@ -100,37 +110,33 @@ module PulpMavenClient
|
|
100
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
111
|
# @return [Object] Returns the model itself
|
102
112
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
113
|
return nil unless attributes.is_a?(Hash)
|
111
|
-
|
112
|
-
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
113
120
|
# check to ensure the input is an array given that the attribute
|
114
121
|
# is documented as an array but the input is not
|
115
|
-
if attributes[
|
116
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
117
124
|
end
|
118
|
-
elsif !attributes[
|
119
|
-
|
120
|
-
end
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
127
|
+
end
|
121
128
|
end
|
122
|
-
|
123
|
-
self
|
129
|
+
new(transformed_hash)
|
124
130
|
end
|
125
131
|
|
126
132
|
# Deserializes the data based on type
|
127
133
|
# @param string type Data type
|
128
134
|
# @param string value Value to be deserialized
|
129
135
|
# @return [Object] Deserialized data
|
130
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
131
137
|
case type.to_sym
|
132
|
-
when :
|
133
|
-
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
134
140
|
when :Date
|
135
141
|
Date.parse(value)
|
136
142
|
when :String
|
@@ -160,7 +166,9 @@ module PulpMavenClient
|
|
160
166
|
end
|
161
167
|
end
|
162
168
|
else # model
|
163
|
-
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = PulpMavenClient.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
164
172
|
end
|
165
173
|
end
|
166
174
|
|
@@ -186,7 +194,7 @@ module PulpMavenClient
|
|
186
194
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
195
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
196
|
end
|
189
|
-
|
197
|
+
|
190
198
|
hash[param] = _to_hash(value)
|
191
199
|
end
|
192
200
|
hash
|
@@ -209,5 +217,7 @@ module PulpMavenClient
|
|
209
217
|
value
|
210
218
|
end
|
211
219
|
end
|
220
|
+
|
212
221
|
end
|
222
|
+
|
213
223
|
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 the RepositoryVersion content summary
|
@@ -30,6 +31,11 @@ module PulpMavenClient
|
|
30
31
|
}
|
31
32
|
end
|
32
33
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
35
|
+
def self.acceptable_attributes
|
36
|
+
attribute_map.values
|
37
|
+
end
|
38
|
+
|
33
39
|
# Attribute type mapping.
|
34
40
|
def self.openapi_types
|
35
41
|
{
|
@@ -64,24 +70,31 @@ module PulpMavenClient
|
|
64
70
|
if (value = attributes[:'added']).is_a?(Hash)
|
65
71
|
self.added = value
|
66
72
|
end
|
73
|
+
else
|
74
|
+
self.added = nil
|
67
75
|
end
|
68
76
|
|
69
77
|
if attributes.key?(:'removed')
|
70
78
|
if (value = attributes[:'removed']).is_a?(Hash)
|
71
79
|
self.removed = value
|
72
80
|
end
|
81
|
+
else
|
82
|
+
self.removed = nil
|
73
83
|
end
|
74
84
|
|
75
85
|
if attributes.key?(:'present')
|
76
86
|
if (value = attributes[:'present']).is_a?(Hash)
|
77
87
|
self.present = value
|
78
88
|
end
|
89
|
+
else
|
90
|
+
self.present = nil
|
79
91
|
end
|
80
92
|
end
|
81
93
|
|
82
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
95
|
# @return Array for valid properties with the reasons
|
84
96
|
def list_invalid_properties
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
98
|
invalid_properties = Array.new
|
86
99
|
if @added.nil?
|
87
100
|
invalid_properties.push('invalid value for "added", added cannot be nil.')
|
@@ -101,6 +114,7 @@ module PulpMavenClient
|
|
101
114
|
# Check to see if the all the properties in the model are valid
|
102
115
|
# @return true if the model is valid
|
103
116
|
def valid?
|
117
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
104
118
|
return false if @added.nil?
|
105
119
|
return false if @removed.nil?
|
106
120
|
return false if @present.nil?
|
@@ -133,37 +147,33 @@ module PulpMavenClient
|
|
133
147
|
# @param [Hash] attributes Model attributes in the form of hash
|
134
148
|
# @return [Object] Returns the model itself
|
135
149
|
def self.build_from_hash(attributes)
|
136
|
-
new.build_from_hash(attributes)
|
137
|
-
end
|
138
|
-
|
139
|
-
# Builds the object from hash
|
140
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
-
# @return [Object] Returns the model itself
|
142
|
-
def build_from_hash(attributes)
|
143
150
|
return nil unless attributes.is_a?(Hash)
|
144
|
-
|
145
|
-
|
151
|
+
attributes = attributes.transform_keys(&:to_sym)
|
152
|
+
transformed_hash = {}
|
153
|
+
openapi_types.each_pair do |key, type|
|
154
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
155
|
+
transformed_hash["#{key}"] = nil
|
156
|
+
elsif type =~ /\AArray<(.*)>/i
|
146
157
|
# check to ensure the input is an array given that the attribute
|
147
158
|
# is documented as an array but the input is not
|
148
|
-
if attributes[
|
149
|
-
|
159
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
160
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
150
161
|
end
|
151
|
-
elsif !attributes[
|
152
|
-
|
153
|
-
end
|
162
|
+
elsif !attributes[attribute_map[key]].nil?
|
163
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
164
|
+
end
|
154
165
|
end
|
155
|
-
|
156
|
-
self
|
166
|
+
new(transformed_hash)
|
157
167
|
end
|
158
168
|
|
159
169
|
# Deserializes the data based on type
|
160
170
|
# @param string type Data type
|
161
171
|
# @param string value Value to be deserialized
|
162
172
|
# @return [Object] Deserialized data
|
163
|
-
def _deserialize(type, value)
|
173
|
+
def self._deserialize(type, value)
|
164
174
|
case type.to_sym
|
165
|
-
when :
|
166
|
-
|
175
|
+
when :Time
|
176
|
+
Time.parse(value)
|
167
177
|
when :Date
|
168
178
|
Date.parse(value)
|
169
179
|
when :String
|
@@ -193,7 +203,9 @@ module PulpMavenClient
|
|
193
203
|
end
|
194
204
|
end
|
195
205
|
else # model
|
196
|
-
|
206
|
+
# models (e.g. Pet) or oneOf
|
207
|
+
klass = PulpMavenClient.const_get(type)
|
208
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
197
209
|
end
|
198
210
|
end
|
199
211
|
|
@@ -219,7 +231,7 @@ module PulpMavenClient
|
|
219
231
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
220
232
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
221
233
|
end
|
222
|
-
|
234
|
+
|
223
235
|
hash[param] = _to_hash(value)
|
224
236
|
end
|
225
237
|
hash
|
@@ -242,5 +254,7 @@ module PulpMavenClient
|
|
242
254
|
value
|
243
255
|
end
|
244
256
|
end
|
257
|
+
|
245
258
|
end
|
259
|
+
|
246
260
|
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
|
# A Serializer for MavenArtifact.
|
@@ -33,6 +34,11 @@ module PulpMavenClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
@@ -69,16 +75,21 @@ module PulpMavenClient
|
|
69
75
|
|
70
76
|
if attributes.key?(:'artifact')
|
71
77
|
self.artifact = attributes[:'artifact']
|
78
|
+
else
|
79
|
+
self.artifact = nil
|
72
80
|
end
|
73
81
|
|
74
82
|
if attributes.key?(:'relative_path')
|
75
83
|
self.relative_path = attributes[:'relative_path']
|
84
|
+
else
|
85
|
+
self.relative_path = nil
|
76
86
|
end
|
77
87
|
end
|
78
88
|
|
79
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
80
90
|
# @return Array for valid properties with the reasons
|
81
91
|
def list_invalid_properties
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
82
93
|
invalid_properties = Array.new
|
83
94
|
if @artifact.nil?
|
84
95
|
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
@@ -98,6 +109,7 @@ module PulpMavenClient
|
|
98
109
|
# Check to see if the all the properties in the model are valid
|
99
110
|
# @return true if the model is valid
|
100
111
|
def valid?
|
112
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
101
113
|
return false if @artifact.nil?
|
102
114
|
return false if @relative_path.nil?
|
103
115
|
return false if @relative_path.to_s.length < 1
|
@@ -144,37 +156,33 @@ module PulpMavenClient
|
|
144
156
|
# @param [Hash] attributes Model attributes in the form of hash
|
145
157
|
# @return [Object] Returns the model itself
|
146
158
|
def self.build_from_hash(attributes)
|
147
|
-
new.build_from_hash(attributes)
|
148
|
-
end
|
149
|
-
|
150
|
-
# Builds the object from hash
|
151
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
-
# @return [Object] Returns the model itself
|
153
|
-
def build_from_hash(attributes)
|
154
159
|
return nil unless attributes.is_a?(Hash)
|
155
|
-
|
156
|
-
|
160
|
+
attributes = attributes.transform_keys(&:to_sym)
|
161
|
+
transformed_hash = {}
|
162
|
+
openapi_types.each_pair do |key, type|
|
163
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = nil
|
165
|
+
elsif type =~ /\AArray<(.*)>/i
|
157
166
|
# check to ensure the input is an array given that the attribute
|
158
167
|
# is documented as an array but the input is not
|
159
|
-
if attributes[
|
160
|
-
|
168
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
169
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
161
170
|
end
|
162
|
-
elsif !attributes[
|
163
|
-
|
164
|
-
end
|
171
|
+
elsif !attributes[attribute_map[key]].nil?
|
172
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
173
|
+
end
|
165
174
|
end
|
166
|
-
|
167
|
-
self
|
175
|
+
new(transformed_hash)
|
168
176
|
end
|
169
177
|
|
170
178
|
# Deserializes the data based on type
|
171
179
|
# @param string type Data type
|
172
180
|
# @param string value Value to be deserialized
|
173
181
|
# @return [Object] Deserialized data
|
174
|
-
def _deserialize(type, value)
|
182
|
+
def self._deserialize(type, value)
|
175
183
|
case type.to_sym
|
176
|
-
when :
|
177
|
-
|
184
|
+
when :Time
|
185
|
+
Time.parse(value)
|
178
186
|
when :Date
|
179
187
|
Date.parse(value)
|
180
188
|
when :String
|
@@ -204,7 +212,9 @@ module PulpMavenClient
|
|
204
212
|
end
|
205
213
|
end
|
206
214
|
else # model
|
207
|
-
|
215
|
+
# models (e.g. Pet) or oneOf
|
216
|
+
klass = PulpMavenClient.const_get(type)
|
217
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
218
|
end
|
209
219
|
end
|
210
220
|
|
@@ -230,7 +240,7 @@ module PulpMavenClient
|
|
230
240
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
241
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
242
|
end
|
233
|
-
|
243
|
+
|
234
244
|
hash[param] = _to_hash(value)
|
235
245
|
end
|
236
246
|
hash
|
@@ -253,5 +263,7 @@ module PulpMavenClient
|
|
253
263
|
value
|
254
264
|
end
|
255
265
|
end
|
266
|
+
|
256
267
|
end
|
268
|
+
|
257
269
|
end
|
@@ -6,17 +6,21 @@
|
|
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
|
# A Serializer for MavenArtifact.
|
17
18
|
class MavenMavenArtifactResponse
|
18
19
|
attr_accessor :pulp_href
|
19
20
|
|
21
|
+
# The Pulp Resource Name (PRN).
|
22
|
+
attr_accessor :prn
|
23
|
+
|
20
24
|
# Timestamp of creation.
|
21
25
|
attr_accessor :pulp_created
|
22
26
|
|
@@ -42,6 +46,7 @@ module PulpMavenClient
|
|
42
46
|
def self.attribute_map
|
43
47
|
{
|
44
48
|
:'pulp_href' => :'pulp_href',
|
49
|
+
:'prn' => :'prn',
|
45
50
|
:'pulp_created' => :'pulp_created',
|
46
51
|
:'pulp_last_updated' => :'pulp_last_updated',
|
47
52
|
:'artifact' => :'artifact',
|
@@ -52,12 +57,18 @@ module PulpMavenClient
|
|
52
57
|
}
|
53
58
|
end
|
54
59
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
55
65
|
# Attribute type mapping.
|
56
66
|
def self.openapi_types
|
57
67
|
{
|
58
68
|
:'pulp_href' => :'String',
|
59
|
-
:'
|
60
|
-
:'
|
69
|
+
:'prn' => :'String',
|
70
|
+
:'pulp_created' => :'Time',
|
71
|
+
:'pulp_last_updated' => :'Time',
|
61
72
|
:'artifact' => :'String',
|
62
73
|
:'group_id' => :'String',
|
63
74
|
:'artifact_id' => :'String',
|
@@ -91,6 +102,10 @@ module PulpMavenClient
|
|
91
102
|
self.pulp_href = attributes[:'pulp_href']
|
92
103
|
end
|
93
104
|
|
105
|
+
if attributes.key?(:'prn')
|
106
|
+
self.prn = attributes[:'prn']
|
107
|
+
end
|
108
|
+
|
94
109
|
if attributes.key?(:'pulp_created')
|
95
110
|
self.pulp_created = attributes[:'pulp_created']
|
96
111
|
end
|
@@ -101,6 +116,8 @@ module PulpMavenClient
|
|
101
116
|
|
102
117
|
if attributes.key?(:'artifact')
|
103
118
|
self.artifact = attributes[:'artifact']
|
119
|
+
else
|
120
|
+
self.artifact = nil
|
104
121
|
end
|
105
122
|
|
106
123
|
if attributes.key?(:'group_id')
|
@@ -123,6 +140,7 @@ module PulpMavenClient
|
|
123
140
|
# Show invalid properties with the reasons. Usually used together with valid?
|
124
141
|
# @return Array for valid properties with the reasons
|
125
142
|
def list_invalid_properties
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
126
144
|
invalid_properties = Array.new
|
127
145
|
if @artifact.nil?
|
128
146
|
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
@@ -134,6 +152,7 @@ module PulpMavenClient
|
|
134
152
|
# Check to see if the all the properties in the model are valid
|
135
153
|
# @return true if the model is valid
|
136
154
|
def valid?
|
155
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
137
156
|
return false if @artifact.nil?
|
138
157
|
true
|
139
158
|
end
|
@@ -144,6 +163,7 @@ module PulpMavenClient
|
|
144
163
|
return true if self.equal?(o)
|
145
164
|
self.class == o.class &&
|
146
165
|
pulp_href == o.pulp_href &&
|
166
|
+
prn == o.prn &&
|
147
167
|
pulp_created == o.pulp_created &&
|
148
168
|
pulp_last_updated == o.pulp_last_updated &&
|
149
169
|
artifact == o.artifact &&
|
@@ -162,44 +182,40 @@ module PulpMavenClient
|
|
162
182
|
# Calculates hash code according to all attributes.
|
163
183
|
# @return [Integer] Hash code
|
164
184
|
def hash
|
165
|
-
[pulp_href, pulp_created, pulp_last_updated, artifact, group_id, artifact_id, version, filename].hash
|
185
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, artifact, group_id, artifact_id, version, filename].hash
|
166
186
|
end
|
167
187
|
|
168
188
|
# Builds the object from hash
|
169
189
|
# @param [Hash] attributes Model attributes in the form of hash
|
170
190
|
# @return [Object] Returns the model itself
|
171
191
|
def self.build_from_hash(attributes)
|
172
|
-
new.build_from_hash(attributes)
|
173
|
-
end
|
174
|
-
|
175
|
-
# Builds the object from hash
|
176
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
177
|
-
# @return [Object] Returns the model itself
|
178
|
-
def build_from_hash(attributes)
|
179
192
|
return nil unless attributes.is_a?(Hash)
|
180
|
-
|
181
|
-
|
193
|
+
attributes = attributes.transform_keys(&:to_sym)
|
194
|
+
transformed_hash = {}
|
195
|
+
openapi_types.each_pair do |key, type|
|
196
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
197
|
+
transformed_hash["#{key}"] = nil
|
198
|
+
elsif type =~ /\AArray<(.*)>/i
|
182
199
|
# check to ensure the input is an array given that the attribute
|
183
200
|
# is documented as an array but the input is not
|
184
|
-
if attributes[
|
185
|
-
|
201
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
202
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
186
203
|
end
|
187
|
-
elsif !attributes[
|
188
|
-
|
189
|
-
end
|
204
|
+
elsif !attributes[attribute_map[key]].nil?
|
205
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
206
|
+
end
|
190
207
|
end
|
191
|
-
|
192
|
-
self
|
208
|
+
new(transformed_hash)
|
193
209
|
end
|
194
210
|
|
195
211
|
# Deserializes the data based on type
|
196
212
|
# @param string type Data type
|
197
213
|
# @param string value Value to be deserialized
|
198
214
|
# @return [Object] Deserialized data
|
199
|
-
def _deserialize(type, value)
|
215
|
+
def self._deserialize(type, value)
|
200
216
|
case type.to_sym
|
201
|
-
when :
|
202
|
-
|
217
|
+
when :Time
|
218
|
+
Time.parse(value)
|
203
219
|
when :Date
|
204
220
|
Date.parse(value)
|
205
221
|
when :String
|
@@ -229,7 +245,9 @@ module PulpMavenClient
|
|
229
245
|
end
|
230
246
|
end
|
231
247
|
else # model
|
232
|
-
|
248
|
+
# models (e.g. Pet) or oneOf
|
249
|
+
klass = PulpMavenClient.const_get(type)
|
250
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
233
251
|
end
|
234
252
|
end
|
235
253
|
|
@@ -255,7 +273,7 @@ module PulpMavenClient
|
|
255
273
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
256
274
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
257
275
|
end
|
258
|
-
|
276
|
+
|
259
277
|
hash[param] = _to_hash(value)
|
260
278
|
end
|
261
279
|
hash
|
@@ -278,5 +296,7 @@ module PulpMavenClient
|
|
278
296
|
value
|
279
297
|
end
|
280
298
|
end
|
299
|
+
|
281
300
|
end
|
301
|
+
|
282
302
|
end
|