pulp_rpm_client 3.0.0b71572533171 → 3.0.0rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +63 -22
  3. data/docs/ContentAdvisoriesApi.md +15 -7
  4. data/docs/ContentDistributionTreesApi.md +2 -2
  5. data/docs/ContentModulemdDefaultsApi.md +6 -6
  6. data/docs/{ContentModulemdApi.md → ContentModulemdsApi.md} +14 -14
  7. data/docs/ContentPackagecategoriesApi.md +189 -0
  8. data/docs/ContentPackageenvironmentsApi.md +189 -0
  9. data/docs/ContentPackagegroupsApi.md +189 -0
  10. data/docs/ContentPackagelangpacksApi.md +189 -0
  11. data/docs/ContentPackagesApi.md +4 -4
  12. data/docs/ContentRepoMetadataFilesApi.md +4 -4
  13. data/docs/ContentSummary.md +21 -0
  14. data/docs/DistributionsRpmApi.md +10 -10
  15. data/docs/InlineResponse200.md +1 -1
  16. data/docs/InlineResponse2001.md +1 -1
  17. data/docs/InlineResponse20010.md +23 -0
  18. data/docs/InlineResponse20011.md +23 -0
  19. data/docs/InlineResponse20012.md +23 -0
  20. data/docs/InlineResponse20013.md +23 -0
  21. data/docs/InlineResponse20014.md +23 -0
  22. data/docs/InlineResponse2002.md +1 -1
  23. data/docs/InlineResponse2003.md +1 -1
  24. data/docs/InlineResponse2004.md +1 -1
  25. data/docs/InlineResponse2005.md +1 -1
  26. data/docs/InlineResponse2006.md +1 -1
  27. data/docs/InlineResponse2007.md +1 -1
  28. data/docs/InlineResponse2008.md +1 -1
  29. data/docs/InlineResponse2009.md +23 -0
  30. data/docs/PublicationsRpmApi.md +6 -6
  31. data/docs/RemotesRpmApi.md +12 -68
  32. data/docs/RepositoriesRpmApi.md +465 -0
  33. data/docs/RepositoriesRpmVersionsApi.md +214 -0
  34. data/docs/RepositoryAddRemoveContent.md +21 -0
  35. data/docs/RepositorySyncURL.md +2 -2
  36. data/docs/RepositoryVersion.md +25 -0
  37. data/docs/{DistributionTree.md → RpmDistributionTree.md} +2 -2
  38. data/docs/{Modulemd.md → RpmModulemd.md} +2 -8
  39. data/docs/{ModulemdDefaults.md → RpmModulemdDefaults.md} +2 -8
  40. data/docs/{Package.md → RpmPackage.md} +2 -8
  41. data/docs/RpmPackageCategory.md +33 -0
  42. data/docs/RpmPackageEnvironment.md +37 -0
  43. data/docs/RpmPackageGroup.md +39 -0
  44. data/docs/RpmPackageLangpacks.md +19 -0
  45. data/docs/{RepoMetadataFile.md → RpmRepoMetadataFile.md} +2 -8
  46. data/docs/{RpmDistribution.md → RpmRpmDistribution.md} +2 -2
  47. data/docs/{RpmPublication.md → RpmRpmPublication.md} +2 -2
  48. data/docs/{RpmRemote.md → RpmRpmRemote.md} +10 -14
  49. data/docs/RpmRpmRepository.md +27 -0
  50. data/docs/RpmUpdateCollection.md +21 -0
  51. data/docs/{UpdateRecord.md → RpmUpdateRecord.md} +24 -20
  52. data/lib/pulp_rpm_client/api/content_advisories_api.rb +28 -14
  53. data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +4 -4
  54. data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +8 -8
  55. data/lib/pulp_rpm_client/api/{content_modulemd_api.rb → content_modulemds_api.rb} +30 -30
  56. data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +227 -0
  57. data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +227 -0
  58. data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +227 -0
  59. data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +227 -0
  60. data/lib/pulp_rpm_client/api/content_packages_api.rb +7 -7
  61. data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +7 -7
  62. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +13 -13
  63. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +9 -9
  64. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +16 -86
  65. data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +568 -0
  66. data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +268 -0
  67. data/lib/pulp_rpm_client/api_client.rb +1 -1
  68. data/lib/pulp_rpm_client/api_error.rb +1 -1
  69. data/lib/pulp_rpm_client/configuration.rb +1 -1
  70. data/lib/pulp_rpm_client/models/addon.rb +12 -2
  71. data/lib/pulp_rpm_client/models/artifact.rb +18 -2
  72. data/lib/pulp_rpm_client/models/async_operation_response.rb +12 -2
  73. data/lib/pulp_rpm_client/models/checksum.rb +12 -2
  74. data/lib/pulp_rpm_client/models/content_summary.rb +246 -0
  75. data/lib/pulp_rpm_client/models/image.rb +12 -2
  76. data/lib/pulp_rpm_client/models/inline_response200.rb +15 -3
  77. data/lib/pulp_rpm_client/models/inline_response2001.rb +15 -3
  78. data/lib/pulp_rpm_client/models/inline_response20010.rb +247 -0
  79. data/lib/pulp_rpm_client/models/inline_response20011.rb +247 -0
  80. data/lib/pulp_rpm_client/models/inline_response20012.rb +247 -0
  81. data/lib/pulp_rpm_client/models/inline_response20013.rb +247 -0
  82. data/lib/pulp_rpm_client/models/inline_response20014.rb +247 -0
  83. data/lib/pulp_rpm_client/models/inline_response2002.rb +15 -3
  84. data/lib/pulp_rpm_client/models/inline_response2003.rb +15 -3
  85. data/lib/pulp_rpm_client/models/inline_response2004.rb +15 -3
  86. data/lib/pulp_rpm_client/models/inline_response2005.rb +15 -3
  87. data/lib/pulp_rpm_client/models/inline_response2006.rb +15 -3
  88. data/lib/pulp_rpm_client/models/inline_response2007.rb +15 -3
  89. data/lib/pulp_rpm_client/models/inline_response2008.rb +15 -3
  90. data/lib/pulp_rpm_client/models/inline_response2009.rb +247 -0
  91. data/lib/pulp_rpm_client/models/repository_add_remove_content.rb +231 -0
  92. data/lib/pulp_rpm_client/models/repository_sync_url.rb +22 -12
  93. data/lib/pulp_rpm_client/models/repository_version.rb +244 -0
  94. data/lib/pulp_rpm_client/models/{distribution_tree.rb → rpm_distribution_tree.rb} +15 -5
  95. data/lib/pulp_rpm_client/models/{modulemd.rb → rpm_modulemd.rb} +16 -60
  96. data/lib/pulp_rpm_client/models/{modulemd_defaults.rb → rpm_modulemd_defaults.rb} +16 -60
  97. data/lib/pulp_rpm_client/models/{package.rb → rpm_package.rb} +16 -60
  98. data/lib/pulp_rpm_client/models/rpm_package_category.rb +405 -0
  99. data/lib/pulp_rpm_client/models/rpm_package_environment.rb +432 -0
  100. data/lib/pulp_rpm_client/models/rpm_package_group.rb +435 -0
  101. data/lib/pulp_rpm_client/models/rpm_package_langpacks.rb +246 -0
  102. data/lib/pulp_rpm_client/models/{repo_metadata_file.rb → rpm_repo_metadata_file.rb} +16 -60
  103. data/lib/pulp_rpm_client/models/{rpm_distribution.rb → rpm_rpm_distribution.rb} +17 -23
  104. data/lib/pulp_rpm_client/models/{rpm_publication.rb → rpm_rpm_publication.rb} +16 -5
  105. data/lib/pulp_rpm_client/models/{rpm_remote.rb → rpm_rpm_remote.rb} +69 -105
  106. data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +294 -0
  107. data/lib/pulp_rpm_client/models/rpm_update_collection.rb +240 -0
  108. data/lib/pulp_rpm_client/models/{update_record.rb → rpm_update_record.rb} +49 -239
  109. data/lib/pulp_rpm_client/models/variant.rb +12 -2
  110. data/lib/pulp_rpm_client/version.rb +2 -2
  111. data/lib/pulp_rpm_client.rb +32 -12
  112. data/pulp_rpm_client.gemspec +1 -1
  113. data/spec/api/content_advisories_api_spec.rb +6 -3
  114. data/spec/api/content_distribution_trees_api_spec.rb +2 -2
  115. data/spec/api/content_modulemd_defaults_api_spec.rb +3 -3
  116. data/spec/api/{content_modulemd_api_spec.rb → content_modulemds_api_spec.rb} +9 -9
  117. data/spec/api/content_packagecategories_api_spec.rb +79 -0
  118. data/spec/api/content_packageenvironments_api_spec.rb +79 -0
  119. data/spec/api/content_packagegroups_api_spec.rb +79 -0
  120. data/spec/api/content_packagelangpacks_api_spec.rb +79 -0
  121. data/spec/api/content_packages_api_spec.rb +3 -3
  122. data/spec/api/content_repo_metadata_files_api_spec.rb +3 -3
  123. data/spec/api/distributions_rpm_api_spec.rb +3 -3
  124. data/spec/api/publications_rpm_api_spec.rb +3 -3
  125. data/spec/api/remotes_rpm_api_spec.rb +4 -17
  126. data/spec/api/repositories_rpm_api_spec.rb +141 -0
  127. data/spec/api/repositories_rpm_versions_api_spec.rb +91 -0
  128. data/spec/api_client_spec.rb +1 -1
  129. data/spec/configuration_spec.rb +1 -1
  130. data/spec/models/addon_spec.rb +1 -1
  131. data/spec/models/artifact_spec.rb +1 -1
  132. data/spec/models/async_operation_response_spec.rb +1 -1
  133. data/spec/models/checksum_spec.rb +1 -1
  134. data/spec/models/content_summary_spec.rb +53 -0
  135. data/spec/models/image_spec.rb +1 -1
  136. data/spec/models/inline_response20010_spec.rb +59 -0
  137. data/spec/models/inline_response20011_spec.rb +59 -0
  138. data/spec/models/inline_response20012_spec.rb +59 -0
  139. data/spec/models/inline_response20013_spec.rb +59 -0
  140. data/spec/models/inline_response20014_spec.rb +59 -0
  141. data/spec/models/inline_response2001_spec.rb +1 -1
  142. data/spec/models/inline_response2002_spec.rb +1 -1
  143. data/spec/models/inline_response2003_spec.rb +1 -1
  144. data/spec/models/inline_response2004_spec.rb +1 -1
  145. data/spec/models/inline_response2005_spec.rb +1 -1
  146. data/spec/models/inline_response2006_spec.rb +1 -1
  147. data/spec/models/inline_response2007_spec.rb +1 -1
  148. data/spec/models/inline_response2008_spec.rb +1 -1
  149. data/spec/models/inline_response2009_spec.rb +59 -0
  150. data/spec/models/inline_response200_spec.rb +1 -1
  151. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  152. data/spec/models/repository_sync_url_spec.rb +2 -2
  153. data/spec/models/repository_version_spec.rb +65 -0
  154. data/spec/models/{distribution_tree_spec.rb → rpm_distribution_tree_spec.rb} +7 -7
  155. data/spec/models/{modulemd_defaults_spec.rb → rpm_modulemd_defaults_spec.rb} +7 -25
  156. data/spec/models/{modulemd_spec.rb → rpm_modulemd_spec.rb} +7 -25
  157. data/spec/models/{repo_metadata_file_spec.rb → rpm_package_category_spec.rb} +16 -16
  158. data/spec/models/rpm_package_environment_spec.rb +101 -0
  159. data/spec/models/rpm_package_group_spec.rb +107 -0
  160. data/spec/models/rpm_package_langpacks_spec.rb +47 -0
  161. data/spec/models/{package_spec.rb → rpm_package_spec.rb} +7 -25
  162. data/spec/models/rpm_repo_metadata_file_spec.rb +71 -0
  163. data/spec/models/{rpm_distribution_spec.rb → rpm_rpm_distribution_spec.rb} +7 -7
  164. data/spec/models/{rpm_publication_spec.rb → rpm_rpm_publication_spec.rb} +7 -7
  165. data/spec/models/{rpm_remote_spec.rb → rpm_rpm_remote_spec.rb} +11 -23
  166. data/spec/models/rpm_rpm_repository_spec.rb +71 -0
  167. data/spec/models/rpm_update_collection_spec.rb +53 -0
  168. data/spec/models/{update_record_spec.rb → rpm_update_record_spec.rb} +19 -7
  169. data/spec/models/variant_spec.rb +1 -1
  170. data/spec/spec_helper.rb +1 -1
  171. metadata +126 -46
  172. data/docs/RpmCopyApi.md +0 -70
  173. data/lib/pulp_rpm_client/api/rpm_copy_api.rb +0 -96
  174. data/spec/api/rpm_copy_api_spec.rb +0 -50
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpRpmClient
16
+ class RepositoryVersion
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ attr_accessor :number
23
+
24
+ # A repository version whose content was used as the initial set of content for this repository version
25
+ attr_accessor :base_version
26
+
27
+ attr_accessor :content_summary
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'pulp_href' => :'pulp_href',
33
+ :'pulp_created' => :'pulp_created',
34
+ :'number' => :'number',
35
+ :'base_version' => :'base_version',
36
+ :'content_summary' => :'content_summary'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'pulp_href' => :'String',
44
+ :'pulp_created' => :'DateTime',
45
+ :'number' => :'Integer',
46
+ :'base_version' => :'String',
47
+ :'content_summary' => :'ContentSummary'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RepositoryVersion` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RepositoryVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'pulp_href')
73
+ self.pulp_href = attributes[:'pulp_href']
74
+ end
75
+
76
+ if attributes.key?(:'pulp_created')
77
+ self.pulp_created = attributes[:'pulp_created']
78
+ end
79
+
80
+ if attributes.key?(:'number')
81
+ self.number = attributes[:'number']
82
+ end
83
+
84
+ if attributes.key?(:'base_version')
85
+ self.base_version = attributes[:'base_version']
86
+ end
87
+
88
+ if attributes.key?(:'content_summary')
89
+ self.content_summary = attributes[:'content_summary']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ pulp_href == o.pulp_href &&
112
+ pulp_created == o.pulp_created &&
113
+ number == o.number &&
114
+ base_version == o.base_version &&
115
+ content_summary == o.content_summary
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [pulp_href, pulp_created, number, base_version, content_summary].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ new.build_from_hash(attributes)
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
147
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
148
+ end
149
+ elsif !attributes[self.class.attribute_map[key]].nil?
150
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
152
+ end
153
+
154
+ self
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def _deserialize(type, value)
162
+ case type.to_sym
163
+ when :DateTime
164
+ DateTime.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ PulpRpmClient.const_get(type).build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+ end
244
+ end
@@ -6,14 +6,14 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpRpmClient
16
- class DistributionTree
16
+ class RpmDistributionTree
17
17
  attr_accessor :pulp_href
18
18
 
19
19
  # Header Version.
@@ -116,17 +116,23 @@ module PulpRpmClient
116
116
  }
117
117
  end
118
118
 
119
+ # List of attributes with nullable: true
120
+ def self.openapi_nullable
121
+ Set.new([
122
+ ])
123
+ end
124
+
119
125
  # Initializes the object
120
126
  # @param [Hash] attributes Model attributes in the form of hash
121
127
  def initialize(attributes = {})
122
128
  if (!attributes.is_a?(Hash))
123
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::DistributionTree` initialize method"
129
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmDistributionTree` initialize method"
124
130
  end
125
131
 
126
132
  # check to see if the attribute exists and convert string to symbol for hash key
127
133
  attributes = attributes.each_with_object({}) { |(k, v), h|
128
134
  if (!self.class.attribute_map.key?(k.to_sym))
129
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::DistributionTree`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
135
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RpmDistributionTree`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
130
136
  end
131
137
  h[k.to_sym] = v
132
138
  }
@@ -633,7 +639,11 @@ module PulpRpmClient
633
639
  hash = {}
634
640
  self.class.attribute_map.each_pair do |attr, param|
635
641
  value = self.send(attr)
636
- next if value.nil?
642
+ if value.nil?
643
+ is_nullable = self.class.openapi_nullable.include?(attr)
644
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
645
+ end
646
+
637
647
  hash[param] = _to_hash(value)
638
648
  end
639
649
  hash
@@ -6,14 +6,14 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpRpmClient
16
- class Modulemd
16
+ class RpmModulemd
17
17
  attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
@@ -22,15 +22,6 @@ module PulpRpmClient
22
22
  # Artifact file representing the physical content
23
23
  attr_accessor :artifact
24
24
 
25
- # Path where the artifact is located relative to distributions base_path
26
- attr_accessor :relative_path
27
-
28
- # An uploaded file that should be turned into the artifact of the content unit.
29
- attr_accessor :file
30
-
31
- # A URI of a repository the new content unit should be associated with.
32
- attr_accessor :repository
33
-
34
25
  # Modulemd name.
35
26
  attr_accessor :name
36
27
 
@@ -61,9 +52,6 @@ module PulpRpmClient
61
52
  :'pulp_href' => :'pulp_href',
62
53
  :'pulp_created' => :'pulp_created',
63
54
  :'artifact' => :'artifact',
64
- :'relative_path' => :'relative_path',
65
- :'file' => :'file',
66
- :'repository' => :'repository',
67
55
  :'name' => :'name',
68
56
  :'stream' => :'stream',
69
57
  :'version' => :'version',
@@ -81,9 +69,6 @@ module PulpRpmClient
81
69
  :'pulp_href' => :'String',
82
70
  :'pulp_created' => :'DateTime',
83
71
  :'artifact' => :'String',
84
- :'relative_path' => :'String',
85
- :'file' => :'String',
86
- :'repository' => :'String',
87
72
  :'name' => :'String',
88
73
  :'stream' => :'String',
89
74
  :'version' => :'String',
@@ -95,17 +80,23 @@ module PulpRpmClient
95
80
  }
96
81
  end
97
82
 
83
+ # List of attributes with nullable: true
84
+ def self.openapi_nullable
85
+ Set.new([
86
+ ])
87
+ end
88
+
98
89
  # Initializes the object
99
90
  # @param [Hash] attributes Model attributes in the form of hash
100
91
  def initialize(attributes = {})
101
92
  if (!attributes.is_a?(Hash))
102
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::Modulemd` initialize method"
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmModulemd` initialize method"
103
94
  end
104
95
 
105
96
  # check to see if the attribute exists and convert string to symbol for hash key
106
97
  attributes = attributes.each_with_object({}) { |(k, v), h|
107
98
  if (!self.class.attribute_map.key?(k.to_sym))
108
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::Modulemd`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RpmModulemd`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
100
  end
110
101
  h[k.to_sym] = v
111
102
  }
@@ -122,18 +113,6 @@ module PulpRpmClient
122
113
  self.artifact = attributes[:'artifact']
123
114
  end
124
115
 
125
- if attributes.key?(:'relative_path')
126
- self.relative_path = attributes[:'relative_path']
127
- end
128
-
129
- if attributes.key?(:'file')
130
- self.file = attributes[:'file']
131
- end
132
-
133
- if attributes.key?(:'repository')
134
- self.repository = attributes[:'repository']
135
- end
136
-
137
116
  if attributes.key?(:'name')
138
117
  self.name = attributes[:'name']
139
118
  end
@@ -173,14 +152,6 @@ module PulpRpmClient
173
152
  # @return Array for valid properties with the reasons
174
153
  def list_invalid_properties
175
154
  invalid_properties = Array.new
176
- if @relative_path.nil?
177
- invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
178
- end
179
-
180
- if @relative_path.to_s.length < 1
181
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
182
- end
183
-
184
155
  if @name.nil?
185
156
  invalid_properties.push('invalid value for "name", name cannot be nil.')
186
157
  end
@@ -235,8 +206,6 @@ module PulpRpmClient
235
206
  # Check to see if the all the properties in the model are valid
236
207
  # @return true if the model is valid
237
208
  def valid?
238
- return false if @relative_path.nil?
239
- return false if @relative_path.to_s.length < 1
240
209
  return false if @name.nil?
241
210
  return false if @name.to_s.length < 1
242
211
  return false if @stream.nil?
@@ -252,20 +221,6 @@ module PulpRpmClient
252
221
  true
253
222
  end
254
223
 
255
- # Custom attribute writer method with validation
256
- # @param [Object] relative_path Value to be assigned
257
- def relative_path=(relative_path)
258
- if relative_path.nil?
259
- fail ArgumentError, 'relative_path cannot be nil'
260
- end
261
-
262
- if relative_path.to_s.length < 1
263
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
264
- end
265
-
266
- @relative_path = relative_path
267
- end
268
-
269
224
  # Custom attribute writer method with validation
270
225
  # @param [Object] name Value to be assigned
271
226
  def name=(name)
@@ -344,9 +299,6 @@ module PulpRpmClient
344
299
  pulp_href == o.pulp_href &&
345
300
  pulp_created == o.pulp_created &&
346
301
  artifact == o.artifact &&
347
- relative_path == o.relative_path &&
348
- file == o.file &&
349
- repository == o.repository &&
350
302
  name == o.name &&
351
303
  stream == o.stream &&
352
304
  version == o.version &&
@@ -366,7 +318,7 @@ module PulpRpmClient
366
318
  # Calculates hash code according to all attributes.
367
319
  # @return [Integer] Hash code
368
320
  def hash
369
- [pulp_href, pulp_created, artifact, relative_path, file, repository, name, stream, version, context, arch, artifacts, dependencies, packages].hash
321
+ [pulp_href, pulp_created, artifact, name, stream, version, context, arch, artifacts, dependencies, packages].hash
370
322
  end
371
323
 
372
324
  # Builds the object from hash
@@ -455,7 +407,11 @@ module PulpRpmClient
455
407
  hash = {}
456
408
  self.class.attribute_map.each_pair do |attr, param|
457
409
  value = self.send(attr)
458
- next if value.nil?
410
+ if value.nil?
411
+ is_nullable = self.class.openapi_nullable.include?(attr)
412
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
413
+ end
414
+
459
415
  hash[param] = _to_hash(value)
460
416
  end
461
417
  hash
@@ -6,14 +6,14 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.1-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpRpmClient
16
- class ModulemdDefaults
16
+ class RpmModulemdDefaults
17
17
  attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
@@ -22,15 +22,6 @@ module PulpRpmClient
22
22
  # Artifact file representing the physical content
23
23
  attr_accessor :artifact
24
24
 
25
- # Path where the artifact is located relative to distributions base_path
26
- attr_accessor :relative_path
27
-
28
- # An uploaded file that should be turned into the artifact of the content unit.
29
- attr_accessor :file
30
-
31
- # A URI of a repository the new content unit should be associated with.
32
- attr_accessor :repository
33
-
34
25
  # Modulemd name.
35
26
  attr_accessor :_module
36
27
 
@@ -46,9 +37,6 @@ module PulpRpmClient
46
37
  :'pulp_href' => :'pulp_href',
47
38
  :'pulp_created' => :'pulp_created',
48
39
  :'artifact' => :'artifact',
49
- :'relative_path' => :'relative_path',
50
- :'file' => :'file',
51
- :'repository' => :'repository',
52
40
  :'_module' => :'module',
53
41
  :'stream' => :'stream',
54
42
  :'profiles' => :'profiles'
@@ -61,26 +49,29 @@ module PulpRpmClient
61
49
  :'pulp_href' => :'String',
62
50
  :'pulp_created' => :'DateTime',
63
51
  :'artifact' => :'String',
64
- :'relative_path' => :'String',
65
- :'file' => :'String',
66
- :'repository' => :'String',
67
52
  :'_module' => :'String',
68
53
  :'stream' => :'String',
69
54
  :'profiles' => :'Object'
70
55
  }
71
56
  end
72
57
 
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
73
64
  # Initializes the object
74
65
  # @param [Hash] attributes Model attributes in the form of hash
75
66
  def initialize(attributes = {})
76
67
  if (!attributes.is_a?(Hash))
77
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::ModulemdDefaults` initialize method"
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmModulemdDefaults` initialize method"
78
69
  end
79
70
 
80
71
  # check to see if the attribute exists and convert string to symbol for hash key
81
72
  attributes = attributes.each_with_object({}) { |(k, v), h|
82
73
  if (!self.class.attribute_map.key?(k.to_sym))
83
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::ModulemdDefaults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RpmModulemdDefaults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
75
  end
85
76
  h[k.to_sym] = v
86
77
  }
@@ -97,18 +88,6 @@ module PulpRpmClient
97
88
  self.artifact = attributes[:'artifact']
98
89
  end
99
90
 
100
- if attributes.key?(:'relative_path')
101
- self.relative_path = attributes[:'relative_path']
102
- end
103
-
104
- if attributes.key?(:'file')
105
- self.file = attributes[:'file']
106
- end
107
-
108
- if attributes.key?(:'repository')
109
- self.repository = attributes[:'repository']
110
- end
111
-
112
91
  if attributes.key?(:'_module')
113
92
  self._module = attributes[:'_module']
114
93
  end
@@ -126,14 +105,6 @@ module PulpRpmClient
126
105
  # @return Array for valid properties with the reasons
127
106
  def list_invalid_properties
128
107
  invalid_properties = Array.new
129
- if @relative_path.nil?
130
- invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
131
- end
132
-
133
- if @relative_path.to_s.length < 1
134
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
135
- end
136
-
137
108
  if @_module.nil?
138
109
  invalid_properties.push('invalid value for "_module", _module cannot be nil.')
139
110
  end
@@ -160,8 +131,6 @@ module PulpRpmClient
160
131
  # Check to see if the all the properties in the model are valid
161
132
  # @return true if the model is valid
162
133
  def valid?
163
- return false if @relative_path.nil?
164
- return false if @relative_path.to_s.length < 1
165
134
  return false if @_module.nil?
166
135
  return false if @_module.to_s.length < 1
167
136
  return false if @stream.nil?
@@ -170,20 +139,6 @@ module PulpRpmClient
170
139
  true
171
140
  end
172
141
 
173
- # Custom attribute writer method with validation
174
- # @param [Object] relative_path Value to be assigned
175
- def relative_path=(relative_path)
176
- if relative_path.nil?
177
- fail ArgumentError, 'relative_path cannot be nil'
178
- end
179
-
180
- if relative_path.to_s.length < 1
181
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
182
- end
183
-
184
- @relative_path = relative_path
185
- end
186
-
187
142
  # Custom attribute writer method with validation
188
143
  # @param [Object] _module Value to be assigned
189
144
  def _module=(_module)
@@ -220,9 +175,6 @@ module PulpRpmClient
220
175
  pulp_href == o.pulp_href &&
221
176
  pulp_created == o.pulp_created &&
222
177
  artifact == o.artifact &&
223
- relative_path == o.relative_path &&
224
- file == o.file &&
225
- repository == o.repository &&
226
178
  _module == o._module &&
227
179
  stream == o.stream &&
228
180
  profiles == o.profiles
@@ -237,7 +189,7 @@ module PulpRpmClient
237
189
  # Calculates hash code according to all attributes.
238
190
  # @return [Integer] Hash code
239
191
  def hash
240
- [pulp_href, pulp_created, artifact, relative_path, file, repository, _module, stream, profiles].hash
192
+ [pulp_href, pulp_created, artifact, _module, stream, profiles].hash
241
193
  end
242
194
 
243
195
  # Builds the object from hash
@@ -326,7 +278,11 @@ module PulpRpmClient
326
278
  hash = {}
327
279
  self.class.attribute_map.each_pair do |attr, param|
328
280
  value = self.send(attr)
329
- next if value.nil?
281
+ if value.nil?
282
+ is_nullable = self.class.openapi_nullable.include?(attr)
283
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
284
+ end
285
+
330
286
  hash[param] = _to_hash(value)
331
287
  end
332
288
  hash