pulp_hugging_face_client 0.0.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +176 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +18 -0
- data/docs/ContentHuggingFaceApi.md +424 -0
- data/docs/ContentSummaryResponse.md +22 -0
- data/docs/DistributionsHuggingFaceApi.md +671 -0
- data/docs/HuggingFaceHuggingFaceContent.md +36 -0
- data/docs/HuggingFaceHuggingFaceContentResponse.md +42 -0
- data/docs/HuggingFaceHuggingFaceDistribution.md +32 -0
- data/docs/HuggingFaceHuggingFaceDistributionResponse.md +44 -0
- data/docs/HuggingFaceHuggingFacePublication.md +20 -0
- data/docs/HuggingFaceHuggingFacePublicationResponse.md +28 -0
- data/docs/HuggingFaceHuggingFaceRemote.md +62 -0
- data/docs/HuggingFaceHuggingFaceRemoteResponse.md +62 -0
- data/docs/HuggingFaceHuggingFaceRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/HuggingFaceHuggingFaceRepository.md +26 -0
- data/docs/HuggingFaceHuggingFaceRepositoryResponse.md +38 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceContentResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceDistributionResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFacePublicationResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceRemoteResponseList.md +24 -0
- data/docs/PaginatedhuggingFaceHuggingFaceRepositoryResponseList.md +24 -0
- data/docs/PatchedhuggingFaceHuggingFaceDistribution.md +32 -0
- data/docs/PatchedhuggingFaceHuggingFaceRemote.md +62 -0
- data/docs/PatchedhuggingFaceHuggingFaceRepository.md +26 -0
- data/docs/PolicyEnum.md +15 -0
- data/docs/PublicationsHuggingFaceApi.md +350 -0
- data/docs/RemotesHuggingFaceApi.md +669 -0
- data/docs/Repair.md +18 -0
- data/docs/RepoTypeEnum.md +15 -0
- data/docs/RepositoriesHuggingFaceApi.md +831 -0
- data/docs/RepositoriesHuggingFaceVersionsApi.md +359 -0
- data/docs/RepositoryAddRemoveContent.md +22 -0
- data/docs/RepositorySyncURL.md +20 -0
- data/docs/RepositoryVersionResponse.md +32 -0
- data/docs/SetLabel.md +20 -0
- data/docs/SetLabelResponse.md +20 -0
- data/docs/UnsetLabel.md +18 -0
- data/docs/UnsetLabelResponse.md +20 -0
- data/lib/pulp_hugging_face_client/api/content_hugging_face_api.rb +441 -0
- data/lib/pulp_hugging_face_client/api/distributions_hugging_face_api.rb +684 -0
- data/lib/pulp_hugging_face_client/api/publications_hugging_face_api.rb +356 -0
- data/lib/pulp_hugging_face_client/api/remotes_hugging_face_api.rb +681 -0
- data/lib/pulp_hugging_face_client/api/repositories_hugging_face_api.rb +847 -0
- data/lib/pulp_hugging_face_client/api/repositories_hugging_face_versions_api.rb +374 -0
- data/lib/pulp_hugging_face_client/api_client.rb +438 -0
- data/lib/pulp_hugging_face_client/api_error.rb +58 -0
- data/lib/pulp_hugging_face_client/configuration.rb +392 -0
- data/lib/pulp_hugging_face_client/models/async_operation_response.rb +223 -0
- data/lib/pulp_hugging_face_client/models/content_summary_response.rb +260 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_content.rb +428 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_content_response.rb +385 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution.rb +345 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_distribution_response.rb +366 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_publication.rb +225 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_publication_response.rb +264 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote.rb +745 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote_response.rb +564 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_remote_response_hidden_fields_inner.rb +237 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository.rb +316 -0
- data/lib/pulp_hugging_face_client/models/hugging_face_hugging_face_repository_response.rb +339 -0
- data/lib/pulp_hugging_face_client/models/paginated_repository_version_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_content_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_distribution_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_publication_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_remote_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/paginatedhugging_face_hugging_face_repository_response_list.rb +259 -0
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_distribution.rb +331 -0
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_remote.rb +731 -0
- data/lib/pulp_hugging_face_client/models/patchedhugging_face_hugging_face_repository.rb +309 -0
- data/lib/pulp_hugging_face_client/models/policy_enum.rb +41 -0
- data/lib/pulp_hugging_face_client/models/repair.rb +217 -0
- data/lib/pulp_hugging_face_client/models/repo_type_enum.rb +41 -0
- data/lib/pulp_hugging_face_client/models/repository_add_remove_content.rb +240 -0
- data/lib/pulp_hugging_face_client/models/repository_sync_url.rb +228 -0
- data/lib/pulp_hugging_face_client/models/repository_version_response.rb +283 -0
- data/lib/pulp_hugging_face_client/models/set_label.rb +264 -0
- data/lib/pulp_hugging_face_client/models/set_label_response.rb +255 -0
- data/lib/pulp_hugging_face_client/models/unset_label.rb +252 -0
- data/lib/pulp_hugging_face_client/models/unset_label_response.rb +252 -0
- data/lib/pulp_hugging_face_client/version.rb +15 -0
- data/lib/pulp_hugging_face_client.rb +77 -0
- data/pulp_hugging_face_client.gemspec +41 -0
- data/spec/api/content_hugging_face_api_spec.rb +121 -0
- data/spec/api/distributions_hugging_face_api_spec.rb +171 -0
- data/spec/api/publications_hugging_face_api_spec.rb +109 -0
- data/spec/api/remotes_hugging_face_api_spec.rb +170 -0
- data/spec/api/repositories_hugging_face_api_spec.rb +202 -0
- data/spec/api/repositories_hugging_face_versions_api_spec.rb +112 -0
- data/spec/models/async_operation_response_spec.rb +36 -0
- data/spec/models/content_summary_response_spec.rb +48 -0
- data/spec/models/hugging_face_hugging_face_content_response_spec.rb +108 -0
- data/spec/models/hugging_face_hugging_face_content_spec.rb +90 -0
- data/spec/models/hugging_face_hugging_face_distribution_response_spec.rb +114 -0
- data/spec/models/hugging_face_hugging_face_distribution_spec.rb +78 -0
- data/spec/models/hugging_face_hugging_face_publication_response_spec.rb +66 -0
- data/spec/models/hugging_face_hugging_face_publication_spec.rb +42 -0
- data/spec/models/hugging_face_hugging_face_remote_response_hidden_fields_inner_spec.rb +42 -0
- data/spec/models/hugging_face_hugging_face_remote_response_spec.rb +168 -0
- data/spec/models/hugging_face_hugging_face_remote_spec.rb +168 -0
- data/spec/models/hugging_face_hugging_face_repository_response_spec.rb +96 -0
- data/spec/models/hugging_face_hugging_face_repository_spec.rb +60 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_content_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_distribution_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_publication_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_remote_response_list_spec.rb +54 -0
- data/spec/models/paginatedhugging_face_hugging_face_repository_response_list_spec.rb +54 -0
- data/spec/models/patchedhugging_face_hugging_face_distribution_spec.rb +78 -0
- data/spec/models/patchedhugging_face_hugging_face_remote_spec.rb +168 -0
- data/spec/models/patchedhugging_face_hugging_face_repository_spec.rb +60 -0
- data/spec/models/policy_enum_spec.rb +30 -0
- data/spec/models/repair_spec.rb +36 -0
- data/spec/models/repo_type_enum_spec.rb +30 -0
- data/spec/models/repository_add_remove_content_spec.rb +48 -0
- data/spec/models/repository_sync_url_spec.rb +42 -0
- data/spec/models/repository_version_response_spec.rb +78 -0
- data/spec/models/set_label_response_spec.rb +42 -0
- data/spec/models/set_label_spec.rb +42 -0
- data/spec/models/unset_label_response_spec.rb +42 -0
- data/spec/models/unset_label_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- metadata +274 -0
@@ -0,0 +1,684 @@
|
|
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 PulpHuggingFaceClient
|
16
|
+
class DistributionsHuggingFaceApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a hugging face distribution
|
23
|
+
# Trigger an asynchronous create task
|
24
|
+
# @param hugging_face_hugging_face_distribution [HuggingFaceHuggingFaceDistribution]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
27
|
+
# @return [AsyncOperationResponse]
|
28
|
+
def create(hugging_face_hugging_face_distribution, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(hugging_face_hugging_face_distribution, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a hugging face distribution
|
34
|
+
# Trigger an asynchronous create task
|
35
|
+
# @param hugging_face_hugging_face_distribution [HuggingFaceHuggingFaceDistribution]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
38
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(hugging_face_hugging_face_distribution, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution' is set
|
44
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution' when calling DistributionsHuggingFaceApi.create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/pulp/api/v3/distributions/hugging_face/hugging-face/'
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
59
|
+
if !content_type.nil?
|
60
|
+
header_params['Content-Type'] = content_type
|
61
|
+
end
|
62
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(hugging_face_hugging_face_distribution)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"DistributionsHuggingFaceApi.create",
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
93
|
+
# Delete a hugging face distribution
|
94
|
+
# Trigger an asynchronous delete task
|
95
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
98
|
+
# @return [AsyncOperationResponse]
|
99
|
+
def delete(hugging_face_hugging_face_distribution_href, opts = {})
|
100
|
+
data, _status_code, _headers = delete_with_http_info(hugging_face_hugging_face_distribution_href, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a hugging face distribution
|
105
|
+
# Trigger an asynchronous delete task
|
106
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
107
|
+
# @param [Hash] opts the optional parameters
|
108
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
109
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
110
|
+
def delete_with_http_info(hugging_face_hugging_face_distribution_href, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.delete ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution_href' is set
|
115
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution_href.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution_href' when calling DistributionsHuggingFaceApi.delete"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '{hugging_face_hugging_face_distribution_href}'.sub('{' + 'hugging_face_hugging_face_distribution_href' + '}', CGI.escape(hugging_face_hugging_face_distribution_href.to_s).gsub('%2F', '/'))
|
120
|
+
|
121
|
+
# query parameters
|
122
|
+
query_params = opts[:query_params] || {}
|
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']) unless header_params['Accept']
|
128
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = opts[:form_params] || {}
|
132
|
+
|
133
|
+
# http body (model)
|
134
|
+
post_body = opts[:debug_body]
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
138
|
+
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
141
|
+
|
142
|
+
new_options = opts.merge(
|
143
|
+
:operation => :"DistributionsHuggingFaceApi.delete",
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => return_type
|
150
|
+
)
|
151
|
+
|
152
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
|
159
|
+
# List hugging face distributions
|
160
|
+
# A ViewSet for HuggingFaceDistribution. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
163
|
+
# @option opts [String] :base_path Filter results where base_path matches value
|
164
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
165
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
166
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
167
|
+
# @option opts [Boolean] :checkpoint Filter results where checkpoint matches value
|
168
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
169
|
+
# @option opts [String] :name Filter results where name matches value
|
170
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
171
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
172
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
173
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
174
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
175
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
176
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
177
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
178
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
179
|
+
# @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) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
180
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
181
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
182
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
183
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
184
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
185
|
+
# @option opts [String] :repository Filter results where repository matches value
|
186
|
+
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
187
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
188
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
189
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
190
|
+
# @return [PaginatedhuggingFaceHuggingFaceDistributionResponseList]
|
191
|
+
def list(opts = {})
|
192
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
193
|
+
data
|
194
|
+
end
|
195
|
+
|
196
|
+
# List hugging face distributions
|
197
|
+
# A ViewSet for HuggingFaceDistribution. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
200
|
+
# @option opts [String] :base_path Filter results where base_path matches value
|
201
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
202
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
203
|
+
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
204
|
+
# @option opts [Boolean] :checkpoint Filter results where checkpoint matches value
|
205
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
206
|
+
# @option opts [String] :name Filter results where name matches value
|
207
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
208
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
209
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
210
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
211
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
212
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
213
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
214
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
215
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
216
|
+
# @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) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
217
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
218
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
219
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
220
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
221
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
222
|
+
# @option opts [String] :repository Filter results where repository matches value
|
223
|
+
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
224
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
225
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
226
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
227
|
+
# @return [Array<(PaginatedhuggingFaceHuggingFaceDistributionResponseList, Integer, Hash)>] PaginatedhuggingFaceHuggingFaceDistributionResponseList data, response status code and response headers
|
228
|
+
def list_with_http_info(opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.list ...'
|
231
|
+
end
|
232
|
+
allowable_values = ["-base_path", "-checkpoint", "-hidden", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "base_path", "checkpoint", "hidden", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type"]
|
233
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
234
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
235
|
+
end
|
236
|
+
# resource path
|
237
|
+
local_var_path = '/pulp/api/v3/distributions/hugging_face/hugging-face/'
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = opts[:query_params] || {}
|
241
|
+
query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
|
242
|
+
query_params[:'base_path__contains'] = opts[:'base_path__contains'] if !opts[:'base_path__contains'].nil?
|
243
|
+
query_params[:'base_path__icontains'] = opts[:'base_path__icontains'] if !opts[:'base_path__icontains'].nil?
|
244
|
+
query_params[:'base_path__in'] = @api_client.build_collection_param(opts[:'base_path__in'], :csv) if !opts[:'base_path__in'].nil?
|
245
|
+
query_params[:'checkpoint'] = opts[:'checkpoint'] if !opts[:'checkpoint'].nil?
|
246
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
247
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
248
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
249
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
250
|
+
query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
|
251
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
252
|
+
query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
|
253
|
+
query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
|
254
|
+
query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
|
255
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
256
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
257
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
258
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
259
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
260
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
261
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
262
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
263
|
+
query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
264
|
+
query_params[:'repository__in'] = @api_client.build_collection_param(opts[:'repository__in'], :csv) if !opts[:'repository__in'].nil?
|
265
|
+
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
266
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
267
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
268
|
+
|
269
|
+
# header parameters
|
270
|
+
header_params = opts[:header_params] || {}
|
271
|
+
# HTTP header 'Accept' (if needed)
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
273
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
274
|
+
|
275
|
+
# form parameters
|
276
|
+
form_params = opts[:form_params] || {}
|
277
|
+
|
278
|
+
# http body (model)
|
279
|
+
post_body = opts[:debug_body]
|
280
|
+
|
281
|
+
# return_type
|
282
|
+
return_type = opts[:debug_return_type] || 'PaginatedhuggingFaceHuggingFaceDistributionResponseList'
|
283
|
+
|
284
|
+
# auth_names
|
285
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
286
|
+
|
287
|
+
new_options = opts.merge(
|
288
|
+
:operation => :"DistributionsHuggingFaceApi.list",
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => return_type
|
295
|
+
)
|
296
|
+
|
297
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
# Update a hugging face distribution
|
305
|
+
# Trigger an asynchronous partial update task
|
306
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
307
|
+
# @param patchedhugging_face_hugging_face_distribution [PatchedhuggingFaceHuggingFaceDistribution]
|
308
|
+
# @param [Hash] opts the optional parameters
|
309
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
310
|
+
# @return [AsyncOperationResponse]
|
311
|
+
def partial_update(hugging_face_hugging_face_distribution_href, patchedhugging_face_hugging_face_distribution, opts = {})
|
312
|
+
data, _status_code, _headers = partial_update_with_http_info(hugging_face_hugging_face_distribution_href, patchedhugging_face_hugging_face_distribution, opts)
|
313
|
+
data
|
314
|
+
end
|
315
|
+
|
316
|
+
# Update a hugging face distribution
|
317
|
+
# Trigger an asynchronous partial update task
|
318
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
319
|
+
# @param patchedhugging_face_hugging_face_distribution [PatchedhuggingFaceHuggingFaceDistribution]
|
320
|
+
# @param [Hash] opts the optional parameters
|
321
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
322
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
323
|
+
def partial_update_with_http_info(hugging_face_hugging_face_distribution_href, patchedhugging_face_hugging_face_distribution, opts = {})
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.partial_update ...'
|
326
|
+
end
|
327
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution_href' is set
|
328
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution_href.nil?
|
329
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution_href' when calling DistributionsHuggingFaceApi.partial_update"
|
330
|
+
end
|
331
|
+
# verify the required parameter 'patchedhugging_face_hugging_face_distribution' is set
|
332
|
+
if @api_client.config.client_side_validation && patchedhugging_face_hugging_face_distribution.nil?
|
333
|
+
fail ArgumentError, "Missing the required parameter 'patchedhugging_face_hugging_face_distribution' when calling DistributionsHuggingFaceApi.partial_update"
|
334
|
+
end
|
335
|
+
# resource path
|
336
|
+
local_var_path = '{hugging_face_hugging_face_distribution_href}'.sub('{' + 'hugging_face_hugging_face_distribution_href' + '}', CGI.escape(hugging_face_hugging_face_distribution_href.to_s).gsub('%2F', '/'))
|
337
|
+
|
338
|
+
# query parameters
|
339
|
+
query_params = opts[:query_params] || {}
|
340
|
+
|
341
|
+
# header parameters
|
342
|
+
header_params = opts[:header_params] || {}
|
343
|
+
# HTTP header 'Accept' (if needed)
|
344
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
345
|
+
# HTTP header 'Content-Type'
|
346
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
347
|
+
if !content_type.nil?
|
348
|
+
header_params['Content-Type'] = content_type
|
349
|
+
end
|
350
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
351
|
+
|
352
|
+
# form parameters
|
353
|
+
form_params = opts[:form_params] || {}
|
354
|
+
|
355
|
+
# http body (model)
|
356
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patchedhugging_face_hugging_face_distribution)
|
357
|
+
|
358
|
+
# return_type
|
359
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
360
|
+
|
361
|
+
# auth_names
|
362
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
363
|
+
|
364
|
+
new_options = opts.merge(
|
365
|
+
:operation => :"DistributionsHuggingFaceApi.partial_update",
|
366
|
+
:header_params => header_params,
|
367
|
+
:query_params => query_params,
|
368
|
+
:form_params => form_params,
|
369
|
+
:body => post_body,
|
370
|
+
:auth_names => auth_names,
|
371
|
+
:return_type => return_type
|
372
|
+
)
|
373
|
+
|
374
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
375
|
+
if @api_client.config.debugging
|
376
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
377
|
+
end
|
378
|
+
return data, status_code, headers
|
379
|
+
end
|
380
|
+
|
381
|
+
# Inspect a hugging face distribution
|
382
|
+
# A ViewSet for HuggingFaceDistribution. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
383
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
384
|
+
# @param [Hash] opts the optional parameters
|
385
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
386
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
387
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
388
|
+
# @return [HuggingFaceHuggingFaceDistributionResponse]
|
389
|
+
def read(hugging_face_hugging_face_distribution_href, opts = {})
|
390
|
+
data, _status_code, _headers = read_with_http_info(hugging_face_hugging_face_distribution_href, opts)
|
391
|
+
data
|
392
|
+
end
|
393
|
+
|
394
|
+
# Inspect a hugging face distribution
|
395
|
+
# A ViewSet for HuggingFaceDistribution. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
396
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
397
|
+
# @param [Hash] opts the optional parameters
|
398
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
399
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
400
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
401
|
+
# @return [Array<(HuggingFaceHuggingFaceDistributionResponse, Integer, Hash)>] HuggingFaceHuggingFaceDistributionResponse data, response status code and response headers
|
402
|
+
def read_with_http_info(hugging_face_hugging_face_distribution_href, opts = {})
|
403
|
+
if @api_client.config.debugging
|
404
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.read ...'
|
405
|
+
end
|
406
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution_href' is set
|
407
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution_href.nil?
|
408
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution_href' when calling DistributionsHuggingFaceApi.read"
|
409
|
+
end
|
410
|
+
# resource path
|
411
|
+
local_var_path = '{hugging_face_hugging_face_distribution_href}'.sub('{' + 'hugging_face_hugging_face_distribution_href' + '}', CGI.escape(hugging_face_hugging_face_distribution_href.to_s).gsub('%2F', '/'))
|
412
|
+
|
413
|
+
# query parameters
|
414
|
+
query_params = opts[:query_params] || {}
|
415
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
416
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
417
|
+
|
418
|
+
# header parameters
|
419
|
+
header_params = opts[:header_params] || {}
|
420
|
+
# HTTP header 'Accept' (if needed)
|
421
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
422
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
423
|
+
|
424
|
+
# form parameters
|
425
|
+
form_params = opts[:form_params] || {}
|
426
|
+
|
427
|
+
# http body (model)
|
428
|
+
post_body = opts[:debug_body]
|
429
|
+
|
430
|
+
# return_type
|
431
|
+
return_type = opts[:debug_return_type] || 'HuggingFaceHuggingFaceDistributionResponse'
|
432
|
+
|
433
|
+
# auth_names
|
434
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
435
|
+
|
436
|
+
new_options = opts.merge(
|
437
|
+
:operation => :"DistributionsHuggingFaceApi.read",
|
438
|
+
:header_params => header_params,
|
439
|
+
:query_params => query_params,
|
440
|
+
:form_params => form_params,
|
441
|
+
:body => post_body,
|
442
|
+
:auth_names => auth_names,
|
443
|
+
:return_type => return_type
|
444
|
+
)
|
445
|
+
|
446
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
447
|
+
if @api_client.config.debugging
|
448
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
449
|
+
end
|
450
|
+
return data, status_code, headers
|
451
|
+
end
|
452
|
+
|
453
|
+
# Set a label
|
454
|
+
# Set a single pulp_label on the object to a specific value or null.
|
455
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
456
|
+
# @param set_label [SetLabel]
|
457
|
+
# @param [Hash] opts the optional parameters
|
458
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
459
|
+
# @return [SetLabelResponse]
|
460
|
+
def set_label(hugging_face_hugging_face_distribution_href, set_label, opts = {})
|
461
|
+
data, _status_code, _headers = set_label_with_http_info(hugging_face_hugging_face_distribution_href, set_label, opts)
|
462
|
+
data
|
463
|
+
end
|
464
|
+
|
465
|
+
# Set a label
|
466
|
+
# Set a single pulp_label on the object to a specific value or null.
|
467
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
468
|
+
# @param set_label [SetLabel]
|
469
|
+
# @param [Hash] opts the optional parameters
|
470
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
471
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
472
|
+
def set_label_with_http_info(hugging_face_hugging_face_distribution_href, set_label, opts = {})
|
473
|
+
if @api_client.config.debugging
|
474
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.set_label ...'
|
475
|
+
end
|
476
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution_href' is set
|
477
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution_href.nil?
|
478
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution_href' when calling DistributionsHuggingFaceApi.set_label"
|
479
|
+
end
|
480
|
+
# verify the required parameter 'set_label' is set
|
481
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
482
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling DistributionsHuggingFaceApi.set_label"
|
483
|
+
end
|
484
|
+
# resource path
|
485
|
+
local_var_path = '{hugging_face_hugging_face_distribution_href}set_label/'.sub('{' + 'hugging_face_hugging_face_distribution_href' + '}', CGI.escape(hugging_face_hugging_face_distribution_href.to_s).gsub('%2F', '/'))
|
486
|
+
|
487
|
+
# query parameters
|
488
|
+
query_params = opts[:query_params] || {}
|
489
|
+
|
490
|
+
# header parameters
|
491
|
+
header_params = opts[:header_params] || {}
|
492
|
+
# HTTP header 'Accept' (if needed)
|
493
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
494
|
+
# HTTP header 'Content-Type'
|
495
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
496
|
+
if !content_type.nil?
|
497
|
+
header_params['Content-Type'] = content_type
|
498
|
+
end
|
499
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
500
|
+
|
501
|
+
# form parameters
|
502
|
+
form_params = opts[:form_params] || {}
|
503
|
+
|
504
|
+
# http body (model)
|
505
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
506
|
+
|
507
|
+
# return_type
|
508
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
509
|
+
|
510
|
+
# auth_names
|
511
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
512
|
+
|
513
|
+
new_options = opts.merge(
|
514
|
+
:operation => :"DistributionsHuggingFaceApi.set_label",
|
515
|
+
:header_params => header_params,
|
516
|
+
:query_params => query_params,
|
517
|
+
:form_params => form_params,
|
518
|
+
:body => post_body,
|
519
|
+
:auth_names => auth_names,
|
520
|
+
:return_type => return_type
|
521
|
+
)
|
522
|
+
|
523
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
524
|
+
if @api_client.config.debugging
|
525
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
526
|
+
end
|
527
|
+
return data, status_code, headers
|
528
|
+
end
|
529
|
+
|
530
|
+
# Unset a label
|
531
|
+
# Unset a single pulp_label on the object.
|
532
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
533
|
+
# @param unset_label [UnsetLabel]
|
534
|
+
# @param [Hash] opts the optional parameters
|
535
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
536
|
+
# @return [UnsetLabelResponse]
|
537
|
+
def unset_label(hugging_face_hugging_face_distribution_href, unset_label, opts = {})
|
538
|
+
data, _status_code, _headers = unset_label_with_http_info(hugging_face_hugging_face_distribution_href, unset_label, opts)
|
539
|
+
data
|
540
|
+
end
|
541
|
+
|
542
|
+
# Unset a label
|
543
|
+
# Unset a single pulp_label on the object.
|
544
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
545
|
+
# @param unset_label [UnsetLabel]
|
546
|
+
# @param [Hash] opts the optional parameters
|
547
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
548
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
549
|
+
def unset_label_with_http_info(hugging_face_hugging_face_distribution_href, unset_label, opts = {})
|
550
|
+
if @api_client.config.debugging
|
551
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.unset_label ...'
|
552
|
+
end
|
553
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution_href' is set
|
554
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution_href.nil?
|
555
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution_href' when calling DistributionsHuggingFaceApi.unset_label"
|
556
|
+
end
|
557
|
+
# verify the required parameter 'unset_label' is set
|
558
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
559
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling DistributionsHuggingFaceApi.unset_label"
|
560
|
+
end
|
561
|
+
# resource path
|
562
|
+
local_var_path = '{hugging_face_hugging_face_distribution_href}unset_label/'.sub('{' + 'hugging_face_hugging_face_distribution_href' + '}', CGI.escape(hugging_face_hugging_face_distribution_href.to_s).gsub('%2F', '/'))
|
563
|
+
|
564
|
+
# query parameters
|
565
|
+
query_params = opts[:query_params] || {}
|
566
|
+
|
567
|
+
# header parameters
|
568
|
+
header_params = opts[:header_params] || {}
|
569
|
+
# HTTP header 'Accept' (if needed)
|
570
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
571
|
+
# HTTP header 'Content-Type'
|
572
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
573
|
+
if !content_type.nil?
|
574
|
+
header_params['Content-Type'] = content_type
|
575
|
+
end
|
576
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
577
|
+
|
578
|
+
# form parameters
|
579
|
+
form_params = opts[:form_params] || {}
|
580
|
+
|
581
|
+
# http body (model)
|
582
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
583
|
+
|
584
|
+
# return_type
|
585
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
586
|
+
|
587
|
+
# auth_names
|
588
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
589
|
+
|
590
|
+
new_options = opts.merge(
|
591
|
+
:operation => :"DistributionsHuggingFaceApi.unset_label",
|
592
|
+
:header_params => header_params,
|
593
|
+
:query_params => query_params,
|
594
|
+
:form_params => form_params,
|
595
|
+
:body => post_body,
|
596
|
+
:auth_names => auth_names,
|
597
|
+
:return_type => return_type
|
598
|
+
)
|
599
|
+
|
600
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
601
|
+
if @api_client.config.debugging
|
602
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
603
|
+
end
|
604
|
+
return data, status_code, headers
|
605
|
+
end
|
606
|
+
|
607
|
+
# Update a hugging face distribution
|
608
|
+
# Trigger an asynchronous update task
|
609
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
610
|
+
# @param hugging_face_hugging_face_distribution [HuggingFaceHuggingFaceDistribution]
|
611
|
+
# @param [Hash] opts the optional parameters
|
612
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
613
|
+
# @return [AsyncOperationResponse]
|
614
|
+
def update(hugging_face_hugging_face_distribution_href, hugging_face_hugging_face_distribution, opts = {})
|
615
|
+
data, _status_code, _headers = update_with_http_info(hugging_face_hugging_face_distribution_href, hugging_face_hugging_face_distribution, opts)
|
616
|
+
data
|
617
|
+
end
|
618
|
+
|
619
|
+
# Update a hugging face distribution
|
620
|
+
# Trigger an asynchronous update task
|
621
|
+
# @param hugging_face_hugging_face_distribution_href [String]
|
622
|
+
# @param hugging_face_hugging_face_distribution [HuggingFaceHuggingFaceDistribution]
|
623
|
+
# @param [Hash] opts the optional parameters
|
624
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
625
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
626
|
+
def update_with_http_info(hugging_face_hugging_face_distribution_href, hugging_face_hugging_face_distribution, opts = {})
|
627
|
+
if @api_client.config.debugging
|
628
|
+
@api_client.config.logger.debug 'Calling API: DistributionsHuggingFaceApi.update ...'
|
629
|
+
end
|
630
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution_href' is set
|
631
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution_href.nil?
|
632
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution_href' when calling DistributionsHuggingFaceApi.update"
|
633
|
+
end
|
634
|
+
# verify the required parameter 'hugging_face_hugging_face_distribution' is set
|
635
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_distribution.nil?
|
636
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_distribution' when calling DistributionsHuggingFaceApi.update"
|
637
|
+
end
|
638
|
+
# resource path
|
639
|
+
local_var_path = '{hugging_face_hugging_face_distribution_href}'.sub('{' + 'hugging_face_hugging_face_distribution_href' + '}', CGI.escape(hugging_face_hugging_face_distribution_href.to_s).gsub('%2F', '/'))
|
640
|
+
|
641
|
+
# query parameters
|
642
|
+
query_params = opts[:query_params] || {}
|
643
|
+
|
644
|
+
# header parameters
|
645
|
+
header_params = opts[:header_params] || {}
|
646
|
+
# HTTP header 'Accept' (if needed)
|
647
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
648
|
+
# HTTP header 'Content-Type'
|
649
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
650
|
+
if !content_type.nil?
|
651
|
+
header_params['Content-Type'] = content_type
|
652
|
+
end
|
653
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
654
|
+
|
655
|
+
# form parameters
|
656
|
+
form_params = opts[:form_params] || {}
|
657
|
+
|
658
|
+
# http body (model)
|
659
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(hugging_face_hugging_face_distribution)
|
660
|
+
|
661
|
+
# return_type
|
662
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
663
|
+
|
664
|
+
# auth_names
|
665
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
666
|
+
|
667
|
+
new_options = opts.merge(
|
668
|
+
:operation => :"DistributionsHuggingFaceApi.update",
|
669
|
+
:header_params => header_params,
|
670
|
+
:query_params => query_params,
|
671
|
+
:form_params => form_params,
|
672
|
+
:body => post_body,
|
673
|
+
:auth_names => auth_names,
|
674
|
+
:return_type => return_type
|
675
|
+
)
|
676
|
+
|
677
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
678
|
+
if @api_client.config.debugging
|
679
|
+
@api_client.config.logger.debug "API called: DistributionsHuggingFaceApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
680
|
+
end
|
681
|
+
return data, status_code, headers
|
682
|
+
end
|
683
|
+
end
|
684
|
+
end
|