pulp_python_client 3.12.4 → 3.13.0
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 +33 -27
- 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 +44 -40
- 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 +62 -24
- 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 +44 -30
- 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 +56 -22
- data/lib/pulp_python_client/models/python_python_remote_response.rb +59 -25
- 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 +10 -10
- 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 +78 -66
- 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.')
|
@@ -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?
|
@@ -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.')
|
@@ -354,6 +387,7 @@ 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
|
@@ -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
|
@@ -6,14 +6,15 @@
|
|
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
|
-
class
|
17
|
+
class PythonPythonRemoteResponseHiddenFieldsInner
|
17
18
|
attr_accessor :name
|
18
19
|
|
19
20
|
attr_accessor :is_set
|
@@ -26,6 +27,11 @@ module PulpPythonClient
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -44,29 +50,34 @@ module PulpPythonClient
|
|
44
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
45
51
|
def initialize(attributes = {})
|
46
52
|
if (!attributes.is_a?(Hash))
|
47
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PythonPythonRemoteResponseHiddenFieldsInner` initialize method"
|
48
54
|
end
|
49
55
|
|
50
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
51
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PythonPythonRemoteResponseHiddenFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
60
|
end
|
55
61
|
h[k.to_sym] = v
|
56
62
|
}
|
57
63
|
|
58
64
|
if attributes.key?(:'name')
|
59
65
|
self.name = attributes[:'name']
|
66
|
+
else
|
67
|
+
self.name = nil
|
60
68
|
end
|
61
69
|
|
62
70
|
if attributes.key?(:'is_set')
|
63
71
|
self.is_set = attributes[:'is_set']
|
72
|
+
else
|
73
|
+
self.is_set = nil
|
64
74
|
end
|
65
75
|
end
|
66
76
|
|
67
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
78
|
# @return Array for valid properties with the reasons
|
69
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
81
|
invalid_properties = Array.new
|
71
82
|
if @name.nil?
|
72
83
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -82,6 +93,7 @@ module PulpPythonClient
|
|
82
93
|
# Check to see if the all the properties in the model are valid
|
83
94
|
# @return true if the model is valid
|
84
95
|
def valid?
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
97
|
return false if @name.nil?
|
86
98
|
return false if @is_set.nil?
|
87
99
|
true
|
@@ -112,37 +124,33 @@ module PulpPythonClient
|
|
112
124
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
125
|
# @return [Object] Returns the model itself
|
114
126
|
def self.build_from_hash(attributes)
|
115
|
-
new.build_from_hash(attributes)
|
116
|
-
end
|
117
|
-
|
118
|
-
# Builds the object from hash
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
-
# @return [Object] Returns the model itself
|
121
|
-
def build_from_hash(attributes)
|
122
127
|
return nil unless attributes.is_a?(Hash)
|
123
|
-
|
124
|
-
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
129
|
+
transformed_hash = {}
|
130
|
+
openapi_types.each_pair do |key, type|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
132
|
+
transformed_hash["#{key}"] = nil
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
125
134
|
# check to ensure the input is an array given that the attribute
|
126
135
|
# is documented as an array but the input is not
|
127
|
-
if attributes[
|
128
|
-
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
129
138
|
end
|
130
|
-
elsif !attributes[
|
131
|
-
|
132
|
-
end
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
141
|
+
end
|
133
142
|
end
|
134
|
-
|
135
|
-
self
|
143
|
+
new(transformed_hash)
|
136
144
|
end
|
137
145
|
|
138
146
|
# Deserializes the data based on type
|
139
147
|
# @param string type Data type
|
140
148
|
# @param string value Value to be deserialized
|
141
149
|
# @return [Object] Deserialized data
|
142
|
-
def _deserialize(type, value)
|
150
|
+
def self._deserialize(type, value)
|
143
151
|
case type.to_sym
|
144
|
-
when :
|
145
|
-
|
152
|
+
when :Time
|
153
|
+
Time.parse(value)
|
146
154
|
when :Date
|
147
155
|
Date.parse(value)
|
148
156
|
when :String
|
@@ -172,7 +180,9 @@ module PulpPythonClient
|
|
172
180
|
end
|
173
181
|
end
|
174
182
|
else # model
|
175
|
-
|
183
|
+
# models (e.g. Pet) or oneOf
|
184
|
+
klass = PulpPythonClient.const_get(type)
|
185
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
186
|
end
|
177
187
|
end
|
178
188
|
|
@@ -198,7 +208,7 @@ module PulpPythonClient
|
|
198
208
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
199
209
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
200
210
|
end
|
201
|
-
|
211
|
+
|
202
212
|
hash[param] = _to_hash(value)
|
203
213
|
end
|
204
214
|
hash
|
@@ -221,5 +231,7 @@ module PulpPythonClient
|
|
221
231
|
value
|
222
232
|
end
|
223
233
|
end
|
234
|
+
|
224
235
|
end
|
236
|
+
|
225
237
|
end
|