pulp_deb_client 3.4.0 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -4
  3. data/docs/DebReleaseComponentResponse.md +3 -1
  4. data/docs/DebSourcePackageResponse.md +2 -0
  5. data/docs/DistributionsAptApi.md +232 -0
  6. data/docs/MyPermissionsResponse.md +17 -0
  7. data/docs/NestedRole.md +21 -0
  8. data/docs/NestedRoleResponse.md +21 -0
  9. data/docs/ObjectRolesResponse.md +17 -0
  10. data/docs/PublicationsAptApi.md +232 -0
  11. data/docs/PublicationsVerbatimApi.md +232 -0
  12. data/docs/RemotesAptApi.md +232 -0
  13. data/docs/RepositoriesAptApi.md +232 -0
  14. data/lib/pulp_deb_client/api/distributions_apt_api.rb +276 -0
  15. data/lib/pulp_deb_client/api/publications_apt_api.rb +276 -0
  16. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +276 -0
  17. data/lib/pulp_deb_client/api/remotes_apt_api.rb +276 -0
  18. data/lib/pulp_deb_client/api/repositories_apt_api.rb +276 -0
  19. data/lib/pulp_deb_client/models/deb_apt_remote.rb +20 -20
  20. data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +20 -20
  21. data/lib/pulp_deb_client/models/deb_release_component_response.rb +14 -4
  22. data/lib/pulp_deb_client/models/deb_source_package_response.rb +11 -1
  23. data/lib/pulp_deb_client/models/my_permissions_response.rb +213 -0
  24. data/lib/pulp_deb_client/models/nested_role.rb +253 -0
  25. data/lib/pulp_deb_client/models/nested_role_response.rb +234 -0
  26. data/lib/pulp_deb_client/models/object_roles_response.rb +213 -0
  27. data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +20 -20
  28. data/lib/pulp_deb_client/version.rb +1 -1
  29. data/lib/pulp_deb_client.rb +4 -0
  30. data/spec/api/distributions_apt_api_spec.rb +54 -0
  31. data/spec/api/publications_apt_api_spec.rb +54 -0
  32. data/spec/api/publications_verbatim_api_spec.rb +54 -0
  33. data/spec/api/remotes_apt_api_spec.rb +54 -0
  34. data/spec/api/repositories_apt_api_spec.rb +54 -0
  35. data/spec/models/deb_release_component_response_spec.rb +6 -0
  36. data/spec/models/deb_source_package_response_spec.rb +6 -0
  37. data/spec/models/my_permissions_response_spec.rb +41 -0
  38. data/spec/models/nested_role_response_spec.rb +53 -0
  39. data/spec/models/nested_role_spec.rb +53 -0
  40. data/spec/models/object_roles_response_spec.rb +41 -0
  41. metadata +95 -79
@@ -19,6 +19,76 @@ module PulpDebClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add a role
23
+ # Add a role for this object to users/groups.
24
+ # @param deb_apt_repository_href [String]
25
+ # @param nested_role [NestedRole]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [NestedRoleResponse]
28
+ def add_role(deb_apt_repository_href, nested_role, opts = {})
29
+ data, _status_code, _headers = add_role_with_http_info(deb_apt_repository_href, nested_role, opts)
30
+ data
31
+ end
32
+
33
+ # Add a role
34
+ # Add a role for this object to users/groups.
35
+ # @param deb_apt_repository_href [String]
36
+ # @param nested_role [NestedRole]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
39
+ def add_role_with_http_info(deb_apt_repository_href, nested_role, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.add_role ...'
42
+ end
43
+ # verify the required parameter 'deb_apt_repository_href' is set
44
+ if @api_client.config.client_side_validation && deb_apt_repository_href.nil?
45
+ fail ArgumentError, "Missing the required parameter 'deb_apt_repository_href' when calling RepositoriesAptApi.add_role"
46
+ end
47
+ # verify the required parameter 'nested_role' is set
48
+ if @api_client.config.client_side_validation && nested_role.nil?
49
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesAptApi.add_role"
50
+ end
51
+ # resource path
52
+ local_var_path = '{deb_apt_repository_href}add_role/'.sub('{' + 'deb_apt_repository_href' + '}', CGI.escape(deb_apt_repository_href.to_s).gsub('%2F', '/'))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'NestedRoleResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:auth_names] || ['basicAuth']
75
+
76
+ new_options = opts.merge(
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
22
92
  # Create an apt repository
23
93
  # An AptRepository is the locally stored, Pulp-internal representation of a APT repository. It may be filled with content via synchronization or content upload to create an AptRepositoryVersion.
24
94
  # @param deb_apt_repository [DebAptRepository]
@@ -295,6 +365,74 @@ module PulpDebClient
295
365
  return data, status_code, headers
296
366
  end
297
367
 
368
+ # List roles
369
+ # List roles assigned to this object.
370
+ # @param deb_apt_repository_href [String]
371
+ # @param [Hash] opts the optional parameters
372
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
373
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
374
+ # @return [ObjectRolesResponse]
375
+ def list_roles(deb_apt_repository_href, opts = {})
376
+ data, _status_code, _headers = list_roles_with_http_info(deb_apt_repository_href, opts)
377
+ data
378
+ end
379
+
380
+ # List roles
381
+ # List roles assigned to this object.
382
+ # @param deb_apt_repository_href [String]
383
+ # @param [Hash] opts the optional parameters
384
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
385
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
386
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
387
+ def list_roles_with_http_info(deb_apt_repository_href, opts = {})
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.list_roles ...'
390
+ end
391
+ # verify the required parameter 'deb_apt_repository_href' is set
392
+ if @api_client.config.client_side_validation && deb_apt_repository_href.nil?
393
+ fail ArgumentError, "Missing the required parameter 'deb_apt_repository_href' when calling RepositoriesAptApi.list_roles"
394
+ end
395
+ # resource path
396
+ local_var_path = '{deb_apt_repository_href}list_roles/'.sub('{' + 'deb_apt_repository_href' + '}', CGI.escape(deb_apt_repository_href.to_s).gsub('%2F', '/'))
397
+
398
+ # query parameters
399
+ query_params = opts[:query_params] || {}
400
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
401
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
407
+
408
+ # form parameters
409
+ form_params = opts[:form_params] || {}
410
+
411
+ # http body (model)
412
+ post_body = opts[:body]
413
+
414
+ # return_type
415
+ return_type = opts[:return_type] || 'ObjectRolesResponse'
416
+
417
+ # auth_names
418
+ auth_names = opts[:auth_names] || ['basicAuth']
419
+
420
+ new_options = opts.merge(
421
+ :header_params => header_params,
422
+ :query_params => query_params,
423
+ :form_params => form_params,
424
+ :body => post_body,
425
+ :auth_names => auth_names,
426
+ :return_type => return_type
427
+ )
428
+
429
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+
298
436
  # Modify Repository Content
299
437
  # Trigger an asynchronous task to create a new repository version.
300
438
  # @param deb_apt_repository_href [String]
@@ -365,6 +503,74 @@ module PulpDebClient
365
503
  return data, status_code, headers
366
504
  end
367
505
 
506
+ # List user permissions
507
+ # List permissions available to the current user on this object.
508
+ # @param deb_apt_repository_href [String]
509
+ # @param [Hash] opts the optional parameters
510
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
511
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
512
+ # @return [MyPermissionsResponse]
513
+ def my_permissions(deb_apt_repository_href, opts = {})
514
+ data, _status_code, _headers = my_permissions_with_http_info(deb_apt_repository_href, opts)
515
+ data
516
+ end
517
+
518
+ # List user permissions
519
+ # List permissions available to the current user on this object.
520
+ # @param deb_apt_repository_href [String]
521
+ # @param [Hash] opts the optional parameters
522
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
523
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
524
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
525
+ def my_permissions_with_http_info(deb_apt_repository_href, opts = {})
526
+ if @api_client.config.debugging
527
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.my_permissions ...'
528
+ end
529
+ # verify the required parameter 'deb_apt_repository_href' is set
530
+ if @api_client.config.client_side_validation && deb_apt_repository_href.nil?
531
+ fail ArgumentError, "Missing the required parameter 'deb_apt_repository_href' when calling RepositoriesAptApi.my_permissions"
532
+ end
533
+ # resource path
534
+ local_var_path = '{deb_apt_repository_href}my_permissions/'.sub('{' + 'deb_apt_repository_href' + '}', CGI.escape(deb_apt_repository_href.to_s).gsub('%2F', '/'))
535
+
536
+ # query parameters
537
+ query_params = opts[:query_params] || {}
538
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
539
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
540
+
541
+ # header parameters
542
+ header_params = opts[:header_params] || {}
543
+ # HTTP header 'Accept' (if needed)
544
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:body]
551
+
552
+ # return_type
553
+ return_type = opts[:return_type] || 'MyPermissionsResponse'
554
+
555
+ # auth_names
556
+ auth_names = opts[:auth_names] || ['basicAuth']
557
+
558
+ new_options = opts.merge(
559
+ :header_params => header_params,
560
+ :query_params => query_params,
561
+ :form_params => form_params,
562
+ :body => post_body,
563
+ :auth_names => auth_names,
564
+ :return_type => return_type
565
+ )
566
+
567
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
570
+ end
571
+ return data, status_code, headers
572
+ end
573
+
368
574
  # Update an apt repository
369
575
  # Trigger an asynchronous partial update task
370
576
  # @param deb_apt_repository_href [String]
@@ -503,6 +709,76 @@ module PulpDebClient
503
709
  return data, status_code, headers
504
710
  end
505
711
 
712
+ # Remove a role
713
+ # Remove a role for this object from users/groups.
714
+ # @param deb_apt_repository_href [String]
715
+ # @param nested_role [NestedRole]
716
+ # @param [Hash] opts the optional parameters
717
+ # @return [NestedRoleResponse]
718
+ def remove_role(deb_apt_repository_href, nested_role, opts = {})
719
+ data, _status_code, _headers = remove_role_with_http_info(deb_apt_repository_href, nested_role, opts)
720
+ data
721
+ end
722
+
723
+ # Remove a role
724
+ # Remove a role for this object from users/groups.
725
+ # @param deb_apt_repository_href [String]
726
+ # @param nested_role [NestedRole]
727
+ # @param [Hash] opts the optional parameters
728
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
729
+ def remove_role_with_http_info(deb_apt_repository_href, nested_role, opts = {})
730
+ if @api_client.config.debugging
731
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.remove_role ...'
732
+ end
733
+ # verify the required parameter 'deb_apt_repository_href' is set
734
+ if @api_client.config.client_side_validation && deb_apt_repository_href.nil?
735
+ fail ArgumentError, "Missing the required parameter 'deb_apt_repository_href' when calling RepositoriesAptApi.remove_role"
736
+ end
737
+ # verify the required parameter 'nested_role' is set
738
+ if @api_client.config.client_side_validation && nested_role.nil?
739
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesAptApi.remove_role"
740
+ end
741
+ # resource path
742
+ local_var_path = '{deb_apt_repository_href}remove_role/'.sub('{' + 'deb_apt_repository_href' + '}', CGI.escape(deb_apt_repository_href.to_s).gsub('%2F', '/'))
743
+
744
+ # query parameters
745
+ query_params = opts[:query_params] || {}
746
+
747
+ # header parameters
748
+ header_params = opts[:header_params] || {}
749
+ # HTTP header 'Accept' (if needed)
750
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
751
+ # HTTP header 'Content-Type'
752
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
753
+
754
+ # form parameters
755
+ form_params = opts[:form_params] || {}
756
+
757
+ # http body (model)
758
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
759
+
760
+ # return_type
761
+ return_type = opts[:return_type] || 'NestedRoleResponse'
762
+
763
+ # auth_names
764
+ auth_names = opts[:auth_names] || ['basicAuth']
765
+
766
+ new_options = opts.merge(
767
+ :header_params => header_params,
768
+ :query_params => query_params,
769
+ :form_params => form_params,
770
+ :body => post_body,
771
+ :auth_names => auth_names,
772
+ :return_type => return_type
773
+ )
774
+
775
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
776
+ if @api_client.config.debugging
777
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
778
+ end
779
+ return data, status_code, headers
780
+ end
781
+
506
782
  # Set a label
507
783
  # Set a single pulp_label on the object to a specific value or null.
508
784
  # @param deb_apt_repository_href [String]
@@ -387,20 +387,20 @@ module PulpDebClient
387
387
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
388
388
  end
389
389
 
390
- if !@total_timeout.nil? && @total_timeout < 0
391
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
390
+ if !@total_timeout.nil? && @total_timeout < 0.0
391
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
392
392
  end
393
393
 
394
- if !@connect_timeout.nil? && @connect_timeout < 0
395
- invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
394
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
395
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
396
396
  end
397
397
 
398
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
399
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
398
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
399
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
400
400
  end
401
401
 
402
- if !@sock_read_timeout.nil? && @sock_read_timeout < 0
403
- invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
402
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
403
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
404
404
  end
405
405
 
406
406
  if @distributions.nil?
@@ -442,10 +442,10 @@ module PulpDebClient
442
442
  return false if !@username.nil? && @username.to_s.length < 1
443
443
  return false if !@password.nil? && @password.to_s.length < 1
444
444
  return false if !@download_concurrency.nil? && @download_concurrency < 1
445
- return false if !@total_timeout.nil? && @total_timeout < 0
446
- return false if !@connect_timeout.nil? && @connect_timeout < 0
447
- return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
448
- return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
445
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
446
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
447
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
448
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
449
449
  return false if @distributions.nil?
450
450
  return false if @distributions.to_s.length < 1
451
451
  return false if !@components.nil? && @components.to_s.length < 1
@@ -575,8 +575,8 @@ module PulpDebClient
575
575
  # Custom attribute writer method with validation
576
576
  # @param [Object] total_timeout Value to be assigned
577
577
  def total_timeout=(total_timeout)
578
- if !total_timeout.nil? && total_timeout < 0
579
- fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
578
+ if !total_timeout.nil? && total_timeout < 0.0
579
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
580
580
  end
581
581
 
582
582
  @total_timeout = total_timeout
@@ -585,8 +585,8 @@ module PulpDebClient
585
585
  # Custom attribute writer method with validation
586
586
  # @param [Object] connect_timeout Value to be assigned
587
587
  def connect_timeout=(connect_timeout)
588
- if !connect_timeout.nil? && connect_timeout < 0
589
- fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
588
+ if !connect_timeout.nil? && connect_timeout < 0.0
589
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
590
590
  end
591
591
 
592
592
  @connect_timeout = connect_timeout
@@ -595,8 +595,8 @@ module PulpDebClient
595
595
  # Custom attribute writer method with validation
596
596
  # @param [Object] sock_connect_timeout Value to be assigned
597
597
  def sock_connect_timeout=(sock_connect_timeout)
598
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0
599
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
598
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
599
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
600
600
  end
601
601
 
602
602
  @sock_connect_timeout = sock_connect_timeout
@@ -605,8 +605,8 @@ module PulpDebClient
605
605
  # Custom attribute writer method with validation
606
606
  # @param [Object] sock_read_timeout Value to be assigned
607
607
  def sock_read_timeout=(sock_read_timeout)
608
- if !sock_read_timeout.nil? && sock_read_timeout < 0
609
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
608
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
609
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
610
610
  end
611
611
 
612
612
  @sock_read_timeout = sock_read_timeout
@@ -343,20 +343,20 @@ module PulpDebClient
343
343
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
344
344
  end
345
345
 
346
- if !@total_timeout.nil? && @total_timeout < 0
347
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
346
+ if !@total_timeout.nil? && @total_timeout < 0.0
347
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
348
348
  end
349
349
 
350
- if !@connect_timeout.nil? && @connect_timeout < 0
351
- invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
350
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
351
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
352
352
  end
353
353
 
354
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
355
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
354
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
355
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
356
356
  end
357
357
 
358
- if !@sock_read_timeout.nil? && @sock_read_timeout < 0
359
- invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
358
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
359
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
360
360
  end
361
361
 
362
362
  if @distributions.nil?
@@ -372,10 +372,10 @@ module PulpDebClient
372
372
  return false if @name.nil?
373
373
  return false if @url.nil?
374
374
  return false if !@download_concurrency.nil? && @download_concurrency < 1
375
- return false if !@total_timeout.nil? && @total_timeout < 0
376
- return false if !@connect_timeout.nil? && @connect_timeout < 0
377
- return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
378
- return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
375
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
376
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
377
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
378
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
379
379
  return false if @distributions.nil?
380
380
  true
381
381
  end
@@ -393,8 +393,8 @@ module PulpDebClient
393
393
  # Custom attribute writer method with validation
394
394
  # @param [Object] total_timeout Value to be assigned
395
395
  def total_timeout=(total_timeout)
396
- if !total_timeout.nil? && total_timeout < 0
397
- fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
396
+ if !total_timeout.nil? && total_timeout < 0.0
397
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
398
398
  end
399
399
 
400
400
  @total_timeout = total_timeout
@@ -403,8 +403,8 @@ module PulpDebClient
403
403
  # Custom attribute writer method with validation
404
404
  # @param [Object] connect_timeout Value to be assigned
405
405
  def connect_timeout=(connect_timeout)
406
- if !connect_timeout.nil? && connect_timeout < 0
407
- fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
406
+ if !connect_timeout.nil? && connect_timeout < 0.0
407
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
408
408
  end
409
409
 
410
410
  @connect_timeout = connect_timeout
@@ -413,8 +413,8 @@ module PulpDebClient
413
413
  # Custom attribute writer method with validation
414
414
  # @param [Object] sock_connect_timeout Value to be assigned
415
415
  def sock_connect_timeout=(sock_connect_timeout)
416
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0
417
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
416
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
417
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
418
418
  end
419
419
 
420
420
  @sock_connect_timeout = sock_connect_timeout
@@ -423,8 +423,8 @@ module PulpDebClient
423
423
  # Custom attribute writer method with validation
424
424
  # @param [Object] sock_read_timeout Value to be assigned
425
425
  def sock_read_timeout=(sock_read_timeout)
426
- if !sock_read_timeout.nil? && sock_read_timeout < 0
427
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
426
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
427
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
428
428
  end
429
429
 
430
430
  @sock_read_timeout = sock_read_timeout
@@ -32,6 +32,9 @@ module PulpDebClient
32
32
  # Name of the distribution.
33
33
  attr_accessor :distribution
34
34
 
35
+ # Name of the component without any path prefixes.
36
+ attr_accessor :plain_component
37
+
35
38
  # Attribute mapping from ruby-style variable name to JSON key.
36
39
  def self.attribute_map
37
40
  {
@@ -40,7 +43,8 @@ module PulpDebClient
40
43
  :'pulp_created' => :'pulp_created',
41
44
  :'pulp_last_updated' => :'pulp_last_updated',
42
45
  :'component' => :'component',
43
- :'distribution' => :'distribution'
46
+ :'distribution' => :'distribution',
47
+ :'plain_component' => :'plain_component'
44
48
  }
45
49
  end
46
50
 
@@ -52,7 +56,8 @@ module PulpDebClient
52
56
  :'pulp_created' => :'DateTime',
53
57
  :'pulp_last_updated' => :'DateTime',
54
58
  :'component' => :'String',
55
- :'distribution' => :'String'
59
+ :'distribution' => :'String',
60
+ :'plain_component' => :'String'
56
61
  }
57
62
  end
58
63
 
@@ -100,6 +105,10 @@ module PulpDebClient
100
105
  if attributes.key?(:'distribution')
101
106
  self.distribution = attributes[:'distribution']
102
107
  end
108
+
109
+ if attributes.key?(:'plain_component')
110
+ self.plain_component = attributes[:'plain_component']
111
+ end
103
112
  end
104
113
 
105
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -135,7 +144,8 @@ module PulpDebClient
135
144
  pulp_created == o.pulp_created &&
136
145
  pulp_last_updated == o.pulp_last_updated &&
137
146
  component == o.component &&
138
- distribution == o.distribution
147
+ distribution == o.distribution &&
148
+ plain_component == o.plain_component
139
149
  end
140
150
 
141
151
  # @see the `==` method
@@ -147,7 +157,7 @@ module PulpDebClient
147
157
  # Calculates hash code according to all attributes.
148
158
  # @return [Integer] Hash code
149
159
  def hash
150
- [pulp_href, prn, pulp_created, pulp_last_updated, component, distribution].hash
160
+ [pulp_href, prn, pulp_created, pulp_last_updated, component, distribution, plain_component].hash
151
161
  end
152
162
 
153
163
  # Builds the object from hash
@@ -32,6 +32,9 @@ module PulpDebClient
32
32
  # Relative path of the Debian Source Control (dsc) file.It is normally advised to let Pulp generate this.
33
33
  attr_accessor :relative_path
34
34
 
35
+ # sha256 digest of the dsc file.
36
+ attr_accessor :sha256
37
+
35
38
  attr_accessor :format
36
39
 
37
40
  attr_accessor :source
@@ -95,6 +98,7 @@ module PulpDebClient
95
98
  :'pulp_last_updated' => :'pulp_last_updated',
96
99
  :'artifacts' => :'artifacts',
97
100
  :'relative_path' => :'relative_path',
101
+ :'sha256' => :'sha256',
98
102
  :'format' => :'format',
99
103
  :'source' => :'source',
100
104
  :'binary' => :'binary',
@@ -134,6 +138,7 @@ module PulpDebClient
134
138
  :'pulp_last_updated' => :'DateTime',
135
139
  :'artifacts' => :'Object',
136
140
  :'relative_path' => :'String',
141
+ :'sha256' => :'String',
137
142
  :'format' => :'String',
138
143
  :'source' => :'String',
139
144
  :'binary' => :'String',
@@ -209,6 +214,10 @@ module PulpDebClient
209
214
  self.relative_path = attributes[:'relative_path']
210
215
  end
211
216
 
217
+ if attributes.key?(:'sha256')
218
+ self.sha256 = attributes[:'sha256']
219
+ end
220
+
212
221
  if attributes.key?(:'format')
213
222
  self.format = attributes[:'format']
214
223
  end
@@ -347,6 +356,7 @@ module PulpDebClient
347
356
  pulp_last_updated == o.pulp_last_updated &&
348
357
  artifacts == o.artifacts &&
349
358
  relative_path == o.relative_path &&
359
+ sha256 == o.sha256 &&
350
360
  format == o.format &&
351
361
  source == o.source &&
352
362
  binary == o.binary &&
@@ -385,7 +395,7 @@ module PulpDebClient
385
395
  # Calculates hash code according to all attributes.
386
396
  # @return [Integer] Hash code
387
397
  def hash
388
- [pulp_href, prn, pulp_created, pulp_last_updated, artifacts, relative_path, format, source, binary, architecture, version, maintainer, uploaders, homepage, vcs_browser, vcs_arch, vcs_bzr, vcs_cvs, vcs_darcs, vcs_git, vcs_hg, vcs_mtn, vcs_snv, testsuite, dgit, standards_version, build_depends, build_depends_indep, build_depends_arch, build_conflicts, build_conflicts_indep, build_conflicts_arch, package_list].hash
398
+ [pulp_href, prn, pulp_created, pulp_last_updated, artifacts, relative_path, sha256, format, source, binary, architecture, version, maintainer, uploaders, homepage, vcs_browser, vcs_arch, vcs_bzr, vcs_cvs, vcs_darcs, vcs_git, vcs_hg, vcs_mtn, vcs_snv, testsuite, dgit, standards_version, build_depends, build_depends_indep, build_depends_arch, build_conflicts, build_conflicts_indep, build_conflicts_arch, package_list].hash
389
399
  end
390
400
 
391
401
  # Builds the object from hash