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