pulp_python_client 3.12.5 → 3.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -16
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContentPackagesApi.md +170 -120
  5. data/docs/ContentSummaryResponse.md +12 -11
  6. data/docs/DistributionsPypiApi.md +385 -182
  7. data/docs/ExcludePlatformsEnum.md +4 -5
  8. data/docs/MyPermissionsResponse.md +8 -7
  9. data/docs/NestedRole.md +12 -11
  10. data/docs/NestedRoleResponse.md +12 -11
  11. data/docs/ObjectRolesResponse.md +8 -7
  12. data/docs/PackageMetadataResponse.md +14 -13
  13. data/docs/PackageTypesEnum.md +4 -5
  14. data/docs/PackageUploadTaskResponse.md +12 -11
  15. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  16. data/docs/PaginatedpythonPythonDistributionResponseList.md +14 -13
  17. data/docs/PaginatedpythonPythonPackageContentResponseList.md +14 -13
  18. data/docs/PaginatedpythonPythonPublicationResponseList.md +14 -13
  19. data/docs/PaginatedpythonPythonRemoteResponseList.md +14 -13
  20. data/docs/PaginatedpythonPythonRepositoryResponseList.md +14 -13
  21. data/docs/PatchedpythonPythonDistribution.md +24 -23
  22. data/docs/PatchedpythonPythonRemote.md +60 -59
  23. data/docs/PatchedpythonPythonRepository.md +18 -17
  24. data/docs/PolicyEnum.md +4 -5
  25. data/docs/PublicationsPypiApi.md +267 -130
  26. data/docs/PypiApi.md +33 -17
  27. data/docs/PypiLegacyApi.md +34 -18
  28. data/docs/PypiMetadataApi.md +34 -18
  29. data/docs/PypiSimpleApi.md +95 -45
  30. data/docs/PythonPythonDistribution.md +24 -23
  31. data/docs/PythonPythonDistributionResponse.md +36 -35
  32. data/docs/PythonPythonPackageContentResponse.md +70 -69
  33. data/docs/PythonPythonPublication.md +10 -9
  34. data/docs/PythonPythonPublicationResponse.md +20 -19
  35. data/docs/PythonPythonRemote.md +60 -59
  36. data/docs/PythonPythonRemoteResponse.md +60 -59
  37. data/docs/PythonPythonRemoteResponseHiddenFieldsInner.md +20 -0
  38. data/docs/PythonPythonRepository.md +18 -17
  39. data/docs/PythonPythonRepositoryResponse.md +30 -29
  40. data/docs/RemotesPythonApi.md +420 -198
  41. data/docs/Repair.md +8 -7
  42. data/docs/RepositoriesPythonApi.md +444 -207
  43. data/docs/RepositoriesPythonVersionsApi.md +152 -82
  44. data/docs/RepositoryAddRemoveContent.md +12 -11
  45. data/docs/RepositorySyncURL.md +10 -9
  46. data/docs/RepositoryVersionResponse.md +22 -21
  47. data/docs/SetLabel.md +10 -9
  48. data/docs/SetLabelResponse.md +10 -9
  49. data/docs/SummaryResponse.md +12 -11
  50. data/docs/UnsetLabel.md +8 -7
  51. data/docs/UnsetLabelResponse.md +10 -9
  52. data/lib/pulp_python_client/api/content_packages_api.rb +21 -15
  53. data/lib/pulp_python_client/api/distributions_pypi_api.rb +89 -56
  54. data/lib/pulp_python_client/api/publications_pypi_api.rb +67 -47
  55. data/lib/pulp_python_client/api/pypi_api.rb +6 -5
  56. data/lib/pulp_python_client/api/pypi_legacy_api.rb +11 -7
  57. data/lib/pulp_python_client/api/pypi_metadata_api.rb +6 -5
  58. data/lib/pulp_python_client/api/pypi_simple_api.rb +19 -13
  59. data/lib/pulp_python_client/api/remotes_python_api.rb +113 -73
  60. data/lib/pulp_python_client/api/repositories_python_api.rb +107 -66
  61. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +40 -30
  62. data/lib/pulp_python_client/api_client.rb +137 -102
  63. data/lib/pulp_python_client/api_error.rb +2 -1
  64. data/lib/pulp_python_client/configuration.rb +162 -21
  65. data/lib/pulp_python_client/models/async_operation_response.rb +32 -22
  66. data/lib/pulp_python_client/models/content_summary_response.rb +36 -22
  67. data/lib/pulp_python_client/models/exclude_platforms_enum.rb +8 -4
  68. data/lib/pulp_python_client/models/my_permissions_response.rb +32 -22
  69. data/lib/pulp_python_client/models/nested_role.rb +32 -22
  70. data/lib/pulp_python_client/models/nested_role_response.rb +32 -22
  71. data/lib/pulp_python_client/models/object_roles_response.rb +32 -22
  72. data/lib/pulp_python_client/models/package_metadata_response.rb +41 -37
  73. data/lib/pulp_python_client/models/package_types_enum.rb +8 -4
  74. data/lib/pulp_python_client/models/package_upload_task_response.rb +37 -23
  75. data/lib/pulp_python_client/models/paginated_repository_version_response_list.rb +34 -22
  76. data/lib/pulp_python_client/models/paginatedpython_python_distribution_response_list.rb +34 -22
  77. data/lib/pulp_python_client/models/paginatedpython_python_package_content_response_list.rb +34 -22
  78. data/lib/pulp_python_client/models/paginatedpython_python_publication_response_list.rb +34 -22
  79. data/lib/pulp_python_client/models/paginatedpython_python_remote_response_list.rb +34 -22
  80. data/lib/pulp_python_client/models/paginatedpython_python_repository_response_list.rb +34 -22
  81. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +40 -24
  82. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +82 -44
  83. data/lib/pulp_python_client/models/patchedpython_python_repository.rb +35 -23
  84. data/lib/pulp_python_client/models/policy_enum.rb +8 -4
  85. data/lib/pulp_python_client/models/python_python_distribution.rb +34 -22
  86. data/lib/pulp_python_client/models/python_python_distribution_response.rb +36 -24
  87. data/lib/pulp_python_client/models/python_python_package_content_response.rb +38 -24
  88. data/lib/pulp_python_client/models/python_python_publication.rb +30 -22
  89. data/lib/pulp_python_client/models/python_python_publication_response.rb +32 -24
  90. data/lib/pulp_python_client/models/python_python_remote.rb +76 -42
  91. data/lib/pulp_python_client/models/python_python_remote_response.rb +79 -45
  92. data/lib/pulp_python_client/models/{python_python_remote_response_hidden_fields.rb → python_python_remote_response_hidden_fields_inner.rb} +37 -25
  93. data/lib/pulp_python_client/models/python_python_repository.rb +32 -22
  94. data/lib/pulp_python_client/models/python_python_repository_response.rb +34 -24
  95. data/lib/pulp_python_client/models/repair.rb +30 -22
  96. data/lib/pulp_python_client/models/repository_add_remove_content.rb +30 -22
  97. data/lib/pulp_python_client/models/repository_sync_url.rb +30 -22
  98. data/lib/pulp_python_client/models/repository_version_response.rb +32 -24
  99. data/lib/pulp_python_client/models/set_label.rb +34 -22
  100. data/lib/pulp_python_client/models/set_label_response.rb +34 -22
  101. data/lib/pulp_python_client/models/summary_response.rb +36 -22
  102. data/lib/pulp_python_client/models/unset_label.rb +32 -22
  103. data/lib/pulp_python_client/models/unset_label_response.rb +32 -22
  104. data/lib/pulp_python_client/version.rb +2 -2
  105. data/lib/pulp_python_client.rb +2 -5
  106. data/pulp_python_client.gemspec +9 -6
  107. data/spec/api/content_packages_api_spec.rb +4 -4
  108. data/spec/api/distributions_pypi_api_spec.rb +13 -13
  109. data/spec/api/publications_pypi_api_spec.rb +16 -15
  110. data/spec/api/pypi_api_spec.rb +2 -2
  111. data/spec/api/pypi_legacy_api_spec.rb +2 -2
  112. data/spec/api/pypi_metadata_api_spec.rb +2 -2
  113. data/spec/api/pypi_simple_api_spec.rb +4 -4
  114. data/spec/api/remotes_python_api_spec.rb +21 -20
  115. data/spec/api/repositories_python_api_spec.rb +15 -15
  116. data/spec/api/repositories_python_versions_api_spec.rb +12 -11
  117. data/spec/models/async_operation_response_spec.rb +7 -12
  118. data/spec/models/content_summary_response_spec.rb +9 -14
  119. data/spec/models/exclude_platforms_enum_spec.rb +6 -11
  120. data/spec/models/my_permissions_response_spec.rb +7 -12
  121. data/spec/models/nested_role_response_spec.rb +9 -14
  122. data/spec/models/nested_role_spec.rb +9 -14
  123. data/spec/models/object_roles_response_spec.rb +7 -12
  124. data/spec/models/package_metadata_response_spec.rb +10 -15
  125. data/spec/models/package_types_enum_spec.rb +6 -11
  126. data/spec/models/package_upload_task_response_spec.rb +9 -14
  127. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  128. data/spec/models/paginatedpython_python_distribution_response_list_spec.rb +10 -15
  129. data/spec/models/paginatedpython_python_package_content_response_list_spec.rb +10 -15
  130. data/spec/models/paginatedpython_python_publication_response_list_spec.rb +10 -15
  131. data/spec/models/paginatedpython_python_remote_response_list_spec.rb +10 -15
  132. data/spec/models/paginatedpython_python_repository_response_list_spec.rb +10 -15
  133. data/spec/models/patchedpython_python_distribution_spec.rb +15 -20
  134. data/spec/models/patchedpython_python_remote_spec.rb +33 -38
  135. data/spec/models/patchedpython_python_repository_spec.rb +12 -17
  136. data/spec/models/policy_enum_spec.rb +6 -11
  137. data/spec/models/python_python_distribution_response_spec.rb +21 -26
  138. data/spec/models/python_python_distribution_spec.rb +15 -20
  139. data/spec/models/python_python_package_content_response_spec.rb +38 -43
  140. data/spec/models/python_python_publication_response_spec.rb +13 -18
  141. data/spec/models/python_python_publication_spec.rb +8 -13
  142. data/spec/models/{python_python_remote_response_hidden_fields_spec.rb → python_python_remote_response_hidden_fields_inner_spec.rb} +11 -16
  143. data/spec/models/python_python_remote_response_spec.rb +33 -38
  144. data/spec/models/python_python_remote_spec.rb +33 -38
  145. data/spec/models/python_python_repository_response_spec.rb +18 -23
  146. data/spec/models/python_python_repository_spec.rb +12 -17
  147. data/spec/models/repair_spec.rb +7 -12
  148. data/spec/models/repository_add_remove_content_spec.rb +9 -14
  149. data/spec/models/repository_sync_url_spec.rb +8 -13
  150. data/spec/models/repository_version_response_spec.rb +14 -19
  151. data/spec/models/set_label_response_spec.rb +8 -13
  152. data/spec/models/set_label_spec.rb +8 -13
  153. data/spec/models/summary_response_spec.rb +9 -14
  154. data/spec/models/unset_label_response_spec.rb +8 -13
  155. data/spec/models/unset_label_spec.rb +7 -12
  156. data/spec/spec_helper.rb +1 -1
  157. metadata +81 -69
  158. data/docs/PackageUpload.md +0 -21
  159. data/docs/PythonBanderRemote.md +0 -21
  160. data/docs/PythonPythonPackageContent.md +0 -71
  161. data/docs/PythonPythonRemoteResponseHiddenFields.md +0 -19
  162. data/lib/pulp_python_client/models/package_upload.rb +0 -283
  163. data/lib/pulp_python_client/models/python_bander_remote.rb +0 -257
  164. data/lib/pulp_python_client/models/python_python_package_content.rb +0 -534
  165. data/spec/api_client_spec.rb +0 -188
  166. data/spec/configuration_spec.rb +0 -42
  167. data/spec/models/package_upload_spec.rb +0 -53
  168. data/spec/models/python_bander_remote_spec.rb +0 -53
  169. data/spec/models/python_python_package_content_spec.rb +0 -203
@@ -1,534 +0,0 @@
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.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpPythonClient
16
- # A Serializer for PythonPackageContent.
17
- class PythonPythonPackageContent
18
- # A URI of a repository the new content unit should be associated with.
19
- attr_accessor :repository
20
-
21
- # Artifact file representing the physical content
22
- attr_accessor :artifact
23
-
24
- # Path where the artifact is located relative to distributions base_path
25
- attr_accessor :relative_path
26
-
27
- # An uploaded file that may be turned into the content unit.
28
- attr_accessor :file
29
-
30
- # An uncommitted upload that may be turned into the content unit.
31
- attr_accessor :upload
32
-
33
- # A url that Pulp can download and turn into the content unit.
34
- attr_accessor :file_url
35
-
36
- # The SHA256 digest of this package.
37
- attr_accessor :sha256
38
-
39
- # A one-line summary of what the package does.
40
- attr_accessor :summary
41
-
42
- # A longer description of the package that can run to several paragraphs.
43
- attr_accessor :description
44
-
45
- # A string stating the markup syntax (if any) used in the distribution’s description, so that tools can intelligently render the description.
46
- attr_accessor :description_content_type
47
-
48
- # Additional keywords to be used to assist searching for the package in a larger catalog.
49
- attr_accessor :keywords
50
-
51
- # The URL for the package's home page.
52
- attr_accessor :home_page
53
-
54
- # Legacy field denoting the URL from which this package can be downloaded.
55
- attr_accessor :download_url
56
-
57
- # Text containing the author's name. Contact information can also be added, separated with newlines.
58
- attr_accessor :author
59
-
60
- # The author's e-mail address.
61
- attr_accessor :author_email
62
-
63
- # The maintainer's name at a minimum; additional contact information may be provided.
64
- attr_accessor :maintainer
65
-
66
- # The maintainer's e-mail address.
67
- attr_accessor :maintainer_email
68
-
69
- # Text indicating the license covering the distribution
70
- attr_accessor :license
71
-
72
- # The Python version(s) that the distribution is guaranteed to be compatible with.
73
- attr_accessor :requires_python
74
-
75
- # A browsable URL for the project and a label for it, separated by a comma.
76
- attr_accessor :project_url
77
-
78
- # A dictionary of labels and URLs for the project.
79
- attr_accessor :project_urls
80
-
81
- # A comma-separated list of platform specifications, summarizing the operating systems supported by the package.
82
- attr_accessor :platform
83
-
84
- # Field to specify the OS and CPU for which the binary package was compiled.
85
- attr_accessor :supported_platform
86
-
87
- # A JSON list containing names of some other distutils project required by this distribution.
88
- attr_accessor :requires_dist
89
-
90
- # A JSON list containing names of a Distutils project which is contained within this distribution.
91
- attr_accessor :provides_dist
92
-
93
- # A JSON list containing names of a distutils project's distribution which this distribution renders obsolete, meaning that the two projects should not be installed at the same time.
94
- attr_accessor :obsoletes_dist
95
-
96
- # A JSON list containing some dependency in the system that the distribution is to be used.
97
- attr_accessor :requires_external
98
-
99
- # A JSON list containing classification values for a Python package.
100
- attr_accessor :classifiers
101
-
102
- # Attribute mapping from ruby-style variable name to JSON key.
103
- def self.attribute_map
104
- {
105
- :'repository' => :'repository',
106
- :'artifact' => :'artifact',
107
- :'relative_path' => :'relative_path',
108
- :'file' => :'file',
109
- :'upload' => :'upload',
110
- :'file_url' => :'file_url',
111
- :'sha256' => :'sha256',
112
- :'summary' => :'summary',
113
- :'description' => :'description',
114
- :'description_content_type' => :'description_content_type',
115
- :'keywords' => :'keywords',
116
- :'home_page' => :'home_page',
117
- :'download_url' => :'download_url',
118
- :'author' => :'author',
119
- :'author_email' => :'author_email',
120
- :'maintainer' => :'maintainer',
121
- :'maintainer_email' => :'maintainer_email',
122
- :'license' => :'license',
123
- :'requires_python' => :'requires_python',
124
- :'project_url' => :'project_url',
125
- :'project_urls' => :'project_urls',
126
- :'platform' => :'platform',
127
- :'supported_platform' => :'supported_platform',
128
- :'requires_dist' => :'requires_dist',
129
- :'provides_dist' => :'provides_dist',
130
- :'obsoletes_dist' => :'obsoletes_dist',
131
- :'requires_external' => :'requires_external',
132
- :'classifiers' => :'classifiers'
133
- }
134
- end
135
-
136
- # Attribute type mapping.
137
- def self.openapi_types
138
- {
139
- :'repository' => :'String',
140
- :'artifact' => :'String',
141
- :'relative_path' => :'String',
142
- :'file' => :'File',
143
- :'upload' => :'String',
144
- :'file_url' => :'String',
145
- :'sha256' => :'String',
146
- :'summary' => :'String',
147
- :'description' => :'String',
148
- :'description_content_type' => :'String',
149
- :'keywords' => :'String',
150
- :'home_page' => :'String',
151
- :'download_url' => :'String',
152
- :'author' => :'String',
153
- :'author_email' => :'String',
154
- :'maintainer' => :'String',
155
- :'maintainer_email' => :'String',
156
- :'license' => :'String',
157
- :'requires_python' => :'String',
158
- :'project_url' => :'String',
159
- :'project_urls' => :'Object',
160
- :'platform' => :'String',
161
- :'supported_platform' => :'String',
162
- :'requires_dist' => :'Object',
163
- :'provides_dist' => :'Object',
164
- :'obsoletes_dist' => :'Object',
165
- :'requires_external' => :'Object',
166
- :'classifiers' => :'Object'
167
- }
168
- end
169
-
170
- # List of attributes with nullable: true
171
- def self.openapi_nullable
172
- Set.new([
173
- ])
174
- end
175
-
176
- # Initializes the object
177
- # @param [Hash] attributes Model attributes in the form of hash
178
- def initialize(attributes = {})
179
- if (!attributes.is_a?(Hash))
180
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonPackageContent` initialize method"
181
- end
182
-
183
- # check to see if the attribute exists and convert string to symbol for hash key
184
- attributes = attributes.each_with_object({}) { |(k, v), h|
185
- if (!self.class.attribute_map.key?(k.to_sym))
186
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonPackageContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
187
- end
188
- h[k.to_sym] = v
189
- }
190
-
191
- if attributes.key?(:'repository')
192
- self.repository = attributes[:'repository']
193
- end
194
-
195
- if attributes.key?(:'artifact')
196
- self.artifact = attributes[:'artifact']
197
- end
198
-
199
- if attributes.key?(:'relative_path')
200
- self.relative_path = attributes[:'relative_path']
201
- end
202
-
203
- if attributes.key?(:'file')
204
- self.file = attributes[:'file']
205
- end
206
-
207
- if attributes.key?(:'upload')
208
- self.upload = attributes[:'upload']
209
- end
210
-
211
- if attributes.key?(:'file_url')
212
- self.file_url = attributes[:'file_url']
213
- end
214
-
215
- if attributes.key?(:'sha256')
216
- self.sha256 = attributes[:'sha256']
217
- else
218
- self.sha256 = ''
219
- end
220
-
221
- if attributes.key?(:'summary')
222
- self.summary = attributes[:'summary']
223
- end
224
-
225
- if attributes.key?(:'description')
226
- self.description = attributes[:'description']
227
- end
228
-
229
- if attributes.key?(:'description_content_type')
230
- self.description_content_type = attributes[:'description_content_type']
231
- end
232
-
233
- if attributes.key?(:'keywords')
234
- self.keywords = attributes[:'keywords']
235
- end
236
-
237
- if attributes.key?(:'home_page')
238
- self.home_page = attributes[:'home_page']
239
- end
240
-
241
- if attributes.key?(:'download_url')
242
- self.download_url = attributes[:'download_url']
243
- end
244
-
245
- if attributes.key?(:'author')
246
- self.author = attributes[:'author']
247
- end
248
-
249
- if attributes.key?(:'author_email')
250
- self.author_email = attributes[:'author_email']
251
- end
252
-
253
- if attributes.key?(:'maintainer')
254
- self.maintainer = attributes[:'maintainer']
255
- end
256
-
257
- if attributes.key?(:'maintainer_email')
258
- self.maintainer_email = attributes[:'maintainer_email']
259
- end
260
-
261
- if attributes.key?(:'license')
262
- self.license = attributes[:'license']
263
- end
264
-
265
- if attributes.key?(:'requires_python')
266
- self.requires_python = attributes[:'requires_python']
267
- end
268
-
269
- if attributes.key?(:'project_url')
270
- self.project_url = attributes[:'project_url']
271
- end
272
-
273
- if attributes.key?(:'project_urls')
274
- self.project_urls = attributes[:'project_urls']
275
- end
276
-
277
- if attributes.key?(:'platform')
278
- self.platform = attributes[:'platform']
279
- end
280
-
281
- if attributes.key?(:'supported_platform')
282
- self.supported_platform = attributes[:'supported_platform']
283
- end
284
-
285
- if attributes.key?(:'requires_dist')
286
- self.requires_dist = attributes[:'requires_dist']
287
- end
288
-
289
- if attributes.key?(:'provides_dist')
290
- self.provides_dist = attributes[:'provides_dist']
291
- end
292
-
293
- if attributes.key?(:'obsoletes_dist')
294
- self.obsoletes_dist = attributes[:'obsoletes_dist']
295
- end
296
-
297
- if attributes.key?(:'requires_external')
298
- self.requires_external = attributes[:'requires_external']
299
- end
300
-
301
- if attributes.key?(:'classifiers')
302
- self.classifiers = attributes[:'classifiers']
303
- end
304
- end
305
-
306
- # Show invalid properties with the reasons. Usually used together with valid?
307
- # @return Array for valid properties with the reasons
308
- def list_invalid_properties
309
- invalid_properties = Array.new
310
- if @relative_path.nil?
311
- invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
312
- end
313
-
314
- if @relative_path.to_s.length < 1
315
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
316
- end
317
-
318
- if !@file_url.nil? && @file_url.to_s.length < 1
319
- invalid_properties.push('invalid value for "file_url", the character length must be great than or equal to 1.')
320
- end
321
-
322
- if !@sha256.nil? && @sha256.to_s.length < 1
323
- invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
324
- end
325
-
326
- invalid_properties
327
- end
328
-
329
- # Check to see if the all the properties in the model are valid
330
- # @return true if the model is valid
331
- def valid?
332
- return false if @relative_path.nil?
333
- return false if @relative_path.to_s.length < 1
334
- return false if !@file_url.nil? && @file_url.to_s.length < 1
335
- return false if !@sha256.nil? && @sha256.to_s.length < 1
336
- true
337
- end
338
-
339
- # Custom attribute writer method with validation
340
- # @param [Object] relative_path Value to be assigned
341
- def relative_path=(relative_path)
342
- if relative_path.nil?
343
- fail ArgumentError, 'relative_path cannot be nil'
344
- end
345
-
346
- if relative_path.to_s.length < 1
347
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
348
- end
349
-
350
- @relative_path = relative_path
351
- end
352
-
353
- # Custom attribute writer method with validation
354
- # @param [Object] file_url Value to be assigned
355
- def file_url=(file_url)
356
- if !file_url.nil? && file_url.to_s.length < 1
357
- fail ArgumentError, 'invalid value for "file_url", the character length must be great than or equal to 1.'
358
- end
359
-
360
- @file_url = file_url
361
- end
362
-
363
- # Custom attribute writer method with validation
364
- # @param [Object] sha256 Value to be assigned
365
- def sha256=(sha256)
366
- if !sha256.nil? && sha256.to_s.length < 1
367
- fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
368
- end
369
-
370
- @sha256 = sha256
371
- end
372
-
373
- # Checks equality by comparing each attribute.
374
- # @param [Object] Object to be compared
375
- def ==(o)
376
- return true if self.equal?(o)
377
- self.class == o.class &&
378
- repository == o.repository &&
379
- artifact == o.artifact &&
380
- relative_path == o.relative_path &&
381
- file == o.file &&
382
- upload == o.upload &&
383
- file_url == o.file_url &&
384
- sha256 == o.sha256 &&
385
- summary == o.summary &&
386
- description == o.description &&
387
- description_content_type == o.description_content_type &&
388
- keywords == o.keywords &&
389
- home_page == o.home_page &&
390
- download_url == o.download_url &&
391
- author == o.author &&
392
- author_email == o.author_email &&
393
- maintainer == o.maintainer &&
394
- maintainer_email == o.maintainer_email &&
395
- license == o.license &&
396
- requires_python == o.requires_python &&
397
- project_url == o.project_url &&
398
- project_urls == o.project_urls &&
399
- platform == o.platform &&
400
- supported_platform == o.supported_platform &&
401
- requires_dist == o.requires_dist &&
402
- provides_dist == o.provides_dist &&
403
- obsoletes_dist == o.obsoletes_dist &&
404
- requires_external == o.requires_external &&
405
- classifiers == o.classifiers
406
- end
407
-
408
- # @see the `==` method
409
- # @param [Object] Object to be compared
410
- def eql?(o)
411
- self == o
412
- end
413
-
414
- # Calculates hash code according to all attributes.
415
- # @return [Integer] Hash code
416
- def hash
417
- [repository, artifact, relative_path, file, upload, file_url, sha256, summary, description, description_content_type, keywords, home_page, download_url, author, author_email, maintainer, maintainer_email, license, requires_python, project_url, project_urls, platform, supported_platform, requires_dist, provides_dist, obsoletes_dist, requires_external, classifiers].hash
418
- end
419
-
420
- # Builds the object from hash
421
- # @param [Hash] attributes Model attributes in the form of hash
422
- # @return [Object] Returns the model itself
423
- def self.build_from_hash(attributes)
424
- new.build_from_hash(attributes)
425
- end
426
-
427
- # Builds the object from hash
428
- # @param [Hash] attributes Model attributes in the form of hash
429
- # @return [Object] Returns the model itself
430
- def build_from_hash(attributes)
431
- return nil unless attributes.is_a?(Hash)
432
- self.class.openapi_types.each_pair do |key, type|
433
- if type =~ /\AArray<(.*)>/i
434
- # check to ensure the input is an array given that the attribute
435
- # is documented as an array but the input is not
436
- if attributes[self.class.attribute_map[key]].is_a?(Array)
437
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
438
- end
439
- elsif !attributes[self.class.attribute_map[key]].nil?
440
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
441
- end # or else data not found in attributes(hash), not an issue as the data can be optional
442
- end
443
-
444
- self
445
- end
446
-
447
- # Deserializes the data based on type
448
- # @param string type Data type
449
- # @param string value Value to be deserialized
450
- # @return [Object] Deserialized data
451
- def _deserialize(type, value)
452
- case type.to_sym
453
- when :DateTime
454
- DateTime.parse(value)
455
- when :Date
456
- Date.parse(value)
457
- when :String
458
- value.to_s
459
- when :Integer
460
- value.to_i
461
- when :Float
462
- value.to_f
463
- when :Boolean
464
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
465
- true
466
- else
467
- false
468
- end
469
- when :Object
470
- # generic object (usually a Hash), return directly
471
- value
472
- when /\AArray<(?<inner_type>.+)>\z/
473
- inner_type = Regexp.last_match[:inner_type]
474
- value.map { |v| _deserialize(inner_type, v) }
475
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
476
- k_type = Regexp.last_match[:k_type]
477
- v_type = Regexp.last_match[:v_type]
478
- {}.tap do |hash|
479
- value.each do |k, v|
480
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
481
- end
482
- end
483
- else # model
484
- PulpPythonClient.const_get(type).build_from_hash(value)
485
- end
486
- end
487
-
488
- # Returns the string representation of the object
489
- # @return [String] String presentation of the object
490
- def to_s
491
- to_hash.to_s
492
- end
493
-
494
- # to_body is an alias to to_hash (backward compatibility)
495
- # @return [Hash] Returns the object in the form of hash
496
- def to_body
497
- to_hash
498
- end
499
-
500
- # Returns the object in the form of hash
501
- # @return [Hash] Returns the object in the form of hash
502
- def to_hash
503
- hash = {}
504
- self.class.attribute_map.each_pair do |attr, param|
505
- value = self.send(attr)
506
- if value.nil?
507
- is_nullable = self.class.openapi_nullable.include?(attr)
508
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
509
- end
510
-
511
- hash[param] = _to_hash(value)
512
- end
513
- hash
514
- end
515
-
516
- # Outputs non-array value in the form of hash
517
- # For object, use to_hash. Otherwise, just return the value
518
- # @param [Object] value Any valid value
519
- # @return [Hash] Returns the value in the form of hash
520
- def _to_hash(value)
521
- if value.is_a?(Array)
522
- value.compact.map { |v| _to_hash(v) }
523
- elsif value.is_a?(Hash)
524
- {}.tap do |hash|
525
- value.each { |k, v| hash[k] = _to_hash(v) }
526
- end
527
- elsif value.respond_to? :to_hash
528
- value.to_hash
529
- else
530
- value
531
- end
532
- end
533
- end
534
- end