pulp_ansible_client 0.17.2 → 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
- # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
19
- attr_accessor :ca_cert
20
-
21
- # A PEM encoded client certificate used for authentication.
22
- attr_accessor :client_cert
23
-
24
- # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
25
- attr_accessor :connect_timeout
26
-
27
18
  # List of hidden (write only) fields
28
19
  attr_accessor :hidden_fields
29
20
 
30
- # The URL of an external content source.
31
- attr_accessor :url
32
-
33
- attr_accessor :pulp_href
21
+ # Headers for aiohttp.Clientsession
22
+ attr_accessor :headers
34
23
 
35
24
  # A unique name for this remote.
36
25
  attr_accessor :name
37
26
 
38
- # The proxy URL. Format: scheme://host:port
39
- attr_accessor :proxy_url
40
-
41
- # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
42
- attr_accessor :max_retries
43
-
44
- # 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.
45
- attr_accessor :sock_read_timeout
27
+ # The URL of an external content source.
28
+ attr_accessor :url
46
29
 
47
- # 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.
48
- attr_accessor :sock_connect_timeout
30
+ # Limits requests per second for each concurrent downloader
31
+ attr_accessor :rate_limit
49
32
 
50
33
  # Timestamp of the most recent update of the remote.
51
34
  attr_accessor :pulp_last_updated
52
35
 
53
- # Limits requests per second for each concurrent downloader
54
- attr_accessor :rate_limit
36
+ # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
37
+ attr_accessor :max_retries
55
38
 
56
- # Headers for aiohttp.Clientsession
57
- attr_accessor :headers
39
+ attr_accessor :pulp_href
40
+
41
+ # A PEM encoded client certificate used for authentication.
42
+ attr_accessor :client_cert
58
43
 
59
44
  # Timestamp of creation.
60
45
  attr_accessor :pulp_created
61
46
 
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.
48
+ attr_accessor :sock_read_timeout
49
+
62
50
  attr_accessor :pulp_labels
63
51
 
64
- # Total number of simultaneous connections. If not set then the default value will be used.
65
- attr_accessor :download_concurrency
52
+ # The proxy URL. Format: scheme://host:port
53
+ attr_accessor :proxy_url
66
54
 
67
55
  # If True, TLS peer validation must be performed.
68
56
  attr_accessor :tls_validation
69
57
 
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.
59
+ attr_accessor :connect_timeout
60
+
70
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.
71
62
  attr_accessor :total_timeout
72
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
- :'ca_cert' => :'ca_cert',
83
- :'client_cert' => :'client_cert',
84
- :'connect_timeout' => :'connect_timeout',
85
82
  :'hidden_fields' => :'hidden_fields',
86
- :'url' => :'url',
87
- :'pulp_href' => :'pulp_href',
83
+ :'headers' => :'headers',
88
84
  :'name' => :'name',
89
- :'proxy_url' => :'proxy_url',
90
- :'max_retries' => :'max_retries',
91
- :'sock_read_timeout' => :'sock_read_timeout',
92
- :'sock_connect_timeout' => :'sock_connect_timeout',
93
- :'pulp_last_updated' => :'pulp_last_updated',
85
+ :'url' => :'url',
94
86
  :'rate_limit' => :'rate_limit',
95
- :'headers' => :'headers',
87
+ :'pulp_last_updated' => :'pulp_last_updated',
88
+ :'max_retries' => :'max_retries',
89
+ :'pulp_href' => :'pulp_href',
90
+ :'client_cert' => :'client_cert',
96
91
  :'pulp_created' => :'pulp_created',
92
+ :'sock_read_timeout' => :'sock_read_timeout',
97
93
  :'pulp_labels' => :'pulp_labels',
98
- :'download_concurrency' => :'download_concurrency',
94
+ :'proxy_url' => :'proxy_url',
99
95
  :'tls_validation' => :'tls_validation',
96
+ :'connect_timeout' => :'connect_timeout',
100
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
- :'ca_cert' => :'String',
110
- :'client_cert' => :'String',
111
- :'connect_timeout' => :'Float',
112
109
  :'hidden_fields' => :'Array<AnsibleCollectionRemoteResponseHiddenFields>',
113
- :'url' => :'String',
114
- :'pulp_href' => :'String',
110
+ :'headers' => :'Array<Object>',
115
111
  :'name' => :'String',
116
- :'proxy_url' => :'String',
117
- :'max_retries' => :'Integer',
118
- :'sock_read_timeout' => :'Float',
119
- :'sock_connect_timeout' => :'Float',
120
- :'pulp_last_updated' => :'DateTime',
112
+ :'url' => :'String',
121
113
  :'rate_limit' => :'Integer',
122
- :'headers' => :'Array<Object>',
114
+ :'pulp_last_updated' => :'DateTime',
115
+ :'max_retries' => :'Integer',
116
+ :'pulp_href' => :'String',
117
+ :'client_cert' => :'String',
123
118
  :'pulp_created' => :'DateTime',
119
+ :'sock_read_timeout' => :'Float',
124
120
  :'pulp_labels' => :'Hash<String, String>',
125
- :'download_concurrency' => :'Integer',
121
+ :'proxy_url' => :'String',
126
122
  :'tls_validation' => :'Boolean',
123
+ :'connect_timeout' => :'Float',
127
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
- :'ca_cert',
137
- :'client_cert',
138
- :'connect_timeout',
139
- :'proxy_url',
136
+ :'rate_limit',
140
137
  :'max_retries',
138
+ :'client_cert',
141
139
  :'sock_read_timeout',
140
+ :'proxy_url',
141
+ :'connect_timeout',
142
+ :'total_timeout',
142
143
  :'sock_connect_timeout',
143
- :'rate_limit',
144
+ :'ca_cert',
144
145
  :'download_concurrency',
145
- :'total_timeout',
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?(:'ca_cert')
165
- self.ca_cert = attributes[:'ca_cert']
166
- end
167
-
168
- if attributes.key?(:'client_cert')
169
- self.client_cert = attributes[:'client_cert']
170
- end
171
-
172
- if attributes.key?(:'connect_timeout')
173
- self.connect_timeout = attributes[:'connect_timeout']
174
- end
175
-
176
164
  if attributes.key?(:'hidden_fields')
177
165
  if (value = attributes[:'hidden_fields']).is_a?(Array)
178
166
  self.hidden_fields = value
179
167
  end
180
168
  end
181
169
 
182
- if attributes.key?(:'url')
183
- self.url = attributes[:'url']
184
- end
185
-
186
- if attributes.key?(:'pulp_href')
187
- self.pulp_href = attributes[:'pulp_href']
170
+ if attributes.key?(:'headers')
171
+ if (value = attributes[:'headers']).is_a?(Array)
172
+ self.headers = value
173
+ end
188
174
  end
189
175
 
190
176
  if attributes.key?(:'name')
191
177
  self.name = attributes[:'name']
192
178
  end
193
179
 
194
- if attributes.key?(:'proxy_url')
195
- self.proxy_url = attributes[:'proxy_url']
196
- end
197
-
198
- if attributes.key?(:'max_retries')
199
- self.max_retries = attributes[:'max_retries']
200
- end
201
-
202
- if attributes.key?(:'sock_read_timeout')
203
- self.sock_read_timeout = attributes[:'sock_read_timeout']
180
+ if attributes.key?(:'url')
181
+ self.url = attributes[:'url']
204
182
  end
205
183
 
206
- if attributes.key?(:'sock_connect_timeout')
207
- self.sock_connect_timeout = attributes[:'sock_connect_timeout']
184
+ if attributes.key?(:'rate_limit')
185
+ self.rate_limit = attributes[:'rate_limit']
208
186
  end
209
187
 
210
188
  if attributes.key?(:'pulp_last_updated')
211
189
  self.pulp_last_updated = attributes[:'pulp_last_updated']
212
190
  end
213
191
 
214
- if attributes.key?(:'rate_limit')
215
- self.rate_limit = attributes[:'rate_limit']
192
+ if attributes.key?(:'max_retries')
193
+ self.max_retries = attributes[:'max_retries']
216
194
  end
217
195
 
218
- if attributes.key?(:'headers')
219
- if (value = attributes[:'headers']).is_a?(Array)
220
- self.headers = value
221
- end
196
+ if attributes.key?(:'pulp_href')
197
+ self.pulp_href = attributes[:'pulp_href']
198
+ end
199
+
200
+ if attributes.key?(:'client_cert')
201
+ self.client_cert = attributes[:'client_cert']
222
202
  end
223
203
 
224
204
  if attributes.key?(:'pulp_created')
225
205
  self.pulp_created = attributes[:'pulp_created']
226
206
  end
227
207
 
208
+ if attributes.key?(:'sock_read_timeout')
209
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
210
+ end
211
+
228
212
  if attributes.key?(:'pulp_labels')
229
213
  if (value = attributes[:'pulp_labels']).is_a?(Hash)
230
214
  self.pulp_labels = value
231
215
  end
232
216
  end
233
217
 
234
- if attributes.key?(:'download_concurrency')
235
- self.download_concurrency = attributes[:'download_concurrency']
218
+ if attributes.key?(:'proxy_url')
219
+ self.proxy_url = attributes[:'proxy_url']
236
220
  end
237
221
 
238
222
  if attributes.key?(:'tls_validation')
239
223
  self.tls_validation = attributes[:'tls_validation']
240
224
  end
241
225
 
226
+ if attributes.key?(:'connect_timeout')
227
+ self.connect_timeout = attributes[:'connect_timeout']
228
+ end
229
+
242
230
  if attributes.key?(:'total_timeout')
243
231
  self.total_timeout = attributes[:'total_timeout']
244
232
  end
245
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,26 @@ 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 !@connect_timeout.nil? && @connect_timeout < 0.0
260
- invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
259
+ if @name.nil?
260
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
261
261
  end
262
262
 
263
263
  if @url.nil?
264
264
  invalid_properties.push('invalid value for "url", url cannot be nil.')
265
265
  end
266
266
 
267
- if @name.nil?
268
- invalid_properties.push('invalid value for "name", name cannot be nil.')
269
- end
270
-
271
267
  if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
272
268
  invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
273
269
  end
274
270
 
271
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
272
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
273
+ end
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
+
275
279
  if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
276
280
  invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
277
281
  end
@@ -280,26 +284,32 @@ module PulpAnsibleClient
280
284
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
281
285
  end
282
286
 
283
- if !@total_timeout.nil? && @total_timeout < 0.0
284
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
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 !@connect_timeout.nil? && @connect_timeout < 0.0
294
- return false if @url.nil?
295
293
  return false if @name.nil?
294
+ return false if @url.nil?
296
295
  return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
296
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
297
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
297
298
  return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
298
299
  return false if !@download_concurrency.nil? && @download_concurrency < 1
299
- return false if !@total_timeout.nil? && @total_timeout < 0.0
300
300
  true
301
301
  end
302
302
 
303
+ # Custom attribute writer method with validation
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
+ end
309
+
310
+ @sock_read_timeout = sock_read_timeout
311
+ end
312
+
303
313
  # Custom attribute writer method with validation
304
314
  # @param [Object] connect_timeout Value to be assigned
305
315
  def connect_timeout=(connect_timeout)
@@ -311,13 +321,13 @@ module PulpAnsibleClient
311
321
  end
312
322
 
313
323
  # Custom attribute writer method with validation
314
- # @param [Object] sock_read_timeout Value to be assigned
315
- def sock_read_timeout=(sock_read_timeout)
316
- if !sock_read_timeout.nil? && sock_read_timeout < 0.0
317
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
324
+ # @param [Object] total_timeout Value to be assigned
325
+ def total_timeout=(total_timeout)
326
+ if !total_timeout.nil? && total_timeout < 0.0
327
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
318
328
  end
319
329
 
320
- @sock_read_timeout = sock_read_timeout
330
+ @total_timeout = total_timeout
321
331
  end
322
332
 
323
333
  # Custom attribute writer method with validation
@@ -340,40 +350,30 @@ module PulpAnsibleClient
340
350
  @download_concurrency = download_concurrency
341
351
  end
342
352
 
343
- # Custom attribute writer method with validation
344
- # @param [Object] total_timeout Value to be assigned
345
- def total_timeout=(total_timeout)
346
- if !total_timeout.nil? && total_timeout < 0.0
347
- fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
348
- end
349
-
350
- @total_timeout = total_timeout
351
- end
352
-
353
353
  # Checks equality by comparing each attribute.
354
354
  # @param [Object] Object to be compared
355
355
  def ==(o)
356
356
  return true if self.equal?(o)
357
357
  self.class == o.class &&
358
- ca_cert == o.ca_cert &&
359
- client_cert == o.client_cert &&
360
- connect_timeout == o.connect_timeout &&
361
358
  hidden_fields == o.hidden_fields &&
362
- url == o.url &&
363
- pulp_href == o.pulp_href &&
359
+ headers == o.headers &&
364
360
  name == o.name &&
365
- proxy_url == o.proxy_url &&
366
- max_retries == o.max_retries &&
367
- sock_read_timeout == o.sock_read_timeout &&
368
- sock_connect_timeout == o.sock_connect_timeout &&
369
- pulp_last_updated == o.pulp_last_updated &&
361
+ url == o.url &&
370
362
  rate_limit == o.rate_limit &&
371
- headers == o.headers &&
363
+ pulp_last_updated == o.pulp_last_updated &&
364
+ max_retries == o.max_retries &&
365
+ pulp_href == o.pulp_href &&
366
+ client_cert == o.client_cert &&
372
367
  pulp_created == o.pulp_created &&
368
+ sock_read_timeout == o.sock_read_timeout &&
373
369
  pulp_labels == o.pulp_labels &&
374
- download_concurrency == o.download_concurrency &&
370
+ proxy_url == o.proxy_url &&
375
371
  tls_validation == o.tls_validation &&
372
+ connect_timeout == o.connect_timeout &&
376
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
- [ca_cert, client_cert, connect_timeout, hidden_fields, url, pulp_href, name, proxy_url, max_retries, sock_read_timeout, sock_connect_timeout, pulp_last_updated, rate_limit, headers, pulp_created, pulp_labels, download_concurrency, tls_validation, total_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