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,847 @@
|
|
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 RepositoriesHuggingFaceApi
|
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 repository
|
23
|
+
# A ViewSet for HuggingFaceRepository. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
24
|
+
# @param hugging_face_hugging_face_repository [HuggingFaceHuggingFaceRepository]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
27
|
+
# @return [HuggingFaceHuggingFaceRepositoryResponse]
|
28
|
+
def create(hugging_face_hugging_face_repository, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(hugging_face_hugging_face_repository, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a hugging face repository
|
34
|
+
# A ViewSet for HuggingFaceRepository. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
35
|
+
# @param hugging_face_hugging_face_repository [HuggingFaceHuggingFaceRepository]
|
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<(HuggingFaceHuggingFaceRepositoryResponse, Integer, Hash)>] HuggingFaceHuggingFaceRepositoryResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(hugging_face_hugging_face_repository, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'hugging_face_hugging_face_repository' is set
|
44
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository' when calling RepositoriesHuggingFaceApi.create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/pulp/api/v3/repositories/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_repository)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'HuggingFaceHuggingFaceRepositoryResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"RepositoriesHuggingFaceApi.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: RepositoriesHuggingFaceApi#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 repository
|
94
|
+
# Trigger an asynchronous delete task
|
95
|
+
# @param hugging_face_hugging_face_repository_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_repository_href, opts = {})
|
100
|
+
data, _status_code, _headers = delete_with_http_info(hugging_face_hugging_face_repository_href, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a hugging face repository
|
105
|
+
# Trigger an asynchronous delete task
|
106
|
+
# @param hugging_face_hugging_face_repository_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_repository_href, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.delete ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
115
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.delete"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_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 => :"RepositoriesHuggingFaceApi.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: RepositoriesHuggingFaceApi#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 repositorys
|
160
|
+
# A ViewSet for HuggingFaceRepository. 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] :latest_with_content Content Unit referenced by HREF/PRN
|
164
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
165
|
+
# @option opts [String] :name Filter results where name matches value
|
166
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
167
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
168
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
169
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
170
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
171
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
172
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
173
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
174
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
175
|
+
# @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) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
176
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
177
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
178
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
179
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
180
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
181
|
+
# @option opts [String] :remote Foreign Key referenced by HREF
|
182
|
+
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
183
|
+
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
184
|
+
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
185
|
+
# @option opts [Boolean] :retain_repo_versions__isnull Filter results where retain_repo_versions has a null value
|
186
|
+
# @option opts [Integer] :retain_repo_versions__lt Filter results where retain_repo_versions is less than value
|
187
|
+
# @option opts [Integer] :retain_repo_versions__lte Filter results where retain_repo_versions is less than or equal to value
|
188
|
+
# @option opts [Integer] :retain_repo_versions__ne Filter results where retain_repo_versions not equal to value
|
189
|
+
# @option opts [Array<Integer>] :retain_repo_versions__range Filter results where retain_repo_versions is between two comma separated values
|
190
|
+
# @option opts [String] :with_content Content Unit referenced by HREF/PRN
|
191
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
192
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
193
|
+
# @return [PaginatedhuggingFaceHuggingFaceRepositoryResponseList]
|
194
|
+
def list(opts = {})
|
195
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
196
|
+
data
|
197
|
+
end
|
198
|
+
|
199
|
+
# List hugging face repositorys
|
200
|
+
# A ViewSet for HuggingFaceRepository. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
201
|
+
# @param [Hash] opts the optional parameters
|
202
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
203
|
+
# @option opts [String] :latest_with_content Content Unit referenced by HREF/PRN
|
204
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
205
|
+
# @option opts [String] :name Filter results where name matches value
|
206
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
207
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
208
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
209
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
210
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
211
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
212
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
213
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
214
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
215
|
+
# @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) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
216
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
217
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
218
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
219
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
220
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
221
|
+
# @option opts [String] :remote Foreign Key referenced by HREF
|
222
|
+
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
223
|
+
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
224
|
+
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
225
|
+
# @option opts [Boolean] :retain_repo_versions__isnull Filter results where retain_repo_versions has a null value
|
226
|
+
# @option opts [Integer] :retain_repo_versions__lt Filter results where retain_repo_versions is less than value
|
227
|
+
# @option opts [Integer] :retain_repo_versions__lte Filter results where retain_repo_versions is less than or equal to value
|
228
|
+
# @option opts [Integer] :retain_repo_versions__ne Filter results where retain_repo_versions not equal to value
|
229
|
+
# @option opts [Array<Integer>] :retain_repo_versions__range Filter results where retain_repo_versions is between two comma separated values
|
230
|
+
# @option opts [String] :with_content Content Unit referenced by HREF/PRN
|
231
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
232
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
233
|
+
# @return [Array<(PaginatedhuggingFaceHuggingFaceRepositoryResponseList, Integer, Hash)>] PaginatedhuggingFaceHuggingFaceRepositoryResponseList data, response status code and response headers
|
234
|
+
def list_with_http_info(opts = {})
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.list ...'
|
237
|
+
end
|
238
|
+
allowable_values = ["-description", "-name", "-next_version", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-retain_repo_versions", "-user_hidden", "description", "name", "next_version", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "retain_repo_versions", "user_hidden"]
|
239
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
240
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
241
|
+
end
|
242
|
+
# resource path
|
243
|
+
local_var_path = '/pulp/api/v3/repositories/hugging_face/hugging-face/'
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = opts[:query_params] || {}
|
247
|
+
query_params[:'latest_with_content'] = opts[:'latest_with_content'] if !opts[:'latest_with_content'].nil?
|
248
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
249
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
250
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
251
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
252
|
+
query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
|
253
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
254
|
+
query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
|
255
|
+
query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
|
256
|
+
query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
|
257
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
258
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
259
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
260
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
261
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
262
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
263
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
264
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
265
|
+
query_params[:'remote'] = opts[:'remote'] if !opts[:'remote'].nil?
|
266
|
+
query_params[:'retain_repo_versions'] = opts[:'retain_repo_versions'] if !opts[:'retain_repo_versions'].nil?
|
267
|
+
query_params[:'retain_repo_versions__gt'] = opts[:'retain_repo_versions__gt'] if !opts[:'retain_repo_versions__gt'].nil?
|
268
|
+
query_params[:'retain_repo_versions__gte'] = opts[:'retain_repo_versions__gte'] if !opts[:'retain_repo_versions__gte'].nil?
|
269
|
+
query_params[:'retain_repo_versions__isnull'] = opts[:'retain_repo_versions__isnull'] if !opts[:'retain_repo_versions__isnull'].nil?
|
270
|
+
query_params[:'retain_repo_versions__lt'] = opts[:'retain_repo_versions__lt'] if !opts[:'retain_repo_versions__lt'].nil?
|
271
|
+
query_params[:'retain_repo_versions__lte'] = opts[:'retain_repo_versions__lte'] if !opts[:'retain_repo_versions__lte'].nil?
|
272
|
+
query_params[:'retain_repo_versions__ne'] = opts[:'retain_repo_versions__ne'] if !opts[:'retain_repo_versions__ne'].nil?
|
273
|
+
query_params[:'retain_repo_versions__range'] = @api_client.build_collection_param(opts[:'retain_repo_versions__range'], :csv) if !opts[:'retain_repo_versions__range'].nil?
|
274
|
+
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
275
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
276
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
277
|
+
|
278
|
+
# header parameters
|
279
|
+
header_params = opts[:header_params] || {}
|
280
|
+
# HTTP header 'Accept' (if needed)
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
282
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = opts[:form_params] || {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = opts[:debug_body]
|
289
|
+
|
290
|
+
# return_type
|
291
|
+
return_type = opts[:debug_return_type] || 'PaginatedhuggingFaceHuggingFaceRepositoryResponseList'
|
292
|
+
|
293
|
+
# auth_names
|
294
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
295
|
+
|
296
|
+
new_options = opts.merge(
|
297
|
+
:operation => :"RepositoriesHuggingFaceApi.list",
|
298
|
+
:header_params => header_params,
|
299
|
+
:query_params => query_params,
|
300
|
+
:form_params => form_params,
|
301
|
+
:body => post_body,
|
302
|
+
:auth_names => auth_names,
|
303
|
+
:return_type => return_type
|
304
|
+
)
|
305
|
+
|
306
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
307
|
+
if @api_client.config.debugging
|
308
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
309
|
+
end
|
310
|
+
return data, status_code, headers
|
311
|
+
end
|
312
|
+
|
313
|
+
# Modify Repository Content
|
314
|
+
# Trigger an asynchronous task to create a new repository version.
|
315
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
316
|
+
# @param repository_add_remove_content [RepositoryAddRemoveContent]
|
317
|
+
# @param [Hash] opts the optional parameters
|
318
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
319
|
+
# @return [AsyncOperationResponse]
|
320
|
+
def modify(hugging_face_hugging_face_repository_href, repository_add_remove_content, opts = {})
|
321
|
+
data, _status_code, _headers = modify_with_http_info(hugging_face_hugging_face_repository_href, repository_add_remove_content, opts)
|
322
|
+
data
|
323
|
+
end
|
324
|
+
|
325
|
+
# Modify Repository Content
|
326
|
+
# Trigger an asynchronous task to create a new repository version.
|
327
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
328
|
+
# @param repository_add_remove_content [RepositoryAddRemoveContent]
|
329
|
+
# @param [Hash] opts the optional parameters
|
330
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
331
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
332
|
+
def modify_with_http_info(hugging_face_hugging_face_repository_href, repository_add_remove_content, opts = {})
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.modify ...'
|
335
|
+
end
|
336
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
337
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
338
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.modify"
|
339
|
+
end
|
340
|
+
# verify the required parameter 'repository_add_remove_content' is set
|
341
|
+
if @api_client.config.client_side_validation && repository_add_remove_content.nil?
|
342
|
+
fail ArgumentError, "Missing the required parameter 'repository_add_remove_content' when calling RepositoriesHuggingFaceApi.modify"
|
343
|
+
end
|
344
|
+
# resource path
|
345
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}modify/'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
346
|
+
|
347
|
+
# query parameters
|
348
|
+
query_params = opts[:query_params] || {}
|
349
|
+
|
350
|
+
# header parameters
|
351
|
+
header_params = opts[:header_params] || {}
|
352
|
+
# HTTP header 'Accept' (if needed)
|
353
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
354
|
+
# HTTP header 'Content-Type'
|
355
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
356
|
+
if !content_type.nil?
|
357
|
+
header_params['Content-Type'] = content_type
|
358
|
+
end
|
359
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
360
|
+
|
361
|
+
# form parameters
|
362
|
+
form_params = opts[:form_params] || {}
|
363
|
+
|
364
|
+
# http body (model)
|
365
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(repository_add_remove_content)
|
366
|
+
|
367
|
+
# return_type
|
368
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
369
|
+
|
370
|
+
# auth_names
|
371
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
372
|
+
|
373
|
+
new_options = opts.merge(
|
374
|
+
:operation => :"RepositoriesHuggingFaceApi.modify",
|
375
|
+
:header_params => header_params,
|
376
|
+
:query_params => query_params,
|
377
|
+
:form_params => form_params,
|
378
|
+
:body => post_body,
|
379
|
+
:auth_names => auth_names,
|
380
|
+
:return_type => return_type
|
381
|
+
)
|
382
|
+
|
383
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
384
|
+
if @api_client.config.debugging
|
385
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
386
|
+
end
|
387
|
+
return data, status_code, headers
|
388
|
+
end
|
389
|
+
|
390
|
+
# Update a hugging face repository
|
391
|
+
# Trigger an asynchronous partial update task
|
392
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
393
|
+
# @param patchedhugging_face_hugging_face_repository [PatchedhuggingFaceHuggingFaceRepository]
|
394
|
+
# @param [Hash] opts the optional parameters
|
395
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
396
|
+
# @return [AsyncOperationResponse]
|
397
|
+
def partial_update(hugging_face_hugging_face_repository_href, patchedhugging_face_hugging_face_repository, opts = {})
|
398
|
+
data, _status_code, _headers = partial_update_with_http_info(hugging_face_hugging_face_repository_href, patchedhugging_face_hugging_face_repository, opts)
|
399
|
+
data
|
400
|
+
end
|
401
|
+
|
402
|
+
# Update a hugging face repository
|
403
|
+
# Trigger an asynchronous partial update task
|
404
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
405
|
+
# @param patchedhugging_face_hugging_face_repository [PatchedhuggingFaceHuggingFaceRepository]
|
406
|
+
# @param [Hash] opts the optional parameters
|
407
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
408
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
409
|
+
def partial_update_with_http_info(hugging_face_hugging_face_repository_href, patchedhugging_face_hugging_face_repository, opts = {})
|
410
|
+
if @api_client.config.debugging
|
411
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.partial_update ...'
|
412
|
+
end
|
413
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
414
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
415
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.partial_update"
|
416
|
+
end
|
417
|
+
# verify the required parameter 'patchedhugging_face_hugging_face_repository' is set
|
418
|
+
if @api_client.config.client_side_validation && patchedhugging_face_hugging_face_repository.nil?
|
419
|
+
fail ArgumentError, "Missing the required parameter 'patchedhugging_face_hugging_face_repository' when calling RepositoriesHuggingFaceApi.partial_update"
|
420
|
+
end
|
421
|
+
# resource path
|
422
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
423
|
+
|
424
|
+
# query parameters
|
425
|
+
query_params = opts[:query_params] || {}
|
426
|
+
|
427
|
+
# header parameters
|
428
|
+
header_params = opts[:header_params] || {}
|
429
|
+
# HTTP header 'Accept' (if needed)
|
430
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
431
|
+
# HTTP header 'Content-Type'
|
432
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
433
|
+
if !content_type.nil?
|
434
|
+
header_params['Content-Type'] = content_type
|
435
|
+
end
|
436
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
437
|
+
|
438
|
+
# form parameters
|
439
|
+
form_params = opts[:form_params] || {}
|
440
|
+
|
441
|
+
# http body (model)
|
442
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patchedhugging_face_hugging_face_repository)
|
443
|
+
|
444
|
+
# return_type
|
445
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
446
|
+
|
447
|
+
# auth_names
|
448
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
449
|
+
|
450
|
+
new_options = opts.merge(
|
451
|
+
:operation => :"RepositoriesHuggingFaceApi.partial_update",
|
452
|
+
:header_params => header_params,
|
453
|
+
:query_params => query_params,
|
454
|
+
:form_params => form_params,
|
455
|
+
:body => post_body,
|
456
|
+
:auth_names => auth_names,
|
457
|
+
:return_type => return_type
|
458
|
+
)
|
459
|
+
|
460
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
461
|
+
if @api_client.config.debugging
|
462
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
463
|
+
end
|
464
|
+
return data, status_code, headers
|
465
|
+
end
|
466
|
+
|
467
|
+
# Inspect a hugging face repository
|
468
|
+
# A ViewSet for HuggingFaceRepository. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
469
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
470
|
+
# @param [Hash] opts the optional parameters
|
471
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
472
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
473
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
474
|
+
# @return [HuggingFaceHuggingFaceRepositoryResponse]
|
475
|
+
def read(hugging_face_hugging_face_repository_href, opts = {})
|
476
|
+
data, _status_code, _headers = read_with_http_info(hugging_face_hugging_face_repository_href, opts)
|
477
|
+
data
|
478
|
+
end
|
479
|
+
|
480
|
+
# Inspect a hugging face repository
|
481
|
+
# A ViewSet for HuggingFaceRepository. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
482
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
483
|
+
# @param [Hash] opts the optional parameters
|
484
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
485
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
486
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
487
|
+
# @return [Array<(HuggingFaceHuggingFaceRepositoryResponse, Integer, Hash)>] HuggingFaceHuggingFaceRepositoryResponse data, response status code and response headers
|
488
|
+
def read_with_http_info(hugging_face_hugging_face_repository_href, opts = {})
|
489
|
+
if @api_client.config.debugging
|
490
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.read ...'
|
491
|
+
end
|
492
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
493
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
494
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.read"
|
495
|
+
end
|
496
|
+
# resource path
|
497
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
498
|
+
|
499
|
+
# query parameters
|
500
|
+
query_params = opts[:query_params] || {}
|
501
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
502
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
503
|
+
|
504
|
+
# header parameters
|
505
|
+
header_params = opts[:header_params] || {}
|
506
|
+
# HTTP header 'Accept' (if needed)
|
507
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
508
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
509
|
+
|
510
|
+
# form parameters
|
511
|
+
form_params = opts[:form_params] || {}
|
512
|
+
|
513
|
+
# http body (model)
|
514
|
+
post_body = opts[:debug_body]
|
515
|
+
|
516
|
+
# return_type
|
517
|
+
return_type = opts[:debug_return_type] || 'HuggingFaceHuggingFaceRepositoryResponse'
|
518
|
+
|
519
|
+
# auth_names
|
520
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
521
|
+
|
522
|
+
new_options = opts.merge(
|
523
|
+
:operation => :"RepositoriesHuggingFaceApi.read",
|
524
|
+
:header_params => header_params,
|
525
|
+
:query_params => query_params,
|
526
|
+
:form_params => form_params,
|
527
|
+
:body => post_body,
|
528
|
+
:auth_names => auth_names,
|
529
|
+
:return_type => return_type
|
530
|
+
)
|
531
|
+
|
532
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
533
|
+
if @api_client.config.debugging
|
534
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
535
|
+
end
|
536
|
+
return data, status_code, headers
|
537
|
+
end
|
538
|
+
|
539
|
+
# Set a label
|
540
|
+
# Set a single pulp_label on the object to a specific value or null.
|
541
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
542
|
+
# @param set_label [SetLabel]
|
543
|
+
# @param [Hash] opts the optional parameters
|
544
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
545
|
+
# @return [SetLabelResponse]
|
546
|
+
def set_label(hugging_face_hugging_face_repository_href, set_label, opts = {})
|
547
|
+
data, _status_code, _headers = set_label_with_http_info(hugging_face_hugging_face_repository_href, set_label, opts)
|
548
|
+
data
|
549
|
+
end
|
550
|
+
|
551
|
+
# Set a label
|
552
|
+
# Set a single pulp_label on the object to a specific value or null.
|
553
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
554
|
+
# @param set_label [SetLabel]
|
555
|
+
# @param [Hash] opts the optional parameters
|
556
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
557
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
558
|
+
def set_label_with_http_info(hugging_face_hugging_face_repository_href, set_label, opts = {})
|
559
|
+
if @api_client.config.debugging
|
560
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.set_label ...'
|
561
|
+
end
|
562
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
563
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
564
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.set_label"
|
565
|
+
end
|
566
|
+
# verify the required parameter 'set_label' is set
|
567
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
568
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling RepositoriesHuggingFaceApi.set_label"
|
569
|
+
end
|
570
|
+
# resource path
|
571
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}set_label/'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
572
|
+
|
573
|
+
# query parameters
|
574
|
+
query_params = opts[:query_params] || {}
|
575
|
+
|
576
|
+
# header parameters
|
577
|
+
header_params = opts[:header_params] || {}
|
578
|
+
# HTTP header 'Accept' (if needed)
|
579
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
580
|
+
# HTTP header 'Content-Type'
|
581
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
582
|
+
if !content_type.nil?
|
583
|
+
header_params['Content-Type'] = content_type
|
584
|
+
end
|
585
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
586
|
+
|
587
|
+
# form parameters
|
588
|
+
form_params = opts[:form_params] || {}
|
589
|
+
|
590
|
+
# http body (model)
|
591
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
592
|
+
|
593
|
+
# return_type
|
594
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
595
|
+
|
596
|
+
# auth_names
|
597
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
598
|
+
|
599
|
+
new_options = opts.merge(
|
600
|
+
:operation => :"RepositoriesHuggingFaceApi.set_label",
|
601
|
+
:header_params => header_params,
|
602
|
+
:query_params => query_params,
|
603
|
+
:form_params => form_params,
|
604
|
+
:body => post_body,
|
605
|
+
:auth_names => auth_names,
|
606
|
+
:return_type => return_type
|
607
|
+
)
|
608
|
+
|
609
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
610
|
+
if @api_client.config.debugging
|
611
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
612
|
+
end
|
613
|
+
return data, status_code, headers
|
614
|
+
end
|
615
|
+
|
616
|
+
# Sync from remote
|
617
|
+
# Trigger an asynchronous task to sync content.
|
618
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
619
|
+
# @param repository_sync_url [RepositorySyncURL]
|
620
|
+
# @param [Hash] opts the optional parameters
|
621
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
622
|
+
# @return [AsyncOperationResponse]
|
623
|
+
def sync(hugging_face_hugging_face_repository_href, repository_sync_url, opts = {})
|
624
|
+
data, _status_code, _headers = sync_with_http_info(hugging_face_hugging_face_repository_href, repository_sync_url, opts)
|
625
|
+
data
|
626
|
+
end
|
627
|
+
|
628
|
+
# Sync from remote
|
629
|
+
# Trigger an asynchronous task to sync content.
|
630
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
631
|
+
# @param repository_sync_url [RepositorySyncURL]
|
632
|
+
# @param [Hash] opts the optional parameters
|
633
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
634
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
635
|
+
def sync_with_http_info(hugging_face_hugging_face_repository_href, repository_sync_url, opts = {})
|
636
|
+
if @api_client.config.debugging
|
637
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.sync ...'
|
638
|
+
end
|
639
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
640
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
641
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.sync"
|
642
|
+
end
|
643
|
+
# verify the required parameter 'repository_sync_url' is set
|
644
|
+
if @api_client.config.client_side_validation && repository_sync_url.nil?
|
645
|
+
fail ArgumentError, "Missing the required parameter 'repository_sync_url' when calling RepositoriesHuggingFaceApi.sync"
|
646
|
+
end
|
647
|
+
# resource path
|
648
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}sync/'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
649
|
+
|
650
|
+
# query parameters
|
651
|
+
query_params = opts[:query_params] || {}
|
652
|
+
|
653
|
+
# header parameters
|
654
|
+
header_params = opts[:header_params] || {}
|
655
|
+
# HTTP header 'Accept' (if needed)
|
656
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
657
|
+
# HTTP header 'Content-Type'
|
658
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
659
|
+
if !content_type.nil?
|
660
|
+
header_params['Content-Type'] = content_type
|
661
|
+
end
|
662
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
663
|
+
|
664
|
+
# form parameters
|
665
|
+
form_params = opts[:form_params] || {}
|
666
|
+
|
667
|
+
# http body (model)
|
668
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(repository_sync_url)
|
669
|
+
|
670
|
+
# return_type
|
671
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
672
|
+
|
673
|
+
# auth_names
|
674
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
675
|
+
|
676
|
+
new_options = opts.merge(
|
677
|
+
:operation => :"RepositoriesHuggingFaceApi.sync",
|
678
|
+
:header_params => header_params,
|
679
|
+
:query_params => query_params,
|
680
|
+
:form_params => form_params,
|
681
|
+
:body => post_body,
|
682
|
+
:auth_names => auth_names,
|
683
|
+
:return_type => return_type
|
684
|
+
)
|
685
|
+
|
686
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
687
|
+
if @api_client.config.debugging
|
688
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
689
|
+
end
|
690
|
+
return data, status_code, headers
|
691
|
+
end
|
692
|
+
|
693
|
+
# Unset a label
|
694
|
+
# Unset a single pulp_label on the object.
|
695
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
696
|
+
# @param unset_label [UnsetLabel]
|
697
|
+
# @param [Hash] opts the optional parameters
|
698
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
699
|
+
# @return [UnsetLabelResponse]
|
700
|
+
def unset_label(hugging_face_hugging_face_repository_href, unset_label, opts = {})
|
701
|
+
data, _status_code, _headers = unset_label_with_http_info(hugging_face_hugging_face_repository_href, unset_label, opts)
|
702
|
+
data
|
703
|
+
end
|
704
|
+
|
705
|
+
# Unset a label
|
706
|
+
# Unset a single pulp_label on the object.
|
707
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
708
|
+
# @param unset_label [UnsetLabel]
|
709
|
+
# @param [Hash] opts the optional parameters
|
710
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
711
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
712
|
+
def unset_label_with_http_info(hugging_face_hugging_face_repository_href, unset_label, opts = {})
|
713
|
+
if @api_client.config.debugging
|
714
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.unset_label ...'
|
715
|
+
end
|
716
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
717
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
718
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.unset_label"
|
719
|
+
end
|
720
|
+
# verify the required parameter 'unset_label' is set
|
721
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
722
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling RepositoriesHuggingFaceApi.unset_label"
|
723
|
+
end
|
724
|
+
# resource path
|
725
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}unset_label/'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
726
|
+
|
727
|
+
# query parameters
|
728
|
+
query_params = opts[:query_params] || {}
|
729
|
+
|
730
|
+
# header parameters
|
731
|
+
header_params = opts[:header_params] || {}
|
732
|
+
# HTTP header 'Accept' (if needed)
|
733
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
734
|
+
# HTTP header 'Content-Type'
|
735
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
736
|
+
if !content_type.nil?
|
737
|
+
header_params['Content-Type'] = content_type
|
738
|
+
end
|
739
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
740
|
+
|
741
|
+
# form parameters
|
742
|
+
form_params = opts[:form_params] || {}
|
743
|
+
|
744
|
+
# http body (model)
|
745
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
746
|
+
|
747
|
+
# return_type
|
748
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
749
|
+
|
750
|
+
# auth_names
|
751
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
752
|
+
|
753
|
+
new_options = opts.merge(
|
754
|
+
:operation => :"RepositoriesHuggingFaceApi.unset_label",
|
755
|
+
:header_params => header_params,
|
756
|
+
:query_params => query_params,
|
757
|
+
:form_params => form_params,
|
758
|
+
:body => post_body,
|
759
|
+
:auth_names => auth_names,
|
760
|
+
:return_type => return_type
|
761
|
+
)
|
762
|
+
|
763
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
764
|
+
if @api_client.config.debugging
|
765
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
766
|
+
end
|
767
|
+
return data, status_code, headers
|
768
|
+
end
|
769
|
+
|
770
|
+
# Update a hugging face repository
|
771
|
+
# Trigger an asynchronous update task
|
772
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
773
|
+
# @param hugging_face_hugging_face_repository [HuggingFaceHuggingFaceRepository]
|
774
|
+
# @param [Hash] opts the optional parameters
|
775
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
776
|
+
# @return [AsyncOperationResponse]
|
777
|
+
def update(hugging_face_hugging_face_repository_href, hugging_face_hugging_face_repository, opts = {})
|
778
|
+
data, _status_code, _headers = update_with_http_info(hugging_face_hugging_face_repository_href, hugging_face_hugging_face_repository, opts)
|
779
|
+
data
|
780
|
+
end
|
781
|
+
|
782
|
+
# Update a hugging face repository
|
783
|
+
# Trigger an asynchronous update task
|
784
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
785
|
+
# @param hugging_face_hugging_face_repository [HuggingFaceHuggingFaceRepository]
|
786
|
+
# @param [Hash] opts the optional parameters
|
787
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
788
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
789
|
+
def update_with_http_info(hugging_face_hugging_face_repository_href, hugging_face_hugging_face_repository, opts = {})
|
790
|
+
if @api_client.config.debugging
|
791
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceApi.update ...'
|
792
|
+
end
|
793
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
794
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
795
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceApi.update"
|
796
|
+
end
|
797
|
+
# verify the required parameter 'hugging_face_hugging_face_repository' is set
|
798
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository.nil?
|
799
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository' when calling RepositoriesHuggingFaceApi.update"
|
800
|
+
end
|
801
|
+
# resource path
|
802
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
803
|
+
|
804
|
+
# query parameters
|
805
|
+
query_params = opts[:query_params] || {}
|
806
|
+
|
807
|
+
# header parameters
|
808
|
+
header_params = opts[:header_params] || {}
|
809
|
+
# HTTP header 'Accept' (if needed)
|
810
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
811
|
+
# HTTP header 'Content-Type'
|
812
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
813
|
+
if !content_type.nil?
|
814
|
+
header_params['Content-Type'] = content_type
|
815
|
+
end
|
816
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
817
|
+
|
818
|
+
# form parameters
|
819
|
+
form_params = opts[:form_params] || {}
|
820
|
+
|
821
|
+
# http body (model)
|
822
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(hugging_face_hugging_face_repository)
|
823
|
+
|
824
|
+
# return_type
|
825
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
826
|
+
|
827
|
+
# auth_names
|
828
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
829
|
+
|
830
|
+
new_options = opts.merge(
|
831
|
+
:operation => :"RepositoriesHuggingFaceApi.update",
|
832
|
+
:header_params => header_params,
|
833
|
+
:query_params => query_params,
|
834
|
+
:form_params => form_params,
|
835
|
+
:body => post_body,
|
836
|
+
:auth_names => auth_names,
|
837
|
+
:return_type => return_type
|
838
|
+
)
|
839
|
+
|
840
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
841
|
+
if @api_client.config.debugging
|
842
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
843
|
+
end
|
844
|
+
return data, status_code, headers
|
845
|
+
end
|
846
|
+
end
|
847
|
+
end
|