pulp_maven_client 0.24.1 → 0.25.1
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.
- checksums.yaml +4 -4
- data/README.md +26 -4
- data/docs/ContentPackageApi.md +351 -0
- data/docs/DistributionsMavenApi.md +312 -0
- data/docs/MavenMavenPackageResponse.md +48 -0
- data/docs/MyPermissionsResponse.md +18 -0
- data/docs/NestedRole.md +22 -0
- data/docs/NestedRoleResponse.md +22 -0
- data/docs/ObjectRolesResponse.md +18 -0
- data/docs/PaginatedmavenMavenPackageResponseList.md +24 -0
- data/docs/RemotesMavenApi.md +312 -0
- data/docs/RepositoriesMavenApi.md +315 -3
- data/lib/pulp_maven_client/api/content_package_api.rb +369 -0
- data/lib/pulp_maven_client/api/distributions_maven_api.rb +298 -0
- data/lib/pulp_maven_client/api/remotes_maven_api.rb +298 -0
- data/lib/pulp_maven_client/api/repositories_maven_api.rb +304 -6
- data/lib/pulp_maven_client/models/maven_maven_package_response.rb +371 -0
- data/lib/pulp_maven_client/models/my_permissions_response.rb +223 -0
- data/lib/pulp_maven_client/models/nested_role.rb +263 -0
- data/lib/pulp_maven_client/models/nested_role_response.rb +244 -0
- data/lib/pulp_maven_client/models/object_roles_response.rb +223 -0
- data/lib/pulp_maven_client/models/paginatedmaven_maven_package_response_list.rb +257 -0
- data/lib/pulp_maven_client/version.rb +1 -1
- data/lib/pulp_maven_client.rb +7 -0
- data/spec/api/content_package_api_spec.rb +109 -0
- data/spec/api/distributions_maven_api_spec.rb +58 -0
- data/spec/api/remotes_maven_api_spec.rb +58 -0
- data/spec/api/repositories_maven_api_spec.rb +61 -3
- data/spec/models/maven_maven_package_response_spec.rb +126 -0
- data/spec/models/my_permissions_response_spec.rb +36 -0
- data/spec/models/nested_role_response_spec.rb +48 -0
- data/spec/models/nested_role_spec.rb +48 -0
- data/spec/models/object_roles_response_spec.rb +36 -0
- data/spec/models/paginatedmaven_maven_package_response_list_spec.rb +54 -0
- metadata +56 -28
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PulpMavenClient
|
|
16
|
+
class ContentPackageApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List maven packages
|
|
23
|
+
# A read-only ViewSet for MavenPackage. MavenPackage represents a logical Maven package at the GAV (groupId, artifactId, version) level. Packages are automatically created when artifacts are added to a repository.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
26
|
+
# @option opts [String] :artifact_id Filter results where artifact_id matches value
|
|
27
|
+
# @option opts [String] :group_id Filter results where group_id matches value
|
|
28
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
29
|
+
# @option opts [String] :name Filter results where name matches value
|
|
30
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
31
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `group_id` - Group id * `-group_id` - Group id (descending) * `artifact_id` - Artifact id * `-artifact_id` - Artifact id (descending) * `version` - Version * `-version` - Version (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `packaging` - Packaging * `-packaging` - Packaging (descending) * `url` - Url * `-url` - Url (descending) * `licenses` - Licenses * `-licenses` - Licenses (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `scm_url` - Scm url * `-scm_url` - Scm url (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
32
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
33
|
+
# @option opts [String] :packaging Filter results where packaging matches value
|
|
34
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
35
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
36
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
37
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
38
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
39
|
+
# @option opts [String] :repository_version
|
|
40
|
+
# @option opts [String] :repository_version_added
|
|
41
|
+
# @option opts [String] :repository_version_removed
|
|
42
|
+
# @option opts [String] :version Filter results where version matches value
|
|
43
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
44
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
45
|
+
# @return [PaginatedmavenMavenPackageResponseList]
|
|
46
|
+
def list(opts = {})
|
|
47
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
48
|
+
data
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List maven packages
|
|
52
|
+
# A read-only ViewSet for MavenPackage. MavenPackage represents a logical Maven package at the GAV (groupId, artifactId, version) level. Packages are automatically created when artifacts are added to a repository.
|
|
53
|
+
# @param [Hash] opts the optional parameters
|
|
54
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
55
|
+
# @option opts [String] :artifact_id Filter results where artifact_id matches value
|
|
56
|
+
# @option opts [String] :group_id Filter results where group_id matches value
|
|
57
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
58
|
+
# @option opts [String] :name Filter results where name matches value
|
|
59
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
60
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `group_id` - Group id * `-group_id` - Group id (descending) * `artifact_id` - Artifact id * `-artifact_id` - Artifact id (descending) * `version` - Version * `-version` - Version (descending) * `name` - Name * `-name` - Name (descending) * `description` - Description * `-description` - Description (descending) * `packaging` - Packaging * `-packaging` - Packaging (descending) * `url` - Url * `-url` - Url (descending) * `licenses` - Licenses * `-licenses` - Licenses (descending) * `dependencies` - Dependencies * `-dependencies` - Dependencies (descending) * `scm_url` - Scm url * `-scm_url` - Scm url (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
61
|
+
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
|
62
|
+
# @option opts [String] :packaging Filter results where packaging matches value
|
|
63
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
64
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
65
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
66
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
67
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
68
|
+
# @option opts [String] :repository_version
|
|
69
|
+
# @option opts [String] :repository_version_added
|
|
70
|
+
# @option opts [String] :repository_version_removed
|
|
71
|
+
# @option opts [String] :version Filter results where version matches value
|
|
72
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
73
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
74
|
+
# @return [Array<(PaginatedmavenMavenPackageResponseList, Integer, Hash)>] PaginatedmavenMavenPackageResponseList data, response status code and response headers
|
|
75
|
+
def list_with_http_info(opts = {})
|
|
76
|
+
if @api_client.config.debugging
|
|
77
|
+
@api_client.config.logger.debug 'Calling API: ContentPackageApi.list ...'
|
|
78
|
+
end
|
|
79
|
+
allowable_values = ["-artifact_id", "-dependencies", "-description", "-group_id", "-licenses", "-name", "-packaging", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-scm_url", "-timestamp_of_interest", "-upstream_id", "-url", "-version", "artifact_id", "dependencies", "description", "group_id", "licenses", "name", "packaging", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "scm_url", "timestamp_of_interest", "upstream_id", "url", "version"]
|
|
80
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
|
81
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
|
82
|
+
end
|
|
83
|
+
# resource path
|
|
84
|
+
local_var_path = '/pulp/api/v3/content/maven/package/'
|
|
85
|
+
|
|
86
|
+
# query parameters
|
|
87
|
+
query_params = opts[:query_params] || {}
|
|
88
|
+
query_params[:'artifact_id'] = opts[:'artifact_id'] if !opts[:'artifact_id'].nil?
|
|
89
|
+
query_params[:'group_id'] = opts[:'group_id'] if !opts[:'group_id'].nil?
|
|
90
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
91
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
92
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
93
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
|
94
|
+
query_params[:'orphaned_for'] = opts[:'orphaned_for'] if !opts[:'orphaned_for'].nil?
|
|
95
|
+
query_params[:'packaging'] = opts[:'packaging'] if !opts[:'packaging'].nil?
|
|
96
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
|
97
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
|
98
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
|
99
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
|
100
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
101
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
102
|
+
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|
|
103
|
+
query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
|
|
104
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
105
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
106
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
107
|
+
|
|
108
|
+
# header parameters
|
|
109
|
+
header_params = opts[:header_params] || {}
|
|
110
|
+
# HTTP header 'Accept' (if needed)
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
112
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
113
|
+
|
|
114
|
+
# form parameters
|
|
115
|
+
form_params = opts[:form_params] || {}
|
|
116
|
+
|
|
117
|
+
# http body (model)
|
|
118
|
+
post_body = opts[:debug_body]
|
|
119
|
+
|
|
120
|
+
# return_type
|
|
121
|
+
return_type = opts[:debug_return_type] || 'PaginatedmavenMavenPackageResponseList'
|
|
122
|
+
|
|
123
|
+
# auth_names
|
|
124
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
125
|
+
|
|
126
|
+
new_options = opts.merge(
|
|
127
|
+
:operation => :"ContentPackageApi.list",
|
|
128
|
+
:header_params => header_params,
|
|
129
|
+
:query_params => query_params,
|
|
130
|
+
:form_params => form_params,
|
|
131
|
+
:body => post_body,
|
|
132
|
+
:auth_names => auth_names,
|
|
133
|
+
:return_type => return_type
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug "API called: ContentPackageApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
139
|
+
end
|
|
140
|
+
return data, status_code, headers
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Inspect a maven package
|
|
144
|
+
# A read-only ViewSet for MavenPackage. MavenPackage represents a logical Maven package at the GAV (groupId, artifactId, version) level. Packages are automatically created when artifacts are added to a repository.
|
|
145
|
+
# @param maven_maven_package_href [String]
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
148
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
149
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
150
|
+
# @return [MavenMavenPackageResponse]
|
|
151
|
+
def read(maven_maven_package_href, opts = {})
|
|
152
|
+
data, _status_code, _headers = read_with_http_info(maven_maven_package_href, opts)
|
|
153
|
+
data
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Inspect a maven package
|
|
157
|
+
# A read-only ViewSet for MavenPackage. MavenPackage represents a logical Maven package at the GAV (groupId, artifactId, version) level. Packages are automatically created when artifacts are added to a repository.
|
|
158
|
+
# @param maven_maven_package_href [String]
|
|
159
|
+
# @param [Hash] opts the optional parameters
|
|
160
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
161
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
162
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
163
|
+
# @return [Array<(MavenMavenPackageResponse, Integer, Hash)>] MavenMavenPackageResponse data, response status code and response headers
|
|
164
|
+
def read_with_http_info(maven_maven_package_href, opts = {})
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug 'Calling API: ContentPackageApi.read ...'
|
|
167
|
+
end
|
|
168
|
+
# verify the required parameter 'maven_maven_package_href' is set
|
|
169
|
+
if @api_client.config.client_side_validation && maven_maven_package_href.nil?
|
|
170
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_package_href' when calling ContentPackageApi.read"
|
|
171
|
+
end
|
|
172
|
+
# resource path
|
|
173
|
+
local_var_path = '{maven_maven_package_href}'.sub('{' + 'maven_maven_package_href' + '}', CGI.escape(maven_maven_package_href.to_s).gsub('%2F', '/'))
|
|
174
|
+
|
|
175
|
+
# query parameters
|
|
176
|
+
query_params = opts[:query_params] || {}
|
|
177
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
178
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
184
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
185
|
+
|
|
186
|
+
# form parameters
|
|
187
|
+
form_params = opts[:form_params] || {}
|
|
188
|
+
|
|
189
|
+
# http body (model)
|
|
190
|
+
post_body = opts[:debug_body]
|
|
191
|
+
|
|
192
|
+
# return_type
|
|
193
|
+
return_type = opts[:debug_return_type] || 'MavenMavenPackageResponse'
|
|
194
|
+
|
|
195
|
+
# auth_names
|
|
196
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
197
|
+
|
|
198
|
+
new_options = opts.merge(
|
|
199
|
+
:operation => :"ContentPackageApi.read",
|
|
200
|
+
:header_params => header_params,
|
|
201
|
+
:query_params => query_params,
|
|
202
|
+
:form_params => form_params,
|
|
203
|
+
:body => post_body,
|
|
204
|
+
:auth_names => auth_names,
|
|
205
|
+
:return_type => return_type
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
209
|
+
if @api_client.config.debugging
|
|
210
|
+
@api_client.config.logger.debug "API called: ContentPackageApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
211
|
+
end
|
|
212
|
+
return data, status_code, headers
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Set a label
|
|
216
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
217
|
+
# @param maven_maven_package_href [String]
|
|
218
|
+
# @param set_label [SetLabel]
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
221
|
+
# @return [SetLabelResponse]
|
|
222
|
+
def set_label(maven_maven_package_href, set_label, opts = {})
|
|
223
|
+
data, _status_code, _headers = set_label_with_http_info(maven_maven_package_href, set_label, opts)
|
|
224
|
+
data
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Set a label
|
|
228
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
229
|
+
# @param maven_maven_package_href [String]
|
|
230
|
+
# @param set_label [SetLabel]
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
233
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
|
234
|
+
def set_label_with_http_info(maven_maven_package_href, set_label, opts = {})
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug 'Calling API: ContentPackageApi.set_label ...'
|
|
237
|
+
end
|
|
238
|
+
# verify the required parameter 'maven_maven_package_href' is set
|
|
239
|
+
if @api_client.config.client_side_validation && maven_maven_package_href.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_package_href' when calling ContentPackageApi.set_label"
|
|
241
|
+
end
|
|
242
|
+
# verify the required parameter 'set_label' is set
|
|
243
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
|
244
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentPackageApi.set_label"
|
|
245
|
+
end
|
|
246
|
+
# resource path
|
|
247
|
+
local_var_path = '{maven_maven_package_href}set_label/'.sub('{' + 'maven_maven_package_href' + '}', CGI.escape(maven_maven_package_href.to_s).gsub('%2F', '/'))
|
|
248
|
+
|
|
249
|
+
# query parameters
|
|
250
|
+
query_params = opts[:query_params] || {}
|
|
251
|
+
|
|
252
|
+
# header parameters
|
|
253
|
+
header_params = opts[:header_params] || {}
|
|
254
|
+
# HTTP header 'Accept' (if needed)
|
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
256
|
+
# HTTP header 'Content-Type'
|
|
257
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
258
|
+
if !content_type.nil?
|
|
259
|
+
header_params['Content-Type'] = content_type
|
|
260
|
+
end
|
|
261
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
262
|
+
|
|
263
|
+
# form parameters
|
|
264
|
+
form_params = opts[:form_params] || {}
|
|
265
|
+
|
|
266
|
+
# http body (model)
|
|
267
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
|
268
|
+
|
|
269
|
+
# return_type
|
|
270
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
|
271
|
+
|
|
272
|
+
# auth_names
|
|
273
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
274
|
+
|
|
275
|
+
new_options = opts.merge(
|
|
276
|
+
:operation => :"ContentPackageApi.set_label",
|
|
277
|
+
:header_params => header_params,
|
|
278
|
+
:query_params => query_params,
|
|
279
|
+
:form_params => form_params,
|
|
280
|
+
:body => post_body,
|
|
281
|
+
:auth_names => auth_names,
|
|
282
|
+
:return_type => return_type
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
286
|
+
if @api_client.config.debugging
|
|
287
|
+
@api_client.config.logger.debug "API called: ContentPackageApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
288
|
+
end
|
|
289
|
+
return data, status_code, headers
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Unset a label
|
|
293
|
+
# Unset a single pulp_label on the object.
|
|
294
|
+
# @param maven_maven_package_href [String]
|
|
295
|
+
# @param unset_label [UnsetLabel]
|
|
296
|
+
# @param [Hash] opts the optional parameters
|
|
297
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
298
|
+
# @return [UnsetLabelResponse]
|
|
299
|
+
def unset_label(maven_maven_package_href, unset_label, opts = {})
|
|
300
|
+
data, _status_code, _headers = unset_label_with_http_info(maven_maven_package_href, unset_label, opts)
|
|
301
|
+
data
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Unset a label
|
|
305
|
+
# Unset a single pulp_label on the object.
|
|
306
|
+
# @param maven_maven_package_href [String]
|
|
307
|
+
# @param unset_label [UnsetLabel]
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
310
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
|
311
|
+
def unset_label_with_http_info(maven_maven_package_href, unset_label, opts = {})
|
|
312
|
+
if @api_client.config.debugging
|
|
313
|
+
@api_client.config.logger.debug 'Calling API: ContentPackageApi.unset_label ...'
|
|
314
|
+
end
|
|
315
|
+
# verify the required parameter 'maven_maven_package_href' is set
|
|
316
|
+
if @api_client.config.client_side_validation && maven_maven_package_href.nil?
|
|
317
|
+
fail ArgumentError, "Missing the required parameter 'maven_maven_package_href' when calling ContentPackageApi.unset_label"
|
|
318
|
+
end
|
|
319
|
+
# verify the required parameter 'unset_label' is set
|
|
320
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
|
321
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentPackageApi.unset_label"
|
|
322
|
+
end
|
|
323
|
+
# resource path
|
|
324
|
+
local_var_path = '{maven_maven_package_href}unset_label/'.sub('{' + 'maven_maven_package_href' + '}', CGI.escape(maven_maven_package_href.to_s).gsub('%2F', '/'))
|
|
325
|
+
|
|
326
|
+
# query parameters
|
|
327
|
+
query_params = opts[:query_params] || {}
|
|
328
|
+
|
|
329
|
+
# header parameters
|
|
330
|
+
header_params = opts[:header_params] || {}
|
|
331
|
+
# HTTP header 'Accept' (if needed)
|
|
332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
333
|
+
# HTTP header 'Content-Type'
|
|
334
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
335
|
+
if !content_type.nil?
|
|
336
|
+
header_params['Content-Type'] = content_type
|
|
337
|
+
end
|
|
338
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
339
|
+
|
|
340
|
+
# form parameters
|
|
341
|
+
form_params = opts[:form_params] || {}
|
|
342
|
+
|
|
343
|
+
# http body (model)
|
|
344
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
|
345
|
+
|
|
346
|
+
# return_type
|
|
347
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
|
348
|
+
|
|
349
|
+
# auth_names
|
|
350
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
351
|
+
|
|
352
|
+
new_options = opts.merge(
|
|
353
|
+
:operation => :"ContentPackageApi.unset_label",
|
|
354
|
+
:header_params => header_params,
|
|
355
|
+
:query_params => query_params,
|
|
356
|
+
:form_params => form_params,
|
|
357
|
+
:body => post_body,
|
|
358
|
+
:auth_names => auth_names,
|
|
359
|
+
:return_type => return_type
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
363
|
+
if @api_client.config.debugging
|
|
364
|
+
@api_client.config.logger.debug "API called: ContentPackageApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
365
|
+
end
|
|
366
|
+
return data, status_code, headers
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
end
|