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.
- checksums.yaml +4 -4
- data/README.md +17 -16
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentPackagesApi.md +170 -120
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsPypiApi.md +385 -182
- data/docs/ExcludePlatformsEnum.md +4 -5
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/PackageMetadataResponse.md +14 -13
- data/docs/PackageTypesEnum.md +4 -5
- data/docs/PackageUploadTaskResponse.md +12 -11
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedpythonPythonDistributionResponseList.md +14 -13
- data/docs/PaginatedpythonPythonPackageContentResponseList.md +14 -13
- data/docs/PaginatedpythonPythonPublicationResponseList.md +14 -13
- data/docs/PaginatedpythonPythonRemoteResponseList.md +14 -13
- data/docs/PaginatedpythonPythonRepositoryResponseList.md +14 -13
- data/docs/PatchedpythonPythonDistribution.md +24 -23
- data/docs/PatchedpythonPythonRemote.md +60 -59
- data/docs/PatchedpythonPythonRepository.md +18 -17
- data/docs/PolicyEnum.md +4 -5
- data/docs/PublicationsPypiApi.md +267 -130
- data/docs/PypiApi.md +33 -17
- data/docs/PypiLegacyApi.md +34 -18
- data/docs/PypiMetadataApi.md +34 -18
- data/docs/PypiSimpleApi.md +95 -45
- data/docs/PythonPythonDistribution.md +24 -23
- data/docs/PythonPythonDistributionResponse.md +36 -35
- data/docs/PythonPythonPackageContentResponse.md +70 -69
- data/docs/PythonPythonPublication.md +10 -9
- data/docs/PythonPythonPublicationResponse.md +20 -19
- data/docs/PythonPythonRemote.md +60 -59
- data/docs/PythonPythonRemoteResponse.md +60 -59
- data/docs/PythonPythonRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/PythonPythonRepository.md +18 -17
- data/docs/PythonPythonRepositoryResponse.md +30 -29
- data/docs/RemotesPythonApi.md +420 -198
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesPythonApi.md +444 -207
- data/docs/RepositoriesPythonVersionsApi.md +152 -82
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositorySyncURL.md +10 -9
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/SummaryResponse.md +12 -11
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_python_client/api/content_packages_api.rb +21 -15
- data/lib/pulp_python_client/api/distributions_pypi_api.rb +89 -56
- data/lib/pulp_python_client/api/publications_pypi_api.rb +67 -47
- data/lib/pulp_python_client/api/pypi_api.rb +6 -5
- data/lib/pulp_python_client/api/pypi_legacy_api.rb +11 -7
- data/lib/pulp_python_client/api/pypi_metadata_api.rb +6 -5
- data/lib/pulp_python_client/api/pypi_simple_api.rb +19 -13
- data/lib/pulp_python_client/api/remotes_python_api.rb +113 -73
- data/lib/pulp_python_client/api/repositories_python_api.rb +107 -66
- data/lib/pulp_python_client/api/repositories_python_versions_api.rb +40 -30
- data/lib/pulp_python_client/api_client.rb +137 -102
- data/lib/pulp_python_client/api_error.rb +2 -1
- data/lib/pulp_python_client/configuration.rb +162 -21
- data/lib/pulp_python_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_python_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_python_client/models/exclude_platforms_enum.rb +8 -4
- data/lib/pulp_python_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_python_client/models/nested_role.rb +32 -22
- data/lib/pulp_python_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_python_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_python_client/models/package_metadata_response.rb +41 -37
- data/lib/pulp_python_client/models/package_types_enum.rb +8 -4
- data/lib/pulp_python_client/models/package_upload_task_response.rb +37 -23
- data/lib/pulp_python_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_python_client/models/paginatedpython_python_distribution_response_list.rb +34 -22
- data/lib/pulp_python_client/models/paginatedpython_python_package_content_response_list.rb +34 -22
- data/lib/pulp_python_client/models/paginatedpython_python_publication_response_list.rb +34 -22
- data/lib/pulp_python_client/models/paginatedpython_python_remote_response_list.rb +34 -22
- data/lib/pulp_python_client/models/paginatedpython_python_repository_response_list.rb +34 -22
- data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +40 -24
- data/lib/pulp_python_client/models/patchedpython_python_remote.rb +82 -44
- data/lib/pulp_python_client/models/patchedpython_python_repository.rb +35 -23
- data/lib/pulp_python_client/models/policy_enum.rb +8 -4
- data/lib/pulp_python_client/models/python_python_distribution.rb +34 -22
- data/lib/pulp_python_client/models/python_python_distribution_response.rb +36 -24
- data/lib/pulp_python_client/models/python_python_package_content_response.rb +38 -24
- data/lib/pulp_python_client/models/python_python_publication.rb +30 -22
- data/lib/pulp_python_client/models/python_python_publication_response.rb +32 -24
- data/lib/pulp_python_client/models/python_python_remote.rb +76 -42
- data/lib/pulp_python_client/models/python_python_remote_response.rb +79 -45
- data/lib/pulp_python_client/models/{python_python_remote_response_hidden_fields.rb → python_python_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_python_client/models/python_python_repository.rb +32 -22
- data/lib/pulp_python_client/models/python_python_repository_response.rb +34 -24
- data/lib/pulp_python_client/models/repair.rb +30 -22
- data/lib/pulp_python_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_python_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_python_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_python_client/models/set_label.rb +34 -22
- data/lib/pulp_python_client/models/set_label_response.rb +34 -22
- data/lib/pulp_python_client/models/summary_response.rb +36 -22
- data/lib/pulp_python_client/models/unset_label.rb +32 -22
- data/lib/pulp_python_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_python_client/version.rb +2 -2
- data/lib/pulp_python_client.rb +2 -5
- data/pulp_python_client.gemspec +9 -6
- data/spec/api/content_packages_api_spec.rb +4 -4
- data/spec/api/distributions_pypi_api_spec.rb +13 -13
- data/spec/api/publications_pypi_api_spec.rb +16 -15
- data/spec/api/pypi_api_spec.rb +2 -2
- data/spec/api/pypi_legacy_api_spec.rb +2 -2
- data/spec/api/pypi_metadata_api_spec.rb +2 -2
- data/spec/api/pypi_simple_api_spec.rb +4 -4
- data/spec/api/remotes_python_api_spec.rb +21 -20
- data/spec/api/repositories_python_api_spec.rb +15 -15
- data/spec/api/repositories_python_versions_api_spec.rb +12 -11
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/exclude_platforms_enum_spec.rb +6 -11
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/package_metadata_response_spec.rb +10 -15
- data/spec/models/package_types_enum_spec.rb +6 -11
- data/spec/models/package_upload_task_response_spec.rb +9 -14
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedpython_python_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedpython_python_package_content_response_list_spec.rb +10 -15
- data/spec/models/paginatedpython_python_publication_response_list_spec.rb +10 -15
- data/spec/models/paginatedpython_python_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedpython_python_repository_response_list_spec.rb +10 -15
- data/spec/models/patchedpython_python_distribution_spec.rb +15 -20
- data/spec/models/patchedpython_python_remote_spec.rb +33 -38
- data/spec/models/patchedpython_python_repository_spec.rb +12 -17
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/python_python_distribution_response_spec.rb +21 -26
- data/spec/models/python_python_distribution_spec.rb +15 -20
- data/spec/models/python_python_package_content_response_spec.rb +38 -43
- data/spec/models/python_python_publication_response_spec.rb +13 -18
- data/spec/models/python_python_publication_spec.rb +8 -13
- data/spec/models/{python_python_remote_response_hidden_fields_spec.rb → python_python_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/python_python_remote_response_spec.rb +33 -38
- data/spec/models/python_python_remote_spec.rb +33 -38
- data/spec/models/python_python_repository_response_spec.rb +18 -23
- data/spec/models/python_python_repository_spec.rb +12 -17
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_sync_url_spec.rb +8 -13
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/summary_response_spec.rb +9 -14
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +81 -69
- data/docs/PackageUpload.md +0 -21
- data/docs/PythonBanderRemote.md +0 -21
- data/docs/PythonPythonPackageContent.md +0 -71
- data/docs/PythonPythonRemoteResponseHiddenFields.md +0 -19
- data/lib/pulp_python_client/models/package_upload.rb +0 -283
- data/lib/pulp_python_client/models/python_bander_remote.rb +0 -257
- data/lib/pulp_python_client/models/python_python_package_content.rb +0 -534
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/package_upload_spec.rb +0 -53
- data/spec/models/python_bander_remote_spec.rb +0 -53
- data/spec/models/python_python_package_content_spec.rb +0 -203
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpPythonClient
|
16
17
|
# A Serializer for PythonPublication.
|
@@ -47,13 +48,18 @@ module PulpPythonClient
|
|
47
48
|
}
|
48
49
|
end
|
49
50
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
52
|
+
def self.acceptable_attributes
|
53
|
+
attribute_map.values
|
54
|
+
end
|
55
|
+
|
50
56
|
# Attribute type mapping.
|
51
57
|
def self.openapi_types
|
52
58
|
{
|
53
59
|
:'pulp_href' => :'String',
|
54
60
|
:'prn' => :'String',
|
55
|
-
:'pulp_created' => :'
|
56
|
-
:'pulp_last_updated' => :'
|
61
|
+
:'pulp_created' => :'Time',
|
62
|
+
:'pulp_last_updated' => :'Time',
|
57
63
|
:'repository_version' => :'String',
|
58
64
|
:'repository' => :'String',
|
59
65
|
:'distributions' => :'Array<String>'
|
@@ -115,6 +121,7 @@ module PulpPythonClient
|
|
115
121
|
# Show invalid properties with the reasons. Usually used together with valid?
|
116
122
|
# @return Array for valid properties with the reasons
|
117
123
|
def list_invalid_properties
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
118
125
|
invalid_properties = Array.new
|
119
126
|
invalid_properties
|
120
127
|
end
|
@@ -122,6 +129,7 @@ module PulpPythonClient
|
|
122
129
|
# Check to see if the all the properties in the model are valid
|
123
130
|
# @return true if the model is valid
|
124
131
|
def valid?
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
125
133
|
true
|
126
134
|
end
|
127
135
|
|
@@ -155,37 +163,33 @@ module PulpPythonClient
|
|
155
163
|
# @param [Hash] attributes Model attributes in the form of hash
|
156
164
|
# @return [Object] Returns the model itself
|
157
165
|
def self.build_from_hash(attributes)
|
158
|
-
new.build_from_hash(attributes)
|
159
|
-
end
|
160
|
-
|
161
|
-
# Builds the object from hash
|
162
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
-
# @return [Object] Returns the model itself
|
164
|
-
def build_from_hash(attributes)
|
165
166
|
return nil unless attributes.is_a?(Hash)
|
166
|
-
|
167
|
-
|
167
|
+
attributes = attributes.transform_keys(&:to_sym)
|
168
|
+
transformed_hash = {}
|
169
|
+
openapi_types.each_pair do |key, type|
|
170
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
171
|
+
transformed_hash["#{key}"] = nil
|
172
|
+
elsif type =~ /\AArray<(.*)>/i
|
168
173
|
# check to ensure the input is an array given that the attribute
|
169
174
|
# is documented as an array but the input is not
|
170
|
-
if attributes[
|
171
|
-
|
175
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
176
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
172
177
|
end
|
173
|
-
elsif !attributes[
|
174
|
-
|
175
|
-
end
|
178
|
+
elsif !attributes[attribute_map[key]].nil?
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
180
|
+
end
|
176
181
|
end
|
177
|
-
|
178
|
-
self
|
182
|
+
new(transformed_hash)
|
179
183
|
end
|
180
184
|
|
181
185
|
# Deserializes the data based on type
|
182
186
|
# @param string type Data type
|
183
187
|
# @param string value Value to be deserialized
|
184
188
|
# @return [Object] Deserialized data
|
185
|
-
def _deserialize(type, value)
|
189
|
+
def self._deserialize(type, value)
|
186
190
|
case type.to_sym
|
187
|
-
when :
|
188
|
-
|
191
|
+
when :Time
|
192
|
+
Time.parse(value)
|
189
193
|
when :Date
|
190
194
|
Date.parse(value)
|
191
195
|
when :String
|
@@ -215,7 +219,9 @@ module PulpPythonClient
|
|
215
219
|
end
|
216
220
|
end
|
217
221
|
else # model
|
218
|
-
|
222
|
+
# models (e.g. Pet) or oneOf
|
223
|
+
klass = PulpPythonClient.const_get(type)
|
224
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
219
225
|
end
|
220
226
|
end
|
221
227
|
|
@@ -241,7 +247,7 @@ module PulpPythonClient
|
|
241
247
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
242
248
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
243
249
|
end
|
244
|
-
|
250
|
+
|
245
251
|
hash[param] = _to_hash(value)
|
246
252
|
end
|
247
253
|
hash
|
@@ -264,5 +270,7 @@ module PulpPythonClient
|
|
264
270
|
value
|
265
271
|
end
|
266
272
|
end
|
273
|
+
|
267
274
|
end
|
275
|
+
|
268
276
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpPythonClient
|
16
17
|
# A Serializer for PythonRemote.
|
@@ -95,6 +96,28 @@ module PulpPythonClient
|
|
95
96
|
# List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux.
|
96
97
|
attr_accessor :exclude_platforms
|
97
98
|
|
99
|
+
class EnumAttributeValidator
|
100
|
+
attr_reader :datatype
|
101
|
+
attr_reader :allowable_values
|
102
|
+
|
103
|
+
def initialize(datatype, allowable_values)
|
104
|
+
@allowable_values = allowable_values.map do |value|
|
105
|
+
case datatype.to_s
|
106
|
+
when /Integer/i
|
107
|
+
value.to_i
|
108
|
+
when /Float/i
|
109
|
+
value.to_f
|
110
|
+
else
|
111
|
+
value
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def valid?(value)
|
117
|
+
!value || allowable_values.include?(value)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
98
121
|
# Attribute mapping from ruby-style variable name to JSON key.
|
99
122
|
def self.attribute_map
|
100
123
|
{
|
@@ -128,6 +151,11 @@ module PulpPythonClient
|
|
128
151
|
}
|
129
152
|
end
|
130
153
|
|
154
|
+
# Returns all the JSON keys this model knows about
|
155
|
+
def self.acceptable_attributes
|
156
|
+
attribute_map.values
|
157
|
+
end
|
158
|
+
|
131
159
|
# Attribute type mapping.
|
132
160
|
def self.openapi_types
|
133
161
|
{
|
@@ -199,10 +227,14 @@ module PulpPythonClient
|
|
199
227
|
|
200
228
|
if attributes.key?(:'name')
|
201
229
|
self.name = attributes[:'name']
|
230
|
+
else
|
231
|
+
self.name = nil
|
202
232
|
end
|
203
233
|
|
204
234
|
if attributes.key?(:'url')
|
205
235
|
self.url = attributes[:'url']
|
236
|
+
else
|
237
|
+
self.url = nil
|
206
238
|
end
|
207
239
|
|
208
240
|
if attributes.key?(:'ca_cert')
|
@@ -323,6 +355,7 @@ module PulpPythonClient
|
|
323
355
|
# Show invalid properties with the reasons. Usually used together with valid?
|
324
356
|
# @return Array for valid properties with the reasons
|
325
357
|
def list_invalid_properties
|
358
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
326
359
|
invalid_properties = Array.new
|
327
360
|
if @name.nil?
|
328
361
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -376,20 +409,20 @@ module PulpPythonClient
|
|
376
409
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
377
410
|
end
|
378
411
|
|
379
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
380
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
412
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
413
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
381
414
|
end
|
382
415
|
|
383
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
384
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
416
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
417
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
385
418
|
end
|
386
419
|
|
387
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
388
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
420
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
421
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
389
422
|
end
|
390
423
|
|
391
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
392
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
424
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
425
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
393
426
|
end
|
394
427
|
|
395
428
|
invalid_properties
|
@@ -398,6 +431,7 @@ module PulpPythonClient
|
|
398
431
|
# Check to see if the all the properties in the model are valid
|
399
432
|
# @return true if the model is valid
|
400
433
|
def valid?
|
434
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
401
435
|
return false if @name.nil?
|
402
436
|
return false if @name.to_s.length < 1
|
403
437
|
return false if @url.nil?
|
@@ -411,10 +445,10 @@ module PulpPythonClient
|
|
411
445
|
return false if !@username.nil? && @username.to_s.length < 1
|
412
446
|
return false if !@password.nil? && @password.to_s.length < 1
|
413
447
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
414
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
415
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
416
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
417
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
448
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
449
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
450
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
451
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
418
452
|
true
|
419
453
|
end
|
420
454
|
|
@@ -539,8 +573,8 @@ module PulpPythonClient
|
|
539
573
|
# Custom attribute writer method with validation
|
540
574
|
# @param [Object] total_timeout Value to be assigned
|
541
575
|
def total_timeout=(total_timeout)
|
542
|
-
if !total_timeout.nil? && total_timeout < 0
|
543
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
576
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
577
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
544
578
|
end
|
545
579
|
|
546
580
|
@total_timeout = total_timeout
|
@@ -549,8 +583,8 @@ module PulpPythonClient
|
|
549
583
|
# Custom attribute writer method with validation
|
550
584
|
# @param [Object] connect_timeout Value to be assigned
|
551
585
|
def connect_timeout=(connect_timeout)
|
552
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
553
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
586
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
587
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
554
588
|
end
|
555
589
|
|
556
590
|
@connect_timeout = connect_timeout
|
@@ -559,8 +593,8 @@ module PulpPythonClient
|
|
559
593
|
# Custom attribute writer method with validation
|
560
594
|
# @param [Object] sock_connect_timeout Value to be assigned
|
561
595
|
def sock_connect_timeout=(sock_connect_timeout)
|
562
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
563
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
596
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
597
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
564
598
|
end
|
565
599
|
|
566
600
|
@sock_connect_timeout = sock_connect_timeout
|
@@ -569,8 +603,8 @@ module PulpPythonClient
|
|
569
603
|
# Custom attribute writer method with validation
|
570
604
|
# @param [Object] sock_read_timeout Value to be assigned
|
571
605
|
def sock_read_timeout=(sock_read_timeout)
|
572
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
573
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
606
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
607
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
574
608
|
end
|
575
609
|
|
576
610
|
@sock_read_timeout = sock_read_timeout
|
@@ -626,37 +660,33 @@ module PulpPythonClient
|
|
626
660
|
# @param [Hash] attributes Model attributes in the form of hash
|
627
661
|
# @return [Object] Returns the model itself
|
628
662
|
def self.build_from_hash(attributes)
|
629
|
-
new.build_from_hash(attributes)
|
630
|
-
end
|
631
|
-
|
632
|
-
# Builds the object from hash
|
633
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
634
|
-
# @return [Object] Returns the model itself
|
635
|
-
def build_from_hash(attributes)
|
636
663
|
return nil unless attributes.is_a?(Hash)
|
637
|
-
|
638
|
-
|
664
|
+
attributes = attributes.transform_keys(&:to_sym)
|
665
|
+
transformed_hash = {}
|
666
|
+
openapi_types.each_pair do |key, type|
|
667
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
668
|
+
transformed_hash["#{key}"] = nil
|
669
|
+
elsif type =~ /\AArray<(.*)>/i
|
639
670
|
# check to ensure the input is an array given that the attribute
|
640
671
|
# is documented as an array but the input is not
|
641
|
-
if attributes[
|
642
|
-
|
672
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
673
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
643
674
|
end
|
644
|
-
elsif !attributes[
|
645
|
-
|
646
|
-
end
|
675
|
+
elsif !attributes[attribute_map[key]].nil?
|
676
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
677
|
+
end
|
647
678
|
end
|
648
|
-
|
649
|
-
self
|
679
|
+
new(transformed_hash)
|
650
680
|
end
|
651
681
|
|
652
682
|
# Deserializes the data based on type
|
653
683
|
# @param string type Data type
|
654
684
|
# @param string value Value to be deserialized
|
655
685
|
# @return [Object] Deserialized data
|
656
|
-
def _deserialize(type, value)
|
686
|
+
def self._deserialize(type, value)
|
657
687
|
case type.to_sym
|
658
|
-
when :
|
659
|
-
|
688
|
+
when :Time
|
689
|
+
Time.parse(value)
|
660
690
|
when :Date
|
661
691
|
Date.parse(value)
|
662
692
|
when :String
|
@@ -686,7 +716,9 @@ module PulpPythonClient
|
|
686
716
|
end
|
687
717
|
end
|
688
718
|
else # model
|
689
|
-
|
719
|
+
# models (e.g. Pet) or oneOf
|
720
|
+
klass = PulpPythonClient.const_get(type)
|
721
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
690
722
|
end
|
691
723
|
end
|
692
724
|
|
@@ -712,7 +744,7 @@ module PulpPythonClient
|
|
712
744
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
713
745
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
714
746
|
end
|
715
|
-
|
747
|
+
|
716
748
|
hash[param] = _to_hash(value)
|
717
749
|
end
|
718
750
|
hash
|
@@ -735,5 +767,7 @@ module PulpPythonClient
|
|
735
767
|
value
|
736
768
|
end
|
737
769
|
end
|
770
|
+
|
738
771
|
end
|
772
|
+
|
739
773
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpPythonClient
|
16
17
|
# A Serializer for PythonRemote.
|
@@ -94,6 +95,28 @@ module PulpPythonClient
|
|
94
95
|
# List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux.
|
95
96
|
attr_accessor :exclude_platforms
|
96
97
|
|
98
|
+
class EnumAttributeValidator
|
99
|
+
attr_reader :datatype
|
100
|
+
attr_reader :allowable_values
|
101
|
+
|
102
|
+
def initialize(datatype, allowable_values)
|
103
|
+
@allowable_values = allowable_values.map do |value|
|
104
|
+
case datatype.to_s
|
105
|
+
when /Integer/i
|
106
|
+
value.to_i
|
107
|
+
when /Float/i
|
108
|
+
value.to_f
|
109
|
+
else
|
110
|
+
value
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def valid?(value)
|
116
|
+
!value || allowable_values.include?(value)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
97
120
|
# Attribute mapping from ruby-style variable name to JSON key.
|
98
121
|
def self.attribute_map
|
99
122
|
{
|
@@ -127,13 +150,18 @@ module PulpPythonClient
|
|
127
150
|
}
|
128
151
|
end
|
129
152
|
|
153
|
+
# Returns all the JSON keys this model knows about
|
154
|
+
def self.acceptable_attributes
|
155
|
+
attribute_map.values
|
156
|
+
end
|
157
|
+
|
130
158
|
# Attribute type mapping.
|
131
159
|
def self.openapi_types
|
132
160
|
{
|
133
161
|
:'pulp_href' => :'String',
|
134
162
|
:'prn' => :'String',
|
135
|
-
:'pulp_created' => :'
|
136
|
-
:'pulp_last_updated' => :'
|
163
|
+
:'pulp_created' => :'Time',
|
164
|
+
:'pulp_last_updated' => :'Time',
|
137
165
|
:'name' => :'String',
|
138
166
|
:'url' => :'String',
|
139
167
|
:'ca_cert' => :'String',
|
@@ -150,7 +178,7 @@ module PulpPythonClient
|
|
150
178
|
:'sock_read_timeout' => :'Float',
|
151
179
|
:'headers' => :'Array<Object>',
|
152
180
|
:'rate_limit' => :'Integer',
|
153
|
-
:'hidden_fields' => :'Array<
|
181
|
+
:'hidden_fields' => :'Array<PythonPythonRemoteResponseHiddenFieldsInner>',
|
154
182
|
:'includes' => :'Array<String>',
|
155
183
|
:'excludes' => :'Array<String>',
|
156
184
|
:'prereleases' => :'Boolean',
|
@@ -209,10 +237,14 @@ module PulpPythonClient
|
|
209
237
|
|
210
238
|
if attributes.key?(:'name')
|
211
239
|
self.name = attributes[:'name']
|
240
|
+
else
|
241
|
+
self.name = nil
|
212
242
|
end
|
213
243
|
|
214
244
|
if attributes.key?(:'url')
|
215
245
|
self.url = attributes[:'url']
|
246
|
+
else
|
247
|
+
self.url = nil
|
216
248
|
end
|
217
249
|
|
218
250
|
if attributes.key?(:'ca_cert')
|
@@ -319,6 +351,7 @@ module PulpPythonClient
|
|
319
351
|
# Show invalid properties with the reasons. Usually used together with valid?
|
320
352
|
# @return Array for valid properties with the reasons
|
321
353
|
def list_invalid_properties
|
354
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
322
355
|
invalid_properties = Array.new
|
323
356
|
if @name.nil?
|
324
357
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -332,20 +365,20 @@ module PulpPythonClient
|
|
332
365
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
333
366
|
end
|
334
367
|
|
335
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
336
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
368
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
369
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
337
370
|
end
|
338
371
|
|
339
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
340
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
372
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
373
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
341
374
|
end
|
342
375
|
|
343
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
344
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
376
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
377
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
345
378
|
end
|
346
379
|
|
347
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
348
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
380
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
381
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
349
382
|
end
|
350
383
|
|
351
384
|
invalid_properties
|
@@ -354,13 +387,14 @@ module PulpPythonClient
|
|
354
387
|
# Check to see if the all the properties in the model are valid
|
355
388
|
# @return true if the model is valid
|
356
389
|
def valid?
|
390
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
357
391
|
return false if @name.nil?
|
358
392
|
return false if @url.nil?
|
359
393
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
360
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
361
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
362
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
363
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
394
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
395
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
396
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
397
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
364
398
|
true
|
365
399
|
end
|
366
400
|
|
@@ -377,8 +411,8 @@ module PulpPythonClient
|
|
377
411
|
# Custom attribute writer method with validation
|
378
412
|
# @param [Object] total_timeout Value to be assigned
|
379
413
|
def total_timeout=(total_timeout)
|
380
|
-
if !total_timeout.nil? && total_timeout < 0
|
381
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
414
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
415
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
382
416
|
end
|
383
417
|
|
384
418
|
@total_timeout = total_timeout
|
@@ -387,8 +421,8 @@ module PulpPythonClient
|
|
387
421
|
# Custom attribute writer method with validation
|
388
422
|
# @param [Object] connect_timeout Value to be assigned
|
389
423
|
def connect_timeout=(connect_timeout)
|
390
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
391
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
424
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
425
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
392
426
|
end
|
393
427
|
|
394
428
|
@connect_timeout = connect_timeout
|
@@ -397,8 +431,8 @@ module PulpPythonClient
|
|
397
431
|
# Custom attribute writer method with validation
|
398
432
|
# @param [Object] sock_connect_timeout Value to be assigned
|
399
433
|
def sock_connect_timeout=(sock_connect_timeout)
|
400
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
401
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
434
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
435
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
402
436
|
end
|
403
437
|
|
404
438
|
@sock_connect_timeout = sock_connect_timeout
|
@@ -407,8 +441,8 @@ module PulpPythonClient
|
|
407
441
|
# Custom attribute writer method with validation
|
408
442
|
# @param [Object] sock_read_timeout Value to be assigned
|
409
443
|
def sock_read_timeout=(sock_read_timeout)
|
410
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
411
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
444
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
445
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
412
446
|
end
|
413
447
|
|
414
448
|
@sock_read_timeout = sock_read_timeout
|
@@ -464,37 +498,33 @@ module PulpPythonClient
|
|
464
498
|
# @param [Hash] attributes Model attributes in the form of hash
|
465
499
|
# @return [Object] Returns the model itself
|
466
500
|
def self.build_from_hash(attributes)
|
467
|
-
new.build_from_hash(attributes)
|
468
|
-
end
|
469
|
-
|
470
|
-
# Builds the object from hash
|
471
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
472
|
-
# @return [Object] Returns the model itself
|
473
|
-
def build_from_hash(attributes)
|
474
501
|
return nil unless attributes.is_a?(Hash)
|
475
|
-
|
476
|
-
|
502
|
+
attributes = attributes.transform_keys(&:to_sym)
|
503
|
+
transformed_hash = {}
|
504
|
+
openapi_types.each_pair do |key, type|
|
505
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
506
|
+
transformed_hash["#{key}"] = nil
|
507
|
+
elsif type =~ /\AArray<(.*)>/i
|
477
508
|
# check to ensure the input is an array given that the attribute
|
478
509
|
# is documented as an array but the input is not
|
479
|
-
if attributes[
|
480
|
-
|
510
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
511
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
481
512
|
end
|
482
|
-
elsif !attributes[
|
483
|
-
|
484
|
-
end
|
513
|
+
elsif !attributes[attribute_map[key]].nil?
|
514
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
515
|
+
end
|
485
516
|
end
|
486
|
-
|
487
|
-
self
|
517
|
+
new(transformed_hash)
|
488
518
|
end
|
489
519
|
|
490
520
|
# Deserializes the data based on type
|
491
521
|
# @param string type Data type
|
492
522
|
# @param string value Value to be deserialized
|
493
523
|
# @return [Object] Deserialized data
|
494
|
-
def _deserialize(type, value)
|
524
|
+
def self._deserialize(type, value)
|
495
525
|
case type.to_sym
|
496
|
-
when :
|
497
|
-
|
526
|
+
when :Time
|
527
|
+
Time.parse(value)
|
498
528
|
when :Date
|
499
529
|
Date.parse(value)
|
500
530
|
when :String
|
@@ -524,7 +554,9 @@ module PulpPythonClient
|
|
524
554
|
end
|
525
555
|
end
|
526
556
|
else # model
|
527
|
-
|
557
|
+
# models (e.g. Pet) or oneOf
|
558
|
+
klass = PulpPythonClient.const_get(type)
|
559
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
528
560
|
end
|
529
561
|
end
|
530
562
|
|
@@ -550,7 +582,7 @@ module PulpPythonClient
|
|
550
582
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
551
583
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
552
584
|
end
|
553
|
-
|
585
|
+
|
554
586
|
hash[param] = _to_hash(value)
|
555
587
|
end
|
556
588
|
hash
|
@@ -573,5 +605,7 @@ module PulpPythonClient
|
|
573
605
|
value
|
574
606
|
end
|
575
607
|
end
|
608
|
+
|
576
609
|
end
|
610
|
+
|
577
611
|
end
|