pulp_ansible_client 0.15.2 → 0.15.3

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