pulp_gem_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +160 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentGemApi.md +210 -0
  7. data/docs/ContentSummaryResponse.md +21 -0
  8. data/docs/DistributionsGemApi.md +382 -0
  9. data/docs/GemGemContent.md +21 -0
  10. data/docs/GemGemContentResponse.md +35 -0
  11. data/docs/GemGemDistribution.md +31 -0
  12. data/docs/GemGemDistributionResponse.md +37 -0
  13. data/docs/GemGemPublication.md +19 -0
  14. data/docs/GemGemPublicationResponse.md +23 -0
  15. data/docs/GemGemRemote.md +63 -0
  16. data/docs/GemGemRemoteResponse.md +61 -0
  17. data/docs/GemGemRemoteResponseHiddenFields.md +19 -0
  18. data/docs/GemGemRepository.md +25 -0
  19. data/docs/GemGemRepositoryResponse.md +33 -0
  20. data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
  21. data/docs/PaginatedgemGemContentResponseList.md +23 -0
  22. data/docs/PaginatedgemGemDistributionResponseList.md +23 -0
  23. data/docs/PaginatedgemGemPublicationResponseList.md +23 -0
  24. data/docs/PaginatedgemGemRemoteResponseList.md +23 -0
  25. data/docs/PaginatedgemGemRepositoryResponseList.md +23 -0
  26. data/docs/PatchedgemGemDistribution.md +31 -0
  27. data/docs/PatchedgemGemRemote.md +63 -0
  28. data/docs/PatchedgemGemRepository.md +25 -0
  29. data/docs/PolicyEnum.md +16 -0
  30. data/docs/PublicationsGemApi.md +263 -0
  31. data/docs/RemotesGemApi.md +380 -0
  32. data/docs/Repair.md +17 -0
  33. data/docs/RepositoriesGemApi.md +502 -0
  34. data/docs/RepositoriesGemVersionsApi.md +273 -0
  35. data/docs/RepositoryAddRemoveContent.md +21 -0
  36. data/docs/RepositorySyncURL.md +19 -0
  37. data/docs/RepositoryVersionResponse.md +27 -0
  38. data/lib/pulp_gem_client/api/content_gem_api.rb +259 -0
  39. data/lib/pulp_gem_client/api/distributions_gem_api.rb +476 -0
  40. data/lib/pulp_gem_client/api/publications_gem_api.rb +325 -0
  41. data/lib/pulp_gem_client/api/remotes_gem_api.rb +473 -0
  42. data/lib/pulp_gem_client/api/repositories_gem_api.rb +628 -0
  43. data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +346 -0
  44. data/lib/pulp_gem_client/api_client.rb +403 -0
  45. data/lib/pulp_gem_client/api_error.rb +57 -0
  46. data/lib/pulp_gem_client/configuration.rb +251 -0
  47. data/lib/pulp_gem_client/models/async_operation_response.rb +213 -0
  48. data/lib/pulp_gem_client/models/content_summary_response.rb +246 -0
  49. data/lib/pulp_gem_client/models/gem_gem_content.rb +228 -0
  50. data/lib/pulp_gem_client/models/gem_gem_content_response.rb +303 -0
  51. data/lib/pulp_gem_client/models/gem_gem_distribution.rb +333 -0
  52. data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +324 -0
  53. data/lib/pulp_gem_client/models/gem_gem_publication.rb +217 -0
  54. data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +236 -0
  55. data/lib/pulp_gem_client/models/gem_gem_remote.rb +704 -0
  56. data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +532 -0
  57. data/lib/pulp_gem_client/models/gem_gem_remote_response_hidden_fields.rb +215 -0
  58. data/lib/pulp_gem_client/models/gem_gem_repository.rb +306 -0
  59. data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +309 -0
  60. data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +237 -0
  61. data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +237 -0
  62. data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +237 -0
  63. data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +237 -0
  64. data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +237 -0
  65. data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +237 -0
  66. data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +315 -0
  67. data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +686 -0
  68. data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +297 -0
  69. data/lib/pulp_gem_client/models/policy_enum.rb +37 -0
  70. data/lib/pulp_gem_client/models/repair.rb +209 -0
  71. data/lib/pulp_gem_client/models/repository_add_remove_content.rb +232 -0
  72. data/lib/pulp_gem_client/models/repository_sync_url.rb +220 -0
  73. data/lib/pulp_gem_client/models/repository_version_response.rb +255 -0
  74. data/lib/pulp_gem_client/version.rb +15 -0
  75. data/lib/pulp_gem_client.rb +72 -0
  76. data/pulp_gem_client.gemspec +39 -0
  77. data/spec/api/content_gem_api_spec.rb +88 -0
  78. data/spec/api/distributions_gem_api_spec.rb +130 -0
  79. data/spec/api/publications_gem_api_spec.rb +101 -0
  80. data/spec/api/remotes_gem_api_spec.rb +129 -0
  81. data/spec/api/repositories_gem_api_spec.rb +160 -0
  82. data/spec/api/repositories_gem_versions_api_spec.rb +105 -0
  83. data/spec/api_client_spec.rb +188 -0
  84. data/spec/configuration_spec.rb +42 -0
  85. data/spec/models/async_operation_response_spec.rb +41 -0
  86. data/spec/models/content_summary_response_spec.rb +53 -0
  87. data/spec/models/gem_gem_content_response_spec.rb +95 -0
  88. data/spec/models/gem_gem_content_spec.rb +53 -0
  89. data/spec/models/gem_gem_distribution_response_spec.rb +101 -0
  90. data/spec/models/gem_gem_distribution_spec.rb +83 -0
  91. data/spec/models/gem_gem_publication_response_spec.rb +59 -0
  92. data/spec/models/gem_gem_publication_spec.rb +47 -0
  93. data/spec/models/gem_gem_remote_response_hidden_fields_spec.rb +47 -0
  94. data/spec/models/gem_gem_remote_response_spec.rb +173 -0
  95. data/spec/models/gem_gem_remote_spec.rb +179 -0
  96. data/spec/models/gem_gem_repository_response_spec.rb +89 -0
  97. data/spec/models/gem_gem_repository_spec.rb +65 -0
  98. data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
  99. data/spec/models/paginatedgem_gem_content_response_list_spec.rb +59 -0
  100. data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +59 -0
  101. data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +59 -0
  102. data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +59 -0
  103. data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +59 -0
  104. data/spec/models/patchedgem_gem_distribution_spec.rb +83 -0
  105. data/spec/models/patchedgem_gem_remote_spec.rb +179 -0
  106. data/spec/models/patchedgem_gem_repository_spec.rb +65 -0
  107. data/spec/models/policy_enum_spec.rb +35 -0
  108. data/spec/models/repair_spec.rb +41 -0
  109. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  110. data/spec/models/repository_sync_url_spec.rb +47 -0
  111. data/spec/models/repository_version_response_spec.rb +71 -0
  112. data/spec/spec_helper.rb +111 -0
  113. metadata +250 -0
@@ -0,0 +1,346 @@
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
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpGemClient
16
+ class RepositoriesGemVersionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a repository version
23
+ # Trigger an asynchronous task to delete a repository version.
24
+ # @param gem_gem_repository_version_href [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
27
+ def delete(gem_gem_repository_version_href, opts = {})
28
+ data, _status_code, _headers = delete_with_http_info(gem_gem_repository_version_href, opts)
29
+ data
30
+ end
31
+
32
+ # Delete a repository version
33
+ # Trigger an asynchronous task to delete a repository version.
34
+ # @param gem_gem_repository_version_href [String]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
37
+ def delete_with_http_info(gem_gem_repository_version_href, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RepositoriesGemVersionsApi.delete ...'
40
+ end
41
+ # verify the required parameter 'gem_gem_repository_version_href' is set
42
+ if @api_client.config.client_side_validation && gem_gem_repository_version_href.nil?
43
+ fail ArgumentError, "Missing the required parameter 'gem_gem_repository_version_href' when calling RepositoriesGemVersionsApi.delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '{gem_gem_repository_version_href}'.sub('{' + 'gem_gem_repository_version_href' + '}', CGI.escape(gem_gem_repository_version_href.to_s).gsub('%2F', '/'))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:body]
61
+
62
+ # return_type
63
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
64
+
65
+ # auth_names
66
+ auth_names = opts[:auth_names] || ['basicAuth']
67
+
68
+ new_options = opts.merge(
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: RepositoriesGemVersionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # List repository versions
85
+ # A ViewSet for a GemRepositoryVersion represents a single Gem repository version.
86
+ # @param gem_gem_repository_href [String]
87
+ # @param [Hash] opts the optional parameters
88
+ # @option opts [String] :content Content Unit referenced by HREF
89
+ # @option opts [String] :content__in Content Unit referenced by HREF
90
+ # @option opts [Integer] :limit Number of results to return per page.
91
+ # @option opts [Integer] :number Filter results where number matches value
92
+ # @option opts [Integer] :number__gt Filter results where number is greater than value
93
+ # @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
94
+ # @option opts [Integer] :number__lt Filter results where number is less than value
95
+ # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
96
+ # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
97
+ # @option opts [Integer] :offset The initial index from which to return the results.
98
+ # @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;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
99
+ # @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
100
+ # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
101
+ # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
102
+ # @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
103
+ # @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
104
+ # @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
105
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
106
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
107
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
108
+ # @return [PaginatedRepositoryVersionResponseList]
109
+ def list(gem_gem_repository_href, opts = {})
110
+ data, _status_code, _headers = list_with_http_info(gem_gem_repository_href, opts)
111
+ data
112
+ end
113
+
114
+ # List repository versions
115
+ # A ViewSet for a GemRepositoryVersion represents a single Gem repository version.
116
+ # @param gem_gem_repository_href [String]
117
+ # @param [Hash] opts the optional parameters
118
+ # @option opts [String] :content Content Unit referenced by HREF
119
+ # @option opts [String] :content__in Content Unit referenced by HREF
120
+ # @option opts [Integer] :limit Number of results to return per page.
121
+ # @option opts [Integer] :number Filter results where number matches value
122
+ # @option opts [Integer] :number__gt Filter results where number is greater than value
123
+ # @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
124
+ # @option opts [Integer] :number__lt Filter results where number is less than value
125
+ # @option opts [Integer] :number__lte Filter results where number is less than or equal to value
126
+ # @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
127
+ # @option opts [Integer] :offset The initial index from which to return the results.
128
+ # @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;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
129
+ # @option opts [DateTime] :pulp_created Filter results where pulp_created matches value
130
+ # @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
131
+ # @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
132
+ # @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
133
+ # @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
134
+ # @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
135
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
136
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
137
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
138
+ # @return [Array<(PaginatedRepositoryVersionResponseList, Integer, Hash)>] PaginatedRepositoryVersionResponseList data, response status code and response headers
139
+ def list_with_http_info(gem_gem_repository_href, opts = {})
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug 'Calling API: RepositoriesGemVersionsApi.list ...'
142
+ end
143
+ # verify the required parameter 'gem_gem_repository_href' is set
144
+ if @api_client.config.client_side_validation && gem_gem_repository_href.nil?
145
+ fail ArgumentError, "Missing the required parameter 'gem_gem_repository_href' when calling RepositoriesGemVersionsApi.list"
146
+ end
147
+ allowable_values = ["-complete", "-info", "-number", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "complete", "info", "number", "pk", "pulp_created", "pulp_id", "pulp_last_updated"]
148
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
149
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
150
+ end
151
+ # resource path
152
+ local_var_path = '{gem_gem_repository_href}versions/'.sub('{' + 'gem_gem_repository_href' + '}', CGI.escape(gem_gem_repository_href.to_s).gsub('%2F', '/'))
153
+
154
+ # query parameters
155
+ query_params = opts[:query_params] || {}
156
+ query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
157
+ query_params[:'content__in'] = opts[:'content__in'] if !opts[:'content__in'].nil?
158
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
159
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
160
+ query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
161
+ query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
162
+ query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
163
+ query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
164
+ query_params[:'number__range'] = @api_client.build_collection_param(opts[:'number__range'], :csv) if !opts[:'number__range'].nil?
165
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
166
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
167
+ query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
168
+ query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
169
+ query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
170
+ query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
171
+ query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
172
+ query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
173
+ query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
174
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
175
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+
182
+ # form parameters
183
+ form_params = opts[:form_params] || {}
184
+
185
+ # http body (model)
186
+ post_body = opts[:body]
187
+
188
+ # return_type
189
+ return_type = opts[:return_type] || 'PaginatedRepositoryVersionResponseList'
190
+
191
+ # auth_names
192
+ auth_names = opts[:auth_names] || ['basicAuth']
193
+
194
+ new_options = opts.merge(
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: RepositoriesGemVersionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Inspect a repository version
211
+ # A ViewSet for a GemRepositoryVersion represents a single Gem repository version.
212
+ # @param gem_gem_repository_version_href [String]
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
215
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
216
+ # @return [RepositoryVersionResponse]
217
+ def read(gem_gem_repository_version_href, opts = {})
218
+ data, _status_code, _headers = read_with_http_info(gem_gem_repository_version_href, opts)
219
+ data
220
+ end
221
+
222
+ # Inspect a repository version
223
+ # A ViewSet for a GemRepositoryVersion represents a single Gem repository version.
224
+ # @param gem_gem_repository_version_href [String]
225
+ # @param [Hash] opts the optional parameters
226
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
227
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
228
+ # @return [Array<(RepositoryVersionResponse, Integer, Hash)>] RepositoryVersionResponse data, response status code and response headers
229
+ def read_with_http_info(gem_gem_repository_version_href, opts = {})
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug 'Calling API: RepositoriesGemVersionsApi.read ...'
232
+ end
233
+ # verify the required parameter 'gem_gem_repository_version_href' is set
234
+ if @api_client.config.client_side_validation && gem_gem_repository_version_href.nil?
235
+ fail ArgumentError, "Missing the required parameter 'gem_gem_repository_version_href' when calling RepositoriesGemVersionsApi.read"
236
+ end
237
+ # resource path
238
+ local_var_path = '{gem_gem_repository_version_href}'.sub('{' + 'gem_gem_repository_version_href' + '}', CGI.escape(gem_gem_repository_version_href.to_s).gsub('%2F', '/'))
239
+
240
+ # query parameters
241
+ query_params = opts[:query_params] || {}
242
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
243
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
244
+
245
+ # header parameters
246
+ header_params = opts[:header_params] || {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
+
250
+ # form parameters
251
+ form_params = opts[:form_params] || {}
252
+
253
+ # http body (model)
254
+ post_body = opts[:body]
255
+
256
+ # return_type
257
+ return_type = opts[:return_type] || 'RepositoryVersionResponse'
258
+
259
+ # auth_names
260
+ auth_names = opts[:auth_names] || ['basicAuth']
261
+
262
+ new_options = opts.merge(
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => return_type
269
+ )
270
+
271
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug "API called: RepositoriesGemVersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
274
+ end
275
+ return data, status_code, headers
276
+ end
277
+
278
+ # Trigger an asynchronous task to repair a repository version.
279
+ # @param gem_gem_repository_version_href [String]
280
+ # @param repair [Repair]
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [AsyncOperationResponse]
283
+ def repair(gem_gem_repository_version_href, repair, opts = {})
284
+ data, _status_code, _headers = repair_with_http_info(gem_gem_repository_version_href, repair, opts)
285
+ data
286
+ end
287
+
288
+ # Trigger an asynchronous task to repair a repository version.
289
+ # @param gem_gem_repository_version_href [String]
290
+ # @param repair [Repair]
291
+ # @param [Hash] opts the optional parameters
292
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
293
+ def repair_with_http_info(gem_gem_repository_version_href, repair, opts = {})
294
+ if @api_client.config.debugging
295
+ @api_client.config.logger.debug 'Calling API: RepositoriesGemVersionsApi.repair ...'
296
+ end
297
+ # verify the required parameter 'gem_gem_repository_version_href' is set
298
+ if @api_client.config.client_side_validation && gem_gem_repository_version_href.nil?
299
+ fail ArgumentError, "Missing the required parameter 'gem_gem_repository_version_href' when calling RepositoriesGemVersionsApi.repair"
300
+ end
301
+ # verify the required parameter 'repair' is set
302
+ if @api_client.config.client_side_validation && repair.nil?
303
+ fail ArgumentError, "Missing the required parameter 'repair' when calling RepositoriesGemVersionsApi.repair"
304
+ end
305
+ # resource path
306
+ local_var_path = '{gem_gem_repository_version_href}repair/'.sub('{' + 'gem_gem_repository_version_href' + '}', CGI.escape(gem_gem_repository_version_href.to_s).gsub('%2F', '/'))
307
+
308
+ # query parameters
309
+ query_params = opts[:query_params] || {}
310
+
311
+ # header parameters
312
+ header_params = opts[:header_params] || {}
313
+ # HTTP header 'Accept' (if needed)
314
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
315
+ # HTTP header 'Content-Type'
316
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
317
+
318
+ # form parameters
319
+ form_params = opts[:form_params] || {}
320
+
321
+ # http body (model)
322
+ post_body = opts[:body] || @api_client.object_to_http_body(repair)
323
+
324
+ # return_type
325
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
326
+
327
+ # auth_names
328
+ auth_names = opts[:auth_names] || ['basicAuth']
329
+
330
+ new_options = opts.merge(
331
+ :header_params => header_params,
332
+ :query_params => query_params,
333
+ :form_params => form_params,
334
+ :body => post_body,
335
+ :auth_names => auth_names,
336
+ :return_type => return_type
337
+ )
338
+
339
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug "API called: RepositoriesGemVersionsApi#repair\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
342
+ end
343
+ return data, status_code, headers
344
+ end
345
+ end
346
+ end