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,356 @@
|
|
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 PublicationsHuggingFaceApi
|
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 publication
|
23
|
+
# Trigger an asynchronous task to publish content
|
24
|
+
# @param hugging_face_hugging_face_publication [HuggingFaceHuggingFacePublication]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
27
|
+
# @return [AsyncOperationResponse]
|
28
|
+
def create(hugging_face_hugging_face_publication, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(hugging_face_hugging_face_publication, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a hugging face publication
|
34
|
+
# Trigger an asynchronous task to publish content
|
35
|
+
# @param hugging_face_hugging_face_publication [HuggingFaceHuggingFacePublication]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
38
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(hugging_face_hugging_face_publication, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: PublicationsHuggingFaceApi.create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'hugging_face_hugging_face_publication' is set
|
44
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_publication.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_publication' when calling PublicationsHuggingFaceApi.create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/pulp/api/v3/publications/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_publication)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"PublicationsHuggingFaceApi.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: PublicationsHuggingFaceApi#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 publication
|
94
|
+
# A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
95
|
+
# @param hugging_face_hugging_face_publication_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 [nil]
|
99
|
+
def delete(hugging_face_hugging_face_publication_href, opts = {})
|
100
|
+
delete_with_http_info(hugging_face_hugging_face_publication_href, opts)
|
101
|
+
nil
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a hugging face publication
|
105
|
+
# A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
106
|
+
# @param hugging_face_hugging_face_publication_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<(nil, Integer, Hash)>] nil, response status code and response headers
|
110
|
+
def delete_with_http_info(hugging_face_hugging_face_publication_href, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: PublicationsHuggingFaceApi.delete ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'hugging_face_hugging_face_publication_href' is set
|
115
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_publication_href.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_publication_href' when calling PublicationsHuggingFaceApi.delete"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '{hugging_face_hugging_face_publication_href}'.sub('{' + 'hugging_face_hugging_face_publication_href' + '}', CGI.escape(hugging_face_hugging_face_publication_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
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body]
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type]
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"PublicationsHuggingFaceApi.delete",
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: PublicationsHuggingFaceApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# List hugging face publications
|
158
|
+
# A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
161
|
+
# @option opts [Boolean] :checkpoint Filter results where checkpoint matches value
|
162
|
+
# @option opts [String] :content Content Unit referenced by HREF/PRN
|
163
|
+
# @option opts [Array<String>] :content__in Multiple values may be separated by commas.
|
164
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
165
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
166
|
+
# @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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
167
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
168
|
+
# @option opts [Time] :pulp_created Filter results where pulp_created matches value
|
169
|
+
# @option opts [Time] :pulp_created__gt Filter results where pulp_created is greater than value
|
170
|
+
# @option opts [Time] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
171
|
+
# @option opts [Boolean] :pulp_created__isnull Filter results where pulp_created has a null value
|
172
|
+
# @option opts [Time] :pulp_created__lt Filter results where pulp_created is less than value
|
173
|
+
# @option opts [Time] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
174
|
+
# @option opts [Array<Time>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
175
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
176
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
177
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
178
|
+
# @option opts [String] :repository Repository referenced by HREF/PRN
|
179
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
180
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
181
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
182
|
+
# @return [PaginatedhuggingFaceHuggingFacePublicationResponseList]
|
183
|
+
def list(opts = {})
|
184
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
185
|
+
data
|
186
|
+
end
|
187
|
+
|
188
|
+
# List hugging face publications
|
189
|
+
# A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
190
|
+
# @param [Hash] opts the optional parameters
|
191
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
192
|
+
# @option opts [Boolean] :checkpoint Filter results where checkpoint matches value
|
193
|
+
# @option opts [String] :content Content Unit referenced by HREF/PRN
|
194
|
+
# @option opts [Array<String>] :content__in Multiple values may be separated by commas.
|
195
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
196
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
197
|
+
# @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) * `complete` - Complete * `-complete` - Complete (descending) * `pass_through` - Pass through * `-pass_through` - Pass through (descending) * `checkpoint` - Checkpoint * `-checkpoint` - Checkpoint (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
198
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
199
|
+
# @option opts [Time] :pulp_created Filter results where pulp_created matches value
|
200
|
+
# @option opts [Time] :pulp_created__gt Filter results where pulp_created is greater than value
|
201
|
+
# @option opts [Time] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
202
|
+
# @option opts [Boolean] :pulp_created__isnull Filter results where pulp_created has a null value
|
203
|
+
# @option opts [Time] :pulp_created__lt Filter results where pulp_created is less than value
|
204
|
+
# @option opts [Time] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
205
|
+
# @option opts [Array<Time>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
206
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
207
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
208
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
209
|
+
# @option opts [String] :repository Repository referenced by HREF/PRN
|
210
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
211
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
212
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
213
|
+
# @return [Array<(PaginatedhuggingFaceHuggingFacePublicationResponseList, Integer, Hash)>] PaginatedhuggingFaceHuggingFacePublicationResponseList data, response status code and response headers
|
214
|
+
def list_with_http_info(opts = {})
|
215
|
+
if @api_client.config.debugging
|
216
|
+
@api_client.config.logger.debug 'Calling API: PublicationsHuggingFaceApi.list ...'
|
217
|
+
end
|
218
|
+
allowable_values = ["-checkpoint", "-complete", "-pass_through", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-pulp_type", "checkpoint", "complete", "pass_through", "pk", "pulp_created", "pulp_id", "pulp_last_updated", "pulp_type"]
|
219
|
+
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
220
|
+
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
221
|
+
end
|
222
|
+
# resource path
|
223
|
+
local_var_path = '/pulp/api/v3/publications/hugging_face/hugging-face/'
|
224
|
+
|
225
|
+
# query parameters
|
226
|
+
query_params = opts[:query_params] || {}
|
227
|
+
query_params[:'checkpoint'] = opts[:'checkpoint'] if !opts[:'checkpoint'].nil?
|
228
|
+
query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
|
229
|
+
query_params[:'content__in'] = @api_client.build_collection_param(opts[:'content__in'], :csv) if !opts[:'content__in'].nil?
|
230
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
231
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
232
|
+
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
233
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
234
|
+
query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
|
235
|
+
query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
|
236
|
+
query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
|
237
|
+
query_params[:'pulp_created__isnull'] = opts[:'pulp_created__isnull'] if !opts[:'pulp_created__isnull'].nil?
|
238
|
+
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
239
|
+
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
240
|
+
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
241
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
242
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
243
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
244
|
+
query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
245
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
246
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
247
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
248
|
+
|
249
|
+
# header parameters
|
250
|
+
header_params = opts[:header_params] || {}
|
251
|
+
# HTTP header 'Accept' (if needed)
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
253
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
254
|
+
|
255
|
+
# form parameters
|
256
|
+
form_params = opts[:form_params] || {}
|
257
|
+
|
258
|
+
# http body (model)
|
259
|
+
post_body = opts[:debug_body]
|
260
|
+
|
261
|
+
# return_type
|
262
|
+
return_type = opts[:debug_return_type] || 'PaginatedhuggingFaceHuggingFacePublicationResponseList'
|
263
|
+
|
264
|
+
# auth_names
|
265
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
266
|
+
|
267
|
+
new_options = opts.merge(
|
268
|
+
:operation => :"PublicationsHuggingFaceApi.list",
|
269
|
+
:header_params => header_params,
|
270
|
+
:query_params => query_params,
|
271
|
+
:form_params => form_params,
|
272
|
+
:body => post_body,
|
273
|
+
:auth_names => auth_names,
|
274
|
+
:return_type => return_type
|
275
|
+
)
|
276
|
+
|
277
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
278
|
+
if @api_client.config.debugging
|
279
|
+
@api_client.config.logger.debug "API called: PublicationsHuggingFaceApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
280
|
+
end
|
281
|
+
return data, status_code, headers
|
282
|
+
end
|
283
|
+
|
284
|
+
# Inspect a hugging face publication
|
285
|
+
# A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
286
|
+
# @param hugging_face_hugging_face_publication_href [String]
|
287
|
+
# @param [Hash] opts the optional parameters
|
288
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
289
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
290
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
291
|
+
# @return [HuggingFaceHuggingFacePublicationResponse]
|
292
|
+
def read(hugging_face_hugging_face_publication_href, opts = {})
|
293
|
+
data, _status_code, _headers = read_with_http_info(hugging_face_hugging_face_publication_href, opts)
|
294
|
+
data
|
295
|
+
end
|
296
|
+
|
297
|
+
# Inspect a hugging face publication
|
298
|
+
# A ViewSet for HuggingFacePublication. Similar to the HuggingFaceContentViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
299
|
+
# @param hugging_face_hugging_face_publication_href [String]
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
302
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
303
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
304
|
+
# @return [Array<(HuggingFaceHuggingFacePublicationResponse, Integer, Hash)>] HuggingFaceHuggingFacePublicationResponse data, response status code and response headers
|
305
|
+
def read_with_http_info(hugging_face_hugging_face_publication_href, opts = {})
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug 'Calling API: PublicationsHuggingFaceApi.read ...'
|
308
|
+
end
|
309
|
+
# verify the required parameter 'hugging_face_hugging_face_publication_href' is set
|
310
|
+
if @api_client.config.client_side_validation && hugging_face_hugging_face_publication_href.nil?
|
311
|
+
fail ArgumentError, "Missing the required parameter 'hugging_face_hugging_face_publication_href' when calling PublicationsHuggingFaceApi.read"
|
312
|
+
end
|
313
|
+
# resource path
|
314
|
+
local_var_path = '{hugging_face_hugging_face_publication_href}'.sub('{' + 'hugging_face_hugging_face_publication_href' + '}', CGI.escape(hugging_face_hugging_face_publication_href.to_s).gsub('%2F', '/'))
|
315
|
+
|
316
|
+
# query parameters
|
317
|
+
query_params = opts[:query_params] || {}
|
318
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
319
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
320
|
+
|
321
|
+
# header parameters
|
322
|
+
header_params = opts[:header_params] || {}
|
323
|
+
# HTTP header 'Accept' (if needed)
|
324
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
325
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
326
|
+
|
327
|
+
# form parameters
|
328
|
+
form_params = opts[:form_params] || {}
|
329
|
+
|
330
|
+
# http body (model)
|
331
|
+
post_body = opts[:debug_body]
|
332
|
+
|
333
|
+
# return_type
|
334
|
+
return_type = opts[:debug_return_type] || 'HuggingFaceHuggingFacePublicationResponse'
|
335
|
+
|
336
|
+
# auth_names
|
337
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
338
|
+
|
339
|
+
new_options = opts.merge(
|
340
|
+
:operation => :"PublicationsHuggingFaceApi.read",
|
341
|
+
:header_params => header_params,
|
342
|
+
:query_params => query_params,
|
343
|
+
:form_params => form_params,
|
344
|
+
:body => post_body,
|
345
|
+
:auth_names => auth_names,
|
346
|
+
:return_type => return_type
|
347
|
+
)
|
348
|
+
|
349
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
350
|
+
if @api_client.config.debugging
|
351
|
+
@api_client.config.logger.debug "API called: PublicationsHuggingFaceApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
352
|
+
end
|
353
|
+
return data, status_code, headers
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|