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,681 @@
|
|
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 RemotesHuggingFaceApi
|
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 remote
|
23
|
+
# A ViewSet for HuggingFaceRemote. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
24
|
+
# @param hugging_face_hugging_face_remote [HuggingFaceHuggingFaceRemote]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
27
|
+
# @return [HuggingFaceHuggingFaceRemoteResponse]
|
28
|
+
def create(hugging_face_hugging_face_remote, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(hugging_face_hugging_face_remote, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a hugging face remote
|
34
|
+
# A ViewSet for HuggingFaceRemote. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
35
|
+
# @param hugging_face_hugging_face_remote [HuggingFaceHuggingFaceRemote]
|
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<(HuggingFaceHuggingFaceRemoteResponse, Integer, Hash)>] HuggingFaceHuggingFaceRemoteResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(hugging_face_hugging_face_remote, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'hugging_face_hugging_face_remote' is set
|
44
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote' when calling RemotesHuggingFaceApi.create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/pulp/api/v3/remotes/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_remote)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'HuggingFaceHuggingFaceRemoteResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"RemotesHuggingFaceApi.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: RemotesHuggingFaceApi#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 remote
|
94
|
+
# Trigger an asynchronous delete task
|
95
|
+
# @param hugging_face_hugging_face_remote_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_remote_href, opts = {})
|
100
|
+
data, _status_code, _headers = delete_with_http_info(hugging_face_hugging_face_remote_href, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a hugging face remote
|
105
|
+
# Trigger an asynchronous delete task
|
106
|
+
# @param hugging_face_hugging_face_remote_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_remote_href, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.delete ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'hugging_face_hugging_face_remote_href' is set
|
115
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote_href.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote_href' when calling RemotesHuggingFaceApi.delete"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '{hugging_face_hugging_face_remote_href}'.sub('{' + 'hugging_face_hugging_face_remote_href' + '}', CGI.escape(hugging_face_hugging_face_remote_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 => :"RemotesHuggingFaceApi.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: RemotesHuggingFaceApi#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 remotes
|
160
|
+
# A ViewSet for HuggingFaceRemote. 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 [Integer] :limit Number of results to return per page.
|
164
|
+
# @option opts [String] :name Filter results where name matches value
|
165
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
166
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
167
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
168
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
169
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
170
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
171
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
172
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
173
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
174
|
+
# @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) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
175
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
176
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
177
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
178
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
179
|
+
# @option opts [Time] :pulp_last_updated Filter results where pulp_last_updated matches value
|
180
|
+
# @option opts [Time] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
181
|
+
# @option opts [Time] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
182
|
+
# @option opts [Boolean] :pulp_last_updated__isnull Filter results where pulp_last_updated has a null value
|
183
|
+
# @option opts [Time] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
184
|
+
# @option opts [Time] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
185
|
+
# @option opts [Array<Time>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
186
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
187
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
188
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
189
|
+
# @return [PaginatedhuggingFaceHuggingFaceRemoteResponseList]
|
190
|
+
def list(opts = {})
|
191
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
192
|
+
data
|
193
|
+
end
|
194
|
+
|
195
|
+
# List hugging face remotes
|
196
|
+
# A ViewSet for HuggingFaceRemote. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
197
|
+
# @param [Hash] opts the optional parameters
|
198
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
199
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
200
|
+
# @option opts [String] :name Filter results where name matches value
|
201
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
202
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
203
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
204
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
205
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
206
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
207
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
208
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
209
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
210
|
+
# @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) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
211
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
212
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
213
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
214
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
215
|
+
# @option opts [Time] :pulp_last_updated Filter results where pulp_last_updated matches value
|
216
|
+
# @option opts [Time] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
217
|
+
# @option opts [Time] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
218
|
+
# @option opts [Boolean] :pulp_last_updated__isnull Filter results where pulp_last_updated has a null value
|
219
|
+
# @option opts [Time] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
220
|
+
# @option opts [Time] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
221
|
+
# @option opts [Array<Time>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
222
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
223
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
224
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
225
|
+
# @return [Array<(PaginatedhuggingFaceHuggingFaceRemoteResponseList, Integer, Hash)>] PaginatedhuggingFaceHuggingFaceRemoteResponseList data, response status code and response headers
|
226
|
+
def list_with_http_info(opts = {})
|
227
|
+
if @api_client.config.debugging
|
228
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.list ...'
|
229
|
+
end
|
230
|
+
allowable_values = ["-ca_cert", "-client_cert", "-client_key", "-connect_timeout", "-download_concurrency", "-headers", "-max_retries", "-name", "-password", "-pk", "-policy", "-proxy_password", "-proxy_url", "-proxy_username", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-rate_limit", "-sock_connect_timeout", "-sock_read_timeout", "-tls_validation", "-total_timeout", "-url", "-username", "ca_cert", "client_cert", "client_key", "connect_timeout", "download_concurrency", "headers", "max_retries", "name", "password", "pk", "policy", "proxy_password", "proxy_url", "proxy_username", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "rate_limit", "sock_connect_timeout", "sock_read_timeout", "tls_validation", "total_timeout", "url", "username"]
|
231
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
232
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
233
|
+
end
|
234
|
+
# resource path
|
235
|
+
local_var_path = '/pulp/api/v3/remotes/hugging_face/hugging-face/'
|
236
|
+
|
237
|
+
# query parameters
|
238
|
+
query_params = opts[:query_params] || {}
|
239
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
240
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
241
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
242
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
243
|
+
query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
|
244
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
245
|
+
query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
|
246
|
+
query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
|
247
|
+
query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
|
248
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
249
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
250
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
251
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
252
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
253
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
254
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
255
|
+
query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
|
256
|
+
query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
|
257
|
+
query_params[:'pulp_last_updated__gte'] = opts[:'pulp_last_updated__gte'] if !opts[:'pulp_last_updated__gte'].nil?
|
258
|
+
query_params[:'pulp_last_updated__isnull'] = opts[:'pulp_last_updated__isnull'] if !opts[:'pulp_last_updated__isnull'].nil?
|
259
|
+
query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
|
260
|
+
query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
|
261
|
+
query_params[:'pulp_last_updated__range'] = @api_client.build_collection_param(opts[:'pulp_last_updated__range'], :csv) if !opts[:'pulp_last_updated__range'].nil?
|
262
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
263
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
264
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
265
|
+
|
266
|
+
# header parameters
|
267
|
+
header_params = opts[:header_params] || {}
|
268
|
+
# HTTP header 'Accept' (if needed)
|
269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
270
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
271
|
+
|
272
|
+
# form parameters
|
273
|
+
form_params = opts[:form_params] || {}
|
274
|
+
|
275
|
+
# http body (model)
|
276
|
+
post_body = opts[:debug_body]
|
277
|
+
|
278
|
+
# return_type
|
279
|
+
return_type = opts[:debug_return_type] || 'PaginatedhuggingFaceHuggingFaceRemoteResponseList'
|
280
|
+
|
281
|
+
# auth_names
|
282
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
283
|
+
|
284
|
+
new_options = opts.merge(
|
285
|
+
:operation => :"RemotesHuggingFaceApi.list",
|
286
|
+
:header_params => header_params,
|
287
|
+
:query_params => query_params,
|
288
|
+
:form_params => form_params,
|
289
|
+
:body => post_body,
|
290
|
+
:auth_names => auth_names,
|
291
|
+
:return_type => return_type
|
292
|
+
)
|
293
|
+
|
294
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug "API called: RemotesHuggingFaceApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
297
|
+
end
|
298
|
+
return data, status_code, headers
|
299
|
+
end
|
300
|
+
|
301
|
+
# Update a hugging face remote
|
302
|
+
# Trigger an asynchronous partial update task
|
303
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
304
|
+
# @param patchedhugging_face_hugging_face_remote [PatchedhuggingFaceHuggingFaceRemote]
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
307
|
+
# @return [AsyncOperationResponse]
|
308
|
+
def partial_update(hugging_face_hugging_face_remote_href, patchedhugging_face_hugging_face_remote, opts = {})
|
309
|
+
data, _status_code, _headers = partial_update_with_http_info(hugging_face_hugging_face_remote_href, patchedhugging_face_hugging_face_remote, opts)
|
310
|
+
data
|
311
|
+
end
|
312
|
+
|
313
|
+
# Update a hugging face remote
|
314
|
+
# Trigger an asynchronous partial update task
|
315
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
316
|
+
# @param patchedhugging_face_hugging_face_remote [PatchedhuggingFaceHuggingFaceRemote]
|
317
|
+
# @param [Hash] opts the optional parameters
|
318
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
319
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
320
|
+
def partial_update_with_http_info(hugging_face_hugging_face_remote_href, patchedhugging_face_hugging_face_remote, opts = {})
|
321
|
+
if @api_client.config.debugging
|
322
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.partial_update ...'
|
323
|
+
end
|
324
|
+
# verify the required parameter 'hugging_face_hugging_face_remote_href' is set
|
325
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote_href.nil?
|
326
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote_href' when calling RemotesHuggingFaceApi.partial_update"
|
327
|
+
end
|
328
|
+
# verify the required parameter 'patchedhugging_face_hugging_face_remote' is set
|
329
|
+
if @api_client.config.client_side_validation && patchedhugging_face_hugging_face_remote.nil?
|
330
|
+
fail ArgumentError, "Missing the required parameter 'patchedhugging_face_hugging_face_remote' when calling RemotesHuggingFaceApi.partial_update"
|
331
|
+
end
|
332
|
+
# resource path
|
333
|
+
local_var_path = '{hugging_face_hugging_face_remote_href}'.sub('{' + 'hugging_face_hugging_face_remote_href' + '}', CGI.escape(hugging_face_hugging_face_remote_href.to_s).gsub('%2F', '/'))
|
334
|
+
|
335
|
+
# query parameters
|
336
|
+
query_params = opts[:query_params] || {}
|
337
|
+
|
338
|
+
# header parameters
|
339
|
+
header_params = opts[:header_params] || {}
|
340
|
+
# HTTP header 'Accept' (if needed)
|
341
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
342
|
+
# HTTP header 'Content-Type'
|
343
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
344
|
+
if !content_type.nil?
|
345
|
+
header_params['Content-Type'] = content_type
|
346
|
+
end
|
347
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
348
|
+
|
349
|
+
# form parameters
|
350
|
+
form_params = opts[:form_params] || {}
|
351
|
+
|
352
|
+
# http body (model)
|
353
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patchedhugging_face_hugging_face_remote)
|
354
|
+
|
355
|
+
# return_type
|
356
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
357
|
+
|
358
|
+
# auth_names
|
359
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
360
|
+
|
361
|
+
new_options = opts.merge(
|
362
|
+
:operation => :"RemotesHuggingFaceApi.partial_update",
|
363
|
+
:header_params => header_params,
|
364
|
+
:query_params => query_params,
|
365
|
+
:form_params => form_params,
|
366
|
+
:body => post_body,
|
367
|
+
:auth_names => auth_names,
|
368
|
+
:return_type => return_type
|
369
|
+
)
|
370
|
+
|
371
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "API called: RemotesHuggingFaceApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
|
+
end
|
375
|
+
return data, status_code, headers
|
376
|
+
end
|
377
|
+
|
378
|
+
# Inspect a hugging face remote
|
379
|
+
# A ViewSet for HuggingFaceRemote. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
380
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
381
|
+
# @param [Hash] opts the optional parameters
|
382
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
383
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
384
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
385
|
+
# @return [HuggingFaceHuggingFaceRemoteResponse]
|
386
|
+
def read(hugging_face_hugging_face_remote_href, opts = {})
|
387
|
+
data, _status_code, _headers = read_with_http_info(hugging_face_hugging_face_remote_href, opts)
|
388
|
+
data
|
389
|
+
end
|
390
|
+
|
391
|
+
# Inspect a hugging face remote
|
392
|
+
# A ViewSet for HuggingFaceRemote. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
393
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
394
|
+
# @param [Hash] opts the optional parameters
|
395
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
396
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
397
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
398
|
+
# @return [Array<(HuggingFaceHuggingFaceRemoteResponse, Integer, Hash)>] HuggingFaceHuggingFaceRemoteResponse data, response status code and response headers
|
399
|
+
def read_with_http_info(hugging_face_hugging_face_remote_href, opts = {})
|
400
|
+
if @api_client.config.debugging
|
401
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.read ...'
|
402
|
+
end
|
403
|
+
# verify the required parameter 'hugging_face_hugging_face_remote_href' is set
|
404
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote_href.nil?
|
405
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote_href' when calling RemotesHuggingFaceApi.read"
|
406
|
+
end
|
407
|
+
# resource path
|
408
|
+
local_var_path = '{hugging_face_hugging_face_remote_href}'.sub('{' + 'hugging_face_hugging_face_remote_href' + '}', CGI.escape(hugging_face_hugging_face_remote_href.to_s).gsub('%2F', '/'))
|
409
|
+
|
410
|
+
# query parameters
|
411
|
+
query_params = opts[:query_params] || {}
|
412
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
413
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
414
|
+
|
415
|
+
# header parameters
|
416
|
+
header_params = opts[:header_params] || {}
|
417
|
+
# HTTP header 'Accept' (if needed)
|
418
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
419
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
420
|
+
|
421
|
+
# form parameters
|
422
|
+
form_params = opts[:form_params] || {}
|
423
|
+
|
424
|
+
# http body (model)
|
425
|
+
post_body = opts[:debug_body]
|
426
|
+
|
427
|
+
# return_type
|
428
|
+
return_type = opts[:debug_return_type] || 'HuggingFaceHuggingFaceRemoteResponse'
|
429
|
+
|
430
|
+
# auth_names
|
431
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
432
|
+
|
433
|
+
new_options = opts.merge(
|
434
|
+
:operation => :"RemotesHuggingFaceApi.read",
|
435
|
+
:header_params => header_params,
|
436
|
+
:query_params => query_params,
|
437
|
+
:form_params => form_params,
|
438
|
+
:body => post_body,
|
439
|
+
:auth_names => auth_names,
|
440
|
+
:return_type => return_type
|
441
|
+
)
|
442
|
+
|
443
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
444
|
+
if @api_client.config.debugging
|
445
|
+
@api_client.config.logger.debug "API called: RemotesHuggingFaceApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
446
|
+
end
|
447
|
+
return data, status_code, headers
|
448
|
+
end
|
449
|
+
|
450
|
+
# Set a label
|
451
|
+
# Set a single pulp_label on the object to a specific value or null.
|
452
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
453
|
+
# @param set_label [SetLabel]
|
454
|
+
# @param [Hash] opts the optional parameters
|
455
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
456
|
+
# @return [SetLabelResponse]
|
457
|
+
def set_label(hugging_face_hugging_face_remote_href, set_label, opts = {})
|
458
|
+
data, _status_code, _headers = set_label_with_http_info(hugging_face_hugging_face_remote_href, set_label, opts)
|
459
|
+
data
|
460
|
+
end
|
461
|
+
|
462
|
+
# Set a label
|
463
|
+
# Set a single pulp_label on the object to a specific value or null.
|
464
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
465
|
+
# @param set_label [SetLabel]
|
466
|
+
# @param [Hash] opts the optional parameters
|
467
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
468
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
469
|
+
def set_label_with_http_info(hugging_face_hugging_face_remote_href, set_label, opts = {})
|
470
|
+
if @api_client.config.debugging
|
471
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.set_label ...'
|
472
|
+
end
|
473
|
+
# verify the required parameter 'hugging_face_hugging_face_remote_href' is set
|
474
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote_href.nil?
|
475
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote_href' when calling RemotesHuggingFaceApi.set_label"
|
476
|
+
end
|
477
|
+
# verify the required parameter 'set_label' is set
|
478
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
479
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling RemotesHuggingFaceApi.set_label"
|
480
|
+
end
|
481
|
+
# resource path
|
482
|
+
local_var_path = '{hugging_face_hugging_face_remote_href}set_label/'.sub('{' + 'hugging_face_hugging_face_remote_href' + '}', CGI.escape(hugging_face_hugging_face_remote_href.to_s).gsub('%2F', '/'))
|
483
|
+
|
484
|
+
# query parameters
|
485
|
+
query_params = opts[:query_params] || {}
|
486
|
+
|
487
|
+
# header parameters
|
488
|
+
header_params = opts[:header_params] || {}
|
489
|
+
# HTTP header 'Accept' (if needed)
|
490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
491
|
+
# HTTP header 'Content-Type'
|
492
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
493
|
+
if !content_type.nil?
|
494
|
+
header_params['Content-Type'] = content_type
|
495
|
+
end
|
496
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
497
|
+
|
498
|
+
# form parameters
|
499
|
+
form_params = opts[:form_params] || {}
|
500
|
+
|
501
|
+
# http body (model)
|
502
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
503
|
+
|
504
|
+
# return_type
|
505
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
506
|
+
|
507
|
+
# auth_names
|
508
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
509
|
+
|
510
|
+
new_options = opts.merge(
|
511
|
+
:operation => :"RemotesHuggingFaceApi.set_label",
|
512
|
+
:header_params => header_params,
|
513
|
+
:query_params => query_params,
|
514
|
+
:form_params => form_params,
|
515
|
+
:body => post_body,
|
516
|
+
:auth_names => auth_names,
|
517
|
+
:return_type => return_type
|
518
|
+
)
|
519
|
+
|
520
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
521
|
+
if @api_client.config.debugging
|
522
|
+
@api_client.config.logger.debug "API called: RemotesHuggingFaceApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
523
|
+
end
|
524
|
+
return data, status_code, headers
|
525
|
+
end
|
526
|
+
|
527
|
+
# Unset a label
|
528
|
+
# Unset a single pulp_label on the object.
|
529
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
530
|
+
# @param unset_label [UnsetLabel]
|
531
|
+
# @param [Hash] opts the optional parameters
|
532
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
533
|
+
# @return [UnsetLabelResponse]
|
534
|
+
def unset_label(hugging_face_hugging_face_remote_href, unset_label, opts = {})
|
535
|
+
data, _status_code, _headers = unset_label_with_http_info(hugging_face_hugging_face_remote_href, unset_label, opts)
|
536
|
+
data
|
537
|
+
end
|
538
|
+
|
539
|
+
# Unset a label
|
540
|
+
# Unset a single pulp_label on the object.
|
541
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
542
|
+
# @param unset_label [UnsetLabel]
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
545
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
546
|
+
def unset_label_with_http_info(hugging_face_hugging_face_remote_href, unset_label, opts = {})
|
547
|
+
if @api_client.config.debugging
|
548
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.unset_label ...'
|
549
|
+
end
|
550
|
+
# verify the required parameter 'hugging_face_hugging_face_remote_href' is set
|
551
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote_href.nil?
|
552
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote_href' when calling RemotesHuggingFaceApi.unset_label"
|
553
|
+
end
|
554
|
+
# verify the required parameter 'unset_label' is set
|
555
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
556
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling RemotesHuggingFaceApi.unset_label"
|
557
|
+
end
|
558
|
+
# resource path
|
559
|
+
local_var_path = '{hugging_face_hugging_face_remote_href}unset_label/'.sub('{' + 'hugging_face_hugging_face_remote_href' + '}', CGI.escape(hugging_face_hugging_face_remote_href.to_s).gsub('%2F', '/'))
|
560
|
+
|
561
|
+
# query parameters
|
562
|
+
query_params = opts[:query_params] || {}
|
563
|
+
|
564
|
+
# header parameters
|
565
|
+
header_params = opts[:header_params] || {}
|
566
|
+
# HTTP header 'Accept' (if needed)
|
567
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
568
|
+
# HTTP header 'Content-Type'
|
569
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
570
|
+
if !content_type.nil?
|
571
|
+
header_params['Content-Type'] = content_type
|
572
|
+
end
|
573
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
574
|
+
|
575
|
+
# form parameters
|
576
|
+
form_params = opts[:form_params] || {}
|
577
|
+
|
578
|
+
# http body (model)
|
579
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
580
|
+
|
581
|
+
# return_type
|
582
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
583
|
+
|
584
|
+
# auth_names
|
585
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
586
|
+
|
587
|
+
new_options = opts.merge(
|
588
|
+
:operation => :"RemotesHuggingFaceApi.unset_label",
|
589
|
+
:header_params => header_params,
|
590
|
+
:query_params => query_params,
|
591
|
+
:form_params => form_params,
|
592
|
+
:body => post_body,
|
593
|
+
:auth_names => auth_names,
|
594
|
+
:return_type => return_type
|
595
|
+
)
|
596
|
+
|
597
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
598
|
+
if @api_client.config.debugging
|
599
|
+
@api_client.config.logger.debug "API called: RemotesHuggingFaceApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
600
|
+
end
|
601
|
+
return data, status_code, headers
|
602
|
+
end
|
603
|
+
|
604
|
+
# Update a hugging face remote
|
605
|
+
# Trigger an asynchronous update task
|
606
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
607
|
+
# @param hugging_face_hugging_face_remote [HuggingFaceHuggingFaceRemote]
|
608
|
+
# @param [Hash] opts the optional parameters
|
609
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
610
|
+
# @return [AsyncOperationResponse]
|
611
|
+
def update(hugging_face_hugging_face_remote_href, hugging_face_hugging_face_remote, opts = {})
|
612
|
+
data, _status_code, _headers = update_with_http_info(hugging_face_hugging_face_remote_href, hugging_face_hugging_face_remote, opts)
|
613
|
+
data
|
614
|
+
end
|
615
|
+
|
616
|
+
# Update a hugging face remote
|
617
|
+
# Trigger an asynchronous update task
|
618
|
+
# @param hugging_face_hugging_face_remote_href [String]
|
619
|
+
# @param hugging_face_hugging_face_remote [HuggingFaceHuggingFaceRemote]
|
620
|
+
# @param [Hash] opts the optional parameters
|
621
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
622
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
623
|
+
def update_with_http_info(hugging_face_hugging_face_remote_href, hugging_face_hugging_face_remote, opts = {})
|
624
|
+
if @api_client.config.debugging
|
625
|
+
@api_client.config.logger.debug 'Calling API: RemotesHuggingFaceApi.update ...'
|
626
|
+
end
|
627
|
+
# verify the required parameter 'hugging_face_hugging_face_remote_href' is set
|
628
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote_href.nil?
|
629
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote_href' when calling RemotesHuggingFaceApi.update"
|
630
|
+
end
|
631
|
+
# verify the required parameter 'hugging_face_hugging_face_remote' is set
|
632
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_remote.nil?
|
633
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_remote' when calling RemotesHuggingFaceApi.update"
|
634
|
+
end
|
635
|
+
# resource path
|
636
|
+
local_var_path = '{hugging_face_hugging_face_remote_href}'.sub('{' + 'hugging_face_hugging_face_remote_href' + '}', CGI.escape(hugging_face_hugging_face_remote_href.to_s).gsub('%2F', '/'))
|
637
|
+
|
638
|
+
# query parameters
|
639
|
+
query_params = opts[:query_params] || {}
|
640
|
+
|
641
|
+
# header parameters
|
642
|
+
header_params = opts[:header_params] || {}
|
643
|
+
# HTTP header 'Accept' (if needed)
|
644
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
645
|
+
# HTTP header 'Content-Type'
|
646
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
647
|
+
if !content_type.nil?
|
648
|
+
header_params['Content-Type'] = content_type
|
649
|
+
end
|
650
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
651
|
+
|
652
|
+
# form parameters
|
653
|
+
form_params = opts[:form_params] || {}
|
654
|
+
|
655
|
+
# http body (model)
|
656
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(hugging_face_hugging_face_remote)
|
657
|
+
|
658
|
+
# return_type
|
659
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
660
|
+
|
661
|
+
# auth_names
|
662
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
663
|
+
|
664
|
+
new_options = opts.merge(
|
665
|
+
:operation => :"RemotesHuggingFaceApi.update",
|
666
|
+
:header_params => header_params,
|
667
|
+
:query_params => query_params,
|
668
|
+
:form_params => form_params,
|
669
|
+
:body => post_body,
|
670
|
+
:auth_names => auth_names,
|
671
|
+
:return_type => return_type
|
672
|
+
)
|
673
|
+
|
674
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
675
|
+
if @api_client.config.debugging
|
676
|
+
@api_client.config.logger.debug "API called: RemotesHuggingFaceApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
677
|
+
end
|
678
|
+
return data, status_code, headers
|
679
|
+
end
|
680
|
+
end
|
681
|
+
end
|