pulp_ansible_client 0.17.1 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,61 +15,61 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  # A serializer for Git Collection Remotes.
17
17
  class AnsibleGitRemoteResponse
18
- # 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.
19
- attr_accessor :sock_connect_timeout
20
-
21
- # The proxy URL. Format: scheme://host:port
22
- attr_accessor :proxy_url
23
-
24
18
  # List of hidden (write only) fields
25
19
  attr_accessor :hidden_fields
26
20
 
27
- # Limits requests per second for each concurrent downloader
28
- attr_accessor :rate_limit
29
-
30
21
  # Headers for aiohttp.Clientsession
31
22
  attr_accessor :headers
32
23
 
33
- # Total number of simultaneous connections. If not set then the default value will be used.
34
- attr_accessor :download_concurrency
35
-
36
- # A PEM encoded client certificate used for authentication.
37
- attr_accessor :client_cert
38
-
39
24
  # A unique name for this remote.
40
25
  attr_accessor :name
41
26
 
42
- # If True, TLS peer validation must be performed.
43
- attr_accessor :tls_validation
27
+ # The URL of an external content source.
28
+ attr_accessor :url
29
+
30
+ # Limits requests per second for each concurrent downloader
31
+ attr_accessor :rate_limit
44
32
 
45
33
  # Timestamp of the most recent update of the remote.
46
34
  attr_accessor :pulp_last_updated
47
35
 
48
- # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
49
- attr_accessor :ca_cert
50
-
51
36
  # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
52
37
  attr_accessor :max_retries
53
38
 
54
- # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
55
- attr_accessor :total_timeout
39
+ attr_accessor :pulp_href
56
40
 
57
- # The URL of an external content source.
58
- attr_accessor :url
41
+ # A PEM encoded client certificate used for authentication.
42
+ attr_accessor :client_cert
59
43
 
60
- attr_accessor :pulp_labels
44
+ # Timestamp of creation.
45
+ attr_accessor :pulp_created
61
46
 
62
47
  # 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.
63
48
  attr_accessor :sock_read_timeout
64
49
 
65
- attr_accessor :pulp_href
50
+ attr_accessor :pulp_labels
66
51
 
67
- # Timestamp of creation.
68
- attr_accessor :pulp_created
52
+ # The proxy URL. Format: scheme://host:port
53
+ attr_accessor :proxy_url
54
+
55
+ # If True, TLS peer validation must be performed.
56
+ attr_accessor :tls_validation
69
57
 
70
58
  # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
71
59
  attr_accessor :connect_timeout
72
60
 
61
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
62
+ attr_accessor :total_timeout
63
+
64
+ # 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.
65
+ attr_accessor :sock_connect_timeout
66
+
67
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
68
+ attr_accessor :ca_cert
69
+
70
+ # Total number of simultaneous connections. If not set then the default value will be used.
71
+ attr_accessor :download_concurrency
72
+
73
73
  # If True, only metadata about the content will be stored in Pulp. Clients will retrieve content from the remote URL.
74
74
  attr_accessor :metadata_only
75
75
 
@@ -79,25 +79,25 @@ module PulpAnsibleClient
79
79
  # Attribute mapping from ruby-style variable name to JSON key.
80
80
  def self.attribute_map
81
81
  {
82
- :'sock_connect_timeout' => :'sock_connect_timeout',
83
- :'proxy_url' => :'proxy_url',
84
82
  :'hidden_fields' => :'hidden_fields',
85
- :'rate_limit' => :'rate_limit',
86
83
  :'headers' => :'headers',
87
- :'download_concurrency' => :'download_concurrency',
88
- :'client_cert' => :'client_cert',
89
84
  :'name' => :'name',
90
- :'tls_validation' => :'tls_validation',
85
+ :'url' => :'url',
86
+ :'rate_limit' => :'rate_limit',
91
87
  :'pulp_last_updated' => :'pulp_last_updated',
92
- :'ca_cert' => :'ca_cert',
93
88
  :'max_retries' => :'max_retries',
94
- :'total_timeout' => :'total_timeout',
95
- :'url' => :'url',
96
- :'pulp_labels' => :'pulp_labels',
97
- :'sock_read_timeout' => :'sock_read_timeout',
98
89
  :'pulp_href' => :'pulp_href',
90
+ :'client_cert' => :'client_cert',
99
91
  :'pulp_created' => :'pulp_created',
92
+ :'sock_read_timeout' => :'sock_read_timeout',
93
+ :'pulp_labels' => :'pulp_labels',
94
+ :'proxy_url' => :'proxy_url',
95
+ :'tls_validation' => :'tls_validation',
100
96
  :'connect_timeout' => :'connect_timeout',
97
+ :'total_timeout' => :'total_timeout',
98
+ :'sock_connect_timeout' => :'sock_connect_timeout',
99
+ :'ca_cert' => :'ca_cert',
100
+ :'download_concurrency' => :'download_concurrency',
101
101
  :'metadata_only' => :'metadata_only',
102
102
  :'git_ref' => :'git_ref'
103
103
  }
@@ -106,25 +106,25 @@ module PulpAnsibleClient
106
106
  # Attribute type mapping.
107
107
  def self.openapi_types
108
108
  {
109
- :'sock_connect_timeout' => :'Float',
110
- :'proxy_url' => :'String',
111
109
  :'hidden_fields' => :'Array<AnsibleCollectionRemoteResponseHiddenFields>',
112
- :'rate_limit' => :'Integer',
113
110
  :'headers' => :'Array<Object>',
114
- :'download_concurrency' => :'Integer',
115
- :'client_cert' => :'String',
116
111
  :'name' => :'String',
117
- :'tls_validation' => :'Boolean',
112
+ :'url' => :'String',
113
+ :'rate_limit' => :'Integer',
118
114
  :'pulp_last_updated' => :'DateTime',
119
- :'ca_cert' => :'String',
120
115
  :'max_retries' => :'Integer',
121
- :'total_timeout' => :'Float',
122
- :'url' => :'String',
123
- :'pulp_labels' => :'Hash<String, String>',
124
- :'sock_read_timeout' => :'Float',
125
116
  :'pulp_href' => :'String',
117
+ :'client_cert' => :'String',
126
118
  :'pulp_created' => :'DateTime',
119
+ :'sock_read_timeout' => :'Float',
120
+ :'pulp_labels' => :'Hash<String, String>',
121
+ :'proxy_url' => :'String',
122
+ :'tls_validation' => :'Boolean',
127
123
  :'connect_timeout' => :'Float',
124
+ :'total_timeout' => :'Float',
125
+ :'sock_connect_timeout' => :'Float',
126
+ :'ca_cert' => :'String',
127
+ :'download_concurrency' => :'Integer',
128
128
  :'metadata_only' => :'Boolean',
129
129
  :'git_ref' => :'String'
130
130
  }
@@ -133,16 +133,16 @@ module PulpAnsibleClient
133
133
  # List of attributes with nullable: true
134
134
  def self.openapi_nullable
135
135
  Set.new([
136
- :'sock_connect_timeout',
137
- :'proxy_url',
138
136
  :'rate_limit',
139
- :'download_concurrency',
140
- :'client_cert',
141
- :'ca_cert',
142
137
  :'max_retries',
143
- :'total_timeout',
138
+ :'client_cert',
144
139
  :'sock_read_timeout',
140
+ :'proxy_url',
145
141
  :'connect_timeout',
142
+ :'total_timeout',
143
+ :'sock_connect_timeout',
144
+ :'ca_cert',
145
+ :'download_concurrency',
146
146
  ])
147
147
  end
148
148
 
@@ -161,88 +161,88 @@ module PulpAnsibleClient
161
161
  h[k.to_sym] = v
162
162
  }
163
163
 
164
- if attributes.key?(:'sock_connect_timeout')
165
- self.sock_connect_timeout = attributes[:'sock_connect_timeout']
166
- end
167
-
168
- if attributes.key?(:'proxy_url')
169
- self.proxy_url = attributes[:'proxy_url']
170
- end
171
-
172
164
  if attributes.key?(:'hidden_fields')
173
165
  if (value = attributes[:'hidden_fields']).is_a?(Array)
174
166
  self.hidden_fields = value
175
167
  end
176
168
  end
177
169
 
178
- if attributes.key?(:'rate_limit')
179
- self.rate_limit = attributes[:'rate_limit']
180
- end
181
-
182
170
  if attributes.key?(:'headers')
183
171
  if (value = attributes[:'headers']).is_a?(Array)
184
172
  self.headers = value
185
173
  end
186
174
  end
187
175
 
188
- if attributes.key?(:'download_concurrency')
189
- self.download_concurrency = attributes[:'download_concurrency']
190
- end
191
-
192
- if attributes.key?(:'client_cert')
193
- self.client_cert = attributes[:'client_cert']
194
- end
195
-
196
176
  if attributes.key?(:'name')
197
177
  self.name = attributes[:'name']
198
178
  end
199
179
 
200
- if attributes.key?(:'tls_validation')
201
- self.tls_validation = attributes[:'tls_validation']
180
+ if attributes.key?(:'url')
181
+ self.url = attributes[:'url']
202
182
  end
203
183
 
204
- if attributes.key?(:'pulp_last_updated')
205
- self.pulp_last_updated = attributes[:'pulp_last_updated']
184
+ if attributes.key?(:'rate_limit')
185
+ self.rate_limit = attributes[:'rate_limit']
206
186
  end
207
187
 
208
- if attributes.key?(:'ca_cert')
209
- self.ca_cert = attributes[:'ca_cert']
188
+ if attributes.key?(:'pulp_last_updated')
189
+ self.pulp_last_updated = attributes[:'pulp_last_updated']
210
190
  end
211
191
 
212
192
  if attributes.key?(:'max_retries')
213
193
  self.max_retries = attributes[:'max_retries']
214
194
  end
215
195
 
216
- if attributes.key?(:'total_timeout')
217
- self.total_timeout = attributes[:'total_timeout']
196
+ if attributes.key?(:'pulp_href')
197
+ self.pulp_href = attributes[:'pulp_href']
218
198
  end
219
199
 
220
- if attributes.key?(:'url')
221
- self.url = attributes[:'url']
200
+ if attributes.key?(:'client_cert')
201
+ self.client_cert = attributes[:'client_cert']
222
202
  end
223
203
 
224
- if attributes.key?(:'pulp_labels')
225
- if (value = attributes[:'pulp_labels']).is_a?(Hash)
226
- self.pulp_labels = value
227
- end
204
+ if attributes.key?(:'pulp_created')
205
+ self.pulp_created = attributes[:'pulp_created']
228
206
  end
229
207
 
230
208
  if attributes.key?(:'sock_read_timeout')
231
209
  self.sock_read_timeout = attributes[:'sock_read_timeout']
232
210
  end
233
211
 
234
- if attributes.key?(:'pulp_href')
235
- self.pulp_href = attributes[:'pulp_href']
212
+ if attributes.key?(:'pulp_labels')
213
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
214
+ self.pulp_labels = value
215
+ end
236
216
  end
237
217
 
238
- if attributes.key?(:'pulp_created')
239
- self.pulp_created = attributes[:'pulp_created']
218
+ if attributes.key?(:'proxy_url')
219
+ self.proxy_url = attributes[:'proxy_url']
220
+ end
221
+
222
+ if attributes.key?(:'tls_validation')
223
+ self.tls_validation = attributes[:'tls_validation']
240
224
  end
241
225
 
242
226
  if attributes.key?(:'connect_timeout')
243
227
  self.connect_timeout = attributes[:'connect_timeout']
244
228
  end
245
229
 
230
+ if attributes.key?(:'total_timeout')
231
+ self.total_timeout = attributes[:'total_timeout']
232
+ end
233
+
234
+ if attributes.key?(:'sock_connect_timeout')
235
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
236
+ end
237
+
238
+ if attributes.key?(:'ca_cert')
239
+ self.ca_cert = attributes[:'ca_cert']
240
+ end
241
+
242
+ if attributes.key?(:'download_concurrency')
243
+ self.download_concurrency = attributes[:'download_concurrency']
244
+ end
245
+
246
246
  if attributes.key?(:'metadata_only')
247
247
  self.metadata_only = attributes[:'metadata_only']
248
248
  end
@@ -256,22 +256,10 @@ module PulpAnsibleClient
256
256
  # @return Array for valid properties with the reasons
257
257
  def list_invalid_properties
258
258
  invalid_properties = Array.new
259
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
260
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
261
- end
262
-
263
- if !@download_concurrency.nil? && @download_concurrency < 1
264
- invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
265
- end
266
-
267
259
  if @name.nil?
268
260
  invalid_properties.push('invalid value for "name", name cannot be nil.')
269
261
  end
270
262
 
271
- if !@total_timeout.nil? && @total_timeout < 0.0
272
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
273
- end
274
-
275
263
  if @url.nil?
276
264
  invalid_properties.push('invalid value for "url", url cannot be nil.')
277
265
  end
@@ -284,40 +272,52 @@ module PulpAnsibleClient
284
272
  invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
285
273
  end
286
274
 
275
+ if !@total_timeout.nil? && @total_timeout < 0.0
276
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
277
+ end
278
+
279
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
280
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
281
+ end
282
+
283
+ if !@download_concurrency.nil? && @download_concurrency < 1
284
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
285
+ end
286
+
287
287
  invalid_properties
288
288
  end
289
289
 
290
290
  # Check to see if the all the properties in the model are valid
291
291
  # @return true if the model is valid
292
292
  def valid?
293
- return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
294
- return false if !@download_concurrency.nil? && @download_concurrency < 1
295
293
  return false if @name.nil?
296
- return false if !@total_timeout.nil? && @total_timeout < 0.0
297
294
  return false if @url.nil?
298
295
  return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
299
296
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
297
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
298
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
299
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
300
300
  true
301
301
  end
302
302
 
303
303
  # Custom attribute writer method with validation
304
- # @param [Object] sock_connect_timeout Value to be assigned
305
- def sock_connect_timeout=(sock_connect_timeout)
306
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
307
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
304
+ # @param [Object] sock_read_timeout Value to be assigned
305
+ def sock_read_timeout=(sock_read_timeout)
306
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
307
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
308
308
  end
309
309
 
310
- @sock_connect_timeout = sock_connect_timeout
310
+ @sock_read_timeout = sock_read_timeout
311
311
  end
312
312
 
313
313
  # Custom attribute writer method with validation
314
- # @param [Object] download_concurrency Value to be assigned
315
- def download_concurrency=(download_concurrency)
316
- if !download_concurrency.nil? && download_concurrency < 1
317
- fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
314
+ # @param [Object] connect_timeout Value to be assigned
315
+ def connect_timeout=(connect_timeout)
316
+ if !connect_timeout.nil? && connect_timeout < 0.0
317
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
318
318
  end
319
319
 
320
- @download_concurrency = download_concurrency
320
+ @connect_timeout = connect_timeout
321
321
  end
322
322
 
323
323
  # Custom attribute writer method with validation
@@ -331,23 +331,23 @@ module PulpAnsibleClient
331
331
  end
332
332
 
333
333
  # Custom attribute writer method with validation
334
- # @param [Object] sock_read_timeout Value to be assigned
335
- def sock_read_timeout=(sock_read_timeout)
336
- if !sock_read_timeout.nil? && sock_read_timeout < 0.0
337
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
334
+ # @param [Object] sock_connect_timeout Value to be assigned
335
+ def sock_connect_timeout=(sock_connect_timeout)
336
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
337
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
338
338
  end
339
339
 
340
- @sock_read_timeout = sock_read_timeout
340
+ @sock_connect_timeout = sock_connect_timeout
341
341
  end
342
342
 
343
343
  # Custom attribute writer method with validation
344
- # @param [Object] connect_timeout Value to be assigned
345
- def connect_timeout=(connect_timeout)
346
- if !connect_timeout.nil? && connect_timeout < 0.0
347
- fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
344
+ # @param [Object] download_concurrency Value to be assigned
345
+ def download_concurrency=(download_concurrency)
346
+ if !download_concurrency.nil? && download_concurrency < 1
347
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
348
348
  end
349
349
 
350
- @connect_timeout = connect_timeout
350
+ @download_concurrency = download_concurrency
351
351
  end
352
352
 
353
353
  # Checks equality by comparing each attribute.
@@ -355,25 +355,25 @@ module PulpAnsibleClient
355
355
  def ==(o)
356
356
  return true if self.equal?(o)
357
357
  self.class == o.class &&
358
- sock_connect_timeout == o.sock_connect_timeout &&
359
- proxy_url == o.proxy_url &&
360
358
  hidden_fields == o.hidden_fields &&
361
- rate_limit == o.rate_limit &&
362
359
  headers == o.headers &&
363
- download_concurrency == o.download_concurrency &&
364
- client_cert == o.client_cert &&
365
360
  name == o.name &&
366
- tls_validation == o.tls_validation &&
361
+ url == o.url &&
362
+ rate_limit == o.rate_limit &&
367
363
  pulp_last_updated == o.pulp_last_updated &&
368
- ca_cert == o.ca_cert &&
369
364
  max_retries == o.max_retries &&
370
- total_timeout == o.total_timeout &&
371
- url == o.url &&
372
- pulp_labels == o.pulp_labels &&
373
- sock_read_timeout == o.sock_read_timeout &&
374
365
  pulp_href == o.pulp_href &&
366
+ client_cert == o.client_cert &&
375
367
  pulp_created == o.pulp_created &&
368
+ sock_read_timeout == o.sock_read_timeout &&
369
+ pulp_labels == o.pulp_labels &&
370
+ proxy_url == o.proxy_url &&
371
+ tls_validation == o.tls_validation &&
376
372
  connect_timeout == o.connect_timeout &&
373
+ total_timeout == o.total_timeout &&
374
+ sock_connect_timeout == o.sock_connect_timeout &&
375
+ ca_cert == o.ca_cert &&
376
+ download_concurrency == o.download_concurrency &&
377
377
  metadata_only == o.metadata_only &&
378
378
  git_ref == o.git_ref
379
379
  end
@@ -387,7 +387,7 @@ module PulpAnsibleClient
387
387
  # Calculates hash code according to all attributes.
388
388
  # @return [Integer] Hash code
389
389
  def hash
390
- [sock_connect_timeout, proxy_url, hidden_fields, rate_limit, headers, download_concurrency, client_cert, name, tls_validation, pulp_last_updated, ca_cert, max_retries, total_timeout, url, pulp_labels, sock_read_timeout, pulp_href, pulp_created, connect_timeout, metadata_only, git_ref].hash
390
+ [hidden_fields, headers, name, url, rate_limit, pulp_last_updated, max_retries, pulp_href, client_cert, pulp_created, sock_read_timeout, pulp_labels, proxy_url, tls_validation, connect_timeout, total_timeout, sock_connect_timeout, ca_cert, download_concurrency, metadata_only, git_ref].hash
391
391
  end
392
392
 
393
393
  # Builds the object from hash