pulp_ansible_client 0.11.0.dev1636427751 → 0.11.0.dev1636514074

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