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,374 @@
|
|
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 RepositoriesHuggingFaceVersionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a repository version
|
23
|
+
# Trigger an asynchronous task to delete a repository version.
|
24
|
+
# @param hugging_face_hugging_face_repository_version_href [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
27
|
+
# @return [AsyncOperationResponse]
|
28
|
+
def delete(hugging_face_hugging_face_repository_version_href, opts = {})
|
29
|
+
data, _status_code, _headers = delete_with_http_info(hugging_face_hugging_face_repository_version_href, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Delete a repository version
|
34
|
+
# Trigger an asynchronous task to delete a repository version.
|
35
|
+
# @param hugging_face_hugging_face_repository_version_href [String]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
38
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
39
|
+
def delete_with_http_info(hugging_face_hugging_face_repository_version_href, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceVersionsApi.delete ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_version_href' is set
|
44
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_version_href.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_version_href' when calling RepositoriesHuggingFaceVersionsApi.delete"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '{hugging_face_hugging_face_repository_version_href}'.sub('{' + 'hugging_face_hugging_face_repository_version_href' + '}', CGI.escape(hugging_face_hugging_face_repository_version_href.to_s).gsub('%2F', '/'))
|
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
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = opts[:form_params] || {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = opts[:debug_body]
|
64
|
+
|
65
|
+
# return_type
|
66
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
67
|
+
|
68
|
+
# auth_names
|
69
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
70
|
+
|
71
|
+
new_options = opts.merge(
|
72
|
+
:operation => :"RepositoriesHuggingFaceVersionsApi.delete",
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => return_type
|
79
|
+
)
|
80
|
+
|
81
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceVersionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# List repository versions
|
89
|
+
# A ViewSet for a HuggingFaceRepositoryVersion represents a single HuggingFace repository version.
|
90
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
93
|
+
# @option opts [String] :content Content Unit referenced by HREF/PRN
|
94
|
+
# @option opts [Array<String>] :content__in Multiple values may be separated by commas.
|
95
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
96
|
+
# @option opts [Integer] :number Filter results where number matches value
|
97
|
+
# @option opts [Integer] :number__gt Filter results where number is greater than value
|
98
|
+
# @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
|
99
|
+
# @option opts [Integer] :number__lt Filter results where number is less than value
|
100
|
+
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
101
|
+
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
102
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
103
|
+
# @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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
104
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
105
|
+
# @option opts [Time] :pulp_created Filter results where pulp_created matches value
|
106
|
+
# @option opts [Time] :pulp_created__gt Filter results where pulp_created is greater than value
|
107
|
+
# @option opts [Time] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
108
|
+
# @option opts [Boolean] :pulp_created__isnull Filter results where pulp_created has a null value
|
109
|
+
# @option opts [Time] :pulp_created__lt Filter results where pulp_created is less than value
|
110
|
+
# @option opts [Time] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
111
|
+
# @option opts [Array<Time>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
112
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
113
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
114
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
115
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
116
|
+
# @return [PaginatedRepositoryVersionResponseList]
|
117
|
+
def list(hugging_face_hugging_face_repository_href, opts = {})
|
118
|
+
data, _status_code, _headers = list_with_http_info(hugging_face_hugging_face_repository_href, opts)
|
119
|
+
data
|
120
|
+
end
|
121
|
+
|
122
|
+
# List repository versions
|
123
|
+
# A ViewSet for a HuggingFaceRepositoryVersion represents a single HuggingFace repository version.
|
124
|
+
# @param hugging_face_hugging_face_repository_href [String]
|
125
|
+
# @param [Hash] opts the optional parameters
|
126
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
127
|
+
# @option opts [String] :content Content Unit referenced by HREF/PRN
|
128
|
+
# @option opts [Array<String>] :content__in Multiple values may be separated by commas.
|
129
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
130
|
+
# @option opts [Integer] :number Filter results where number matches value
|
131
|
+
# @option opts [Integer] :number__gt Filter results where number is greater than value
|
132
|
+
# @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
|
133
|
+
# @option opts [Integer] :number__lt Filter results where number is less than value
|
134
|
+
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
135
|
+
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
136
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
137
|
+
# @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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
138
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
139
|
+
# @option opts [Time] :pulp_created Filter results where pulp_created matches value
|
140
|
+
# @option opts [Time] :pulp_created__gt Filter results where pulp_created is greater than value
|
141
|
+
# @option opts [Time] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
142
|
+
# @option opts [Boolean] :pulp_created__isnull Filter results where pulp_created has a null value
|
143
|
+
# @option opts [Time] :pulp_created__lt Filter results where pulp_created is less than value
|
144
|
+
# @option opts [Time] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
145
|
+
# @option opts [Array<Time>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
146
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
147
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
148
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
149
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
150
|
+
# @return [Array<(PaginatedRepositoryVersionResponseList, Integer, Hash)>] PaginatedRepositoryVersionResponseList data, response status code and response headers
|
151
|
+
def list_with_http_info(hugging_face_hugging_face_repository_href, opts = {})
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceVersionsApi.list ...'
|
154
|
+
end
|
155
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_href' is set
|
156
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_href.nil?
|
157
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_href' when calling RepositoriesHuggingFaceVersionsApi.list"
|
158
|
+
end
|
159
|
+
allowable_values = ["-complete", "-info", "-number", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "complete", "info", "number", "pk", "pulp_created", "pulp_id", "pulp_last_updated"]
|
160
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
161
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
162
|
+
end
|
163
|
+
# resource path
|
164
|
+
local_var_path = '{hugging_face_hugging_face_repository_href}versions/'.sub('{' + 'hugging_face_hugging_face_repository_href' + '}', CGI.escape(hugging_face_hugging_face_repository_href.to_s).gsub('%2F', '/'))
|
165
|
+
|
166
|
+
# query parameters
|
167
|
+
query_params = opts[:query_params] || {}
|
168
|
+
query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
|
169
|
+
query_params[:'content__in'] = @api_client.build_collection_param(opts[:'content__in'], :csv) if !opts[:'content__in'].nil?
|
170
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
171
|
+
query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
|
172
|
+
query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
|
173
|
+
query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
|
174
|
+
query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
|
175
|
+
query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
|
176
|
+
query_params[:'number__range'] = @api_client.build_collection_param(opts[:'number__range'], :csv) if !opts[:'number__range'].nil?
|
177
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
178
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
179
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
180
|
+
query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
|
181
|
+
query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
|
182
|
+
query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
|
183
|
+
query_params[:'pulp_created__isnull'] = opts[:'pulp_created__isnull'] if !opts[:'pulp_created__isnull'].nil?
|
184
|
+
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
185
|
+
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
186
|
+
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
187
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
188
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
189
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
190
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
196
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
197
|
+
|
198
|
+
# form parameters
|
199
|
+
form_params = opts[:form_params] || {}
|
200
|
+
|
201
|
+
# http body (model)
|
202
|
+
post_body = opts[:debug_body]
|
203
|
+
|
204
|
+
# return_type
|
205
|
+
return_type = opts[:debug_return_type] || 'PaginatedRepositoryVersionResponseList'
|
206
|
+
|
207
|
+
# auth_names
|
208
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
209
|
+
|
210
|
+
new_options = opts.merge(
|
211
|
+
:operation => :"RepositoriesHuggingFaceVersionsApi.list",
|
212
|
+
:header_params => header_params,
|
213
|
+
:query_params => query_params,
|
214
|
+
:form_params => form_params,
|
215
|
+
:body => post_body,
|
216
|
+
:auth_names => auth_names,
|
217
|
+
:return_type => return_type
|
218
|
+
)
|
219
|
+
|
220
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceVersionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
|
+
end
|
224
|
+
return data, status_code, headers
|
225
|
+
end
|
226
|
+
|
227
|
+
# Inspect a repository version
|
228
|
+
# A ViewSet for a HuggingFaceRepositoryVersion represents a single HuggingFace repository version.
|
229
|
+
# @param hugging_face_hugging_face_repository_version_href [String]
|
230
|
+
# @param [Hash] opts the optional parameters
|
231
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
232
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
233
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
234
|
+
# @return [RepositoryVersionResponse]
|
235
|
+
def read(hugging_face_hugging_face_repository_version_href, opts = {})
|
236
|
+
data, _status_code, _headers = read_with_http_info(hugging_face_hugging_face_repository_version_href, opts)
|
237
|
+
data
|
238
|
+
end
|
239
|
+
|
240
|
+
# Inspect a repository version
|
241
|
+
# A ViewSet for a HuggingFaceRepositoryVersion represents a single HuggingFace repository version.
|
242
|
+
# @param hugging_face_hugging_face_repository_version_href [String]
|
243
|
+
# @param [Hash] opts the optional parameters
|
244
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
245
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
246
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
247
|
+
# @return [Array<(RepositoryVersionResponse, Integer, Hash)>] RepositoryVersionResponse data, response status code and response headers
|
248
|
+
def read_with_http_info(hugging_face_hugging_face_repository_version_href, opts = {})
|
249
|
+
if @api_client.config.debugging
|
250
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceVersionsApi.read ...'
|
251
|
+
end
|
252
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_version_href' is set
|
253
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_version_href.nil?
|
254
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_version_href' when calling RepositoriesHuggingFaceVersionsApi.read"
|
255
|
+
end
|
256
|
+
# resource path
|
257
|
+
local_var_path = '{hugging_face_hugging_face_repository_version_href}'.sub('{' + 'hugging_face_hugging_face_repository_version_href' + '}', CGI.escape(hugging_face_hugging_face_repository_version_href.to_s).gsub('%2F', '/'))
|
258
|
+
|
259
|
+
# query parameters
|
260
|
+
query_params = opts[:query_params] || {}
|
261
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
262
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
263
|
+
|
264
|
+
# header parameters
|
265
|
+
header_params = opts[:header_params] || {}
|
266
|
+
# HTTP header 'Accept' (if needed)
|
267
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
268
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
269
|
+
|
270
|
+
# form parameters
|
271
|
+
form_params = opts[:form_params] || {}
|
272
|
+
|
273
|
+
# http body (model)
|
274
|
+
post_body = opts[:debug_body]
|
275
|
+
|
276
|
+
# return_type
|
277
|
+
return_type = opts[:debug_return_type] || 'RepositoryVersionResponse'
|
278
|
+
|
279
|
+
# auth_names
|
280
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
281
|
+
|
282
|
+
new_options = opts.merge(
|
283
|
+
:operation => :"RepositoriesHuggingFaceVersionsApi.read",
|
284
|
+
:header_params => header_params,
|
285
|
+
:query_params => query_params,
|
286
|
+
:form_params => form_params,
|
287
|
+
:body => post_body,
|
288
|
+
:auth_names => auth_names,
|
289
|
+
:return_type => return_type
|
290
|
+
)
|
291
|
+
|
292
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
293
|
+
if @api_client.config.debugging
|
294
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceVersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
295
|
+
end
|
296
|
+
return data, status_code, headers
|
297
|
+
end
|
298
|
+
|
299
|
+
# Trigger an asynchronous task to repair a repository version.
|
300
|
+
# @param hugging_face_hugging_face_repository_version_href [String]
|
301
|
+
# @param repair [Repair]
|
302
|
+
# @param [Hash] opts the optional parameters
|
303
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
304
|
+
# @return [AsyncOperationResponse]
|
305
|
+
def repair(hugging_face_hugging_face_repository_version_href, repair, opts = {})
|
306
|
+
data, _status_code, _headers = repair_with_http_info(hugging_face_hugging_face_repository_version_href, repair, opts)
|
307
|
+
data
|
308
|
+
end
|
309
|
+
|
310
|
+
# Trigger an asynchronous task to repair a repository version.
|
311
|
+
# @param hugging_face_hugging_face_repository_version_href [String]
|
312
|
+
# @param repair [Repair]
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
315
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
316
|
+
def repair_with_http_info(hugging_face_hugging_face_repository_version_href, repair, opts = {})
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesHuggingFaceVersionsApi.repair ...'
|
319
|
+
end
|
320
|
+
# verify the required parameter 'hugging_face_hugging_face_repository_version_href' is set
|
321
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_repository_version_href.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_repository_version_href' when calling RepositoriesHuggingFaceVersionsApi.repair"
|
323
|
+
end
|
324
|
+
# verify the required parameter 'repair' is set
|
325
|
+
if @api_client.config.client_side_validation && repair.nil?
|
326
|
+
fail ArgumentError, "Missing the required parameter 'repair' when calling RepositoriesHuggingFaceVersionsApi.repair"
|
327
|
+
end
|
328
|
+
# resource path
|
329
|
+
local_var_path = '{hugging_face_hugging_face_repository_version_href}repair/'.sub('{' + 'hugging_face_hugging_face_repository_version_href' + '}', CGI.escape(hugging_face_hugging_face_repository_version_href.to_s).gsub('%2F', '/'))
|
330
|
+
|
331
|
+
# query parameters
|
332
|
+
query_params = opts[:query_params] || {}
|
333
|
+
|
334
|
+
# header parameters
|
335
|
+
header_params = opts[:header_params] || {}
|
336
|
+
# HTTP header 'Accept' (if needed)
|
337
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
338
|
+
# HTTP header 'Content-Type'
|
339
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
340
|
+
if !content_type.nil?
|
341
|
+
header_params['Content-Type'] = content_type
|
342
|
+
end
|
343
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
344
|
+
|
345
|
+
# form parameters
|
346
|
+
form_params = opts[:form_params] || {}
|
347
|
+
|
348
|
+
# http body (model)
|
349
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(repair)
|
350
|
+
|
351
|
+
# return_type
|
352
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
353
|
+
|
354
|
+
# auth_names
|
355
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
356
|
+
|
357
|
+
new_options = opts.merge(
|
358
|
+
:operation => :"RepositoriesHuggingFaceVersionsApi.repair",
|
359
|
+
:header_params => header_params,
|
360
|
+
:query_params => query_params,
|
361
|
+
:form_params => form_params,
|
362
|
+
:body => post_body,
|
363
|
+
:auth_names => auth_names,
|
364
|
+
:return_type => return_type
|
365
|
+
)
|
366
|
+
|
367
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
368
|
+
if @api_client.config.debugging
|
369
|
+
@api_client.config.logger.debug "API called: RepositoriesHuggingFaceVersionsApi#repair\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
370
|
+
end
|
371
|
+
return data, status_code, headers
|
372
|
+
end
|
373
|
+
end
|
374
|
+
end
|