pulp_python_client 3.10.0 → 3.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -8
  3. data/docs/ContentPackagesApi.md +11 -7
  4. data/docs/DistributionsPypiApi.md +126 -4
  5. data/docs/PaginatedRepositoryVersionResponseList.md +2 -2
  6. data/docs/PaginatedpythonPythonDistributionResponseList.md +2 -2
  7. data/docs/PaginatedpythonPythonPackageContentResponseList.md +2 -2
  8. data/docs/PaginatedpythonPythonPublicationResponseList.md +2 -2
  9. data/docs/PaginatedpythonPythonRemoteResponseList.md +2 -2
  10. data/docs/PaginatedpythonPythonRepositoryResponseList.md +2 -2
  11. data/docs/PatchedpythonPythonDistribution.md +2 -0
  12. data/docs/PublicationsPypiApi.md +3 -1
  13. data/docs/PypiApi.md +1 -1
  14. data/docs/PypiLegacyApi.md +1 -1
  15. data/docs/PypiMetadataApi.md +1 -1
  16. data/docs/PypiSimpleApi.md +1 -1
  17. data/docs/PythonPythonDistribution.md +2 -0
  18. data/docs/PythonPythonDistributionResponse.md +4 -0
  19. data/docs/PythonPythonPackageContent.md +5 -5
  20. data/docs/PythonPythonPackageContentResponse.md +2 -0
  21. data/docs/PythonPythonPublicationResponse.md +2 -0
  22. data/docs/PythonPythonRemoteResponse.md +2 -2
  23. data/docs/PythonPythonRemoteResponseHiddenFields.md +2 -2
  24. data/docs/PythonPythonRepositoryResponse.md +2 -0
  25. data/docs/RemotesPythonApi.md +123 -1
  26. data/docs/RepositoriesPythonApi.md +124 -2
  27. data/docs/RepositoriesPythonVersionsApi.md +3 -1
  28. data/docs/RepositoryVersionResponse.md +2 -0
  29. data/docs/SetLabel.md +19 -0
  30. data/docs/SetLabelResponse.md +19 -0
  31. data/docs/UnsetLabel.md +17 -0
  32. data/docs/UnsetLabelResponse.md +19 -0
  33. data/lib/pulp_python_client/api/content_packages_api.rb +13 -7
  34. data/lib/pulp_python_client/api/distributions_pypi_api.rb +158 -3
  35. data/lib/pulp_python_client/api/publications_pypi_api.rb +3 -0
  36. data/lib/pulp_python_client/api/remotes_python_api.rb +155 -0
  37. data/lib/pulp_python_client/api/repositories_python_api.rb +155 -0
  38. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +3 -0
  39. data/lib/pulp_python_client/configuration.rb +2 -2
  40. data/lib/pulp_python_client/models/paginated_repository_version_response_list.rb +10 -0
  41. data/lib/pulp_python_client/models/paginatedpython_python_distribution_response_list.rb +10 -0
  42. data/lib/pulp_python_client/models/paginatedpython_python_package_content_response_list.rb +10 -0
  43. data/lib/pulp_python_client/models/paginatedpython_python_publication_response_list.rb +10 -0
  44. data/lib/pulp_python_client/models/paginatedpython_python_remote_response_list.rb +10 -0
  45. data/lib/pulp_python_client/models/paginatedpython_python_repository_response_list.rb +10 -0
  46. data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +13 -1
  47. data/lib/pulp_python_client/models/python_python_distribution.rb +13 -1
  48. data/lib/pulp_python_client/models/python_python_distribution_response.rb +23 -1
  49. data/lib/pulp_python_client/models/python_python_package_content.rb +13 -13
  50. data/lib/pulp_python_client/models/python_python_package_content_response.rb +11 -1
  51. data/lib/pulp_python_client/models/python_python_publication_response.rb +11 -1
  52. data/lib/pulp_python_client/models/python_python_remote_response.rb +11 -11
  53. data/lib/pulp_python_client/models/python_python_remote_response_hidden_fields.rb +10 -0
  54. data/lib/pulp_python_client/models/python_python_repository_response.rb +11 -1
  55. data/lib/pulp_python_client/models/repository_version_response.rb +11 -1
  56. data/lib/pulp_python_client/models/set_label.rb +252 -0
  57. data/lib/pulp_python_client/models/set_label_response.rb +243 -0
  58. data/lib/pulp_python_client/models/unset_label.rb +242 -0
  59. data/lib/pulp_python_client/models/unset_label_response.rb +242 -0
  60. data/lib/pulp_python_client/version.rb +1 -1
  61. data/lib/pulp_python_client.rb +4 -0
  62. data/spec/api/content_packages_api_spec.rb +5 -3
  63. data/spec/api/distributions_pypi_api_spec.rb +32 -1
  64. data/spec/api/publications_pypi_api_spec.rb +1 -0
  65. data/spec/api/remotes_python_api_spec.rb +31 -0
  66. data/spec/api/repositories_python_api_spec.rb +31 -0
  67. data/spec/api/repositories_python_versions_api_spec.rb +1 -0
  68. data/spec/configuration_spec.rb +3 -3
  69. data/spec/models/patchedpython_python_distribution_spec.rb +6 -0
  70. data/spec/models/python_python_distribution_response_spec.rb +12 -0
  71. data/spec/models/python_python_distribution_spec.rb +6 -0
  72. data/spec/models/python_python_package_content_response_spec.rb +6 -0
  73. data/spec/models/python_python_package_content_spec.rb +4 -4
  74. data/spec/models/python_python_publication_response_spec.rb +6 -0
  75. data/spec/models/python_python_remote_response_spec.rb +6 -6
  76. data/spec/models/python_python_repository_response_spec.rb +6 -0
  77. data/spec/models/repository_version_response_spec.rb +6 -0
  78. data/spec/models/set_label_response_spec.rb +47 -0
  79. data/spec/models/set_label_spec.rb +47 -0
  80. data/spec/models/unset_label_response_spec.rb +47 -0
  81. data/spec/models/unset_label_spec.rb +41 -0
  82. metadata +47 -31
@@ -15,19 +15,19 @@ require 'date'
15
15
  module PulpPythonClient
16
16
  # A Serializer for PythonPackageContent.
17
17
  class PythonPythonPackageContent
18
+ # A URI of a repository the new content unit should be associated with.
19
+ attr_accessor :repository
20
+
18
21
  # Artifact file representing the physical content
19
22
  attr_accessor :artifact
20
23
 
21
24
  # Path where the artifact is located relative to distributions base_path
22
25
  attr_accessor :relative_path
23
26
 
24
- # An uploaded file that may be turned into the artifact of the content unit.
27
+ # An uploaded file that may be turned into the content unit.
25
28
  attr_accessor :file
26
29
 
27
- # A URI of a repository the new content unit should be associated with.
28
- attr_accessor :repository
29
-
30
- # An uncommitted upload that may be turned into the artifact of the content unit.
30
+ # An uncommitted upload that may be turned into the content unit.
31
31
  attr_accessor :upload
32
32
 
33
33
  # The SHA256 digest of this package.
@@ -99,10 +99,10 @@ module PulpPythonClient
99
99
  # Attribute mapping from ruby-style variable name to JSON key.
100
100
  def self.attribute_map
101
101
  {
102
+ :'repository' => :'repository',
102
103
  :'artifact' => :'artifact',
103
104
  :'relative_path' => :'relative_path',
104
105
  :'file' => :'file',
105
- :'repository' => :'repository',
106
106
  :'upload' => :'upload',
107
107
  :'sha256' => :'sha256',
108
108
  :'summary' => :'summary',
@@ -132,10 +132,10 @@ module PulpPythonClient
132
132
  # Attribute type mapping.
133
133
  def self.openapi_types
134
134
  {
135
+ :'repository' => :'String',
135
136
  :'artifact' => :'String',
136
137
  :'relative_path' => :'String',
137
138
  :'file' => :'File',
138
- :'repository' => :'String',
139
139
  :'upload' => :'String',
140
140
  :'sha256' => :'String',
141
141
  :'summary' => :'String',
@@ -183,6 +183,10 @@ module PulpPythonClient
183
183
  h[k.to_sym] = v
184
184
  }
185
185
 
186
+ if attributes.key?(:'repository')
187
+ self.repository = attributes[:'repository']
188
+ end
189
+
186
190
  if attributes.key?(:'artifact')
187
191
  self.artifact = attributes[:'artifact']
188
192
  end
@@ -195,10 +199,6 @@ module PulpPythonClient
195
199
  self.file = attributes[:'file']
196
200
  end
197
201
 
198
- if attributes.key?(:'repository')
199
- self.repository = attributes[:'repository']
200
- end
201
-
202
202
  if attributes.key?(:'upload')
203
203
  self.upload = attributes[:'upload']
204
204
  end
@@ -351,10 +351,10 @@ module PulpPythonClient
351
351
  def ==(o)
352
352
  return true if self.equal?(o)
353
353
  self.class == o.class &&
354
+ repository == o.repository &&
354
355
  artifact == o.artifact &&
355
356
  relative_path == o.relative_path &&
356
357
  file == o.file &&
357
- repository == o.repository &&
358
358
  upload == o.upload &&
359
359
  sha256 == o.sha256 &&
360
360
  summary == o.summary &&
@@ -389,7 +389,7 @@ module PulpPythonClient
389
389
  # Calculates hash code according to all attributes.
390
390
  # @return [Integer] Hash code
391
391
  def hash
392
- [artifact, relative_path, file, repository, upload, 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
392
+ [repository, artifact, relative_path, file, upload, 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
393
393
  end
394
394
 
395
395
  # Builds the object from hash
@@ -20,6 +20,9 @@ module PulpPythonClient
20
20
  # Timestamp of creation.
21
21
  attr_accessor :pulp_created
22
22
 
23
+ # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
24
+ attr_accessor :pulp_last_updated
25
+
23
26
  # Artifact file representing the physical content
24
27
  attr_accessor :artifact
25
28
 
@@ -109,6 +112,7 @@ module PulpPythonClient
109
112
  {
110
113
  :'pulp_href' => :'pulp_href',
111
114
  :'pulp_created' => :'pulp_created',
115
+ :'pulp_last_updated' => :'pulp_last_updated',
112
116
  :'artifact' => :'artifact',
113
117
  :'filename' => :'filename',
114
118
  :'packagetype' => :'packagetype',
@@ -145,6 +149,7 @@ module PulpPythonClient
145
149
  {
146
150
  :'pulp_href' => :'String',
147
151
  :'pulp_created' => :'DateTime',
152
+ :'pulp_last_updated' => :'DateTime',
148
153
  :'artifact' => :'String',
149
154
  :'filename' => :'String',
150
155
  :'packagetype' => :'String',
@@ -205,6 +210,10 @@ module PulpPythonClient
205
210
  self.pulp_created = attributes[:'pulp_created']
206
211
  end
207
212
 
213
+ if attributes.key?(:'pulp_last_updated')
214
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
215
+ end
216
+
208
217
  if attributes.key?(:'artifact')
209
218
  self.artifact = attributes[:'artifact']
210
219
  end
@@ -340,6 +349,7 @@ module PulpPythonClient
340
349
  self.class == o.class &&
341
350
  pulp_href == o.pulp_href &&
342
351
  pulp_created == o.pulp_created &&
352
+ pulp_last_updated == o.pulp_last_updated &&
343
353
  artifact == o.artifact &&
344
354
  filename == o.filename &&
345
355
  packagetype == o.packagetype &&
@@ -379,7 +389,7 @@ module PulpPythonClient
379
389
  # Calculates hash code according to all attributes.
380
390
  # @return [Integer] Hash code
381
391
  def hash
382
- [pulp_href, pulp_created, artifact, filename, packagetype, name, version, sha256, metadata_version, 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
392
+ [pulp_href, pulp_created, pulp_last_updated, artifact, filename, packagetype, name, version, sha256, metadata_version, 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
383
393
  end
384
394
 
385
395
  # Builds the object from hash
@@ -20,6 +20,9 @@ module PulpPythonClient
20
20
  # Timestamp of creation.
21
21
  attr_accessor :pulp_created
22
22
 
23
+ # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
24
+ attr_accessor :pulp_last_updated
25
+
23
26
  attr_accessor :repository_version
24
27
 
25
28
  # A URI of the repository to be published.
@@ -33,6 +36,7 @@ module PulpPythonClient
33
36
  {
34
37
  :'pulp_href' => :'pulp_href',
35
38
  :'pulp_created' => :'pulp_created',
39
+ :'pulp_last_updated' => :'pulp_last_updated',
36
40
  :'repository_version' => :'repository_version',
37
41
  :'repository' => :'repository',
38
42
  :'distributions' => :'distributions'
@@ -44,6 +48,7 @@ module PulpPythonClient
44
48
  {
45
49
  :'pulp_href' => :'String',
46
50
  :'pulp_created' => :'DateTime',
51
+ :'pulp_last_updated' => :'DateTime',
47
52
  :'repository_version' => :'String',
48
53
  :'repository' => :'String',
49
54
  :'distributions' => :'Array<String>'
@@ -79,6 +84,10 @@ module PulpPythonClient
79
84
  self.pulp_created = attributes[:'pulp_created']
80
85
  end
81
86
 
87
+ if attributes.key?(:'pulp_last_updated')
88
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
89
+ end
90
+
82
91
  if attributes.key?(:'repository_version')
83
92
  self.repository_version = attributes[:'repository_version']
84
93
  end
@@ -114,6 +123,7 @@ module PulpPythonClient
114
123
  self.class == o.class &&
115
124
  pulp_href == o.pulp_href &&
116
125
  pulp_created == o.pulp_created &&
126
+ pulp_last_updated == o.pulp_last_updated &&
117
127
  repository_version == o.repository_version &&
118
128
  repository == o.repository &&
119
129
  distributions == o.distributions
@@ -128,7 +138,7 @@ module PulpPythonClient
128
138
  # Calculates hash code according to all attributes.
129
139
  # @return [Integer] Hash code
130
140
  def hash
131
- [pulp_href, pulp_created, repository_version, repository, distributions].hash
141
+ [pulp_href, pulp_created, pulp_last_updated, repository_version, repository, distributions].hash
132
142
  end
133
143
 
134
144
  # Builds the object from hash
@@ -20,6 +20,9 @@ module PulpPythonClient
20
20
  # Timestamp of creation.
21
21
  attr_accessor :pulp_created
22
22
 
23
+ # Timestamp of the most recent update of the remote.
24
+ attr_accessor :pulp_last_updated
25
+
23
26
  # A unique name for this remote.
24
27
  attr_accessor :name
25
28
 
@@ -40,9 +43,6 @@ module PulpPythonClient
40
43
 
41
44
  attr_accessor :pulp_labels
42
45
 
43
- # Timestamp of the most recent update of the remote.
44
- attr_accessor :pulp_last_updated
45
-
46
46
  # Total number of simultaneous connections. If not set then the default value will be used.
47
47
  attr_accessor :download_concurrency
48
48
 
@@ -96,6 +96,7 @@ module PulpPythonClient
96
96
  {
97
97
  :'pulp_href' => :'pulp_href',
98
98
  :'pulp_created' => :'pulp_created',
99
+ :'pulp_last_updated' => :'pulp_last_updated',
99
100
  :'name' => :'name',
100
101
  :'url' => :'url',
101
102
  :'ca_cert' => :'ca_cert',
@@ -103,7 +104,6 @@ module PulpPythonClient
103
104
  :'tls_validation' => :'tls_validation',
104
105
  :'proxy_url' => :'proxy_url',
105
106
  :'pulp_labels' => :'pulp_labels',
106
- :'pulp_last_updated' => :'pulp_last_updated',
107
107
  :'download_concurrency' => :'download_concurrency',
108
108
  :'max_retries' => :'max_retries',
109
109
  :'policy' => :'policy',
@@ -128,6 +128,7 @@ module PulpPythonClient
128
128
  {
129
129
  :'pulp_href' => :'String',
130
130
  :'pulp_created' => :'DateTime',
131
+ :'pulp_last_updated' => :'DateTime',
131
132
  :'name' => :'String',
132
133
  :'url' => :'String',
133
134
  :'ca_cert' => :'String',
@@ -135,7 +136,6 @@ module PulpPythonClient
135
136
  :'tls_validation' => :'Boolean',
136
137
  :'proxy_url' => :'String',
137
138
  :'pulp_labels' => :'Hash<String, String>',
138
- :'pulp_last_updated' => :'DateTime',
139
139
  :'download_concurrency' => :'Integer',
140
140
  :'max_retries' => :'Integer',
141
141
  :'policy' => :'PolicyEnum',
@@ -194,6 +194,10 @@ module PulpPythonClient
194
194
  self.pulp_created = attributes[:'pulp_created']
195
195
  end
196
196
 
197
+ if attributes.key?(:'pulp_last_updated')
198
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
199
+ end
200
+
197
201
  if attributes.key?(:'name')
198
202
  self.name = attributes[:'name']
199
203
  end
@@ -224,10 +228,6 @@ module PulpPythonClient
224
228
  end
225
229
  end
226
230
 
227
- if attributes.key?(:'pulp_last_updated')
228
- self.pulp_last_updated = attributes[:'pulp_last_updated']
229
- end
230
-
231
231
  if attributes.key?(:'download_concurrency')
232
232
  self.download_concurrency = attributes[:'download_concurrency']
233
233
  end
@@ -412,6 +412,7 @@ module PulpPythonClient
412
412
  self.class == o.class &&
413
413
  pulp_href == o.pulp_href &&
414
414
  pulp_created == o.pulp_created &&
415
+ pulp_last_updated == o.pulp_last_updated &&
415
416
  name == o.name &&
416
417
  url == o.url &&
417
418
  ca_cert == o.ca_cert &&
@@ -419,7 +420,6 @@ module PulpPythonClient
419
420
  tls_validation == o.tls_validation &&
420
421
  proxy_url == o.proxy_url &&
421
422
  pulp_labels == o.pulp_labels &&
422
- pulp_last_updated == o.pulp_last_updated &&
423
423
  download_concurrency == o.download_concurrency &&
424
424
  max_retries == o.max_retries &&
425
425
  policy == o.policy &&
@@ -447,7 +447,7 @@ module PulpPythonClient
447
447
  # Calculates hash code according to all attributes.
448
448
  # @return [Integer] Hash code
449
449
  def hash
450
- [pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, hidden_fields, includes, excludes, prereleases, package_types, keep_latest_packages, exclude_platforms].hash
450
+ [pulp_href, pulp_created, pulp_last_updated, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, hidden_fields, includes, excludes, prereleases, package_types, keep_latest_packages, exclude_platforms].hash
451
451
  end
452
452
 
453
453
  # Builds the object from hash
@@ -68,12 +68,22 @@ module PulpPythonClient
68
68
  # @return Array for valid properties with the reasons
69
69
  def list_invalid_properties
70
70
  invalid_properties = Array.new
71
+ if @name.nil?
72
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
73
+ end
74
+
75
+ if @is_set.nil?
76
+ invalid_properties.push('invalid value for "is_set", is_set cannot be nil.')
77
+ end
78
+
71
79
  invalid_properties
72
80
  end
73
81
 
74
82
  # Check to see if the all the properties in the model are valid
75
83
  # @return true if the model is valid
76
84
  def valid?
85
+ return false if @name.nil?
86
+ return false if @is_set.nil?
77
87
  true
78
88
  end
79
89
 
@@ -20,6 +20,9 @@ module PulpPythonClient
20
20
  # Timestamp of creation.
21
21
  attr_accessor :pulp_created
22
22
 
23
+ # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
24
+ attr_accessor :pulp_last_updated
25
+
23
26
  attr_accessor :versions_href
24
27
 
25
28
  attr_accessor :pulp_labels
@@ -46,6 +49,7 @@ module PulpPythonClient
46
49
  {
47
50
  :'pulp_href' => :'pulp_href',
48
51
  :'pulp_created' => :'pulp_created',
52
+ :'pulp_last_updated' => :'pulp_last_updated',
49
53
  :'versions_href' => :'versions_href',
50
54
  :'pulp_labels' => :'pulp_labels',
51
55
  :'latest_version_href' => :'latest_version_href',
@@ -62,6 +66,7 @@ module PulpPythonClient
62
66
  {
63
67
  :'pulp_href' => :'String',
64
68
  :'pulp_created' => :'DateTime',
69
+ :'pulp_last_updated' => :'DateTime',
65
70
  :'versions_href' => :'String',
66
71
  :'pulp_labels' => :'Hash<String, String>',
67
72
  :'latest_version_href' => :'String',
@@ -105,6 +110,10 @@ module PulpPythonClient
105
110
  self.pulp_created = attributes[:'pulp_created']
106
111
  end
107
112
 
113
+ if attributes.key?(:'pulp_last_updated')
114
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
115
+ end
116
+
108
117
  if attributes.key?(:'versions_href')
109
118
  self.versions_href = attributes[:'versions_href']
110
119
  end
@@ -182,6 +191,7 @@ module PulpPythonClient
182
191
  self.class == o.class &&
183
192
  pulp_href == o.pulp_href &&
184
193
  pulp_created == o.pulp_created &&
194
+ pulp_last_updated == o.pulp_last_updated &&
185
195
  versions_href == o.versions_href &&
186
196
  pulp_labels == o.pulp_labels &&
187
197
  latest_version_href == o.latest_version_href &&
@@ -201,7 +211,7 @@ module PulpPythonClient
201
211
  # Calculates hash code according to all attributes.
202
212
  # @return [Integer] Hash code
203
213
  def hash
204
- [pulp_href, pulp_created, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, remote, autopublish].hash
214
+ [pulp_href, pulp_created, pulp_last_updated, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, remote, autopublish].hash
205
215
  end
206
216
 
207
217
  # Builds the object from hash
@@ -20,6 +20,9 @@ module PulpPythonClient
20
20
  # Timestamp of creation.
21
21
  attr_accessor :pulp_created
22
22
 
23
+ # Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
24
+ attr_accessor :pulp_last_updated
25
+
23
26
  attr_accessor :number
24
27
 
25
28
  attr_accessor :repository
@@ -35,6 +38,7 @@ module PulpPythonClient
35
38
  {
36
39
  :'pulp_href' => :'pulp_href',
37
40
  :'pulp_created' => :'pulp_created',
41
+ :'pulp_last_updated' => :'pulp_last_updated',
38
42
  :'number' => :'number',
39
43
  :'repository' => :'repository',
40
44
  :'base_version' => :'base_version',
@@ -47,6 +51,7 @@ module PulpPythonClient
47
51
  {
48
52
  :'pulp_href' => :'String',
49
53
  :'pulp_created' => :'DateTime',
54
+ :'pulp_last_updated' => :'DateTime',
50
55
  :'number' => :'Integer',
51
56
  :'repository' => :'String',
52
57
  :'base_version' => :'String',
@@ -83,6 +88,10 @@ module PulpPythonClient
83
88
  self.pulp_created = attributes[:'pulp_created']
84
89
  end
85
90
 
91
+ if attributes.key?(:'pulp_last_updated')
92
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
93
+ end
94
+
86
95
  if attributes.key?(:'number')
87
96
  self.number = attributes[:'number']
88
97
  end
@@ -120,6 +129,7 @@ module PulpPythonClient
120
129
  self.class == o.class &&
121
130
  pulp_href == o.pulp_href &&
122
131
  pulp_created == o.pulp_created &&
132
+ pulp_last_updated == o.pulp_last_updated &&
123
133
  number == o.number &&
124
134
  repository == o.repository &&
125
135
  base_version == o.base_version &&
@@ -135,7 +145,7 @@ module PulpPythonClient
135
145
  # Calculates hash code according to all attributes.
136
146
  # @return [Integer] Hash code
137
147
  def hash
138
- [pulp_href, pulp_created, number, repository, base_version, content_summary].hash
148
+ [pulp_href, pulp_created, pulp_last_updated, number, repository, base_version, content_summary].hash
139
149
  end
140
150
 
141
151
  # Builds the object from hash
@@ -0,0 +1,252 @@
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
+ # Serializer for synchronously setting a label.
17
+ class SetLabel
18
+ attr_accessor :key
19
+
20
+ attr_accessor :value
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'key' => :'key',
26
+ :'value' => :'value'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'key' => :'String',
34
+ :'value' => :'String'
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.openapi_nullable
40
+ Set.new([
41
+ :'value'
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::SetLabel` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::SetLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'key')
61
+ self.key = attributes[:'key']
62
+ end
63
+
64
+ if attributes.key?(:'value')
65
+ self.value = attributes[:'value']
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @key.nil?
74
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
75
+ end
76
+
77
+ if @key.to_s.length < 1
78
+ invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
79
+ end
80
+
81
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
82
+ if @key !~ pattern
83
+ invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
84
+ end
85
+
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if @key.nil?
93
+ return false if @key.to_s.length < 1
94
+ return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
95
+ true
96
+ end
97
+
98
+ # Custom attribute writer method with validation
99
+ # @param [Object] key Value to be assigned
100
+ def key=(key)
101
+ if key.nil?
102
+ fail ArgumentError, 'key cannot be nil'
103
+ end
104
+
105
+ if key.to_s.length < 1
106
+ fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
107
+ end
108
+
109
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
110
+ if key !~ pattern
111
+ fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
112
+ end
113
+
114
+ @key = key
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ key == o.key &&
123
+ value == o.value
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [key, value].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ new.build_from_hash(attributes)
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ self.class.openapi_types.each_pair do |key, type|
151
+ if type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
155
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
+ end
157
+ elsif !attributes[self.class.attribute_map[key]].nil?
158
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
160
+ end
161
+
162
+ self
163
+ end
164
+
165
+ # Deserializes the data based on type
166
+ # @param string type Data type
167
+ # @param string value Value to be deserialized
168
+ # @return [Object] Deserialized data
169
+ def _deserialize(type, value)
170
+ case type.to_sym
171
+ when :DateTime
172
+ DateTime.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :Boolean
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ PulpPythonClient.const_get(type).build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+ end
252
+ end