pulp_rpm_client 3.5.1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +73 -55
  3. data/docs/{Addon.md → AddonResponse.md} +2 -2
  4. data/docs/{Artifact.md → ArtifactResponse.md} +3 -3
  5. data/docs/{Checksum.md → ChecksumResponse.md} +2 -2
  6. data/docs/ContentAdvisoriesApi.md +44 -44
  7. data/docs/ContentDistributionTreesApi.md +25 -25
  8. data/docs/ContentModulemdDefaultsApi.md +32 -32
  9. data/docs/ContentModulemdsApi.md +34 -34
  10. data/docs/ContentPackagecategoriesApi.md +25 -25
  11. data/docs/ContentPackageenvironmentsApi.md +25 -25
  12. data/docs/ContentPackagegroupsApi.md +25 -25
  13. data/docs/ContentPackagelangpacksApi.md +25 -25
  14. data/docs/ContentPackagesApi.md +64 -64
  15. data/docs/ContentRepoMetadataFilesApi.md +25 -25
  16. data/docs/ContentSummary.md +3 -3
  17. data/docs/ContentSummaryResponse.md +21 -0
  18. data/docs/DistributionsRpmApi.md +108 -60
  19. data/docs/{Image.md → ImageResponse.md} +3 -3
  20. data/docs/InlineResponse200.md +3 -3
  21. data/docs/InlineResponse2001.md +3 -3
  22. data/docs/InlineResponse20010.md +3 -3
  23. data/docs/InlineResponse20011.md +3 -3
  24. data/docs/InlineResponse20012.md +3 -3
  25. data/docs/InlineResponse20013.md +3 -3
  26. data/docs/InlineResponse20014.md +3 -3
  27. data/docs/InlineResponse2002.md +3 -3
  28. data/docs/InlineResponse2003.md +3 -3
  29. data/docs/InlineResponse2004.md +3 -3
  30. data/docs/InlineResponse2005.md +3 -3
  31. data/docs/InlineResponse2006.md +3 -3
  32. data/docs/InlineResponse2007.md +3 -3
  33. data/docs/InlineResponse2008.md +3 -3
  34. data/docs/InlineResponse2009.md +3 -3
  35. data/docs/MetadataChecksumTypeEnum.md +16 -0
  36. data/docs/PackageChecksumTypeEnum.md +16 -0
  37. data/docs/PatchedrpmRpmDistribution.md +23 -0
  38. data/docs/PatchedrpmRpmRemote.md +39 -0
  39. data/docs/PatchedrpmRpmRepository.md +25 -0
  40. data/docs/PolicyEnum.md +16 -0
  41. data/docs/PublicationsRpmApi.md +40 -40
  42. data/docs/RemotesRpmApi.md +125 -65
  43. data/docs/RepositoriesRpmApi.md +97 -73
  44. data/docs/RepositoriesRpmVersionsApi.md +94 -62
  45. data/docs/RepositoryAddRemoveContent.md +2 -2
  46. data/docs/RepositoryVersion.md +1 -9
  47. data/docs/RepositoryVersionResponse.md +25 -0
  48. data/docs/RpmCopyApi.md +10 -10
  49. data/docs/{RpmDistributionTree.md → RpmDistributionTreeResponse.md} +6 -6
  50. data/docs/RpmModulemd.md +8 -8
  51. data/docs/RpmModulemdDefaults.md +8 -8
  52. data/docs/RpmModulemdDefaultsResponse.md +29 -0
  53. data/docs/RpmModulemdResponse.md +39 -0
  54. data/docs/RpmPackage.md +7 -79
  55. data/docs/{RpmPackageCategory.md → RpmPackageCategoryResponse.md} +2 -2
  56. data/docs/{RpmPackageEnvironment.md → RpmPackageEnvironmentResponse.md} +2 -2
  57. data/docs/{RpmPackageGroup.md → RpmPackageGroupResponse.md} +2 -2
  58. data/docs/{RpmPackageLangpacks.md → RpmPackageLangpacksResponse.md} +2 -2
  59. data/docs/RpmPackageResponse.md +95 -0
  60. data/docs/{RpmRepoMetadataFile.md → RpmRepoMetadataFileResponse.md} +2 -2
  61. data/docs/RpmRepositorySyncURL.md +1 -1
  62. data/docs/RpmRpmDistribution.md +1 -7
  63. data/docs/RpmRpmDistributionResponse.md +29 -0
  64. data/docs/RpmRpmPublication.md +3 -7
  65. data/docs/RpmRpmPublicationResponse.md +27 -0
  66. data/docs/RpmRpmRemote.md +4 -10
  67. data/docs/RpmRpmRemoteResponse.md +45 -0
  68. data/docs/RpmRpmRepository.md +3 -9
  69. data/docs/RpmRpmRepositoryResponse.md +33 -0
  70. data/docs/RpmUpdateCollection.md +1 -3
  71. data/docs/RpmUpdateCollectionResponse.md +23 -0
  72. data/docs/RpmUpdateRecord.md +4 -40
  73. data/docs/RpmUpdateRecordResponse.md +55 -0
  74. data/docs/{Variant.md → VariantResponse.md} +2 -2
  75. data/lib/pulp_rpm_client/api/content_advisories_api.rb +60 -60
  76. data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +36 -36
  77. data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +42 -54
  78. data/lib/pulp_rpm_client/api/content_modulemds_api.rb +44 -76
  79. data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +36 -36
  80. data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +36 -36
  81. data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +36 -36
  82. data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +36 -36
  83. data/lib/pulp_rpm_client/api/content_packages_api.rb +92 -92
  84. data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +36 -36
  85. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +153 -90
  86. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +59 -59
  87. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +181 -100
  88. data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +145 -118
  89. data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +137 -92
  90. data/lib/pulp_rpm_client/api/rpm_copy_api.rb +15 -15
  91. data/lib/pulp_rpm_client/api_client.rb +2 -2
  92. data/lib/pulp_rpm_client/api_error.rb +2 -2
  93. data/lib/pulp_rpm_client/configuration.rb +3 -3
  94. data/lib/pulp_rpm_client/models/{addon.rb → addon_response.rb} +6 -100
  95. data/lib/pulp_rpm_client/models/{artifact.rb → artifact_response.rb} +9 -93
  96. data/lib/pulp_rpm_client/models/async_operation_response.rb +3 -2
  97. data/lib/pulp_rpm_client/models/{checksum.rb → checksum_response.rb} +6 -43
  98. data/lib/pulp_rpm_client/models/content_summary.rb +9 -15
  99. data/lib/pulp_rpm_client/models/content_summary_response.rb +240 -0
  100. data/lib/pulp_rpm_client/models/copy.rb +3 -2
  101. data/lib/pulp_rpm_client/models/{image.rb → image_response.rb} +7 -63
  102. data/lib/pulp_rpm_client/models/inline_response200.rb +3 -13
  103. data/lib/pulp_rpm_client/models/inline_response2001.rb +3 -13
  104. data/lib/pulp_rpm_client/models/inline_response20010.rb +3 -13
  105. data/lib/pulp_rpm_client/models/inline_response20011.rb +3 -13
  106. data/lib/pulp_rpm_client/models/inline_response20012.rb +3 -13
  107. data/lib/pulp_rpm_client/models/inline_response20013.rb +3 -13
  108. data/lib/pulp_rpm_client/models/inline_response20014.rb +3 -13
  109. data/lib/pulp_rpm_client/models/inline_response2002.rb +3 -13
  110. data/lib/pulp_rpm_client/models/inline_response2003.rb +3 -13
  111. data/lib/pulp_rpm_client/models/inline_response2004.rb +3 -13
  112. data/lib/pulp_rpm_client/models/inline_response2005.rb +3 -13
  113. data/lib/pulp_rpm_client/models/inline_response2006.rb +3 -13
  114. data/lib/pulp_rpm_client/models/inline_response2007.rb +3 -13
  115. data/lib/pulp_rpm_client/models/inline_response2008.rb +3 -13
  116. data/lib/pulp_rpm_client/models/inline_response2009.rb +3 -13
  117. data/lib/pulp_rpm_client/models/metadata_checksum_type_enum.rb +41 -0
  118. data/lib/pulp_rpm_client/models/package_checksum_type_enum.rb +41 -0
  119. data/lib/pulp_rpm_client/models/patchedrpm_rpm_distribution.rb +240 -0
  120. data/lib/pulp_rpm_client/models/patchedrpm_rpm_remote.rb +340 -0
  121. data/lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb +265 -0
  122. data/lib/pulp_rpm_client/models/policy_enum.rb +37 -0
  123. data/lib/pulp_rpm_client/models/repository_add_remove_content.rb +5 -4
  124. data/lib/pulp_rpm_client/models/repository_version.rb +7 -43
  125. data/lib/pulp_rpm_client/models/repository_version_response.rb +246 -0
  126. data/lib/pulp_rpm_client/models/{rpm_distribution_tree.rb → rpm_distribution_tree_response.rb} +17 -234
  127. data/lib/pulp_rpm_client/models/rpm_modulemd.rb +42 -153
  128. data/lib/pulp_rpm_client/models/rpm_modulemd_defaults.rb +40 -86
  129. data/lib/pulp_rpm_client/models/rpm_modulemd_defaults_response.rb +282 -0
  130. data/lib/pulp_rpm_client/models/rpm_modulemd_response.rb +346 -0
  131. data/lib/pulp_rpm_client/models/rpm_package.rb +28 -501
  132. data/lib/pulp_rpm_client/models/{rpm_package_category.rb → rpm_package_category_response.rb} +10 -63
  133. data/lib/pulp_rpm_client/models/{rpm_package_environment.rb → rpm_package_environment_response.rb} +11 -68
  134. data/lib/pulp_rpm_client/models/{rpm_package_group.rb → rpm_package_group_response.rb} +10 -63
  135. data/lib/pulp_rpm_client/models/{rpm_package_langpacks.rb → rpm_package_langpacks_response.rb} +8 -34
  136. data/lib/pulp_rpm_client/models/rpm_package_response.rb +597 -0
  137. data/lib/pulp_rpm_client/models/{rpm_repo_metadata_file.rb → rpm_repo_metadata_file_response.rb} +6 -96
  138. data/lib/pulp_rpm_client/models/rpm_repository_sync_url.rb +4 -30
  139. data/lib/pulp_rpm_client/models/rpm_rpm_distribution.rb +4 -85
  140. data/lib/pulp_rpm_client/models/rpm_rpm_distribution_response.rb +279 -0
  141. data/lib/pulp_rpm_client/models/rpm_rpm_publication.rb +6 -74
  142. data/lib/pulp_rpm_client/models/rpm_rpm_publication_response.rb +256 -0
  143. data/lib/pulp_rpm_client/models/rpm_rpm_remote.rb +7 -214
  144. data/lib/pulp_rpm_client/models/rpm_rpm_remote_response.rb +379 -0
  145. data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +14 -74
  146. data/lib/pulp_rpm_client/models/rpm_rpm_repository_response.rb +307 -0
  147. data/lib/pulp_rpm_client/models/rpm_update_collection.rb +10 -34
  148. data/lib/pulp_rpm_client/models/rpm_update_collection_response.rb +243 -0
  149. data/lib/pulp_rpm_client/models/rpm_update_record.rb +18 -245
  150. data/lib/pulp_rpm_client/models/rpm_update_record_response.rb +401 -0
  151. data/lib/pulp_rpm_client/models/{variant.rb → variant_response.rb} +6 -195
  152. data/lib/pulp_rpm_client/version.rb +3 -3
  153. data/lib/pulp_rpm_client.rb +30 -13
  154. data/pulp_rpm_client.gemspec +4 -4
  155. data/spec/api/content_advisories_api_spec.rb +21 -21
  156. data/spec/api/content_distribution_trees_api_spec.rb +9 -9
  157. data/spec/api/content_modulemd_defaults_api_spec.rb +13 -13
  158. data/spec/api/content_modulemds_api_spec.rb +13 -13
  159. data/spec/api/content_packagecategories_api_spec.rb +9 -9
  160. data/spec/api/content_packageenvironments_api_spec.rb +9 -9
  161. data/spec/api/content_packagegroups_api_spec.rb +9 -9
  162. data/spec/api/content_packagelangpacks_api_spec.rb +9 -9
  163. data/spec/api/content_packages_api_spec.rb +31 -31
  164. data/spec/api/content_repo_metadata_files_api_spec.rb +9 -9
  165. data/spec/api/distributions_rpm_api_spec.rb +39 -18
  166. data/spec/api/publications_rpm_api_spec.rb +14 -14
  167. data/spec/api/remotes_rpm_api_spec.rb +48 -21
  168. data/spec/api/repositories_rpm_api_spec.rb +28 -19
  169. data/spec/api/repositories_rpm_versions_api_spec.rb +38 -23
  170. data/spec/api/rpm_copy_api_spec.rb +5 -5
  171. data/spec/api_client_spec.rb +2 -2
  172. data/spec/configuration_spec.rb +2 -2
  173. data/spec/models/{addon_spec.rb → addon_response_spec.rb} +8 -8
  174. data/spec/models/{artifact_spec.rb → artifact_response_spec.rb} +8 -8
  175. data/spec/models/async_operation_response_spec.rb +2 -2
  176. data/spec/models/{checksum_spec.rb → checksum_response_spec.rb} +8 -8
  177. data/spec/models/content_summary_response_spec.rb +53 -0
  178. data/spec/models/content_summary_spec.rb +2 -2
  179. data/spec/models/copy_spec.rb +2 -2
  180. data/spec/models/{image_spec.rb → image_response_spec.rb} +8 -8
  181. data/spec/models/inline_response20010_spec.rb +2 -2
  182. data/spec/models/inline_response20011_spec.rb +2 -2
  183. data/spec/models/inline_response20012_spec.rb +2 -2
  184. data/spec/models/inline_response20013_spec.rb +2 -2
  185. data/spec/models/inline_response20014_spec.rb +2 -2
  186. data/spec/models/inline_response2001_spec.rb +2 -2
  187. data/spec/models/inline_response2002_spec.rb +2 -2
  188. data/spec/models/inline_response2003_spec.rb +2 -2
  189. data/spec/models/inline_response2004_spec.rb +2 -2
  190. data/spec/models/inline_response2005_spec.rb +2 -2
  191. data/spec/models/inline_response2006_spec.rb +2 -2
  192. data/spec/models/inline_response2007_spec.rb +2 -2
  193. data/spec/models/inline_response2008_spec.rb +2 -2
  194. data/spec/models/inline_response2009_spec.rb +2 -2
  195. data/spec/models/inline_response200_spec.rb +2 -2
  196. data/spec/models/metadata_checksum_type_enum_spec.rb +35 -0
  197. data/spec/models/package_checksum_type_enum_spec.rb +35 -0
  198. data/spec/models/patchedrpm_rpm_distribution_spec.rb +59 -0
  199. data/spec/models/patchedrpm_rpm_remote_spec.rb +107 -0
  200. data/spec/models/patchedrpm_rpm_repository_spec.rb +65 -0
  201. data/spec/models/policy_enum_spec.rb +35 -0
  202. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  203. data/spec/models/repository_version_response_spec.rb +65 -0
  204. data/spec/models/repository_version_spec.rb +2 -26
  205. data/spec/models/{rpm_distribution_tree_spec.rb → rpm_distribution_tree_response_spec.rb} +8 -8
  206. data/spec/models/rpm_modulemd_defaults_response_spec.rb +77 -0
  207. data/spec/models/rpm_modulemd_defaults_spec.rb +9 -9
  208. data/spec/models/rpm_modulemd_response_spec.rb +107 -0
  209. data/spec/models/rpm_modulemd_spec.rb +11 -11
  210. data/spec/models/{rpm_package_category_spec.rb → rpm_package_category_response_spec.rb} +8 -8
  211. data/spec/models/{rpm_package_environment_spec.rb → rpm_package_environment_response_spec.rb} +8 -8
  212. data/spec/models/{rpm_package_group_spec.rb → rpm_package_group_response_spec.rb} +8 -8
  213. data/spec/models/{rpm_package_langpacks_spec.rb → rpm_package_langpacks_response_spec.rb} +8 -8
  214. data/spec/models/rpm_package_response_spec.rb +275 -0
  215. data/spec/models/rpm_package_spec.rb +5 -221
  216. data/spec/models/{rpm_repo_metadata_file_spec.rb → rpm_repo_metadata_file_response_spec.rb} +8 -8
  217. data/spec/models/rpm_repository_sync_url_spec.rb +2 -6
  218. data/spec/models/rpm_rpm_distribution_response_spec.rb +77 -0
  219. data/spec/models/rpm_rpm_distribution_spec.rb +2 -20
  220. data/spec/models/rpm_rpm_publication_response_spec.rb +71 -0
  221. data/spec/models/rpm_rpm_publication_spec.rb +2 -22
  222. data/spec/models/rpm_rpm_remote_response_spec.rb +125 -0
  223. data/spec/models/rpm_rpm_remote_spec.rb +2 -24
  224. data/spec/models/rpm_rpm_repository_response_spec.rb +89 -0
  225. data/spec/models/rpm_rpm_repository_spec.rb +5 -23
  226. data/spec/models/rpm_update_collection_response_spec.rb +59 -0
  227. data/spec/models/rpm_update_collection_spec.rb +2 -8
  228. data/spec/models/rpm_update_record_response_spec.rb +155 -0
  229. data/spec/models/rpm_update_record_spec.rb +4 -112
  230. data/spec/models/{variant_spec.rb → variant_response_spec.rb} +8 -8
  231. data/spec/spec_helper.rb +2 -2
  232. metadata +116 -48
@@ -0,0 +1,597 @@
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 PulpRpmClient
16
+ # A Serializer for Package. Add serializers for the new fields defined in Package and add those fields to the Meta class keeping fields from the parent class as well. Provide help_text.
17
+ class RpmPackageResponse
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
+ # Name of the package
27
+ attr_accessor :name
28
+
29
+ # The package's epoch
30
+ attr_accessor :epoch
31
+
32
+ # The version of the package. For example, '2.8.0'
33
+ attr_accessor :version
34
+
35
+ # The release of a particular version of the package. e.g. '1.el7' or '3.f24'
36
+ attr_accessor :release
37
+
38
+ # The target architecture for a package.For example, 'x86_64', 'i686', or 'noarch'
39
+ attr_accessor :arch
40
+
41
+ # Checksum of the package file
42
+ attr_accessor :pkg_id
43
+
44
+ # Type of checksum, e.g. 'sha256', 'md5'
45
+ attr_accessor :checksum_type
46
+
47
+ # Short description of the packaged software
48
+ attr_accessor :summary
49
+
50
+ # In-depth description of the packaged software
51
+ attr_accessor :description
52
+
53
+ # URL with more information about the packaged software
54
+ attr_accessor :url
55
+
56
+ # Changelogs that package contains
57
+ attr_accessor :changelogs
58
+
59
+ # Files that package contains
60
+ attr_accessor :files
61
+
62
+ # Capabilities the package requires
63
+ attr_accessor :requires
64
+
65
+ # Capabilities the package provides
66
+ attr_accessor :provides
67
+
68
+ # Capabilities the package conflicts
69
+ attr_accessor :conflicts
70
+
71
+ # Capabilities the package obsoletes
72
+ attr_accessor :obsoletes
73
+
74
+ # Capabilities the package suggests
75
+ attr_accessor :suggests
76
+
77
+ # Capabilities the package enhances
78
+ attr_accessor :enhances
79
+
80
+ # Capabilities the package recommends
81
+ attr_accessor :recommends
82
+
83
+ # The SHA-256 checksum if available.
84
+ attr_accessor :sha256
85
+
86
+ # Capabilities the package supplements
87
+ attr_accessor :supplements
88
+
89
+ # Base location of this package
90
+ attr_accessor :location_base
91
+
92
+ # Relative location of package to the repodata
93
+ attr_accessor :location_href
94
+
95
+ # Hostname of the system that built the package
96
+ attr_accessor :rpm_buildhost
97
+
98
+ # RPM group (See: http://fedoraproject.org/wiki/RPMGroups)
99
+ attr_accessor :rpm_group
100
+
101
+ # License term applicable to the package software (GPLv2, etc.)
102
+ attr_accessor :rpm_license
103
+
104
+ # Person or persons responsible for creating the package
105
+ attr_accessor :rpm_packager
106
+
107
+ # Name of the source package (srpm) the package was built from
108
+ attr_accessor :rpm_sourcerpm
109
+
110
+ # Name of the organization that produced the package
111
+ attr_accessor :rpm_vendor
112
+
113
+ # First byte of the header
114
+ attr_accessor :rpm_header_start
115
+
116
+ # Last byte of the header
117
+ attr_accessor :rpm_header_end
118
+
119
+ # Flag to identify if the package is modular
120
+ attr_accessor :is_modular
121
+
122
+ # Size, in bytes, of the archive portion of the original package file
123
+ attr_accessor :size_archive
124
+
125
+ # Total size, in bytes, of every file installed by this package
126
+ attr_accessor :size_installed
127
+
128
+ # Size, in bytes, of the package
129
+ attr_accessor :size_package
130
+
131
+ # Time the package was built in seconds since the epoch
132
+ attr_accessor :time_build
133
+
134
+ # The 'file' time attribute in the primary XML - file mtime in seconds since the epoch.
135
+ attr_accessor :time_file
136
+
137
+ # Attribute mapping from ruby-style variable name to JSON key.
138
+ def self.attribute_map
139
+ {
140
+ :'pulp_href' => :'pulp_href',
141
+ :'pulp_created' => :'pulp_created',
142
+ :'artifact' => :'artifact',
143
+ :'name' => :'name',
144
+ :'epoch' => :'epoch',
145
+ :'version' => :'version',
146
+ :'release' => :'release',
147
+ :'arch' => :'arch',
148
+ :'pkg_id' => :'pkgId',
149
+ :'checksum_type' => :'checksum_type',
150
+ :'summary' => :'summary',
151
+ :'description' => :'description',
152
+ :'url' => :'url',
153
+ :'changelogs' => :'changelogs',
154
+ :'files' => :'files',
155
+ :'requires' => :'requires',
156
+ :'provides' => :'provides',
157
+ :'conflicts' => :'conflicts',
158
+ :'obsoletes' => :'obsoletes',
159
+ :'suggests' => :'suggests',
160
+ :'enhances' => :'enhances',
161
+ :'recommends' => :'recommends',
162
+ :'sha256' => :'sha256',
163
+ :'supplements' => :'supplements',
164
+ :'location_base' => :'location_base',
165
+ :'location_href' => :'location_href',
166
+ :'rpm_buildhost' => :'rpm_buildhost',
167
+ :'rpm_group' => :'rpm_group',
168
+ :'rpm_license' => :'rpm_license',
169
+ :'rpm_packager' => :'rpm_packager',
170
+ :'rpm_sourcerpm' => :'rpm_sourcerpm',
171
+ :'rpm_vendor' => :'rpm_vendor',
172
+ :'rpm_header_start' => :'rpm_header_start',
173
+ :'rpm_header_end' => :'rpm_header_end',
174
+ :'is_modular' => :'is_modular',
175
+ :'size_archive' => :'size_archive',
176
+ :'size_installed' => :'size_installed',
177
+ :'size_package' => :'size_package',
178
+ :'time_build' => :'time_build',
179
+ :'time_file' => :'time_file'
180
+ }
181
+ end
182
+
183
+ # Attribute type mapping.
184
+ def self.openapi_types
185
+ {
186
+ :'pulp_href' => :'String',
187
+ :'pulp_created' => :'DateTime',
188
+ :'artifact' => :'String',
189
+ :'name' => :'String',
190
+ :'epoch' => :'String',
191
+ :'version' => :'String',
192
+ :'release' => :'String',
193
+ :'arch' => :'String',
194
+ :'pkg_id' => :'String',
195
+ :'checksum_type' => :'String',
196
+ :'summary' => :'String',
197
+ :'description' => :'String',
198
+ :'url' => :'String',
199
+ :'changelogs' => :'Object',
200
+ :'files' => :'Object',
201
+ :'requires' => :'Object',
202
+ :'provides' => :'Object',
203
+ :'conflicts' => :'Object',
204
+ :'obsoletes' => :'Object',
205
+ :'suggests' => :'Object',
206
+ :'enhances' => :'Object',
207
+ :'recommends' => :'Object',
208
+ :'sha256' => :'String',
209
+ :'supplements' => :'Object',
210
+ :'location_base' => :'String',
211
+ :'location_href' => :'String',
212
+ :'rpm_buildhost' => :'String',
213
+ :'rpm_group' => :'String',
214
+ :'rpm_license' => :'String',
215
+ :'rpm_packager' => :'String',
216
+ :'rpm_sourcerpm' => :'String',
217
+ :'rpm_vendor' => :'String',
218
+ :'rpm_header_start' => :'Integer',
219
+ :'rpm_header_end' => :'Integer',
220
+ :'is_modular' => :'Boolean',
221
+ :'size_archive' => :'Integer',
222
+ :'size_installed' => :'Integer',
223
+ :'size_package' => :'Integer',
224
+ :'time_build' => :'Integer',
225
+ :'time_file' => :'Integer'
226
+ }
227
+ end
228
+
229
+ # List of attributes with nullable: true
230
+ def self.openapi_nullable
231
+ Set.new([
232
+ ])
233
+ end
234
+
235
+ # Initializes the object
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ def initialize(attributes = {})
238
+ if (!attributes.is_a?(Hash))
239
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmPackageResponse` initialize method"
240
+ end
241
+
242
+ # check to see if the attribute exists and convert string to symbol for hash key
243
+ attributes = attributes.each_with_object({}) { |(k, v), h|
244
+ if (!self.class.attribute_map.key?(k.to_sym))
245
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::RpmPackageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
246
+ end
247
+ h[k.to_sym] = v
248
+ }
249
+
250
+ if attributes.key?(:'pulp_href')
251
+ self.pulp_href = attributes[:'pulp_href']
252
+ end
253
+
254
+ if attributes.key?(:'pulp_created')
255
+ self.pulp_created = attributes[:'pulp_created']
256
+ end
257
+
258
+ if attributes.key?(:'artifact')
259
+ self.artifact = attributes[:'artifact']
260
+ end
261
+
262
+ if attributes.key?(:'name')
263
+ self.name = attributes[:'name']
264
+ end
265
+
266
+ if attributes.key?(:'epoch')
267
+ self.epoch = attributes[:'epoch']
268
+ end
269
+
270
+ if attributes.key?(:'version')
271
+ self.version = attributes[:'version']
272
+ end
273
+
274
+ if attributes.key?(:'release')
275
+ self.release = attributes[:'release']
276
+ end
277
+
278
+ if attributes.key?(:'arch')
279
+ self.arch = attributes[:'arch']
280
+ end
281
+
282
+ if attributes.key?(:'pkg_id')
283
+ self.pkg_id = attributes[:'pkg_id']
284
+ end
285
+
286
+ if attributes.key?(:'checksum_type')
287
+ self.checksum_type = attributes[:'checksum_type']
288
+ end
289
+
290
+ if attributes.key?(:'summary')
291
+ self.summary = attributes[:'summary']
292
+ end
293
+
294
+ if attributes.key?(:'description')
295
+ self.description = attributes[:'description']
296
+ end
297
+
298
+ if attributes.key?(:'url')
299
+ self.url = attributes[:'url']
300
+ end
301
+
302
+ if attributes.key?(:'changelogs')
303
+ self.changelogs = attributes[:'changelogs']
304
+ end
305
+
306
+ if attributes.key?(:'files')
307
+ self.files = attributes[:'files']
308
+ end
309
+
310
+ if attributes.key?(:'requires')
311
+ self.requires = attributes[:'requires']
312
+ end
313
+
314
+ if attributes.key?(:'provides')
315
+ self.provides = attributes[:'provides']
316
+ end
317
+
318
+ if attributes.key?(:'conflicts')
319
+ self.conflicts = attributes[:'conflicts']
320
+ end
321
+
322
+ if attributes.key?(:'obsoletes')
323
+ self.obsoletes = attributes[:'obsoletes']
324
+ end
325
+
326
+ if attributes.key?(:'suggests')
327
+ self.suggests = attributes[:'suggests']
328
+ end
329
+
330
+ if attributes.key?(:'enhances')
331
+ self.enhances = attributes[:'enhances']
332
+ end
333
+
334
+ if attributes.key?(:'recommends')
335
+ self.recommends = attributes[:'recommends']
336
+ end
337
+
338
+ if attributes.key?(:'sha256')
339
+ self.sha256 = attributes[:'sha256']
340
+ end
341
+
342
+ if attributes.key?(:'supplements')
343
+ self.supplements = attributes[:'supplements']
344
+ end
345
+
346
+ if attributes.key?(:'location_base')
347
+ self.location_base = attributes[:'location_base']
348
+ end
349
+
350
+ if attributes.key?(:'location_href')
351
+ self.location_href = attributes[:'location_href']
352
+ end
353
+
354
+ if attributes.key?(:'rpm_buildhost')
355
+ self.rpm_buildhost = attributes[:'rpm_buildhost']
356
+ end
357
+
358
+ if attributes.key?(:'rpm_group')
359
+ self.rpm_group = attributes[:'rpm_group']
360
+ end
361
+
362
+ if attributes.key?(:'rpm_license')
363
+ self.rpm_license = attributes[:'rpm_license']
364
+ end
365
+
366
+ if attributes.key?(:'rpm_packager')
367
+ self.rpm_packager = attributes[:'rpm_packager']
368
+ end
369
+
370
+ if attributes.key?(:'rpm_sourcerpm')
371
+ self.rpm_sourcerpm = attributes[:'rpm_sourcerpm']
372
+ end
373
+
374
+ if attributes.key?(:'rpm_vendor')
375
+ self.rpm_vendor = attributes[:'rpm_vendor']
376
+ end
377
+
378
+ if attributes.key?(:'rpm_header_start')
379
+ self.rpm_header_start = attributes[:'rpm_header_start']
380
+ end
381
+
382
+ if attributes.key?(:'rpm_header_end')
383
+ self.rpm_header_end = attributes[:'rpm_header_end']
384
+ end
385
+
386
+ if attributes.key?(:'is_modular')
387
+ self.is_modular = attributes[:'is_modular']
388
+ end
389
+
390
+ if attributes.key?(:'size_archive')
391
+ self.size_archive = attributes[:'size_archive']
392
+ end
393
+
394
+ if attributes.key?(:'size_installed')
395
+ self.size_installed = attributes[:'size_installed']
396
+ end
397
+
398
+ if attributes.key?(:'size_package')
399
+ self.size_package = attributes[:'size_package']
400
+ end
401
+
402
+ if attributes.key?(:'time_build')
403
+ self.time_build = attributes[:'time_build']
404
+ end
405
+
406
+ if attributes.key?(:'time_file')
407
+ self.time_file = attributes[:'time_file']
408
+ end
409
+ end
410
+
411
+ # Show invalid properties with the reasons. Usually used together with valid?
412
+ # @return Array for valid properties with the reasons
413
+ def list_invalid_properties
414
+ invalid_properties = Array.new
415
+ invalid_properties
416
+ end
417
+
418
+ # Check to see if the all the properties in the model are valid
419
+ # @return true if the model is valid
420
+ def valid?
421
+ true
422
+ end
423
+
424
+ # Checks equality by comparing each attribute.
425
+ # @param [Object] Object to be compared
426
+ def ==(o)
427
+ return true if self.equal?(o)
428
+ self.class == o.class &&
429
+ pulp_href == o.pulp_href &&
430
+ pulp_created == o.pulp_created &&
431
+ artifact == o.artifact &&
432
+ name == o.name &&
433
+ epoch == o.epoch &&
434
+ version == o.version &&
435
+ release == o.release &&
436
+ arch == o.arch &&
437
+ pkg_id == o.pkg_id &&
438
+ checksum_type == o.checksum_type &&
439
+ summary == o.summary &&
440
+ description == o.description &&
441
+ url == o.url &&
442
+ changelogs == o.changelogs &&
443
+ files == o.files &&
444
+ requires == o.requires &&
445
+ provides == o.provides &&
446
+ conflicts == o.conflicts &&
447
+ obsoletes == o.obsoletes &&
448
+ suggests == o.suggests &&
449
+ enhances == o.enhances &&
450
+ recommends == o.recommends &&
451
+ sha256 == o.sha256 &&
452
+ supplements == o.supplements &&
453
+ location_base == o.location_base &&
454
+ location_href == o.location_href &&
455
+ rpm_buildhost == o.rpm_buildhost &&
456
+ rpm_group == o.rpm_group &&
457
+ rpm_license == o.rpm_license &&
458
+ rpm_packager == o.rpm_packager &&
459
+ rpm_sourcerpm == o.rpm_sourcerpm &&
460
+ rpm_vendor == o.rpm_vendor &&
461
+ rpm_header_start == o.rpm_header_start &&
462
+ rpm_header_end == o.rpm_header_end &&
463
+ is_modular == o.is_modular &&
464
+ size_archive == o.size_archive &&
465
+ size_installed == o.size_installed &&
466
+ size_package == o.size_package &&
467
+ time_build == o.time_build &&
468
+ time_file == o.time_file
469
+ end
470
+
471
+ # @see the `==` method
472
+ # @param [Object] Object to be compared
473
+ def eql?(o)
474
+ self == o
475
+ end
476
+
477
+ # Calculates hash code according to all attributes.
478
+ # @return [Integer] Hash code
479
+ def hash
480
+ [pulp_href, pulp_created, artifact, name, epoch, version, release, arch, pkg_id, checksum_type, summary, description, url, changelogs, files, requires, provides, conflicts, obsoletes, suggests, enhances, recommends, sha256, supplements, location_base, location_href, rpm_buildhost, rpm_group, rpm_license, rpm_packager, rpm_sourcerpm, rpm_vendor, rpm_header_start, rpm_header_end, is_modular, size_archive, size_installed, size_package, time_build, time_file].hash
481
+ end
482
+
483
+ # Builds the object from hash
484
+ # @param [Hash] attributes Model attributes in the form of hash
485
+ # @return [Object] Returns the model itself
486
+ def self.build_from_hash(attributes)
487
+ new.build_from_hash(attributes)
488
+ end
489
+
490
+ # Builds the object from hash
491
+ # @param [Hash] attributes Model attributes in the form of hash
492
+ # @return [Object] Returns the model itself
493
+ def build_from_hash(attributes)
494
+ return nil unless attributes.is_a?(Hash)
495
+ self.class.openapi_types.each_pair do |key, type|
496
+ if type =~ /\AArray<(.*)>/i
497
+ # check to ensure the input is an array given that the attribute
498
+ # is documented as an array but the input is not
499
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
500
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
501
+ end
502
+ elsif !attributes[self.class.attribute_map[key]].nil?
503
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
504
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
505
+ end
506
+
507
+ self
508
+ end
509
+
510
+ # Deserializes the data based on type
511
+ # @param string type Data type
512
+ # @param string value Value to be deserialized
513
+ # @return [Object] Deserialized data
514
+ def _deserialize(type, value)
515
+ case type.to_sym
516
+ when :DateTime
517
+ DateTime.parse(value)
518
+ when :Date
519
+ Date.parse(value)
520
+ when :String
521
+ value.to_s
522
+ when :Integer
523
+ value.to_i
524
+ when :Float
525
+ value.to_f
526
+ when :Boolean
527
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
528
+ true
529
+ else
530
+ false
531
+ end
532
+ when :Object
533
+ # generic object (usually a Hash), return directly
534
+ value
535
+ when /\AArray<(?<inner_type>.+)>\z/
536
+ inner_type = Regexp.last_match[:inner_type]
537
+ value.map { |v| _deserialize(inner_type, v) }
538
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
539
+ k_type = Regexp.last_match[:k_type]
540
+ v_type = Regexp.last_match[:v_type]
541
+ {}.tap do |hash|
542
+ value.each do |k, v|
543
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
544
+ end
545
+ end
546
+ else # model
547
+ PulpRpmClient.const_get(type).build_from_hash(value)
548
+ end
549
+ end
550
+
551
+ # Returns the string representation of the object
552
+ # @return [String] String presentation of the object
553
+ def to_s
554
+ to_hash.to_s
555
+ end
556
+
557
+ # to_body is an alias to to_hash (backward compatibility)
558
+ # @return [Hash] Returns the object in the form of hash
559
+ def to_body
560
+ to_hash
561
+ end
562
+
563
+ # Returns the object in the form of hash
564
+ # @return [Hash] Returns the object in the form of hash
565
+ def to_hash
566
+ hash = {}
567
+ self.class.attribute_map.each_pair do |attr, param|
568
+ value = self.send(attr)
569
+ if value.nil?
570
+ is_nullable = self.class.openapi_nullable.include?(attr)
571
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
572
+ end
573
+
574
+ hash[param] = _to_hash(value)
575
+ end
576
+ hash
577
+ end
578
+
579
+ # Outputs non-array value in the form of hash
580
+ # For object, use to_hash. Otherwise, just return the value
581
+ # @param [Object] value Any valid value
582
+ # @return [Hash] Returns the value in the form of hash
583
+ def _to_hash(value)
584
+ if value.is_a?(Array)
585
+ value.compact.map { |v| _to_hash(v) }
586
+ elsif value.is_a?(Hash)
587
+ {}.tap do |hash|
588
+ value.each { |k, v| hash[k] = _to_hash(v) }
589
+ end
590
+ elsif value.respond_to? :to_hash
591
+ value.to_hash
592
+ else
593
+ value
594
+ end
595
+ end
596
+ end
597
+ end