pulp_docker_client 4.0.0b5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +131 -0
  5. data/Rakefile +10 -0
  6. data/docs/AsyncOperationResponse.md +17 -0
  7. data/docs/Blob.md +29 -0
  8. data/docs/ContentBlobsApi.md +182 -0
  9. data/docs/ContentManifestTagsApi.md +182 -0
  10. data/docs/ContentManifestsApi.md +180 -0
  11. data/docs/DistributionsDockerApi.md +352 -0
  12. data/docs/DockerDistribution.md +31 -0
  13. data/docs/DockerRemote.md +49 -0
  14. data/docs/InlineResponse200.md +23 -0
  15. data/docs/InlineResponse2001.md +23 -0
  16. data/docs/InlineResponse2002.md +23 -0
  17. data/docs/InlineResponse2003.md +23 -0
  18. data/docs/InlineResponse2004.md +23 -0
  19. data/docs/Manifest.md +37 -0
  20. data/docs/ManifestTag.md +29 -0
  21. data/docs/RemotesDockerApi.md +411 -0
  22. data/docs/RepositorySyncURL.md +19 -0
  23. data/git_push.sh +55 -0
  24. data/lib/pulp_docker_client/api/content_blobs_api.rb +222 -0
  25. data/lib/pulp_docker_client/api/content_manifest_tags_api.rb +222 -0
  26. data/lib/pulp_docker_client/api/content_manifests_api.rb +219 -0
  27. data/lib/pulp_docker_client/api/distributions_docker_api.rb +430 -0
  28. data/lib/pulp_docker_client/api/remotes_docker_api.rb +504 -0
  29. data/lib/pulp_docker_client/api_client.rb +387 -0
  30. data/lib/pulp_docker_client/api_error.rb +57 -0
  31. data/lib/pulp_docker_client/configuration.rb +251 -0
  32. data/lib/pulp_docker_client/models/async_operation_response.rb +202 -0
  33. data/lib/pulp_docker_client/models/blob.rb +347 -0
  34. data/lib/pulp_docker_client/models/docker_distribution.rb +347 -0
  35. data/lib/pulp_docker_client/models/docker_remote.rb +598 -0
  36. data/lib/pulp_docker_client/models/inline_response200.rb +235 -0
  37. data/lib/pulp_docker_client/models/inline_response2001.rb +235 -0
  38. data/lib/pulp_docker_client/models/inline_response2002.rb +235 -0
  39. data/lib/pulp_docker_client/models/inline_response2003.rb +235 -0
  40. data/lib/pulp_docker_client/models/inline_response2004.rb +235 -0
  41. data/lib/pulp_docker_client/models/manifest.rb +411 -0
  42. data/lib/pulp_docker_client/models/manifest_tag.rb +328 -0
  43. data/lib/pulp_docker_client/models/repository_sync_url.rb +214 -0
  44. data/lib/pulp_docker_client/version.rb +15 -0
  45. data/lib/pulp_docker_client.rb +56 -0
  46. data/pulp_docker_client.gemspec +45 -0
  47. data/spec/api/content_blobs_api_spec.rb +76 -0
  48. data/spec/api/content_manifest_tags_api_spec.rb +76 -0
  49. data/spec/api/content_manifests_api_spec.rb +75 -0
  50. data/spec/api/distributions_docker_api_spec.rb +116 -0
  51. data/spec/api/remotes_docker_api_spec.rb +130 -0
  52. data/spec/api_client_spec.rb +226 -0
  53. data/spec/configuration_spec.rb +42 -0
  54. data/spec/models/async_operation_response_spec.rb +41 -0
  55. data/spec/models/blob_spec.rb +77 -0
  56. data/spec/models/docker_distribution_spec.rb +83 -0
  57. data/spec/models/docker_remote_spec.rb +141 -0
  58. data/spec/models/inline_response2001_spec.rb +59 -0
  59. data/spec/models/inline_response2002_spec.rb +59 -0
  60. data/spec/models/inline_response2003_spec.rb +59 -0
  61. data/spec/models/inline_response2004_spec.rb +59 -0
  62. data/spec/models/inline_response200_spec.rb +59 -0
  63. data/spec/models/manifest_spec.rb +101 -0
  64. data/spec/models/manifest_tag_spec.rb +77 -0
  65. data/spec/models/repository_sync_url_spec.rb +47 -0
  66. data/spec/spec_helper.rb +111 -0
  67. metadata +309 -0
@@ -0,0 +1,222 @@
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.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpDockerClient
16
+ class ContentBlobsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a manifest blob
23
+ # Create a new ManifestBlob from a request.
24
+ # @param data [Blob]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Blob]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a manifest blob
33
+ # Create a new ManifestBlob from a request.
34
+ # @param data [Blob]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Blob, Integer, Hash)>] Blob 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: ContentBlobsApi.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 ContentBlobsApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/docker/blobs/'
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] || 'Blob'
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: ContentBlobsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List manifest blobs
87
+ # ViewSet for ManifestBlobs.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :digest Filter results where digest matches value
90
+ # @option opts [String] :repository_version Repository Version referenced by HREF
91
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
92
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
93
+ # @option opts [Integer] :page A page number within the paginated result set.
94
+ # @option opts [Integer] :page_size Number of results to return per page.
95
+ # @return [InlineResponse200]
96
+ def list(opts = {})
97
+ data, _status_code, _headers = list_with_http_info(opts)
98
+ data
99
+ end
100
+
101
+ # List manifest blobs
102
+ # ViewSet for ManifestBlobs.
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :digest Filter results where digest matches value
105
+ # @option opts [String] :repository_version Repository Version referenced by HREF
106
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
107
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
108
+ # @option opts [Integer] :page A page number within the paginated result set.
109
+ # @option opts [Integer] :page_size Number of results to return per page.
110
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 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: ContentBlobsApi.list ...'
114
+ end
115
+ # resource path
116
+ local_var_path = '/pulp/api/v3/content/docker/blobs/'
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+ query_params[:'digest'] = opts[:'digest'] if !opts[:'digest'].nil?
121
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
122
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
123
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
124
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
125
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'InlineResponse200'
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: ContentBlobsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ end
157
+ return data, status_code, headers
158
+ end
159
+
160
+ # Inspect a manifest blob
161
+ # ViewSet for ManifestBlobs.
162
+ # @param manifest_blob_href [String] URI of Manifest Blob. e.g.: /pulp/api/v3/content/docker/blobs/1/
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [Blob]
165
+ def read(manifest_blob_href, opts = {})
166
+ data, _status_code, _headers = read_with_http_info(manifest_blob_href, opts)
167
+ data
168
+ end
169
+
170
+ # Inspect a manifest blob
171
+ # ViewSet for ManifestBlobs.
172
+ # @param manifest_blob_href [String] URI of Manifest Blob. e.g.: /pulp/api/v3/content/docker/blobs/1/
173
+ # @param [Hash] opts the optional parameters
174
+ # @return [Array<(Blob, Integer, Hash)>] Blob data, response status code and response headers
175
+ def read_with_http_info(manifest_blob_href, opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: ContentBlobsApi.read ...'
178
+ end
179
+ # verify the required parameter 'manifest_blob_href' is set
180
+ if @api_client.config.client_side_validation && manifest_blob_href.nil?
181
+ fail ArgumentError, "Missing the required parameter 'manifest_blob_href' when calling ContentBlobsApi.read"
182
+ end
183
+ # resource path
184
+ local_var_path = '{manifest_blob_href}'.sub('{' + 'manifest_blob_href' + '}', manifest_blob_href.to_s)
185
+
186
+ # query parameters
187
+ query_params = opts[:query_params] || {}
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] || 'Blob'
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: ContentBlobsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+ end
222
+ end
@@ -0,0 +1,222 @@
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.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpDockerClient
16
+ class ContentManifestTagsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a manifest tag
23
+ # Create a new ManifestTag from a request.
24
+ # @param data [ManifestTag]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ManifestTag]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a manifest tag
33
+ # Create a new ManifestTag from a request.
34
+ # @param data [ManifestTag]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ManifestTag, Integer, Hash)>] ManifestTag 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: ContentManifestTagsApi.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 ContentManifestTagsApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/docker/manifest-tags/'
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] || 'ManifestTag'
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: ContentManifestTagsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List manifest tags
87
+ # ViewSet for ManifestTag.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :name Filter results where name matches value
90
+ # @option opts [String] :repository_version Repository Version referenced by HREF
91
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
92
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
93
+ # @option opts [Integer] :page A page number within the paginated result set.
94
+ # @option opts [Integer] :page_size Number of results to return per page.
95
+ # @return [InlineResponse2001]
96
+ def list(opts = {})
97
+ data, _status_code, _headers = list_with_http_info(opts)
98
+ data
99
+ end
100
+
101
+ # List manifest tags
102
+ # ViewSet for ManifestTag.
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :name Filter results where name matches value
105
+ # @option opts [String] :repository_version Repository Version referenced by HREF
106
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
107
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
108
+ # @option opts [Integer] :page A page number within the paginated result set.
109
+ # @option opts [Integer] :page_size Number of results to return per page.
110
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 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: ContentManifestTagsApi.list ...'
114
+ end
115
+ # resource path
116
+ local_var_path = '/pulp/api/v3/content/docker/manifest-tags/'
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
121
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
122
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
123
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
124
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
125
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'InlineResponse2001'
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: ContentManifestTagsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ end
157
+ return data, status_code, headers
158
+ end
159
+
160
+ # Inspect a manifest tag
161
+ # ViewSet for ManifestTag.
162
+ # @param manifest_tag_href [String] URI of Manifest Tag. e.g.: /pulp/api/v3/content/docker/manifest-tags/1/
163
+ # @param [Hash] opts the optional parameters
164
+ # @return [ManifestTag]
165
+ def read(manifest_tag_href, opts = {})
166
+ data, _status_code, _headers = read_with_http_info(manifest_tag_href, opts)
167
+ data
168
+ end
169
+
170
+ # Inspect a manifest tag
171
+ # ViewSet for ManifestTag.
172
+ # @param manifest_tag_href [String] URI of Manifest Tag. e.g.: /pulp/api/v3/content/docker/manifest-tags/1/
173
+ # @param [Hash] opts the optional parameters
174
+ # @return [Array<(ManifestTag, Integer, Hash)>] ManifestTag data, response status code and response headers
175
+ def read_with_http_info(manifest_tag_href, opts = {})
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug 'Calling API: ContentManifestTagsApi.read ...'
178
+ end
179
+ # verify the required parameter 'manifest_tag_href' is set
180
+ if @api_client.config.client_side_validation && manifest_tag_href.nil?
181
+ fail ArgumentError, "Missing the required parameter 'manifest_tag_href' when calling ContentManifestTagsApi.read"
182
+ end
183
+ # resource path
184
+ local_var_path = '{manifest_tag_href}'.sub('{' + 'manifest_tag_href' + '}', manifest_tag_href.to_s)
185
+
186
+ # query parameters
187
+ query_params = opts[:query_params] || {}
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] || 'ManifestTag'
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: ContentManifestTagsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+ end
222
+ end
@@ -0,0 +1,219 @@
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.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpDockerClient
16
+ class ContentManifestsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a manifest
23
+ # Create a new Manifest from a request.
24
+ # @param data [Manifest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Manifest]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a manifest
33
+ # Create a new Manifest from a request.
34
+ # @param data [Manifest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Manifest, Integer, Hash)>] Manifest 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: ContentManifestsApi.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 ContentManifestsApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/docker/manifests/'
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] || 'Manifest'
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: ContentManifestsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List manifests
87
+ # ViewSet for Manifest.
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] :page A page number within the paginated result set.
93
+ # @option opts [Integer] :page_size Number of results to return per page.
94
+ # @return [InlineResponse2002]
95
+ def list(opts = {})
96
+ data, _status_code, _headers = list_with_http_info(opts)
97
+ data
98
+ end
99
+
100
+ # List manifests
101
+ # ViewSet for Manifest.
102
+ # @param [Hash] opts the optional parameters
103
+ # @option opts [String] :repository_version Repository Version referenced by HREF
104
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
105
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
106
+ # @option opts [Integer] :page A page number within the paginated result set.
107
+ # @option opts [Integer] :page_size Number of results to return per page.
108
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
109
+ def list_with_http_info(opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: ContentManifestsApi.list ...'
112
+ end
113
+ # resource path
114
+ local_var_path = '/pulp/api/v3/content/docker/manifests/'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
119
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
120
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
121
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
122
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
123
+
124
+ # header parameters
125
+ header_params = opts[:header_params] || {}
126
+ # HTTP header 'Accept' (if needed)
127
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:body]
134
+
135
+ # return_type
136
+ return_type = opts[:return_type] || 'InlineResponse2002'
137
+
138
+ # auth_names
139
+ auth_names = opts[:auth_names] || ['Basic']
140
+
141
+ new_options = opts.merge(
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "API called: ContentManifestsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ end
154
+ return data, status_code, headers
155
+ end
156
+
157
+ # Inspect a manifest
158
+ # ViewSet for Manifest.
159
+ # @param manifest_href [String] URI of Manifest. e.g.: /pulp/api/v3/content/docker/manifests/1/
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Manifest]
162
+ def read(manifest_href, opts = {})
163
+ data, _status_code, _headers = read_with_http_info(manifest_href, opts)
164
+ data
165
+ end
166
+
167
+ # Inspect a manifest
168
+ # ViewSet for Manifest.
169
+ # @param manifest_href [String] URI of Manifest. e.g.: /pulp/api/v3/content/docker/manifests/1/
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [Array<(Manifest, Integer, Hash)>] Manifest data, response status code and response headers
172
+ def read_with_http_info(manifest_href, opts = {})
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug 'Calling API: ContentManifestsApi.read ...'
175
+ end
176
+ # verify the required parameter 'manifest_href' is set
177
+ if @api_client.config.client_side_validation && manifest_href.nil?
178
+ fail ArgumentError, "Missing the required parameter 'manifest_href' when calling ContentManifestsApi.read"
179
+ end
180
+ # resource path
181
+ local_var_path = '{manifest_href}'.sub('{' + 'manifest_href' + '}', manifest_href.to_s)
182
+
183
+ # query parameters
184
+ query_params = opts[:query_params] || {}
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ # HTTP header 'Accept' (if needed)
189
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
190
+
191
+ # form parameters
192
+ form_params = opts[:form_params] || {}
193
+
194
+ # http body (model)
195
+ post_body = opts[:body]
196
+
197
+ # return_type
198
+ return_type = opts[:return_type] || 'Manifest'
199
+
200
+ # auth_names
201
+ auth_names = opts[:auth_names] || ['Basic']
202
+
203
+ new_options = opts.merge(
204
+ :header_params => header_params,
205
+ :query_params => query_params,
206
+ :form_params => form_params,
207
+ :body => post_body,
208
+ :auth_names => auth_names,
209
+ :return_type => return_type
210
+ )
211
+
212
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug "API called: ContentManifestsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
+ end
216
+ return data, status_code, headers
217
+ end
218
+ end
219
+ end