pulp_ostree_client 2.4.5 → 2.4.6

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.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -12
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContentCommitsApi.md +80 -47
  5. data/docs/ContentConfigsApi.md +79 -46
  6. data/docs/ContentContentApi.md +107 -57
  7. data/docs/ContentObjectsApi.md +80 -47
  8. data/docs/ContentRefsApi.md +90 -57
  9. data/docs/ContentSummariesApi.md +79 -46
  10. data/docs/ContentSummaryResponse.md +12 -11
  11. data/docs/DistributionsOstreeApi.md +385 -182
  12. data/docs/MyPermissionsResponse.md +8 -7
  13. data/docs/NestedRole.md +12 -11
  14. data/docs/NestedRoleResponse.md +12 -11
  15. data/docs/ObjectRolesResponse.md +8 -7
  16. data/docs/OstreeImportAll.md +10 -9
  17. data/docs/OstreeImportCommitsToRef.md +12 -11
  18. data/docs/OstreeOstreeCommitResponse.md +24 -23
  19. data/docs/OstreeOstreeConfigResponse.md +18 -17
  20. data/docs/OstreeOstreeContent.md +14 -13
  21. data/docs/OstreeOstreeContentResponse.md +20 -19
  22. data/docs/OstreeOstreeDistribution.md +20 -19
  23. data/docs/OstreeOstreeDistributionResponse.md +32 -31
  24. data/docs/OstreeOstreeObjectResponse.md +22 -21
  25. data/docs/OstreeOstreeRefResponse.md +24 -23
  26. data/docs/OstreeOstreeRemote.md +54 -53
  27. data/docs/OstreeOstreeRemoteResponse.md +54 -53
  28. data/docs/OstreeOstreeRemoteResponseHiddenFieldsInner.md +20 -0
  29. data/docs/OstreeOstreeRepository.md +18 -17
  30. data/docs/OstreeOstreeRepositoryResponse.md +30 -29
  31. data/docs/OstreeOstreeSummaryResponse.md +18 -17
  32. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  33. data/docs/PaginatedostreeOstreeCommitResponseList.md +14 -13
  34. data/docs/PaginatedostreeOstreeConfigResponseList.md +14 -13
  35. data/docs/PaginatedostreeOstreeContentResponseList.md +14 -13
  36. data/docs/PaginatedostreeOstreeDistributionResponseList.md +14 -13
  37. data/docs/PaginatedostreeOstreeObjectResponseList.md +14 -13
  38. data/docs/PaginatedostreeOstreeRefResponseList.md +14 -13
  39. data/docs/PaginatedostreeOstreeRemoteResponseList.md +14 -13
  40. data/docs/PaginatedostreeOstreeRepositoryResponseList.md +14 -13
  41. data/docs/PaginatedostreeOstreeSummaryResponseList.md +14 -13
  42. data/docs/PatchedostreeOstreeDistribution.md +20 -19
  43. data/docs/PatchedostreeOstreeRemote.md +54 -53
  44. data/docs/PatchedostreeOstreeRepository.md +18 -17
  45. data/docs/PolicyEnum.md +4 -5
  46. data/docs/RemotesOstreeApi.md +389 -184
  47. data/docs/Repair.md +8 -7
  48. data/docs/RepositoriesOstreeApi.md +502 -231
  49. data/docs/RepositoriesOstreeVersionsApi.md +152 -82
  50. data/docs/RepositoryAddRemoveContent.md +12 -11
  51. data/docs/RepositorySyncURL.md +10 -9
  52. data/docs/RepositoryVersionResponse.md +22 -21
  53. data/docs/SetLabel.md +10 -9
  54. data/docs/SetLabelResponse.md +10 -9
  55. data/docs/UnsetLabel.md +8 -7
  56. data/docs/UnsetLabelResponse.md +10 -9
  57. data/lib/pulp_ostree_client/api/content_commits_api.rb +11 -9
  58. data/lib/pulp_ostree_client/api/content_configs_api.rb +11 -9
  59. data/lib/pulp_ostree_client/api/content_content_api.rb +20 -14
  60. data/lib/pulp_ostree_client/api/content_objects_api.rb +11 -9
  61. data/lib/pulp_ostree_client/api/content_refs_api.rb +11 -9
  62. data/lib/pulp_ostree_client/api/content_summaries_api.rb +11 -9
  63. data/lib/pulp_ostree_client/api/distributions_ostree_api.rb +89 -56
  64. data/lib/pulp_ostree_client/api/remotes_ostree_api.rb +104 -68
  65. data/lib/pulp_ostree_client/api/repositories_ostree_api.rb +125 -76
  66. data/lib/pulp_ostree_client/api/repositories_ostree_versions_api.rb +40 -30
  67. data/lib/pulp_ostree_client/api_client.rb +137 -102
  68. data/lib/pulp_ostree_client/api_error.rb +2 -1
  69. data/lib/pulp_ostree_client/configuration.rb +162 -21
  70. data/lib/pulp_ostree_client/models/async_operation_response.rb +32 -22
  71. data/lib/pulp_ostree_client/models/content_summary_response.rb +36 -22
  72. data/lib/pulp_ostree_client/models/my_permissions_response.rb +32 -22
  73. data/lib/pulp_ostree_client/models/nested_role.rb +32 -22
  74. data/lib/pulp_ostree_client/models/nested_role_response.rb +32 -22
  75. data/lib/pulp_ostree_client/models/object_roles_response.rb +32 -22
  76. data/lib/pulp_ostree_client/models/ostree_import_all.rb +34 -22
  77. data/lib/pulp_ostree_client/models/ostree_import_commits_to_ref.rb +36 -22
  78. data/lib/pulp_ostree_client/models/ostree_ostree_commit_response.rb +40 -24
  79. data/lib/pulp_ostree_client/models/ostree_ostree_config_response.rb +36 -24
  80. data/lib/pulp_ostree_client/models/ostree_ostree_content.rb +36 -22
  81. data/lib/pulp_ostree_client/models/ostree_ostree_content_response.rb +38 -24
  82. data/lib/pulp_ostree_client/models/ostree_ostree_distribution.rb +34 -22
  83. data/lib/pulp_ostree_client/models/ostree_ostree_distribution_response.rb +36 -24
  84. data/lib/pulp_ostree_client/models/ostree_ostree_object_response.rb +40 -24
  85. data/lib/pulp_ostree_client/models/ostree_ostree_ref_response.rb +40 -24
  86. data/lib/pulp_ostree_client/models/ostree_ostree_remote.rb +61 -23
  87. data/lib/pulp_ostree_client/models/ostree_ostree_remote_response.rb +64 -26
  88. data/lib/pulp_ostree_client/models/{ostree_ostree_remote_response_hidden_fields.rb → ostree_ostree_remote_response_hidden_fields_inner.rb} +37 -25
  89. data/lib/pulp_ostree_client/models/ostree_ostree_repository.rb +32 -22
  90. data/lib/pulp_ostree_client/models/ostree_ostree_repository_response.rb +34 -24
  91. data/lib/pulp_ostree_client/models/ostree_ostree_summary_response.rb +36 -24
  92. data/lib/pulp_ostree_client/models/paginated_repository_version_response_list.rb +34 -22
  93. data/lib/pulp_ostree_client/models/paginatedostree_ostree_commit_response_list.rb +34 -22
  94. data/lib/pulp_ostree_client/models/paginatedostree_ostree_config_response_list.rb +34 -22
  95. data/lib/pulp_ostree_client/models/paginatedostree_ostree_content_response_list.rb +34 -22
  96. data/lib/pulp_ostree_client/models/paginatedostree_ostree_distribution_response_list.rb +34 -22
  97. data/lib/pulp_ostree_client/models/paginatedostree_ostree_object_response_list.rb +34 -22
  98. data/lib/pulp_ostree_client/models/paginatedostree_ostree_ref_response_list.rb +34 -22
  99. data/lib/pulp_ostree_client/models/paginatedostree_ostree_remote_response_list.rb +34 -22
  100. data/lib/pulp_ostree_client/models/paginatedostree_ostree_repository_response_list.rb +34 -22
  101. data/lib/pulp_ostree_client/models/paginatedostree_ostree_summary_response_list.rb +34 -22
  102. data/lib/pulp_ostree_client/models/patchedostree_ostree_distribution.rb +40 -24
  103. data/lib/pulp_ostree_client/models/patchedostree_ostree_remote.rb +67 -25
  104. data/lib/pulp_ostree_client/models/patchedostree_ostree_repository.rb +35 -23
  105. data/lib/pulp_ostree_client/models/policy_enum.rb +8 -4
  106. data/lib/pulp_ostree_client/models/repair.rb +30 -22
  107. data/lib/pulp_ostree_client/models/repository_add_remove_content.rb +30 -22
  108. data/lib/pulp_ostree_client/models/repository_sync_url.rb +30 -22
  109. data/lib/pulp_ostree_client/models/repository_version_response.rb +32 -24
  110. data/lib/pulp_ostree_client/models/set_label.rb +34 -22
  111. data/lib/pulp_ostree_client/models/set_label_response.rb +34 -22
  112. data/lib/pulp_ostree_client/models/unset_label.rb +32 -22
  113. data/lib/pulp_ostree_client/models/unset_label_response.rb +32 -22
  114. data/lib/pulp_ostree_client/version.rb +2 -2
  115. data/lib/pulp_ostree_client.rb +2 -2
  116. data/pulp_ostree_client.gemspec +9 -6
  117. data/spec/api/content_commits_api_spec.rb +3 -3
  118. data/spec/api/content_configs_api_spec.rb +3 -3
  119. data/spec/api/content_content_api_spec.rb +4 -4
  120. data/spec/api/content_objects_api_spec.rb +3 -3
  121. data/spec/api/content_refs_api_spec.rb +3 -3
  122. data/spec/api/content_summaries_api_spec.rb +3 -3
  123. data/spec/api/distributions_ostree_api_spec.rb +13 -13
  124. data/spec/api/remotes_ostree_api_spec.rb +20 -19
  125. data/spec/api/repositories_ostree_api_spec.rb +17 -17
  126. data/spec/api/repositories_ostree_versions_api_spec.rb +12 -11
  127. data/spec/models/async_operation_response_spec.rb +7 -12
  128. data/spec/models/content_summary_response_spec.rb +9 -14
  129. data/spec/models/my_permissions_response_spec.rb +7 -12
  130. data/spec/models/nested_role_response_spec.rb +9 -14
  131. data/spec/models/nested_role_spec.rb +9 -14
  132. data/spec/models/object_roles_response_spec.rb +7 -12
  133. data/spec/models/ostree_import_all_spec.rb +8 -13
  134. data/spec/models/ostree_import_commits_to_ref_spec.rb +9 -14
  135. data/spec/models/ostree_ostree_commit_response_spec.rb +15 -20
  136. data/spec/models/ostree_ostree_config_response_spec.rb +12 -17
  137. data/spec/models/ostree_ostree_content_response_spec.rb +13 -18
  138. data/spec/models/ostree_ostree_content_spec.rb +10 -15
  139. data/spec/models/ostree_ostree_distribution_response_spec.rb +19 -24
  140. data/spec/models/ostree_ostree_distribution_spec.rb +13 -18
  141. data/spec/models/ostree_ostree_object_response_spec.rb +14 -19
  142. data/spec/models/ostree_ostree_ref_response_spec.rb +15 -20
  143. data/spec/models/{ostree_ostree_remote_response_hidden_fields_spec.rb → ostree_ostree_remote_response_hidden_fields_inner_spec.rb} +11 -16
  144. data/spec/models/ostree_ostree_remote_response_spec.rb +30 -35
  145. data/spec/models/ostree_ostree_remote_spec.rb +30 -35
  146. data/spec/models/ostree_ostree_repository_response_spec.rb +18 -23
  147. data/spec/models/ostree_ostree_repository_spec.rb +12 -17
  148. data/spec/models/ostree_ostree_summary_response_spec.rb +12 -17
  149. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  150. data/spec/models/paginatedostree_ostree_commit_response_list_spec.rb +10 -15
  151. data/spec/models/paginatedostree_ostree_config_response_list_spec.rb +10 -15
  152. data/spec/models/paginatedostree_ostree_content_response_list_spec.rb +10 -15
  153. data/spec/models/paginatedostree_ostree_distribution_response_list_spec.rb +10 -15
  154. data/spec/models/paginatedostree_ostree_object_response_list_spec.rb +10 -15
  155. data/spec/models/paginatedostree_ostree_ref_response_list_spec.rb +10 -15
  156. data/spec/models/paginatedostree_ostree_remote_response_list_spec.rb +10 -15
  157. data/spec/models/paginatedostree_ostree_repository_response_list_spec.rb +10 -15
  158. data/spec/models/paginatedostree_ostree_summary_response_list_spec.rb +10 -15
  159. data/spec/models/patchedostree_ostree_distribution_spec.rb +13 -18
  160. data/spec/models/patchedostree_ostree_remote_spec.rb +30 -35
  161. data/spec/models/patchedostree_ostree_repository_spec.rb +12 -17
  162. data/spec/models/policy_enum_spec.rb +6 -11
  163. data/spec/models/repair_spec.rb +7 -12
  164. data/spec/models/repository_add_remove_content_spec.rb +9 -14
  165. data/spec/models/repository_sync_url_spec.rb +8 -13
  166. data/spec/models/repository_version_response_spec.rb +14 -19
  167. data/spec/models/set_label_response_spec.rb +8 -13
  168. data/spec/models/set_label_spec.rb +8 -13
  169. data/spec/models/unset_label_response_spec.rb +8 -13
  170. data/spec/models/unset_label_spec.rb +7 -12
  171. data/spec/spec_helper.rb +1 -1
  172. metadata +84 -60
  173. data/docs/OstreeOstreeRemoteResponseHiddenFields.md +0 -19
  174. data/spec/api_client_spec.rb +0 -188
  175. 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
- 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 PulpOstreeClient
16
17
  # Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
@@ -30,6 +31,11 @@ module PulpOstreeClient
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
  {
@@ -74,12 +80,15 @@ module PulpOstreeClient
74
80
 
75
81
  if attributes.key?(:'role')
76
82
  self.role = attributes[:'role']
83
+ else
84
+ self.role = nil
77
85
  end
78
86
  end
79
87
 
80
88
  # Show invalid properties with the reasons. Usually used together with valid?
81
89
  # @return Array for valid properties with the reasons
82
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
92
  invalid_properties = Array.new
84
93
  if @role.nil?
85
94
  invalid_properties.push('invalid value for "role", role cannot be nil.')
@@ -95,6 +104,7 @@ module PulpOstreeClient
95
104
  # Check to see if the all the properties in the model are valid
96
105
  # @return true if the model is valid
97
106
  def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
98
108
  return false if @role.nil?
99
109
  return false if @role.to_s.length < 1
100
110
  true
@@ -140,37 +150,33 @@ module PulpOstreeClient
140
150
  # @param [Hash] attributes Model attributes in the form of hash
141
151
  # @return [Object] Returns the model itself
142
152
  def self.build_from_hash(attributes)
143
- new.build_from_hash(attributes)
144
- end
145
-
146
- # Builds the object from hash
147
- # @param [Hash] attributes Model attributes in the form of hash
148
- # @return [Object] Returns the model itself
149
- def build_from_hash(attributes)
150
153
  return nil unless attributes.is_a?(Hash)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if type =~ /\AArray<(.*)>/i
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
153
160
  # check to ensure the input is an array given that the attribute
154
161
  # is documented as an array but the input is not
155
- if attributes[self.class.attribute_map[key]].is_a?(Array)
156
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
164
  end
158
- elsif !attributes[self.class.attribute_map[key]].nil?
159
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
- end # or else data not found in attributes(hash), not an issue as the data can be optional
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
161
168
  end
162
-
163
- self
169
+ new(transformed_hash)
164
170
  end
165
171
 
166
172
  # Deserializes the data based on type
167
173
  # @param string type Data type
168
174
  # @param string value Value to be deserialized
169
175
  # @return [Object] Deserialized data
170
- def _deserialize(type, value)
176
+ def self._deserialize(type, value)
171
177
  case type.to_sym
172
- when :DateTime
173
- DateTime.parse(value)
178
+ when :Time
179
+ Time.parse(value)
174
180
  when :Date
175
181
  Date.parse(value)
176
182
  when :String
@@ -200,7 +206,9 @@ module PulpOstreeClient
200
206
  end
201
207
  end
202
208
  else # model
203
- PulpOstreeClient.const_get(type).build_from_hash(value)
209
+ # models (e.g. Pet) or oneOf
210
+ klass = PulpOstreeClient.const_get(type)
211
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
212
  end
205
213
  end
206
214
 
@@ -226,7 +234,7 @@ module PulpOstreeClient
226
234
  is_nullable = self.class.openapi_nullable.include?(attr)
227
235
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
236
  end
229
-
237
+
230
238
  hash[param] = _to_hash(value)
231
239
  end
232
240
  hash
@@ -249,5 +257,7 @@ module PulpOstreeClient
249
257
  value
250
258
  end
251
259
  end
260
+
252
261
  end
262
+
253
263
  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 PulpOstreeClient
16
17
  # Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
@@ -30,6 +31,11 @@ module PulpOstreeClient
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
  {
@@ -74,12 +80,15 @@ module PulpOstreeClient
74
80
 
75
81
  if attributes.key?(:'role')
76
82
  self.role = attributes[:'role']
83
+ else
84
+ self.role = nil
77
85
  end
78
86
  end
79
87
 
80
88
  # Show invalid properties with the reasons. Usually used together with valid?
81
89
  # @return Array for valid properties with the reasons
82
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
92
  invalid_properties = Array.new
84
93
  if @role.nil?
85
94
  invalid_properties.push('invalid value for "role", role cannot be nil.')
@@ -91,6 +100,7 @@ module PulpOstreeClient
91
100
  # Check to see if the all the properties in the model are valid
92
101
  # @return true if the model is valid
93
102
  def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
104
  return false if @role.nil?
95
105
  true
96
106
  end
@@ -121,37 +131,33 @@ module PulpOstreeClient
121
131
  # @param [Hash] attributes Model attributes in the form of hash
122
132
  # @return [Object] Returns the model itself
123
133
  def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
134
  return nil unless attributes.is_a?(Hash)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if type =~ /\AArray<(.*)>/i
135
+ attributes = attributes.transform_keys(&:to_sym)
136
+ transformed_hash = {}
137
+ openapi_types.each_pair do |key, type|
138
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = nil
140
+ elsif type =~ /\AArray<(.*)>/i
134
141
  # check to ensure the input is an array given that the attribute
135
142
  # is documented as an array but the input is not
136
- if attributes[self.class.attribute_map[key]].is_a?(Array)
137
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
145
  end
139
- elsif !attributes[self.class.attribute_map[key]].nil?
140
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
- end # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ elsif !attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
148
+ end
142
149
  end
143
-
144
- self
150
+ new(transformed_hash)
145
151
  end
146
152
 
147
153
  # Deserializes the data based on type
148
154
  # @param string type Data type
149
155
  # @param string value Value to be deserialized
150
156
  # @return [Object] Deserialized data
151
- def _deserialize(type, value)
157
+ def self._deserialize(type, value)
152
158
  case type.to_sym
153
- when :DateTime
154
- DateTime.parse(value)
159
+ when :Time
160
+ Time.parse(value)
155
161
  when :Date
156
162
  Date.parse(value)
157
163
  when :String
@@ -181,7 +187,9 @@ module PulpOstreeClient
181
187
  end
182
188
  end
183
189
  else # model
184
- PulpOstreeClient.const_get(type).build_from_hash(value)
190
+ # models (e.g. Pet) or oneOf
191
+ klass = PulpOstreeClient.const_get(type)
192
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
193
  end
186
194
  end
187
195
 
@@ -207,7 +215,7 @@ module PulpOstreeClient
207
215
  is_nullable = self.class.openapi_nullable.include?(attr)
208
216
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
217
  end
210
-
218
+
211
219
  hash[param] = _to_hash(value)
212
220
  end
213
221
  hash
@@ -230,5 +238,7 @@ module PulpOstreeClient
230
238
  value
231
239
  end
232
240
  end
241
+
233
242
  end
243
+
234
244
  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 PulpOstreeClient
16
17
  class ObjectRolesResponse
@@ -23,6 +24,11 @@ module PulpOstreeClient
23
24
  }
24
25
  end
25
26
 
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
26
32
  # Attribute type mapping.
27
33
  def self.openapi_types
28
34
  {
@@ -55,12 +61,15 @@ module PulpOstreeClient
55
61
  if (value = attributes[:'roles']).is_a?(Array)
56
62
  self.roles = value
57
63
  end
64
+ else
65
+ self.roles = 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 @roles.nil?
66
75
  invalid_properties.push('invalid value for "roles", roles cannot be nil.')
@@ -72,6 +81,7 @@ module PulpOstreeClient
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 @roles.nil?
76
86
  true
77
87
  end
@@ -100,37 +110,33 @@ module PulpOstreeClient
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
- self.class.openapi_types.each_pair do |key, type|
112
- if type =~ /\AArray<(.*)>/i
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[self.class.attribute_map[key]].is_a?(Array)
116
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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[self.class.attribute_map[key]].nil?
119
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
- end # or else data not found in attributes(hash), not an issue as the data can be optional
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 :DateTime
133
- DateTime.parse(value)
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 PulpOstreeClient
160
166
  end
161
167
  end
162
168
  else # model
163
- PulpOstreeClient.const_get(type).build_from_hash(value)
169
+ # models (e.g. Pet) or oneOf
170
+ klass = PulpOstreeClient.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 PulpOstreeClient
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 PulpOstreeClient
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
- 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 PulpOstreeClient
16
17
  # A Serializer class for importing all refs and commits to a repository.
@@ -29,6 +30,11 @@ module PulpOstreeClient
29
30
  }
30
31
  end
31
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
@@ -60,16 +66,21 @@ module PulpOstreeClient
60
66
 
61
67
  if attributes.key?(:'artifact')
62
68
  self.artifact = attributes[:'artifact']
69
+ else
70
+ self.artifact = nil
63
71
  end
64
72
 
65
73
  if attributes.key?(:'repository_name')
66
74
  self.repository_name = attributes[:'repository_name']
75
+ else
76
+ self.repository_name = nil
67
77
  end
68
78
  end
69
79
 
70
80
  # Show invalid properties with the reasons. Usually used together with valid?
71
81
  # @return Array for valid properties with the reasons
72
82
  def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
73
84
  invalid_properties = Array.new
74
85
  if @artifact.nil?
75
86
  invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
@@ -89,6 +100,7 @@ module PulpOstreeClient
89
100
  # Check to see if the all the properties in the model are valid
90
101
  # @return true if the model is valid
91
102
  def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
104
  return false if @artifact.nil?
93
105
  return false if @repository_name.nil?
94
106
  return false if @repository_name.to_s.length < 1
@@ -134,37 +146,33 @@ module PulpOstreeClient
134
146
  # @param [Hash] attributes Model attributes in the form of hash
135
147
  # @return [Object] Returns the model itself
136
148
  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
149
  return nil unless attributes.is_a?(Hash)
145
- self.class.openapi_types.each_pair do |key, type|
146
- if type =~ /\AArray<(.*)>/i
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
147
156
  # check to ensure the input is an array given that the attribute
148
157
  # is documented as an array but the input is not
149
- if attributes[self.class.attribute_map[key]].is_a?(Array)
150
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
151
160
  end
152
- elsif !attributes[self.class.attribute_map[key]].nil?
153
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
- end # or else data not found in attributes(hash), not an issue as the data can be optional
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
155
164
  end
156
-
157
- self
165
+ new(transformed_hash)
158
166
  end
159
167
 
160
168
  # Deserializes the data based on type
161
169
  # @param string type Data type
162
170
  # @param string value Value to be deserialized
163
171
  # @return [Object] Deserialized data
164
- def _deserialize(type, value)
172
+ def self._deserialize(type, value)
165
173
  case type.to_sym
166
- when :DateTime
167
- DateTime.parse(value)
174
+ when :Time
175
+ Time.parse(value)
168
176
  when :Date
169
177
  Date.parse(value)
170
178
  when :String
@@ -194,7 +202,9 @@ module PulpOstreeClient
194
202
  end
195
203
  end
196
204
  else # model
197
- PulpOstreeClient.const_get(type).build_from_hash(value)
205
+ # models (e.g. Pet) or oneOf
206
+ klass = PulpOstreeClient.const_get(type)
207
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
208
  end
199
209
  end
200
210
 
@@ -220,7 +230,7 @@ module PulpOstreeClient
220
230
  is_nullable = self.class.openapi_nullable.include?(attr)
221
231
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
232
  end
223
-
233
+
224
234
  hash[param] = _to_hash(value)
225
235
  end
226
236
  hash
@@ -243,5 +253,7 @@ module PulpOstreeClient
243
253
  value
244
254
  end
245
255
  end
256
+
246
257
  end
258
+
247
259
  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 PulpOstreeClient
16
17
  # A Serializer class for appending child commits to a repository.
@@ -33,6 +34,11 @@ module PulpOstreeClient
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
  {
@@ -65,20 +71,27 @@ module PulpOstreeClient
65
71
 
66
72
  if attributes.key?(:'artifact')
67
73
  self.artifact = attributes[:'artifact']
74
+ else
75
+ self.artifact = nil
68
76
  end
69
77
 
70
78
  if attributes.key?(:'repository_name')
71
79
  self.repository_name = attributes[:'repository_name']
80
+ else
81
+ self.repository_name = nil
72
82
  end
73
83
 
74
84
  if attributes.key?(:'ref')
75
85
  self.ref = attributes[:'ref']
86
+ else
87
+ self.ref = nil
76
88
  end
77
89
  end
78
90
 
79
91
  # Show invalid properties with the reasons. Usually used together with valid?
80
92
  # @return Array for valid properties with the reasons
81
93
  def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
82
95
  invalid_properties = Array.new
83
96
  if @artifact.nil?
84
97
  invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
@@ -106,6 +119,7 @@ module PulpOstreeClient
106
119
  # Check to see if the all the properties in the model are valid
107
120
  # @return true if the model is valid
108
121
  def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
123
  return false if @artifact.nil?
110
124
  return false if @repository_name.nil?
111
125
  return false if @repository_name.to_s.length < 1
@@ -168,37 +182,33 @@ module PulpOstreeClient
168
182
  # @param [Hash] attributes Model attributes in the form of hash
169
183
  # @return [Object] Returns the model itself
170
184
  def self.build_from_hash(attributes)
171
- new.build_from_hash(attributes)
172
- end
173
-
174
- # Builds the object from hash
175
- # @param [Hash] attributes Model attributes in the form of hash
176
- # @return [Object] Returns the model itself
177
- def build_from_hash(attributes)
178
185
  return nil unless attributes.is_a?(Hash)
179
- self.class.openapi_types.each_pair do |key, type|
180
- if type =~ /\AArray<(.*)>/i
186
+ attributes = attributes.transform_keys(&:to_sym)
187
+ transformed_hash = {}
188
+ openapi_types.each_pair do |key, type|
189
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = nil
191
+ elsif type =~ /\AArray<(.*)>/i
181
192
  # check to ensure the input is an array given that the attribute
182
193
  # is documented as an array but the input is not
183
- if attributes[self.class.attribute_map[key]].is_a?(Array)
184
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ if attributes[attribute_map[key]].is_a?(Array)
195
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
185
196
  end
186
- elsif !attributes[self.class.attribute_map[key]].nil?
187
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
- end # or else data not found in attributes(hash), not an issue as the data can be optional
197
+ elsif !attributes[attribute_map[key]].nil?
198
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
199
+ end
189
200
  end
190
-
191
- self
201
+ new(transformed_hash)
192
202
  end
193
203
 
194
204
  # Deserializes the data based on type
195
205
  # @param string type Data type
196
206
  # @param string value Value to be deserialized
197
207
  # @return [Object] Deserialized data
198
- def _deserialize(type, value)
208
+ def self._deserialize(type, value)
199
209
  case type.to_sym
200
- when :DateTime
201
- DateTime.parse(value)
210
+ when :Time
211
+ Time.parse(value)
202
212
  when :Date
203
213
  Date.parse(value)
204
214
  when :String
@@ -228,7 +238,9 @@ module PulpOstreeClient
228
238
  end
229
239
  end
230
240
  else # model
231
- PulpOstreeClient.const_get(type).build_from_hash(value)
241
+ # models (e.g. Pet) or oneOf
242
+ klass = PulpOstreeClient.const_get(type)
243
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
232
244
  end
233
245
  end
234
246
 
@@ -254,7 +266,7 @@ module PulpOstreeClient
254
266
  is_nullable = self.class.openapi_nullable.include?(attr)
255
267
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
256
268
  end
257
-
269
+
258
270
  hash[param] = _to_hash(value)
259
271
  end
260
272
  hash
@@ -277,5 +289,7 @@ module PulpOstreeClient
277
289
  value
278
290
  end
279
291
  end
292
+
280
293
  end
294
+
281
295
  end