pulp_deb_client 2.0.0b2 → 2.0.0b3

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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -18
  3. data/docs/ContentGenericContentsApi.md +12 -4
  4. data/docs/ContentInstallerFileIndexApi.md +20 -8
  5. data/docs/ContentInstallerPackagesApi.md +42 -4
  6. data/docs/ContentPackageIndexApi.md +20 -8
  7. data/docs/ContentPackagesApi.md +46 -6
  8. data/docs/{ContentReleasesApi.md → ContentReleaseFilesApi.md} +44 -32
  9. data/docs/ContentSummary.md +21 -0
  10. data/docs/{InstallerPackage.md → DebBasePackage.md} +40 -46
  11. data/docs/{DebDistribution.md → DebDebDistribution.md} +6 -6
  12. data/docs/{DebPublication.md → DebDebPublication.md} +5 -7
  13. data/docs/{DebRemote.md → DebDebRemote.md} +15 -21
  14. data/docs/DebDebRepository.md +27 -0
  15. data/docs/{GenericContent.md → DebGenericContent.md} +11 -17
  16. data/docs/{InstallerFileIndex.md → DebInstallerFileIndex.md} +5 -7
  17. data/docs/{PackageIndex.md → DebPackageIndex.md} +5 -7
  18. data/docs/{Release.md → DebReleaseFile.md} +5 -7
  19. data/docs/{VerbatimPublication.md → DebVerbatimPublication.md} +5 -7
  20. data/docs/DistributionsAptApi.md +16 -12
  21. data/docs/InlineResponse200.md +1 -1
  22. data/docs/InlineResponse2001.md +1 -1
  23. data/docs/InlineResponse20010.md +23 -0
  24. data/docs/InlineResponse2002.md +1 -1
  25. data/docs/InlineResponse2003.md +1 -1
  26. data/docs/InlineResponse2004.md +1 -1
  27. data/docs/InlineResponse2005.md +1 -1
  28. data/docs/InlineResponse2006.md +1 -1
  29. data/docs/InlineResponse2007.md +1 -1
  30. data/docs/InlineResponse2008.md +1 -1
  31. data/docs/InlineResponse2009.md +1 -1
  32. data/docs/PublicationsAptApi.md +12 -8
  33. data/docs/PublicationsVerbatimApi.md +12 -8
  34. data/docs/RemotesAptApi.md +30 -81
  35. data/docs/RepositoriesAptApi.md +465 -0
  36. data/docs/RepositoriesDebVersionsApi.md +214 -0
  37. data/docs/RepositoryAddRemoveContent.md +21 -0
  38. data/docs/RepositorySyncURL.md +2 -2
  39. data/docs/RepositoryVersion.md +25 -0
  40. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +16 -4
  41. data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +27 -9
  42. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +61 -4
  43. data/lib/pulp_deb_client/api/content_package_index_api.rb +27 -9
  44. data/lib/pulp_deb_client/api/content_packages_api.rb +67 -7
  45. data/lib/pulp_deb_client/api/{content_releases_api.rb → content_release_files_api.rb} +61 -43
  46. data/lib/pulp_deb_client/api/distributions_apt_api.rb +19 -13
  47. data/lib/pulp_deb_client/api/publications_apt_api.rb +15 -9
  48. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +15 -9
  49. data/lib/pulp_deb_client/api/remotes_apt_api.rb +40 -102
  50. data/lib/pulp_deb_client/api/repositories_apt_api.rb +568 -0
  51. data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +268 -0
  52. data/lib/pulp_deb_client/api_client.rb +1 -1
  53. data/lib/pulp_deb_client/api_error.rb +1 -1
  54. data/lib/pulp_deb_client/configuration.rb +1 -1
  55. data/lib/pulp_deb_client/models/async_operation_response.rb +12 -2
  56. data/lib/pulp_deb_client/models/content_summary.rb +246 -0
  57. data/lib/pulp_deb_client/models/{package.rb → deb_base_package.rb} +28 -62
  58. data/lib/pulp_deb_client/models/{deb_distribution.rb → deb_deb_distribution.rb} +30 -36
  59. data/lib/pulp_deb_client/models/{deb_publication.rb → deb_deb_publication.rb} +29 -42
  60. data/lib/pulp_deb_client/models/{deb_remote.rb → deb_deb_remote.rb} +87 -147
  61. data/lib/pulp_deb_client/models/deb_deb_repository.rb +294 -0
  62. data/lib/pulp_deb_client/models/{generic_content.rb → deb_generic_content.rb} +28 -62
  63. data/lib/pulp_deb_client/models/{installer_file_index.rb → deb_installer_file_index.rb} +28 -42
  64. data/lib/pulp_deb_client/models/{package_index.rb → deb_package_index.rb} +28 -42
  65. data/lib/pulp_deb_client/models/{release.rb → deb_release_file.rb} +28 -42
  66. data/lib/pulp_deb_client/models/{verbatim_publication.rb → deb_verbatim_publication.rb} +29 -42
  67. data/lib/pulp_deb_client/models/inline_response200.rb +15 -3
  68. data/lib/pulp_deb_client/models/inline_response2001.rb +15 -3
  69. data/lib/pulp_deb_client/models/inline_response20010.rb +247 -0
  70. data/lib/pulp_deb_client/models/inline_response2002.rb +15 -3
  71. data/lib/pulp_deb_client/models/inline_response2003.rb +15 -3
  72. data/lib/pulp_deb_client/models/inline_response2004.rb +15 -3
  73. data/lib/pulp_deb_client/models/inline_response2005.rb +15 -3
  74. data/lib/pulp_deb_client/models/inline_response2006.rb +15 -3
  75. data/lib/pulp_deb_client/models/inline_response2007.rb +15 -3
  76. data/lib/pulp_deb_client/models/inline_response2008.rb +15 -3
  77. data/lib/pulp_deb_client/models/inline_response2009.rb +15 -3
  78. data/lib/pulp_deb_client/models/repository_add_remove_content.rb +231 -0
  79. data/lib/pulp_deb_client/models/repository_sync_url.rb +22 -12
  80. data/lib/pulp_deb_client/models/repository_version.rb +244 -0
  81. data/lib/pulp_deb_client/version.rb +2 -2
  82. data/lib/pulp_deb_client.rb +18 -12
  83. data/pulp_deb_client.gemspec +1 -1
  84. data/spec/api/content_generic_contents_api_spec.rb +6 -2
  85. data/spec/api/content_installer_file_index_api_spec.rb +9 -3
  86. data/spec/api/content_installer_packages_api_spec.rb +21 -2
  87. data/spec/api/content_package_index_api_spec.rb +9 -3
  88. data/spec/api/content_packages_api_spec.rb +23 -3
  89. data/spec/api/{content_releases_api_spec.rb → content_release_files_api_spec.rb} +23 -17
  90. data/spec/api/distributions_apt_api_spec.rb +5 -3
  91. data/spec/api/publications_apt_api_spec.rb +5 -3
  92. data/spec/api/publications_verbatim_api_spec.rb +5 -3
  93. data/spec/api/remotes_apt_api_spec.rb +12 -22
  94. data/spec/api/repositories_apt_api_spec.rb +141 -0
  95. data/spec/api/repositories_deb_versions_api_spec.rb +91 -0
  96. data/spec/api_client_spec.rb +2 -2
  97. data/spec/configuration_spec.rb +1 -1
  98. data/spec/models/async_operation_response_spec.rb +1 -1
  99. data/spec/models/content_summary_spec.rb +53 -0
  100. data/spec/models/{package_spec.rb → deb_base_package_spec.rb} +9 -27
  101. data/spec/models/{deb_distribution_spec.rb → deb_deb_distribution_spec.rb} +9 -9
  102. data/spec/models/{deb_publication_spec.rb → deb_deb_publication_spec.rb} +9 -15
  103. data/spec/models/{deb_remote_spec.rb → deb_deb_remote_spec.rb} +14 -32
  104. data/spec/models/{verbatim_publication_spec.rb → deb_deb_repository_spec.rb} +13 -13
  105. data/spec/models/{generic_content_spec.rb → deb_generic_content_spec.rb} +9 -27
  106. data/spec/models/{package_index_spec.rb → deb_installer_file_index_spec.rb} +9 -15
  107. data/spec/models/{installer_file_index_spec.rb → deb_package_index_spec.rb} +9 -15
  108. data/spec/models/{release_spec.rb → deb_release_file_spec.rb} +9 -15
  109. data/spec/models/deb_verbatim_publication_spec.rb +65 -0
  110. data/spec/models/inline_response20010_spec.rb +59 -0
  111. data/spec/models/inline_response2001_spec.rb +1 -1
  112. data/spec/models/inline_response2002_spec.rb +1 -1
  113. data/spec/models/inline_response2003_spec.rb +1 -1
  114. data/spec/models/inline_response2004_spec.rb +1 -1
  115. data/spec/models/inline_response2005_spec.rb +1 -1
  116. data/spec/models/inline_response2006_spec.rb +1 -1
  117. data/spec/models/inline_response2007_spec.rb +1 -1
  118. data/spec/models/inline_response2008_spec.rb +1 -1
  119. data/spec/models/inline_response2009_spec.rb +1 -1
  120. data/spec/models/inline_response200_spec.rb +1 -1
  121. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  122. data/spec/models/repository_sync_url_spec.rb +2 -2
  123. data/spec/models/repository_version_spec.rb +65 -0
  124. data/spec/spec_helper.rb +1 -1
  125. metadata +70 -46
  126. data/docs/Package.md +0 -99
  127. data/lib/pulp_deb_client/models/installer_package.rb +0 -1101
  128. data/spec/models/installer_package_spec.rb +0 -287
@@ -0,0 +1,568 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpDebClient
16
+ class RepositoriesAptApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a deb repository
23
+ # A ViewSet for DebRepository.
24
+ # @param data [DebDebRepository]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [DebDebRepository]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a deb repository
33
+ # A ViewSet for DebRepository.
34
+ # @param data [DebDebRepository]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(DebDebRepository, Integer, Hash)>] DebDebRepository data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAptApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/repositories/deb/apt/'
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
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'DebDebRepository'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a deb repository
87
+ # Trigger an asynchronous task to delete a repository.
88
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(deb_repository_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(deb_repository_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a deb repository
97
+ # Trigger an asynchronous task to delete a repository.
98
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(deb_repository_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.delete ...'
104
+ end
105
+ # verify the required parameter 'deb_repository_href' is set
106
+ if @api_client.config.client_side_validation && deb_repository_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'deb_repository_href' when calling RepositoriesAptApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{deb_repository_href}'.sub('{' + 'deb_repository_href' + '}', CGI.escape(deb_repository_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['Basic']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List deb repositorys
149
+ # A ViewSet for DebRepository.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :name
152
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
153
+ # @option opts [Integer] :limit Number of results to return per page.
154
+ # @option opts [Integer] :offset The initial index from which to return the results.
155
+ # @option opts [String] :fields A list of fields to include in the response.
156
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
157
+ # @return [InlineResponse2009]
158
+ def list(opts = {})
159
+ data, _status_code, _headers = list_with_http_info(opts)
160
+ data
161
+ end
162
+
163
+ # List deb repositorys
164
+ # A ViewSet for DebRepository.
165
+ # @param [Hash] opts the optional parameters
166
+ # @option opts [String] :name
167
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
168
+ # @option opts [Integer] :limit Number of results to return per page.
169
+ # @option opts [Integer] :offset The initial index from which to return the results.
170
+ # @option opts [String] :fields A list of fields to include in the response.
171
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
172
+ # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
173
+ def list_with_http_info(opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.list ...'
176
+ end
177
+ # resource path
178
+ local_var_path = '/pulp/api/v3/repositories/deb/apt/'
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
183
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
184
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
185
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
186
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
187
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:body]
199
+
200
+ # return_type
201
+ return_type = opts[:return_type] || 'InlineResponse2009'
202
+
203
+ # auth_names
204
+ auth_names = opts[:auth_names] || ['Basic']
205
+
206
+ new_options = opts.merge(
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Trigger an asynchronous task to create a new repository version.
223
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
224
+ # @param data [RepositoryAddRemoveContent]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [AsyncOperationResponse]
227
+ def modify(deb_repository_href, data, opts = {})
228
+ data, _status_code, _headers = modify_with_http_info(deb_repository_href, data, opts)
229
+ data
230
+ end
231
+
232
+ # Trigger an asynchronous task to create a new repository version.
233
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
234
+ # @param data [RepositoryAddRemoveContent]
235
+ # @param [Hash] opts the optional parameters
236
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
237
+ def modify_with_http_info(deb_repository_href, data, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.modify ...'
240
+ end
241
+ # verify the required parameter 'deb_repository_href' is set
242
+ if @api_client.config.client_side_validation && deb_repository_href.nil?
243
+ fail ArgumentError, "Missing the required parameter 'deb_repository_href' when calling RepositoriesAptApi.modify"
244
+ end
245
+ # verify the required parameter 'data' is set
246
+ if @api_client.config.client_side_validation && data.nil?
247
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAptApi.modify"
248
+ end
249
+ # resource path
250
+ local_var_path = '{deb_repository_href}modify/'.sub('{' + 'deb_repository_href' + '}', CGI.escape(deb_repository_href.to_s).gsub('%2F', '/'))
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
259
+ # HTTP header 'Content-Type'
260
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
267
+
268
+ # return_type
269
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
270
+
271
+ # auth_names
272
+ auth_names = opts[:auth_names] || ['Basic']
273
+
274
+ new_options = opts.merge(
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Partially update a deb repository
291
+ # A ViewSet for DebRepository.
292
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
293
+ # @param data [DebDebRepository]
294
+ # @param [Hash] opts the optional parameters
295
+ # @return [DebDebRepository]
296
+ def partial_update(deb_repository_href, data, opts = {})
297
+ data, _status_code, _headers = partial_update_with_http_info(deb_repository_href, data, opts)
298
+ data
299
+ end
300
+
301
+ # Partially update a deb repository
302
+ # A ViewSet for DebRepository.
303
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
304
+ # @param data [DebDebRepository]
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(DebDebRepository, Integer, Hash)>] DebDebRepository data, response status code and response headers
307
+ def partial_update_with_http_info(deb_repository_href, data, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.partial_update ...'
310
+ end
311
+ # verify the required parameter 'deb_repository_href' is set
312
+ if @api_client.config.client_side_validation && deb_repository_href.nil?
313
+ fail ArgumentError, "Missing the required parameter 'deb_repository_href' when calling RepositoriesAptApi.partial_update"
314
+ end
315
+ # verify the required parameter 'data' is set
316
+ if @api_client.config.client_side_validation && data.nil?
317
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAptApi.partial_update"
318
+ end
319
+ # resource path
320
+ local_var_path = '{deb_repository_href}'.sub('{' + 'deb_repository_href' + '}', CGI.escape(deb_repository_href.to_s).gsub('%2F', '/'))
321
+
322
+ # query parameters
323
+ query_params = opts[:query_params] || {}
324
+
325
+ # header parameters
326
+ header_params = opts[:header_params] || {}
327
+ # HTTP header 'Accept' (if needed)
328
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
329
+ # HTTP header 'Content-Type'
330
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
331
+
332
+ # form parameters
333
+ form_params = opts[:form_params] || {}
334
+
335
+ # http body (model)
336
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
337
+
338
+ # return_type
339
+ return_type = opts[:return_type] || 'DebDebRepository'
340
+
341
+ # auth_names
342
+ auth_names = opts[:auth_names] || ['Basic']
343
+
344
+ new_options = opts.merge(
345
+ :header_params => header_params,
346
+ :query_params => query_params,
347
+ :form_params => form_params,
348
+ :body => post_body,
349
+ :auth_names => auth_names,
350
+ :return_type => return_type
351
+ )
352
+
353
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
356
+ end
357
+ return data, status_code, headers
358
+ end
359
+
360
+ # Inspect a deb repository
361
+ # A ViewSet for DebRepository.
362
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
363
+ # @param [Hash] opts the optional parameters
364
+ # @option opts [String] :fields A list of fields to include in the response.
365
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
366
+ # @return [DebDebRepository]
367
+ def read(deb_repository_href, opts = {})
368
+ data, _status_code, _headers = read_with_http_info(deb_repository_href, opts)
369
+ data
370
+ end
371
+
372
+ # Inspect a deb repository
373
+ # A ViewSet for DebRepository.
374
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
375
+ # @param [Hash] opts the optional parameters
376
+ # @option opts [String] :fields A list of fields to include in the response.
377
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
378
+ # @return [Array<(DebDebRepository, Integer, Hash)>] DebDebRepository data, response status code and response headers
379
+ def read_with_http_info(deb_repository_href, opts = {})
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.read ...'
382
+ end
383
+ # verify the required parameter 'deb_repository_href' is set
384
+ if @api_client.config.client_side_validation && deb_repository_href.nil?
385
+ fail ArgumentError, "Missing the required parameter 'deb_repository_href' when calling RepositoriesAptApi.read"
386
+ end
387
+ # resource path
388
+ local_var_path = '{deb_repository_href}'.sub('{' + 'deb_repository_href' + '}', CGI.escape(deb_repository_href.to_s).gsub('%2F', '/'))
389
+
390
+ # query parameters
391
+ query_params = opts[:query_params] || {}
392
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
393
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:body]
405
+
406
+ # return_type
407
+ return_type = opts[:return_type] || 'DebDebRepository'
408
+
409
+ # auth_names
410
+ auth_names = opts[:auth_names] || ['Basic']
411
+
412
+ new_options = opts.merge(
413
+ :header_params => header_params,
414
+ :query_params => query_params,
415
+ :form_params => form_params,
416
+ :body => post_body,
417
+ :auth_names => auth_names,
418
+ :return_type => return_type
419
+ )
420
+
421
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+
428
+ # Sync from remote
429
+ # Trigger an asynchronous task to sync content
430
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
431
+ # @param data [RepositorySyncURL]
432
+ # @param [Hash] opts the optional parameters
433
+ # @return [AsyncOperationResponse]
434
+ def sync(deb_repository_href, data, opts = {})
435
+ data, _status_code, _headers = sync_with_http_info(deb_repository_href, data, opts)
436
+ data
437
+ end
438
+
439
+ # Sync from remote
440
+ # Trigger an asynchronous task to sync content
441
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
442
+ # @param data [RepositorySyncURL]
443
+ # @param [Hash] opts the optional parameters
444
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
445
+ def sync_with_http_info(deb_repository_href, data, opts = {})
446
+ if @api_client.config.debugging
447
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.sync ...'
448
+ end
449
+ # verify the required parameter 'deb_repository_href' is set
450
+ if @api_client.config.client_side_validation && deb_repository_href.nil?
451
+ fail ArgumentError, "Missing the required parameter 'deb_repository_href' when calling RepositoriesAptApi.sync"
452
+ end
453
+ # verify the required parameter 'data' is set
454
+ if @api_client.config.client_side_validation && data.nil?
455
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAptApi.sync"
456
+ end
457
+ # resource path
458
+ local_var_path = '{deb_repository_href}sync/'.sub('{' + 'deb_repository_href' + '}', CGI.escape(deb_repository_href.to_s).gsub('%2F', '/'))
459
+
460
+ # query parameters
461
+ query_params = opts[:query_params] || {}
462
+
463
+ # header parameters
464
+ header_params = opts[:header_params] || {}
465
+ # HTTP header 'Accept' (if needed)
466
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
467
+ # HTTP header 'Content-Type'
468
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
469
+
470
+ # form parameters
471
+ form_params = opts[:form_params] || {}
472
+
473
+ # http body (model)
474
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
475
+
476
+ # return_type
477
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
478
+
479
+ # auth_names
480
+ auth_names = opts[:auth_names] || ['Basic']
481
+
482
+ new_options = opts.merge(
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type
489
+ )
490
+
491
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+
498
+ # Update a deb repository
499
+ # Trigger an asynchronous task to update a repository.
500
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
501
+ # @param data [DebDebRepository]
502
+ # @param [Hash] opts the optional parameters
503
+ # @return [AsyncOperationResponse]
504
+ def update(deb_repository_href, data, opts = {})
505
+ data, _status_code, _headers = update_with_http_info(deb_repository_href, data, opts)
506
+ data
507
+ end
508
+
509
+ # Update a deb repository
510
+ # Trigger an asynchronous task to update a repository.
511
+ # @param deb_repository_href [String] URI of Deb Repository. e.g.: /pulp/api/v3/repositories/deb/apt/1/
512
+ # @param data [DebDebRepository]
513
+ # @param [Hash] opts the optional parameters
514
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
515
+ def update_with_http_info(deb_repository_href, data, opts = {})
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug 'Calling API: RepositoriesAptApi.update ...'
518
+ end
519
+ # verify the required parameter 'deb_repository_href' is set
520
+ if @api_client.config.client_side_validation && deb_repository_href.nil?
521
+ fail ArgumentError, "Missing the required parameter 'deb_repository_href' when calling RepositoriesAptApi.update"
522
+ end
523
+ # verify the required parameter 'data' is set
524
+ if @api_client.config.client_side_validation && data.nil?
525
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAptApi.update"
526
+ end
527
+ # resource path
528
+ local_var_path = '{deb_repository_href}'.sub('{' + 'deb_repository_href' + '}', CGI.escape(deb_repository_href.to_s).gsub('%2F', '/'))
529
+
530
+ # query parameters
531
+ query_params = opts[:query_params] || {}
532
+
533
+ # header parameters
534
+ header_params = opts[:header_params] || {}
535
+ # HTTP header 'Accept' (if needed)
536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
537
+ # HTTP header 'Content-Type'
538
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
539
+
540
+ # form parameters
541
+ form_params = opts[:form_params] || {}
542
+
543
+ # http body (model)
544
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
545
+
546
+ # return_type
547
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
548
+
549
+ # auth_names
550
+ auth_names = opts[:auth_names] || ['Basic']
551
+
552
+ new_options = opts.merge(
553
+ :header_params => header_params,
554
+ :query_params => query_params,
555
+ :form_params => form_params,
556
+ :body => post_body,
557
+ :auth_names => auth_names,
558
+ :return_type => return_type
559
+ )
560
+
561
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
562
+ if @api_client.config.debugging
563
+ @api_client.config.logger.debug "API called: RepositoriesAptApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
564
+ end
565
+ return data, status_code, headers
566
+ end
567
+ end
568
+ end