pulp_deb_client 2.0.0b2 → 2.0.0b3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -18
  3. data/docs/ContentGenericContentsApi.md +12 -4
  4. data/docs/ContentInstallerFileIndexApi.md +20 -8
  5. data/docs/ContentInstallerPackagesApi.md +42 -4
  6. data/docs/ContentPackageIndexApi.md +20 -8
  7. data/docs/ContentPackagesApi.md +46 -6
  8. data/docs/{ContentReleasesApi.md → ContentReleaseFilesApi.md} +44 -32
  9. data/docs/ContentSummary.md +21 -0
  10. data/docs/{InstallerPackage.md → DebBasePackage.md} +40 -46
  11. data/docs/{DebDistribution.md → DebDebDistribution.md} +6 -6
  12. data/docs/{DebPublication.md → DebDebPublication.md} +5 -7
  13. data/docs/{DebRemote.md → DebDebRemote.md} +15 -21
  14. data/docs/DebDebRepository.md +27 -0
  15. data/docs/{GenericContent.md → DebGenericContent.md} +11 -17
  16. data/docs/{InstallerFileIndex.md → DebInstallerFileIndex.md} +5 -7
  17. data/docs/{PackageIndex.md → DebPackageIndex.md} +5 -7
  18. data/docs/{Release.md → DebReleaseFile.md} +5 -7
  19. data/docs/{VerbatimPublication.md → DebVerbatimPublication.md} +5 -7
  20. data/docs/DistributionsAptApi.md +16 -12
  21. data/docs/InlineResponse200.md +1 -1
  22. data/docs/InlineResponse2001.md +1 -1
  23. data/docs/InlineResponse20010.md +23 -0
  24. data/docs/InlineResponse2002.md +1 -1
  25. data/docs/InlineResponse2003.md +1 -1
  26. data/docs/InlineResponse2004.md +1 -1
  27. data/docs/InlineResponse2005.md +1 -1
  28. data/docs/InlineResponse2006.md +1 -1
  29. data/docs/InlineResponse2007.md +1 -1
  30. data/docs/InlineResponse2008.md +1 -1
  31. data/docs/InlineResponse2009.md +1 -1
  32. data/docs/PublicationsAptApi.md +12 -8
  33. data/docs/PublicationsVerbatimApi.md +12 -8
  34. data/docs/RemotesAptApi.md +30 -81
  35. data/docs/RepositoriesAptApi.md +465 -0
  36. data/docs/RepositoriesDebVersionsApi.md +214 -0
  37. data/docs/RepositoryAddRemoveContent.md +21 -0
  38. data/docs/RepositorySyncURL.md +2 -2
  39. data/docs/RepositoryVersion.md +25 -0
  40. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +16 -4
  41. data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +27 -9
  42. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +61 -4
  43. data/lib/pulp_deb_client/api/content_package_index_api.rb +27 -9
  44. data/lib/pulp_deb_client/api/content_packages_api.rb +67 -7
  45. data/lib/pulp_deb_client/api/{content_releases_api.rb → content_release_files_api.rb} +61 -43
  46. data/lib/pulp_deb_client/api/distributions_apt_api.rb +19 -13
  47. data/lib/pulp_deb_client/api/publications_apt_api.rb +15 -9
  48. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +15 -9
  49. data/lib/pulp_deb_client/api/remotes_apt_api.rb +40 -102
  50. data/lib/pulp_deb_client/api/repositories_apt_api.rb +568 -0
  51. data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +268 -0
  52. data/lib/pulp_deb_client/api_client.rb +1 -1
  53. data/lib/pulp_deb_client/api_error.rb +1 -1
  54. data/lib/pulp_deb_client/configuration.rb +1 -1
  55. data/lib/pulp_deb_client/models/async_operation_response.rb +12 -2
  56. data/lib/pulp_deb_client/models/content_summary.rb +246 -0
  57. data/lib/pulp_deb_client/models/{package.rb → deb_base_package.rb} +28 -62
  58. data/lib/pulp_deb_client/models/{deb_distribution.rb → deb_deb_distribution.rb} +30 -36
  59. data/lib/pulp_deb_client/models/{deb_publication.rb → deb_deb_publication.rb} +29 -42
  60. data/lib/pulp_deb_client/models/{deb_remote.rb → deb_deb_remote.rb} +87 -147
  61. data/lib/pulp_deb_client/models/deb_deb_repository.rb +294 -0
  62. data/lib/pulp_deb_client/models/{generic_content.rb → deb_generic_content.rb} +28 -62
  63. data/lib/pulp_deb_client/models/{installer_file_index.rb → deb_installer_file_index.rb} +28 -42
  64. data/lib/pulp_deb_client/models/{package_index.rb → deb_package_index.rb} +28 -42
  65. data/lib/pulp_deb_client/models/{release.rb → deb_release_file.rb} +28 -42
  66. data/lib/pulp_deb_client/models/{verbatim_publication.rb → deb_verbatim_publication.rb} +29 -42
  67. data/lib/pulp_deb_client/models/inline_response200.rb +15 -3
  68. data/lib/pulp_deb_client/models/inline_response2001.rb +15 -3
  69. data/lib/pulp_deb_client/models/inline_response20010.rb +247 -0
  70. data/lib/pulp_deb_client/models/inline_response2002.rb +15 -3
  71. data/lib/pulp_deb_client/models/inline_response2003.rb +15 -3
  72. data/lib/pulp_deb_client/models/inline_response2004.rb +15 -3
  73. data/lib/pulp_deb_client/models/inline_response2005.rb +15 -3
  74. data/lib/pulp_deb_client/models/inline_response2006.rb +15 -3
  75. data/lib/pulp_deb_client/models/inline_response2007.rb +15 -3
  76. data/lib/pulp_deb_client/models/inline_response2008.rb +15 -3
  77. data/lib/pulp_deb_client/models/inline_response2009.rb +15 -3
  78. data/lib/pulp_deb_client/models/repository_add_remove_content.rb +231 -0
  79. data/lib/pulp_deb_client/models/repository_sync_url.rb +22 -12
  80. data/lib/pulp_deb_client/models/repository_version.rb +244 -0
  81. data/lib/pulp_deb_client/version.rb +2 -2
  82. data/lib/pulp_deb_client.rb +18 -12
  83. data/pulp_deb_client.gemspec +1 -1
  84. data/spec/api/content_generic_contents_api_spec.rb +6 -2
  85. data/spec/api/content_installer_file_index_api_spec.rb +9 -3
  86. data/spec/api/content_installer_packages_api_spec.rb +21 -2
  87. data/spec/api/content_package_index_api_spec.rb +9 -3
  88. data/spec/api/content_packages_api_spec.rb +23 -3
  89. data/spec/api/{content_releases_api_spec.rb → content_release_files_api_spec.rb} +23 -17
  90. data/spec/api/distributions_apt_api_spec.rb +5 -3
  91. data/spec/api/publications_apt_api_spec.rb +5 -3
  92. data/spec/api/publications_verbatim_api_spec.rb +5 -3
  93. data/spec/api/remotes_apt_api_spec.rb +12 -22
  94. data/spec/api/repositories_apt_api_spec.rb +141 -0
  95. data/spec/api/repositories_deb_versions_api_spec.rb +91 -0
  96. data/spec/api_client_spec.rb +2 -2
  97. data/spec/configuration_spec.rb +1 -1
  98. data/spec/models/async_operation_response_spec.rb +1 -1
  99. data/spec/models/content_summary_spec.rb +53 -0
  100. data/spec/models/{package_spec.rb → deb_base_package_spec.rb} +9 -27
  101. data/spec/models/{deb_distribution_spec.rb → deb_deb_distribution_spec.rb} +9 -9
  102. data/spec/models/{deb_publication_spec.rb → deb_deb_publication_spec.rb} +9 -15
  103. data/spec/models/{deb_remote_spec.rb → deb_deb_remote_spec.rb} +14 -32
  104. data/spec/models/{verbatim_publication_spec.rb → deb_deb_repository_spec.rb} +13 -13
  105. data/spec/models/{generic_content_spec.rb → deb_generic_content_spec.rb} +9 -27
  106. data/spec/models/{package_index_spec.rb → deb_installer_file_index_spec.rb} +9 -15
  107. data/spec/models/{installer_file_index_spec.rb → deb_package_index_spec.rb} +9 -15
  108. data/spec/models/{release_spec.rb → deb_release_file_spec.rb} +9 -15
  109. data/spec/models/deb_verbatim_publication_spec.rb +65 -0
  110. data/spec/models/inline_response20010_spec.rb +59 -0
  111. data/spec/models/inline_response2001_spec.rb +1 -1
  112. data/spec/models/inline_response2002_spec.rb +1 -1
  113. data/spec/models/inline_response2003_spec.rb +1 -1
  114. data/spec/models/inline_response2004_spec.rb +1 -1
  115. data/spec/models/inline_response2005_spec.rb +1 -1
  116. data/spec/models/inline_response2006_spec.rb +1 -1
  117. data/spec/models/inline_response2007_spec.rb +1 -1
  118. data/spec/models/inline_response2008_spec.rb +1 -1
  119. data/spec/models/inline_response2009_spec.rb +1 -1
  120. data/spec/models/inline_response200_spec.rb +1 -1
  121. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  122. data/spec/models/repository_sync_url_spec.rb +2 -2
  123. data/spec/models/repository_version_spec.rb +65 -0
  124. data/spec/spec_helper.rb +1 -1
  125. metadata +70 -46
  126. data/docs/Package.md +0 -99
  127. data/lib/pulp_deb_client/models/installer_package.rb +0 -1101
  128. data/spec/models/installer_package_spec.rb +0 -287
@@ -0,0 +1,294 @@
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.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpDebClient
16
+ class DebDebRepository
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ attr_accessor :versions_href
23
+
24
+ attr_accessor :latest_version_href
25
+
26
+ # A unique name for this repository.
27
+ attr_accessor :name
28
+
29
+ # An optional description.
30
+ attr_accessor :description
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'pulp_href' => :'pulp_href',
36
+ :'pulp_created' => :'pulp_created',
37
+ :'versions_href' => :'versions_href',
38
+ :'latest_version_href' => :'latest_version_href',
39
+ :'name' => :'name',
40
+ :'description' => :'description'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'pulp_href' => :'String',
48
+ :'pulp_created' => :'DateTime',
49
+ :'versions_href' => :'String',
50
+ :'latest_version_href' => :'String',
51
+ :'name' => :'String',
52
+ :'description' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'description'
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebDebRepository` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebDebRepository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'pulp_href')
79
+ self.pulp_href = attributes[:'pulp_href']
80
+ end
81
+
82
+ if attributes.key?(:'pulp_created')
83
+ self.pulp_created = attributes[:'pulp_created']
84
+ end
85
+
86
+ if attributes.key?(:'versions_href')
87
+ self.versions_href = attributes[:'versions_href']
88
+ end
89
+
90
+ if attributes.key?(:'latest_version_href')
91
+ self.latest_version_href = attributes[:'latest_version_href']
92
+ end
93
+
94
+ if attributes.key?(:'name')
95
+ self.name = attributes[:'name']
96
+ end
97
+
98
+ if attributes.key?(:'description')
99
+ self.description = attributes[:'description']
100
+ end
101
+ end
102
+
103
+ # Show invalid properties with the reasons. Usually used together with valid?
104
+ # @return Array for valid properties with the reasons
105
+ def list_invalid_properties
106
+ invalid_properties = Array.new
107
+ if @name.nil?
108
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
109
+ end
110
+
111
+ if @name.to_s.length < 1
112
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
113
+ end
114
+
115
+ if !@description.nil? && @description.to_s.length < 1
116
+ invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
117
+ end
118
+
119
+ invalid_properties
120
+ end
121
+
122
+ # Check to see if the all the properties in the model are valid
123
+ # @return true if the model is valid
124
+ def valid?
125
+ return false if @name.nil?
126
+ return false if @name.to_s.length < 1
127
+ return false if !@description.nil? && @description.to_s.length < 1
128
+ true
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] name Value to be assigned
133
+ def name=(name)
134
+ if name.nil?
135
+ fail ArgumentError, 'name cannot be nil'
136
+ end
137
+
138
+ if name.to_s.length < 1
139
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
140
+ end
141
+
142
+ @name = name
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] description Value to be assigned
147
+ def description=(description)
148
+ if !description.nil? && description.to_s.length < 1
149
+ fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
150
+ end
151
+
152
+ @description = description
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ pulp_href == o.pulp_href &&
161
+ pulp_created == o.pulp_created &&
162
+ versions_href == o.versions_href &&
163
+ latest_version_href == o.latest_version_href &&
164
+ name == o.name &&
165
+ description == o.description
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [pulp_href, pulp_created, versions_href, latest_version_href, name, description].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ new.build_from_hash(attributes)
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ self.class.openapi_types.each_pair do |key, type|
193
+ if type =~ /\AArray<(.*)>/i
194
+ # check to ensure the input is an array given that the attribute
195
+ # is documented as an array but the input is not
196
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
197
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
198
+ end
199
+ elsif !attributes[self.class.attribute_map[key]].nil?
200
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
201
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
202
+ end
203
+
204
+ self
205
+ end
206
+
207
+ # Deserializes the data based on type
208
+ # @param string type Data type
209
+ # @param string value Value to be deserialized
210
+ # @return [Object] Deserialized data
211
+ def _deserialize(type, value)
212
+ case type.to_sym
213
+ when :DateTime
214
+ DateTime.parse(value)
215
+ when :Date
216
+ Date.parse(value)
217
+ when :String
218
+ value.to_s
219
+ when :Integer
220
+ value.to_i
221
+ when :Float
222
+ value.to_f
223
+ when :Boolean
224
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
225
+ true
226
+ else
227
+ false
228
+ end
229
+ when :Object
230
+ # generic object (usually a Hash), return directly
231
+ value
232
+ when /\AArray<(?<inner_type>.+)>\z/
233
+ inner_type = Regexp.last_match[:inner_type]
234
+ value.map { |v| _deserialize(inner_type, v) }
235
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
236
+ k_type = Regexp.last_match[:k_type]
237
+ v_type = Regexp.last_match[:v_type]
238
+ {}.tap do |hash|
239
+ value.each do |k, v|
240
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
241
+ end
242
+ end
243
+ else # model
244
+ PulpDebClient.const_get(type).build_from_hash(value)
245
+ end
246
+ end
247
+
248
+ # Returns the string representation of the object
249
+ # @return [String] String presentation of the object
250
+ def to_s
251
+ to_hash.to_s
252
+ end
253
+
254
+ # to_body is an alias to to_hash (backward compatibility)
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_body
257
+ to_hash
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = self.send(attr)
266
+ if value.nil?
267
+ is_nullable = self.class.openapi_nullable.include?(attr)
268
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
269
+ end
270
+
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ # Outputs non-array value in the form of hash
277
+ # For object, use to_hash. Otherwise, just return the value
278
+ # @param [Object] value Any valid value
279
+ # @return [Hash] Returns the value in the form of hash
280
+ def _to_hash(value)
281
+ if value.is_a?(Array)
282
+ value.compact.map { |v| _to_hash(v) }
283
+ elsif value.is_a?(Hash)
284
+ {}.tap do |hash|
285
+ value.each { |k, v| hash[k] = _to_hash(v) }
286
+ end
287
+ elsif value.respond_to? :to_hash
288
+ value.to_hash
289
+ else
290
+ value
291
+ end
292
+ end
293
+ end
294
+ end
@@ -6,20 +6,18 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
- class GenericContent
17
- attr_accessor :_href
16
+ class DebGenericContent
17
+ attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
20
- attr_accessor :_created
21
-
22
- attr_accessor :_type
20
+ attr_accessor :pulp_created
23
21
 
24
22
  # Artifact file representing the physical content
25
23
  attr_accessor :artifact
@@ -27,12 +25,6 @@ module PulpDebClient
27
25
  # Path where the artifact is located relative to distributions base_path
28
26
  attr_accessor :relative_path
29
27
 
30
- # An uploaded file that should be turned into the artifact of the content unit.
31
- attr_accessor :file
32
-
33
- # A URI of a repository the new content unit should be associated with.
34
- attr_accessor :repository
35
-
36
28
  # The MD5 checksum if available.
37
29
  attr_accessor :md5
38
30
 
@@ -54,13 +46,10 @@ module PulpDebClient
54
46
  # Attribute mapping from ruby-style variable name to JSON key.
55
47
  def self.attribute_map
56
48
  {
57
- :'_href' => :'_href',
58
- :'_created' => :'_created',
59
- :'_type' => :'_type',
49
+ :'pulp_href' => :'pulp_href',
50
+ :'pulp_created' => :'pulp_created',
60
51
  :'artifact' => :'artifact',
61
52
  :'relative_path' => :'relative_path',
62
- :'file' => :'file',
63
- :'repository' => :'repository',
64
53
  :'md5' => :'md5',
65
54
  :'sha1' => :'sha1',
66
55
  :'sha224' => :'sha224',
@@ -73,13 +62,10 @@ module PulpDebClient
73
62
  # Attribute type mapping.
74
63
  def self.openapi_types
75
64
  {
76
- :'_href' => :'String',
77
- :'_created' => :'DateTime',
78
- :'_type' => :'String',
65
+ :'pulp_href' => :'String',
66
+ :'pulp_created' => :'DateTime',
79
67
  :'artifact' => :'String',
80
68
  :'relative_path' => :'String',
81
- :'file' => :'String',
82
- :'repository' => :'String',
83
69
  :'md5' => :'String',
84
70
  :'sha1' => :'String',
85
71
  :'sha224' => :'String',
@@ -89,31 +75,33 @@ module PulpDebClient
89
75
  }
90
76
  end
91
77
 
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
92
84
  # Initializes the object
93
85
  # @param [Hash] attributes Model attributes in the form of hash
94
86
  def initialize(attributes = {})
95
87
  if (!attributes.is_a?(Hash))
96
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::GenericContent` initialize method"
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebGenericContent` initialize method"
97
89
  end
98
90
 
99
91
  # check to see if the attribute exists and convert string to symbol for hash key
100
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
101
93
  if (!self.class.attribute_map.key?(k.to_sym))
102
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::GenericContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebGenericContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
103
95
  end
104
96
  h[k.to_sym] = v
105
97
  }
106
98
 
107
- if attributes.key?(:'_href')
108
- self._href = attributes[:'_href']
99
+ if attributes.key?(:'pulp_href')
100
+ self.pulp_href = attributes[:'pulp_href']
109
101
  end
110
102
 
111
- if attributes.key?(:'_created')
112
- self._created = attributes[:'_created']
113
- end
114
-
115
- if attributes.key?(:'_type')
116
- self._type = attributes[:'_type']
103
+ if attributes.key?(:'pulp_created')
104
+ self.pulp_created = attributes[:'pulp_created']
117
105
  end
118
106
 
119
107
  if attributes.key?(:'artifact')
@@ -124,14 +112,6 @@ module PulpDebClient
124
112
  self.relative_path = attributes[:'relative_path']
125
113
  end
126
114
 
127
- if attributes.key?(:'file')
128
- self.file = attributes[:'file']
129
- end
130
-
131
- if attributes.key?(:'repository')
132
- self.repository = attributes[:'repository']
133
- end
134
-
135
115
  if attributes.key?(:'md5')
136
116
  self.md5 = attributes[:'md5']
137
117
  end
@@ -161,10 +141,6 @@ module PulpDebClient
161
141
  # @return Array for valid properties with the reasons
162
142
  def list_invalid_properties
163
143
  invalid_properties = Array.new
164
- if !@_type.nil? && @_type.to_s.length < 1
165
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
166
- end
167
-
168
144
  if @relative_path.nil?
169
145
  invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
170
146
  end
@@ -203,7 +179,6 @@ module PulpDebClient
203
179
  # Check to see if the all the properties in the model are valid
204
180
  # @return true if the model is valid
205
181
  def valid?
206
- return false if !@_type.nil? && @_type.to_s.length < 1
207
182
  return false if @relative_path.nil?
208
183
  return false if @relative_path.to_s.length < 1
209
184
  return false if !@md5.nil? && @md5.to_s.length < 1
@@ -215,16 +190,6 @@ module PulpDebClient
215
190
  true
216
191
  end
217
192
 
218
- # Custom attribute writer method with validation
219
- # @param [Object] _type Value to be assigned
220
- def _type=(_type)
221
- if !_type.nil? && _type.to_s.length < 1
222
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
223
- end
224
-
225
- @_type = _type
226
- end
227
-
228
193
  # Custom attribute writer method with validation
229
194
  # @param [Object] relative_path Value to be assigned
230
195
  def relative_path=(relative_path)
@@ -304,13 +269,10 @@ module PulpDebClient
304
269
  def ==(o)
305
270
  return true if self.equal?(o)
306
271
  self.class == o.class &&
307
- _href == o._href &&
308
- _created == o._created &&
309
- _type == o._type &&
272
+ pulp_href == o.pulp_href &&
273
+ pulp_created == o.pulp_created &&
310
274
  artifact == o.artifact &&
311
275
  relative_path == o.relative_path &&
312
- file == o.file &&
313
- repository == o.repository &&
314
276
  md5 == o.md5 &&
315
277
  sha1 == o.sha1 &&
316
278
  sha224 == o.sha224 &&
@@ -328,7 +290,7 @@ module PulpDebClient
328
290
  # Calculates hash code according to all attributes.
329
291
  # @return [Integer] Hash code
330
292
  def hash
331
- [_href, _created, _type, artifact, relative_path, file, repository, md5, sha1, sha224, sha256, sha384, sha512].hash
293
+ [pulp_href, pulp_created, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512].hash
332
294
  end
333
295
 
334
296
  # Builds the object from hash
@@ -417,7 +379,11 @@ module PulpDebClient
417
379
  hash = {}
418
380
  self.class.attribute_map.each_pair do |attr, param|
419
381
  value = self.send(attr)
420
- next if value.nil?
382
+ if value.nil?
383
+ is_nullable = self.class.openapi_nullable.include?(attr)
384
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
385
+ end
386
+
421
387
  hash[param] = _to_hash(value)
422
388
  end
423
389
  hash
@@ -6,20 +6,18 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
- class InstallerFileIndex
17
- attr_accessor :_href
16
+ class DebInstallerFileIndex
17
+ attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
20
- attr_accessor :_created
21
-
22
- attr_accessor :_type
20
+ attr_accessor :pulp_created
23
21
 
24
22
  # A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/'
25
23
  attr_accessor :artifacts
@@ -39,9 +37,8 @@ module PulpDebClient
39
37
  # Attribute mapping from ruby-style variable name to JSON key.
40
38
  def self.attribute_map
41
39
  {
42
- :'_href' => :'_href',
43
- :'_created' => :'_created',
44
- :'_type' => :'_type',
40
+ :'pulp_href' => :'pulp_href',
41
+ :'pulp_created' => :'pulp_created',
45
42
  :'artifacts' => :'artifacts',
46
43
  :'release' => :'release',
47
44
  :'component' => :'component',
@@ -53,9 +50,8 @@ module PulpDebClient
53
50
  # Attribute type mapping.
54
51
  def self.openapi_types
55
52
  {
56
- :'_href' => :'String',
57
- :'_created' => :'DateTime',
58
- :'_type' => :'String',
53
+ :'pulp_href' => :'String',
54
+ :'pulp_created' => :'DateTime',
59
55
  :'artifacts' => :'Hash<String, String>',
60
56
  :'release' => :'String',
61
57
  :'component' => :'String',
@@ -64,31 +60,33 @@ module PulpDebClient
64
60
  }
65
61
  end
66
62
 
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
67
69
  # Initializes the object
68
70
  # @param [Hash] attributes Model attributes in the form of hash
69
71
  def initialize(attributes = {})
70
72
  if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::InstallerFileIndex` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebInstallerFileIndex` initialize method"
72
74
  end
73
75
 
74
76
  # check to see if the attribute exists and convert string to symbol for hash key
75
77
  attributes = attributes.each_with_object({}) { |(k, v), h|
76
78
  if (!self.class.attribute_map.key?(k.to_sym))
77
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::InstallerFileIndex`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebInstallerFileIndex`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
80
  end
79
81
  h[k.to_sym] = v
80
82
  }
81
83
 
82
- if attributes.key?(:'_href')
83
- self._href = attributes[:'_href']
84
+ if attributes.key?(:'pulp_href')
85
+ self.pulp_href = attributes[:'pulp_href']
84
86
  end
85
87
 
86
- if attributes.key?(:'_created')
87
- self._created = attributes[:'_created']
88
- end
89
-
90
- if attributes.key?(:'_type')
91
- self._type = attributes[:'_type']
88
+ if attributes.key?(:'pulp_created')
89
+ self.pulp_created = attributes[:'pulp_created']
92
90
  end
93
91
 
94
92
  if attributes.key?(:'artifacts')
@@ -118,10 +116,6 @@ module PulpDebClient
118
116
  # @return Array for valid properties with the reasons
119
117
  def list_invalid_properties
120
118
  invalid_properties = Array.new
121
- if !@_type.nil? && @_type.to_s.length < 1
122
- invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
123
- end
124
-
125
119
  if @artifacts.nil?
126
120
  invalid_properties.push('invalid value for "artifacts", artifacts cannot be nil.')
127
121
  end
@@ -156,7 +150,6 @@ module PulpDebClient
156
150
  # Check to see if the all the properties in the model are valid
157
151
  # @return true if the model is valid
158
152
  def valid?
159
- return false if !@_type.nil? && @_type.to_s.length < 1
160
153
  return false if @artifacts.nil?
161
154
  return false if @release.nil?
162
155
  return false if @component.nil?
@@ -167,16 +160,6 @@ module PulpDebClient
167
160
  true
168
161
  end
169
162
 
170
- # Custom attribute writer method with validation
171
- # @param [Object] _type Value to be assigned
172
- def _type=(_type)
173
- if !_type.nil? && _type.to_s.length < 1
174
- fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
175
- end
176
-
177
- @_type = _type
178
- end
179
-
180
163
  # Custom attribute writer method with validation
181
164
  # @param [Object] component Value to be assigned
182
165
  def component=(component)
@@ -220,9 +203,8 @@ module PulpDebClient
220
203
  def ==(o)
221
204
  return true if self.equal?(o)
222
205
  self.class == o.class &&
223
- _href == o._href &&
224
- _created == o._created &&
225
- _type == o._type &&
206
+ pulp_href == o.pulp_href &&
207
+ pulp_created == o.pulp_created &&
226
208
  artifacts == o.artifacts &&
227
209
  release == o.release &&
228
210
  component == o.component &&
@@ -239,7 +221,7 @@ module PulpDebClient
239
221
  # Calculates hash code according to all attributes.
240
222
  # @return [Integer] Hash code
241
223
  def hash
242
- [_href, _created, _type, artifacts, release, component, architecture, relative_path].hash
224
+ [pulp_href, pulp_created, artifacts, release, component, architecture, relative_path].hash
243
225
  end
244
226
 
245
227
  # Builds the object from hash
@@ -328,7 +310,11 @@ module PulpDebClient
328
310
  hash = {}
329
311
  self.class.attribute_map.each_pair do |attr, param|
330
312
  value = self.send(attr)
331
- next if value.nil?
313
+ if value.nil?
314
+ is_nullable = self.class.openapi_nullable.include?(attr)
315
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
316
+ end
317
+
332
318
  hash[param] = _to_hash(value)
333
319
  end
334
320
  hash