pulp_ansible_client 0.21.0 → 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 CA certificate used to validate the server certificate presented by the remote server.
19
- attr_accessor :ca_cert
20
-
21
- # The URL of an external content source.
22
- attr_accessor :url
23
-
24
18
  # If True, TLS peer validation must be performed.
25
19
  attr_accessor :tls_validation
26
20
 
27
- # 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.
28
- attr_accessor :sock_read_timeout
29
-
30
- # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
31
- attr_accessor :max_retries
21
+ # The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
22
+ attr_accessor :password
32
23
 
33
- # A unique name for this remote.
34
- attr_accessor :name
24
+ # The proxy URL. Format: scheme://host:port
25
+ attr_accessor :proxy_url
35
26
 
36
- # Headers for aiohttp.Clientsession
37
- attr_accessor :headers
27
+ # 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.
28
+ attr_accessor :sock_connect_timeout
38
29
 
39
30
  # The username to be used for authentication when syncing.
40
31
  attr_accessor :username
41
32
 
42
- # The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.
43
- attr_accessor :proxy_password
33
+ attr_accessor :pulp_labels
44
34
 
45
- # Limits requests per second for each concurrent downloader
46
- attr_accessor :rate_limit
35
+ # Headers for aiohttp.Clientsession
36
+ attr_accessor :headers
47
37
 
48
- # The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
49
- attr_accessor :password
38
+ # 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.
39
+ attr_accessor :sock_read_timeout
40
+
41
+ # The username to authenticte to the proxy.
42
+ attr_accessor :proxy_username
43
+
44
+ # A PEM encoded private key used for authentication.
45
+ attr_accessor :client_key
50
46
 
51
47
  # A PEM encoded client certificate used for authentication.
52
48
  attr_accessor :client_cert
53
49
 
54
- # 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.
55
- attr_accessor :sock_connect_timeout
50
+ # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
51
+ attr_accessor :max_retries
56
52
 
57
- # A PEM encoded private key used for authentication.
58
- attr_accessor :client_key
53
+ # The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed.
54
+ attr_accessor :proxy_password
55
+
56
+ # The URL of an external content source.
57
+ attr_accessor :url
58
+
59
+ # Total number of simultaneous connections. If not set then the default value will be used.
60
+ attr_accessor :download_concurrency
61
+
62
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
63
+ attr_accessor :ca_cert
59
64
 
60
65
  # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
61
66
  attr_accessor :connect_timeout
62
67
 
68
+ # Limits requests per second for each concurrent downloader
69
+ attr_accessor :rate_limit
70
+
63
71
  # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
64
72
  attr_accessor :total_timeout
65
73
 
66
- # The username to authenticte to the proxy.
67
- attr_accessor :proxy_username
68
-
69
- attr_accessor :pulp_labels
70
-
71
- # The proxy URL. Format: scheme://host:port
72
- attr_accessor :proxy_url
73
-
74
- # Total number of simultaneous connections. If not set then the default value will be used.
75
- attr_accessor :download_concurrency
74
+ # A unique name for this remote.
75
+ attr_accessor :name
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
@@ -83,26 +83,26 @@ module PulpAnsibleClient
83
83
  # Attribute mapping from ruby-style variable name to JSON key.
84
84
  def self.attribute_map
85
85
  {
86
- :'ca_cert' => :'ca_cert',
87
- :'url' => :'url',
88
86
  :'tls_validation' => :'tls_validation',
89
- :'sock_read_timeout' => :'sock_read_timeout',
90
- :'max_retries' => :'max_retries',
91
- :'name' => :'name',
92
- :'headers' => :'headers',
93
- :'username' => :'username',
94
- :'proxy_password' => :'proxy_password',
95
- :'rate_limit' => :'rate_limit',
96
87
  :'password' => :'password',
97
- :'client_cert' => :'client_cert',
88
+ :'proxy_url' => :'proxy_url',
98
89
  :'sock_connect_timeout' => :'sock_connect_timeout',
90
+ :'username' => :'username',
91
+ :'pulp_labels' => :'pulp_labels',
92
+ :'headers' => :'headers',
93
+ :'sock_read_timeout' => :'sock_read_timeout',
94
+ :'proxy_username' => :'proxy_username',
99
95
  :'client_key' => :'client_key',
96
+ :'client_cert' => :'client_cert',
97
+ :'max_retries' => :'max_retries',
98
+ :'proxy_password' => :'proxy_password',
99
+ :'url' => :'url',
100
+ :'download_concurrency' => :'download_concurrency',
101
+ :'ca_cert' => :'ca_cert',
100
102
  :'connect_timeout' => :'connect_timeout',
103
+ :'rate_limit' => :'rate_limit',
101
104
  :'total_timeout' => :'total_timeout',
102
- :'proxy_username' => :'proxy_username',
103
- :'pulp_labels' => :'pulp_labels',
104
- :'proxy_url' => :'proxy_url',
105
- :'download_concurrency' => :'download_concurrency',
105
+ :'name' => :'name',
106
106
  :'metadata_only' => :'metadata_only',
107
107
  :'git_ref' => :'git_ref'
108
108
  }
@@ -111,26 +111,26 @@ module PulpAnsibleClient
111
111
  # Attribute type mapping.
112
112
  def self.openapi_types
113
113
  {
114
- :'ca_cert' => :'String',
115
- :'url' => :'String',
116
114
  :'tls_validation' => :'Boolean',
117
- :'sock_read_timeout' => :'Float',
118
- :'max_retries' => :'Integer',
119
- :'name' => :'String',
120
- :'headers' => :'Array<Object>',
121
- :'username' => :'String',
122
- :'proxy_password' => :'String',
123
- :'rate_limit' => :'Integer',
124
115
  :'password' => :'String',
125
- :'client_cert' => :'String',
116
+ :'proxy_url' => :'String',
126
117
  :'sock_connect_timeout' => :'Float',
118
+ :'username' => :'String',
119
+ :'pulp_labels' => :'Hash<String, String>',
120
+ :'headers' => :'Array<Object>',
121
+ :'sock_read_timeout' => :'Float',
122
+ :'proxy_username' => :'String',
127
123
  :'client_key' => :'String',
124
+ :'client_cert' => :'String',
125
+ :'max_retries' => :'Integer',
126
+ :'proxy_password' => :'String',
127
+ :'url' => :'String',
128
+ :'download_concurrency' => :'Integer',
129
+ :'ca_cert' => :'String',
128
130
  :'connect_timeout' => :'Float',
131
+ :'rate_limit' => :'Integer',
129
132
  :'total_timeout' => :'Float',
130
- :'proxy_username' => :'String',
131
- :'pulp_labels' => :'Hash<String, String>',
132
- :'proxy_url' => :'String',
133
- :'download_concurrency' => :'Integer',
133
+ :'name' => :'String',
134
134
  :'metadata_only' => :'Boolean',
135
135
  :'git_ref' => :'String'
136
136
  }
@@ -139,21 +139,21 @@ module PulpAnsibleClient
139
139
  # List of attributes with nullable: true
140
140
  def self.openapi_nullable
141
141
  Set.new([
142
- :'ca_cert',
143
- :'sock_read_timeout',
144
- :'max_retries',
145
- :'username',
146
- :'proxy_password',
147
- :'rate_limit',
148
142
  :'password',
149
- :'client_cert',
143
+ :'proxy_url',
150
144
  :'sock_connect_timeout',
145
+ :'username',
146
+ :'sock_read_timeout',
147
+ :'proxy_username',
151
148
  :'client_key',
149
+ :'client_cert',
150
+ :'max_retries',
151
+ :'proxy_password',
152
+ :'download_concurrency',
153
+ :'ca_cert',
152
154
  :'connect_timeout',
155
+ :'rate_limit',
153
156
  :'total_timeout',
154
- :'proxy_username',
155
- :'proxy_url',
156
- :'download_concurrency',
157
157
  ])
158
158
  end
159
159
 
@@ -172,28 +172,30 @@ module PulpAnsibleClient
172
172
  h[k.to_sym] = v
173
173
  }
174
174
 
175
- if attributes.key?(:'ca_cert')
176
- self.ca_cert = attributes[:'ca_cert']
175
+ if attributes.key?(:'tls_validation')
176
+ self.tls_validation = attributes[:'tls_validation']
177
177
  end
178
178
 
179
- if attributes.key?(:'url')
180
- self.url = attributes[:'url']
179
+ if attributes.key?(:'password')
180
+ self.password = attributes[:'password']
181
181
  end
182
182
 
183
- if attributes.key?(:'tls_validation')
184
- self.tls_validation = attributes[:'tls_validation']
183
+ if attributes.key?(:'proxy_url')
184
+ self.proxy_url = attributes[:'proxy_url']
185
185
  end
186
186
 
187
- if attributes.key?(:'sock_read_timeout')
188
- self.sock_read_timeout = attributes[:'sock_read_timeout']
187
+ if attributes.key?(:'sock_connect_timeout')
188
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
189
189
  end
190
190
 
191
- if attributes.key?(:'max_retries')
192
- self.max_retries = attributes[:'max_retries']
191
+ if attributes.key?(:'username')
192
+ self.username = attributes[:'username']
193
193
  end
194
194
 
195
- if attributes.key?(:'name')
196
- self.name = attributes[:'name']
195
+ if attributes.key?(:'pulp_labels')
196
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
197
+ self.pulp_labels = value
198
+ end
197
199
  end
198
200
 
199
201
  if attributes.key?(:'headers')
@@ -202,58 +204,56 @@ module PulpAnsibleClient
202
204
  end
203
205
  end
204
206
 
205
- if attributes.key?(:'username')
206
- self.username = attributes[:'username']
207
- end
208
-
209
- if attributes.key?(:'proxy_password')
210
- self.proxy_password = attributes[:'proxy_password']
207
+ if attributes.key?(:'sock_read_timeout')
208
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
211
209
  end
212
210
 
213
- if attributes.key?(:'rate_limit')
214
- self.rate_limit = attributes[:'rate_limit']
211
+ if attributes.key?(:'proxy_username')
212
+ self.proxy_username = attributes[:'proxy_username']
215
213
  end
216
214
 
217
- if attributes.key?(:'password')
218
- self.password = attributes[:'password']
215
+ if attributes.key?(:'client_key')
216
+ self.client_key = attributes[:'client_key']
219
217
  end
220
218
 
221
219
  if attributes.key?(:'client_cert')
222
220
  self.client_cert = attributes[:'client_cert']
223
221
  end
224
222
 
225
- if attributes.key?(:'sock_connect_timeout')
226
- self.sock_connect_timeout = attributes[:'sock_connect_timeout']
223
+ if attributes.key?(:'max_retries')
224
+ self.max_retries = attributes[:'max_retries']
227
225
  end
228
226
 
229
- if attributes.key?(:'client_key')
230
- self.client_key = attributes[:'client_key']
227
+ if attributes.key?(:'proxy_password')
228
+ self.proxy_password = attributes[:'proxy_password']
231
229
  end
232
230
 
233
- if attributes.key?(:'connect_timeout')
234
- self.connect_timeout = attributes[:'connect_timeout']
231
+ if attributes.key?(:'url')
232
+ self.url = attributes[:'url']
235
233
  end
236
234
 
237
- if attributes.key?(:'total_timeout')
238
- self.total_timeout = attributes[:'total_timeout']
235
+ if attributes.key?(:'download_concurrency')
236
+ self.download_concurrency = attributes[:'download_concurrency']
239
237
  end
240
238
 
241
- if attributes.key?(:'proxy_username')
242
- self.proxy_username = attributes[:'proxy_username']
239
+ if attributes.key?(:'ca_cert')
240
+ self.ca_cert = attributes[:'ca_cert']
243
241
  end
244
242
 
245
- if attributes.key?(:'pulp_labels')
246
- if (value = attributes[:'pulp_labels']).is_a?(Hash)
247
- self.pulp_labels = value
248
- end
243
+ if attributes.key?(:'connect_timeout')
244
+ self.connect_timeout = attributes[:'connect_timeout']
249
245
  end
250
246
 
251
- if attributes.key?(:'proxy_url')
252
- self.proxy_url = attributes[:'proxy_url']
247
+ if attributes.key?(:'rate_limit')
248
+ self.rate_limit = attributes[:'rate_limit']
253
249
  end
254
250
 
255
- if attributes.key?(:'download_concurrency')
256
- self.download_concurrency = attributes[:'download_concurrency']
251
+ if attributes.key?(:'total_timeout')
252
+ self.total_timeout = attributes[:'total_timeout']
253
+ end
254
+
255
+ if attributes.key?(:'name')
256
+ self.name = attributes[:'name']
257
257
  end
258
258
 
259
259
  if attributes.key?(:'metadata_only')
@@ -269,52 +269,56 @@ module PulpAnsibleClient
269
269
  # @return Array for valid properties with the reasons
270
270
  def list_invalid_properties
271
271
  invalid_properties = Array.new
272
- if !@ca_cert.nil? && @ca_cert.to_s.length < 1
273
- invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
272
+ if !@password.nil? && @password.to_s.length < 1
273
+ invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
274
274
  end
275
275
 
276
- if @url.nil?
277
- invalid_properties.push('invalid value for "url", url cannot be nil.')
276
+ if !@proxy_url.nil? && @proxy_url.to_s.length < 1
277
+ invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
278
278
  end
279
279
 
280
- if @url.to_s.length < 1
281
- invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
280
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
281
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
282
+ end
283
+
284
+ if !@username.nil? && @username.to_s.length < 1
285
+ invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
282
286
  end
283
287
 
284
288
  if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
285
289
  invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
286
290
  end
287
291
 
288
- if @name.nil?
289
- invalid_properties.push('invalid value for "name", name cannot be nil.')
292
+ if !@proxy_username.nil? && @proxy_username.to_s.length < 1
293
+ invalid_properties.push('invalid value for "proxy_username", the character length must be great than or equal to 1.')
290
294
  end
291
295
 
292
- if @name.to_s.length < 1
293
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
296
+ if !@client_key.nil? && @client_key.to_s.length < 1
297
+ invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
294
298
  end
295
299
 
296
- if !@username.nil? && @username.to_s.length < 1
297
- invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
300
+ if !@client_cert.nil? && @client_cert.to_s.length < 1
301
+ invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
298
302
  end
299
303
 
300
304
  if !@proxy_password.nil? && @proxy_password.to_s.length < 1
301
305
  invalid_properties.push('invalid value for "proxy_password", the character length must be great than or equal to 1.')
302
306
  end
303
307
 
304
- if !@password.nil? && @password.to_s.length < 1
305
- invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
308
+ if @url.nil?
309
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
306
310
  end
307
311
 
308
- if !@client_cert.nil? && @client_cert.to_s.length < 1
309
- invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
312
+ if @url.to_s.length < 1
313
+ invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
310
314
  end
311
315
 
312
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
313
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
316
+ if !@download_concurrency.nil? && @download_concurrency < 1
317
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
314
318
  end
315
319
 
316
- if !@client_key.nil? && @client_key.to_s.length < 1
317
- invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
320
+ if !@ca_cert.nil? && @ca_cert.to_s.length < 1
321
+ invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
318
322
  end
319
323
 
320
324
  if !@connect_timeout.nil? && @connect_timeout < 0.0
@@ -325,16 +329,12 @@ module PulpAnsibleClient
325
329
  invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
326
330
  end
327
331
 
328
- if !@proxy_username.nil? && @proxy_username.to_s.length < 1
329
- invalid_properties.push('invalid value for "proxy_username", the character length must be great than or equal to 1.')
330
- end
331
-
332
- if !@proxy_url.nil? && @proxy_url.to_s.length < 1
333
- invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
332
+ if @name.nil?
333
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
334
334
  end
335
335
 
336
- if !@download_concurrency.nil? && @download_concurrency < 1
337
- invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
336
+ if @name.to_s.length < 1
337
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
338
338
  end
339
339
 
340
340
  if !@git_ref.nil? && @git_ref.to_s.length < 1
@@ -347,49 +347,65 @@ module PulpAnsibleClient
347
347
  # Check to see if the all the properties in the model are valid
348
348
  # @return true if the model is valid
349
349
  def valid?
350
- return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
351
- return false if @url.nil?
352
- return false if @url.to_s.length < 1
353
- return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
354
- return false if @name.nil?
355
- return false if @name.to_s.length < 1
356
- return false if !@username.nil? && @username.to_s.length < 1
357
- return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
358
350
  return false if !@password.nil? && @password.to_s.length < 1
359
- return false if !@client_cert.nil? && @client_cert.to_s.length < 1
351
+ return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
360
352
  return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
353
+ return false if !@username.nil? && @username.to_s.length < 1
354
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
355
+ return false if !@proxy_username.nil? && @proxy_username.to_s.length < 1
361
356
  return false if !@client_key.nil? && @client_key.to_s.length < 1
357
+ return false if !@client_cert.nil? && @client_cert.to_s.length < 1
358
+ return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
359
+ return false if @url.nil?
360
+ return false if @url.to_s.length < 1
361
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
362
+ return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
362
363
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
363
364
  return false if !@total_timeout.nil? && @total_timeout < 0.0
364
- return false if !@proxy_username.nil? && @proxy_username.to_s.length < 1
365
- return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
366
- return false if !@download_concurrency.nil? && @download_concurrency < 1
365
+ return false if @name.nil?
366
+ return false if @name.to_s.length < 1
367
367
  return false if !@git_ref.nil? && @git_ref.to_s.length < 1
368
368
  true
369
369
  end
370
370
 
371
371
  # Custom attribute writer method with validation
372
- # @param [Object] ca_cert Value to be assigned
373
- def ca_cert=(ca_cert)
374
- if !ca_cert.nil? && ca_cert.to_s.length < 1
375
- fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
372
+ # @param [Object] password Value to be assigned
373
+ def password=(password)
374
+ if !password.nil? && password.to_s.length < 1
375
+ fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
376
376
  end
377
377
 
378
- @ca_cert = ca_cert
378
+ @password = password
379
379
  end
380
380
 
381
381
  # Custom attribute writer method with validation
382
- # @param [Object] url Value to be assigned
383
- def url=(url)
384
- if url.nil?
385
- fail ArgumentError, 'url cannot be nil'
382
+ # @param [Object] proxy_url Value to be assigned
383
+ def proxy_url=(proxy_url)
384
+ if !proxy_url.nil? && proxy_url.to_s.length < 1
385
+ fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
386
386
  end
387
387
 
388
- if url.to_s.length < 1
389
- fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
388
+ @proxy_url = proxy_url
389
+ end
390
+
391
+ # Custom attribute writer method with validation
392
+ # @param [Object] sock_connect_timeout Value to be assigned
393
+ def sock_connect_timeout=(sock_connect_timeout)
394
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
395
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
390
396
  end
391
397
 
392
- @url = url
398
+ @sock_connect_timeout = sock_connect_timeout
399
+ end
400
+
401
+ # Custom attribute writer method with validation
402
+ # @param [Object] username Value to be assigned
403
+ def username=(username)
404
+ if !username.nil? && username.to_s.length < 1
405
+ fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
406
+ end
407
+
408
+ @username = username
393
409
  end
394
410
 
395
411
  # Custom attribute writer method with validation
@@ -403,27 +419,33 @@ module PulpAnsibleClient
403
419
  end
404
420
 
405
421
  # Custom attribute writer method with validation
406
- # @param [Object] name Value to be assigned
407
- def name=(name)
408
- if name.nil?
409
- fail ArgumentError, 'name cannot be nil'
422
+ # @param [Object] proxy_username Value to be assigned
423
+ def proxy_username=(proxy_username)
424
+ if !proxy_username.nil? && proxy_username.to_s.length < 1
425
+ fail ArgumentError, 'invalid value for "proxy_username", the character length must be great than or equal to 1.'
410
426
  end
411
427
 
412
- if name.to_s.length < 1
413
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
428
+ @proxy_username = proxy_username
429
+ end
430
+
431
+ # Custom attribute writer method with validation
432
+ # @param [Object] client_key Value to be assigned
433
+ def client_key=(client_key)
434
+ if !client_key.nil? && client_key.to_s.length < 1
435
+ fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
414
436
  end
415
437
 
416
- @name = name
438
+ @client_key = client_key
417
439
  end
418
440
 
419
441
  # Custom attribute writer method with validation
420
- # @param [Object] username Value to be assigned
421
- def username=(username)
422
- if !username.nil? && username.to_s.length < 1
423
- fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
442
+ # @param [Object] client_cert Value to be assigned
443
+ def client_cert=(client_cert)
444
+ if !client_cert.nil? && client_cert.to_s.length < 1
445
+ fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
424
446
  end
425
447
 
426
- @username = username
448
+ @client_cert = client_cert
427
449
  end
428
450
 
429
451
  # Custom attribute writer method with validation
@@ -437,43 +459,37 @@ module PulpAnsibleClient
437
459
  end
438
460
 
439
461
  # Custom attribute writer method with validation
440
- # @param [Object] password Value to be assigned
441
- def password=(password)
442
- if !password.nil? && password.to_s.length < 1
443
- fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
462
+ # @param [Object] url Value to be assigned
463
+ def url=(url)
464
+ if url.nil?
465
+ fail ArgumentError, 'url cannot be nil'
444
466
  end
445
467
 
446
- @password = password
447
- end
448
-
449
- # Custom attribute writer method with validation
450
- # @param [Object] client_cert Value to be assigned
451
- def client_cert=(client_cert)
452
- if !client_cert.nil? && client_cert.to_s.length < 1
453
- fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
468
+ if url.to_s.length < 1
469
+ fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
454
470
  end
455
471
 
456
- @client_cert = client_cert
472
+ @url = url
457
473
  end
458
474
 
459
475
  # Custom attribute writer method with validation
460
- # @param [Object] sock_connect_timeout Value to be assigned
461
- def sock_connect_timeout=(sock_connect_timeout)
462
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
463
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
476
+ # @param [Object] download_concurrency Value to be assigned
477
+ def download_concurrency=(download_concurrency)
478
+ if !download_concurrency.nil? && download_concurrency < 1
479
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
464
480
  end
465
481
 
466
- @sock_connect_timeout = sock_connect_timeout
482
+ @download_concurrency = download_concurrency
467
483
  end
468
484
 
469
485
  # Custom attribute writer method with validation
470
- # @param [Object] client_key Value to be assigned
471
- def client_key=(client_key)
472
- if !client_key.nil? && client_key.to_s.length < 1
473
- fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
486
+ # @param [Object] ca_cert Value to be assigned
487
+ def ca_cert=(ca_cert)
488
+ if !ca_cert.nil? && ca_cert.to_s.length < 1
489
+ fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
474
490
  end
475
491
 
476
- @client_key = client_key
492
+ @ca_cert = ca_cert
477
493
  end
478
494
 
479
495
  # Custom attribute writer method with validation
@@ -497,33 +513,17 @@ module PulpAnsibleClient
497
513
  end
498
514
 
499
515
  # Custom attribute writer method with validation
500
- # @param [Object] proxy_username Value to be assigned
501
- def proxy_username=(proxy_username)
502
- if !proxy_username.nil? && proxy_username.to_s.length < 1
503
- fail ArgumentError, 'invalid value for "proxy_username", the character length must be great than or equal to 1.'
504
- end
505
-
506
- @proxy_username = proxy_username
507
- end
508
-
509
- # Custom attribute writer method with validation
510
- # @param [Object] proxy_url Value to be assigned
511
- def proxy_url=(proxy_url)
512
- if !proxy_url.nil? && proxy_url.to_s.length < 1
513
- fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
516
+ # @param [Object] name Value to be assigned
517
+ def name=(name)
518
+ if name.nil?
519
+ fail ArgumentError, 'name cannot be nil'
514
520
  end
515
521
 
516
- @proxy_url = proxy_url
517
- end
518
-
519
- # Custom attribute writer method with validation
520
- # @param [Object] download_concurrency Value to be assigned
521
- def download_concurrency=(download_concurrency)
522
- if !download_concurrency.nil? && download_concurrency < 1
523
- fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
522
+ if name.to_s.length < 1
523
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
524
524
  end
525
525
 
526
- @download_concurrency = download_concurrency
526
+ @name = name
527
527
  end
528
528
 
529
529
  # Custom attribute writer method with validation
@@ -541,26 +541,26 @@ module PulpAnsibleClient
541
541
  def ==(o)
542
542
  return true if self.equal?(o)
543
543
  self.class == o.class &&
544
- ca_cert == o.ca_cert &&
545
- url == o.url &&
546
544
  tls_validation == o.tls_validation &&
547
- sock_read_timeout == o.sock_read_timeout &&
548
- max_retries == o.max_retries &&
549
- name == o.name &&
550
- headers == o.headers &&
551
- username == o.username &&
552
- proxy_password == o.proxy_password &&
553
- rate_limit == o.rate_limit &&
554
545
  password == o.password &&
555
- client_cert == o.client_cert &&
546
+ proxy_url == o.proxy_url &&
556
547
  sock_connect_timeout == o.sock_connect_timeout &&
548
+ username == o.username &&
549
+ pulp_labels == o.pulp_labels &&
550
+ headers == o.headers &&
551
+ sock_read_timeout == o.sock_read_timeout &&
552
+ proxy_username == o.proxy_username &&
557
553
  client_key == o.client_key &&
554
+ client_cert == o.client_cert &&
555
+ max_retries == o.max_retries &&
556
+ proxy_password == o.proxy_password &&
557
+ url == o.url &&
558
+ download_concurrency == o.download_concurrency &&
559
+ ca_cert == o.ca_cert &&
558
560
  connect_timeout == o.connect_timeout &&
561
+ rate_limit == o.rate_limit &&
559
562
  total_timeout == o.total_timeout &&
560
- proxy_username == o.proxy_username &&
561
- pulp_labels == o.pulp_labels &&
562
- proxy_url == o.proxy_url &&
563
- download_concurrency == o.download_concurrency &&
563
+ name == o.name &&
564
564
  metadata_only == o.metadata_only &&
565
565
  git_ref == o.git_ref
566
566
  end
@@ -574,7 +574,7 @@ module PulpAnsibleClient
574
574
  # Calculates hash code according to all attributes.
575
575
  # @return [Integer] Hash code
576
576
  def hash
577
- [ca_cert, url, tls_validation, sock_read_timeout, max_retries, name, headers, username, proxy_password, rate_limit, password, client_cert, sock_connect_timeout, client_key, connect_timeout, total_timeout, proxy_username, pulp_labels, proxy_url, download_concurrency, metadata_only, git_ref].hash
577
+ [tls_validation, password, proxy_url, sock_connect_timeout, username, pulp_labels, headers, sock_read_timeout, proxy_username, client_key, client_cert, max_retries, proxy_password, url, download_concurrency, ca_cert, connect_timeout, rate_limit, total_timeout, name, metadata_only, git_ref].hash
578
578
  end
579
579
 
580
580
  # Builds the object from hash