pulp_deb_client 2.0.0b2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +163 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentGenericContentsApi.md +194 -0
  7. data/docs/ContentInstallerFileIndexApi.md +186 -0
  8. data/docs/ContentInstallerPackagesApi.md +194 -0
  9. data/docs/ContentPackageIndexApi.md +186 -0
  10. data/docs/ContentPackagesApi.md +194 -0
  11. data/docs/ContentReleasesApi.md +186 -0
  12. data/docs/DebDistribution.md +29 -0
  13. data/docs/DebPublication.md +31 -0
  14. data/docs/DebRemote.md +57 -0
  15. data/docs/DistributionsAptApi.md +358 -0
  16. data/docs/GenericContent.md +41 -0
  17. data/docs/InlineResponse200.md +23 -0
  18. data/docs/InlineResponse2001.md +23 -0
  19. data/docs/InlineResponse2002.md +23 -0
  20. data/docs/InlineResponse2003.md +23 -0
  21. data/docs/InlineResponse2004.md +23 -0
  22. data/docs/InlineResponse2005.md +23 -0
  23. data/docs/InlineResponse2006.md +23 -0
  24. data/docs/InlineResponse2007.md +23 -0
  25. data/docs/InlineResponse2008.md +23 -0
  26. data/docs/InlineResponse2009.md +23 -0
  27. data/docs/InstallerFileIndex.md +31 -0
  28. data/docs/InstallerPackage.md +99 -0
  29. data/docs/Package.md +99 -0
  30. data/docs/PackageIndex.md +31 -0
  31. data/docs/PublicationsAptApi.md +235 -0
  32. data/docs/PublicationsVerbatimApi.md +235 -0
  33. data/docs/Release.md +31 -0
  34. data/docs/RemotesAptApi.md +417 -0
  35. data/docs/RepositorySyncURL.md +19 -0
  36. data/docs/VerbatimPublication.md +27 -0
  37. data/git_push.sh +58 -0
  38. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +239 -0
  39. data/lib/pulp_deb_client/api/content_installer_file_index_api.rb +225 -0
  40. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +235 -0
  41. data/lib/pulp_deb_client/api/content_package_index_api.rb +225 -0
  42. data/lib/pulp_deb_client/api/content_packages_api.rb +235 -0
  43. data/lib/pulp_deb_client/api/content_releases_api.rb +225 -0
  44. data/lib/pulp_deb_client/api/distributions_apt_api.rb +436 -0
  45. data/lib/pulp_deb_client/api/publications_apt_api.rb +279 -0
  46. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +279 -0
  47. data/lib/pulp_deb_client/api/remotes_apt_api.rb +510 -0
  48. data/lib/pulp_deb_client/api_client.rb +402 -0
  49. data/lib/pulp_deb_client/api_error.rb +57 -0
  50. data/lib/pulp_deb_client/configuration.rb +243 -0
  51. data/lib/pulp_deb_client/models/async_operation_response.rb +202 -0
  52. data/lib/pulp_deb_client/models/deb_distribution.rb +337 -0
  53. data/lib/pulp_deb_client/models/deb_publication.rb +282 -0
  54. data/lib/pulp_deb_client/models/deb_remote.rb +653 -0
  55. data/lib/pulp_deb_client/models/generic_content.rb +444 -0
  56. data/lib/pulp_deb_client/models/inline_response200.rb +235 -0
  57. data/lib/pulp_deb_client/models/inline_response2001.rb +235 -0
  58. data/lib/pulp_deb_client/models/inline_response2002.rb +235 -0
  59. data/lib/pulp_deb_client/models/inline_response2003.rb +235 -0
  60. data/lib/pulp_deb_client/models/inline_response2004.rb +235 -0
  61. data/lib/pulp_deb_client/models/inline_response2005.rb +235 -0
  62. data/lib/pulp_deb_client/models/inline_response2006.rb +235 -0
  63. data/lib/pulp_deb_client/models/inline_response2007.rb +235 -0
  64. data/lib/pulp_deb_client/models/inline_response2008.rb +235 -0
  65. data/lib/pulp_deb_client/models/inline_response2009.rb +235 -0
  66. data/lib/pulp_deb_client/models/installer_file_index.rb +355 -0
  67. data/lib/pulp_deb_client/models/installer_package.rb +1101 -0
  68. data/lib/pulp_deb_client/models/package.rb +1101 -0
  69. data/lib/pulp_deb_client/models/package_index.rb +355 -0
  70. data/lib/pulp_deb_client/models/release.rb +356 -0
  71. data/lib/pulp_deb_client/models/repository_sync_url.rb +214 -0
  72. data/lib/pulp_deb_client/models/verbatim_publication.rb +258 -0
  73. data/lib/pulp_deb_client/version.rb +15 -0
  74. data/lib/pulp_deb_client.rb +71 -0
  75. data/pulp_deb_client.gemspec +39 -0
  76. data/spec/api/content_generic_contents_api_spec.rb +80 -0
  77. data/spec/api/content_installer_file_index_api_spec.rb +77 -0
  78. data/spec/api/content_installer_packages_api_spec.rb +80 -0
  79. data/spec/api/content_package_index_api_spec.rb +77 -0
  80. data/spec/api/content_packages_api_spec.rb +80 -0
  81. data/spec/api/content_releases_api_spec.rb +77 -0
  82. data/spec/api/distributions_apt_api_spec.rb +118 -0
  83. data/spec/api/publications_apt_api_spec.rb +87 -0
  84. data/spec/api/publications_verbatim_api_spec.rb +87 -0
  85. data/spec/api/remotes_apt_api_spec.rb +132 -0
  86. data/spec/api_client_spec.rb +188 -0
  87. data/spec/configuration_spec.rb +42 -0
  88. data/spec/models/async_operation_response_spec.rb +41 -0
  89. data/spec/models/deb_distribution_spec.rb +77 -0
  90. data/spec/models/deb_publication_spec.rb +83 -0
  91. data/spec/models/deb_remote_spec.rb +165 -0
  92. data/spec/models/generic_content_spec.rb +113 -0
  93. data/spec/models/inline_response2001_spec.rb +59 -0
  94. data/spec/models/inline_response2002_spec.rb +59 -0
  95. data/spec/models/inline_response2003_spec.rb +59 -0
  96. data/spec/models/inline_response2004_spec.rb +59 -0
  97. data/spec/models/inline_response2005_spec.rb +59 -0
  98. data/spec/models/inline_response2006_spec.rb +59 -0
  99. data/spec/models/inline_response2007_spec.rb +59 -0
  100. data/spec/models/inline_response2008_spec.rb +59 -0
  101. data/spec/models/inline_response2009_spec.rb +59 -0
  102. data/spec/models/inline_response200_spec.rb +59 -0
  103. data/spec/models/installer_file_index_spec.rb +83 -0
  104. data/spec/models/installer_package_spec.rb +287 -0
  105. data/spec/models/package_index_spec.rb +83 -0
  106. data/spec/models/package_spec.rb +287 -0
  107. data/spec/models/release_spec.rb +83 -0
  108. data/spec/models/repository_sync_url_spec.rb +47 -0
  109. data/spec/models/verbatim_publication_spec.rb +71 -0
  110. data/spec/spec_helper.rb +111 -0
  111. metadata +242 -0
@@ -0,0 +1,235 @@
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.1.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpDebClient
16
+ class ContentInstallerPackagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an installer package
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :artifact Artifact file representing the physical content
26
+ # @option opts [String] :relative_path Path where the artifact is located relative to distributions base_path
27
+ # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
28
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
29
+ # @return [AsyncOperationResponse]
30
+ def create(opts = {})
31
+ data, _status_code, _headers = create_with_http_info(opts)
32
+ data
33
+ end
34
+
35
+ # Create an installer package
36
+ # Trigger an asynchronous task to create content,optionally create new repository version.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :artifact Artifact file representing the physical content
39
+ # @option opts [String] :relative_path Path where the artifact is located relative to distributions base_path
40
+ # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
41
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
42
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
43
+ def create_with_http_info(opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: ContentInstallerPackagesApi.create ...'
46
+ end
47
+ if @api_client.config.client_side_validation && !opts[:'relative_path'].nil? && opts[:'relative_path'].to_s.length < 1
48
+ fail ArgumentError, 'invalid value for "opts[:"relative_path"]" when calling ContentInstallerPackagesApi.create, the character length must be great than or equal to 1.'
49
+ end
50
+
51
+ # resource path
52
+ local_var_path = '/pulp/api/v3/content/deb/installer_packages/'
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(['multipart/form-data', 'application/x-www-form-urlencoded'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+ form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
67
+ form_params['relative_path'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
68
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
69
+ form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
70
+
71
+ # http body (model)
72
+ post_body = opts[:body]
73
+
74
+ # return_type
75
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
76
+
77
+ # auth_names
78
+ auth_names = opts[:auth_names] || ['Basic']
79
+
80
+ new_options = opts.merge(
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: ContentInstallerPackagesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # List installer packages
97
+ # A ViewSet for InstallerPackage.
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [String] :repository_version Repository Version referenced by HREF
100
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
101
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
102
+ # @option opts [Integer] :limit Number of results to return per page.
103
+ # @option opts [Integer] :offset The initial index from which to return the results.
104
+ # @option opts [String] :fields A list of fields to include in the response.
105
+ # @return [InlineResponse2002]
106
+ def list(opts = {})
107
+ data, _status_code, _headers = list_with_http_info(opts)
108
+ data
109
+ end
110
+
111
+ # List installer packages
112
+ # A ViewSet for InstallerPackage.
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :repository_version Repository Version referenced by HREF
115
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
116
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
117
+ # @option opts [Integer] :limit Number of results to return per page.
118
+ # @option opts [Integer] :offset The initial index from which to return the results.
119
+ # @option opts [String] :fields A list of fields to include in the response.
120
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
121
+ def list_with_http_info(opts = {})
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug 'Calling API: ContentInstallerPackagesApi.list ...'
124
+ end
125
+ # resource path
126
+ local_var_path = '/pulp/api/v3/content/deb/installer_packages/'
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
131
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
132
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
133
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
134
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
135
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
136
+
137
+ # header parameters
138
+ header_params = opts[:header_params] || {}
139
+ # HTTP header 'Accept' (if needed)
140
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
141
+
142
+ # form parameters
143
+ form_params = opts[:form_params] || {}
144
+
145
+ # http body (model)
146
+ post_body = opts[:body]
147
+
148
+ # return_type
149
+ return_type = opts[:return_type] || 'InlineResponse2002'
150
+
151
+ # auth_names
152
+ auth_names = opts[:auth_names] || ['Basic']
153
+
154
+ new_options = opts.merge(
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: ContentInstallerPackagesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Inspect an installer package
171
+ # A ViewSet for InstallerPackage.
172
+ # @param installer_package_href [String] URI of Installer Package. e.g.: /pulp/api/v3/content/deb/installer_packages/1/
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [String] :fields A list of fields to include in the response.
175
+ # @return [InstallerPackage]
176
+ def read(installer_package_href, opts = {})
177
+ data, _status_code, _headers = read_with_http_info(installer_package_href, opts)
178
+ data
179
+ end
180
+
181
+ # Inspect an installer package
182
+ # A ViewSet for InstallerPackage.
183
+ # @param installer_package_href [String] URI of Installer Package. e.g.: /pulp/api/v3/content/deb/installer_packages/1/
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [String] :fields A list of fields to include in the response.
186
+ # @return [Array<(InstallerPackage, Integer, Hash)>] InstallerPackage data, response status code and response headers
187
+ def read_with_http_info(installer_package_href, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: ContentInstallerPackagesApi.read ...'
190
+ end
191
+ # verify the required parameter 'installer_package_href' is set
192
+ if @api_client.config.client_side_validation && installer_package_href.nil?
193
+ fail ArgumentError, "Missing the required parameter 'installer_package_href' when calling ContentInstallerPackagesApi.read"
194
+ end
195
+ # resource path
196
+ local_var_path = '{installer_package_href}'.sub('{' + 'installer_package_href' + '}', CGI.escape(installer_package_href.to_s).gsub('%2F', '/'))
197
+
198
+ # query parameters
199
+ query_params = opts[:query_params] || {}
200
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
201
+
202
+ # header parameters
203
+ header_params = opts[:header_params] || {}
204
+ # HTTP header 'Accept' (if needed)
205
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
206
+
207
+ # form parameters
208
+ form_params = opts[:form_params] || {}
209
+
210
+ # http body (model)
211
+ post_body = opts[:body]
212
+
213
+ # return_type
214
+ return_type = opts[:return_type] || 'InstallerPackage'
215
+
216
+ # auth_names
217
+ auth_names = opts[:auth_names] || ['Basic']
218
+
219
+ new_options = opts.merge(
220
+ :header_params => header_params,
221
+ :query_params => query_params,
222
+ :form_params => form_params,
223
+ :body => post_body,
224
+ :auth_names => auth_names,
225
+ :return_type => return_type
226
+ )
227
+
228
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug "API called: ContentInstallerPackagesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
231
+ end
232
+ return data, status_code, headers
233
+ end
234
+ end
235
+ end
@@ -0,0 +1,225 @@
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.1.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpDebClient
16
+ class ContentPackageIndexApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a package index
23
+ # A ViewSet for PackageIndex.
24
+ # @param data [PackageIndex]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [PackageIndex]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a package index
33
+ # A ViewSet for PackageIndex.
34
+ # @param data [PackageIndex]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(PackageIndex, Integer, Hash)>] PackageIndex 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: ContentPackageIndexApi.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 ContentPackageIndexApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/deb/package_index/'
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] || 'PackageIndex'
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: ContentPackageIndexApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List PackageIndices
87
+ # A ViewSet for PackageIndex.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :repository_version Repository Version referenced by HREF
90
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
91
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
92
+ # @option opts [Integer] :limit Number of results to return per page.
93
+ # @option opts [Integer] :offset The initial index from which to return the results.
94
+ # @option opts [String] :fields A list of fields to include in the response.
95
+ # @return [InlineResponse2003]
96
+ def list(opts = {})
97
+ data, _status_code, _headers = list_with_http_info(opts)
98
+ data
99
+ end
100
+
101
+ # List PackageIndices
102
+ # A ViewSet for PackageIndex.
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :repository_version Repository Version referenced by HREF
105
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
106
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
107
+ # @option opts [Integer] :limit Number of results to return per page.
108
+ # @option opts [Integer] :offset The initial index from which to return the results.
109
+ # @option opts [String] :fields A list of fields to include in the response.
110
+ # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
111
+ def list_with_http_info(opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug 'Calling API: ContentPackageIndexApi.list ...'
114
+ end
115
+ # resource path
116
+ local_var_path = '/pulp/api/v3/content/deb/package_index/'
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
121
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
122
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
123
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
124
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
125
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
126
+
127
+ # header parameters
128
+ header_params = opts[:header_params] || {}
129
+ # HTTP header 'Accept' (if needed)
130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
131
+
132
+ # form parameters
133
+ form_params = opts[:form_params] || {}
134
+
135
+ # http body (model)
136
+ post_body = opts[:body]
137
+
138
+ # return_type
139
+ return_type = opts[:return_type] || 'InlineResponse2003'
140
+
141
+ # auth_names
142
+ auth_names = opts[:auth_names] || ['Basic']
143
+
144
+ new_options = opts.merge(
145
+ :header_params => header_params,
146
+ :query_params => query_params,
147
+ :form_params => form_params,
148
+ :body => post_body,
149
+ :auth_names => auth_names,
150
+ :return_type => return_type
151
+ )
152
+
153
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "API called: ContentPackageIndexApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ end
157
+ return data, status_code, headers
158
+ end
159
+
160
+ # Inspect a package index
161
+ # A ViewSet for PackageIndex.
162
+ # @param package_index_href [String] URI of Package Index. e.g.: /pulp/api/v3/content/deb/package_index/1/
163
+ # @param [Hash] opts the optional parameters
164
+ # @option opts [String] :fields A list of fields to include in the response.
165
+ # @return [PackageIndex]
166
+ def read(package_index_href, opts = {})
167
+ data, _status_code, _headers = read_with_http_info(package_index_href, opts)
168
+ data
169
+ end
170
+
171
+ # Inspect a package index
172
+ # A ViewSet for PackageIndex.
173
+ # @param package_index_href [String] URI of Package Index. e.g.: /pulp/api/v3/content/deb/package_index/1/
174
+ # @param [Hash] opts the optional parameters
175
+ # @option opts [String] :fields A list of fields to include in the response.
176
+ # @return [Array<(PackageIndex, Integer, Hash)>] PackageIndex data, response status code and response headers
177
+ def read_with_http_info(package_index_href, opts = {})
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug 'Calling API: ContentPackageIndexApi.read ...'
180
+ end
181
+ # verify the required parameter 'package_index_href' is set
182
+ if @api_client.config.client_side_validation && package_index_href.nil?
183
+ fail ArgumentError, "Missing the required parameter 'package_index_href' when calling ContentPackageIndexApi.read"
184
+ end
185
+ # resource path
186
+ local_var_path = '{package_index_href}'.sub('{' + 'package_index_href' + '}', CGI.escape(package_index_href.to_s).gsub('%2F', '/'))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
191
+
192
+ # header parameters
193
+ header_params = opts[:header_params] || {}
194
+ # HTTP header 'Accept' (if needed)
195
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:body]
202
+
203
+ # return_type
204
+ return_type = opts[:return_type] || 'PackageIndex'
205
+
206
+ # auth_names
207
+ auth_names = opts[:auth_names] || ['Basic']
208
+
209
+ new_options = opts.merge(
210
+ :header_params => header_params,
211
+ :query_params => query_params,
212
+ :form_params => form_params,
213
+ :body => post_body,
214
+ :auth_names => auth_names,
215
+ :return_type => return_type
216
+ )
217
+
218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: ContentPackageIndexApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+ end
225
+ end