pulp_ansible_client 0.20.5 → 0.20.7

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