pulp_gem_client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +160 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentGemApi.md +210 -0
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DistributionsGemApi.md +382 -0
- data/docs/GemGemContent.md +21 -0
- data/docs/GemGemContentResponse.md +35 -0
- data/docs/GemGemDistribution.md +31 -0
- data/docs/GemGemDistributionResponse.md +37 -0
- data/docs/GemGemPublication.md +19 -0
- data/docs/GemGemPublicationResponse.md +23 -0
- data/docs/GemGemRemote.md +63 -0
- data/docs/GemGemRemoteResponse.md +61 -0
- data/docs/GemGemRemoteResponseHiddenFields.md +19 -0
- data/docs/GemGemRepository.md +25 -0
- data/docs/GemGemRepositoryResponse.md +33 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
- data/docs/PaginatedgemGemContentResponseList.md +23 -0
- data/docs/PaginatedgemGemDistributionResponseList.md +23 -0
- data/docs/PaginatedgemGemPublicationResponseList.md +23 -0
- data/docs/PaginatedgemGemRemoteResponseList.md +23 -0
- data/docs/PaginatedgemGemRepositoryResponseList.md +23 -0
- data/docs/PatchedgemGemDistribution.md +31 -0
- data/docs/PatchedgemGemRemote.md +63 -0
- data/docs/PatchedgemGemRepository.md +25 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsGemApi.md +263 -0
- data/docs/RemotesGemApi.md +380 -0
- data/docs/Repair.md +17 -0
- data/docs/RepositoriesGemApi.md +502 -0
- data/docs/RepositoriesGemVersionsApi.md +273 -0
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RepositoryVersionResponse.md +27 -0
- data/lib/pulp_gem_client/api/content_gem_api.rb +259 -0
- data/lib/pulp_gem_client/api/distributions_gem_api.rb +476 -0
- data/lib/pulp_gem_client/api/publications_gem_api.rb +325 -0
- data/lib/pulp_gem_client/api/remotes_gem_api.rb +473 -0
- data/lib/pulp_gem_client/api/repositories_gem_api.rb +628 -0
- data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +346 -0
- data/lib/pulp_gem_client/api_client.rb +403 -0
- data/lib/pulp_gem_client/api_error.rb +57 -0
- data/lib/pulp_gem_client/configuration.rb +251 -0
- data/lib/pulp_gem_client/models/async_operation_response.rb +213 -0
- data/lib/pulp_gem_client/models/content_summary_response.rb +246 -0
- data/lib/pulp_gem_client/models/gem_gem_content.rb +228 -0
- data/lib/pulp_gem_client/models/gem_gem_content_response.rb +303 -0
- data/lib/pulp_gem_client/models/gem_gem_distribution.rb +333 -0
- data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +324 -0
- data/lib/pulp_gem_client/models/gem_gem_publication.rb +217 -0
- data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +236 -0
- data/lib/pulp_gem_client/models/gem_gem_remote.rb +704 -0
- data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +532 -0
- data/lib/pulp_gem_client/models/gem_gem_remote_response_hidden_fields.rb +215 -0
- data/lib/pulp_gem_client/models/gem_gem_repository.rb +306 -0
- data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +309 -0
- data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +315 -0
- data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +686 -0
- data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +297 -0
- data/lib/pulp_gem_client/models/policy_enum.rb +37 -0
- data/lib/pulp_gem_client/models/repair.rb +209 -0
- data/lib/pulp_gem_client/models/repository_add_remove_content.rb +232 -0
- data/lib/pulp_gem_client/models/repository_sync_url.rb +220 -0
- data/lib/pulp_gem_client/models/repository_version_response.rb +255 -0
- data/lib/pulp_gem_client/version.rb +15 -0
- data/lib/pulp_gem_client.rb +72 -0
- data/pulp_gem_client.gemspec +39 -0
- data/spec/api/content_gem_api_spec.rb +88 -0
- data/spec/api/distributions_gem_api_spec.rb +130 -0
- data/spec/api/publications_gem_api_spec.rb +101 -0
- data/spec/api/remotes_gem_api_spec.rb +129 -0
- data/spec/api/repositories_gem_api_spec.rb +160 -0
- data/spec/api/repositories_gem_versions_api_spec.rb +105 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/gem_gem_content_response_spec.rb +95 -0
- data/spec/models/gem_gem_content_spec.rb +53 -0
- data/spec/models/gem_gem_distribution_response_spec.rb +101 -0
- data/spec/models/gem_gem_distribution_spec.rb +83 -0
- data/spec/models/gem_gem_publication_response_spec.rb +59 -0
- data/spec/models/gem_gem_publication_spec.rb +47 -0
- data/spec/models/gem_gem_remote_response_hidden_fields_spec.rb +47 -0
- data/spec/models/gem_gem_remote_response_spec.rb +173 -0
- data/spec/models/gem_gem_remote_spec.rb +179 -0
- data/spec/models/gem_gem_repository_response_spec.rb +89 -0
- data/spec/models/gem_gem_repository_spec.rb +65 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_content_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +59 -0
- data/spec/models/patchedgem_gem_distribution_spec.rb +83 -0
- data/spec/models/patchedgem_gem_remote_spec.rb +179 -0
- data/spec/models/patchedgem_gem_repository_spec.rb +65 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/repair_spec.rb +41 -0
- data/spec/models/repository_add_remove_content_spec.rb +53 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/repository_version_response_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +250 -0
@@ -0,0 +1,686 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpGemClient
|
16
|
+
# A Serializer for GemRemote.
|
17
|
+
class PatchedgemGemRemote
|
18
|
+
# A unique name for this remote.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# The URL of an external content source.
|
22
|
+
attr_accessor :url
|
23
|
+
|
24
|
+
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
25
|
+
attr_accessor :ca_cert
|
26
|
+
|
27
|
+
# A PEM encoded client certificate used for authentication.
|
28
|
+
attr_accessor :client_cert
|
29
|
+
|
30
|
+
# A PEM encoded private key used for authentication.
|
31
|
+
attr_accessor :client_key
|
32
|
+
|
33
|
+
# If True, TLS peer validation must be performed.
|
34
|
+
attr_accessor :tls_validation
|
35
|
+
|
36
|
+
# The proxy URL. Format: scheme://host:port
|
37
|
+
attr_accessor :proxy_url
|
38
|
+
|
39
|
+
# The username to authenticte to the proxy.
|
40
|
+
attr_accessor :proxy_username
|
41
|
+
|
42
|
+
# The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.
|
43
|
+
attr_accessor :proxy_password
|
44
|
+
|
45
|
+
# The username to be used for authentication when syncing.
|
46
|
+
attr_accessor :username
|
47
|
+
|
48
|
+
# The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
|
49
|
+
attr_accessor :password
|
50
|
+
|
51
|
+
attr_accessor :pulp_labels
|
52
|
+
|
53
|
+
# Total number of simultaneous connections. If not set then the default value will be used.
|
54
|
+
attr_accessor :download_concurrency
|
55
|
+
|
56
|
+
# Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
|
57
|
+
attr_accessor :max_retries
|
58
|
+
|
59
|
+
# The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
60
|
+
attr_accessor :policy
|
61
|
+
|
62
|
+
# aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
63
|
+
attr_accessor :total_timeout
|
64
|
+
|
65
|
+
# aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
66
|
+
attr_accessor :connect_timeout
|
67
|
+
|
68
|
+
# aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
69
|
+
attr_accessor :sock_connect_timeout
|
70
|
+
|
71
|
+
# aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
72
|
+
attr_accessor :sock_read_timeout
|
73
|
+
|
74
|
+
# Headers for aiohttp.Clientsession
|
75
|
+
attr_accessor :headers
|
76
|
+
|
77
|
+
# Limits requests per second for each concurrent downloader
|
78
|
+
attr_accessor :rate_limit
|
79
|
+
|
80
|
+
attr_accessor :prereleases
|
81
|
+
|
82
|
+
attr_accessor :includes
|
83
|
+
|
84
|
+
attr_accessor :excludes
|
85
|
+
|
86
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
87
|
+
def self.attribute_map
|
88
|
+
{
|
89
|
+
:'name' => :'name',
|
90
|
+
:'url' => :'url',
|
91
|
+
:'ca_cert' => :'ca_cert',
|
92
|
+
:'client_cert' => :'client_cert',
|
93
|
+
:'client_key' => :'client_key',
|
94
|
+
:'tls_validation' => :'tls_validation',
|
95
|
+
:'proxy_url' => :'proxy_url',
|
96
|
+
:'proxy_username' => :'proxy_username',
|
97
|
+
:'proxy_password' => :'proxy_password',
|
98
|
+
:'username' => :'username',
|
99
|
+
:'password' => :'password',
|
100
|
+
:'pulp_labels' => :'pulp_labels',
|
101
|
+
:'download_concurrency' => :'download_concurrency',
|
102
|
+
:'max_retries' => :'max_retries',
|
103
|
+
:'policy' => :'policy',
|
104
|
+
:'total_timeout' => :'total_timeout',
|
105
|
+
:'connect_timeout' => :'connect_timeout',
|
106
|
+
:'sock_connect_timeout' => :'sock_connect_timeout',
|
107
|
+
:'sock_read_timeout' => :'sock_read_timeout',
|
108
|
+
:'headers' => :'headers',
|
109
|
+
:'rate_limit' => :'rate_limit',
|
110
|
+
:'prereleases' => :'prereleases',
|
111
|
+
:'includes' => :'includes',
|
112
|
+
:'excludes' => :'excludes'
|
113
|
+
}
|
114
|
+
end
|
115
|
+
|
116
|
+
# Attribute type mapping.
|
117
|
+
def self.openapi_types
|
118
|
+
{
|
119
|
+
:'name' => :'String',
|
120
|
+
:'url' => :'String',
|
121
|
+
:'ca_cert' => :'String',
|
122
|
+
:'client_cert' => :'String',
|
123
|
+
:'client_key' => :'String',
|
124
|
+
:'tls_validation' => :'Boolean',
|
125
|
+
:'proxy_url' => :'String',
|
126
|
+
:'proxy_username' => :'String',
|
127
|
+
:'proxy_password' => :'String',
|
128
|
+
:'username' => :'String',
|
129
|
+
:'password' => :'String',
|
130
|
+
:'pulp_labels' => :'Hash<String, String>',
|
131
|
+
:'download_concurrency' => :'Integer',
|
132
|
+
:'max_retries' => :'Integer',
|
133
|
+
:'policy' => :'PolicyEnum',
|
134
|
+
:'total_timeout' => :'Float',
|
135
|
+
:'connect_timeout' => :'Float',
|
136
|
+
:'sock_connect_timeout' => :'Float',
|
137
|
+
:'sock_read_timeout' => :'Float',
|
138
|
+
:'headers' => :'Array<Object>',
|
139
|
+
:'rate_limit' => :'Integer',
|
140
|
+
:'prereleases' => :'Boolean',
|
141
|
+
:'includes' => :'Hash<String, String>',
|
142
|
+
:'excludes' => :'Hash<String, String>'
|
143
|
+
}
|
144
|
+
end
|
145
|
+
|
146
|
+
# List of attributes with nullable: true
|
147
|
+
def self.openapi_nullable
|
148
|
+
Set.new([
|
149
|
+
:'ca_cert',
|
150
|
+
:'client_cert',
|
151
|
+
:'client_key',
|
152
|
+
:'proxy_url',
|
153
|
+
:'proxy_username',
|
154
|
+
:'proxy_password',
|
155
|
+
:'username',
|
156
|
+
:'password',
|
157
|
+
:'download_concurrency',
|
158
|
+
:'max_retries',
|
159
|
+
:'total_timeout',
|
160
|
+
:'connect_timeout',
|
161
|
+
:'sock_connect_timeout',
|
162
|
+
:'sock_read_timeout',
|
163
|
+
:'rate_limit',
|
164
|
+
:'includes',
|
165
|
+
:'excludes'
|
166
|
+
])
|
167
|
+
end
|
168
|
+
|
169
|
+
# Initializes the object
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
171
|
+
def initialize(attributes = {})
|
172
|
+
if (!attributes.is_a?(Hash))
|
173
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpGemClient::PatchedgemGemRemote` initialize method"
|
174
|
+
end
|
175
|
+
|
176
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
177
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
178
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
179
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpGemClient::PatchedgemGemRemote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
180
|
+
end
|
181
|
+
h[k.to_sym] = v
|
182
|
+
}
|
183
|
+
|
184
|
+
if attributes.key?(:'name')
|
185
|
+
self.name = attributes[:'name']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.key?(:'url')
|
189
|
+
self.url = attributes[:'url']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.key?(:'ca_cert')
|
193
|
+
self.ca_cert = attributes[:'ca_cert']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.key?(:'client_cert')
|
197
|
+
self.client_cert = attributes[:'client_cert']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'client_key')
|
201
|
+
self.client_key = attributes[:'client_key']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'tls_validation')
|
205
|
+
self.tls_validation = attributes[:'tls_validation']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.key?(:'proxy_url')
|
209
|
+
self.proxy_url = attributes[:'proxy_url']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.key?(:'proxy_username')
|
213
|
+
self.proxy_username = attributes[:'proxy_username']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.key?(:'proxy_password')
|
217
|
+
self.proxy_password = attributes[:'proxy_password']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.key?(:'username')
|
221
|
+
self.username = attributes[:'username']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.key?(:'password')
|
225
|
+
self.password = attributes[:'password']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'pulp_labels')
|
229
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
230
|
+
self.pulp_labels = value
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'download_concurrency')
|
235
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'max_retries')
|
239
|
+
self.max_retries = attributes[:'max_retries']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'policy')
|
243
|
+
self.policy = attributes[:'policy']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.key?(:'total_timeout')
|
247
|
+
self.total_timeout = attributes[:'total_timeout']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'connect_timeout')
|
251
|
+
self.connect_timeout = attributes[:'connect_timeout']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.key?(:'sock_connect_timeout')
|
255
|
+
self.sock_connect_timeout = attributes[:'sock_connect_timeout']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.key?(:'sock_read_timeout')
|
259
|
+
self.sock_read_timeout = attributes[:'sock_read_timeout']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.key?(:'headers')
|
263
|
+
if (value = attributes[:'headers']).is_a?(Array)
|
264
|
+
self.headers = value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.key?(:'rate_limit')
|
269
|
+
self.rate_limit = attributes[:'rate_limit']
|
270
|
+
end
|
271
|
+
|
272
|
+
if attributes.key?(:'prereleases')
|
273
|
+
self.prereleases = attributes[:'prereleases']
|
274
|
+
else
|
275
|
+
self.prereleases = false
|
276
|
+
end
|
277
|
+
|
278
|
+
if attributes.key?(:'includes')
|
279
|
+
if (value = attributes[:'includes']).is_a?(Hash)
|
280
|
+
self.includes = value
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.key?(:'excludes')
|
285
|
+
if (value = attributes[:'excludes']).is_a?(Hash)
|
286
|
+
self.excludes = value
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
292
|
+
# @return Array for valid properties with the reasons
|
293
|
+
def list_invalid_properties
|
294
|
+
invalid_properties = Array.new
|
295
|
+
if !@name.nil? && @name.to_s.length < 1
|
296
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
297
|
+
end
|
298
|
+
|
299
|
+
if !@url.nil? && @url.to_s.length < 1
|
300
|
+
invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
|
301
|
+
end
|
302
|
+
|
303
|
+
if !@ca_cert.nil? && @ca_cert.to_s.length < 1
|
304
|
+
invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
|
305
|
+
end
|
306
|
+
|
307
|
+
if !@client_cert.nil? && @client_cert.to_s.length < 1
|
308
|
+
invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
|
309
|
+
end
|
310
|
+
|
311
|
+
if !@client_key.nil? && @client_key.to_s.length < 1
|
312
|
+
invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
|
313
|
+
end
|
314
|
+
|
315
|
+
if !@proxy_url.nil? && @proxy_url.to_s.length < 1
|
316
|
+
invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
|
317
|
+
end
|
318
|
+
|
319
|
+
if !@proxy_username.nil? && @proxy_username.to_s.length < 1
|
320
|
+
invalid_properties.push('invalid value for "proxy_username", the character length must be great than or equal to 1.')
|
321
|
+
end
|
322
|
+
|
323
|
+
if !@proxy_password.nil? && @proxy_password.to_s.length < 1
|
324
|
+
invalid_properties.push('invalid value for "proxy_password", the character length must be great than or equal to 1.')
|
325
|
+
end
|
326
|
+
|
327
|
+
if !@username.nil? && @username.to_s.length < 1
|
328
|
+
invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
|
329
|
+
end
|
330
|
+
|
331
|
+
if !@password.nil? && @password.to_s.length < 1
|
332
|
+
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
|
333
|
+
end
|
334
|
+
|
335
|
+
if !@download_concurrency.nil? && @download_concurrency < 1
|
336
|
+
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
337
|
+
end
|
338
|
+
|
339
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
340
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
341
|
+
end
|
342
|
+
|
343
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
344
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
345
|
+
end
|
346
|
+
|
347
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
348
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
349
|
+
end
|
350
|
+
|
351
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
352
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
353
|
+
end
|
354
|
+
|
355
|
+
invalid_properties
|
356
|
+
end
|
357
|
+
|
358
|
+
# Check to see if the all the properties in the model are valid
|
359
|
+
# @return true if the model is valid
|
360
|
+
def valid?
|
361
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
362
|
+
return false if !@url.nil? && @url.to_s.length < 1
|
363
|
+
return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
|
364
|
+
return false if !@client_cert.nil? && @client_cert.to_s.length < 1
|
365
|
+
return false if !@client_key.nil? && @client_key.to_s.length < 1
|
366
|
+
return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
|
367
|
+
return false if !@proxy_username.nil? && @proxy_username.to_s.length < 1
|
368
|
+
return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
|
369
|
+
return false if !@username.nil? && @username.to_s.length < 1
|
370
|
+
return false if !@password.nil? && @password.to_s.length < 1
|
371
|
+
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
372
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
373
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
374
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
375
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
376
|
+
true
|
377
|
+
end
|
378
|
+
|
379
|
+
# Custom attribute writer method with validation
|
380
|
+
# @param [Object] name Value to be assigned
|
381
|
+
def name=(name)
|
382
|
+
if !name.nil? && name.to_s.length < 1
|
383
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
384
|
+
end
|
385
|
+
|
386
|
+
@name = name
|
387
|
+
end
|
388
|
+
|
389
|
+
# Custom attribute writer method with validation
|
390
|
+
# @param [Object] url Value to be assigned
|
391
|
+
def url=(url)
|
392
|
+
if !url.nil? && url.to_s.length < 1
|
393
|
+
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
|
394
|
+
end
|
395
|
+
|
396
|
+
@url = url
|
397
|
+
end
|
398
|
+
|
399
|
+
# Custom attribute writer method with validation
|
400
|
+
# @param [Object] ca_cert Value to be assigned
|
401
|
+
def ca_cert=(ca_cert)
|
402
|
+
if !ca_cert.nil? && ca_cert.to_s.length < 1
|
403
|
+
fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
|
404
|
+
end
|
405
|
+
|
406
|
+
@ca_cert = ca_cert
|
407
|
+
end
|
408
|
+
|
409
|
+
# Custom attribute writer method with validation
|
410
|
+
# @param [Object] client_cert Value to be assigned
|
411
|
+
def client_cert=(client_cert)
|
412
|
+
if !client_cert.nil? && client_cert.to_s.length < 1
|
413
|
+
fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
|
414
|
+
end
|
415
|
+
|
416
|
+
@client_cert = client_cert
|
417
|
+
end
|
418
|
+
|
419
|
+
# Custom attribute writer method with validation
|
420
|
+
# @param [Object] client_key Value to be assigned
|
421
|
+
def client_key=(client_key)
|
422
|
+
if !client_key.nil? && client_key.to_s.length < 1
|
423
|
+
fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
|
424
|
+
end
|
425
|
+
|
426
|
+
@client_key = client_key
|
427
|
+
end
|
428
|
+
|
429
|
+
# Custom attribute writer method with validation
|
430
|
+
# @param [Object] proxy_url Value to be assigned
|
431
|
+
def proxy_url=(proxy_url)
|
432
|
+
if !proxy_url.nil? && proxy_url.to_s.length < 1
|
433
|
+
fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
|
434
|
+
end
|
435
|
+
|
436
|
+
@proxy_url = proxy_url
|
437
|
+
end
|
438
|
+
|
439
|
+
# Custom attribute writer method with validation
|
440
|
+
# @param [Object] proxy_username Value to be assigned
|
441
|
+
def proxy_username=(proxy_username)
|
442
|
+
if !proxy_username.nil? && proxy_username.to_s.length < 1
|
443
|
+
fail ArgumentError, 'invalid value for "proxy_username", the character length must be great than or equal to 1.'
|
444
|
+
end
|
445
|
+
|
446
|
+
@proxy_username = proxy_username
|
447
|
+
end
|
448
|
+
|
449
|
+
# Custom attribute writer method with validation
|
450
|
+
# @param [Object] proxy_password Value to be assigned
|
451
|
+
def proxy_password=(proxy_password)
|
452
|
+
if !proxy_password.nil? && proxy_password.to_s.length < 1
|
453
|
+
fail ArgumentError, 'invalid value for "proxy_password", the character length must be great than or equal to 1.'
|
454
|
+
end
|
455
|
+
|
456
|
+
@proxy_password = proxy_password
|
457
|
+
end
|
458
|
+
|
459
|
+
# Custom attribute writer method with validation
|
460
|
+
# @param [Object] username Value to be assigned
|
461
|
+
def username=(username)
|
462
|
+
if !username.nil? && username.to_s.length < 1
|
463
|
+
fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
|
464
|
+
end
|
465
|
+
|
466
|
+
@username = username
|
467
|
+
end
|
468
|
+
|
469
|
+
# Custom attribute writer method with validation
|
470
|
+
# @param [Object] password Value to be assigned
|
471
|
+
def password=(password)
|
472
|
+
if !password.nil? && password.to_s.length < 1
|
473
|
+
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
|
474
|
+
end
|
475
|
+
|
476
|
+
@password = password
|
477
|
+
end
|
478
|
+
|
479
|
+
# Custom attribute writer method with validation
|
480
|
+
# @param [Object] download_concurrency Value to be assigned
|
481
|
+
def download_concurrency=(download_concurrency)
|
482
|
+
if !download_concurrency.nil? && download_concurrency < 1
|
483
|
+
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
484
|
+
end
|
485
|
+
|
486
|
+
@download_concurrency = download_concurrency
|
487
|
+
end
|
488
|
+
|
489
|
+
# Custom attribute writer method with validation
|
490
|
+
# @param [Object] total_timeout Value to be assigned
|
491
|
+
def total_timeout=(total_timeout)
|
492
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
493
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
494
|
+
end
|
495
|
+
|
496
|
+
@total_timeout = total_timeout
|
497
|
+
end
|
498
|
+
|
499
|
+
# Custom attribute writer method with validation
|
500
|
+
# @param [Object] connect_timeout Value to be assigned
|
501
|
+
def connect_timeout=(connect_timeout)
|
502
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
503
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
504
|
+
end
|
505
|
+
|
506
|
+
@connect_timeout = connect_timeout
|
507
|
+
end
|
508
|
+
|
509
|
+
# Custom attribute writer method with validation
|
510
|
+
# @param [Object] sock_connect_timeout Value to be assigned
|
511
|
+
def sock_connect_timeout=(sock_connect_timeout)
|
512
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
513
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
514
|
+
end
|
515
|
+
|
516
|
+
@sock_connect_timeout = sock_connect_timeout
|
517
|
+
end
|
518
|
+
|
519
|
+
# Custom attribute writer method with validation
|
520
|
+
# @param [Object] sock_read_timeout Value to be assigned
|
521
|
+
def sock_read_timeout=(sock_read_timeout)
|
522
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
523
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
524
|
+
end
|
525
|
+
|
526
|
+
@sock_read_timeout = sock_read_timeout
|
527
|
+
end
|
528
|
+
|
529
|
+
# Checks equality by comparing each attribute.
|
530
|
+
# @param [Object] Object to be compared
|
531
|
+
def ==(o)
|
532
|
+
return true if self.equal?(o)
|
533
|
+
self.class == o.class &&
|
534
|
+
name == o.name &&
|
535
|
+
url == o.url &&
|
536
|
+
ca_cert == o.ca_cert &&
|
537
|
+
client_cert == o.client_cert &&
|
538
|
+
client_key == o.client_key &&
|
539
|
+
tls_validation == o.tls_validation &&
|
540
|
+
proxy_url == o.proxy_url &&
|
541
|
+
proxy_username == o.proxy_username &&
|
542
|
+
proxy_password == o.proxy_password &&
|
543
|
+
username == o.username &&
|
544
|
+
password == o.password &&
|
545
|
+
pulp_labels == o.pulp_labels &&
|
546
|
+
download_concurrency == o.download_concurrency &&
|
547
|
+
max_retries == o.max_retries &&
|
548
|
+
policy == o.policy &&
|
549
|
+
total_timeout == o.total_timeout &&
|
550
|
+
connect_timeout == o.connect_timeout &&
|
551
|
+
sock_connect_timeout == o.sock_connect_timeout &&
|
552
|
+
sock_read_timeout == o.sock_read_timeout &&
|
553
|
+
headers == o.headers &&
|
554
|
+
rate_limit == o.rate_limit &&
|
555
|
+
prereleases == o.prereleases &&
|
556
|
+
includes == o.includes &&
|
557
|
+
excludes == o.excludes
|
558
|
+
end
|
559
|
+
|
560
|
+
# @see the `==` method
|
561
|
+
# @param [Object] Object to be compared
|
562
|
+
def eql?(o)
|
563
|
+
self == o
|
564
|
+
end
|
565
|
+
|
566
|
+
# Calculates hash code according to all attributes.
|
567
|
+
# @return [Integer] Hash code
|
568
|
+
def hash
|
569
|
+
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, prereleases, includes, excludes].hash
|
570
|
+
end
|
571
|
+
|
572
|
+
# Builds the object from hash
|
573
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
574
|
+
# @return [Object] Returns the model itself
|
575
|
+
def self.build_from_hash(attributes)
|
576
|
+
new.build_from_hash(attributes)
|
577
|
+
end
|
578
|
+
|
579
|
+
# Builds the object from hash
|
580
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
581
|
+
# @return [Object] Returns the model itself
|
582
|
+
def build_from_hash(attributes)
|
583
|
+
return nil unless attributes.is_a?(Hash)
|
584
|
+
self.class.openapi_types.each_pair do |key, type|
|
585
|
+
if type =~ /\AArray<(.*)>/i
|
586
|
+
# check to ensure the input is an array given that the attribute
|
587
|
+
# is documented as an array but the input is not
|
588
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
589
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
590
|
+
end
|
591
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
592
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
593
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
594
|
+
end
|
595
|
+
|
596
|
+
self
|
597
|
+
end
|
598
|
+
|
599
|
+
# Deserializes the data based on type
|
600
|
+
# @param string type Data type
|
601
|
+
# @param string value Value to be deserialized
|
602
|
+
# @return [Object] Deserialized data
|
603
|
+
def _deserialize(type, value)
|
604
|
+
case type.to_sym
|
605
|
+
when :DateTime
|
606
|
+
DateTime.parse(value)
|
607
|
+
when :Date
|
608
|
+
Date.parse(value)
|
609
|
+
when :String
|
610
|
+
value.to_s
|
611
|
+
when :Integer
|
612
|
+
value.to_i
|
613
|
+
when :Float
|
614
|
+
value.to_f
|
615
|
+
when :Boolean
|
616
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
617
|
+
true
|
618
|
+
else
|
619
|
+
false
|
620
|
+
end
|
621
|
+
when :Object
|
622
|
+
# generic object (usually a Hash), return directly
|
623
|
+
value
|
624
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
625
|
+
inner_type = Regexp.last_match[:inner_type]
|
626
|
+
value.map { |v| _deserialize(inner_type, v) }
|
627
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
628
|
+
k_type = Regexp.last_match[:k_type]
|
629
|
+
v_type = Regexp.last_match[:v_type]
|
630
|
+
{}.tap do |hash|
|
631
|
+
value.each do |k, v|
|
632
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
633
|
+
end
|
634
|
+
end
|
635
|
+
else # model
|
636
|
+
PulpGemClient.const_get(type).build_from_hash(value)
|
637
|
+
end
|
638
|
+
end
|
639
|
+
|
640
|
+
# Returns the string representation of the object
|
641
|
+
# @return [String] String presentation of the object
|
642
|
+
def to_s
|
643
|
+
to_hash.to_s
|
644
|
+
end
|
645
|
+
|
646
|
+
# to_body is an alias to to_hash (backward compatibility)
|
647
|
+
# @return [Hash] Returns the object in the form of hash
|
648
|
+
def to_body
|
649
|
+
to_hash
|
650
|
+
end
|
651
|
+
|
652
|
+
# Returns the object in the form of hash
|
653
|
+
# @return [Hash] Returns the object in the form of hash
|
654
|
+
def to_hash
|
655
|
+
hash = {}
|
656
|
+
self.class.attribute_map.each_pair do |attr, param|
|
657
|
+
value = self.send(attr)
|
658
|
+
if value.nil?
|
659
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
660
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
661
|
+
end
|
662
|
+
|
663
|
+
hash[param] = _to_hash(value)
|
664
|
+
end
|
665
|
+
hash
|
666
|
+
end
|
667
|
+
|
668
|
+
# Outputs non-array value in the form of hash
|
669
|
+
# For object, use to_hash. Otherwise, just return the value
|
670
|
+
# @param [Object] value Any valid value
|
671
|
+
# @return [Hash] Returns the value in the form of hash
|
672
|
+
def _to_hash(value)
|
673
|
+
if value.is_a?(Array)
|
674
|
+
value.compact.map { |v| _to_hash(v) }
|
675
|
+
elsif value.is_a?(Hash)
|
676
|
+
{}.tap do |hash|
|
677
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
678
|
+
end
|
679
|
+
elsif value.respond_to? :to_hash
|
680
|
+
value.to_hash
|
681
|
+
else
|
682
|
+
value
|
683
|
+
end
|
684
|
+
end
|
685
|
+
end
|
686
|
+
end
|