pulp_ansible_client 0.11.0.dev1636600545 → 0.11.0.dev1636946173

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulp_ansible_client might be problematic. Click here for more details.

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