pulp_python_client 3.12.5 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,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
|
@@ -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
|
# Serializer for Python Repositories.
|
@@ -44,6 +45,11 @@ module PulpPythonClient
|
|
44
45
|
}
|
45
46
|
end
|
46
47
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
47
53
|
# Attribute type mapping.
|
48
54
|
def self.openapi_types
|
49
55
|
{
|
@@ -88,6 +94,8 @@ module PulpPythonClient
|
|
88
94
|
|
89
95
|
if attributes.key?(:'name')
|
90
96
|
self.name = attributes[:'name']
|
97
|
+
else
|
98
|
+
self.name = nil
|
91
99
|
end
|
92
100
|
|
93
101
|
if attributes.key?(:'description')
|
@@ -112,6 +120,7 @@ module PulpPythonClient
|
|
112
120
|
# Show invalid properties with the reasons. Usually used together with valid?
|
113
121
|
# @return Array for valid properties with the reasons
|
114
122
|
def list_invalid_properties
|
123
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
115
124
|
invalid_properties = Array.new
|
116
125
|
if @name.nil?
|
117
126
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -135,6 +144,7 @@ module PulpPythonClient
|
|
135
144
|
# Check to see if the all the properties in the model are valid
|
136
145
|
# @return true if the model is valid
|
137
146
|
def valid?
|
147
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
138
148
|
return false if @name.nil?
|
139
149
|
return false if @name.to_s.length < 1
|
140
150
|
return false if !@description.nil? && @description.to_s.length < 1
|
@@ -205,37 +215,33 @@ module PulpPythonClient
|
|
205
215
|
# @param [Hash] attributes Model attributes in the form of hash
|
206
216
|
# @return [Object] Returns the model itself
|
207
217
|
def self.build_from_hash(attributes)
|
208
|
-
new.build_from_hash(attributes)
|
209
|
-
end
|
210
|
-
|
211
|
-
# Builds the object from hash
|
212
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
-
# @return [Object] Returns the model itself
|
214
|
-
def build_from_hash(attributes)
|
215
218
|
return nil unless attributes.is_a?(Hash)
|
216
|
-
|
217
|
-
|
219
|
+
attributes = attributes.transform_keys(&:to_sym)
|
220
|
+
transformed_hash = {}
|
221
|
+
openapi_types.each_pair do |key, type|
|
222
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
223
|
+
transformed_hash["#{key}"] = nil
|
224
|
+
elsif type =~ /\AArray<(.*)>/i
|
218
225
|
# check to ensure the input is an array given that the attribute
|
219
226
|
# is documented as an array but the input is not
|
220
|
-
if attributes[
|
221
|
-
|
227
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
228
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
222
229
|
end
|
223
|
-
elsif !attributes[
|
224
|
-
|
225
|
-
end
|
230
|
+
elsif !attributes[attribute_map[key]].nil?
|
231
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
232
|
+
end
|
226
233
|
end
|
227
|
-
|
228
|
-
self
|
234
|
+
new(transformed_hash)
|
229
235
|
end
|
230
236
|
|
231
237
|
# Deserializes the data based on type
|
232
238
|
# @param string type Data type
|
233
239
|
# @param string value Value to be deserialized
|
234
240
|
# @return [Object] Deserialized data
|
235
|
-
def _deserialize(type, value)
|
241
|
+
def self._deserialize(type, value)
|
236
242
|
case type.to_sym
|
237
|
-
when :
|
238
|
-
|
243
|
+
when :Time
|
244
|
+
Time.parse(value)
|
239
245
|
when :Date
|
240
246
|
Date.parse(value)
|
241
247
|
when :String
|
@@ -265,7 +271,9 @@ module PulpPythonClient
|
|
265
271
|
end
|
266
272
|
end
|
267
273
|
else # model
|
268
|
-
|
274
|
+
# models (e.g. Pet) or oneOf
|
275
|
+
klass = PulpPythonClient.const_get(type)
|
276
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
269
277
|
end
|
270
278
|
end
|
271
279
|
|
@@ -291,7 +299,7 @@ module PulpPythonClient
|
|
291
299
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
292
300
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
293
301
|
end
|
294
|
-
|
302
|
+
|
295
303
|
hash[param] = _to_hash(value)
|
296
304
|
end
|
297
305
|
hash
|
@@ -314,5 +322,7 @@ module PulpPythonClient
|
|
314
322
|
value
|
315
323
|
end
|
316
324
|
end
|
325
|
+
|
317
326
|
end
|
327
|
+
|
318
328
|
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
|
# Serializer for Python Repositories.
|
@@ -65,13 +66,18 @@ module PulpPythonClient
|
|
65
66
|
}
|
66
67
|
end
|
67
68
|
|
69
|
+
# Returns all the JSON keys this model knows about
|
70
|
+
def self.acceptable_attributes
|
71
|
+
attribute_map.values
|
72
|
+
end
|
73
|
+
|
68
74
|
# Attribute type mapping.
|
69
75
|
def self.openapi_types
|
70
76
|
{
|
71
77
|
:'pulp_href' => :'String',
|
72
78
|
:'prn' => :'String',
|
73
|
-
:'pulp_created' => :'
|
74
|
-
:'pulp_last_updated' => :'
|
79
|
+
:'pulp_created' => :'Time',
|
80
|
+
:'pulp_last_updated' => :'Time',
|
75
81
|
:'versions_href' => :'String',
|
76
82
|
:'pulp_labels' => :'Hash<String, String>',
|
77
83
|
:'latest_version_href' => :'String',
|
@@ -139,6 +145,8 @@ module PulpPythonClient
|
|
139
145
|
|
140
146
|
if attributes.key?(:'name')
|
141
147
|
self.name = attributes[:'name']
|
148
|
+
else
|
149
|
+
self.name = nil
|
142
150
|
end
|
143
151
|
|
144
152
|
if attributes.key?(:'description')
|
@@ -163,6 +171,7 @@ module PulpPythonClient
|
|
163
171
|
# Show invalid properties with the reasons. Usually used together with valid?
|
164
172
|
# @return Array for valid properties with the reasons
|
165
173
|
def list_invalid_properties
|
174
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
166
175
|
invalid_properties = Array.new
|
167
176
|
if @name.nil?
|
168
177
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -178,6 +187,7 @@ module PulpPythonClient
|
|
178
187
|
# Check to see if the all the properties in the model are valid
|
179
188
|
# @return true if the model is valid
|
180
189
|
def valid?
|
190
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
181
191
|
return false if @name.nil?
|
182
192
|
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
183
193
|
true
|
@@ -228,37 +238,33 @@ module PulpPythonClient
|
|
228
238
|
# @param [Hash] attributes Model attributes in the form of hash
|
229
239
|
# @return [Object] Returns the model itself
|
230
240
|
def self.build_from_hash(attributes)
|
231
|
-
new.build_from_hash(attributes)
|
232
|
-
end
|
233
|
-
|
234
|
-
# Builds the object from hash
|
235
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
236
|
-
# @return [Object] Returns the model itself
|
237
|
-
def build_from_hash(attributes)
|
238
241
|
return nil unless attributes.is_a?(Hash)
|
239
|
-
|
240
|
-
|
242
|
+
attributes = attributes.transform_keys(&:to_sym)
|
243
|
+
transformed_hash = {}
|
244
|
+
openapi_types.each_pair do |key, type|
|
245
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
246
|
+
transformed_hash["#{key}"] = nil
|
247
|
+
elsif type =~ /\AArray<(.*)>/i
|
241
248
|
# check to ensure the input is an array given that the attribute
|
242
249
|
# is documented as an array but the input is not
|
243
|
-
if attributes[
|
244
|
-
|
250
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
251
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
245
252
|
end
|
246
|
-
elsif !attributes[
|
247
|
-
|
248
|
-
end
|
253
|
+
elsif !attributes[attribute_map[key]].nil?
|
254
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
255
|
+
end
|
249
256
|
end
|
250
|
-
|
251
|
-
self
|
257
|
+
new(transformed_hash)
|
252
258
|
end
|
253
259
|
|
254
260
|
# Deserializes the data based on type
|
255
261
|
# @param string type Data type
|
256
262
|
# @param string value Value to be deserialized
|
257
263
|
# @return [Object] Deserialized data
|
258
|
-
def _deserialize(type, value)
|
264
|
+
def self._deserialize(type, value)
|
259
265
|
case type.to_sym
|
260
|
-
when :
|
261
|
-
|
266
|
+
when :Time
|
267
|
+
Time.parse(value)
|
262
268
|
when :Date
|
263
269
|
Date.parse(value)
|
264
270
|
when :String
|
@@ -288,7 +294,9 @@ module PulpPythonClient
|
|
288
294
|
end
|
289
295
|
end
|
290
296
|
else # model
|
291
|
-
|
297
|
+
# models (e.g. Pet) or oneOf
|
298
|
+
klass = PulpPythonClient.const_get(type)
|
299
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
292
300
|
end
|
293
301
|
end
|
294
302
|
|
@@ -314,7 +322,7 @@ module PulpPythonClient
|
|
314
322
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
315
323
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
316
324
|
end
|
317
|
-
|
325
|
+
|
318
326
|
hash[param] = _to_hash(value)
|
319
327
|
end
|
320
328
|
hash
|
@@ -337,5 +345,7 @@ module PulpPythonClient
|
|
337
345
|
value
|
338
346
|
end
|
339
347
|
end
|
348
|
+
|
340
349
|
end
|
350
|
+
|
341
351
|
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
|
class Repair
|
@@ -24,6 +25,11 @@ module PulpPythonClient
|
|
24
25
|
}
|
25
26
|
end
|
26
27
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
27
33
|
# Attribute type mapping.
|
28
34
|
def self.openapi_types
|
29
35
|
{
|
@@ -62,6 +68,7 @@ module PulpPythonClient
|
|
62
68
|
# Show invalid properties with the reasons. Usually used together with valid?
|
63
69
|
# @return Array for valid properties with the reasons
|
64
70
|
def list_invalid_properties
|
71
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
65
72
|
invalid_properties = Array.new
|
66
73
|
invalid_properties
|
67
74
|
end
|
@@ -69,6 +76,7 @@ module PulpPythonClient
|
|
69
76
|
# Check to see if the all the properties in the model are valid
|
70
77
|
# @return true if the model is valid
|
71
78
|
def valid?
|
79
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
72
80
|
true
|
73
81
|
end
|
74
82
|
|
@@ -96,37 +104,33 @@ module PulpPythonClient
|
|
96
104
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
105
|
# @return [Object] Returns the model itself
|
98
106
|
def self.build_from_hash(attributes)
|
99
|
-
new.build_from_hash(attributes)
|
100
|
-
end
|
101
|
-
|
102
|
-
# Builds the object from hash
|
103
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
104
|
-
# @return [Object] Returns the model itself
|
105
|
-
def build_from_hash(attributes)
|
106
107
|
return nil unless attributes.is_a?(Hash)
|
107
|
-
|
108
|
-
|
108
|
+
attributes = attributes.transform_keys(&:to_sym)
|
109
|
+
transformed_hash = {}
|
110
|
+
openapi_types.each_pair do |key, type|
|
111
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
112
|
+
transformed_hash["#{key}"] = nil
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
109
114
|
# check to ensure the input is an array given that the attribute
|
110
115
|
# is documented as an array but the input is not
|
111
|
-
if attributes[
|
112
|
-
|
116
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
117
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
113
118
|
end
|
114
|
-
elsif !attributes[
|
115
|
-
|
116
|
-
end
|
119
|
+
elsif !attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
121
|
+
end
|
117
122
|
end
|
118
|
-
|
119
|
-
self
|
123
|
+
new(transformed_hash)
|
120
124
|
end
|
121
125
|
|
122
126
|
# Deserializes the data based on type
|
123
127
|
# @param string type Data type
|
124
128
|
# @param string value Value to be deserialized
|
125
129
|
# @return [Object] Deserialized data
|
126
|
-
def _deserialize(type, value)
|
130
|
+
def self._deserialize(type, value)
|
127
131
|
case type.to_sym
|
128
|
-
when :
|
129
|
-
|
132
|
+
when :Time
|
133
|
+
Time.parse(value)
|
130
134
|
when :Date
|
131
135
|
Date.parse(value)
|
132
136
|
when :String
|
@@ -156,7 +160,9 @@ module PulpPythonClient
|
|
156
160
|
end
|
157
161
|
end
|
158
162
|
else # model
|
159
|
-
|
163
|
+
# models (e.g. Pet) or oneOf
|
164
|
+
klass = PulpPythonClient.const_get(type)
|
165
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
160
166
|
end
|
161
167
|
end
|
162
168
|
|
@@ -182,7 +188,7 @@ module PulpPythonClient
|
|
182
188
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
183
189
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
184
190
|
end
|
185
|
-
|
191
|
+
|
186
192
|
hash[param] = _to_hash(value)
|
187
193
|
end
|
188
194
|
hash
|
@@ -205,5 +211,7 @@ module PulpPythonClient
|
|
205
211
|
value
|
206
212
|
end
|
207
213
|
end
|
214
|
+
|
208
215
|
end
|
216
|
+
|
209
217
|
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
|
# Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
@@ -33,6 +34,11 @@ module PulpPythonClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
@@ -83,6 +89,7 @@ module PulpPythonClient
|
|
83
89
|
# Show invalid properties with the reasons. Usually used together with valid?
|
84
90
|
# @return Array for valid properties with the reasons
|
85
91
|
def list_invalid_properties
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
86
93
|
invalid_properties = Array.new
|
87
94
|
invalid_properties
|
88
95
|
end
|
@@ -90,6 +97,7 @@ module PulpPythonClient
|
|
90
97
|
# Check to see if the all the properties in the model are valid
|
91
98
|
# @return true if the model is valid
|
92
99
|
def valid?
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
101
|
true
|
94
102
|
end
|
95
103
|
|
@@ -119,37 +127,33 @@ module PulpPythonClient
|
|
119
127
|
# @param [Hash] attributes Model attributes in the form of hash
|
120
128
|
# @return [Object] Returns the model itself
|
121
129
|
def self.build_from_hash(attributes)
|
122
|
-
new.build_from_hash(attributes)
|
123
|
-
end
|
124
|
-
|
125
|
-
# Builds the object from hash
|
126
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
-
# @return [Object] Returns the model itself
|
128
|
-
def build_from_hash(attributes)
|
129
130
|
return nil unless attributes.is_a?(Hash)
|
130
|
-
|
131
|
-
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
132
|
+
transformed_hash = {}
|
133
|
+
openapi_types.each_pair do |key, type|
|
134
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = nil
|
136
|
+
elsif type =~ /\AArray<(.*)>/i
|
132
137
|
# check to ensure the input is an array given that the attribute
|
133
138
|
# is documented as an array but the input is not
|
134
|
-
if attributes[
|
135
|
-
|
139
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
140
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
136
141
|
end
|
137
|
-
elsif !attributes[
|
138
|
-
|
139
|
-
end
|
142
|
+
elsif !attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
144
|
+
end
|
140
145
|
end
|
141
|
-
|
142
|
-
self
|
146
|
+
new(transformed_hash)
|
143
147
|
end
|
144
148
|
|
145
149
|
# Deserializes the data based on type
|
146
150
|
# @param string type Data type
|
147
151
|
# @param string value Value to be deserialized
|
148
152
|
# @return [Object] Deserialized data
|
149
|
-
def _deserialize(type, value)
|
153
|
+
def self._deserialize(type, value)
|
150
154
|
case type.to_sym
|
151
|
-
when :
|
152
|
-
|
155
|
+
when :Time
|
156
|
+
Time.parse(value)
|
153
157
|
when :Date
|
154
158
|
Date.parse(value)
|
155
159
|
when :String
|
@@ -179,7 +183,9 @@ module PulpPythonClient
|
|
179
183
|
end
|
180
184
|
end
|
181
185
|
else # model
|
182
|
-
|
186
|
+
# models (e.g. Pet) or oneOf
|
187
|
+
klass = PulpPythonClient.const_get(type)
|
188
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
189
|
end
|
184
190
|
end
|
185
191
|
|
@@ -205,7 +211,7 @@ module PulpPythonClient
|
|
205
211
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
212
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
213
|
end
|
208
|
-
|
214
|
+
|
209
215
|
hash[param] = _to_hash(value)
|
210
216
|
end
|
211
217
|
hash
|
@@ -228,5 +234,7 @@ module PulpPythonClient
|
|
228
234
|
value
|
229
235
|
end
|
230
236
|
end
|
237
|
+
|
231
238
|
end
|
239
|
+
|
232
240
|
end
|