pulp_file_client 3.104.2 → 3.105.1
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 +21 -5
- data/docs/FileFileGitRemote.md +58 -0
- data/docs/FileFileGitRemoteResponse.md +58 -0
- data/docs/{FileFileRemoteResponseHiddenFieldsInner.md → FileFileGitRemoteResponseHiddenFieldsInner.md} +2 -2
- data/docs/FileFileRemoteResponse.md +1 -1
- data/docs/PaginatedfileFileGitRemoteResponseList.md +24 -0
- data/docs/PatchedfileFileGitRemote.md +58 -0
- data/docs/RemotesGitApi.md +981 -0
- data/lib/pulp_file_client/api/remotes_git_api.rb +979 -0
- data/lib/pulp_file_client/models/file_file_git_remote.rb +702 -0
- data/lib/pulp_file_client/models/file_file_git_remote_response.rb +521 -0
- data/lib/pulp_file_client/models/{file_file_remote_response_hidden_fields_inner.rb → file_file_git_remote_response_hidden_fields_inner.rb} +3 -3
- data/lib/pulp_file_client/models/file_file_remote.rb +15 -0
- data/lib/pulp_file_client/models/file_file_remote_response.rb +16 -1
- data/lib/pulp_file_client/models/file_file_repository.rb +15 -0
- data/lib/pulp_file_client/models/file_file_repository_response.rb +15 -0
- data/lib/pulp_file_client/models/paginatedfile_file_git_remote_response_list.rb +257 -0
- data/lib/pulp_file_client/models/patchedfile_file_git_remote.rb +688 -0
- data/lib/pulp_file_client/models/patchedfile_file_remote.rb +15 -0
- data/lib/pulp_file_client/models/patchedfile_file_repository.rb +15 -0
- data/lib/pulp_file_client/models/remote_network_config.rb +15 -0
- data/lib/pulp_file_client/models/remote_network_config_response.rb +15 -0
- data/lib/pulp_file_client/models/set_label.rb +0 -11
- data/lib/pulp_file_client/models/set_label_response.rb +0 -21
- data/lib/pulp_file_client/models/unset_label.rb +0 -11
- data/lib/pulp_file_client/models/unset_label_response.rb +0 -21
- data/lib/pulp_file_client/version.rb +1 -1
- data/lib/pulp_file_client.rb +6 -1
- data/spec/api/remotes_git_api_spec.rb +228 -0
- data/spec/models/{file_file_remote_response_hidden_fields_inner_spec.rb → file_file_git_remote_response_hidden_fields_inner_spec.rb} +6 -6
- data/spec/models/file_file_git_remote_response_spec.rb +156 -0
- data/spec/models/file_file_git_remote_spec.rb +156 -0
- data/spec/models/paginatedfile_file_git_remote_response_list_spec.rb +54 -0
- data/spec/models/patchedfile_file_git_remote_spec.rb +156 -0
- metadata +26 -6
|
@@ -0,0 +1,521 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpFileClient
|
|
17
|
+
# Serializer for File Git Remotes.
|
|
18
|
+
class FileFileGitRemoteResponse
|
|
19
|
+
attr_accessor :pulp_href
|
|
20
|
+
|
|
21
|
+
# The Pulp Resource Name (PRN).
|
|
22
|
+
attr_accessor :prn
|
|
23
|
+
|
|
24
|
+
# Timestamp of creation.
|
|
25
|
+
attr_accessor :pulp_created
|
|
26
|
+
|
|
27
|
+
# Timestamp of the most recent update of the remote.
|
|
28
|
+
attr_accessor :pulp_last_updated
|
|
29
|
+
|
|
30
|
+
# A unique name for this remote.
|
|
31
|
+
attr_accessor :name
|
|
32
|
+
|
|
33
|
+
# The URL of an external content source.
|
|
34
|
+
attr_accessor :url
|
|
35
|
+
|
|
36
|
+
attr_accessor :pulp_labels
|
|
37
|
+
|
|
38
|
+
# List of hidden (write only) fields
|
|
39
|
+
attr_accessor :hidden_fields
|
|
40
|
+
|
|
41
|
+
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
|
42
|
+
attr_accessor :ca_cert
|
|
43
|
+
|
|
44
|
+
# A PEM encoded client certificate used for authentication.
|
|
45
|
+
attr_accessor :client_cert
|
|
46
|
+
|
|
47
|
+
# If True, TLS peer validation must be performed.
|
|
48
|
+
attr_accessor :tls_validation
|
|
49
|
+
|
|
50
|
+
# The proxy URL. Format: scheme://host:port
|
|
51
|
+
attr_accessor :proxy_url
|
|
52
|
+
|
|
53
|
+
# Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
|
|
54
|
+
attr_accessor :max_retries
|
|
55
|
+
|
|
56
|
+
# aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
57
|
+
attr_accessor :total_timeout
|
|
58
|
+
|
|
59
|
+
# aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
60
|
+
attr_accessor :connect_timeout
|
|
61
|
+
|
|
62
|
+
# 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.
|
|
63
|
+
attr_accessor :sock_connect_timeout
|
|
64
|
+
|
|
65
|
+
# 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.
|
|
66
|
+
attr_accessor :sock_read_timeout
|
|
67
|
+
|
|
68
|
+
# Headers for aiohttp.Clientsession
|
|
69
|
+
attr_accessor :headers
|
|
70
|
+
|
|
71
|
+
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
72
|
+
attr_accessor :download_concurrency
|
|
73
|
+
|
|
74
|
+
# Limits requests per second for each concurrent downloader
|
|
75
|
+
attr_accessor :rate_limit
|
|
76
|
+
|
|
77
|
+
# The git ref (branch, tag, or commit hash) to sync from. Defaults to HEAD.
|
|
78
|
+
attr_accessor :git_ref
|
|
79
|
+
|
|
80
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
81
|
+
def self.attribute_map
|
|
82
|
+
{
|
|
83
|
+
:'pulp_href' => :'pulp_href',
|
|
84
|
+
:'prn' => :'prn',
|
|
85
|
+
:'pulp_created' => :'pulp_created',
|
|
86
|
+
:'pulp_last_updated' => :'pulp_last_updated',
|
|
87
|
+
:'name' => :'name',
|
|
88
|
+
:'url' => :'url',
|
|
89
|
+
:'pulp_labels' => :'pulp_labels',
|
|
90
|
+
:'hidden_fields' => :'hidden_fields',
|
|
91
|
+
:'ca_cert' => :'ca_cert',
|
|
92
|
+
:'client_cert' => :'client_cert',
|
|
93
|
+
:'tls_validation' => :'tls_validation',
|
|
94
|
+
:'proxy_url' => :'proxy_url',
|
|
95
|
+
:'max_retries' => :'max_retries',
|
|
96
|
+
:'total_timeout' => :'total_timeout',
|
|
97
|
+
:'connect_timeout' => :'connect_timeout',
|
|
98
|
+
:'sock_connect_timeout' => :'sock_connect_timeout',
|
|
99
|
+
:'sock_read_timeout' => :'sock_read_timeout',
|
|
100
|
+
:'headers' => :'headers',
|
|
101
|
+
:'download_concurrency' => :'download_concurrency',
|
|
102
|
+
:'rate_limit' => :'rate_limit',
|
|
103
|
+
:'git_ref' => :'git_ref'
|
|
104
|
+
}
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Returns all the JSON keys this model knows about
|
|
108
|
+
def self.acceptable_attributes
|
|
109
|
+
attribute_map.values
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Attribute type mapping.
|
|
113
|
+
def self.openapi_types
|
|
114
|
+
{
|
|
115
|
+
:'pulp_href' => :'String',
|
|
116
|
+
:'prn' => :'String',
|
|
117
|
+
:'pulp_created' => :'Time',
|
|
118
|
+
:'pulp_last_updated' => :'Time',
|
|
119
|
+
:'name' => :'String',
|
|
120
|
+
:'url' => :'String',
|
|
121
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
122
|
+
:'hidden_fields' => :'Array<FileFileGitRemoteResponseHiddenFieldsInner>',
|
|
123
|
+
:'ca_cert' => :'String',
|
|
124
|
+
:'client_cert' => :'String',
|
|
125
|
+
:'tls_validation' => :'Boolean',
|
|
126
|
+
:'proxy_url' => :'String',
|
|
127
|
+
:'max_retries' => :'Integer',
|
|
128
|
+
:'total_timeout' => :'Float',
|
|
129
|
+
:'connect_timeout' => :'Float',
|
|
130
|
+
:'sock_connect_timeout' => :'Float',
|
|
131
|
+
:'sock_read_timeout' => :'Float',
|
|
132
|
+
:'headers' => :'Array<Object>',
|
|
133
|
+
:'download_concurrency' => :'Integer',
|
|
134
|
+
:'rate_limit' => :'Integer',
|
|
135
|
+
:'git_ref' => :'String'
|
|
136
|
+
}
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# List of attributes with nullable: true
|
|
140
|
+
def self.openapi_nullable
|
|
141
|
+
Set.new([
|
|
142
|
+
:'ca_cert',
|
|
143
|
+
:'client_cert',
|
|
144
|
+
:'proxy_url',
|
|
145
|
+
:'max_retries',
|
|
146
|
+
:'total_timeout',
|
|
147
|
+
:'connect_timeout',
|
|
148
|
+
:'sock_connect_timeout',
|
|
149
|
+
:'sock_read_timeout',
|
|
150
|
+
:'download_concurrency',
|
|
151
|
+
:'rate_limit',
|
|
152
|
+
])
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Initializes the object
|
|
156
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
|
+
def initialize(attributes = {})
|
|
158
|
+
if (!attributes.is_a?(Hash))
|
|
159
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::FileFileGitRemoteResponse` initialize method"
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
163
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
164
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
165
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::FileFileGitRemoteResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
166
|
+
end
|
|
167
|
+
h[k.to_sym] = v
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'pulp_href')
|
|
171
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'prn')
|
|
175
|
+
self.prn = attributes[:'prn']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'pulp_created')
|
|
179
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'pulp_last_updated')
|
|
183
|
+
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'name')
|
|
187
|
+
self.name = attributes[:'name']
|
|
188
|
+
else
|
|
189
|
+
self.name = nil
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'url')
|
|
193
|
+
self.url = attributes[:'url']
|
|
194
|
+
else
|
|
195
|
+
self.url = nil
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'pulp_labels')
|
|
199
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
200
|
+
self.pulp_labels = value
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if attributes.key?(:'hidden_fields')
|
|
205
|
+
if (value = attributes[:'hidden_fields']).is_a?(Array)
|
|
206
|
+
self.hidden_fields = value
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'ca_cert')
|
|
211
|
+
self.ca_cert = attributes[:'ca_cert']
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'client_cert')
|
|
215
|
+
self.client_cert = attributes[:'client_cert']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'tls_validation')
|
|
219
|
+
self.tls_validation = attributes[:'tls_validation']
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'proxy_url')
|
|
223
|
+
self.proxy_url = attributes[:'proxy_url']
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'max_retries')
|
|
227
|
+
self.max_retries = attributes[:'max_retries']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'total_timeout')
|
|
231
|
+
self.total_timeout = attributes[:'total_timeout']
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'connect_timeout')
|
|
235
|
+
self.connect_timeout = attributes[:'connect_timeout']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'sock_connect_timeout')
|
|
239
|
+
self.sock_connect_timeout = attributes[:'sock_connect_timeout']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'sock_read_timeout')
|
|
243
|
+
self.sock_read_timeout = attributes[:'sock_read_timeout']
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attributes.key?(:'headers')
|
|
247
|
+
if (value = attributes[:'headers']).is_a?(Array)
|
|
248
|
+
self.headers = value
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.key?(:'download_concurrency')
|
|
253
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if attributes.key?(:'rate_limit')
|
|
257
|
+
self.rate_limit = attributes[:'rate_limit']
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.key?(:'git_ref')
|
|
261
|
+
self.git_ref = attributes[:'git_ref']
|
|
262
|
+
else
|
|
263
|
+
self.git_ref = 'HEAD'
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
268
|
+
# @return Array for valid properties with the reasons
|
|
269
|
+
def list_invalid_properties
|
|
270
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
271
|
+
invalid_properties = Array.new
|
|
272
|
+
if @name.nil?
|
|
273
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if @url.nil?
|
|
277
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
|
281
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
285
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
289
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
293
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if !@download_concurrency.nil? && @download_concurrency < 1
|
|
297
|
+
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
invalid_properties
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Check to see if the all the properties in the model are valid
|
|
304
|
+
# @return true if the model is valid
|
|
305
|
+
def valid?
|
|
306
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
307
|
+
return false if @name.nil?
|
|
308
|
+
return false if @url.nil?
|
|
309
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
|
310
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
311
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
312
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
313
|
+
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
314
|
+
true
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Custom attribute writer method with validation
|
|
318
|
+
# @param [Object] total_timeout Value to be assigned
|
|
319
|
+
def total_timeout=(total_timeout)
|
|
320
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
|
321
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
@total_timeout = total_timeout
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Custom attribute writer method with validation
|
|
328
|
+
# @param [Object] connect_timeout Value to be assigned
|
|
329
|
+
def connect_timeout=(connect_timeout)
|
|
330
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
|
331
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
@connect_timeout = connect_timeout
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Custom attribute writer method with validation
|
|
338
|
+
# @param [Object] sock_connect_timeout Value to be assigned
|
|
339
|
+
def sock_connect_timeout=(sock_connect_timeout)
|
|
340
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
|
341
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
@sock_connect_timeout = sock_connect_timeout
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
# Custom attribute writer method with validation
|
|
348
|
+
# @param [Object] sock_read_timeout Value to be assigned
|
|
349
|
+
def sock_read_timeout=(sock_read_timeout)
|
|
350
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
|
351
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
@sock_read_timeout = sock_read_timeout
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Custom attribute writer method with validation
|
|
358
|
+
# @param [Object] download_concurrency Value to be assigned
|
|
359
|
+
def download_concurrency=(download_concurrency)
|
|
360
|
+
if !download_concurrency.nil? && download_concurrency < 1
|
|
361
|
+
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
@download_concurrency = download_concurrency
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Checks equality by comparing each attribute.
|
|
368
|
+
# @param [Object] Object to be compared
|
|
369
|
+
def ==(o)
|
|
370
|
+
return true if self.equal?(o)
|
|
371
|
+
self.class == o.class &&
|
|
372
|
+
pulp_href == o.pulp_href &&
|
|
373
|
+
prn == o.prn &&
|
|
374
|
+
pulp_created == o.pulp_created &&
|
|
375
|
+
pulp_last_updated == o.pulp_last_updated &&
|
|
376
|
+
name == o.name &&
|
|
377
|
+
url == o.url &&
|
|
378
|
+
pulp_labels == o.pulp_labels &&
|
|
379
|
+
hidden_fields == o.hidden_fields &&
|
|
380
|
+
ca_cert == o.ca_cert &&
|
|
381
|
+
client_cert == o.client_cert &&
|
|
382
|
+
tls_validation == o.tls_validation &&
|
|
383
|
+
proxy_url == o.proxy_url &&
|
|
384
|
+
max_retries == o.max_retries &&
|
|
385
|
+
total_timeout == o.total_timeout &&
|
|
386
|
+
connect_timeout == o.connect_timeout &&
|
|
387
|
+
sock_connect_timeout == o.sock_connect_timeout &&
|
|
388
|
+
sock_read_timeout == o.sock_read_timeout &&
|
|
389
|
+
headers == o.headers &&
|
|
390
|
+
download_concurrency == o.download_concurrency &&
|
|
391
|
+
rate_limit == o.rate_limit &&
|
|
392
|
+
git_ref == o.git_ref
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# @see the `==` method
|
|
396
|
+
# @param [Object] Object to be compared
|
|
397
|
+
def eql?(o)
|
|
398
|
+
self == o
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Calculates hash code according to all attributes.
|
|
402
|
+
# @return [Integer] Hash code
|
|
403
|
+
def hash
|
|
404
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, name, url, pulp_labels, hidden_fields, ca_cert, client_cert, tls_validation, proxy_url, max_retries, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, download_concurrency, rate_limit, git_ref].hash
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Builds the object from hash
|
|
408
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
409
|
+
# @return [Object] Returns the model itself
|
|
410
|
+
def self.build_from_hash(attributes)
|
|
411
|
+
return nil unless attributes.is_a?(Hash)
|
|
412
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
413
|
+
transformed_hash = {}
|
|
414
|
+
openapi_types.each_pair do |key, type|
|
|
415
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
416
|
+
transformed_hash["#{key}"] = nil
|
|
417
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
418
|
+
# check to ensure the input is an array given that the attribute
|
|
419
|
+
# is documented as an array but the input is not
|
|
420
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
421
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
422
|
+
end
|
|
423
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
424
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
new(transformed_hash)
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
# Deserializes the data based on type
|
|
431
|
+
# @param string type Data type
|
|
432
|
+
# @param string value Value to be deserialized
|
|
433
|
+
# @return [Object] Deserialized data
|
|
434
|
+
def self._deserialize(type, value)
|
|
435
|
+
case type.to_sym
|
|
436
|
+
when :Time
|
|
437
|
+
Time.parse(value)
|
|
438
|
+
when :Date
|
|
439
|
+
Date.parse(value)
|
|
440
|
+
when :String
|
|
441
|
+
value.to_s
|
|
442
|
+
when :Integer
|
|
443
|
+
value.to_i
|
|
444
|
+
when :Float
|
|
445
|
+
value.to_f
|
|
446
|
+
when :Boolean
|
|
447
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
448
|
+
true
|
|
449
|
+
else
|
|
450
|
+
false
|
|
451
|
+
end
|
|
452
|
+
when :Object
|
|
453
|
+
# generic object (usually a Hash), return directly
|
|
454
|
+
value
|
|
455
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
456
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
457
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
458
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
459
|
+
k_type = Regexp.last_match[:k_type]
|
|
460
|
+
v_type = Regexp.last_match[:v_type]
|
|
461
|
+
{}.tap do |hash|
|
|
462
|
+
value.each do |k, v|
|
|
463
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
464
|
+
end
|
|
465
|
+
end
|
|
466
|
+
else # model
|
|
467
|
+
# models (e.g. Pet) or oneOf
|
|
468
|
+
klass = PulpFileClient.const_get(type)
|
|
469
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
470
|
+
end
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# Returns the string representation of the object
|
|
474
|
+
# @return [String] String presentation of the object
|
|
475
|
+
def to_s
|
|
476
|
+
to_hash.to_s
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
480
|
+
# @return [Hash] Returns the object in the form of hash
|
|
481
|
+
def to_body
|
|
482
|
+
to_hash
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# Returns the object in the form of hash
|
|
486
|
+
# @return [Hash] Returns the object in the form of hash
|
|
487
|
+
def to_hash
|
|
488
|
+
hash = {}
|
|
489
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
490
|
+
value = self.send(attr)
|
|
491
|
+
if value.nil?
|
|
492
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
493
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
hash[param] = _to_hash(value)
|
|
497
|
+
end
|
|
498
|
+
hash
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
# Outputs non-array value in the form of hash
|
|
502
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
503
|
+
# @param [Object] value Any valid value
|
|
504
|
+
# @return [Hash] Returns the value in the form of hash
|
|
505
|
+
def _to_hash(value)
|
|
506
|
+
if value.is_a?(Array)
|
|
507
|
+
value.compact.map { |v| _to_hash(v) }
|
|
508
|
+
elsif value.is_a?(Hash)
|
|
509
|
+
{}.tap do |hash|
|
|
510
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
511
|
+
end
|
|
512
|
+
elsif value.respond_to? :to_hash
|
|
513
|
+
value.to_hash
|
|
514
|
+
else
|
|
515
|
+
value
|
|
516
|
+
end
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module PulpFileClient
|
|
17
|
-
class
|
|
17
|
+
class FileFileGitRemoteResponseHiddenFieldsInner
|
|
18
18
|
attr_accessor :name
|
|
19
19
|
|
|
20
20
|
attr_accessor :is_set
|
|
@@ -50,13 +50,13 @@ module PulpFileClient
|
|
|
50
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
51
|
def initialize(attributes = {})
|
|
52
52
|
if (!attributes.is_a?(Hash))
|
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::FileFileGitRemoteResponseHiddenFieldsInner` initialize method"
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::FileFileGitRemoteResponseHiddenFieldsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
60
|
end
|
|
61
61
|
h[k.to_sym] = v
|
|
62
62
|
}
|
|
@@ -357,6 +357,10 @@ module PulpFileClient
|
|
|
357
357
|
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
358
358
|
end
|
|
359
359
|
|
|
360
|
+
if !@download_concurrency.nil? && @download_concurrency < 1
|
|
361
|
+
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
362
|
+
end
|
|
363
|
+
|
|
360
364
|
invalid_properties
|
|
361
365
|
end
|
|
362
366
|
|
|
@@ -380,6 +384,7 @@ module PulpFileClient
|
|
|
380
384
|
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
381
385
|
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
382
386
|
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
387
|
+
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
383
388
|
true
|
|
384
389
|
end
|
|
385
390
|
|
|
@@ -531,6 +536,16 @@ module PulpFileClient
|
|
|
531
536
|
@sock_read_timeout = sock_read_timeout
|
|
532
537
|
end
|
|
533
538
|
|
|
539
|
+
# Custom attribute writer method with validation
|
|
540
|
+
# @param [Object] download_concurrency Value to be assigned
|
|
541
|
+
def download_concurrency=(download_concurrency)
|
|
542
|
+
if !download_concurrency.nil? && download_concurrency < 1
|
|
543
|
+
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
@download_concurrency = download_concurrency
|
|
547
|
+
end
|
|
548
|
+
|
|
534
549
|
# Checks equality by comparing each attribute.
|
|
535
550
|
# @param [Object] Object to be compared
|
|
536
551
|
def ==(o)
|
|
@@ -142,7 +142,7 @@ module PulpFileClient
|
|
|
142
142
|
:'url' => :'String',
|
|
143
143
|
:'pulp_labels' => :'Hash<String, String>',
|
|
144
144
|
:'policy' => :'PolicyEnum',
|
|
145
|
-
:'hidden_fields' => :'Array<
|
|
145
|
+
:'hidden_fields' => :'Array<FileFileGitRemoteResponseHiddenFieldsInner>',
|
|
146
146
|
:'ca_cert' => :'String',
|
|
147
147
|
:'client_cert' => :'String',
|
|
148
148
|
:'tls_validation' => :'Boolean',
|
|
@@ -313,6 +313,10 @@ module PulpFileClient
|
|
|
313
313
|
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
314
314
|
end
|
|
315
315
|
|
|
316
|
+
if !@download_concurrency.nil? && @download_concurrency < 1
|
|
317
|
+
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
|
318
|
+
end
|
|
319
|
+
|
|
316
320
|
invalid_properties
|
|
317
321
|
end
|
|
318
322
|
|
|
@@ -326,6 +330,7 @@ module PulpFileClient
|
|
|
326
330
|
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
327
331
|
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
328
332
|
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
333
|
+
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
|
329
334
|
true
|
|
330
335
|
end
|
|
331
336
|
|
|
@@ -369,6 +374,16 @@ module PulpFileClient
|
|
|
369
374
|
@sock_read_timeout = sock_read_timeout
|
|
370
375
|
end
|
|
371
376
|
|
|
377
|
+
# Custom attribute writer method with validation
|
|
378
|
+
# @param [Object] download_concurrency Value to be assigned
|
|
379
|
+
def download_concurrency=(download_concurrency)
|
|
380
|
+
if !download_concurrency.nil? && download_concurrency < 1
|
|
381
|
+
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
@download_concurrency = download_concurrency
|
|
385
|
+
end
|
|
386
|
+
|
|
372
387
|
# Checks equality by comparing each attribute.
|
|
373
388
|
# @param [Object] Object to be compared
|
|
374
389
|
def ==(o)
|
|
@@ -146,6 +146,10 @@ module PulpFileClient
|
|
|
146
146
|
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
|
147
147
|
end
|
|
148
148
|
|
|
149
|
+
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
150
|
+
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
|
151
|
+
end
|
|
152
|
+
|
|
149
153
|
if !@manifest.nil? && @manifest.to_s.length < 1
|
|
150
154
|
invalid_properties.push('invalid value for "manifest", the character length must be great than or equal to 1.')
|
|
151
155
|
end
|
|
@@ -160,6 +164,7 @@ module PulpFileClient
|
|
|
160
164
|
return false if @name.nil?
|
|
161
165
|
return false if @name.to_s.length < 1
|
|
162
166
|
return false if !@description.nil? && @description.to_s.length < 1
|
|
167
|
+
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
163
168
|
return false if !@manifest.nil? && @manifest.to_s.length < 1
|
|
164
169
|
true
|
|
165
170
|
end
|
|
@@ -188,6 +193,16 @@ module PulpFileClient
|
|
|
188
193
|
@description = description
|
|
189
194
|
end
|
|
190
195
|
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] retain_repo_versions Value to be assigned
|
|
198
|
+
def retain_repo_versions=(retain_repo_versions)
|
|
199
|
+
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
|
200
|
+
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@retain_repo_versions = retain_repo_versions
|
|
204
|
+
end
|
|
205
|
+
|
|
191
206
|
# Custom attribute writer method with validation
|
|
192
207
|
# @param [Object] manifest Value to be assigned
|
|
193
208
|
def manifest=(manifest)
|
|
@@ -189,6 +189,10 @@ module PulpFileClient
|
|
|
189
189
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
190
190
|
end
|
|
191
191
|
|
|
192
|
+
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
193
|
+
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
|
194
|
+
end
|
|
195
|
+
|
|
192
196
|
invalid_properties
|
|
193
197
|
end
|
|
194
198
|
|
|
@@ -197,9 +201,20 @@ module PulpFileClient
|
|
|
197
201
|
def valid?
|
|
198
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
199
203
|
return false if @name.nil?
|
|
204
|
+
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
|
200
205
|
true
|
|
201
206
|
end
|
|
202
207
|
|
|
208
|
+
# Custom attribute writer method with validation
|
|
209
|
+
# @param [Object] retain_repo_versions Value to be assigned
|
|
210
|
+
def retain_repo_versions=(retain_repo_versions)
|
|
211
|
+
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
|
212
|
+
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
@retain_repo_versions = retain_repo_versions
|
|
216
|
+
end
|
|
217
|
+
|
|
203
218
|
# Checks equality by comparing each attribute.
|
|
204
219
|
# @param [Object] Object to be compared
|
|
205
220
|
def ==(o)
|