pulp_deb_client 2.5.0b1 → 2.6.0b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -39
  3. data/docs/ContentGenericContentsApi.md +26 -26
  4. data/docs/ContentInstallerFileIndicesApi.md +37 -37
  5. data/docs/ContentInstallerPackagesApi.md +56 -56
  6. data/docs/ContentPackageIndicesApi.md +37 -37
  7. data/docs/ContentPackageReleaseComponentsApi.md +33 -33
  8. data/docs/ContentPackagesApi.md +58 -58
  9. data/docs/ContentReleaseArchitecturesApi.md +33 -33
  10. data/docs/ContentReleaseComponentsApi.md +33 -33
  11. data/docs/ContentReleaseFilesApi.md +37 -37
  12. data/docs/ContentReleasesApi.md +35 -35
  13. data/docs/ContentSummary.md +3 -3
  14. data/docs/ContentSummaryResponse.md +21 -0
  15. data/docs/DebAptDistribution.md +1 -7
  16. data/docs/DebAptDistributionResponse.md +29 -0
  17. data/docs/DebAptPublication.md +1 -5
  18. data/docs/DebAptPublicationResponse.md +29 -0
  19. data/docs/DebAptRemote.md +4 -10
  20. data/docs/DebAptRemoteResponse.md +57 -0
  21. data/docs/DebAptRepository.md +4 -10
  22. data/docs/DebAptRepositoryResponse.md +29 -0
  23. data/docs/DebBasePackage.md +5 -75
  24. data/docs/DebBasePackageResponse.md +93 -0
  25. data/docs/DebGenericContent.md +5 -17
  26. data/docs/DebGenericContentResponse.md +35 -0
  27. data/docs/DebInstallerFileIndex.md +2 -6
  28. data/docs/DebInstallerFileIndexResponse.md +29 -0
  29. data/docs/DebPackageIndex.md +2 -6
  30. data/docs/DebPackageIndexResponse.md +29 -0
  31. data/docs/DebPackageReleaseComponent.md +1 -5
  32. data/docs/DebPackageReleaseComponentResponse.md +23 -0
  33. data/docs/DebRelease.md +1 -5
  34. data/docs/DebReleaseArchitecture.md +1 -5
  35. data/docs/DebReleaseArchitectureResponse.md +23 -0
  36. data/docs/DebReleaseComponent.md +1 -5
  37. data/docs/DebReleaseComponentResponse.md +23 -0
  38. data/docs/DebReleaseFile.md +2 -6
  39. data/docs/DebReleaseFileResponse.md +29 -0
  40. data/docs/DebReleaseResponse.md +25 -0
  41. data/docs/DebVerbatimPublication.md +1 -5
  42. data/docs/DebVerbatimPublicationResponse.md +23 -0
  43. data/docs/DistributionsAptApi.md +110 -62
  44. data/docs/InlineResponse200.md +3 -3
  45. data/docs/InlineResponse2001.md +3 -3
  46. data/docs/InlineResponse20010.md +3 -3
  47. data/docs/InlineResponse20011.md +3 -3
  48. data/docs/InlineResponse20012.md +3 -3
  49. data/docs/InlineResponse20013.md +3 -3
  50. data/docs/InlineResponse20014.md +3 -3
  51. data/docs/InlineResponse2002.md +3 -3
  52. data/docs/InlineResponse2003.md +3 -3
  53. data/docs/InlineResponse2004.md +3 -3
  54. data/docs/InlineResponse2005.md +3 -3
  55. data/docs/InlineResponse2006.md +3 -3
  56. data/docs/InlineResponse2007.md +3 -3
  57. data/docs/InlineResponse2008.md +3 -3
  58. data/docs/InlineResponse2009.md +3 -3
  59. data/docs/PatcheddebAptDistribution.md +23 -0
  60. data/docs/PatcheddebAptRemote.md +51 -0
  61. data/docs/PatcheddebAptRepository.md +21 -0
  62. data/docs/PolicyEnum.md +16 -0
  63. data/docs/PublicationsAptApi.md +43 -43
  64. data/docs/PublicationsVerbatimApi.md +43 -43
  65. data/docs/RemotesAptApi.md +128 -68
  66. data/docs/RepositoriesAptApi.md +100 -76
  67. data/docs/RepositoriesDebVersionsApi.md +96 -64
  68. data/docs/RepositoryAddRemoveContent.md +2 -2
  69. data/docs/RepositorySyncURL.md +1 -1
  70. data/docs/RepositoryVersion.md +1 -9
  71. data/docs/RepositoryVersionResponse.md +25 -0
  72. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +36 -40
  73. data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +57 -57
  74. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +90 -82
  75. data/lib/pulp_deb_client/api/content_package_indices_api.rb +57 -57
  76. data/lib/pulp_deb_client/api/content_package_release_components_api.rb +50 -50
  77. data/lib/pulp_deb_client/api/content_packages_api.rb +92 -84
  78. data/lib/pulp_deb_client/api/content_release_architectures_api.rb +51 -51
  79. data/lib/pulp_deb_client/api/content_release_components_api.rb +51 -51
  80. data/lib/pulp_deb_client/api/content_release_files_api.rb +57 -57
  81. data/lib/pulp_deb_client/api/content_releases_api.rb +54 -54
  82. data/lib/pulp_deb_client/api/distributions_apt_api.rb +157 -94
  83. data/lib/pulp_deb_client/api/publications_apt_api.rb +65 -65
  84. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +65 -65
  85. data/lib/pulp_deb_client/api/remotes_apt_api.rb +187 -106
  86. data/lib/pulp_deb_client/api/repositories_apt_api.rb +151 -124
  87. data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +141 -96
  88. data/lib/pulp_deb_client/api_client.rb +2 -2
  89. data/lib/pulp_deb_client/api_error.rb +2 -2
  90. data/lib/pulp_deb_client/configuration.rb +3 -3
  91. data/lib/pulp_deb_client/models/async_operation_response.rb +3 -2
  92. data/lib/pulp_deb_client/models/content_summary.rb +9 -15
  93. data/lib/pulp_deb_client/models/content_summary_response.rb +240 -0
  94. data/lib/pulp_deb_client/models/deb_apt_distribution.rb +4 -85
  95. data/lib/pulp_deb_client/models/deb_apt_distribution_response.rb +279 -0
  96. data/lib/pulp_deb_client/models/deb_apt_publication.rb +4 -22
  97. data/lib/pulp_deb_client/models/deb_apt_publication_response.rb +270 -0
  98. data/lib/pulp_deb_client/models/deb_apt_remote.rb +7 -263
  99. data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +446 -0
  100. data/lib/pulp_deb_client/models/deb_apt_repository.rb +18 -78
  101. data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +271 -0
  102. data/lib/pulp_deb_client/models/deb_base_package.rb +18 -847
  103. data/lib/pulp_deb_client/models/deb_base_package_response.rb +558 -0
  104. data/lib/pulp_deb_client/models/deb_generic_content.rb +18 -185
  105. data/lib/pulp_deb_client/models/deb_generic_content_response.rb +302 -0
  106. data/lib/pulp_deb_client/models/deb_installer_file_index.rb +6 -79
  107. data/lib/pulp_deb_client/models/deb_installer_file_index_response.rb +287 -0
  108. data/lib/pulp_deb_client/models/deb_package_index.rb +6 -79
  109. data/lib/pulp_deb_client/models/deb_package_index_response.rb +287 -0
  110. data/lib/pulp_deb_client/models/deb_package_release_component.rb +4 -22
  111. data/lib/pulp_deb_client/models/deb_package_release_component_response.rb +247 -0
  112. data/lib/pulp_deb_client/models/deb_release.rb +4 -79
  113. data/lib/pulp_deb_client/models/deb_release_architecture.rb +4 -41
  114. data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +247 -0
  115. data/lib/pulp_deb_client/models/deb_release_component.rb +4 -41
  116. data/lib/pulp_deb_client/models/deb_release_component_response.rb +247 -0
  117. data/lib/pulp_deb_client/models/deb_release_file.rb +6 -90
  118. data/lib/pulp_deb_client/models/deb_release_file_response.rb +277 -0
  119. data/lib/pulp_deb_client/models/deb_release_response.rb +259 -0
  120. data/lib/pulp_deb_client/models/deb_verbatim_publication.rb +4 -22
  121. data/lib/pulp_deb_client/models/deb_verbatim_publication_response.rb +236 -0
  122. data/lib/pulp_deb_client/models/inline_response200.rb +3 -13
  123. data/lib/pulp_deb_client/models/inline_response2001.rb +3 -13
  124. data/lib/pulp_deb_client/models/inline_response20010.rb +3 -13
  125. data/lib/pulp_deb_client/models/inline_response20011.rb +3 -13
  126. data/lib/pulp_deb_client/models/inline_response20012.rb +3 -13
  127. data/lib/pulp_deb_client/models/inline_response20013.rb +3 -13
  128. data/lib/pulp_deb_client/models/inline_response20014.rb +3 -13
  129. data/lib/pulp_deb_client/models/inline_response2002.rb +3 -13
  130. data/lib/pulp_deb_client/models/inline_response2003.rb +3 -13
  131. data/lib/pulp_deb_client/models/inline_response2004.rb +3 -13
  132. data/lib/pulp_deb_client/models/inline_response2005.rb +3 -13
  133. data/lib/pulp_deb_client/models/inline_response2006.rb +3 -13
  134. data/lib/pulp_deb_client/models/inline_response2007.rb +3 -13
  135. data/lib/pulp_deb_client/models/inline_response2008.rb +3 -13
  136. data/lib/pulp_deb_client/models/inline_response2009.rb +3 -13
  137. data/lib/pulp_deb_client/models/patcheddeb_apt_distribution.rb +240 -0
  138. data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +402 -0
  139. data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +229 -0
  140. data/lib/pulp_deb_client/models/policy_enum.rb +37 -0
  141. data/lib/pulp_deb_client/models/repository_add_remove_content.rb +5 -4
  142. data/lib/pulp_deb_client/models/repository_sync_url.rb +3 -8
  143. data/lib/pulp_deb_client/models/repository_version.rb +7 -43
  144. data/lib/pulp_deb_client/models/repository_version_response.rb +246 -0
  145. data/lib/pulp_deb_client/version.rb +3 -3
  146. data/lib/pulp_deb_client.rb +22 -2
  147. data/pulp_deb_client.gemspec +4 -4
  148. data/spec/api/content_generic_contents_api_spec.rb +12 -12
  149. data/spec/api/content_installer_file_indices_api_spec.rb +17 -17
  150. data/spec/api/content_installer_packages_api_spec.rb +27 -27
  151. data/spec/api/content_package_indices_api_spec.rb +17 -17
  152. data/spec/api/content_package_release_components_api_spec.rb +15 -15
  153. data/spec/api/content_packages_api_spec.rb +28 -28
  154. data/spec/api/content_release_architectures_api_spec.rb +15 -15
  155. data/spec/api/content_release_components_api_spec.rb +15 -15
  156. data/spec/api/content_release_files_api_spec.rb +17 -17
  157. data/spec/api/content_releases_api_spec.rb +16 -16
  158. data/spec/api/distributions_apt_api_spec.rb +41 -20
  159. data/spec/api/publications_apt_api_spec.rb +17 -17
  160. data/spec/api/publications_verbatim_api_spec.rb +17 -17
  161. data/spec/api/remotes_apt_api_spec.rb +51 -24
  162. data/spec/api/repositories_apt_api_spec.rb +31 -22
  163. data/spec/api/repositories_deb_versions_api_spec.rb +40 -25
  164. data/spec/api_client_spec.rb +2 -2
  165. data/spec/configuration_spec.rb +2 -2
  166. data/spec/models/async_operation_response_spec.rb +2 -2
  167. data/spec/models/content_summary_response_spec.rb +53 -0
  168. data/spec/models/content_summary_spec.rb +2 -2
  169. data/spec/models/deb_apt_distribution_response_spec.rb +77 -0
  170. data/spec/models/deb_apt_distribution_spec.rb +2 -20
  171. data/spec/models/deb_apt_publication_response_spec.rb +77 -0
  172. data/spec/models/deb_apt_publication_spec.rb +2 -14
  173. data/spec/models/deb_apt_remote_response_spec.rb +161 -0
  174. data/spec/models/deb_apt_remote_spec.rb +2 -24
  175. data/spec/models/deb_apt_repository_response_spec.rb +77 -0
  176. data/spec/models/deb_apt_repository_spec.rb +5 -23
  177. data/spec/models/deb_base_package_response_spec.rb +269 -0
  178. data/spec/models/deb_base_package_spec.rb +4 -214
  179. data/spec/models/deb_generic_content_response_spec.rb +95 -0
  180. data/spec/models/deb_generic_content_spec.rb +4 -40
  181. data/spec/models/deb_installer_file_index_response_spec.rb +77 -0
  182. data/spec/models/deb_installer_file_index_spec.rb +2 -14
  183. data/spec/models/deb_package_index_response_spec.rb +77 -0
  184. data/spec/models/deb_package_index_spec.rb +2 -14
  185. data/spec/models/deb_package_release_component_response_spec.rb +59 -0
  186. data/spec/models/deb_package_release_component_spec.rb +2 -14
  187. data/spec/models/deb_release_architecture_response_spec.rb +59 -0
  188. data/spec/models/deb_release_architecture_spec.rb +2 -14
  189. data/spec/models/deb_release_component_response_spec.rb +59 -0
  190. data/spec/models/deb_release_component_spec.rb +2 -14
  191. data/spec/models/deb_release_file_response_spec.rb +77 -0
  192. data/spec/models/deb_release_file_spec.rb +2 -14
  193. data/spec/models/deb_release_response_spec.rb +65 -0
  194. data/spec/models/deb_release_spec.rb +2 -14
  195. data/spec/models/deb_verbatim_publication_response_spec.rb +59 -0
  196. data/spec/models/deb_verbatim_publication_spec.rb +2 -14
  197. data/spec/models/inline_response20010_spec.rb +2 -2
  198. data/spec/models/inline_response20011_spec.rb +2 -2
  199. data/spec/models/inline_response20012_spec.rb +2 -2
  200. data/spec/models/inline_response20013_spec.rb +2 -2
  201. data/spec/models/inline_response20014_spec.rb +2 -2
  202. data/spec/models/inline_response2001_spec.rb +2 -2
  203. data/spec/models/inline_response2002_spec.rb +2 -2
  204. data/spec/models/inline_response2003_spec.rb +2 -2
  205. data/spec/models/inline_response2004_spec.rb +2 -2
  206. data/spec/models/inline_response2005_spec.rb +2 -2
  207. data/spec/models/inline_response2006_spec.rb +2 -2
  208. data/spec/models/inline_response2007_spec.rb +2 -2
  209. data/spec/models/inline_response2008_spec.rb +2 -2
  210. data/spec/models/inline_response2009_spec.rb +2 -2
  211. data/spec/models/inline_response200_spec.rb +2 -2
  212. data/spec/models/patcheddeb_apt_distribution_spec.rb +59 -0
  213. data/spec/models/patcheddeb_apt_remote_spec.rb +143 -0
  214. data/spec/models/patcheddeb_apt_repository_spec.rb +53 -0
  215. data/spec/models/policy_enum_spec.rb +35 -0
  216. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  217. data/spec/models/repository_sync_url_spec.rb +2 -2
  218. data/spec/models/repository_version_response_spec.rb +65 -0
  219. data/spec/models/repository_version_spec.rb +2 -26
  220. data/spec/spec_helper.rb +2 -2
  221. metadata +120 -40
@@ -0,0 +1,558 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpDebClient
16
+ # A Serializer for InstallerPackage.
17
+ class DebBasePackageResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # Artifact file representing the physical content
24
+ attr_accessor :artifact
25
+
26
+ # Path where the artifact is located relative to distributions base_path
27
+ attr_accessor :relative_path
28
+
29
+ # The MD5 checksum if available.
30
+ attr_accessor :md5
31
+
32
+ # The SHA-1 checksum if available.
33
+ attr_accessor :sha1
34
+
35
+ # The SHA-224 checksum if available.
36
+ attr_accessor :sha224
37
+
38
+ # The SHA-256 checksum if available.
39
+ attr_accessor :sha256
40
+
41
+ # The SHA-384 checksum if available.
42
+ attr_accessor :sha384
43
+
44
+ # The SHA-512 checksum if available.
45
+ attr_accessor :sha512
46
+
47
+ attr_accessor :package
48
+
49
+ attr_accessor :source
50
+
51
+ attr_accessor :version
52
+
53
+ attr_accessor :architecture
54
+
55
+ attr_accessor :section
56
+
57
+ attr_accessor :priority
58
+
59
+ attr_accessor :origin
60
+
61
+ attr_accessor :tag
62
+
63
+ attr_accessor :bugs
64
+
65
+ attr_accessor :essential
66
+
67
+ attr_accessor :build_essential
68
+
69
+ attr_accessor :installed_size
70
+
71
+ attr_accessor :maintainer
72
+
73
+ attr_accessor :original_maintainer
74
+
75
+ attr_accessor :description
76
+
77
+ attr_accessor :description_md5
78
+
79
+ attr_accessor :homepage
80
+
81
+ attr_accessor :built_using
82
+
83
+ attr_accessor :auto_built_package
84
+
85
+ attr_accessor :multi_arch
86
+
87
+ attr_accessor :breaks
88
+
89
+ attr_accessor :conflicts
90
+
91
+ attr_accessor :depends
92
+
93
+ attr_accessor :recommends
94
+
95
+ attr_accessor :suggests
96
+
97
+ attr_accessor :enhances
98
+
99
+ attr_accessor :pre_depends
100
+
101
+ attr_accessor :provides
102
+
103
+ attr_accessor :replaces
104
+
105
+ # Attribute mapping from ruby-style variable name to JSON key.
106
+ def self.attribute_map
107
+ {
108
+ :'pulp_href' => :'pulp_href',
109
+ :'pulp_created' => :'pulp_created',
110
+ :'artifact' => :'artifact',
111
+ :'relative_path' => :'relative_path',
112
+ :'md5' => :'md5',
113
+ :'sha1' => :'sha1',
114
+ :'sha224' => :'sha224',
115
+ :'sha256' => :'sha256',
116
+ :'sha384' => :'sha384',
117
+ :'sha512' => :'sha512',
118
+ :'package' => :'package',
119
+ :'source' => :'source',
120
+ :'version' => :'version',
121
+ :'architecture' => :'architecture',
122
+ :'section' => :'section',
123
+ :'priority' => :'priority',
124
+ :'origin' => :'origin',
125
+ :'tag' => :'tag',
126
+ :'bugs' => :'bugs',
127
+ :'essential' => :'essential',
128
+ :'build_essential' => :'build_essential',
129
+ :'installed_size' => :'installed_size',
130
+ :'maintainer' => :'maintainer',
131
+ :'original_maintainer' => :'original_maintainer',
132
+ :'description' => :'description',
133
+ :'description_md5' => :'description_md5',
134
+ :'homepage' => :'homepage',
135
+ :'built_using' => :'built_using',
136
+ :'auto_built_package' => :'auto_built_package',
137
+ :'multi_arch' => :'multi_arch',
138
+ :'breaks' => :'breaks',
139
+ :'conflicts' => :'conflicts',
140
+ :'depends' => :'depends',
141
+ :'recommends' => :'recommends',
142
+ :'suggests' => :'suggests',
143
+ :'enhances' => :'enhances',
144
+ :'pre_depends' => :'pre_depends',
145
+ :'provides' => :'provides',
146
+ :'replaces' => :'replaces'
147
+ }
148
+ end
149
+
150
+ # Attribute type mapping.
151
+ def self.openapi_types
152
+ {
153
+ :'pulp_href' => :'String',
154
+ :'pulp_created' => :'DateTime',
155
+ :'artifact' => :'String',
156
+ :'relative_path' => :'String',
157
+ :'md5' => :'String',
158
+ :'sha1' => :'String',
159
+ :'sha224' => :'String',
160
+ :'sha256' => :'String',
161
+ :'sha384' => :'String',
162
+ :'sha512' => :'String',
163
+ :'package' => :'String',
164
+ :'source' => :'String',
165
+ :'version' => :'String',
166
+ :'architecture' => :'String',
167
+ :'section' => :'String',
168
+ :'priority' => :'String',
169
+ :'origin' => :'String',
170
+ :'tag' => :'String',
171
+ :'bugs' => :'String',
172
+ :'essential' => :'String',
173
+ :'build_essential' => :'String',
174
+ :'installed_size' => :'String',
175
+ :'maintainer' => :'String',
176
+ :'original_maintainer' => :'String',
177
+ :'description' => :'String',
178
+ :'description_md5' => :'String',
179
+ :'homepage' => :'String',
180
+ :'built_using' => :'String',
181
+ :'auto_built_package' => :'String',
182
+ :'multi_arch' => :'String',
183
+ :'breaks' => :'String',
184
+ :'conflicts' => :'String',
185
+ :'depends' => :'String',
186
+ :'recommends' => :'String',
187
+ :'suggests' => :'String',
188
+ :'enhances' => :'String',
189
+ :'pre_depends' => :'String',
190
+ :'provides' => :'String',
191
+ :'replaces' => :'String'
192
+ }
193
+ end
194
+
195
+ # List of attributes with nullable: true
196
+ def self.openapi_nullable
197
+ Set.new([
198
+ ])
199
+ end
200
+
201
+ # Initializes the object
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ def initialize(attributes = {})
204
+ if (!attributes.is_a?(Hash))
205
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebBasePackageResponse` initialize method"
206
+ end
207
+
208
+ # check to see if the attribute exists and convert string to symbol for hash key
209
+ attributes = attributes.each_with_object({}) { |(k, v), h|
210
+ if (!self.class.attribute_map.key?(k.to_sym))
211
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebBasePackageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
212
+ end
213
+ h[k.to_sym] = v
214
+ }
215
+
216
+ if attributes.key?(:'pulp_href')
217
+ self.pulp_href = attributes[:'pulp_href']
218
+ end
219
+
220
+ if attributes.key?(:'pulp_created')
221
+ self.pulp_created = attributes[:'pulp_created']
222
+ end
223
+
224
+ if attributes.key?(:'artifact')
225
+ self.artifact = attributes[:'artifact']
226
+ end
227
+
228
+ if attributes.key?(:'relative_path')
229
+ self.relative_path = attributes[:'relative_path']
230
+ end
231
+
232
+ if attributes.key?(:'md5')
233
+ self.md5 = attributes[:'md5']
234
+ end
235
+
236
+ if attributes.key?(:'sha1')
237
+ self.sha1 = attributes[:'sha1']
238
+ end
239
+
240
+ if attributes.key?(:'sha224')
241
+ self.sha224 = attributes[:'sha224']
242
+ end
243
+
244
+ if attributes.key?(:'sha256')
245
+ self.sha256 = attributes[:'sha256']
246
+ end
247
+
248
+ if attributes.key?(:'sha384')
249
+ self.sha384 = attributes[:'sha384']
250
+ end
251
+
252
+ if attributes.key?(:'sha512')
253
+ self.sha512 = attributes[:'sha512']
254
+ end
255
+
256
+ if attributes.key?(:'package')
257
+ self.package = attributes[:'package']
258
+ end
259
+
260
+ if attributes.key?(:'source')
261
+ self.source = attributes[:'source']
262
+ end
263
+
264
+ if attributes.key?(:'version')
265
+ self.version = attributes[:'version']
266
+ end
267
+
268
+ if attributes.key?(:'architecture')
269
+ self.architecture = attributes[:'architecture']
270
+ end
271
+
272
+ if attributes.key?(:'section')
273
+ self.section = attributes[:'section']
274
+ end
275
+
276
+ if attributes.key?(:'priority')
277
+ self.priority = attributes[:'priority']
278
+ end
279
+
280
+ if attributes.key?(:'origin')
281
+ self.origin = attributes[:'origin']
282
+ end
283
+
284
+ if attributes.key?(:'tag')
285
+ self.tag = attributes[:'tag']
286
+ end
287
+
288
+ if attributes.key?(:'bugs')
289
+ self.bugs = attributes[:'bugs']
290
+ end
291
+
292
+ if attributes.key?(:'essential')
293
+ self.essential = attributes[:'essential']
294
+ end
295
+
296
+ if attributes.key?(:'build_essential')
297
+ self.build_essential = attributes[:'build_essential']
298
+ end
299
+
300
+ if attributes.key?(:'installed_size')
301
+ self.installed_size = attributes[:'installed_size']
302
+ end
303
+
304
+ if attributes.key?(:'maintainer')
305
+ self.maintainer = attributes[:'maintainer']
306
+ end
307
+
308
+ if attributes.key?(:'original_maintainer')
309
+ self.original_maintainer = attributes[:'original_maintainer']
310
+ end
311
+
312
+ if attributes.key?(:'description')
313
+ self.description = attributes[:'description']
314
+ end
315
+
316
+ if attributes.key?(:'description_md5')
317
+ self.description_md5 = attributes[:'description_md5']
318
+ end
319
+
320
+ if attributes.key?(:'homepage')
321
+ self.homepage = attributes[:'homepage']
322
+ end
323
+
324
+ if attributes.key?(:'built_using')
325
+ self.built_using = attributes[:'built_using']
326
+ end
327
+
328
+ if attributes.key?(:'auto_built_package')
329
+ self.auto_built_package = attributes[:'auto_built_package']
330
+ end
331
+
332
+ if attributes.key?(:'multi_arch')
333
+ self.multi_arch = attributes[:'multi_arch']
334
+ end
335
+
336
+ if attributes.key?(:'breaks')
337
+ self.breaks = attributes[:'breaks']
338
+ end
339
+
340
+ if attributes.key?(:'conflicts')
341
+ self.conflicts = attributes[:'conflicts']
342
+ end
343
+
344
+ if attributes.key?(:'depends')
345
+ self.depends = attributes[:'depends']
346
+ end
347
+
348
+ if attributes.key?(:'recommends')
349
+ self.recommends = attributes[:'recommends']
350
+ end
351
+
352
+ if attributes.key?(:'suggests')
353
+ self.suggests = attributes[:'suggests']
354
+ end
355
+
356
+ if attributes.key?(:'enhances')
357
+ self.enhances = attributes[:'enhances']
358
+ end
359
+
360
+ if attributes.key?(:'pre_depends')
361
+ self.pre_depends = attributes[:'pre_depends']
362
+ end
363
+
364
+ if attributes.key?(:'provides')
365
+ self.provides = attributes[:'provides']
366
+ end
367
+
368
+ if attributes.key?(:'replaces')
369
+ self.replaces = attributes[:'replaces']
370
+ end
371
+ end
372
+
373
+ # Show invalid properties with the reasons. Usually used together with valid?
374
+ # @return Array for valid properties with the reasons
375
+ def list_invalid_properties
376
+ invalid_properties = Array.new
377
+ invalid_properties
378
+ end
379
+
380
+ # Check to see if the all the properties in the model are valid
381
+ # @return true if the model is valid
382
+ def valid?
383
+ true
384
+ end
385
+
386
+ # Checks equality by comparing each attribute.
387
+ # @param [Object] Object to be compared
388
+ def ==(o)
389
+ return true if self.equal?(o)
390
+ self.class == o.class &&
391
+ pulp_href == o.pulp_href &&
392
+ pulp_created == o.pulp_created &&
393
+ artifact == o.artifact &&
394
+ relative_path == o.relative_path &&
395
+ md5 == o.md5 &&
396
+ sha1 == o.sha1 &&
397
+ sha224 == o.sha224 &&
398
+ sha256 == o.sha256 &&
399
+ sha384 == o.sha384 &&
400
+ sha512 == o.sha512 &&
401
+ package == o.package &&
402
+ source == o.source &&
403
+ version == o.version &&
404
+ architecture == o.architecture &&
405
+ section == o.section &&
406
+ priority == o.priority &&
407
+ origin == o.origin &&
408
+ tag == o.tag &&
409
+ bugs == o.bugs &&
410
+ essential == o.essential &&
411
+ build_essential == o.build_essential &&
412
+ installed_size == o.installed_size &&
413
+ maintainer == o.maintainer &&
414
+ original_maintainer == o.original_maintainer &&
415
+ description == o.description &&
416
+ description_md5 == o.description_md5 &&
417
+ homepage == o.homepage &&
418
+ built_using == o.built_using &&
419
+ auto_built_package == o.auto_built_package &&
420
+ multi_arch == o.multi_arch &&
421
+ breaks == o.breaks &&
422
+ conflicts == o.conflicts &&
423
+ depends == o.depends &&
424
+ recommends == o.recommends &&
425
+ suggests == o.suggests &&
426
+ enhances == o.enhances &&
427
+ pre_depends == o.pre_depends &&
428
+ provides == o.provides &&
429
+ replaces == o.replaces
430
+ end
431
+
432
+ # @see the `==` method
433
+ # @param [Object] Object to be compared
434
+ def eql?(o)
435
+ self == o
436
+ end
437
+
438
+ # Calculates hash code according to all attributes.
439
+ # @return [Integer] Hash code
440
+ def hash
441
+ [pulp_href, pulp_created, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512, package, source, version, architecture, section, priority, origin, tag, bugs, essential, build_essential, installed_size, maintainer, original_maintainer, description, description_md5, homepage, built_using, auto_built_package, multi_arch, breaks, conflicts, depends, recommends, suggests, enhances, pre_depends, provides, replaces].hash
442
+ end
443
+
444
+ # Builds the object from hash
445
+ # @param [Hash] attributes Model attributes in the form of hash
446
+ # @return [Object] Returns the model itself
447
+ def self.build_from_hash(attributes)
448
+ new.build_from_hash(attributes)
449
+ end
450
+
451
+ # Builds the object from hash
452
+ # @param [Hash] attributes Model attributes in the form of hash
453
+ # @return [Object] Returns the model itself
454
+ def build_from_hash(attributes)
455
+ return nil unless attributes.is_a?(Hash)
456
+ self.class.openapi_types.each_pair do |key, type|
457
+ if type =~ /\AArray<(.*)>/i
458
+ # check to ensure the input is an array given that the attribute
459
+ # is documented as an array but the input is not
460
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
461
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
462
+ end
463
+ elsif !attributes[self.class.attribute_map[key]].nil?
464
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
465
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
466
+ end
467
+
468
+ self
469
+ end
470
+
471
+ # Deserializes the data based on type
472
+ # @param string type Data type
473
+ # @param string value Value to be deserialized
474
+ # @return [Object] Deserialized data
475
+ def _deserialize(type, value)
476
+ case type.to_sym
477
+ when :DateTime
478
+ DateTime.parse(value)
479
+ when :Date
480
+ Date.parse(value)
481
+ when :String
482
+ value.to_s
483
+ when :Integer
484
+ value.to_i
485
+ when :Float
486
+ value.to_f
487
+ when :Boolean
488
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
489
+ true
490
+ else
491
+ false
492
+ end
493
+ when :Object
494
+ # generic object (usually a Hash), return directly
495
+ value
496
+ when /\AArray<(?<inner_type>.+)>\z/
497
+ inner_type = Regexp.last_match[:inner_type]
498
+ value.map { |v| _deserialize(inner_type, v) }
499
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
500
+ k_type = Regexp.last_match[:k_type]
501
+ v_type = Regexp.last_match[:v_type]
502
+ {}.tap do |hash|
503
+ value.each do |k, v|
504
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
505
+ end
506
+ end
507
+ else # model
508
+ PulpDebClient.const_get(type).build_from_hash(value)
509
+ end
510
+ end
511
+
512
+ # Returns the string representation of the object
513
+ # @return [String] String presentation of the object
514
+ def to_s
515
+ to_hash.to_s
516
+ end
517
+
518
+ # to_body is an alias to to_hash (backward compatibility)
519
+ # @return [Hash] Returns the object in the form of hash
520
+ def to_body
521
+ to_hash
522
+ end
523
+
524
+ # Returns the object in the form of hash
525
+ # @return [Hash] Returns the object in the form of hash
526
+ def to_hash
527
+ hash = {}
528
+ self.class.attribute_map.each_pair do |attr, param|
529
+ value = self.send(attr)
530
+ if value.nil?
531
+ is_nullable = self.class.openapi_nullable.include?(attr)
532
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
533
+ end
534
+
535
+ hash[param] = _to_hash(value)
536
+ end
537
+ hash
538
+ end
539
+
540
+ # Outputs non-array value in the form of hash
541
+ # For object, use to_hash. Otherwise, just return the value
542
+ # @param [Object] value Any valid value
543
+ # @return [Hash] Returns the value in the form of hash
544
+ def _to_hash(value)
545
+ if value.is_a?(Array)
546
+ value.compact.map { |v| _to_hash(v) }
547
+ elsif value.is_a?(Hash)
548
+ {}.tap do |hash|
549
+ value.each { |k, v| hash[k] = _to_hash(v) }
550
+ end
551
+ elsif value.respond_to? :to_hash
552
+ value.to_hash
553
+ else
554
+ value
555
+ end
556
+ end
557
+ end
558
+ end