pulp_ostree_client 2.4.4 → 2.4.6
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 +16 -12
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentCommitsApi.md +80 -47
- data/docs/ContentConfigsApi.md +79 -46
- data/docs/ContentContentApi.md +107 -57
- data/docs/ContentObjectsApi.md +80 -47
- data/docs/ContentRefsApi.md +90 -57
- data/docs/ContentSummariesApi.md +79 -46
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsOstreeApi.md +385 -182
- 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/OstreeImportAll.md +10 -9
- data/docs/OstreeImportCommitsToRef.md +12 -11
- data/docs/OstreeOstreeCommitResponse.md +24 -23
- data/docs/OstreeOstreeConfigResponse.md +18 -17
- data/docs/OstreeOstreeContent.md +14 -13
- data/docs/OstreeOstreeContentResponse.md +20 -19
- data/docs/OstreeOstreeDistribution.md +20 -19
- data/docs/OstreeOstreeDistributionResponse.md +32 -31
- data/docs/OstreeOstreeObjectResponse.md +22 -21
- data/docs/OstreeOstreeRefResponse.md +24 -23
- data/docs/OstreeOstreeRemote.md +54 -53
- data/docs/OstreeOstreeRemoteResponse.md +54 -53
- data/docs/OstreeOstreeRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/OstreeOstreeRepository.md +18 -17
- data/docs/OstreeOstreeRepositoryResponse.md +30 -29
- data/docs/OstreeOstreeSummaryResponse.md +18 -17
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeCommitResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeConfigResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeContentResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeDistributionResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeObjectResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRefResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRemoteResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRepositoryResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeSummaryResponseList.md +14 -13
- data/docs/PatchedostreeOstreeDistribution.md +20 -19
- data/docs/PatchedostreeOstreeRemote.md +54 -53
- data/docs/PatchedostreeOstreeRepository.md +18 -17
- data/docs/PolicyEnum.md +4 -5
- data/docs/RemotesOstreeApi.md +389 -184
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesOstreeApi.md +502 -231
- data/docs/RepositoriesOstreeVersionsApi.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/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_ostree_client/api/content_commits_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_configs_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_content_api.rb +20 -14
- data/lib/pulp_ostree_client/api/content_objects_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_refs_api.rb +11 -9
- data/lib/pulp_ostree_client/api/content_summaries_api.rb +11 -9
- data/lib/pulp_ostree_client/api/distributions_ostree_api.rb +89 -56
- data/lib/pulp_ostree_client/api/remotes_ostree_api.rb +104 -68
- data/lib/pulp_ostree_client/api/repositories_ostree_api.rb +125 -76
- data/lib/pulp_ostree_client/api/repositories_ostree_versions_api.rb +40 -30
- data/lib/pulp_ostree_client/api_client.rb +137 -102
- data/lib/pulp_ostree_client/api_error.rb +2 -1
- data/lib/pulp_ostree_client/configuration.rb +162 -21
- data/lib/pulp_ostree_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_ostree_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_ostree_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_ostree_client/models/nested_role.rb +32 -22
- data/lib/pulp_ostree_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_ostree_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_ostree_client/models/ostree_import_all.rb +34 -22
- data/lib/pulp_ostree_client/models/ostree_import_commits_to_ref.rb +36 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_commit_response.rb +40 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_config_response.rb +36 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_content.rb +36 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_content_response.rb +38 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution.rb +34 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution_response.rb +36 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_object_response.rb +40 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_ref_response.rb +40 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_remote.rb +81 -43
- data/lib/pulp_ostree_client/models/ostree_ostree_remote_response.rb +84 -46
- data/lib/pulp_ostree_client/models/{ostree_ostree_remote_response_hidden_fields.rb → ostree_ostree_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_repository.rb +32 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_repository_response.rb +34 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_summary_response.rb +36 -24
- data/lib/pulp_ostree_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_commit_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_config_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_content_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_distribution_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_object_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_ref_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_remote_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_repository_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_summary_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/patchedostree_ostree_distribution.rb +40 -24
- data/lib/pulp_ostree_client/models/patchedostree_ostree_remote.rb +87 -45
- data/lib/pulp_ostree_client/models/patchedostree_ostree_repository.rb +35 -23
- data/lib/pulp_ostree_client/models/policy_enum.rb +8 -4
- data/lib/pulp_ostree_client/models/repair.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_ostree_client/models/set_label.rb +34 -22
- data/lib/pulp_ostree_client/models/set_label_response.rb +34 -22
- data/lib/pulp_ostree_client/models/unset_label.rb +32 -22
- data/lib/pulp_ostree_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_ostree_client/version.rb +2 -2
- data/lib/pulp_ostree_client.rb +2 -2
- data/pulp_ostree_client.gemspec +9 -6
- data/spec/api/content_commits_api_spec.rb +3 -3
- data/spec/api/content_configs_api_spec.rb +3 -3
- data/spec/api/content_content_api_spec.rb +4 -4
- data/spec/api/content_objects_api_spec.rb +3 -3
- data/spec/api/content_refs_api_spec.rb +3 -3
- data/spec/api/content_summaries_api_spec.rb +3 -3
- data/spec/api/distributions_ostree_api_spec.rb +13 -13
- data/spec/api/remotes_ostree_api_spec.rb +20 -19
- data/spec/api/repositories_ostree_api_spec.rb +17 -17
- data/spec/api/repositories_ostree_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/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/ostree_import_all_spec.rb +8 -13
- data/spec/models/ostree_import_commits_to_ref_spec.rb +9 -14
- data/spec/models/ostree_ostree_commit_response_spec.rb +15 -20
- data/spec/models/ostree_ostree_config_response_spec.rb +12 -17
- data/spec/models/ostree_ostree_content_response_spec.rb +13 -18
- data/spec/models/ostree_ostree_content_spec.rb +10 -15
- data/spec/models/ostree_ostree_distribution_response_spec.rb +19 -24
- data/spec/models/ostree_ostree_distribution_spec.rb +13 -18
- data/spec/models/ostree_ostree_object_response_spec.rb +14 -19
- data/spec/models/ostree_ostree_ref_response_spec.rb +15 -20
- data/spec/models/{ostree_ostree_remote_response_hidden_fields_spec.rb → ostree_ostree_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/ostree_ostree_remote_response_spec.rb +30 -35
- data/spec/models/ostree_ostree_remote_spec.rb +30 -35
- data/spec/models/ostree_ostree_repository_response_spec.rb +18 -23
- data/spec/models/ostree_ostree_repository_spec.rb +12 -17
- data/spec/models/ostree_ostree_summary_response_spec.rb +12 -17
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_commit_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_config_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_content_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_object_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_ref_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_summary_response_list_spec.rb +10 -15
- data/spec/models/patchedostree_ostree_distribution_spec.rb +13 -18
- data/spec/models/patchedostree_ostree_remote_spec.rb +30 -35
- data/spec/models/patchedostree_ostree_repository_spec.rb +12 -17
- 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/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +87 -63
- data/docs/OstreeOstreeRemoteResponseHiddenFields.md +0 -19
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
@@ -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 PulpOstreeClient
|
16
17
|
# A Serializer class for an OSTree distribution.
|
@@ -48,6 +49,11 @@ module PulpOstreeClient
|
|
48
49
|
}
|
49
50
|
end
|
50
51
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
51
57
|
# Attribute type mapping.
|
52
58
|
def self.openapi_types
|
53
59
|
{
|
@@ -121,6 +127,7 @@ module PulpOstreeClient
|
|
121
127
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
128
|
# @return Array for valid properties with the reasons
|
123
129
|
def list_invalid_properties
|
130
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
131
|
invalid_properties = Array.new
|
125
132
|
if !@base_path.nil? && @base_path.to_s.length < 1
|
126
133
|
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
@@ -136,6 +143,7 @@ module PulpOstreeClient
|
|
136
143
|
# Check to see if the all the properties in the model are valid
|
137
144
|
# @return true if the model is valid
|
138
145
|
def valid?
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
139
147
|
return false if !@base_path.nil? && @base_path.to_s.length < 1
|
140
148
|
return false if !@name.nil? && @name.to_s.length < 1
|
141
149
|
true
|
@@ -144,7 +152,11 @@ module PulpOstreeClient
|
|
144
152
|
# Custom attribute writer method with validation
|
145
153
|
# @param [Object] base_path Value to be assigned
|
146
154
|
def base_path=(base_path)
|
147
|
-
if
|
155
|
+
if base_path.nil?
|
156
|
+
fail ArgumentError, 'base_path cannot be nil'
|
157
|
+
end
|
158
|
+
|
159
|
+
if base_path.to_s.length < 1
|
148
160
|
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
149
161
|
end
|
150
162
|
|
@@ -154,7 +166,11 @@ module PulpOstreeClient
|
|
154
166
|
# Custom attribute writer method with validation
|
155
167
|
# @param [Object] name Value to be assigned
|
156
168
|
def name=(name)
|
157
|
-
if
|
169
|
+
if name.nil?
|
170
|
+
fail ArgumentError, 'name cannot be nil'
|
171
|
+
end
|
172
|
+
|
173
|
+
if name.to_s.length < 1
|
158
174
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
159
175
|
end
|
160
176
|
|
@@ -191,37 +207,33 @@ module PulpOstreeClient
|
|
191
207
|
# @param [Hash] attributes Model attributes in the form of hash
|
192
208
|
# @return [Object] Returns the model itself
|
193
209
|
def self.build_from_hash(attributes)
|
194
|
-
new.build_from_hash(attributes)
|
195
|
-
end
|
196
|
-
|
197
|
-
# Builds the object from hash
|
198
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
199
|
-
# @return [Object] Returns the model itself
|
200
|
-
def build_from_hash(attributes)
|
201
210
|
return nil unless attributes.is_a?(Hash)
|
202
|
-
|
203
|
-
|
211
|
+
attributes = attributes.transform_keys(&:to_sym)
|
212
|
+
transformed_hash = {}
|
213
|
+
openapi_types.each_pair do |key, type|
|
214
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
215
|
+
transformed_hash["#{key}"] = nil
|
216
|
+
elsif type =~ /\AArray<(.*)>/i
|
204
217
|
# check to ensure the input is an array given that the attribute
|
205
218
|
# is documented as an array but the input is not
|
206
|
-
if attributes[
|
207
|
-
|
219
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
220
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
208
221
|
end
|
209
|
-
elsif !attributes[
|
210
|
-
|
211
|
-
end
|
222
|
+
elsif !attributes[attribute_map[key]].nil?
|
223
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
224
|
+
end
|
212
225
|
end
|
213
|
-
|
214
|
-
self
|
226
|
+
new(transformed_hash)
|
215
227
|
end
|
216
228
|
|
217
229
|
# Deserializes the data based on type
|
218
230
|
# @param string type Data type
|
219
231
|
# @param string value Value to be deserialized
|
220
232
|
# @return [Object] Deserialized data
|
221
|
-
def _deserialize(type, value)
|
233
|
+
def self._deserialize(type, value)
|
222
234
|
case type.to_sym
|
223
|
-
when :
|
224
|
-
|
235
|
+
when :Time
|
236
|
+
Time.parse(value)
|
225
237
|
when :Date
|
226
238
|
Date.parse(value)
|
227
239
|
when :String
|
@@ -251,7 +263,9 @@ module PulpOstreeClient
|
|
251
263
|
end
|
252
264
|
end
|
253
265
|
else # model
|
254
|
-
|
266
|
+
# models (e.g. Pet) or oneOf
|
267
|
+
klass = PulpOstreeClient.const_get(type)
|
268
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
255
269
|
end
|
256
270
|
end
|
257
271
|
|
@@ -277,7 +291,7 @@ module PulpOstreeClient
|
|
277
291
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
278
292
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
279
293
|
end
|
280
|
-
|
294
|
+
|
281
295
|
hash[param] = _to_hash(value)
|
282
296
|
end
|
283
297
|
hash
|
@@ -300,5 +314,7 @@ module PulpOstreeClient
|
|
300
314
|
value
|
301
315
|
end
|
302
316
|
end
|
317
|
+
|
303
318
|
end
|
319
|
+
|
304
320
|
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 PulpOstreeClient
|
16
17
|
# A Serializer class for a remote OSTree repository.
|
@@ -86,6 +87,28 @@ module PulpOstreeClient
|
|
86
87
|
# A list of tags to exclude during a sync. The wildcards *, ? are recognized. 'exclude_refs' is evaluated after 'include_refs'.
|
87
88
|
attr_accessor :exclude_refs
|
88
89
|
|
90
|
+
class EnumAttributeValidator
|
91
|
+
attr_reader :datatype
|
92
|
+
attr_reader :allowable_values
|
93
|
+
|
94
|
+
def initialize(datatype, allowable_values)
|
95
|
+
@allowable_values = allowable_values.map do |value|
|
96
|
+
case datatype.to_s
|
97
|
+
when /Integer/i
|
98
|
+
value.to_i
|
99
|
+
when /Float/i
|
100
|
+
value.to_f
|
101
|
+
else
|
102
|
+
value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def valid?(value)
|
108
|
+
!value || allowable_values.include?(value)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
89
112
|
# Attribute mapping from ruby-style variable name to JSON key.
|
90
113
|
def self.attribute_map
|
91
114
|
{
|
@@ -116,6 +139,11 @@ module PulpOstreeClient
|
|
116
139
|
}
|
117
140
|
end
|
118
141
|
|
142
|
+
# Returns all the JSON keys this model knows about
|
143
|
+
def self.acceptable_attributes
|
144
|
+
attribute_map.values
|
145
|
+
end
|
146
|
+
|
119
147
|
# Attribute type mapping.
|
120
148
|
def self.openapi_types
|
121
149
|
{
|
@@ -294,6 +322,7 @@ module PulpOstreeClient
|
|
294
322
|
# Show invalid properties with the reasons. Usually used together with valid?
|
295
323
|
# @return Array for valid properties with the reasons
|
296
324
|
def list_invalid_properties
|
325
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
297
326
|
invalid_properties = Array.new
|
298
327
|
if !@name.nil? && @name.to_s.length < 1
|
299
328
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -339,20 +368,20 @@ module PulpOstreeClient
|
|
339
368
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
340
369
|
end
|
341
370
|
|
342
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
343
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
371
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
372
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
344
373
|
end
|
345
374
|
|
346
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
347
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
375
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
376
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
348
377
|
end
|
349
378
|
|
350
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
351
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
379
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
380
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
352
381
|
end
|
353
382
|
|
354
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
355
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
383
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
384
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
356
385
|
end
|
357
386
|
|
358
387
|
if !@depth.nil? && @depth < 0
|
@@ -365,6 +394,7 @@ module PulpOstreeClient
|
|
365
394
|
# Check to see if the all the properties in the model are valid
|
366
395
|
# @return true if the model is valid
|
367
396
|
def valid?
|
397
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
368
398
|
return false if !@name.nil? && @name.to_s.length < 1
|
369
399
|
return false if !@url.nil? && @url.to_s.length < 1
|
370
400
|
return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
|
@@ -376,10 +406,10 @@ module PulpOstreeClient
|
|
376
406
|
return false if !@username.nil? && @username.to_s.length < 1
|
377
407
|
return false if !@password.nil? && @password.to_s.length < 1
|
378
408
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
379
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
380
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
381
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
382
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
409
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
410
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
411
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
412
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
383
413
|
return false if !@depth.nil? && @depth < 0
|
384
414
|
true
|
385
415
|
end
|
@@ -387,7 +417,11 @@ module PulpOstreeClient
|
|
387
417
|
# Custom attribute writer method with validation
|
388
418
|
# @param [Object] name Value to be assigned
|
389
419
|
def name=(name)
|
390
|
-
if
|
420
|
+
if name.nil?
|
421
|
+
fail ArgumentError, 'name cannot be nil'
|
422
|
+
end
|
423
|
+
|
424
|
+
if name.to_s.length < 1
|
391
425
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
392
426
|
end
|
393
427
|
|
@@ -397,7 +431,11 @@ module PulpOstreeClient
|
|
397
431
|
# Custom attribute writer method with validation
|
398
432
|
# @param [Object] url Value to be assigned
|
399
433
|
def url=(url)
|
400
|
-
if
|
434
|
+
if url.nil?
|
435
|
+
fail ArgumentError, 'url cannot be nil'
|
436
|
+
end
|
437
|
+
|
438
|
+
if url.to_s.length < 1
|
401
439
|
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
|
402
440
|
end
|
403
441
|
|
@@ -497,8 +535,8 @@ module PulpOstreeClient
|
|
497
535
|
# Custom attribute writer method with validation
|
498
536
|
# @param [Object] total_timeout Value to be assigned
|
499
537
|
def total_timeout=(total_timeout)
|
500
|
-
if !total_timeout.nil? && total_timeout < 0
|
501
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
538
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
539
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
502
540
|
end
|
503
541
|
|
504
542
|
@total_timeout = total_timeout
|
@@ -507,8 +545,8 @@ module PulpOstreeClient
|
|
507
545
|
# Custom attribute writer method with validation
|
508
546
|
# @param [Object] connect_timeout Value to be assigned
|
509
547
|
def connect_timeout=(connect_timeout)
|
510
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
511
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
548
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
549
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
512
550
|
end
|
513
551
|
|
514
552
|
@connect_timeout = connect_timeout
|
@@ -517,8 +555,8 @@ module PulpOstreeClient
|
|
517
555
|
# Custom attribute writer method with validation
|
518
556
|
# @param [Object] sock_connect_timeout Value to be assigned
|
519
557
|
def sock_connect_timeout=(sock_connect_timeout)
|
520
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
521
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
558
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
559
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
522
560
|
end
|
523
561
|
|
524
562
|
@sock_connect_timeout = sock_connect_timeout
|
@@ -527,8 +565,8 @@ module PulpOstreeClient
|
|
527
565
|
# Custom attribute writer method with validation
|
528
566
|
# @param [Object] sock_read_timeout Value to be assigned
|
529
567
|
def sock_read_timeout=(sock_read_timeout)
|
530
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
531
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
568
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
569
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
532
570
|
end
|
533
571
|
|
534
572
|
@sock_read_timeout = sock_read_timeout
|
@@ -537,7 +575,11 @@ module PulpOstreeClient
|
|
537
575
|
# Custom attribute writer method with validation
|
538
576
|
# @param [Object] depth Value to be assigned
|
539
577
|
def depth=(depth)
|
540
|
-
if
|
578
|
+
if depth.nil?
|
579
|
+
fail ArgumentError, 'depth cannot be nil'
|
580
|
+
end
|
581
|
+
|
582
|
+
if depth < 0
|
541
583
|
fail ArgumentError, 'invalid value for "depth", must be greater than or equal to 0.'
|
542
584
|
end
|
543
585
|
|
@@ -591,37 +633,33 @@ module PulpOstreeClient
|
|
591
633
|
# @param [Hash] attributes Model attributes in the form of hash
|
592
634
|
# @return [Object] Returns the model itself
|
593
635
|
def self.build_from_hash(attributes)
|
594
|
-
new.build_from_hash(attributes)
|
595
|
-
end
|
596
|
-
|
597
|
-
# Builds the object from hash
|
598
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
599
|
-
# @return [Object] Returns the model itself
|
600
|
-
def build_from_hash(attributes)
|
601
636
|
return nil unless attributes.is_a?(Hash)
|
602
|
-
|
603
|
-
|
637
|
+
attributes = attributes.transform_keys(&:to_sym)
|
638
|
+
transformed_hash = {}
|
639
|
+
openapi_types.each_pair do |key, type|
|
640
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
641
|
+
transformed_hash["#{key}"] = nil
|
642
|
+
elsif type =~ /\AArray<(.*)>/i
|
604
643
|
# check to ensure the input is an array given that the attribute
|
605
644
|
# is documented as an array but the input is not
|
606
|
-
if attributes[
|
607
|
-
|
645
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
646
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
608
647
|
end
|
609
|
-
elsif !attributes[
|
610
|
-
|
611
|
-
end
|
648
|
+
elsif !attributes[attribute_map[key]].nil?
|
649
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
650
|
+
end
|
612
651
|
end
|
613
|
-
|
614
|
-
self
|
652
|
+
new(transformed_hash)
|
615
653
|
end
|
616
654
|
|
617
655
|
# Deserializes the data based on type
|
618
656
|
# @param string type Data type
|
619
657
|
# @param string value Value to be deserialized
|
620
658
|
# @return [Object] Deserialized data
|
621
|
-
def _deserialize(type, value)
|
659
|
+
def self._deserialize(type, value)
|
622
660
|
case type.to_sym
|
623
|
-
when :
|
624
|
-
|
661
|
+
when :Time
|
662
|
+
Time.parse(value)
|
625
663
|
when :Date
|
626
664
|
Date.parse(value)
|
627
665
|
when :String
|
@@ -651,7 +689,9 @@ module PulpOstreeClient
|
|
651
689
|
end
|
652
690
|
end
|
653
691
|
else # model
|
654
|
-
|
692
|
+
# models (e.g. Pet) or oneOf
|
693
|
+
klass = PulpOstreeClient.const_get(type)
|
694
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
655
695
|
end
|
656
696
|
end
|
657
697
|
|
@@ -677,7 +717,7 @@ module PulpOstreeClient
|
|
677
717
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
678
718
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
679
719
|
end
|
680
|
-
|
720
|
+
|
681
721
|
hash[param] = _to_hash(value)
|
682
722
|
end
|
683
723
|
hash
|
@@ -700,5 +740,7 @@ module PulpOstreeClient
|
|
700
740
|
value
|
701
741
|
end
|
702
742
|
end
|
743
|
+
|
703
744
|
end
|
745
|
+
|
704
746
|
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 PulpOstreeClient
|
16
17
|
# A Serializer class for an OSTree repository.
|
@@ -43,6 +44,11 @@ module PulpOstreeClient
|
|
43
44
|
}
|
44
45
|
end
|
45
46
|
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
def self.acceptable_attributes
|
49
|
+
attribute_map.values
|
50
|
+
end
|
51
|
+
|
46
52
|
# Attribute type mapping.
|
47
53
|
def self.openapi_types
|
48
54
|
{
|
@@ -111,6 +117,7 @@ module PulpOstreeClient
|
|
111
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
112
118
|
# @return Array for valid properties with the reasons
|
113
119
|
def list_invalid_properties
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
114
121
|
invalid_properties = Array.new
|
115
122
|
if !@name.nil? && @name.to_s.length < 1
|
116
123
|
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
@@ -130,6 +137,7 @@ module PulpOstreeClient
|
|
130
137
|
# Check to see if the all the properties in the model are valid
|
131
138
|
# @return true if the model is valid
|
132
139
|
def valid?
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
133
141
|
return false if !@name.nil? && @name.to_s.length < 1
|
134
142
|
return false if !@description.nil? && @description.to_s.length < 1
|
135
143
|
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
@@ -139,7 +147,11 @@ module PulpOstreeClient
|
|
139
147
|
# Custom attribute writer method with validation
|
140
148
|
# @param [Object] name Value to be assigned
|
141
149
|
def name=(name)
|
142
|
-
if
|
150
|
+
if name.nil?
|
151
|
+
fail ArgumentError, 'name cannot be nil'
|
152
|
+
end
|
153
|
+
|
154
|
+
if name.to_s.length < 1
|
143
155
|
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
144
156
|
end
|
145
157
|
|
@@ -195,37 +207,33 @@ module PulpOstreeClient
|
|
195
207
|
# @param [Hash] attributes Model attributes in the form of hash
|
196
208
|
# @return [Object] Returns the model itself
|
197
209
|
def self.build_from_hash(attributes)
|
198
|
-
new.build_from_hash(attributes)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Builds the object from hash
|
202
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
203
|
-
# @return [Object] Returns the model itself
|
204
|
-
def build_from_hash(attributes)
|
205
210
|
return nil unless attributes.is_a?(Hash)
|
206
|
-
|
207
|
-
|
211
|
+
attributes = attributes.transform_keys(&:to_sym)
|
212
|
+
transformed_hash = {}
|
213
|
+
openapi_types.each_pair do |key, type|
|
214
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
215
|
+
transformed_hash["#{key}"] = nil
|
216
|
+
elsif type =~ /\AArray<(.*)>/i
|
208
217
|
# check to ensure the input is an array given that the attribute
|
209
218
|
# is documented as an array but the input is not
|
210
|
-
if attributes[
|
211
|
-
|
219
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
220
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
212
221
|
end
|
213
|
-
elsif !attributes[
|
214
|
-
|
215
|
-
end
|
222
|
+
elsif !attributes[attribute_map[key]].nil?
|
223
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
224
|
+
end
|
216
225
|
end
|
217
|
-
|
218
|
-
self
|
226
|
+
new(transformed_hash)
|
219
227
|
end
|
220
228
|
|
221
229
|
# Deserializes the data based on type
|
222
230
|
# @param string type Data type
|
223
231
|
# @param string value Value to be deserialized
|
224
232
|
# @return [Object] Deserialized data
|
225
|
-
def _deserialize(type, value)
|
233
|
+
def self._deserialize(type, value)
|
226
234
|
case type.to_sym
|
227
|
-
when :
|
228
|
-
|
235
|
+
when :Time
|
236
|
+
Time.parse(value)
|
229
237
|
when :Date
|
230
238
|
Date.parse(value)
|
231
239
|
when :String
|
@@ -255,7 +263,9 @@ module PulpOstreeClient
|
|
255
263
|
end
|
256
264
|
end
|
257
265
|
else # model
|
258
|
-
|
266
|
+
# models (e.g. Pet) or oneOf
|
267
|
+
klass = PulpOstreeClient.const_get(type)
|
268
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
259
269
|
end
|
260
270
|
end
|
261
271
|
|
@@ -281,7 +291,7 @@ module PulpOstreeClient
|
|
281
291
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
282
292
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
283
293
|
end
|
284
|
-
|
294
|
+
|
285
295
|
hash[param] = _to_hash(value)
|
286
296
|
end
|
287
297
|
hash
|
@@ -304,5 +314,7 @@ module PulpOstreeClient
|
|
304
314
|
value
|
305
315
|
end
|
306
316
|
end
|
317
|
+
|
307
318
|
end
|
319
|
+
|
308
320
|
end
|
@@ -6,17 +6,22 @@
|
|
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 PulpOstreeClient
|
16
17
|
class PolicyEnum
|
17
18
|
IMMEDIATE = "immediate".freeze
|
18
19
|
ON_DEMAND = "on_demand".freeze
|
19
20
|
|
21
|
+
def self.all_vars
|
22
|
+
@all_vars ||= [IMMEDIATE, ON_DEMAND].freeze
|
23
|
+
end
|
24
|
+
|
20
25
|
# Builds the enum from string
|
21
26
|
# @param [String] The enum value in the form of the string
|
22
27
|
# @return [String] The enum value
|
@@ -28,9 +33,8 @@ module PulpOstreeClient
|
|
28
33
|
# @param [String] The enum value in the form of the string
|
29
34
|
# @return [String] The enum value
|
30
35
|
def build_from_hash(value)
|
31
|
-
|
32
|
-
raise "Invalid ENUM value #{value} for class #PolicyEnum"
|
33
|
-
value
|
36
|
+
return value if PolicyEnum.all_vars.include?(value)
|
37
|
+
raise "Invalid ENUM value #{value} for class #PolicyEnum"
|
34
38
|
end
|
35
39
|
end
|
36
40
|
end
|