pulp_gem_client 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -8
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContentGemApi.md +118 -66
  5. data/docs/ContentSummaryResponse.md +12 -11
  6. data/docs/DistributionsGemApi.md +388 -183
  7. data/docs/GemGemContentResponse.md +32 -29
  8. data/docs/GemGemDistribution.md +22 -21
  9. data/docs/GemGemDistributionResponse.md +34 -29
  10. data/docs/GemGemPublication.md +10 -9
  11. data/docs/GemGemPublicationResponse.md +18 -15
  12. data/docs/GemGemRemote.md +54 -53
  13. data/docs/GemGemRemoteResponse.md +54 -51
  14. data/docs/GemGemRemoteResponseHiddenFieldsInner.md +20 -0
  15. data/docs/GemGemRepository.md +16 -15
  16. data/docs/GemGemRepositoryResponse.md +28 -25
  17. data/docs/MyPermissionsResponse.md +8 -7
  18. data/docs/NestedRole.md +12 -11
  19. data/docs/NestedRoleResponse.md +12 -11
  20. data/docs/ObjectRolesResponse.md +8 -7
  21. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  22. data/docs/PaginatedgemGemContentResponseList.md +14 -13
  23. data/docs/PaginatedgemGemDistributionResponseList.md +14 -13
  24. data/docs/PaginatedgemGemPublicationResponseList.md +14 -13
  25. data/docs/PaginatedgemGemRemoteResponseList.md +14 -13
  26. data/docs/PaginatedgemGemRepositoryResponseList.md +14 -13
  27. data/docs/PatchedgemGemDistribution.md +22 -21
  28. data/docs/PatchedgemGemRemote.md +54 -53
  29. data/docs/PatchedgemGemRepository.md +16 -15
  30. data/docs/PolicyEnum.md +4 -5
  31. data/docs/PublicationsGemApi.md +271 -132
  32. data/docs/RemotesGemApi.md +392 -185
  33. data/docs/Repair.md +8 -7
  34. data/docs/RepositoriesGemApi.md +449 -210
  35. data/docs/RepositoriesGemVersionsApi.md +155 -83
  36. data/docs/RepositoryAddRemoveContent.md +12 -11
  37. data/docs/RepositorySyncURL.md +10 -9
  38. data/docs/RepositoryVersionResponse.md +22 -19
  39. data/docs/SetLabel.md +10 -9
  40. data/docs/SetLabelResponse.md +10 -9
  41. data/docs/UnsetLabel.md +8 -7
  42. data/docs/UnsetLabelResponse.md +10 -9
  43. data/lib/pulp_gem_client/api/content_gem_api.rb +31 -22
  44. data/lib/pulp_gem_client/api/distributions_gem_api.rb +94 -58
  45. data/lib/pulp_gem_client/api/publications_gem_api.rb +81 -58
  46. data/lib/pulp_gem_client/api/remotes_gem_api.rb +109 -70
  47. data/lib/pulp_gem_client/api/repositories_gem_api.rb +116 -72
  48. data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +50 -37
  49. data/lib/pulp_gem_client/api_client.rb +137 -102
  50. data/lib/pulp_gem_client/api_error.rb +2 -1
  51. data/lib/pulp_gem_client/configuration.rb +162 -21
  52. data/lib/pulp_gem_client/models/async_operation_response.rb +32 -22
  53. data/lib/pulp_gem_client/models/content_summary_response.rb +36 -22
  54. data/lib/pulp_gem_client/models/gem_gem_content_response.rb +45 -25
  55. data/lib/pulp_gem_client/models/gem_gem_distribution.rb +34 -22
  56. data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +57 -25
  57. data/lib/pulp_gem_client/models/gem_gem_publication.rb +30 -22
  58. data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +43 -25
  59. data/lib/pulp_gem_client/models/gem_gem_remote.rb +56 -22
  60. data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +70 -26
  61. data/lib/pulp_gem_client/models/{gem_gem_remote_response_hidden_fields.rb → gem_gem_remote_response_hidden_fields_inner.rb} +37 -25
  62. data/lib/pulp_gem_client/models/gem_gem_repository.rb +32 -22
  63. data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +45 -25
  64. data/lib/pulp_gem_client/models/my_permissions_response.rb +32 -22
  65. data/lib/pulp_gem_client/models/nested_role.rb +32 -22
  66. data/lib/pulp_gem_client/models/nested_role_response.rb +32 -22
  67. data/lib/pulp_gem_client/models/object_roles_response.rb +32 -22
  68. data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +34 -22
  69. data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +34 -22
  70. data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +34 -22
  71. data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +34 -22
  72. data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +34 -22
  73. data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +34 -22
  74. data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +40 -24
  75. data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +62 -24
  76. data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +35 -23
  77. data/lib/pulp_gem_client/models/policy_enum.rb +8 -4
  78. data/lib/pulp_gem_client/models/repair.rb +30 -22
  79. data/lib/pulp_gem_client/models/repository_add_remove_content.rb +31 -23
  80. data/lib/pulp_gem_client/models/repository_sync_url.rb +30 -22
  81. data/lib/pulp_gem_client/models/repository_version_response.rb +44 -26
  82. data/lib/pulp_gem_client/models/set_label.rb +34 -22
  83. data/lib/pulp_gem_client/models/set_label_response.rb +34 -22
  84. data/lib/pulp_gem_client/models/unset_label.rb +32 -22
  85. data/lib/pulp_gem_client/models/unset_label_response.rb +32 -22
  86. data/lib/pulp_gem_client/version.rb +2 -2
  87. data/lib/pulp_gem_client.rb +2 -3
  88. data/pulp_gem_client.gemspec +9 -6
  89. data/spec/api/content_gem_api_spec.rb +9 -8
  90. data/spec/api/distributions_gem_api_spec.rb +15 -14
  91. data/spec/api/publications_gem_api_spec.rb +22 -20
  92. data/spec/api/remotes_gem_api_spec.rb +22 -20
  93. data/spec/api/repositories_gem_api_spec.rb +19 -18
  94. data/spec/api/repositories_gem_versions_api_spec.rb +16 -14
  95. data/spec/models/async_operation_response_spec.rb +7 -12
  96. data/spec/models/content_summary_response_spec.rb +9 -14
  97. data/spec/models/gem_gem_content_response_spec.rb +24 -23
  98. data/spec/models/gem_gem_distribution_response_spec.rb +30 -23
  99. data/spec/models/gem_gem_distribution_spec.rb +14 -19
  100. data/spec/models/gem_gem_publication_response_spec.rb +17 -16
  101. data/spec/models/gem_gem_publication_spec.rb +8 -13
  102. data/spec/models/{gem_gem_remote_response_hidden_fields_spec.rb → gem_gem_remote_response_hidden_fields_inner_spec.rb} +11 -16
  103. data/spec/models/gem_gem_remote_response_spec.rb +35 -34
  104. data/spec/models/gem_gem_remote_spec.rb +30 -35
  105. data/spec/models/gem_gem_repository_response_spec.rb +22 -21
  106. data/spec/models/gem_gem_repository_spec.rb +11 -16
  107. data/spec/models/my_permissions_response_spec.rb +7 -12
  108. data/spec/models/nested_role_response_spec.rb +9 -14
  109. data/spec/models/nested_role_spec.rb +9 -14
  110. data/spec/models/object_roles_response_spec.rb +7 -12
  111. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  112. data/spec/models/paginatedgem_gem_content_response_list_spec.rb +10 -15
  113. data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +10 -15
  114. data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +10 -15
  115. data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +10 -15
  116. data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +10 -15
  117. data/spec/models/patchedgem_gem_distribution_spec.rb +14 -19
  118. data/spec/models/patchedgem_gem_remote_spec.rb +30 -35
  119. data/spec/models/patchedgem_gem_repository_spec.rb +11 -16
  120. data/spec/models/policy_enum_spec.rb +6 -11
  121. data/spec/models/repair_spec.rb +7 -12
  122. data/spec/models/repository_add_remove_content_spec.rb +9 -14
  123. data/spec/models/repository_sync_url_spec.rb +8 -13
  124. data/spec/models/repository_version_response_spec.rb +19 -18
  125. data/spec/models/set_label_response_spec.rb +8 -13
  126. data/spec/models/set_label_spec.rb +8 -13
  127. data/spec/models/unset_label_response_spec.rb +8 -13
  128. data/spec/models/unset_label_spec.rb +7 -12
  129. data/spec/spec_helper.rb +1 -1
  130. metadata +80 -60
  131. data/docs/GemGemContent.md +0 -21
  132. data/docs/GemGemRemoteResponseHiddenFields.md +0 -19
  133. data/lib/pulp_gem_client/models/gem_gem_content.rb +0 -228
  134. data/spec/api_client_spec.rb +0 -188
  135. data/spec/configuration_spec.rb +0 -42
  136. data/spec/models/gem_gem_content_spec.rb +0 -53
@@ -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
- OpenAPI Generator version: 4.3.1
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 PulpGemClient
16
17
  # Serializer for synchronously setting a label.
@@ -27,6 +28,11 @@ module PulpGemClient
27
28
  }
28
29
  end
29
30
 
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
30
36
  # Attribute type mapping.
31
37
  def self.openapi_types
32
38
  {
@@ -59,16 +65,21 @@ module PulpGemClient
59
65
 
60
66
  if attributes.key?(:'key')
61
67
  self.key = attributes[:'key']
68
+ else
69
+ self.key = nil
62
70
  end
63
71
 
64
72
  if attributes.key?(:'value')
65
73
  self.value = attributes[:'value']
74
+ else
75
+ self.value = nil
66
76
  end
67
77
  end
68
78
 
69
79
  # Show invalid properties with the reasons. Usually used together with valid?
70
80
  # @return Array for valid properties with the reasons
71
81
  def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
83
  invalid_properties = Array.new
73
84
  if @key.nil?
74
85
  invalid_properties.push('invalid value for "key", key cannot be nil.')
@@ -85,6 +96,7 @@ module PulpGemClient
85
96
  # Check to see if the all the properties in the model are valid
86
97
  # @return true if the model is valid
87
98
  def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
88
100
  return false if @key.nil?
89
101
  return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
90
102
  true
@@ -130,37 +142,33 @@ module PulpGemClient
130
142
  # @param [Hash] attributes Model attributes in the form of hash
131
143
  # @return [Object] Returns the model itself
132
144
  def self.build_from_hash(attributes)
133
- new.build_from_hash(attributes)
134
- end
135
-
136
- # Builds the object from hash
137
- # @param [Hash] attributes Model attributes in the form of hash
138
- # @return [Object] Returns the model itself
139
- def build_from_hash(attributes)
140
145
  return nil unless attributes.is_a?(Hash)
141
- self.class.openapi_types.each_pair do |key, type|
142
- if type =~ /\AArray<(.*)>/i
146
+ attributes = attributes.transform_keys(&:to_sym)
147
+ transformed_hash = {}
148
+ openapi_types.each_pair do |key, type|
149
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = nil
151
+ elsif type =~ /\AArray<(.*)>/i
143
152
  # check to ensure the input is an array given that the attribute
144
153
  # is documented as an array but the input is not
145
- if attributes[self.class.attribute_map[key]].is_a?(Array)
146
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
+ if attributes[attribute_map[key]].is_a?(Array)
155
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
147
156
  end
148
- elsif !attributes[self.class.attribute_map[key]].nil?
149
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
- end # or else data not found in attributes(hash), not an issue as the data can be optional
157
+ elsif !attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
159
+ end
151
160
  end
152
-
153
- self
161
+ new(transformed_hash)
154
162
  end
155
163
 
156
164
  # Deserializes the data based on type
157
165
  # @param string type Data type
158
166
  # @param string value Value to be deserialized
159
167
  # @return [Object] Deserialized data
160
- def _deserialize(type, value)
168
+ def self._deserialize(type, value)
161
169
  case type.to_sym
162
- when :DateTime
163
- DateTime.parse(value)
170
+ when :Time
171
+ Time.parse(value)
164
172
  when :Date
165
173
  Date.parse(value)
166
174
  when :String
@@ -190,7 +198,9 @@ module PulpGemClient
190
198
  end
191
199
  end
192
200
  else # model
193
- PulpGemClient.const_get(type).build_from_hash(value)
201
+ # models (e.g. Pet) or oneOf
202
+ klass = PulpGemClient.const_get(type)
203
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
204
  end
195
205
  end
196
206
 
@@ -216,7 +226,7 @@ module PulpGemClient
216
226
  is_nullable = self.class.openapi_nullable.include?(attr)
217
227
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
228
  end
219
-
229
+
220
230
  hash[param] = _to_hash(value)
221
231
  end
222
232
  hash
@@ -239,5 +249,7 @@ module PulpGemClient
239
249
  value
240
250
  end
241
251
  end
252
+
242
253
  end
254
+
243
255
  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
- OpenAPI Generator version: 4.3.1
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 PulpGemClient
16
17
  # Serializer for synchronously setting a label.
@@ -24,6 +25,11 @@ module PulpGemClient
24
25
  }
25
26
  end
26
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
27
33
  # Attribute type mapping.
28
34
  def self.openapi_types
29
35
  {
@@ -54,12 +60,15 @@ module PulpGemClient
54
60
 
55
61
  if attributes.key?(:'key')
56
62
  self.key = attributes[:'key']
63
+ else
64
+ self.key = nil
57
65
  end
58
66
  end
59
67
 
60
68
  # Show invalid properties with the reasons. Usually used together with valid?
61
69
  # @return Array for valid properties with the reasons
62
70
  def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
63
72
  invalid_properties = Array.new
64
73
  if @key.nil?
65
74
  invalid_properties.push('invalid value for "key", key cannot be nil.')
@@ -80,6 +89,7 @@ module PulpGemClient
80
89
  # Check to see if the all the properties in the model are valid
81
90
  # @return true if the model is valid
82
91
  def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
93
  return false if @key.nil?
84
94
  return false if @key.to_s.length < 1
85
95
  return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
@@ -129,37 +139,33 @@ module PulpGemClient
129
139
  # @param [Hash] attributes Model attributes in the form of hash
130
140
  # @return [Object] Returns the model itself
131
141
  def self.build_from_hash(attributes)
132
- new.build_from_hash(attributes)
133
- end
134
-
135
- # Builds the object from hash
136
- # @param [Hash] attributes Model attributes in the form of hash
137
- # @return [Object] Returns the model itself
138
- def build_from_hash(attributes)
139
142
  return nil unless attributes.is_a?(Hash)
140
- self.class.openapi_types.each_pair do |key, type|
141
- if type =~ /\AArray<(.*)>/i
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
142
149
  # check to ensure the input is an array given that the attribute
143
150
  # is documented as an array but the input is not
144
- if attributes[self.class.attribute_map[key]].is_a?(Array)
145
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
146
153
  end
147
- elsif !attributes[self.class.attribute_map[key]].nil?
148
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
- end # or else data not found in attributes(hash), not an issue as the data can be optional
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
150
157
  end
151
-
152
- self
158
+ new(transformed_hash)
153
159
  end
154
160
 
155
161
  # Deserializes the data based on type
156
162
  # @param string type Data type
157
163
  # @param string value Value to be deserialized
158
164
  # @return [Object] Deserialized data
159
- def _deserialize(type, value)
165
+ def self._deserialize(type, value)
160
166
  case type.to_sym
161
- when :DateTime
162
- DateTime.parse(value)
167
+ when :Time
168
+ Time.parse(value)
163
169
  when :Date
164
170
  Date.parse(value)
165
171
  when :String
@@ -189,7 +195,9 @@ module PulpGemClient
189
195
  end
190
196
  end
191
197
  else # model
192
- PulpGemClient.const_get(type).build_from_hash(value)
198
+ # models (e.g. Pet) or oneOf
199
+ klass = PulpGemClient.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
201
  end
194
202
  end
195
203
 
@@ -215,7 +223,7 @@ module PulpGemClient
215
223
  is_nullable = self.class.openapi_nullable.include?(attr)
216
224
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
225
  end
218
-
226
+
219
227
  hash[param] = _to_hash(value)
220
228
  end
221
229
  hash
@@ -238,5 +246,7 @@ module PulpGemClient
238
246
  value
239
247
  end
240
248
  end
249
+
241
250
  end
251
+
242
252
  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
- OpenAPI Generator version: 4.3.1
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 PulpGemClient
16
17
  # Serializer for synchronously setting a label.
@@ -27,6 +28,11 @@ module PulpGemClient
27
28
  }
28
29
  end
29
30
 
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
30
36
  # Attribute type mapping.
31
37
  def self.openapi_types
32
38
  {
@@ -58,6 +64,8 @@ module PulpGemClient
58
64
 
59
65
  if attributes.key?(:'key')
60
66
  self.key = attributes[:'key']
67
+ else
68
+ self.key = nil
61
69
  end
62
70
 
63
71
  if attributes.key?(:'value')
@@ -68,6 +76,7 @@ module PulpGemClient
68
76
  # Show invalid properties with the reasons. Usually used together with valid?
69
77
  # @return Array for valid properties with the reasons
70
78
  def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
80
  invalid_properties = Array.new
72
81
  if @key.nil?
73
82
  invalid_properties.push('invalid value for "key", key cannot be nil.')
@@ -84,6 +93,7 @@ module PulpGemClient
84
93
  # Check to see if the all the properties in the model are valid
85
94
  # @return true if the model is valid
86
95
  def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
97
  return false if @key.nil?
88
98
  return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
89
99
  true
@@ -129,37 +139,33 @@ module PulpGemClient
129
139
  # @param [Hash] attributes Model attributes in the form of hash
130
140
  # @return [Object] Returns the model itself
131
141
  def self.build_from_hash(attributes)
132
- new.build_from_hash(attributes)
133
- end
134
-
135
- # Builds the object from hash
136
- # @param [Hash] attributes Model attributes in the form of hash
137
- # @return [Object] Returns the model itself
138
- def build_from_hash(attributes)
139
142
  return nil unless attributes.is_a?(Hash)
140
- self.class.openapi_types.each_pair do |key, type|
141
- if type =~ /\AArray<(.*)>/i
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ transformed_hash = {}
145
+ openapi_types.each_pair do |key, type|
146
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
142
149
  # check to ensure the input is an array given that the attribute
143
150
  # is documented as an array but the input is not
144
- if attributes[self.class.attribute_map[key]].is_a?(Array)
145
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ if attributes[attribute_map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
146
153
  end
147
- elsif !attributes[self.class.attribute_map[key]].nil?
148
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
- end # or else data not found in attributes(hash), not an issue as the data can be optional
154
+ elsif !attributes[attribute_map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
+ end
150
157
  end
151
-
152
- self
158
+ new(transformed_hash)
153
159
  end
154
160
 
155
161
  # Deserializes the data based on type
156
162
  # @param string type Data type
157
163
  # @param string value Value to be deserialized
158
164
  # @return [Object] Deserialized data
159
- def _deserialize(type, value)
165
+ def self._deserialize(type, value)
160
166
  case type.to_sym
161
- when :DateTime
162
- DateTime.parse(value)
167
+ when :Time
168
+ Time.parse(value)
163
169
  when :Date
164
170
  Date.parse(value)
165
171
  when :String
@@ -189,7 +195,9 @@ module PulpGemClient
189
195
  end
190
196
  end
191
197
  else # model
192
- PulpGemClient.const_get(type).build_from_hash(value)
198
+ # models (e.g. Pet) or oneOf
199
+ klass = PulpGemClient.const_get(type)
200
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
201
  end
194
202
  end
195
203
 
@@ -215,7 +223,7 @@ module PulpGemClient
215
223
  is_nullable = self.class.openapi_nullable.include?(attr)
216
224
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
225
  end
218
-
226
+
219
227
  hash[param] = _to_hash(value)
220
228
  end
221
229
  hash
@@ -238,5 +246,7 @@ module PulpGemClient
238
246
  value
239
247
  end
240
248
  end
249
+
241
250
  end
251
+
242
252
  end
@@ -6,10 +6,10 @@
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
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
13
13
  module PulpGemClient
14
- VERSION = '0.6.1'
14
+ VERSION = '0.6.2'
15
15
  end
@@ -6,7 +6,7 @@
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
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -19,7 +19,6 @@ require 'pulp_gem_client/configuration'
19
19
  # Models
20
20
  require 'pulp_gem_client/models/async_operation_response'
21
21
  require 'pulp_gem_client/models/content_summary_response'
22
- require 'pulp_gem_client/models/gem_gem_content'
23
22
  require 'pulp_gem_client/models/gem_gem_content_response'
24
23
  require 'pulp_gem_client/models/gem_gem_distribution'
25
24
  require 'pulp_gem_client/models/gem_gem_distribution_response'
@@ -27,7 +26,7 @@ require 'pulp_gem_client/models/gem_gem_publication'
27
26
  require 'pulp_gem_client/models/gem_gem_publication_response'
28
27
  require 'pulp_gem_client/models/gem_gem_remote'
29
28
  require 'pulp_gem_client/models/gem_gem_remote_response'
30
- require 'pulp_gem_client/models/gem_gem_remote_response_hidden_fields'
29
+ require 'pulp_gem_client/models/gem_gem_remote_response_hidden_fields_inner'
31
30
  require 'pulp_gem_client/models/gem_gem_repository'
32
31
  require 'pulp_gem_client/models/gem_gem_repository_response'
33
32
  require 'pulp_gem_client/models/my_permissions_response'
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: v3
9
9
  Contact: pulp-list@redhat.com
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.3.1
11
+ Generator version: 7.10.0
12
12
 
13
13
  =end
14
14
 
@@ -24,11 +24,14 @@ Gem::Specification.new do |s|
24
24
  s.homepage = "https://github.com/pulp/pulp_gem"
25
25
  s.summary = "Pulp 3 API Ruby Gem"
26
26
  s.description = "Fetch, Upload, Organize, and Distribute Software Packages"
27
- s.license = 'GPLv2+'
28
- s.required_ruby_version = ">= 1.9"
29
-
30
- s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 2.0'
31
- s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
27
+ s.license = "GPLv2+"
28
+ s.required_ruby_version = ">= 2.7"
29
+ s.metadata = {}
30
+
31
+ s.add_runtime_dependency 'faraday-net_http', '>= 2.0', '< 3.1'
32
+ s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 2.9'
33
+ s.add_runtime_dependency 'faraday-multipart'
34
+ s.add_runtime_dependency 'marcel'
32
35
 
33
36
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
37
 
@@ -6,7 +6,7 @@
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
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -42,7 +42,7 @@ describe 'ContentGemApi' do
42
42
  # @return [AsyncOperationResponse]
43
43
  describe 'create test' do
44
44
  it 'should work' do
45
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
46
  end
47
47
  end
48
48
 
@@ -57,19 +57,20 @@ describe 'ContentGemApi' do
57
57
  # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;upstream_id&#x60; - Upstream id * &#x60;-upstream_id&#x60; - Upstream id (descending) * &#x60;timestamp_of_interest&#x60; - Timestamp of interest * &#x60;-timestamp_of_interest&#x60; - Timestamp of interest (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;version&#x60; - Version * &#x60;-version&#x60; - Version (descending) * &#x60;platform&#x60; - Platform * &#x60;-platform&#x60; - Platform (descending) * &#x60;checksum&#x60; - Checksum * &#x60;-checksum&#x60; - Checksum (descending) * &#x60;prerelease&#x60; - Prerelease * &#x60;-prerelease&#x60; - Prerelease (descending) * &#x60;dependencies&#x60; - Dependencies * &#x60;-dependencies&#x60; - Dependencies (descending) * &#x60;required_ruby_version&#x60; - Required ruby version * &#x60;-required_ruby_version&#x60; - Required ruby version (descending) * &#x60;required_rubygems_version&#x60; - Required rubygems version * &#x60;-required_rubygems_version&#x60; - Required rubygems version (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
58
58
  # @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
59
59
  # @option opts [Boolean] :prerelease Filter results where prerelease matches value
60
+ # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
60
61
  # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
61
62
  # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
62
- # @option opts [String] :q
63
- # @option opts [String] :repository_version Repository Version referenced by HREF
64
- # @option opts [String] :repository_version_added Repository Version referenced by HREF
65
- # @option opts [String] :repository_version_removed Repository Version referenced by HREF
63
+ # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
64
+ # @option opts [String] :repository_version Repository Version referenced by HREF/PRN
65
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF/PRN
66
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF/PRN
66
67
  # @option opts [String] :version Filter results where version matches value
67
68
  # @option opts [Array<String>] :fields A list of fields to include in the response.
68
69
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
69
70
  # @return [PaginatedgemGemContentResponseList]
70
71
  describe 'list test' do
71
72
  it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
73
74
  end
74
75
  end
75
76
 
@@ -83,7 +84,7 @@ describe 'ContentGemApi' do
83
84
  # @return [GemGemContentResponse]
84
85
  describe 'read test' do
85
86
  it 'should work' do
86
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
87
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
87
88
  end
88
89
  end
89
90
 
@@ -6,7 +6,7 @@
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
- OpenAPI Generator version: 4.3.1
9
+ Generator version: 7.10.0
10
10
 
11
11
  =end
12
12
 
@@ -41,7 +41,7 @@ describe 'DistributionsGemApi' do
41
41
  # @return [NestedRoleResponse]
42
42
  describe 'add_role test' do
43
43
  it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
45
  end
46
46
  end
47
47
 
@@ -53,7 +53,7 @@ describe 'DistributionsGemApi' do
53
53
  # @return [AsyncOperationResponse]
54
54
  describe 'create test' do
55
55
  it 'should work' do
56
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
57
  end
58
58
  end
59
59
 
@@ -65,7 +65,7 @@ describe 'DistributionsGemApi' do
65
65
  # @return [AsyncOperationResponse]
66
66
  describe 'delete test' do
67
67
  it 'should work' do
68
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
69
  end
70
70
  end
71
71
 
@@ -89,10 +89,11 @@ describe 'DistributionsGemApi' do
89
89
  # @option opts [String] :name__startswith Filter results where name starts with value
90
90
  # @option opts [Integer] :offset The initial index from which to return the results.
91
91
  # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;pulp_labels&#x60; - Pulp labels * &#x60;-pulp_labels&#x60; - Pulp labels (descending) * &#x60;base_path&#x60; - Base path * &#x60;-base_path&#x60; - Base path (descending) * &#x60;hidden&#x60; - Hidden * &#x60;-hidden&#x60; - Hidden (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
92
+ # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
92
93
  # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
93
94
  # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
94
95
  # @option opts [String] :pulp_label_select Filter labels by search string
95
- # @option opts [String] :q
96
+ # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
96
97
  # @option opts [String] :repository Filter results where repository matches value
97
98
  # @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
98
99
  # @option opts [String] :with_content Filter distributions based on the content served by them
@@ -101,7 +102,7 @@ describe 'DistributionsGemApi' do
101
102
  # @return [PaginatedgemGemDistributionResponseList]
102
103
  describe 'list test' do
103
104
  it 'should work' do
104
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
105
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
105
106
  end
106
107
  end
107
108
 
@@ -115,7 +116,7 @@ describe 'DistributionsGemApi' do
115
116
  # @return [ObjectRolesResponse]
116
117
  describe 'list_roles test' do
117
118
  it 'should work' do
118
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
119
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
119
120
  end
120
121
  end
121
122
 
@@ -129,7 +130,7 @@ describe 'DistributionsGemApi' do
129
130
  # @return [MyPermissionsResponse]
130
131
  describe 'my_permissions test' do
131
132
  it 'should work' do
132
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
133
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
133
134
  end
134
135
  end
135
136
 
@@ -142,7 +143,7 @@ describe 'DistributionsGemApi' do
142
143
  # @return [AsyncOperationResponse]
143
144
  describe 'partial_update test' do
144
145
  it 'should work' do
145
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
146
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
146
147
  end
147
148
  end
148
149
 
@@ -156,7 +157,7 @@ describe 'DistributionsGemApi' do
156
157
  # @return [GemGemDistributionResponse]
157
158
  describe 'read test' do
158
159
  it 'should work' do
159
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
160
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
160
161
  end
161
162
  end
162
163
 
@@ -169,7 +170,7 @@ describe 'DistributionsGemApi' do
169
170
  # @return [NestedRoleResponse]
170
171
  describe 'remove_role test' do
171
172
  it 'should work' do
172
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
173
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
173
174
  end
174
175
  end
175
176
 
@@ -182,7 +183,7 @@ describe 'DistributionsGemApi' do
182
183
  # @return [SetLabelResponse]
183
184
  describe 'set_label test' do
184
185
  it 'should work' do
185
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
186
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
186
187
  end
187
188
  end
188
189
 
@@ -195,7 +196,7 @@ describe 'DistributionsGemApi' do
195
196
  # @return [UnsetLabelResponse]
196
197
  describe 'unset_label test' do
197
198
  it 'should work' do
198
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
199
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
199
200
  end
200
201
  end
201
202
 
@@ -208,7 +209,7 @@ describe 'DistributionsGemApi' do
208
209
  # @return [AsyncOperationResponse]
209
210
  describe 'update test' do
210
211
  it 'should work' do
211
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
212
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
212
213
  end
213
214
  end
214
215