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,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 * &#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;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - 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 * &#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;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - 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