pulp_ansible_client 0.10.5 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -4
  3. data/docs/AnsibleCollectionRemote.md +1 -1
  4. data/docs/AnsibleCollectionRemoteResponse.md +3 -1
  5. data/docs/AnsibleCollectionVersionResponse.md +4 -4
  6. data/docs/AnsibleGitRemote.md +59 -0
  7. data/docs/AnsibleGitRemoteResponse.md +55 -0
  8. data/docs/AnsibleRoleRemote.md +1 -1
  9. data/docs/AnsibleRoleRemoteResponse.md +1 -1
  10. data/docs/AnsibleRoleResponse.md +4 -4
  11. data/docs/CollectionVersionResponse.md +4 -0
  12. data/docs/PaginatedansibleGitRemoteResponseList.md +23 -0
  13. data/docs/PatchedansibleCollectionRemote.md +1 -1
  14. data/docs/PatchedansibleGitRemote.md +59 -0
  15. data/docs/PatchedansibleRoleRemote.md +1 -1
  16. data/docs/RemotesGitApi.md +376 -0
  17. data/docs/UnpaginatedCollectionVersionResponse.md +5 -1
  18. data/git_push.sh +58 -0
  19. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +16 -0
  20. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +12 -0
  21. data/lib/pulp_ansible_client/api/pulp_ansible_artifacts_collections_v3_api.rb +16 -0
  22. data/lib/pulp_ansible_client/api/remotes_git_api.rb +463 -0
  23. data/lib/pulp_ansible_client/api_client.rb +5 -2
  24. data/lib/pulp_ansible_client/configuration.rb +0 -1
  25. data/lib/pulp_ansible_client/models/ansible_ansible_distribution.rb +38 -0
  26. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +34 -0
  27. data/lib/pulp_ansible_client/models/ansible_collection.rb +38 -0
  28. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +192 -1
  29. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +28 -2
  30. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +27 -0
  31. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +14 -19
  32. data/lib/pulp_ansible_client/models/ansible_git_remote.rb +692 -0
  33. data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +493 -0
  34. data/lib/pulp_ansible_client/models/ansible_role.rb +57 -0
  35. data/lib/pulp_ansible_client/models/ansible_role_remote.rb +159 -1
  36. data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +1 -1
  37. data/lib/pulp_ansible_client/models/ansible_role_response.rb +14 -14
  38. data/lib/pulp_ansible_client/models/collection_one_shot.rb +60 -0
  39. data/lib/pulp_ansible_client/models/collection_version_response.rb +19 -1
  40. data/lib/pulp_ansible_client/models/galaxy_collection.rb +38 -0
  41. data/lib/pulp_ansible_client/models/paginatedansible_git_remote_response_list.rb +237 -0
  42. data/lib/pulp_ansible_client/models/patchedansible_ansible_distribution.rb +30 -0
  43. data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +30 -0
  44. data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +184 -1
  45. data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +674 -0
  46. data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +151 -1
  47. data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +22 -4
  48. data/lib/pulp_ansible_client/version.rb +1 -1
  49. data/lib/pulp_ansible_client.rb +5 -0
  50. data/pulp_ansible_client.gemspec +3 -3
  51. data/spec/api/remotes_git_api_spec.rb +127 -0
  52. data/spec/models/ansible_collection_remote_response_spec.rb +6 -0
  53. data/spec/models/ansible_collection_version_response_spec.rb +2 -2
  54. data/spec/models/ansible_git_remote_response_spec.rb +155 -0
  55. data/spec/models/ansible_git_remote_spec.rb +167 -0
  56. data/spec/models/ansible_role_response_spec.rb +2 -2
  57. data/spec/models/collection_version_response_spec.rb +12 -0
  58. data/spec/models/paginatedansible_git_remote_response_list_spec.rb +59 -0
  59. data/spec/models/patchedansible_git_remote_spec.rb +167 -0
  60. data/spec/models/unpaginated_collection_version_response_spec.rb +12 -0
  61. metadata +94 -79
@@ -74,7 +74,7 @@ module PulpAnsibleClient
74
74
  # Headers for aiohttp.Clientsession
75
75
  attr_accessor :headers
76
76
 
77
- # Limits total download rate in requests per second
77
+ # Limits requests per second for each concurrent downloader
78
78
  attr_accessor :rate_limit
79
79
 
80
80
  # The string version of Collection requirements yaml.
@@ -304,10 +304,50 @@ module PulpAnsibleClient
304
304
  invalid_properties.push('invalid value for "name", name cannot be nil.')
305
305
  end
306
306
 
307
+ if @name.to_s.length < 1
308
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
309
+ end
310
+
307
311
  if @url.nil?
308
312
  invalid_properties.push('invalid value for "url", url cannot be nil.')
309
313
  end
310
314
 
315
+ if @url.to_s.length < 1
316
+ invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
317
+ end
318
+
319
+ if !@ca_cert.nil? && @ca_cert.to_s.length < 1
320
+ invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
321
+ end
322
+
323
+ if !@client_cert.nil? && @client_cert.to_s.length < 1
324
+ invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
325
+ end
326
+
327
+ if !@client_key.nil? && @client_key.to_s.length < 1
328
+ invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
329
+ end
330
+
331
+ if !@proxy_url.nil? && @proxy_url.to_s.length < 1
332
+ invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
333
+ end
334
+
335
+ if !@proxy_username.nil? && @proxy_username.to_s.length < 1
336
+ invalid_properties.push('invalid value for "proxy_username", the character length must be great than or equal to 1.')
337
+ end
338
+
339
+ if !@proxy_password.nil? && @proxy_password.to_s.length < 1
340
+ invalid_properties.push('invalid value for "proxy_password", the character length must be great than or equal to 1.')
341
+ end
342
+
343
+ if !@username.nil? && @username.to_s.length < 1
344
+ invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
345
+ end
346
+
347
+ if !@password.nil? && @password.to_s.length < 1
348
+ invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
349
+ end
350
+
311
351
  if !@download_concurrency.nil? && @download_concurrency < 1
312
352
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
313
353
  end
@@ -328,14 +368,26 @@ module PulpAnsibleClient
328
368
  invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
329
369
  end
330
370
 
371
+ if !@requirements_file.nil? && @requirements_file.to_s.length < 1
372
+ invalid_properties.push('invalid value for "requirements_file", the character length must be great than or equal to 1.')
373
+ end
374
+
331
375
  if !@auth_url.nil? && @auth_url.to_s.length > 255
332
376
  invalid_properties.push('invalid value for "auth_url", the character length must be smaller than or equal to 255.')
333
377
  end
334
378
 
379
+ if !@auth_url.nil? && @auth_url.to_s.length < 1
380
+ invalid_properties.push('invalid value for "auth_url", the character length must be great than or equal to 1.')
381
+ end
382
+
335
383
  if !@token.nil? && @token.to_s.length > 2000
336
384
  invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 2000.')
337
385
  end
338
386
 
387
+ if !@token.nil? && @token.to_s.length < 1
388
+ invalid_properties.push('invalid value for "token", the character length must be great than or equal to 1.')
389
+ end
390
+
339
391
  invalid_properties
340
392
  end
341
393
 
@@ -343,17 +395,138 @@ module PulpAnsibleClient
343
395
  # @return true if the model is valid
344
396
  def valid?
345
397
  return false if @name.nil?
398
+ return false if @name.to_s.length < 1
346
399
  return false if @url.nil?
400
+ return false if @url.to_s.length < 1
401
+ return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
402
+ return false if !@client_cert.nil? && @client_cert.to_s.length < 1
403
+ return false if !@client_key.nil? && @client_key.to_s.length < 1
404
+ return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
405
+ return false if !@proxy_username.nil? && @proxy_username.to_s.length < 1
406
+ return false if !@proxy_password.nil? && @proxy_password.to_s.length < 1
407
+ return false if !@username.nil? && @username.to_s.length < 1
408
+ return false if !@password.nil? && @password.to_s.length < 1
347
409
  return false if !@download_concurrency.nil? && @download_concurrency < 1
348
410
  return false if !@total_timeout.nil? && @total_timeout < 0.0
349
411
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
350
412
  return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
351
413
  return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
414
+ return false if !@requirements_file.nil? && @requirements_file.to_s.length < 1
352
415
  return false if !@auth_url.nil? && @auth_url.to_s.length > 255
416
+ return false if !@auth_url.nil? && @auth_url.to_s.length < 1
353
417
  return false if !@token.nil? && @token.to_s.length > 2000
418
+ return false if !@token.nil? && @token.to_s.length < 1
354
419
  true
355
420
  end
356
421
 
422
+ # Custom attribute writer method with validation
423
+ # @param [Object] name Value to be assigned
424
+ def name=(name)
425
+ if name.nil?
426
+ fail ArgumentError, 'name cannot be nil'
427
+ end
428
+
429
+ if name.to_s.length < 1
430
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
431
+ end
432
+
433
+ @name = name
434
+ end
435
+
436
+ # Custom attribute writer method with validation
437
+ # @param [Object] url Value to be assigned
438
+ def url=(url)
439
+ if url.nil?
440
+ fail ArgumentError, 'url cannot be nil'
441
+ end
442
+
443
+ if url.to_s.length < 1
444
+ fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
445
+ end
446
+
447
+ @url = url
448
+ end
449
+
450
+ # Custom attribute writer method with validation
451
+ # @param [Object] ca_cert Value to be assigned
452
+ def ca_cert=(ca_cert)
453
+ if !ca_cert.nil? && ca_cert.to_s.length < 1
454
+ fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
455
+ end
456
+
457
+ @ca_cert = ca_cert
458
+ end
459
+
460
+ # Custom attribute writer method with validation
461
+ # @param [Object] client_cert Value to be assigned
462
+ def client_cert=(client_cert)
463
+ if !client_cert.nil? && client_cert.to_s.length < 1
464
+ fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
465
+ end
466
+
467
+ @client_cert = client_cert
468
+ end
469
+
470
+ # Custom attribute writer method with validation
471
+ # @param [Object] client_key Value to be assigned
472
+ def client_key=(client_key)
473
+ if !client_key.nil? && client_key.to_s.length < 1
474
+ fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
475
+ end
476
+
477
+ @client_key = client_key
478
+ end
479
+
480
+ # Custom attribute writer method with validation
481
+ # @param [Object] proxy_url Value to be assigned
482
+ def proxy_url=(proxy_url)
483
+ if !proxy_url.nil? && proxy_url.to_s.length < 1
484
+ fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
485
+ end
486
+
487
+ @proxy_url = proxy_url
488
+ end
489
+
490
+ # Custom attribute writer method with validation
491
+ # @param [Object] proxy_username Value to be assigned
492
+ def proxy_username=(proxy_username)
493
+ if !proxy_username.nil? && proxy_username.to_s.length < 1
494
+ fail ArgumentError, 'invalid value for "proxy_username", the character length must be great than or equal to 1.'
495
+ end
496
+
497
+ @proxy_username = proxy_username
498
+ end
499
+
500
+ # Custom attribute writer method with validation
501
+ # @param [Object] proxy_password Value to be assigned
502
+ def proxy_password=(proxy_password)
503
+ if !proxy_password.nil? && proxy_password.to_s.length < 1
504
+ fail ArgumentError, 'invalid value for "proxy_password", the character length must be great than or equal to 1.'
505
+ end
506
+
507
+ @proxy_password = proxy_password
508
+ end
509
+
510
+ # Custom attribute writer method with validation
511
+ # @param [Object] username Value to be assigned
512
+ def username=(username)
513
+ if !username.nil? && username.to_s.length < 1
514
+ fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
515
+ end
516
+
517
+ @username = username
518
+ end
519
+
520
+ # Custom attribute writer method with validation
521
+ # @param [Object] password Value to be assigned
522
+ def password=(password)
523
+ if !password.nil? && password.to_s.length < 1
524
+ fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
525
+ end
526
+
527
+ @password = password
528
+ end
529
+
357
530
  # Custom attribute writer method with validation
358
531
  # @param [Object] download_concurrency Value to be assigned
359
532
  def download_concurrency=(download_concurrency)
@@ -404,6 +577,16 @@ module PulpAnsibleClient
404
577
  @sock_read_timeout = sock_read_timeout
405
578
  end
406
579
 
580
+ # Custom attribute writer method with validation
581
+ # @param [Object] requirements_file Value to be assigned
582
+ def requirements_file=(requirements_file)
583
+ if !requirements_file.nil? && requirements_file.to_s.length < 1
584
+ fail ArgumentError, 'invalid value for "requirements_file", the character length must be great than or equal to 1.'
585
+ end
586
+
587
+ @requirements_file = requirements_file
588
+ end
589
+
407
590
  # Custom attribute writer method with validation
408
591
  # @param [Object] auth_url Value to be assigned
409
592
  def auth_url=(auth_url)
@@ -411,6 +594,10 @@ module PulpAnsibleClient
411
594
  fail ArgumentError, 'invalid value for "auth_url", the character length must be smaller than or equal to 255.'
412
595
  end
413
596
 
597
+ if !auth_url.nil? && auth_url.to_s.length < 1
598
+ fail ArgumentError, 'invalid value for "auth_url", the character length must be great than or equal to 1.'
599
+ end
600
+
414
601
  @auth_url = auth_url
415
602
  end
416
603
 
@@ -421,6 +608,10 @@ module PulpAnsibleClient
421
608
  fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 2000.'
422
609
  end
423
610
 
611
+ if !token.nil? && token.to_s.length < 1
612
+ fail ArgumentError, 'invalid value for "token", the character length must be great than or equal to 1.'
613
+ end
614
+
424
615
  @token = token
425
616
  end
426
617
 
@@ -67,7 +67,7 @@ module PulpAnsibleClient
67
67
  # Headers for aiohttp.Clientsession
68
68
  attr_accessor :headers
69
69
 
70
- # Limits total download rate in requests per second
70
+ # Limits requests per second for each concurrent downloader
71
71
  attr_accessor :rate_limit
72
72
 
73
73
  # The string version of Collection requirements yaml.
@@ -76,6 +76,9 @@ module PulpAnsibleClient
76
76
  # The URL to receive a session token from, e.g. used with Automation Hub.
77
77
  attr_accessor :auth_url
78
78
 
79
+ # The token key to use for authentication. See https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#configuring-the-ansible-galaxy-clientfor more details
80
+ attr_accessor :token
81
+
79
82
  # Sync dependencies for collections specified via requirements file
80
83
  attr_accessor :sync_dependencies
81
84
 
@@ -103,6 +106,7 @@ module PulpAnsibleClient
103
106
  :'rate_limit' => :'rate_limit',
104
107
  :'requirements_file' => :'requirements_file',
105
108
  :'auth_url' => :'auth_url',
109
+ :'token' => :'token',
106
110
  :'sync_dependencies' => :'sync_dependencies'
107
111
  }
108
112
  end
@@ -131,6 +135,7 @@ module PulpAnsibleClient
131
135
  :'rate_limit' => :'Integer',
132
136
  :'requirements_file' => :'String',
133
137
  :'auth_url' => :'String',
138
+ :'token' => :'String',
134
139
  :'sync_dependencies' => :'Boolean'
135
140
  }
136
141
  end
@@ -150,6 +155,7 @@ module PulpAnsibleClient
150
155
  :'rate_limit',
151
156
  :'requirements_file',
152
157
  :'auth_url',
158
+ :'token',
153
159
  :'sync_dependencies'
154
160
  ])
155
161
  end
@@ -255,6 +261,10 @@ module PulpAnsibleClient
255
261
  self.auth_url = attributes[:'auth_url']
256
262
  end
257
263
 
264
+ if attributes.key?(:'token')
265
+ self.token = attributes[:'token']
266
+ end
267
+
258
268
  if attributes.key?(:'sync_dependencies')
259
269
  self.sync_dependencies = attributes[:'sync_dependencies']
260
270
  else
@@ -298,6 +308,10 @@ module PulpAnsibleClient
298
308
  invalid_properties.push('invalid value for "auth_url", the character length must be smaller than or equal to 255.')
299
309
  end
300
310
 
311
+ if !@token.nil? && @token.to_s.length > 2000
312
+ invalid_properties.push('invalid value for "token", the character length must be smaller than or equal to 2000.')
313
+ end
314
+
301
315
  invalid_properties
302
316
  end
303
317
 
@@ -312,6 +326,7 @@ module PulpAnsibleClient
312
326
  return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
313
327
  return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
314
328
  return false if !@auth_url.nil? && @auth_url.to_s.length > 255
329
+ return false if !@token.nil? && @token.to_s.length > 2000
315
330
  true
316
331
  end
317
332
 
@@ -375,6 +390,16 @@ module PulpAnsibleClient
375
390
  @auth_url = auth_url
376
391
  end
377
392
 
393
+ # Custom attribute writer method with validation
394
+ # @param [Object] token Value to be assigned
395
+ def token=(token)
396
+ if !token.nil? && token.to_s.length > 2000
397
+ fail ArgumentError, 'invalid value for "token", the character length must be smaller than or equal to 2000.'
398
+ end
399
+
400
+ @token = token
401
+ end
402
+
378
403
  # Checks equality by comparing each attribute.
379
404
  # @param [Object] Object to be compared
380
405
  def ==(o)
@@ -401,6 +426,7 @@ module PulpAnsibleClient
401
426
  rate_limit == o.rate_limit &&
402
427
  requirements_file == o.requirements_file &&
403
428
  auth_url == o.auth_url &&
429
+ token == o.token &&
404
430
  sync_dependencies == o.sync_dependencies
405
431
  end
406
432
 
@@ -413,7 +439,7 @@ module PulpAnsibleClient
413
439
  # Calculates hash code according to all attributes.
414
440
  # @return [Integer] Hash code
415
441
  def hash
416
- [pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, requirements_file, auth_url, sync_dependencies].hash
442
+ [pulp_href, pulp_created, name, url, ca_cert, client_cert, tls_validation, proxy_url, pulp_labels, pulp_last_updated, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, requirements_file, auth_url, token, sync_dependencies].hash
417
443
  end
418
444
 
419
445
  # Builds the object from hash
@@ -106,6 +106,10 @@ module PulpAnsibleClient
106
106
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 64.')
107
107
  end
108
108
 
109
+ if @name.to_s.length < 1
110
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
111
+ end
112
+
109
113
  if @namespace.nil?
110
114
  invalid_properties.push('invalid value for "namespace", namespace cannot be nil.')
111
115
  end
@@ -114,6 +118,10 @@ module PulpAnsibleClient
114
118
  invalid_properties.push('invalid value for "namespace", the character length must be smaller than or equal to 64.')
115
119
  end
116
120
 
121
+ if @namespace.to_s.length < 1
122
+ invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
123
+ end
124
+
117
125
  if @version.nil?
118
126
  invalid_properties.push('invalid value for "version", version cannot be nil.')
119
127
  end
@@ -122,6 +130,10 @@ module PulpAnsibleClient
122
130
  invalid_properties.push('invalid value for "version", the character length must be smaller than or equal to 128.')
123
131
  end
124
132
 
133
+ if @version.to_s.length < 1
134
+ invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
135
+ end
136
+
125
137
  invalid_properties
126
138
  end
127
139
 
@@ -130,10 +142,13 @@ module PulpAnsibleClient
130
142
  def valid?
131
143
  return false if @name.nil?
132
144
  return false if @name.to_s.length > 64
145
+ return false if @name.to_s.length < 1
133
146
  return false if @namespace.nil?
134
147
  return false if @namespace.to_s.length > 64
148
+ return false if @namespace.to_s.length < 1
135
149
  return false if @version.nil?
136
150
  return false if @version.to_s.length > 128
151
+ return false if @version.to_s.length < 1
137
152
  true
138
153
  end
139
154
 
@@ -148,6 +163,10 @@ module PulpAnsibleClient
148
163
  fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 64.'
149
164
  end
150
165
 
166
+ if name.to_s.length < 1
167
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
168
+ end
169
+
151
170
  @name = name
152
171
  end
153
172
 
@@ -162,6 +181,10 @@ module PulpAnsibleClient
162
181
  fail ArgumentError, 'invalid value for "namespace", the character length must be smaller than or equal to 64.'
163
182
  end
164
183
 
184
+ if namespace.to_s.length < 1
185
+ fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
186
+ end
187
+
165
188
  @namespace = namespace
166
189
  end
167
190
 
@@ -176,6 +199,10 @@ module PulpAnsibleClient
176
199
  fail ArgumentError, 'invalid value for "version", the character length must be smaller than or equal to 128.'
177
200
  end
178
201
 
202
+ if version.to_s.length < 1
203
+ fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
204
+ end
205
+
179
206
  @version = version
180
207
  end
181
208
 
@@ -15,13 +15,13 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  # A serializer for CollectionVersion Content.
17
17
  class AnsibleCollectionVersionResponse
18
- # Timestamp of creation.
19
- attr_accessor :pulp_created
18
+ attr_accessor :pulp_href
20
19
 
21
20
  # Artifact file representing the physical content
22
21
  attr_accessor :artifact
23
22
 
24
- attr_accessor :pulp_href
23
+ # Timestamp of creation.
24
+ attr_accessor :pulp_created
25
25
 
26
26
  # The MD5 checksum if available.
27
27
  attr_accessor :md5
@@ -97,9 +97,9 @@ module PulpAnsibleClient
97
97
  # Attribute mapping from ruby-style variable name to JSON key.
98
98
  def self.attribute_map
99
99
  {
100
- :'pulp_created' => :'pulp_created',
101
- :'artifact' => :'artifact',
102
100
  :'pulp_href' => :'pulp_href',
101
+ :'artifact' => :'artifact',
102
+ :'pulp_created' => :'pulp_created',
103
103
  :'md5' => :'md5',
104
104
  :'sha1' => :'sha1',
105
105
  :'sha224' => :'sha224',
@@ -130,9 +130,9 @@ module PulpAnsibleClient
130
130
  # Attribute type mapping.
131
131
  def self.openapi_types
132
132
  {
133
- :'pulp_created' => :'DateTime',
134
- :'artifact' => :'String',
135
133
  :'pulp_href' => :'String',
134
+ :'artifact' => :'String',
135
+ :'pulp_created' => :'DateTime',
136
136
  :'md5' => :'String',
137
137
  :'sha1' => :'String',
138
138
  :'sha224' => :'String',
@@ -182,16 +182,16 @@ module PulpAnsibleClient
182
182
  h[k.to_sym] = v
183
183
  }
184
184
 
185
- if attributes.key?(:'pulp_created')
186
- self.pulp_created = attributes[:'pulp_created']
185
+ if attributes.key?(:'pulp_href')
186
+ self.pulp_href = attributes[:'pulp_href']
187
187
  end
188
188
 
189
189
  if attributes.key?(:'artifact')
190
190
  self.artifact = attributes[:'artifact']
191
191
  end
192
192
 
193
- if attributes.key?(:'pulp_href')
194
- self.pulp_href = attributes[:'pulp_href']
193
+ if attributes.key?(:'pulp_created')
194
+ self.pulp_created = attributes[:'pulp_created']
195
195
  end
196
196
 
197
197
  if attributes.key?(:'md5')
@@ -301,10 +301,6 @@ module PulpAnsibleClient
301
301
  # @return Array for valid properties with the reasons
302
302
  def list_invalid_properties
303
303
  invalid_properties = Array.new
304
- if @artifact.nil?
305
- invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
306
- end
307
-
308
304
  if @id.nil?
309
305
  invalid_properties.push('invalid value for "id", id cannot be nil.')
310
306
  end
@@ -407,7 +403,6 @@ module PulpAnsibleClient
407
403
  # Check to see if the all the properties in the model are valid
408
404
  # @return true if the model is valid
409
405
  def valid?
410
- return false if @artifact.nil?
411
406
  return false if @id.nil?
412
407
  return false if @authors.nil?
413
408
  return false if @contents.nil?
@@ -548,9 +543,9 @@ module PulpAnsibleClient
548
543
  def ==(o)
549
544
  return true if self.equal?(o)
550
545
  self.class == o.class &&
551
- pulp_created == o.pulp_created &&
552
- artifact == o.artifact &&
553
546
  pulp_href == o.pulp_href &&
547
+ artifact == o.artifact &&
548
+ pulp_created == o.pulp_created &&
554
549
  md5 == o.md5 &&
555
550
  sha1 == o.sha1 &&
556
551
  sha224 == o.sha224 &&
@@ -586,7 +581,7 @@ module PulpAnsibleClient
586
581
  # Calculates hash code according to all attributes.
587
582
  # @return [Integer] Hash code
588
583
  def hash
589
- [pulp_created, artifact, pulp_href, md5, sha1, sha224, sha256, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, manifest, files, documentation, homepage, issues, license, name, namespace, repository, tags, version, requires_ansible].hash
584
+ [pulp_href, artifact, pulp_created, md5, sha1, sha224, sha256, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, manifest, files, documentation, homepage, issues, license, name, namespace, repository, tags, version, requires_ansible].hash
590
585
  end
591
586
 
592
587
  # Builds the object from hash