pulp_ansible_client 0.17.2 → 0.18.0

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