pulp_gem_client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +160 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentGemApi.md +210 -0
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DistributionsGemApi.md +382 -0
- data/docs/GemGemContent.md +21 -0
- data/docs/GemGemContentResponse.md +35 -0
- data/docs/GemGemDistribution.md +31 -0
- data/docs/GemGemDistributionResponse.md +37 -0
- data/docs/GemGemPublication.md +19 -0
- data/docs/GemGemPublicationResponse.md +23 -0
- data/docs/GemGemRemote.md +63 -0
- data/docs/GemGemRemoteResponse.md +61 -0
- data/docs/GemGemRemoteResponseHiddenFields.md +19 -0
- data/docs/GemGemRepository.md +25 -0
- data/docs/GemGemRepositoryResponse.md +33 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
- data/docs/PaginatedgemGemContentResponseList.md +23 -0
- data/docs/PaginatedgemGemDistributionResponseList.md +23 -0
- data/docs/PaginatedgemGemPublicationResponseList.md +23 -0
- data/docs/PaginatedgemGemRemoteResponseList.md +23 -0
- data/docs/PaginatedgemGemRepositoryResponseList.md +23 -0
- data/docs/PatchedgemGemDistribution.md +31 -0
- data/docs/PatchedgemGemRemote.md +63 -0
- data/docs/PatchedgemGemRepository.md +25 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsGemApi.md +263 -0
- data/docs/RemotesGemApi.md +380 -0
- data/docs/Repair.md +17 -0
- data/docs/RepositoriesGemApi.md +502 -0
- data/docs/RepositoriesGemVersionsApi.md +273 -0
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RepositoryVersionResponse.md +27 -0
- data/lib/pulp_gem_client/api/content_gem_api.rb +259 -0
- data/lib/pulp_gem_client/api/distributions_gem_api.rb +476 -0
- data/lib/pulp_gem_client/api/publications_gem_api.rb +325 -0
- data/lib/pulp_gem_client/api/remotes_gem_api.rb +473 -0
- data/lib/pulp_gem_client/api/repositories_gem_api.rb +628 -0
- data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +346 -0
- data/lib/pulp_gem_client/api_client.rb +403 -0
- data/lib/pulp_gem_client/api_error.rb +57 -0
- data/lib/pulp_gem_client/configuration.rb +251 -0
- data/lib/pulp_gem_client/models/async_operation_response.rb +213 -0
- data/lib/pulp_gem_client/models/content_summary_response.rb +246 -0
- data/lib/pulp_gem_client/models/gem_gem_content.rb +228 -0
- data/lib/pulp_gem_client/models/gem_gem_content_response.rb +303 -0
- data/lib/pulp_gem_client/models/gem_gem_distribution.rb +333 -0
- data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +324 -0
- data/lib/pulp_gem_client/models/gem_gem_publication.rb +217 -0
- data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +236 -0
- data/lib/pulp_gem_client/models/gem_gem_remote.rb +704 -0
- data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +532 -0
- data/lib/pulp_gem_client/models/gem_gem_remote_response_hidden_fields.rb +215 -0
- data/lib/pulp_gem_client/models/gem_gem_repository.rb +306 -0
- data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +309 -0
- data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +237 -0
- data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +315 -0
- data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +686 -0
- data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +297 -0
- data/lib/pulp_gem_client/models/policy_enum.rb +37 -0
- data/lib/pulp_gem_client/models/repair.rb +209 -0
- data/lib/pulp_gem_client/models/repository_add_remove_content.rb +232 -0
- data/lib/pulp_gem_client/models/repository_sync_url.rb +220 -0
- data/lib/pulp_gem_client/models/repository_version_response.rb +255 -0
- data/lib/pulp_gem_client/version.rb +15 -0
- data/lib/pulp_gem_client.rb +72 -0
- data/pulp_gem_client.gemspec +39 -0
- data/spec/api/content_gem_api_spec.rb +88 -0
- data/spec/api/distributions_gem_api_spec.rb +130 -0
- data/spec/api/publications_gem_api_spec.rb +101 -0
- data/spec/api/remotes_gem_api_spec.rb +129 -0
- data/spec/api/repositories_gem_api_spec.rb +160 -0
- data/spec/api/repositories_gem_versions_api_spec.rb +105 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/gem_gem_content_response_spec.rb +95 -0
- data/spec/models/gem_gem_content_spec.rb +53 -0
- data/spec/models/gem_gem_distribution_response_spec.rb +101 -0
- data/spec/models/gem_gem_distribution_spec.rb +83 -0
- data/spec/models/gem_gem_publication_response_spec.rb +59 -0
- data/spec/models/gem_gem_publication_spec.rb +47 -0
- data/spec/models/gem_gem_remote_response_hidden_fields_spec.rb +47 -0
- data/spec/models/gem_gem_remote_response_spec.rb +173 -0
- data/spec/models/gem_gem_remote_spec.rb +179 -0
- data/spec/models/gem_gem_repository_response_spec.rb +89 -0
- data/spec/models/gem_gem_repository_spec.rb +65 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_content_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +59 -0
- data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +59 -0
- data/spec/models/patchedgem_gem_distribution_spec.rb +83 -0
- data/spec/models/patchedgem_gem_remote_spec.rb +179 -0
- data/spec/models/patchedgem_gem_repository_spec.rb +65 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/repair_spec.rb +41 -0
- data/spec/models/repository_add_remove_content_spec.rb +53 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/repository_version_response_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +250 -0
@@ -0,0 +1,476 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpGemClient
|
16
|
+
class DistributionsGemApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a gem distribution
|
23
|
+
# Trigger an asynchronous create task
|
24
|
+
# @param gem_gem_distribution [GemGemDistribution]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AsyncOperationResponse]
|
27
|
+
def create(gem_gem_distribution, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(gem_gem_distribution, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a gem distribution
|
33
|
+
# Trigger an asynchronous create task
|
34
|
+
# @param gem_gem_distribution [GemGemDistribution]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(gem_gem_distribution, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: DistributionsGemApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'gem_gem_distribution' is set
|
42
|
+
if @api_client.config.client_side_validation && gem_gem_distribution.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'gem_gem_distribution' when calling DistributionsGemApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/distributions/gem/gem/'
|
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
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(gem_gem_distribution)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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: DistributionsGemApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete a gem distribution
|
87
|
+
# Trigger an asynchronous delete task
|
88
|
+
# @param gem_gem_distribution_href [String]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [AsyncOperationResponse]
|
91
|
+
def delete(gem_gem_distribution_href, opts = {})
|
92
|
+
data, _status_code, _headers = delete_with_http_info(gem_gem_distribution_href, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a gem distribution
|
97
|
+
# Trigger an asynchronous delete task
|
98
|
+
# @param gem_gem_distribution_href [String]
|
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(gem_gem_distribution_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: DistributionsGemApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'gem_gem_distribution_href' is set
|
106
|
+
if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{gem_gem_distribution_href}'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_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] || ['basicAuth']
|
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: DistributionsGemApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List gem distributions
|
149
|
+
# ViewSet for GemDistributions.
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [String] :base_path Filter results where base_path matches value
|
152
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
153
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
154
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
155
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
156
|
+
# @option opts [String] :name Filter results where name matches value
|
157
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
158
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
159
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
160
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
161
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
162
|
+
# @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) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
163
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
164
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
165
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
166
|
+
# @option opts [String] :repository Filter results where repository matches value
|
167
|
+
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
168
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
169
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
170
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
171
|
+
# @return [PaginatedgemGemDistributionResponseList]
|
172
|
+
def list(opts = {})
|
173
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
174
|
+
data
|
175
|
+
end
|
176
|
+
|
177
|
+
# List gem distributions
|
178
|
+
# ViewSet for GemDistributions.
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @option opts [String] :base_path Filter results where base_path matches value
|
181
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
182
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
183
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
184
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
185
|
+
# @option opts [String] :name Filter results where name matches value
|
186
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
187
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
188
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
189
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
190
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
191
|
+
# @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) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
192
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
193
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
194
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
195
|
+
# @option opts [String] :repository Filter results where repository matches value
|
196
|
+
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
197
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
198
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
199
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
200
|
+
# @return [Array<(PaginatedgemGemDistributionResponseList, Integer, Hash)>] PaginatedgemGemDistributionResponseList data, response status code and response headers
|
201
|
+
def list_with_http_info(opts = {})
|
202
|
+
if @api_client.config.debugging
|
203
|
+
@api_client.config.logger.debug 'Calling API: DistributionsGemApi.list ...'
|
204
|
+
end
|
205
|
+
allowable_values = ["-base_path", "-hidden", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "base_path", "hidden", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type"]
|
206
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
207
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
208
|
+
end
|
209
|
+
# resource path
|
210
|
+
local_var_path = '/pulp/api/v3/distributions/gem/gem/'
|
211
|
+
|
212
|
+
# query parameters
|
213
|
+
query_params = opts[:query_params] || {}
|
214
|
+
query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
|
215
|
+
query_params[:'base_path__contains'] = opts[:'base_path__contains'] if !opts[:'base_path__contains'].nil?
|
216
|
+
query_params[:'base_path__icontains'] = opts[:'base_path__icontains'] if !opts[:'base_path__icontains'].nil?
|
217
|
+
query_params[:'base_path__in'] = @api_client.build_collection_param(opts[:'base_path__in'], :csv) if !opts[:'base_path__in'].nil?
|
218
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
219
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
220
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
221
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
222
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
223
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
224
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
225
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
226
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
227
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
228
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
229
|
+
query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
230
|
+
query_params[:'repository__in'] = @api_client.build_collection_param(opts[:'repository__in'], :csv) if !opts[:'repository__in'].nil?
|
231
|
+
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
232
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
233
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
234
|
+
|
235
|
+
# header parameters
|
236
|
+
header_params = opts[:header_params] || {}
|
237
|
+
# HTTP header 'Accept' (if needed)
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
|
+
|
240
|
+
# form parameters
|
241
|
+
form_params = opts[:form_params] || {}
|
242
|
+
|
243
|
+
# http body (model)
|
244
|
+
post_body = opts[:body]
|
245
|
+
|
246
|
+
# return_type
|
247
|
+
return_type = opts[:return_type] || 'PaginatedgemGemDistributionResponseList'
|
248
|
+
|
249
|
+
# auth_names
|
250
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
251
|
+
|
252
|
+
new_options = opts.merge(
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: DistributionsGemApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
# Update a gem distribution
|
269
|
+
# Trigger an asynchronous partial update task
|
270
|
+
# @param gem_gem_distribution_href [String]
|
271
|
+
# @param patchedgem_gem_distribution [PatchedgemGemDistribution]
|
272
|
+
# @param [Hash] opts the optional parameters
|
273
|
+
# @return [AsyncOperationResponse]
|
274
|
+
def partial_update(gem_gem_distribution_href, patchedgem_gem_distribution, opts = {})
|
275
|
+
data, _status_code, _headers = partial_update_with_http_info(gem_gem_distribution_href, patchedgem_gem_distribution, opts)
|
276
|
+
data
|
277
|
+
end
|
278
|
+
|
279
|
+
# Update a gem distribution
|
280
|
+
# Trigger an asynchronous partial update task
|
281
|
+
# @param gem_gem_distribution_href [String]
|
282
|
+
# @param patchedgem_gem_distribution [PatchedgemGemDistribution]
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
285
|
+
def partial_update_with_http_info(gem_gem_distribution_href, patchedgem_gem_distribution, opts = {})
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug 'Calling API: DistributionsGemApi.partial_update ...'
|
288
|
+
end
|
289
|
+
# verify the required parameter 'gem_gem_distribution_href' is set
|
290
|
+
if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
|
291
|
+
fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.partial_update"
|
292
|
+
end
|
293
|
+
# verify the required parameter 'patchedgem_gem_distribution' is set
|
294
|
+
if @api_client.config.client_side_validation && patchedgem_gem_distribution.nil?
|
295
|
+
fail ArgumentError, "Missing the required parameter 'patchedgem_gem_distribution' when calling DistributionsGemApi.partial_update"
|
296
|
+
end
|
297
|
+
# resource path
|
298
|
+
local_var_path = '{gem_gem_distribution_href}'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
|
299
|
+
|
300
|
+
# query parameters
|
301
|
+
query_params = opts[:query_params] || {}
|
302
|
+
|
303
|
+
# header parameters
|
304
|
+
header_params = opts[:header_params] || {}
|
305
|
+
# HTTP header 'Accept' (if needed)
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
307
|
+
# HTTP header 'Content-Type'
|
308
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
309
|
+
|
310
|
+
# form parameters
|
311
|
+
form_params = opts[:form_params] || {}
|
312
|
+
|
313
|
+
# http body (model)
|
314
|
+
post_body = opts[:body] || @api_client.object_to_http_body(patchedgem_gem_distribution)
|
315
|
+
|
316
|
+
# return_type
|
317
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
318
|
+
|
319
|
+
# auth_names
|
320
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
321
|
+
|
322
|
+
new_options = opts.merge(
|
323
|
+
:header_params => header_params,
|
324
|
+
:query_params => query_params,
|
325
|
+
:form_params => form_params,
|
326
|
+
:body => post_body,
|
327
|
+
:auth_names => auth_names,
|
328
|
+
:return_type => return_type
|
329
|
+
)
|
330
|
+
|
331
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
332
|
+
if @api_client.config.debugging
|
333
|
+
@api_client.config.logger.debug "API called: DistributionsGemApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
334
|
+
end
|
335
|
+
return data, status_code, headers
|
336
|
+
end
|
337
|
+
|
338
|
+
# Inspect a gem distribution
|
339
|
+
# ViewSet for GemDistributions.
|
340
|
+
# @param gem_gem_distribution_href [String]
|
341
|
+
# @param [Hash] opts the optional parameters
|
342
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
343
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
344
|
+
# @return [GemGemDistributionResponse]
|
345
|
+
def read(gem_gem_distribution_href, opts = {})
|
346
|
+
data, _status_code, _headers = read_with_http_info(gem_gem_distribution_href, opts)
|
347
|
+
data
|
348
|
+
end
|
349
|
+
|
350
|
+
# Inspect a gem distribution
|
351
|
+
# ViewSet for GemDistributions.
|
352
|
+
# @param gem_gem_distribution_href [String]
|
353
|
+
# @param [Hash] opts the optional parameters
|
354
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
355
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
356
|
+
# @return [Array<(GemGemDistributionResponse, Integer, Hash)>] GemGemDistributionResponse data, response status code and response headers
|
357
|
+
def read_with_http_info(gem_gem_distribution_href, opts = {})
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug 'Calling API: DistributionsGemApi.read ...'
|
360
|
+
end
|
361
|
+
# verify the required parameter 'gem_gem_distribution_href' is set
|
362
|
+
if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.read"
|
364
|
+
end
|
365
|
+
# resource path
|
366
|
+
local_var_path = '{gem_gem_distribution_href}'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
|
367
|
+
|
368
|
+
# query parameters
|
369
|
+
query_params = opts[:query_params] || {}
|
370
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
371
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
372
|
+
|
373
|
+
# header parameters
|
374
|
+
header_params = opts[:header_params] || {}
|
375
|
+
# HTTP header 'Accept' (if needed)
|
376
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
377
|
+
|
378
|
+
# form parameters
|
379
|
+
form_params = opts[:form_params] || {}
|
380
|
+
|
381
|
+
# http body (model)
|
382
|
+
post_body = opts[:body]
|
383
|
+
|
384
|
+
# return_type
|
385
|
+
return_type = opts[:return_type] || 'GemGemDistributionResponse'
|
386
|
+
|
387
|
+
# auth_names
|
388
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
389
|
+
|
390
|
+
new_options = opts.merge(
|
391
|
+
:header_params => header_params,
|
392
|
+
:query_params => query_params,
|
393
|
+
:form_params => form_params,
|
394
|
+
:body => post_body,
|
395
|
+
:auth_names => auth_names,
|
396
|
+
:return_type => return_type
|
397
|
+
)
|
398
|
+
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
400
|
+
if @api_client.config.debugging
|
401
|
+
@api_client.config.logger.debug "API called: DistributionsGemApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
402
|
+
end
|
403
|
+
return data, status_code, headers
|
404
|
+
end
|
405
|
+
|
406
|
+
# Update a gem distribution
|
407
|
+
# Trigger an asynchronous update task
|
408
|
+
# @param gem_gem_distribution_href [String]
|
409
|
+
# @param gem_gem_distribution [GemGemDistribution]
|
410
|
+
# @param [Hash] opts the optional parameters
|
411
|
+
# @return [AsyncOperationResponse]
|
412
|
+
def update(gem_gem_distribution_href, gem_gem_distribution, opts = {})
|
413
|
+
data, _status_code, _headers = update_with_http_info(gem_gem_distribution_href, gem_gem_distribution, opts)
|
414
|
+
data
|
415
|
+
end
|
416
|
+
|
417
|
+
# Update a gem distribution
|
418
|
+
# Trigger an asynchronous update task
|
419
|
+
# @param gem_gem_distribution_href [String]
|
420
|
+
# @param gem_gem_distribution [GemGemDistribution]
|
421
|
+
# @param [Hash] opts the optional parameters
|
422
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
423
|
+
def update_with_http_info(gem_gem_distribution_href, gem_gem_distribution, opts = {})
|
424
|
+
if @api_client.config.debugging
|
425
|
+
@api_client.config.logger.debug 'Calling API: DistributionsGemApi.update ...'
|
426
|
+
end
|
427
|
+
# verify the required parameter 'gem_gem_distribution_href' is set
|
428
|
+
if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
|
429
|
+
fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.update"
|
430
|
+
end
|
431
|
+
# verify the required parameter 'gem_gem_distribution' is set
|
432
|
+
if @api_client.config.client_side_validation && gem_gem_distribution.nil?
|
433
|
+
fail ArgumentError, "Missing the required parameter 'gem_gem_distribution' when calling DistributionsGemApi.update"
|
434
|
+
end
|
435
|
+
# resource path
|
436
|
+
local_var_path = '{gem_gem_distribution_href}'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
|
437
|
+
|
438
|
+
# query parameters
|
439
|
+
query_params = opts[:query_params] || {}
|
440
|
+
|
441
|
+
# header parameters
|
442
|
+
header_params = opts[:header_params] || {}
|
443
|
+
# HTTP header 'Accept' (if needed)
|
444
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
445
|
+
# HTTP header 'Content-Type'
|
446
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
447
|
+
|
448
|
+
# form parameters
|
449
|
+
form_params = opts[:form_params] || {}
|
450
|
+
|
451
|
+
# http body (model)
|
452
|
+
post_body = opts[:body] || @api_client.object_to_http_body(gem_gem_distribution)
|
453
|
+
|
454
|
+
# return_type
|
455
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
456
|
+
|
457
|
+
# auth_names
|
458
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
459
|
+
|
460
|
+
new_options = opts.merge(
|
461
|
+
:header_params => header_params,
|
462
|
+
:query_params => query_params,
|
463
|
+
:form_params => form_params,
|
464
|
+
:body => post_body,
|
465
|
+
:auth_names => auth_names,
|
466
|
+
:return_type => return_type
|
467
|
+
)
|
468
|
+
|
469
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
470
|
+
if @api_client.config.debugging
|
471
|
+
@api_client.config.logger.debug "API called: DistributionsGemApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
472
|
+
end
|
473
|
+
return data, status_code, headers
|
474
|
+
end
|
475
|
+
end
|
476
|
+
end
|