pulp_ansible_client 0.20.2 → 0.20.3

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