pulp_file_client 3.69.2 → 3.70.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 +10 -7
- data/docs/AcsFileApi.md +343 -157
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentFilesApi.md +114 -64
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsFileApi.md +385 -182
- data/docs/FileFileAlternateContentSource.md +14 -13
- data/docs/FileFileAlternateContentSourceResponse.md +22 -21
- data/docs/FileFileContentResponse.md +30 -29
- data/docs/FileFileDistribution.md +20 -19
- data/docs/FileFileDistributionResponse.md +32 -31
- data/docs/FileFilePublication.md +12 -11
- data/docs/FileFilePublicationResponse.md +22 -21
- data/docs/FileFileRemote.md +48 -47
- data/docs/FileFileRemoteResponse.md +48 -47
- data/docs/FileFileRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/FileFileRepository.md +20 -19
- data/docs/FileFileRepositoryResponse.md +32 -31
- 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/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedfileFileAlternateContentSourceResponseList.md +14 -13
- data/docs/PaginatedfileFileContentResponseList.md +14 -13
- data/docs/PaginatedfileFileDistributionResponseList.md +14 -13
- data/docs/PaginatedfileFilePublicationResponseList.md +14 -13
- data/docs/PaginatedfileFileRemoteResponseList.md +14 -13
- data/docs/PaginatedfileFileRepositoryResponseList.md +14 -13
- data/docs/PatchedfileFileAlternateContentSource.md +14 -13
- data/docs/PatchedfileFileDistribution.md +20 -19
- data/docs/PatchedfileFileRemote.md +48 -47
- data/docs/PatchedfileFileRepository.md +20 -19
- data/docs/PolicyEnum.md +4 -5
- data/docs/PublicationsFileApi.md +267 -130
- data/docs/RemotesFileApi.md +389 -184
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesFileApi.md +444 -207
- data/docs/RepositoriesFileVersionsApi.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/TaskGroupOperationResponse.md +8 -7
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_file_client/api/acs_file_api.rb +76 -50
- data/lib/pulp_file_client/api/content_files_api.rb +20 -14
- data/lib/pulp_file_client/api/distributions_file_api.rb +89 -56
- data/lib/pulp_file_client/api/publications_file_api.rb +67 -47
- data/lib/pulp_file_client/api/remotes_file_api.rb +104 -68
- data/lib/pulp_file_client/api/repositories_file_api.rb +107 -66
- data/lib/pulp_file_client/api/repositories_file_versions_api.rb +40 -30
- data/lib/pulp_file_client/api_client.rb +137 -102
- data/lib/pulp_file_client/api_error.rb +2 -1
- data/lib/pulp_file_client/configuration.rb +162 -21
- data/lib/pulp_file_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_file_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_file_client/models/file_file_alternate_content_source.rb +35 -23
- data/lib/pulp_file_client/models/file_file_alternate_content_source_response.rb +37 -25
- data/lib/pulp_file_client/models/file_file_content_response.rb +34 -24
- data/lib/pulp_file_client/models/file_file_distribution.rb +34 -22
- data/lib/pulp_file_client/models/file_file_distribution_response.rb +36 -24
- data/lib/pulp_file_client/models/file_file_publication.rb +30 -22
- data/lib/pulp_file_client/models/file_file_publication_response.rb +32 -24
- data/lib/pulp_file_client/models/file_file_remote.rb +56 -22
- data/lib/pulp_file_client/models/file_file_remote_response.rb +59 -25
- data/lib/pulp_file_client/models/{file_file_remote_response_hidden_fields.rb → file_file_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_file_client/models/file_file_repository.rb +32 -22
- data/lib/pulp_file_client/models/file_file_repository_response.rb +34 -24
- data/lib/pulp_file_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_file_client/models/nested_role.rb +32 -22
- data/lib/pulp_file_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_file_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_file_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_file_client/models/paginatedfile_file_alternate_content_source_response_list.rb +34 -22
- data/lib/pulp_file_client/models/paginatedfile_file_content_response_list.rb +34 -22
- data/lib/pulp_file_client/models/paginatedfile_file_distribution_response_list.rb +34 -22
- data/lib/pulp_file_client/models/paginatedfile_file_publication_response_list.rb +34 -22
- data/lib/pulp_file_client/models/paginatedfile_file_remote_response_list.rb +34 -22
- data/lib/pulp_file_client/models/paginatedfile_file_repository_response_list.rb +34 -22
- data/lib/pulp_file_client/models/patchedfile_file_alternate_content_source.rb +36 -24
- data/lib/pulp_file_client/models/patchedfile_file_distribution.rb +40 -24
- data/lib/pulp_file_client/models/patchedfile_file_remote.rb +62 -24
- data/lib/pulp_file_client/models/patchedfile_file_repository.rb +35 -23
- data/lib/pulp_file_client/models/policy_enum.rb +8 -4
- data/lib/pulp_file_client/models/repair.rb +30 -22
- data/lib/pulp_file_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_file_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_file_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_file_client/models/set_label.rb +34 -22
- data/lib/pulp_file_client/models/set_label_response.rb +34 -22
- data/lib/pulp_file_client/models/task_group_operation_response.rb +32 -22
- data/lib/pulp_file_client/models/unset_label.rb +32 -22
- data/lib/pulp_file_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_file_client/version.rb +2 -2
- data/lib/pulp_file_client.rb +2 -3
- data/pulp_file_client.gemspec +9 -6
- data/spec/api/acs_file_api_spec.rb +12 -12
- data/spec/api/content_files_api_spec.rb +4 -4
- data/spec/api/distributions_file_api_spec.rb +13 -13
- data/spec/api/publications_file_api_spec.rb +16 -15
- data/spec/api/remotes_file_api_spec.rb +20 -19
- data/spec/api/repositories_file_api_spec.rb +15 -15
- data/spec/api/repositories_file_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/file_file_alternate_content_source_response_spec.rb +14 -19
- data/spec/models/file_file_alternate_content_source_spec.rb +10 -15
- data/spec/models/file_file_content_response_spec.rb +18 -23
- data/spec/models/file_file_distribution_response_spec.rb +19 -24
- data/spec/models/file_file_distribution_spec.rb +13 -18
- data/spec/models/file_file_publication_response_spec.rb +14 -19
- data/spec/models/file_file_publication_spec.rb +9 -14
- data/spec/models/{file_file_remote_response_hidden_fields_spec.rb → file_file_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/file_file_remote_response_spec.rb +27 -32
- data/spec/models/file_file_remote_spec.rb +27 -32
- data/spec/models/file_file_repository_response_spec.rb +19 -24
- data/spec/models/file_file_repository_spec.rb +13 -18
- 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/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedfile_file_alternate_content_source_response_list_spec.rb +10 -15
- data/spec/models/paginatedfile_file_content_response_list_spec.rb +10 -15
- data/spec/models/paginatedfile_file_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedfile_file_publication_response_list_spec.rb +10 -15
- data/spec/models/paginatedfile_file_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedfile_file_repository_response_list_spec.rb +10 -15
- data/spec/models/patchedfile_file_alternate_content_source_spec.rb +10 -15
- data/spec/models/patchedfile_file_distribution_spec.rb +13 -18
- data/spec/models/patchedfile_file_remote_spec.rb +27 -32
- data/spec/models/patchedfile_file_repository_spec.rb +13 -18
- data/spec/models/policy_enum_spec.rb +6 -11
- 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/task_group_operation_response_spec.rb +7 -12
- 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 +45 -25
- data/docs/FileFileContent.md +0 -27
- data/docs/FileFileRemoteResponseHiddenFields.md +0 -19
- data/lib/pulp_file_client/models/file_file_content.rb +0 -297
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/file_file_content_spec.rb +0 -71
@@ -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 PulpFileClient
|
16
17
|
class PaginatedRepositoryVersionResponseList
|
@@ -32,6 +33,11 @@ module PulpFileClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpFileClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpFileClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpFileClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpFileClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpFileClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpFileClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpFileClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpFileClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
end
|
data/lib/pulp_file_client/models/paginatedfile_file_alternate_content_source_response_list.rb
CHANGED
@@ -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 PulpFileClient
|
16
17
|
class PaginatedfileFileAlternateContentSourceResponseList
|
@@ -32,6 +33,11 @@ module PulpFileClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpFileClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpFileClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpFileClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpFileClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpFileClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpFileClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpFileClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpFileClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
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 PulpFileClient
|
16
17
|
class PaginatedfileFileContentResponseList
|
@@ -32,6 +33,11 @@ module PulpFileClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpFileClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpFileClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpFileClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpFileClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpFileClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpFileClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpFileClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpFileClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
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 PulpFileClient
|
16
17
|
class PaginatedfileFileDistributionResponseList
|
@@ -32,6 +33,11 @@ module PulpFileClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpFileClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpFileClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpFileClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpFileClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpFileClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpFileClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpFileClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpFileClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
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 PulpFileClient
|
16
17
|
class PaginatedfileFilePublicationResponseList
|
@@ -32,6 +33,11 @@ module PulpFileClient
|
|
32
33
|
}
|
33
34
|
end
|
34
35
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
35
41
|
# Attribute type mapping.
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
@@ -67,6 +73,8 @@ module PulpFileClient
|
|
67
73
|
|
68
74
|
if attributes.key?(:'count')
|
69
75
|
self.count = attributes[:'count']
|
76
|
+
else
|
77
|
+
self.count = nil
|
70
78
|
end
|
71
79
|
|
72
80
|
if attributes.key?(:'_next')
|
@@ -81,12 +89,15 @@ module PulpFileClient
|
|
81
89
|
if (value = attributes[:'results']).is_a?(Array)
|
82
90
|
self.results = value
|
83
91
|
end
|
92
|
+
else
|
93
|
+
self.results = nil
|
84
94
|
end
|
85
95
|
end
|
86
96
|
|
87
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
98
|
# @return Array for valid properties with the reasons
|
89
99
|
def list_invalid_properties
|
100
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
101
|
invalid_properties = Array.new
|
91
102
|
if @count.nil?
|
92
103
|
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
@@ -102,6 +113,7 @@ module PulpFileClient
|
|
102
113
|
# Check to see if the all the properties in the model are valid
|
103
114
|
# @return true if the model is valid
|
104
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
105
117
|
return false if @count.nil?
|
106
118
|
return false if @results.nil?
|
107
119
|
true
|
@@ -134,37 +146,33 @@ module PulpFileClient
|
|
134
146
|
# @param [Hash] attributes Model attributes in the form of hash
|
135
147
|
# @return [Object] Returns the model itself
|
136
148
|
def self.build_from_hash(attributes)
|
137
|
-
new.build_from_hash(attributes)
|
138
|
-
end
|
139
|
-
|
140
|
-
# Builds the object from hash
|
141
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
-
# @return [Object] Returns the model itself
|
143
|
-
def build_from_hash(attributes)
|
144
149
|
return nil unless attributes.is_a?(Hash)
|
145
|
-
|
146
|
-
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
transformed_hash = {}
|
152
|
+
openapi_types.each_pair do |key, type|
|
153
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
154
|
+
transformed_hash["#{key}"] = nil
|
155
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
156
|
# check to ensure the input is an array given that the attribute
|
148
157
|
# is documented as an array but the input is not
|
149
|
-
if attributes[
|
150
|
-
|
158
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
159
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
151
160
|
end
|
152
|
-
elsif !attributes[
|
153
|
-
|
154
|
-
end
|
161
|
+
elsif !attributes[attribute_map[key]].nil?
|
162
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
163
|
+
end
|
155
164
|
end
|
156
|
-
|
157
|
-
self
|
165
|
+
new(transformed_hash)
|
158
166
|
end
|
159
167
|
|
160
168
|
# Deserializes the data based on type
|
161
169
|
# @param string type Data type
|
162
170
|
# @param string value Value to be deserialized
|
163
171
|
# @return [Object] Deserialized data
|
164
|
-
def _deserialize(type, value)
|
172
|
+
def self._deserialize(type, value)
|
165
173
|
case type.to_sym
|
166
|
-
when :
|
167
|
-
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
168
176
|
when :Date
|
169
177
|
Date.parse(value)
|
170
178
|
when :String
|
@@ -194,7 +202,9 @@ module PulpFileClient
|
|
194
202
|
end
|
195
203
|
end
|
196
204
|
else # model
|
197
|
-
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = PulpFileClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
208
|
end
|
199
209
|
end
|
200
210
|
|
@@ -220,7 +230,7 @@ module PulpFileClient
|
|
220
230
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
221
231
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
232
|
end
|
223
|
-
|
233
|
+
|
224
234
|
hash[param] = _to_hash(value)
|
225
235
|
end
|
226
236
|
hash
|
@@ -243,5 +253,7 @@ module PulpFileClient
|
|
243
253
|
value
|
244
254
|
end
|
245
255
|
end
|
256
|
+
|
246
257
|
end
|
258
|
+
|
247
259
|
end
|