pulp_ansible_client 0.14.1 → 0.14.2

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