pulpcore_client 3.114.2 → 3.115.0

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.
@@ -11,5 +11,5 @@ Generator version: 7.10.0
11
11
  =end
12
12
 
13
13
  module PulpcoreClient
14
- VERSION = '3.114.2'
14
+ VERSION = '3.115.0'
15
15
  end
@@ -31,7 +31,6 @@ require 'pulpcore_client/models/content_redirect_content_guard_response'
31
31
  require 'pulpcore_client/models/content_settings_response'
32
32
  require 'pulpcore_client/models/content_summary_response'
33
33
  require 'pulpcore_client/models/data_repair7272'
34
- require 'pulpcore_client/models/data_repair7465'
35
34
  require 'pulpcore_client/models/database_connection_response'
36
35
  require 'pulpcore_client/models/distribution_response'
37
36
  require 'pulpcore_client/models/domain'
@@ -213,7 +212,6 @@ require 'pulpcore_client/api/contentguards_content_redirect_api'
213
212
  require 'pulpcore_client/api/contentguards_header_api'
214
213
  require 'pulpcore_client/api/contentguards_rbac_api'
215
214
  require 'pulpcore_client/api/datarepair7272_api'
216
- require 'pulpcore_client/api/datarepair7465_api'
217
215
  require 'pulpcore_client/api/distributions_api'
218
216
  require 'pulpcore_client/api/distributions_artifacts_api'
219
217
  require 'pulpcore_client/api/distributions_openpgp_api'
@@ -83,7 +83,7 @@ describe 'TasksApi' do
83
83
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
84
84
  # @option opts [String] :name__ne Filter results where name not equal to value
85
85
  # @option opts [Integer] :offset The initial index from which to return the results.
86
- # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;state&#x60; - State * &#x60;-state&#x60; - State (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;logging_cid&#x60; - Logging cid * &#x60;-logging_cid&#x60; - Logging cid (descending) * &#x60;unblocked_at&#x60; - Unblocked at * &#x60;-unblocked_at&#x60; - Unblocked at (descending) * &#x60;started_at&#x60; - Started at * &#x60;-started_at&#x60; - Started at (descending) * &#x60;finished_at&#x60; - Finished at * &#x60;-finished_at&#x60; - Finished at (descending) * &#x60;error&#x60; - Error * &#x60;-error&#x60; - Error (descending) * &#x60;enc_args&#x60; - Enc args * &#x60;-enc_args&#x60; - Enc args (descending) * &#x60;enc_kwargs&#x60; - Enc kwargs * &#x60;-enc_kwargs&#x60; - Enc kwargs (descending) * &#x60;reserved_resources_record&#x60; - Reserved resources record * &#x60;-reserved_resources_record&#x60; - Reserved resources record (descending) * &#x60;versions&#x60; - Versions * &#x60;-versions&#x60; - Versions (descending) * &#x60;profile_options&#x60; - Profile options * &#x60;-profile_options&#x60; - Profile options (descending) * &#x60;immediate&#x60; - Immediate * &#x60;-immediate&#x60; - Immediate (descending) * &#x60;deferred&#x60; - Deferred * &#x60;-deferred&#x60; - Deferred (descending) * &#x60;result&#x60; - Result * &#x60;-result&#x60; - Result (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
86
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;state&#x60; - State * &#x60;-state&#x60; - State (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;logging_cid&#x60; - Logging cid * &#x60;-logging_cid&#x60; - Logging cid (descending) * &#x60;unblocked_at&#x60; - Unblocked at * &#x60;-unblocked_at&#x60; - Unblocked at (descending) * &#x60;started_at&#x60; - Started at * &#x60;-started_at&#x60; - Started at (descending) * &#x60;finished_at&#x60; - Finished at * &#x60;-finished_at&#x60; - Finished at (descending) * &#x60;error&#x60; - Error * &#x60;-error&#x60; - Error (descending) * &#x60;enc_args&#x60; - Enc args * &#x60;-enc_args&#x60; - Enc args (descending) * &#x60;enc_kwargs&#x60; - Enc kwargs * &#x60;-enc_kwargs&#x60; - Enc kwargs (descending) * &#x60;reserved_resources_record&#x60; - Reserved resources record * &#x60;-reserved_resources_record&#x60; - Reserved resources record (descending) * &#x60;versions&#x60; - Versions * &#x60;-versions&#x60; - Versions (descending) * &#x60;profile_options&#x60; - Profile options * &#x60;-profile_options&#x60; - Profile options (descending) * &#x60;immediate&#x60; - Immediate * &#x60;-immediate&#x60; - Immediate (descending) * &#x60;deferred&#x60; - Deferred * &#x60;-deferred&#x60; - Deferred (descending) * &#x60;result&#x60; - Result * &#x60;-result&#x60; - Result (descending) * &#x60;pulp_api_version&#x60; - Pulp api version * &#x60;-pulp_api_version&#x60; - Pulp api version (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
87
87
  # @option opts [String] :parent_task
88
88
  # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
89
89
  # @option opts [Time] :pulp_created Filter results where pulp_created matches value
@@ -27,79 +27,79 @@ describe PulpcoreClient::ArtifactDistributionResponse do
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "pulp_created"' do
30
+ describe 'test attribute "base_path"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
33
  end
34
34
  end
35
35
 
36
- describe 'test attribute "pulp_labels"' do
36
+ describe 'test attribute "pulp_last_updated"' do
37
37
  it 'should work' do
38
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
39
  end
40
40
  end
41
41
 
42
- describe 'test attribute "base_path"' do
42
+ describe 'test attribute "no_content_change_since"' do
43
43
  it 'should work' do
44
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
45
  end
46
46
  end
47
47
 
48
- describe 'test attribute "name"' do
48
+ describe 'test attribute "hidden"' do
49
49
  it 'should work' do
50
50
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
51
  end
52
52
  end
53
53
 
54
- describe 'test attribute "pulp_href"' do
54
+ describe 'test attribute "content_guard"' do
55
55
  it 'should work' do
56
56
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
57
  end
58
58
  end
59
59
 
60
- describe 'test attribute "content_guard_prn"' do
60
+ describe 'test attribute "pulp_href"' do
61
61
  it 'should work' do
62
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
63
  end
64
64
  end
65
65
 
66
- describe 'test attribute "no_content_change_since"' do
66
+ describe 'test attribute "name"' do
67
67
  it 'should work' do
68
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
69
69
  end
70
70
  end
71
71
 
72
- describe 'test attribute "prn"' do
72
+ describe 'test attribute "pulp_labels"' do
73
73
  it 'should work' do
74
74
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
75
75
  end
76
76
  end
77
77
 
78
- describe 'test attribute "base_url"' do
78
+ describe 'test attribute "content_guard_prn"' do
79
79
  it 'should work' do
80
80
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
81
81
  end
82
82
  end
83
83
 
84
- describe 'test attribute "repository_version"' do
84
+ describe 'test attribute "base_url"' do
85
85
  it 'should work' do
86
86
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
87
87
  end
88
88
  end
89
89
 
90
- describe 'test attribute "content_guard"' do
90
+ describe 'test attribute "pulp_created"' do
91
91
  it 'should work' do
92
92
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
93
93
  end
94
94
  end
95
95
 
96
- describe 'test attribute "hidden"' do
96
+ describe 'test attribute "prn"' do
97
97
  it 'should work' do
98
98
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
99
99
  end
100
100
  end
101
101
 
102
- describe 'test attribute "pulp_last_updated"' do
102
+ describe 'test attribute "repository_version"' do
103
103
  it 'should work' do
104
104
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
105
105
  end
@@ -51,6 +51,12 @@ describe PulpcoreClient::MinimalTaskResponse do
51
51
  end
52
52
  end
53
53
 
54
+ describe 'test attribute "pulp_api_version"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
54
60
  describe 'test attribute "name"' do
55
61
  it 'should work' do
56
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -153,4 +153,10 @@ describe PulpcoreClient::TaskResponse do
153
153
  end
154
154
  end
155
155
 
156
+ describe 'test attribute "pulp_api_version"' do
157
+ it 'should work' do
158
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
159
+ end
160
+ end
161
+
156
162
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pulpcore_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.114.2
4
+ version: 3.115.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-20 00:00:00.000000000 Z
11
+ date: 2026-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -115,10 +115,8 @@ files:
115
115
  - docs/ContentguardsHeaderApi.md
116
116
  - docs/ContentguardsRbacApi.md
117
117
  - docs/DataRepair7272.md
118
- - docs/DataRepair7465.md
119
118
  - docs/DatabaseConnectionResponse.md
120
119
  - docs/Datarepair7272Api.md
121
- - docs/Datarepair7465Api.md
122
120
  - docs/DistributionResponse.md
123
121
  - docs/DistributionsApi.md
124
122
  - docs/DistributionsArtifactsApi.md
@@ -335,7 +333,6 @@ files:
335
333
  - lib/pulpcore_client/api/contentguards_header_api.rb
336
334
  - lib/pulpcore_client/api/contentguards_rbac_api.rb
337
335
  - lib/pulpcore_client/api/datarepair7272_api.rb
338
- - lib/pulpcore_client/api/datarepair7465_api.rb
339
336
  - lib/pulpcore_client/api/distributions_api.rb
340
337
  - lib/pulpcore_client/api/distributions_artifacts_api.rb
341
338
  - lib/pulpcore_client/api/distributions_openpgp_api.rb
@@ -390,7 +387,6 @@ files:
390
387
  - lib/pulpcore_client/models/content_settings_response.rb
391
388
  - lib/pulpcore_client/models/content_summary_response.rb
392
389
  - lib/pulpcore_client/models/data_repair7272.rb
393
- - lib/pulpcore_client/models/data_repair7465.rb
394
390
  - lib/pulpcore_client/models/database_connection_response.rb
395
391
  - lib/pulpcore_client/models/distribution_response.rb
396
392
  - lib/pulpcore_client/models/domain.rb
@@ -572,7 +568,6 @@ files:
572
568
  - spec/api/contentguards_header_api_spec.rb
573
569
  - spec/api/contentguards_rbac_api_spec.rb
574
570
  - spec/api/datarepair7272_api_spec.rb
575
- - spec/api/datarepair7465_api_spec.rb
576
571
  - spec/api/distributions_api_spec.rb
577
572
  - spec/api/distributions_artifacts_api_spec.rb
578
573
  - spec/api/distributions_openpgp_api_spec.rb
@@ -624,7 +619,6 @@ files:
624
619
  - spec/models/content_settings_response_spec.rb
625
620
  - spec/models/content_summary_response_spec.rb
626
621
  - spec/models/data_repair7272_spec.rb
627
- - spec/models/data_repair7465_spec.rb
628
622
  - spec/models/database_connection_response_spec.rb
629
623
  - spec/models/distribution_response_spec.rb
630
624
  - spec/models/domain_backend_migrator_spec.rb
@@ -845,7 +839,6 @@ test_files:
845
839
  - spec/api/users_roles_api_spec.rb
846
840
  - spec/api/contentguards_composite_api_spec.rb
847
841
  - spec/api/content_openpgp_publicsubkey_api_spec.rb
848
- - spec/api/datarepair7465_api_spec.rb
849
842
  - spec/api/distributions_openpgp_api_spec.rb
850
843
  - spec/api/groups_users_api_spec.rb
851
844
  - spec/api/status_api_spec.rb
@@ -1043,7 +1036,6 @@ test_files:
1043
1036
  - spec/models/publication_response_spec.rb
1044
1037
  - spec/models/patched_pulp_exporter_spec.rb
1045
1038
  - spec/models/paginated_open_pgp_keyring_response_list_spec.rb
1046
- - spec/models/data_repair7465_spec.rb
1047
1039
  - spec/models/paginated_filesystem_export_response_list_spec.rb
1048
1040
  - spec/models/set_label_spec.rb
1049
1041
  - spec/models/multiple_artifact_content_response_spec.rb
@@ -1,18 +0,0 @@
1
- # PulpcoreClient::DataRepair7465
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **dry_run** | **Boolean** | If true, only report issues without fixing them. If false (default), repair the detected issues. | [optional][default to false] |
8
-
9
- ## Example
10
-
11
- ```ruby
12
- require 'pulpcore_client'
13
-
14
- instance = PulpcoreClient::DataRepair7465.new(
15
- dry_run: null
16
- )
17
- ```
18
-
@@ -1,82 +0,0 @@
1
- # PulpcoreClient::Datarepair7465Api
2
-
3
- All URIs are relative to *http://localhost:24817*
4
-
5
- | Method | HTTP request | Description |
6
- | ------ | ------------ | ----------- |
7
- | [**post**](Datarepair7465Api.md#post) | **POST** /pulp/api/v3/datarepair/7465/ | Add Repository Version Content IDs (Issue #7465) |
8
-
9
-
10
- ## post
11
-
12
- > <AsyncOperationResponse> post(data_repair7465, opts)
13
-
14
- Add Repository Version Content IDs (Issue #7465)
15
-
16
- Trigger an asynchronous task that adds missing repository version content_ids cache to all repository versions (Issue #7465).
17
-
18
- ### Examples
19
-
20
- ```ruby
21
- require 'time'
22
- require 'pulpcore_client'
23
- # setup authorization
24
- PulpcoreClient.configure do |config|
25
- # Configure HTTP basic authorization: basicAuth
26
- config.username = 'YOUR USERNAME'
27
- config.password = 'YOUR PASSWORD'
28
- end
29
-
30
- api_instance = PulpcoreClient::Datarepair7465Api.new
31
- data_repair7465 = PulpcoreClient::DataRepair7465.new # DataRepair7465 |
32
- opts = {
33
- x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
34
- }
35
-
36
- begin
37
- # Add Repository Version Content IDs (Issue #7465)
38
- result = api_instance.post(data_repair7465, opts)
39
- p result
40
- rescue PulpcoreClient::ApiError => e
41
- puts "Error when calling Datarepair7465Api->post: #{e}"
42
- end
43
- ```
44
-
45
- #### Using the post_with_http_info variant
46
-
47
- This returns an Array which contains the response data, status code and headers.
48
-
49
- > <Array(<AsyncOperationResponse>, Integer, Hash)> post_with_http_info(data_repair7465, opts)
50
-
51
- ```ruby
52
- begin
53
- # Add Repository Version Content IDs (Issue #7465)
54
- data, status_code, headers = api_instance.post_with_http_info(data_repair7465, opts)
55
- p status_code # => 2xx
56
- p headers # => { ... }
57
- p data # => <AsyncOperationResponse>
58
- rescue PulpcoreClient::ApiError => e
59
- puts "Error when calling Datarepair7465Api->post_with_http_info: #{e}"
60
- end
61
- ```
62
-
63
- ### Parameters
64
-
65
- | Name | Type | Description | Notes |
66
- | ---- | ---- | ----------- | ----- |
67
- | **data_repair7465** | [**DataRepair7465**](DataRepair7465.md) | | |
68
- | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
69
-
70
- ### Return type
71
-
72
- [**AsyncOperationResponse**](AsyncOperationResponse.md)
73
-
74
- ### Authorization
75
-
76
- [basicAuth](../README.md#basicAuth)
77
-
78
- ### HTTP request headers
79
-
80
- - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
81
- - **Accept**: application/json
82
-
@@ -1,93 +0,0 @@
1
- =begin
2
- #Pulp 3 API
3
-
4
- #Fetch, Upload, Organize, and Distribute Software Packages
5
-
6
- The version of the OpenAPI document: v3
7
- Contact: pulp-list@redhat.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.10.0
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module PulpcoreClient
16
- class Datarepair7465Api
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Add Repository Version Content IDs (Issue #7465)
23
- # Trigger an asynchronous task that adds missing repository version content_ids cache to all repository versions (Issue #7465).
24
- # @param data_repair7465 [DataRepair7465]
25
- # @param [Hash] opts the optional parameters
26
- # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
27
- # @return [AsyncOperationResponse]
28
- def post(data_repair7465, opts = {})
29
- data, _status_code, _headers = post_with_http_info(data_repair7465, opts)
30
- data
31
- end
32
-
33
- # Add Repository Version Content IDs (Issue #7465)
34
- # Trigger an asynchronous task that adds missing repository version content_ids cache to all repository versions (Issue #7465).
35
- # @param data_repair7465 [DataRepair7465]
36
- # @param [Hash] opts the optional parameters
37
- # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
38
- # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
39
- def post_with_http_info(data_repair7465, opts = {})
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: Datarepair7465Api.post ...'
42
- end
43
- # verify the required parameter 'data_repair7465' is set
44
- if @api_client.config.client_side_validation && data_repair7465.nil?
45
- fail ArgumentError, "Missing the required parameter 'data_repair7465' when calling Datarepair7465Api.post"
46
- end
47
- # resource path
48
- local_var_path = '/pulp/api/v3/datarepair/7465/'
49
-
50
- # query parameters
51
- query_params = opts[:query_params] || {}
52
-
53
- # header parameters
54
- header_params = opts[:header_params] || {}
55
- # HTTP header 'Accept' (if needed)
56
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
57
- # HTTP header 'Content-Type'
58
- content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
59
- if !content_type.nil?
60
- header_params['Content-Type'] = content_type
61
- end
62
- header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
63
-
64
- # form parameters
65
- form_params = opts[:form_params] || {}
66
-
67
- # http body (model)
68
- post_body = opts[:debug_body] || @api_client.object_to_http_body(data_repair7465)
69
-
70
- # return_type
71
- return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
72
-
73
- # auth_names
74
- auth_names = opts[:debug_auth_names] || ['basicAuth']
75
-
76
- new_options = opts.merge(
77
- :operation => :"Datarepair7465Api.post",
78
- :header_params => header_params,
79
- :query_params => query_params,
80
- :form_params => form_params,
81
- :body => post_body,
82
- :auth_names => auth_names,
83
- :return_type => return_type
84
- )
85
-
86
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
87
- if @api_client.config.debugging
88
- @api_client.config.logger.debug "API called: Datarepair7465Api#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
- end
90
- return data, status_code, headers
91
- end
92
- end
93
- end
@@ -1,217 +0,0 @@
1
- =begin
2
- #Pulp 3 API
3
-
4
- #Fetch, Upload, Organize, and Distribute Software Packages
5
-
6
- The version of the OpenAPI document: v3
7
- Contact: pulp-list@redhat.com
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.10.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module PulpcoreClient
17
- class DataRepair7465
18
- # If true, only report issues without fixing them. If false (default), repair the detected issues.
19
- attr_accessor :dry_run
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'dry_run' => :'dry_run'
25
- }
26
- end
27
-
28
- # Returns all the JSON keys this model knows about
29
- def self.acceptable_attributes
30
- attribute_map.values
31
- end
32
-
33
- # Attribute type mapping.
34
- def self.openapi_types
35
- {
36
- :'dry_run' => :'Boolean'
37
- }
38
- end
39
-
40
- # List of attributes with nullable: true
41
- def self.openapi_nullable
42
- Set.new([
43
- ])
44
- end
45
-
46
- # Initializes the object
47
- # @param [Hash] attributes Model attributes in the form of hash
48
- def initialize(attributes = {})
49
- if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::DataRepair7465` initialize method"
51
- end
52
-
53
- # check to see if the attribute exists and convert string to symbol for hash key
54
- attributes = attributes.each_with_object({}) { |(k, v), h|
55
- if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::DataRepair7465`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
- end
58
- h[k.to_sym] = v
59
- }
60
-
61
- if attributes.key?(:'dry_run')
62
- self.dry_run = attributes[:'dry_run']
63
- else
64
- self.dry_run = false
65
- end
66
- end
67
-
68
- # Show invalid properties with the reasons. Usually used together with valid?
69
- # @return Array for valid properties with the reasons
70
- def list_invalid_properties
71
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
- invalid_properties = Array.new
73
- invalid_properties
74
- end
75
-
76
- # Check to see if the all the properties in the model are valid
77
- # @return true if the model is valid
78
- def valid?
79
- warn '[DEPRECATED] the `valid?` method is obsolete'
80
- true
81
- end
82
-
83
- # Checks equality by comparing each attribute.
84
- # @param [Object] Object to be compared
85
- def ==(o)
86
- return true if self.equal?(o)
87
- self.class == o.class &&
88
- dry_run == o.dry_run
89
- end
90
-
91
- # @see the `==` method
92
- # @param [Object] Object to be compared
93
- def eql?(o)
94
- self == o
95
- end
96
-
97
- # Calculates hash code according to all attributes.
98
- # @return [Integer] Hash code
99
- def hash
100
- [dry_run].hash
101
- end
102
-
103
- # Builds the object from hash
104
- # @param [Hash] attributes Model attributes in the form of hash
105
- # @return [Object] Returns the model itself
106
- def self.build_from_hash(attributes)
107
- return nil unless attributes.is_a?(Hash)
108
- attributes = attributes.transform_keys(&:to_sym)
109
- transformed_hash = {}
110
- openapi_types.each_pair do |key, type|
111
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
112
- transformed_hash["#{key}"] = nil
113
- elsif type =~ /\AArray<(.*)>/i
114
- # check to ensure the input is an array given that the attribute
115
- # is documented as an array but the input is not
116
- if attributes[attribute_map[key]].is_a?(Array)
117
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
118
- end
119
- elsif !attributes[attribute_map[key]].nil?
120
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
121
- end
122
- end
123
- new(transformed_hash)
124
- end
125
-
126
- # Deserializes the data based on type
127
- # @param string type Data type
128
- # @param string value Value to be deserialized
129
- # @return [Object] Deserialized data
130
- def self._deserialize(type, value)
131
- case type.to_sym
132
- when :Time
133
- Time.parse(value)
134
- when :Date
135
- Date.parse(value)
136
- when :String
137
- value.to_s
138
- when :Integer
139
- value.to_i
140
- when :Float
141
- value.to_f
142
- when :Boolean
143
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
- true
145
- else
146
- false
147
- end
148
- when :Object
149
- # generic object (usually a Hash), return directly
150
- value
151
- when /\AArray<(?<inner_type>.+)>\z/
152
- inner_type = Regexp.last_match[:inner_type]
153
- value.map { |v| _deserialize(inner_type, v) }
154
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
- k_type = Regexp.last_match[:k_type]
156
- v_type = Regexp.last_match[:v_type]
157
- {}.tap do |hash|
158
- value.each do |k, v|
159
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
- end
161
- end
162
- else # model
163
- # models (e.g. Pet) or oneOf
164
- klass = PulpcoreClient.const_get(type)
165
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
166
- end
167
- end
168
-
169
- # Returns the string representation of the object
170
- # @return [String] String presentation of the object
171
- def to_s
172
- to_hash.to_s
173
- end
174
-
175
- # to_body is an alias to to_hash (backward compatibility)
176
- # @return [Hash] Returns the object in the form of hash
177
- def to_body
178
- to_hash
179
- end
180
-
181
- # Returns the object in the form of hash
182
- # @return [Hash] Returns the object in the form of hash
183
- def to_hash
184
- hash = {}
185
- self.class.attribute_map.each_pair do |attr, param|
186
- value = self.send(attr)
187
- if value.nil?
188
- is_nullable = self.class.openapi_nullable.include?(attr)
189
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
- end
191
-
192
- hash[param] = _to_hash(value)
193
- end
194
- hash
195
- end
196
-
197
- # Outputs non-array value in the form of hash
198
- # For object, use to_hash. Otherwise, just return the value
199
- # @param [Object] value Any valid value
200
- # @return [Hash] Returns the value in the form of hash
201
- def _to_hash(value)
202
- if value.is_a?(Array)
203
- value.compact.map { |v| _to_hash(v) }
204
- elsif value.is_a?(Hash)
205
- {}.tap do |hash|
206
- value.each { |k, v| hash[k] = _to_hash(v) }
207
- end
208
- elsif value.respond_to? :to_hash
209
- value.to_hash
210
- else
211
- value
212
- end
213
- end
214
-
215
- end
216
-
217
- end