chromadb-experimental 0.1.0
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/lib/chromadb/admin_client.rb +6 -0
- data/lib/chromadb/client.rb +317 -0
- data/lib/chromadb/collection.rb +573 -0
- data/lib/chromadb/embedding_functions/chroma_bm25.rb +459 -0
- data/lib/chromadb/embedding_functions/chroma_cloud_qwen.rb +139 -0
- data/lib/chromadb/embedding_functions/chroma_cloud_splade.rb +121 -0
- data/lib/chromadb/embedding_functions.rb +121 -0
- data/lib/chromadb/errors.rb +120 -0
- data/lib/chromadb/http_client.rb +142 -0
- data/lib/chromadb/openapi/lib/chromadb/api/default_api.rb +2349 -0
- data/lib/chromadb/openapi/lib/chromadb/api_client.rb +392 -0
- data/lib/chromadb/openapi/lib/chromadb/api_error.rb +58 -0
- data/lib/chromadb/openapi/lib/chromadb/configuration.rb +295 -0
- data/lib/chromadb/openapi/lib/chromadb/models/add_collection_records_payload.rb +260 -0
- data/lib/chromadb/openapi/lib/chromadb/models/attach_function_request.rb +250 -0
- data/lib/chromadb/openapi/lib/chromadb/models/attach_function_response.rb +235 -0
- data/lib/chromadb/openapi/lib/chromadb/models/attached_function_api_response.rb +361 -0
- data/lib/chromadb/openapi/lib/chromadb/models/attached_function_info.rb +240 -0
- data/lib/chromadb/openapi/lib/chromadb/models/bool_inverted_index_type.rb +229 -0
- data/lib/chromadb/openapi/lib/chromadb/models/bool_value_type.rb +221 -0
- data/lib/chromadb/openapi/lib/chromadb/models/checklist_response.rb +245 -0
- data/lib/chromadb/openapi/lib/chromadb/models/collection.rb +315 -0
- data/lib/chromadb/openapi/lib/chromadb/models/collection_configuration.rb +240 -0
- data/lib/chromadb/openapi/lib/chromadb/models/create_collection_payload.rb +260 -0
- data/lib/chromadb/openapi/lib/chromadb/models/create_database_payload.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/create_tenant_payload.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/database.rb +240 -0
- data/lib/chromadb/openapi/lib/chromadb/models/detach_function_request.rb +221 -0
- data/lib/chromadb/openapi/lib/chromadb/models/detach_function_response.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/embedding_function_new_configuration.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/error_response.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/float_inverted_index_type.rb +229 -0
- data/lib/chromadb/openapi/lib/chromadb/models/float_list_value_type.rb +221 -0
- data/lib/chromadb/openapi/lib/chromadb/models/float_value_type.rb +221 -0
- data/lib/chromadb/openapi/lib/chromadb/models/fork_collection_payload.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/fts_index_type.rb +229 -0
- data/lib/chromadb/openapi/lib/chromadb/models/get_attached_function_response.rb +224 -0
- data/lib/chromadb/openapi/lib/chromadb/models/get_response.rb +270 -0
- data/lib/chromadb/openapi/lib/chromadb/models/get_tenant_response.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/get_user_identity_response.rb +246 -0
- data/lib/chromadb/openapi/lib/chromadb/models/heartbeat_response.rb +235 -0
- data/lib/chromadb/openapi/lib/chromadb/models/hnsw_configuration.rb +330 -0
- data/lib/chromadb/openapi/lib/chromadb/models/hnsw_index_config.rb +371 -0
- data/lib/chromadb/openapi/lib/chromadb/models/include.rb +210 -0
- data/lib/chromadb/openapi/lib/chromadb/models/int_inverted_index_type.rb +229 -0
- data/lib/chromadb/openapi/lib/chromadb/models/int_value_type.rb +221 -0
- data/lib/chromadb/openapi/lib/chromadb/models/query_response.rb +280 -0
- data/lib/chromadb/openapi/lib/chromadb/models/raw_where_fields.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/schema.rb +258 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_payload.rb +256 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_payload_filter.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_payload_group_by.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_payload_limit.rb +230 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_payload_select.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_request_payload.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/search_response.rb +270 -0
- data/lib/chromadb/openapi/lib/chromadb/models/space.rb +210 -0
- data/lib/chromadb/openapi/lib/chromadb/models/spann_configuration.rb +420 -0
- data/lib/chromadb/openapi/lib/chromadb/models/spann_index_config.rb +536 -0
- data/lib/chromadb/openapi/lib/chromadb/models/sparse_vector.rb +244 -0
- data/lib/chromadb/openapi/lib/chromadb/models/sparse_vector_index_config.rb +242 -0
- data/lib/chromadb/openapi/lib/chromadb/models/sparse_vector_index_type.rb +234 -0
- data/lib/chromadb/openapi/lib/chromadb/models/sparse_vector_value_type.rb +221 -0
- data/lib/chromadb/openapi/lib/chromadb/models/string_inverted_index_type.rb +229 -0
- data/lib/chromadb/openapi/lib/chromadb/models/string_value_type.rb +231 -0
- data/lib/chromadb/openapi/lib/chromadb/models/update_collection_configuration.rb +240 -0
- data/lib/chromadb/openapi/lib/chromadb/models/update_collection_payload.rb +240 -0
- data/lib/chromadb/openapi/lib/chromadb/models/update_collection_records_payload.rb +260 -0
- data/lib/chromadb/openapi/lib/chromadb/models/update_hnsw_configuration.rb +345 -0
- data/lib/chromadb/openapi/lib/chromadb/models/update_spann_configuration.rb +260 -0
- data/lib/chromadb/openapi/lib/chromadb/models/update_tenant_payload.rb +220 -0
- data/lib/chromadb/openapi/lib/chromadb/models/upsert_collection_records_payload.rb +260 -0
- data/lib/chromadb/openapi/lib/chromadb/models/value_types.rb +271 -0
- data/lib/chromadb/openapi/lib/chromadb/models/vector_index_config.rb +261 -0
- data/lib/chromadb/openapi/lib/chromadb/models/vector_index_type.rb +234 -0
- data/lib/chromadb/openapi/lib/chromadb/version.rb +15 -0
- data/lib/chromadb/openapi/lib/chromadb.rb +102 -0
- data/lib/chromadb/openapi.rb +6 -0
- data/lib/chromadb/schema.rb +744 -0
- data/lib/chromadb/schemas/chroma-cloud-qwen.json +61 -0
- data/lib/chromadb/schemas/chroma-cloud-splade.json +31 -0
- data/lib/chromadb/schemas/chroma_bm25.json +37 -0
- data/lib/chromadb/search/key.rb +94 -0
- data/lib/chromadb/search/limit.rb +41 -0
- data/lib/chromadb/search/rank.rb +425 -0
- data/lib/chromadb/search/search.rb +73 -0
- data/lib/chromadb/search/select.rb +54 -0
- data/lib/chromadb/search/where.rb +157 -0
- data/lib/chromadb/search.rb +8 -0
- data/lib/chromadb/types/results.rb +96 -0
- data/lib/chromadb/types/sparse_vector.rb +86 -0
- data/lib/chromadb/types/validation.rb +519 -0
- data/lib/chromadb/types.rb +13 -0
- data/lib/chromadb/version.rb +5 -0
- data/lib/chromadb.rb +15 -0
- metadata +233 -0
|
@@ -0,0 +1,2349 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#chroma-frontend
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.6.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Chromadb
|
|
16
|
+
class DefaultApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Attach a function to a collection
|
|
23
|
+
# @param tenant [Object] Tenant ID
|
|
24
|
+
# @param database [Object] Database name
|
|
25
|
+
# @param collection_id [Object] Collection ID
|
|
26
|
+
# @param attach_function_request [AttachFunctionRequest]
|
|
27
|
+
# @param [Hash] opts the optional parameters
|
|
28
|
+
# @return [AttachFunctionResponse]
|
|
29
|
+
def attach_function(tenant, database, collection_id, attach_function_request, opts = {})
|
|
30
|
+
data, _status_code, _headers = attach_function_with_http_info(tenant, database, collection_id, attach_function_request, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Attach a function to a collection
|
|
35
|
+
# @param tenant [Object] Tenant ID
|
|
36
|
+
# @param database [Object] Database name
|
|
37
|
+
# @param collection_id [Object] Collection ID
|
|
38
|
+
# @param attach_function_request [AttachFunctionRequest]
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [Array<(AttachFunctionResponse, Integer, Hash)>] AttachFunctionResponse data, response status code and response headers
|
|
41
|
+
def attach_function_with_http_info(tenant, database, collection_id, attach_function_request, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.attach_function ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'tenant' is set
|
|
46
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.attach_function"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'database' is set
|
|
50
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.attach_function"
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'collection_id' is set
|
|
54
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.attach_function"
|
|
56
|
+
end
|
|
57
|
+
# verify the required parameter 'attach_function_request' is set
|
|
58
|
+
if @api_client.config.client_side_validation && attach_function_request.nil?
|
|
59
|
+
fail ArgumentError, "Missing the required parameter 'attach_function_request' when calling DefaultApi.attach_function"
|
|
60
|
+
end
|
|
61
|
+
# resource path
|
|
62
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/attach'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
63
|
+
|
|
64
|
+
# query parameters
|
|
65
|
+
query_params = opts[:query_params] || {}
|
|
66
|
+
|
|
67
|
+
# header parameters
|
|
68
|
+
header_params = opts[:header_params] || {}
|
|
69
|
+
# HTTP header 'Accept' (if needed)
|
|
70
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
71
|
+
# HTTP header 'Content-Type'
|
|
72
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
73
|
+
if !content_type.nil?
|
|
74
|
+
header_params['Content-Type'] = content_type
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# form parameters
|
|
78
|
+
form_params = opts[:form_params] || {}
|
|
79
|
+
|
|
80
|
+
# http body (model)
|
|
81
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(attach_function_request)
|
|
82
|
+
|
|
83
|
+
# return_type
|
|
84
|
+
return_type = opts[:debug_return_type] || 'AttachFunctionResponse'
|
|
85
|
+
|
|
86
|
+
# auth_names
|
|
87
|
+
auth_names = opts[:debug_auth_names] || []
|
|
88
|
+
|
|
89
|
+
new_options = opts.merge(
|
|
90
|
+
:operation => :"DefaultApi.attach_function",
|
|
91
|
+
:header_params => header_params,
|
|
92
|
+
:query_params => query_params,
|
|
93
|
+
:form_params => form_params,
|
|
94
|
+
:body => post_body,
|
|
95
|
+
:auth_names => auth_names,
|
|
96
|
+
:return_type => return_type
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug "API called: DefaultApi#attach_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
102
|
+
end
|
|
103
|
+
return data, status_code, headers
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Adds records to a collection.
|
|
107
|
+
# @param tenant [Object]
|
|
108
|
+
# @param database [Object]
|
|
109
|
+
# @param collection_id [Object]
|
|
110
|
+
# @param add_collection_records_payload [AddCollectionRecordsPayload]
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @return [Object]
|
|
113
|
+
def collection_add(tenant, database, collection_id, add_collection_records_payload, opts = {})
|
|
114
|
+
data, _status_code, _headers = collection_add_with_http_info(tenant, database, collection_id, add_collection_records_payload, opts)
|
|
115
|
+
data
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Adds records to a collection.
|
|
119
|
+
# @param tenant [Object]
|
|
120
|
+
# @param database [Object]
|
|
121
|
+
# @param collection_id [Object]
|
|
122
|
+
# @param add_collection_records_payload [AddCollectionRecordsPayload]
|
|
123
|
+
# @param [Hash] opts the optional parameters
|
|
124
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
125
|
+
def collection_add_with_http_info(tenant, database, collection_id, add_collection_records_payload, opts = {})
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_add ...'
|
|
128
|
+
end
|
|
129
|
+
# verify the required parameter 'tenant' is set
|
|
130
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
131
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_add"
|
|
132
|
+
end
|
|
133
|
+
# verify the required parameter 'database' is set
|
|
134
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
135
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_add"
|
|
136
|
+
end
|
|
137
|
+
# verify the required parameter 'collection_id' is set
|
|
138
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
139
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_add"
|
|
140
|
+
end
|
|
141
|
+
# verify the required parameter 'add_collection_records_payload' is set
|
|
142
|
+
if @api_client.config.client_side_validation && add_collection_records_payload.nil?
|
|
143
|
+
fail ArgumentError, "Missing the required parameter 'add_collection_records_payload' when calling DefaultApi.collection_add"
|
|
144
|
+
end
|
|
145
|
+
# resource path
|
|
146
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/add'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
147
|
+
|
|
148
|
+
# query parameters
|
|
149
|
+
query_params = opts[:query_params] || {}
|
|
150
|
+
|
|
151
|
+
# header parameters
|
|
152
|
+
header_params = opts[:header_params] || {}
|
|
153
|
+
# HTTP header 'Accept' (if needed)
|
|
154
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
155
|
+
# HTTP header 'Content-Type'
|
|
156
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
157
|
+
if !content_type.nil?
|
|
158
|
+
header_params['Content-Type'] = content_type
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# form parameters
|
|
162
|
+
form_params = opts[:form_params] || {}
|
|
163
|
+
|
|
164
|
+
# http body (model)
|
|
165
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_collection_records_payload)
|
|
166
|
+
|
|
167
|
+
# return_type
|
|
168
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
169
|
+
|
|
170
|
+
# auth_names
|
|
171
|
+
auth_names = opts[:debug_auth_names] || []
|
|
172
|
+
|
|
173
|
+
new_options = opts.merge(
|
|
174
|
+
:operation => :"DefaultApi.collection_add",
|
|
175
|
+
:header_params => header_params,
|
|
176
|
+
:query_params => query_params,
|
|
177
|
+
:form_params => form_params,
|
|
178
|
+
:body => post_body,
|
|
179
|
+
:auth_names => auth_names,
|
|
180
|
+
:return_type => return_type
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
184
|
+
if @api_client.config.debugging
|
|
185
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
186
|
+
end
|
|
187
|
+
return data, status_code, headers
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Retrieves the number of records in a collection.
|
|
191
|
+
# @param tenant [Object] Tenant ID for the collection
|
|
192
|
+
# @param database [Object] Database containing this collection
|
|
193
|
+
# @param collection_id [Object] Collection ID whose records are counted
|
|
194
|
+
# @param [Hash] opts the optional parameters
|
|
195
|
+
# @return [Object]
|
|
196
|
+
def collection_count(tenant, database, collection_id, opts = {})
|
|
197
|
+
data, _status_code, _headers = collection_count_with_http_info(tenant, database, collection_id, opts)
|
|
198
|
+
data
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Retrieves the number of records in a collection.
|
|
202
|
+
# @param tenant [Object] Tenant ID for the collection
|
|
203
|
+
# @param database [Object] Database containing this collection
|
|
204
|
+
# @param collection_id [Object] Collection ID whose records are counted
|
|
205
|
+
# @param [Hash] opts the optional parameters
|
|
206
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
207
|
+
def collection_count_with_http_info(tenant, database, collection_id, opts = {})
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_count ...'
|
|
210
|
+
end
|
|
211
|
+
# verify the required parameter 'tenant' is set
|
|
212
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
213
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_count"
|
|
214
|
+
end
|
|
215
|
+
# verify the required parameter 'database' is set
|
|
216
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
217
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_count"
|
|
218
|
+
end
|
|
219
|
+
# verify the required parameter 'collection_id' is set
|
|
220
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
221
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_count"
|
|
222
|
+
end
|
|
223
|
+
# resource path
|
|
224
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/count'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
225
|
+
|
|
226
|
+
# query parameters
|
|
227
|
+
query_params = opts[:query_params] || {}
|
|
228
|
+
|
|
229
|
+
# header parameters
|
|
230
|
+
header_params = opts[:header_params] || {}
|
|
231
|
+
# HTTP header 'Accept' (if needed)
|
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = opts[:form_params] || {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = opts[:debug_body]
|
|
239
|
+
|
|
240
|
+
# return_type
|
|
241
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
242
|
+
|
|
243
|
+
# auth_names
|
|
244
|
+
auth_names = opts[:debug_auth_names] || []
|
|
245
|
+
|
|
246
|
+
new_options = opts.merge(
|
|
247
|
+
:operation => :"DefaultApi.collection_count",
|
|
248
|
+
:header_params => header_params,
|
|
249
|
+
:query_params => query_params,
|
|
250
|
+
:form_params => form_params,
|
|
251
|
+
:body => post_body,
|
|
252
|
+
:auth_names => auth_names,
|
|
253
|
+
:return_type => return_type
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Deletes records in a collection. Can filter by IDs or metadata.
|
|
264
|
+
# @param tenant [Object] Tenant ID
|
|
265
|
+
# @param database [Object] Database name
|
|
266
|
+
# @param collection_id [Object] Collection ID
|
|
267
|
+
# @param body [Object]
|
|
268
|
+
# @param [Hash] opts the optional parameters
|
|
269
|
+
# @return [Object]
|
|
270
|
+
def collection_delete(tenant, database, collection_id, body, opts = {})
|
|
271
|
+
data, _status_code, _headers = collection_delete_with_http_info(tenant, database, collection_id, body, opts)
|
|
272
|
+
data
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Deletes records in a collection. Can filter by IDs or metadata.
|
|
276
|
+
# @param tenant [Object] Tenant ID
|
|
277
|
+
# @param database [Object] Database name
|
|
278
|
+
# @param collection_id [Object] Collection ID
|
|
279
|
+
# @param body [Object]
|
|
280
|
+
# @param [Hash] opts the optional parameters
|
|
281
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
282
|
+
def collection_delete_with_http_info(tenant, database, collection_id, body, opts = {})
|
|
283
|
+
if @api_client.config.debugging
|
|
284
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_delete ...'
|
|
285
|
+
end
|
|
286
|
+
# verify the required parameter 'tenant' is set
|
|
287
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
288
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_delete"
|
|
289
|
+
end
|
|
290
|
+
# verify the required parameter 'database' is set
|
|
291
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
292
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_delete"
|
|
293
|
+
end
|
|
294
|
+
# verify the required parameter 'collection_id' is set
|
|
295
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
296
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_delete"
|
|
297
|
+
end
|
|
298
|
+
# resource path
|
|
299
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/delete'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
300
|
+
|
|
301
|
+
# query parameters
|
|
302
|
+
query_params = opts[:query_params] || {}
|
|
303
|
+
|
|
304
|
+
# header parameters
|
|
305
|
+
header_params = opts[:header_params] || {}
|
|
306
|
+
# HTTP header 'Accept' (if needed)
|
|
307
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
308
|
+
# HTTP header 'Content-Type'
|
|
309
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
310
|
+
if !content_type.nil?
|
|
311
|
+
header_params['Content-Type'] = content_type
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# form parameters
|
|
315
|
+
form_params = opts[:form_params] || {}
|
|
316
|
+
|
|
317
|
+
# http body (model)
|
|
318
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
319
|
+
|
|
320
|
+
# return_type
|
|
321
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
322
|
+
|
|
323
|
+
# auth_names
|
|
324
|
+
auth_names = opts[:debug_auth_names] || []
|
|
325
|
+
|
|
326
|
+
new_options = opts.merge(
|
|
327
|
+
:operation => :"DefaultApi.collection_delete",
|
|
328
|
+
:header_params => header_params,
|
|
329
|
+
:query_params => query_params,
|
|
330
|
+
:form_params => form_params,
|
|
331
|
+
:body => post_body,
|
|
332
|
+
:auth_names => auth_names,
|
|
333
|
+
:return_type => return_type
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
337
|
+
if @api_client.config.debugging
|
|
338
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
339
|
+
end
|
|
340
|
+
return data, status_code, headers
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Retrieves records from a collection by ID or metadata filter.
|
|
344
|
+
# @param tenant [Object] Tenant ID
|
|
345
|
+
# @param database [Object] Database name for the collection
|
|
346
|
+
# @param collection_id [Object] Collection ID to fetch records from
|
|
347
|
+
# @param body [Object]
|
|
348
|
+
# @param [Hash] opts the optional parameters
|
|
349
|
+
# @return [GetResponse]
|
|
350
|
+
def collection_get(tenant, database, collection_id, body, opts = {})
|
|
351
|
+
data, _status_code, _headers = collection_get_with_http_info(tenant, database, collection_id, body, opts)
|
|
352
|
+
data
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Retrieves records from a collection by ID or metadata filter.
|
|
356
|
+
# @param tenant [Object] Tenant ID
|
|
357
|
+
# @param database [Object] Database name for the collection
|
|
358
|
+
# @param collection_id [Object] Collection ID to fetch records from
|
|
359
|
+
# @param body [Object]
|
|
360
|
+
# @param [Hash] opts the optional parameters
|
|
361
|
+
# @return [Array<(GetResponse, Integer, Hash)>] GetResponse data, response status code and response headers
|
|
362
|
+
def collection_get_with_http_info(tenant, database, collection_id, body, opts = {})
|
|
363
|
+
if @api_client.config.debugging
|
|
364
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_get ...'
|
|
365
|
+
end
|
|
366
|
+
# verify the required parameter 'tenant' is set
|
|
367
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
368
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_get"
|
|
369
|
+
end
|
|
370
|
+
# verify the required parameter 'database' is set
|
|
371
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
372
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_get"
|
|
373
|
+
end
|
|
374
|
+
# verify the required parameter 'collection_id' is set
|
|
375
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
376
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_get"
|
|
377
|
+
end
|
|
378
|
+
# resource path
|
|
379
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/get'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
380
|
+
|
|
381
|
+
# query parameters
|
|
382
|
+
query_params = opts[:query_params] || {}
|
|
383
|
+
|
|
384
|
+
# header parameters
|
|
385
|
+
header_params = opts[:header_params] || {}
|
|
386
|
+
# HTTP header 'Accept' (if needed)
|
|
387
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
388
|
+
# HTTP header 'Content-Type'
|
|
389
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
390
|
+
if !content_type.nil?
|
|
391
|
+
header_params['Content-Type'] = content_type
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# form parameters
|
|
395
|
+
form_params = opts[:form_params] || {}
|
|
396
|
+
|
|
397
|
+
# http body (model)
|
|
398
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
399
|
+
|
|
400
|
+
# return_type
|
|
401
|
+
return_type = opts[:debug_return_type] || 'GetResponse'
|
|
402
|
+
|
|
403
|
+
# auth_names
|
|
404
|
+
auth_names = opts[:debug_auth_names] || []
|
|
405
|
+
|
|
406
|
+
new_options = opts.merge(
|
|
407
|
+
:operation => :"DefaultApi.collection_get",
|
|
408
|
+
:header_params => header_params,
|
|
409
|
+
:query_params => query_params,
|
|
410
|
+
:form_params => form_params,
|
|
411
|
+
:body => post_body,
|
|
412
|
+
:auth_names => auth_names,
|
|
413
|
+
:return_type => return_type
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
417
|
+
if @api_client.config.debugging
|
|
418
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
419
|
+
end
|
|
420
|
+
return data, status_code, headers
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
|
|
424
|
+
# @param tenant [Object] Tenant ID
|
|
425
|
+
# @param database [Object] Database name containing the collection
|
|
426
|
+
# @param collection_id [Object] Collection ID to query
|
|
427
|
+
# @param body [Object]
|
|
428
|
+
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @option opts [Object] :limit Limit for pagination
|
|
430
|
+
# @option opts [Object] :offset Offset for pagination
|
|
431
|
+
# @return [QueryResponse]
|
|
432
|
+
def collection_query(tenant, database, collection_id, body, opts = {})
|
|
433
|
+
data, _status_code, _headers = collection_query_with_http_info(tenant, database, collection_id, body, opts)
|
|
434
|
+
data
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
|
|
438
|
+
# @param tenant [Object] Tenant ID
|
|
439
|
+
# @param database [Object] Database name containing the collection
|
|
440
|
+
# @param collection_id [Object] Collection ID to query
|
|
441
|
+
# @param body [Object]
|
|
442
|
+
# @param [Hash] opts the optional parameters
|
|
443
|
+
# @option opts [Object] :limit Limit for pagination
|
|
444
|
+
# @option opts [Object] :offset Offset for pagination
|
|
445
|
+
# @return [Array<(QueryResponse, Integer, Hash)>] QueryResponse data, response status code and response headers
|
|
446
|
+
def collection_query_with_http_info(tenant, database, collection_id, body, opts = {})
|
|
447
|
+
if @api_client.config.debugging
|
|
448
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_query ...'
|
|
449
|
+
end
|
|
450
|
+
# verify the required parameter 'tenant' is set
|
|
451
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
452
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_query"
|
|
453
|
+
end
|
|
454
|
+
# verify the required parameter 'database' is set
|
|
455
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
456
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_query"
|
|
457
|
+
end
|
|
458
|
+
# verify the required parameter 'collection_id' is set
|
|
459
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
460
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_query"
|
|
461
|
+
end
|
|
462
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
|
|
463
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.collection_query, must be greater than or equal to 0.'
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
467
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DefaultApi.collection_query, must be greater than or equal to 0.'
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# resource path
|
|
471
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/query'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
472
|
+
|
|
473
|
+
# query parameters
|
|
474
|
+
query_params = opts[:query_params] || {}
|
|
475
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
476
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
477
|
+
|
|
478
|
+
# header parameters
|
|
479
|
+
header_params = opts[:header_params] || {}
|
|
480
|
+
# HTTP header 'Accept' (if needed)
|
|
481
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
482
|
+
# HTTP header 'Content-Type'
|
|
483
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
484
|
+
if !content_type.nil?
|
|
485
|
+
header_params['Content-Type'] = content_type
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# form parameters
|
|
489
|
+
form_params = opts[:form_params] || {}
|
|
490
|
+
|
|
491
|
+
# http body (model)
|
|
492
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
493
|
+
|
|
494
|
+
# return_type
|
|
495
|
+
return_type = opts[:debug_return_type] || 'QueryResponse'
|
|
496
|
+
|
|
497
|
+
# auth_names
|
|
498
|
+
auth_names = opts[:debug_auth_names] || []
|
|
499
|
+
|
|
500
|
+
new_options = opts.merge(
|
|
501
|
+
:operation => :"DefaultApi.collection_query",
|
|
502
|
+
:header_params => header_params,
|
|
503
|
+
:query_params => query_params,
|
|
504
|
+
:form_params => form_params,
|
|
505
|
+
:body => post_body,
|
|
506
|
+
:auth_names => auth_names,
|
|
507
|
+
:return_type => return_type
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
511
|
+
if @api_client.config.debugging
|
|
512
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
513
|
+
end
|
|
514
|
+
return data, status_code, headers
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
# Search records from a collection with hybrid criterias.
|
|
518
|
+
# @param tenant [Object] Tenant ID
|
|
519
|
+
# @param database [Object] Database name for the collection
|
|
520
|
+
# @param collection_id [Object] Collection ID to search records from
|
|
521
|
+
# @param search_request_payload [SearchRequestPayload]
|
|
522
|
+
# @param [Hash] opts the optional parameters
|
|
523
|
+
# @return [SearchResponse]
|
|
524
|
+
def collection_search(tenant, database, collection_id, search_request_payload, opts = {})
|
|
525
|
+
data, _status_code, _headers = collection_search_with_http_info(tenant, database, collection_id, search_request_payload, opts)
|
|
526
|
+
data
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
# Search records from a collection with hybrid criterias.
|
|
530
|
+
# @param tenant [Object] Tenant ID
|
|
531
|
+
# @param database [Object] Database name for the collection
|
|
532
|
+
# @param collection_id [Object] Collection ID to search records from
|
|
533
|
+
# @param search_request_payload [SearchRequestPayload]
|
|
534
|
+
# @param [Hash] opts the optional parameters
|
|
535
|
+
# @return [Array<(SearchResponse, Integer, Hash)>] SearchResponse data, response status code and response headers
|
|
536
|
+
def collection_search_with_http_info(tenant, database, collection_id, search_request_payload, opts = {})
|
|
537
|
+
if @api_client.config.debugging
|
|
538
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_search ...'
|
|
539
|
+
end
|
|
540
|
+
# verify the required parameter 'tenant' is set
|
|
541
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
542
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_search"
|
|
543
|
+
end
|
|
544
|
+
# verify the required parameter 'database' is set
|
|
545
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
546
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_search"
|
|
547
|
+
end
|
|
548
|
+
# verify the required parameter 'collection_id' is set
|
|
549
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
550
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_search"
|
|
551
|
+
end
|
|
552
|
+
# verify the required parameter 'search_request_payload' is set
|
|
553
|
+
if @api_client.config.client_side_validation && search_request_payload.nil?
|
|
554
|
+
fail ArgumentError, "Missing the required parameter 'search_request_payload' when calling DefaultApi.collection_search"
|
|
555
|
+
end
|
|
556
|
+
# resource path
|
|
557
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/search'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
558
|
+
|
|
559
|
+
# query parameters
|
|
560
|
+
query_params = opts[:query_params] || {}
|
|
561
|
+
|
|
562
|
+
# header parameters
|
|
563
|
+
header_params = opts[:header_params] || {}
|
|
564
|
+
# HTTP header 'Accept' (if needed)
|
|
565
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
566
|
+
# HTTP header 'Content-Type'
|
|
567
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
568
|
+
if !content_type.nil?
|
|
569
|
+
header_params['Content-Type'] = content_type
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
# form parameters
|
|
573
|
+
form_params = opts[:form_params] || {}
|
|
574
|
+
|
|
575
|
+
# http body (model)
|
|
576
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_request_payload)
|
|
577
|
+
|
|
578
|
+
# return_type
|
|
579
|
+
return_type = opts[:debug_return_type] || 'SearchResponse'
|
|
580
|
+
|
|
581
|
+
# auth_names
|
|
582
|
+
auth_names = opts[:debug_auth_names] || []
|
|
583
|
+
|
|
584
|
+
new_options = opts.merge(
|
|
585
|
+
:operation => :"DefaultApi.collection_search",
|
|
586
|
+
:header_params => header_params,
|
|
587
|
+
:query_params => query_params,
|
|
588
|
+
:form_params => form_params,
|
|
589
|
+
:body => post_body,
|
|
590
|
+
:auth_names => auth_names,
|
|
591
|
+
:return_type => return_type
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
595
|
+
if @api_client.config.debugging
|
|
596
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
597
|
+
end
|
|
598
|
+
return data, status_code, headers
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
# Updates records in a collection by ID.
|
|
602
|
+
# @param tenant [Object]
|
|
603
|
+
# @param database [Object]
|
|
604
|
+
# @param collection_id [Object]
|
|
605
|
+
# @param update_collection_records_payload [UpdateCollectionRecordsPayload]
|
|
606
|
+
# @param [Hash] opts the optional parameters
|
|
607
|
+
# @return [Object]
|
|
608
|
+
def collection_update(tenant, database, collection_id, update_collection_records_payload, opts = {})
|
|
609
|
+
data, _status_code, _headers = collection_update_with_http_info(tenant, database, collection_id, update_collection_records_payload, opts)
|
|
610
|
+
data
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# Updates records in a collection by ID.
|
|
614
|
+
# @param tenant [Object]
|
|
615
|
+
# @param database [Object]
|
|
616
|
+
# @param collection_id [Object]
|
|
617
|
+
# @param update_collection_records_payload [UpdateCollectionRecordsPayload]
|
|
618
|
+
# @param [Hash] opts the optional parameters
|
|
619
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
620
|
+
def collection_update_with_http_info(tenant, database, collection_id, update_collection_records_payload, opts = {})
|
|
621
|
+
if @api_client.config.debugging
|
|
622
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_update ...'
|
|
623
|
+
end
|
|
624
|
+
# verify the required parameter 'tenant' is set
|
|
625
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
626
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_update"
|
|
627
|
+
end
|
|
628
|
+
# verify the required parameter 'database' is set
|
|
629
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
630
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_update"
|
|
631
|
+
end
|
|
632
|
+
# verify the required parameter 'collection_id' is set
|
|
633
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
634
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_update"
|
|
635
|
+
end
|
|
636
|
+
# verify the required parameter 'update_collection_records_payload' is set
|
|
637
|
+
if @api_client.config.client_side_validation && update_collection_records_payload.nil?
|
|
638
|
+
fail ArgumentError, "Missing the required parameter 'update_collection_records_payload' when calling DefaultApi.collection_update"
|
|
639
|
+
end
|
|
640
|
+
# resource path
|
|
641
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/update'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
642
|
+
|
|
643
|
+
# query parameters
|
|
644
|
+
query_params = opts[:query_params] || {}
|
|
645
|
+
|
|
646
|
+
# header parameters
|
|
647
|
+
header_params = opts[:header_params] || {}
|
|
648
|
+
# HTTP header 'Accept' (if needed)
|
|
649
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
650
|
+
# HTTP header 'Content-Type'
|
|
651
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
652
|
+
if !content_type.nil?
|
|
653
|
+
header_params['Content-Type'] = content_type
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
# form parameters
|
|
657
|
+
form_params = opts[:form_params] || {}
|
|
658
|
+
|
|
659
|
+
# http body (model)
|
|
660
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_collection_records_payload)
|
|
661
|
+
|
|
662
|
+
# return_type
|
|
663
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
664
|
+
|
|
665
|
+
# auth_names
|
|
666
|
+
auth_names = opts[:debug_auth_names] || []
|
|
667
|
+
|
|
668
|
+
new_options = opts.merge(
|
|
669
|
+
:operation => :"DefaultApi.collection_update",
|
|
670
|
+
:header_params => header_params,
|
|
671
|
+
:query_params => query_params,
|
|
672
|
+
:form_params => form_params,
|
|
673
|
+
:body => post_body,
|
|
674
|
+
:auth_names => auth_names,
|
|
675
|
+
:return_type => return_type
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
679
|
+
if @api_client.config.debugging
|
|
680
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
681
|
+
end
|
|
682
|
+
return data, status_code, headers
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# Upserts records in a collection (create if not exists, otherwise update).
|
|
686
|
+
# @param tenant [Object] Tenant ID
|
|
687
|
+
# @param database [Object] Database name
|
|
688
|
+
# @param collection_id [Object] Collection ID
|
|
689
|
+
# @param upsert_collection_records_payload [UpsertCollectionRecordsPayload]
|
|
690
|
+
# @param [Hash] opts the optional parameters
|
|
691
|
+
# @return [Object]
|
|
692
|
+
def collection_upsert(tenant, database, collection_id, upsert_collection_records_payload, opts = {})
|
|
693
|
+
data, _status_code, _headers = collection_upsert_with_http_info(tenant, database, collection_id, upsert_collection_records_payload, opts)
|
|
694
|
+
data
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
# Upserts records in a collection (create if not exists, otherwise update).
|
|
698
|
+
# @param tenant [Object] Tenant ID
|
|
699
|
+
# @param database [Object] Database name
|
|
700
|
+
# @param collection_id [Object] Collection ID
|
|
701
|
+
# @param upsert_collection_records_payload [UpsertCollectionRecordsPayload]
|
|
702
|
+
# @param [Hash] opts the optional parameters
|
|
703
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
704
|
+
def collection_upsert_with_http_info(tenant, database, collection_id, upsert_collection_records_payload, opts = {})
|
|
705
|
+
if @api_client.config.debugging
|
|
706
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.collection_upsert ...'
|
|
707
|
+
end
|
|
708
|
+
# verify the required parameter 'tenant' is set
|
|
709
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
710
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.collection_upsert"
|
|
711
|
+
end
|
|
712
|
+
# verify the required parameter 'database' is set
|
|
713
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
714
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.collection_upsert"
|
|
715
|
+
end
|
|
716
|
+
# verify the required parameter 'collection_id' is set
|
|
717
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
718
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.collection_upsert"
|
|
719
|
+
end
|
|
720
|
+
# verify the required parameter 'upsert_collection_records_payload' is set
|
|
721
|
+
if @api_client.config.client_side_validation && upsert_collection_records_payload.nil?
|
|
722
|
+
fail ArgumentError, "Missing the required parameter 'upsert_collection_records_payload' when calling DefaultApi.collection_upsert"
|
|
723
|
+
end
|
|
724
|
+
# resource path
|
|
725
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/upsert'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
726
|
+
|
|
727
|
+
# query parameters
|
|
728
|
+
query_params = opts[:query_params] || {}
|
|
729
|
+
|
|
730
|
+
# header parameters
|
|
731
|
+
header_params = opts[:header_params] || {}
|
|
732
|
+
# HTTP header 'Accept' (if needed)
|
|
733
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
734
|
+
# HTTP header 'Content-Type'
|
|
735
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
736
|
+
if !content_type.nil?
|
|
737
|
+
header_params['Content-Type'] = content_type
|
|
738
|
+
end
|
|
739
|
+
|
|
740
|
+
# form parameters
|
|
741
|
+
form_params = opts[:form_params] || {}
|
|
742
|
+
|
|
743
|
+
# http body (model)
|
|
744
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_collection_records_payload)
|
|
745
|
+
|
|
746
|
+
# return_type
|
|
747
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
748
|
+
|
|
749
|
+
# auth_names
|
|
750
|
+
auth_names = opts[:debug_auth_names] || []
|
|
751
|
+
|
|
752
|
+
new_options = opts.merge(
|
|
753
|
+
:operation => :"DefaultApi.collection_upsert",
|
|
754
|
+
:header_params => header_params,
|
|
755
|
+
:query_params => query_params,
|
|
756
|
+
:form_params => form_params,
|
|
757
|
+
:body => post_body,
|
|
758
|
+
:auth_names => auth_names,
|
|
759
|
+
:return_type => return_type
|
|
760
|
+
)
|
|
761
|
+
|
|
762
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
763
|
+
if @api_client.config.debugging
|
|
764
|
+
@api_client.config.logger.debug "API called: DefaultApi#collection_upsert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
765
|
+
end
|
|
766
|
+
return data, status_code, headers
|
|
767
|
+
end
|
|
768
|
+
|
|
769
|
+
# Retrieves the total number of collections in a given database.
|
|
770
|
+
# @param tenant [Object] Tenant ID
|
|
771
|
+
# @param database [Object] Database name to count collections from
|
|
772
|
+
# @param [Hash] opts the optional parameters
|
|
773
|
+
# @return [Object]
|
|
774
|
+
def count_collections(tenant, database, opts = {})
|
|
775
|
+
data, _status_code, _headers = count_collections_with_http_info(tenant, database, opts)
|
|
776
|
+
data
|
|
777
|
+
end
|
|
778
|
+
|
|
779
|
+
# Retrieves the total number of collections in a given database.
|
|
780
|
+
# @param tenant [Object] Tenant ID
|
|
781
|
+
# @param database [Object] Database name to count collections from
|
|
782
|
+
# @param [Hash] opts the optional parameters
|
|
783
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
784
|
+
def count_collections_with_http_info(tenant, database, opts = {})
|
|
785
|
+
if @api_client.config.debugging
|
|
786
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.count_collections ...'
|
|
787
|
+
end
|
|
788
|
+
# verify the required parameter 'tenant' is set
|
|
789
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
790
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.count_collections"
|
|
791
|
+
end
|
|
792
|
+
# verify the required parameter 'database' is set
|
|
793
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
794
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.count_collections"
|
|
795
|
+
end
|
|
796
|
+
# resource path
|
|
797
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections_count'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s))
|
|
798
|
+
|
|
799
|
+
# query parameters
|
|
800
|
+
query_params = opts[:query_params] || {}
|
|
801
|
+
|
|
802
|
+
# header parameters
|
|
803
|
+
header_params = opts[:header_params] || {}
|
|
804
|
+
# HTTP header 'Accept' (if needed)
|
|
805
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
806
|
+
|
|
807
|
+
# form parameters
|
|
808
|
+
form_params = opts[:form_params] || {}
|
|
809
|
+
|
|
810
|
+
# http body (model)
|
|
811
|
+
post_body = opts[:debug_body]
|
|
812
|
+
|
|
813
|
+
# return_type
|
|
814
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
815
|
+
|
|
816
|
+
# auth_names
|
|
817
|
+
auth_names = opts[:debug_auth_names] || []
|
|
818
|
+
|
|
819
|
+
new_options = opts.merge(
|
|
820
|
+
:operation => :"DefaultApi.count_collections",
|
|
821
|
+
:header_params => header_params,
|
|
822
|
+
:query_params => query_params,
|
|
823
|
+
:form_params => form_params,
|
|
824
|
+
:body => post_body,
|
|
825
|
+
:auth_names => auth_names,
|
|
826
|
+
:return_type => return_type
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
830
|
+
if @api_client.config.debugging
|
|
831
|
+
@api_client.config.logger.debug "API called: DefaultApi#count_collections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
832
|
+
end
|
|
833
|
+
return data, status_code, headers
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
# Creates a new collection under the specified database.
|
|
837
|
+
# @param tenant [Object] Tenant ID
|
|
838
|
+
# @param database [Object] Database name containing the new collection
|
|
839
|
+
# @param create_collection_payload [CreateCollectionPayload]
|
|
840
|
+
# @param [Hash] opts the optional parameters
|
|
841
|
+
# @return [Collection]
|
|
842
|
+
def create_collection(tenant, database, create_collection_payload, opts = {})
|
|
843
|
+
data, _status_code, _headers = create_collection_with_http_info(tenant, database, create_collection_payload, opts)
|
|
844
|
+
data
|
|
845
|
+
end
|
|
846
|
+
|
|
847
|
+
# Creates a new collection under the specified database.
|
|
848
|
+
# @param tenant [Object] Tenant ID
|
|
849
|
+
# @param database [Object] Database name containing the new collection
|
|
850
|
+
# @param create_collection_payload [CreateCollectionPayload]
|
|
851
|
+
# @param [Hash] opts the optional parameters
|
|
852
|
+
# @return [Array<(Collection, Integer, Hash)>] Collection data, response status code and response headers
|
|
853
|
+
def create_collection_with_http_info(tenant, database, create_collection_payload, opts = {})
|
|
854
|
+
if @api_client.config.debugging
|
|
855
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_collection ...'
|
|
856
|
+
end
|
|
857
|
+
# verify the required parameter 'tenant' is set
|
|
858
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
859
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.create_collection"
|
|
860
|
+
end
|
|
861
|
+
# verify the required parameter 'database' is set
|
|
862
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
863
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.create_collection"
|
|
864
|
+
end
|
|
865
|
+
# verify the required parameter 'create_collection_payload' is set
|
|
866
|
+
if @api_client.config.client_side_validation && create_collection_payload.nil?
|
|
867
|
+
fail ArgumentError, "Missing the required parameter 'create_collection_payload' when calling DefaultApi.create_collection"
|
|
868
|
+
end
|
|
869
|
+
# resource path
|
|
870
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s))
|
|
871
|
+
|
|
872
|
+
# query parameters
|
|
873
|
+
query_params = opts[:query_params] || {}
|
|
874
|
+
|
|
875
|
+
# header parameters
|
|
876
|
+
header_params = opts[:header_params] || {}
|
|
877
|
+
# HTTP header 'Accept' (if needed)
|
|
878
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
879
|
+
# HTTP header 'Content-Type'
|
|
880
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
881
|
+
if !content_type.nil?
|
|
882
|
+
header_params['Content-Type'] = content_type
|
|
883
|
+
end
|
|
884
|
+
|
|
885
|
+
# form parameters
|
|
886
|
+
form_params = opts[:form_params] || {}
|
|
887
|
+
|
|
888
|
+
# http body (model)
|
|
889
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_collection_payload)
|
|
890
|
+
|
|
891
|
+
# return_type
|
|
892
|
+
return_type = opts[:debug_return_type] || 'Collection'
|
|
893
|
+
|
|
894
|
+
# auth_names
|
|
895
|
+
auth_names = opts[:debug_auth_names] || []
|
|
896
|
+
|
|
897
|
+
new_options = opts.merge(
|
|
898
|
+
:operation => :"DefaultApi.create_collection",
|
|
899
|
+
:header_params => header_params,
|
|
900
|
+
:query_params => query_params,
|
|
901
|
+
:form_params => form_params,
|
|
902
|
+
:body => post_body,
|
|
903
|
+
:auth_names => auth_names,
|
|
904
|
+
:return_type => return_type
|
|
905
|
+
)
|
|
906
|
+
|
|
907
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
908
|
+
if @api_client.config.debugging
|
|
909
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
910
|
+
end
|
|
911
|
+
return data, status_code, headers
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
# Creates a new database for a given tenant.
|
|
915
|
+
# @param tenant [Object] Tenant ID to associate with the new database
|
|
916
|
+
# @param create_database_payload [CreateDatabasePayload]
|
|
917
|
+
# @param [Hash] opts the optional parameters
|
|
918
|
+
# @return [Object]
|
|
919
|
+
def create_database(tenant, create_database_payload, opts = {})
|
|
920
|
+
data, _status_code, _headers = create_database_with_http_info(tenant, create_database_payload, opts)
|
|
921
|
+
data
|
|
922
|
+
end
|
|
923
|
+
|
|
924
|
+
# Creates a new database for a given tenant.
|
|
925
|
+
# @param tenant [Object] Tenant ID to associate with the new database
|
|
926
|
+
# @param create_database_payload [CreateDatabasePayload]
|
|
927
|
+
# @param [Hash] opts the optional parameters
|
|
928
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
929
|
+
def create_database_with_http_info(tenant, create_database_payload, opts = {})
|
|
930
|
+
if @api_client.config.debugging
|
|
931
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_database ...'
|
|
932
|
+
end
|
|
933
|
+
# verify the required parameter 'tenant' is set
|
|
934
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
935
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.create_database"
|
|
936
|
+
end
|
|
937
|
+
# verify the required parameter 'create_database_payload' is set
|
|
938
|
+
if @api_client.config.client_side_validation && create_database_payload.nil?
|
|
939
|
+
fail ArgumentError, "Missing the required parameter 'create_database_payload' when calling DefaultApi.create_database"
|
|
940
|
+
end
|
|
941
|
+
# resource path
|
|
942
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
943
|
+
|
|
944
|
+
# query parameters
|
|
945
|
+
query_params = opts[:query_params] || {}
|
|
946
|
+
|
|
947
|
+
# header parameters
|
|
948
|
+
header_params = opts[:header_params] || {}
|
|
949
|
+
# HTTP header 'Accept' (if needed)
|
|
950
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
951
|
+
# HTTP header 'Content-Type'
|
|
952
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
953
|
+
if !content_type.nil?
|
|
954
|
+
header_params['Content-Type'] = content_type
|
|
955
|
+
end
|
|
956
|
+
|
|
957
|
+
# form parameters
|
|
958
|
+
form_params = opts[:form_params] || {}
|
|
959
|
+
|
|
960
|
+
# http body (model)
|
|
961
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_database_payload)
|
|
962
|
+
|
|
963
|
+
# return_type
|
|
964
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
965
|
+
|
|
966
|
+
# auth_names
|
|
967
|
+
auth_names = opts[:debug_auth_names] || []
|
|
968
|
+
|
|
969
|
+
new_options = opts.merge(
|
|
970
|
+
:operation => :"DefaultApi.create_database",
|
|
971
|
+
:header_params => header_params,
|
|
972
|
+
:query_params => query_params,
|
|
973
|
+
:form_params => form_params,
|
|
974
|
+
:body => post_body,
|
|
975
|
+
:auth_names => auth_names,
|
|
976
|
+
:return_type => return_type
|
|
977
|
+
)
|
|
978
|
+
|
|
979
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
980
|
+
if @api_client.config.debugging
|
|
981
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_database\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
982
|
+
end
|
|
983
|
+
return data, status_code, headers
|
|
984
|
+
end
|
|
985
|
+
|
|
986
|
+
# Creates a new tenant.
|
|
987
|
+
# @param create_tenant_payload [CreateTenantPayload]
|
|
988
|
+
# @param [Hash] opts the optional parameters
|
|
989
|
+
# @return [Object]
|
|
990
|
+
def create_tenant(create_tenant_payload, opts = {})
|
|
991
|
+
data, _status_code, _headers = create_tenant_with_http_info(create_tenant_payload, opts)
|
|
992
|
+
data
|
|
993
|
+
end
|
|
994
|
+
|
|
995
|
+
# Creates a new tenant.
|
|
996
|
+
# @param create_tenant_payload [CreateTenantPayload]
|
|
997
|
+
# @param [Hash] opts the optional parameters
|
|
998
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
999
|
+
def create_tenant_with_http_info(create_tenant_payload, opts = {})
|
|
1000
|
+
if @api_client.config.debugging
|
|
1001
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_tenant ...'
|
|
1002
|
+
end
|
|
1003
|
+
# verify the required parameter 'create_tenant_payload' is set
|
|
1004
|
+
if @api_client.config.client_side_validation && create_tenant_payload.nil?
|
|
1005
|
+
fail ArgumentError, "Missing the required parameter 'create_tenant_payload' when calling DefaultApi.create_tenant"
|
|
1006
|
+
end
|
|
1007
|
+
# resource path
|
|
1008
|
+
local_var_path = '/api/v2/tenants'
|
|
1009
|
+
|
|
1010
|
+
# query parameters
|
|
1011
|
+
query_params = opts[:query_params] || {}
|
|
1012
|
+
|
|
1013
|
+
# header parameters
|
|
1014
|
+
header_params = opts[:header_params] || {}
|
|
1015
|
+
# HTTP header 'Accept' (if needed)
|
|
1016
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1017
|
+
# HTTP header 'Content-Type'
|
|
1018
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1019
|
+
if !content_type.nil?
|
|
1020
|
+
header_params['Content-Type'] = content_type
|
|
1021
|
+
end
|
|
1022
|
+
|
|
1023
|
+
# form parameters
|
|
1024
|
+
form_params = opts[:form_params] || {}
|
|
1025
|
+
|
|
1026
|
+
# http body (model)
|
|
1027
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_tenant_payload)
|
|
1028
|
+
|
|
1029
|
+
# return_type
|
|
1030
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1031
|
+
|
|
1032
|
+
# auth_names
|
|
1033
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1034
|
+
|
|
1035
|
+
new_options = opts.merge(
|
|
1036
|
+
:operation => :"DefaultApi.create_tenant",
|
|
1037
|
+
:header_params => header_params,
|
|
1038
|
+
:query_params => query_params,
|
|
1039
|
+
:form_params => form_params,
|
|
1040
|
+
:body => post_body,
|
|
1041
|
+
:auth_names => auth_names,
|
|
1042
|
+
:return_type => return_type
|
|
1043
|
+
)
|
|
1044
|
+
|
|
1045
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1046
|
+
if @api_client.config.debugging
|
|
1047
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_tenant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1048
|
+
end
|
|
1049
|
+
return data, status_code, headers
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1052
|
+
# Deletes a collection in a given database.
|
|
1053
|
+
# @param tenant [Object] Tenant ID
|
|
1054
|
+
# @param database [Object] Database name
|
|
1055
|
+
# @param collection_id [Object] UUID of the collection to delete
|
|
1056
|
+
# @param [Hash] opts the optional parameters
|
|
1057
|
+
# @return [Object]
|
|
1058
|
+
def delete_collection(tenant, database, collection_id, opts = {})
|
|
1059
|
+
data, _status_code, _headers = delete_collection_with_http_info(tenant, database, collection_id, opts)
|
|
1060
|
+
data
|
|
1061
|
+
end
|
|
1062
|
+
|
|
1063
|
+
# Deletes a collection in a given database.
|
|
1064
|
+
# @param tenant [Object] Tenant ID
|
|
1065
|
+
# @param database [Object] Database name
|
|
1066
|
+
# @param collection_id [Object] UUID of the collection to delete
|
|
1067
|
+
# @param [Hash] opts the optional parameters
|
|
1068
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1069
|
+
def delete_collection_with_http_info(tenant, database, collection_id, opts = {})
|
|
1070
|
+
if @api_client.config.debugging
|
|
1071
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.delete_collection ...'
|
|
1072
|
+
end
|
|
1073
|
+
# verify the required parameter 'tenant' is set
|
|
1074
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1075
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.delete_collection"
|
|
1076
|
+
end
|
|
1077
|
+
# verify the required parameter 'database' is set
|
|
1078
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1079
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.delete_collection"
|
|
1080
|
+
end
|
|
1081
|
+
# verify the required parameter 'collection_id' is set
|
|
1082
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
1083
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.delete_collection"
|
|
1084
|
+
end
|
|
1085
|
+
# resource path
|
|
1086
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
1087
|
+
|
|
1088
|
+
# query parameters
|
|
1089
|
+
query_params = opts[:query_params] || {}
|
|
1090
|
+
|
|
1091
|
+
# header parameters
|
|
1092
|
+
header_params = opts[:header_params] || {}
|
|
1093
|
+
# HTTP header 'Accept' (if needed)
|
|
1094
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1095
|
+
|
|
1096
|
+
# form parameters
|
|
1097
|
+
form_params = opts[:form_params] || {}
|
|
1098
|
+
|
|
1099
|
+
# http body (model)
|
|
1100
|
+
post_body = opts[:debug_body]
|
|
1101
|
+
|
|
1102
|
+
# return_type
|
|
1103
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1104
|
+
|
|
1105
|
+
# auth_names
|
|
1106
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1107
|
+
|
|
1108
|
+
new_options = opts.merge(
|
|
1109
|
+
:operation => :"DefaultApi.delete_collection",
|
|
1110
|
+
:header_params => header_params,
|
|
1111
|
+
:query_params => query_params,
|
|
1112
|
+
:form_params => form_params,
|
|
1113
|
+
:body => post_body,
|
|
1114
|
+
:auth_names => auth_names,
|
|
1115
|
+
:return_type => return_type
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1119
|
+
if @api_client.config.debugging
|
|
1120
|
+
@api_client.config.logger.debug "API called: DefaultApi#delete_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1121
|
+
end
|
|
1122
|
+
return data, status_code, headers
|
|
1123
|
+
end
|
|
1124
|
+
|
|
1125
|
+
# Deletes a specific database.
|
|
1126
|
+
# @param tenant [Object] Tenant ID
|
|
1127
|
+
# @param database [Object] Name of the database to delete
|
|
1128
|
+
# @param [Hash] opts the optional parameters
|
|
1129
|
+
# @return [Object]
|
|
1130
|
+
def delete_database(tenant, database, opts = {})
|
|
1131
|
+
data, _status_code, _headers = delete_database_with_http_info(tenant, database, opts)
|
|
1132
|
+
data
|
|
1133
|
+
end
|
|
1134
|
+
|
|
1135
|
+
# Deletes a specific database.
|
|
1136
|
+
# @param tenant [Object] Tenant ID
|
|
1137
|
+
# @param database [Object] Name of the database to delete
|
|
1138
|
+
# @param [Hash] opts the optional parameters
|
|
1139
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1140
|
+
def delete_database_with_http_info(tenant, database, opts = {})
|
|
1141
|
+
if @api_client.config.debugging
|
|
1142
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.delete_database ...'
|
|
1143
|
+
end
|
|
1144
|
+
# verify the required parameter 'tenant' is set
|
|
1145
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1146
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.delete_database"
|
|
1147
|
+
end
|
|
1148
|
+
# verify the required parameter 'database' is set
|
|
1149
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1150
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.delete_database"
|
|
1151
|
+
end
|
|
1152
|
+
# resource path
|
|
1153
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s))
|
|
1154
|
+
|
|
1155
|
+
# query parameters
|
|
1156
|
+
query_params = opts[:query_params] || {}
|
|
1157
|
+
|
|
1158
|
+
# header parameters
|
|
1159
|
+
header_params = opts[:header_params] || {}
|
|
1160
|
+
# HTTP header 'Accept' (if needed)
|
|
1161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1162
|
+
|
|
1163
|
+
# form parameters
|
|
1164
|
+
form_params = opts[:form_params] || {}
|
|
1165
|
+
|
|
1166
|
+
# http body (model)
|
|
1167
|
+
post_body = opts[:debug_body]
|
|
1168
|
+
|
|
1169
|
+
# return_type
|
|
1170
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1171
|
+
|
|
1172
|
+
# auth_names
|
|
1173
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1174
|
+
|
|
1175
|
+
new_options = opts.merge(
|
|
1176
|
+
:operation => :"DefaultApi.delete_database",
|
|
1177
|
+
:header_params => header_params,
|
|
1178
|
+
:query_params => query_params,
|
|
1179
|
+
:form_params => form_params,
|
|
1180
|
+
:body => post_body,
|
|
1181
|
+
:auth_names => auth_names,
|
|
1182
|
+
:return_type => return_type
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1186
|
+
if @api_client.config.debugging
|
|
1187
|
+
@api_client.config.logger.debug "API called: DefaultApi#delete_database\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1188
|
+
end
|
|
1189
|
+
return data, status_code, headers
|
|
1190
|
+
end
|
|
1191
|
+
|
|
1192
|
+
# Detach a function
|
|
1193
|
+
# @param tenant [Object] Tenant ID
|
|
1194
|
+
# @param database [Object] Database name
|
|
1195
|
+
# @param collection_id [Object] Input collection ID
|
|
1196
|
+
# @param name [Object] Attached function name
|
|
1197
|
+
# @param detach_function_request [DetachFunctionRequest]
|
|
1198
|
+
# @param [Hash] opts the optional parameters
|
|
1199
|
+
# @return [DetachFunctionResponse]
|
|
1200
|
+
def detach_function(tenant, database, collection_id, name, detach_function_request, opts = {})
|
|
1201
|
+
data, _status_code, _headers = detach_function_with_http_info(tenant, database, collection_id, name, detach_function_request, opts)
|
|
1202
|
+
data
|
|
1203
|
+
end
|
|
1204
|
+
|
|
1205
|
+
# Detach a function
|
|
1206
|
+
# @param tenant [Object] Tenant ID
|
|
1207
|
+
# @param database [Object] Database name
|
|
1208
|
+
# @param collection_id [Object] Input collection ID
|
|
1209
|
+
# @param name [Object] Attached function name
|
|
1210
|
+
# @param detach_function_request [DetachFunctionRequest]
|
|
1211
|
+
# @param [Hash] opts the optional parameters
|
|
1212
|
+
# @return [Array<(DetachFunctionResponse, Integer, Hash)>] DetachFunctionResponse data, response status code and response headers
|
|
1213
|
+
def detach_function_with_http_info(tenant, database, collection_id, name, detach_function_request, opts = {})
|
|
1214
|
+
if @api_client.config.debugging
|
|
1215
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.detach_function ...'
|
|
1216
|
+
end
|
|
1217
|
+
# verify the required parameter 'tenant' is set
|
|
1218
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1219
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.detach_function"
|
|
1220
|
+
end
|
|
1221
|
+
# verify the required parameter 'database' is set
|
|
1222
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1223
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.detach_function"
|
|
1224
|
+
end
|
|
1225
|
+
# verify the required parameter 'collection_id' is set
|
|
1226
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
1227
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.detach_function"
|
|
1228
|
+
end
|
|
1229
|
+
# verify the required parameter 'name' is set
|
|
1230
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
1231
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling DefaultApi.detach_function"
|
|
1232
|
+
end
|
|
1233
|
+
# verify the required parameter 'detach_function_request' is set
|
|
1234
|
+
if @api_client.config.client_side_validation && detach_function_request.nil?
|
|
1235
|
+
fail ArgumentError, "Missing the required parameter 'detach_function_request' when calling DefaultApi.detach_function"
|
|
1236
|
+
end
|
|
1237
|
+
# resource path
|
|
1238
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/attached_functions/{name}/detach'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s)).sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
1239
|
+
|
|
1240
|
+
# query parameters
|
|
1241
|
+
query_params = opts[:query_params] || {}
|
|
1242
|
+
|
|
1243
|
+
# header parameters
|
|
1244
|
+
header_params = opts[:header_params] || {}
|
|
1245
|
+
# HTTP header 'Accept' (if needed)
|
|
1246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1247
|
+
# HTTP header 'Content-Type'
|
|
1248
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1249
|
+
if !content_type.nil?
|
|
1250
|
+
header_params['Content-Type'] = content_type
|
|
1251
|
+
end
|
|
1252
|
+
|
|
1253
|
+
# form parameters
|
|
1254
|
+
form_params = opts[:form_params] || {}
|
|
1255
|
+
|
|
1256
|
+
# http body (model)
|
|
1257
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(detach_function_request)
|
|
1258
|
+
|
|
1259
|
+
# return_type
|
|
1260
|
+
return_type = opts[:debug_return_type] || 'DetachFunctionResponse'
|
|
1261
|
+
|
|
1262
|
+
# auth_names
|
|
1263
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1264
|
+
|
|
1265
|
+
new_options = opts.merge(
|
|
1266
|
+
:operation => :"DefaultApi.detach_function",
|
|
1267
|
+
:header_params => header_params,
|
|
1268
|
+
:query_params => query_params,
|
|
1269
|
+
:form_params => form_params,
|
|
1270
|
+
:body => post_body,
|
|
1271
|
+
:auth_names => auth_names,
|
|
1272
|
+
:return_type => return_type
|
|
1273
|
+
)
|
|
1274
|
+
|
|
1275
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1276
|
+
if @api_client.config.debugging
|
|
1277
|
+
@api_client.config.logger.debug "API called: DefaultApi#detach_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1278
|
+
end
|
|
1279
|
+
return data, status_code, headers
|
|
1280
|
+
end
|
|
1281
|
+
|
|
1282
|
+
# Forks an existing collection.
|
|
1283
|
+
# @param tenant [Object] Tenant ID
|
|
1284
|
+
# @param database [Object] Database name
|
|
1285
|
+
# @param collection_id [Object] UUID of the collection to update
|
|
1286
|
+
# @param fork_collection_payload [ForkCollectionPayload]
|
|
1287
|
+
# @param [Hash] opts the optional parameters
|
|
1288
|
+
# @return [Collection]
|
|
1289
|
+
def fork_collection(tenant, database, collection_id, fork_collection_payload, opts = {})
|
|
1290
|
+
data, _status_code, _headers = fork_collection_with_http_info(tenant, database, collection_id, fork_collection_payload, opts)
|
|
1291
|
+
data
|
|
1292
|
+
end
|
|
1293
|
+
|
|
1294
|
+
# Forks an existing collection.
|
|
1295
|
+
# @param tenant [Object] Tenant ID
|
|
1296
|
+
# @param database [Object] Database name
|
|
1297
|
+
# @param collection_id [Object] UUID of the collection to update
|
|
1298
|
+
# @param fork_collection_payload [ForkCollectionPayload]
|
|
1299
|
+
# @param [Hash] opts the optional parameters
|
|
1300
|
+
# @return [Array<(Collection, Integer, Hash)>] Collection data, response status code and response headers
|
|
1301
|
+
def fork_collection_with_http_info(tenant, database, collection_id, fork_collection_payload, opts = {})
|
|
1302
|
+
if @api_client.config.debugging
|
|
1303
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.fork_collection ...'
|
|
1304
|
+
end
|
|
1305
|
+
# verify the required parameter 'tenant' is set
|
|
1306
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1307
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.fork_collection"
|
|
1308
|
+
end
|
|
1309
|
+
# verify the required parameter 'database' is set
|
|
1310
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1311
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.fork_collection"
|
|
1312
|
+
end
|
|
1313
|
+
# verify the required parameter 'collection_id' is set
|
|
1314
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
1315
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.fork_collection"
|
|
1316
|
+
end
|
|
1317
|
+
# verify the required parameter 'fork_collection_payload' is set
|
|
1318
|
+
if @api_client.config.client_side_validation && fork_collection_payload.nil?
|
|
1319
|
+
fail ArgumentError, "Missing the required parameter 'fork_collection_payload' when calling DefaultApi.fork_collection"
|
|
1320
|
+
end
|
|
1321
|
+
# resource path
|
|
1322
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/fork'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
1323
|
+
|
|
1324
|
+
# query parameters
|
|
1325
|
+
query_params = opts[:query_params] || {}
|
|
1326
|
+
|
|
1327
|
+
# header parameters
|
|
1328
|
+
header_params = opts[:header_params] || {}
|
|
1329
|
+
# HTTP header 'Accept' (if needed)
|
|
1330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1331
|
+
# HTTP header 'Content-Type'
|
|
1332
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1333
|
+
if !content_type.nil?
|
|
1334
|
+
header_params['Content-Type'] = content_type
|
|
1335
|
+
end
|
|
1336
|
+
|
|
1337
|
+
# form parameters
|
|
1338
|
+
form_params = opts[:form_params] || {}
|
|
1339
|
+
|
|
1340
|
+
# http body (model)
|
|
1341
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(fork_collection_payload)
|
|
1342
|
+
|
|
1343
|
+
# return_type
|
|
1344
|
+
return_type = opts[:debug_return_type] || 'Collection'
|
|
1345
|
+
|
|
1346
|
+
# auth_names
|
|
1347
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1348
|
+
|
|
1349
|
+
new_options = opts.merge(
|
|
1350
|
+
:operation => :"DefaultApi.fork_collection",
|
|
1351
|
+
:header_params => header_params,
|
|
1352
|
+
:query_params => query_params,
|
|
1353
|
+
:form_params => form_params,
|
|
1354
|
+
:body => post_body,
|
|
1355
|
+
:auth_names => auth_names,
|
|
1356
|
+
:return_type => return_type
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1360
|
+
if @api_client.config.debugging
|
|
1361
|
+
@api_client.config.logger.debug "API called: DefaultApi#fork_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1362
|
+
end
|
|
1363
|
+
return data, status_code, headers
|
|
1364
|
+
end
|
|
1365
|
+
|
|
1366
|
+
# Get an attached function by name
|
|
1367
|
+
# @param tenant [Object] Tenant ID
|
|
1368
|
+
# @param database [Object] Database name
|
|
1369
|
+
# @param collection_id [Object] Collection ID
|
|
1370
|
+
# @param function_name [Object] Attached function name
|
|
1371
|
+
# @param [Hash] opts the optional parameters
|
|
1372
|
+
# @return [GetAttachedFunctionResponse]
|
|
1373
|
+
def get_attached_function(tenant, database, collection_id, function_name, opts = {})
|
|
1374
|
+
data, _status_code, _headers = get_attached_function_with_http_info(tenant, database, collection_id, function_name, opts)
|
|
1375
|
+
data
|
|
1376
|
+
end
|
|
1377
|
+
|
|
1378
|
+
# Get an attached function by name
|
|
1379
|
+
# @param tenant [Object] Tenant ID
|
|
1380
|
+
# @param database [Object] Database name
|
|
1381
|
+
# @param collection_id [Object] Collection ID
|
|
1382
|
+
# @param function_name [Object] Attached function name
|
|
1383
|
+
# @param [Hash] opts the optional parameters
|
|
1384
|
+
# @return [Array<(GetAttachedFunctionResponse, Integer, Hash)>] GetAttachedFunctionResponse data, response status code and response headers
|
|
1385
|
+
def get_attached_function_with_http_info(tenant, database, collection_id, function_name, opts = {})
|
|
1386
|
+
if @api_client.config.debugging
|
|
1387
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_attached_function ...'
|
|
1388
|
+
end
|
|
1389
|
+
# verify the required parameter 'tenant' is set
|
|
1390
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1391
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.get_attached_function"
|
|
1392
|
+
end
|
|
1393
|
+
# verify the required parameter 'database' is set
|
|
1394
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1395
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.get_attached_function"
|
|
1396
|
+
end
|
|
1397
|
+
# verify the required parameter 'collection_id' is set
|
|
1398
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
1399
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.get_attached_function"
|
|
1400
|
+
end
|
|
1401
|
+
# verify the required parameter 'function_name' is set
|
|
1402
|
+
if @api_client.config.client_side_validation && function_name.nil?
|
|
1403
|
+
fail ArgumentError, "Missing the required parameter 'function_name' when calling DefaultApi.get_attached_function"
|
|
1404
|
+
end
|
|
1405
|
+
# resource path
|
|
1406
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/{function_name}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s)).sub('{' + 'function_name' + '}', CGI.escape(function_name.to_s))
|
|
1407
|
+
|
|
1408
|
+
# query parameters
|
|
1409
|
+
query_params = opts[:query_params] || {}
|
|
1410
|
+
|
|
1411
|
+
# header parameters
|
|
1412
|
+
header_params = opts[:header_params] || {}
|
|
1413
|
+
# HTTP header 'Accept' (if needed)
|
|
1414
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1415
|
+
|
|
1416
|
+
# form parameters
|
|
1417
|
+
form_params = opts[:form_params] || {}
|
|
1418
|
+
|
|
1419
|
+
# http body (model)
|
|
1420
|
+
post_body = opts[:debug_body]
|
|
1421
|
+
|
|
1422
|
+
# return_type
|
|
1423
|
+
return_type = opts[:debug_return_type] || 'GetAttachedFunctionResponse'
|
|
1424
|
+
|
|
1425
|
+
# auth_names
|
|
1426
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1427
|
+
|
|
1428
|
+
new_options = opts.merge(
|
|
1429
|
+
:operation => :"DefaultApi.get_attached_function",
|
|
1430
|
+
:header_params => header_params,
|
|
1431
|
+
:query_params => query_params,
|
|
1432
|
+
:form_params => form_params,
|
|
1433
|
+
:body => post_body,
|
|
1434
|
+
:auth_names => auth_names,
|
|
1435
|
+
:return_type => return_type
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1439
|
+
if @api_client.config.debugging
|
|
1440
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_attached_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1441
|
+
end
|
|
1442
|
+
return data, status_code, headers
|
|
1443
|
+
end
|
|
1444
|
+
|
|
1445
|
+
# Retrieves a collection by ID or name.
|
|
1446
|
+
# @param tenant [Object] Tenant ID
|
|
1447
|
+
# @param database [Object] Database name
|
|
1448
|
+
# @param collection_id [Object] UUID of the collection
|
|
1449
|
+
# @param [Hash] opts the optional parameters
|
|
1450
|
+
# @return [Collection]
|
|
1451
|
+
def get_collection(tenant, database, collection_id, opts = {})
|
|
1452
|
+
data, _status_code, _headers = get_collection_with_http_info(tenant, database, collection_id, opts)
|
|
1453
|
+
data
|
|
1454
|
+
end
|
|
1455
|
+
|
|
1456
|
+
# Retrieves a collection by ID or name.
|
|
1457
|
+
# @param tenant [Object] Tenant ID
|
|
1458
|
+
# @param database [Object] Database name
|
|
1459
|
+
# @param collection_id [Object] UUID of the collection
|
|
1460
|
+
# @param [Hash] opts the optional parameters
|
|
1461
|
+
# @return [Array<(Collection, Integer, Hash)>] Collection data, response status code and response headers
|
|
1462
|
+
def get_collection_with_http_info(tenant, database, collection_id, opts = {})
|
|
1463
|
+
if @api_client.config.debugging
|
|
1464
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_collection ...'
|
|
1465
|
+
end
|
|
1466
|
+
# verify the required parameter 'tenant' is set
|
|
1467
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1468
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.get_collection"
|
|
1469
|
+
end
|
|
1470
|
+
# verify the required parameter 'database' is set
|
|
1471
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1472
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.get_collection"
|
|
1473
|
+
end
|
|
1474
|
+
# verify the required parameter 'collection_id' is set
|
|
1475
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
1476
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.get_collection"
|
|
1477
|
+
end
|
|
1478
|
+
# resource path
|
|
1479
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
1480
|
+
|
|
1481
|
+
# query parameters
|
|
1482
|
+
query_params = opts[:query_params] || {}
|
|
1483
|
+
|
|
1484
|
+
# header parameters
|
|
1485
|
+
header_params = opts[:header_params] || {}
|
|
1486
|
+
# HTTP header 'Accept' (if needed)
|
|
1487
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1488
|
+
|
|
1489
|
+
# form parameters
|
|
1490
|
+
form_params = opts[:form_params] || {}
|
|
1491
|
+
|
|
1492
|
+
# http body (model)
|
|
1493
|
+
post_body = opts[:debug_body]
|
|
1494
|
+
|
|
1495
|
+
# return_type
|
|
1496
|
+
return_type = opts[:debug_return_type] || 'Collection'
|
|
1497
|
+
|
|
1498
|
+
# auth_names
|
|
1499
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1500
|
+
|
|
1501
|
+
new_options = opts.merge(
|
|
1502
|
+
:operation => :"DefaultApi.get_collection",
|
|
1503
|
+
:header_params => header_params,
|
|
1504
|
+
:query_params => query_params,
|
|
1505
|
+
:form_params => form_params,
|
|
1506
|
+
:body => post_body,
|
|
1507
|
+
:auth_names => auth_names,
|
|
1508
|
+
:return_type => return_type
|
|
1509
|
+
)
|
|
1510
|
+
|
|
1511
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1512
|
+
if @api_client.config.debugging
|
|
1513
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1514
|
+
end
|
|
1515
|
+
return data, status_code, headers
|
|
1516
|
+
end
|
|
1517
|
+
|
|
1518
|
+
# Retrieves a collection by Chroma Resource Name.
|
|
1519
|
+
# @param crn [Object] Chroma Resource Name
|
|
1520
|
+
# @param [Hash] opts the optional parameters
|
|
1521
|
+
# @return [Collection]
|
|
1522
|
+
def get_collection_by_crn(crn, opts = {})
|
|
1523
|
+
data, _status_code, _headers = get_collection_by_crn_with_http_info(crn, opts)
|
|
1524
|
+
data
|
|
1525
|
+
end
|
|
1526
|
+
|
|
1527
|
+
# Retrieves a collection by Chroma Resource Name.
|
|
1528
|
+
# @param crn [Object] Chroma Resource Name
|
|
1529
|
+
# @param [Hash] opts the optional parameters
|
|
1530
|
+
# @return [Array<(Collection, Integer, Hash)>] Collection data, response status code and response headers
|
|
1531
|
+
def get_collection_by_crn_with_http_info(crn, opts = {})
|
|
1532
|
+
if @api_client.config.debugging
|
|
1533
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_collection_by_crn ...'
|
|
1534
|
+
end
|
|
1535
|
+
# verify the required parameter 'crn' is set
|
|
1536
|
+
if @api_client.config.client_side_validation && crn.nil?
|
|
1537
|
+
fail ArgumentError, "Missing the required parameter 'crn' when calling DefaultApi.get_collection_by_crn"
|
|
1538
|
+
end
|
|
1539
|
+
# resource path
|
|
1540
|
+
local_var_path = '/api/v2/collections/{crn}'.sub('{' + 'crn' + '}', CGI.escape(crn.to_s))
|
|
1541
|
+
|
|
1542
|
+
# query parameters
|
|
1543
|
+
query_params = opts[:query_params] || {}
|
|
1544
|
+
|
|
1545
|
+
# header parameters
|
|
1546
|
+
header_params = opts[:header_params] || {}
|
|
1547
|
+
# HTTP header 'Accept' (if needed)
|
|
1548
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1549
|
+
|
|
1550
|
+
# form parameters
|
|
1551
|
+
form_params = opts[:form_params] || {}
|
|
1552
|
+
|
|
1553
|
+
# http body (model)
|
|
1554
|
+
post_body = opts[:debug_body]
|
|
1555
|
+
|
|
1556
|
+
# return_type
|
|
1557
|
+
return_type = opts[:debug_return_type] || 'Collection'
|
|
1558
|
+
|
|
1559
|
+
# auth_names
|
|
1560
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1561
|
+
|
|
1562
|
+
new_options = opts.merge(
|
|
1563
|
+
:operation => :"DefaultApi.get_collection_by_crn",
|
|
1564
|
+
:header_params => header_params,
|
|
1565
|
+
:query_params => query_params,
|
|
1566
|
+
:form_params => form_params,
|
|
1567
|
+
:body => post_body,
|
|
1568
|
+
:auth_names => auth_names,
|
|
1569
|
+
:return_type => return_type
|
|
1570
|
+
)
|
|
1571
|
+
|
|
1572
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1573
|
+
if @api_client.config.debugging
|
|
1574
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_collection_by_crn\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1575
|
+
end
|
|
1576
|
+
return data, status_code, headers
|
|
1577
|
+
end
|
|
1578
|
+
|
|
1579
|
+
# Retrieves a specific database by name.
|
|
1580
|
+
# @param tenant [Object] Tenant ID
|
|
1581
|
+
# @param database [Object] Name of the database to retrieve
|
|
1582
|
+
# @param [Hash] opts the optional parameters
|
|
1583
|
+
# @return [Database]
|
|
1584
|
+
def get_database(tenant, database, opts = {})
|
|
1585
|
+
data, _status_code, _headers = get_database_with_http_info(tenant, database, opts)
|
|
1586
|
+
data
|
|
1587
|
+
end
|
|
1588
|
+
|
|
1589
|
+
# Retrieves a specific database by name.
|
|
1590
|
+
# @param tenant [Object] Tenant ID
|
|
1591
|
+
# @param database [Object] Name of the database to retrieve
|
|
1592
|
+
# @param [Hash] opts the optional parameters
|
|
1593
|
+
# @return [Array<(Database, Integer, Hash)>] Database data, response status code and response headers
|
|
1594
|
+
def get_database_with_http_info(tenant, database, opts = {})
|
|
1595
|
+
if @api_client.config.debugging
|
|
1596
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_database ...'
|
|
1597
|
+
end
|
|
1598
|
+
# verify the required parameter 'tenant' is set
|
|
1599
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1600
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.get_database"
|
|
1601
|
+
end
|
|
1602
|
+
# verify the required parameter 'database' is set
|
|
1603
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1604
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.get_database"
|
|
1605
|
+
end
|
|
1606
|
+
# resource path
|
|
1607
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s))
|
|
1608
|
+
|
|
1609
|
+
# query parameters
|
|
1610
|
+
query_params = opts[:query_params] || {}
|
|
1611
|
+
|
|
1612
|
+
# header parameters
|
|
1613
|
+
header_params = opts[:header_params] || {}
|
|
1614
|
+
# HTTP header 'Accept' (if needed)
|
|
1615
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1616
|
+
|
|
1617
|
+
# form parameters
|
|
1618
|
+
form_params = opts[:form_params] || {}
|
|
1619
|
+
|
|
1620
|
+
# http body (model)
|
|
1621
|
+
post_body = opts[:debug_body]
|
|
1622
|
+
|
|
1623
|
+
# return_type
|
|
1624
|
+
return_type = opts[:debug_return_type] || 'Database'
|
|
1625
|
+
|
|
1626
|
+
# auth_names
|
|
1627
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1628
|
+
|
|
1629
|
+
new_options = opts.merge(
|
|
1630
|
+
:operation => :"DefaultApi.get_database",
|
|
1631
|
+
:header_params => header_params,
|
|
1632
|
+
:query_params => query_params,
|
|
1633
|
+
:form_params => form_params,
|
|
1634
|
+
:body => post_body,
|
|
1635
|
+
:auth_names => auth_names,
|
|
1636
|
+
:return_type => return_type
|
|
1637
|
+
)
|
|
1638
|
+
|
|
1639
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1640
|
+
if @api_client.config.debugging
|
|
1641
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_database\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1642
|
+
end
|
|
1643
|
+
return data, status_code, headers
|
|
1644
|
+
end
|
|
1645
|
+
|
|
1646
|
+
# Returns an existing tenant by name.
|
|
1647
|
+
# @param tenant_name [Object] Tenant to retrieve
|
|
1648
|
+
# @param [Hash] opts the optional parameters
|
|
1649
|
+
# @return [GetTenantResponse]
|
|
1650
|
+
def get_tenant(tenant_name, opts = {})
|
|
1651
|
+
data, _status_code, _headers = get_tenant_with_http_info(tenant_name, opts)
|
|
1652
|
+
data
|
|
1653
|
+
end
|
|
1654
|
+
|
|
1655
|
+
# Returns an existing tenant by name.
|
|
1656
|
+
# @param tenant_name [Object] Tenant to retrieve
|
|
1657
|
+
# @param [Hash] opts the optional parameters
|
|
1658
|
+
# @return [Array<(GetTenantResponse, Integer, Hash)>] GetTenantResponse data, response status code and response headers
|
|
1659
|
+
def get_tenant_with_http_info(tenant_name, opts = {})
|
|
1660
|
+
if @api_client.config.debugging
|
|
1661
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_tenant ...'
|
|
1662
|
+
end
|
|
1663
|
+
# verify the required parameter 'tenant_name' is set
|
|
1664
|
+
if @api_client.config.client_side_validation && tenant_name.nil?
|
|
1665
|
+
fail ArgumentError, "Missing the required parameter 'tenant_name' when calling DefaultApi.get_tenant"
|
|
1666
|
+
end
|
|
1667
|
+
# resource path
|
|
1668
|
+
local_var_path = '/api/v2/tenants/{tenant_name}'.sub('{' + 'tenant_name' + '}', CGI.escape(tenant_name.to_s))
|
|
1669
|
+
|
|
1670
|
+
# query parameters
|
|
1671
|
+
query_params = opts[:query_params] || {}
|
|
1672
|
+
|
|
1673
|
+
# header parameters
|
|
1674
|
+
header_params = opts[:header_params] || {}
|
|
1675
|
+
# HTTP header 'Accept' (if needed)
|
|
1676
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1677
|
+
|
|
1678
|
+
# form parameters
|
|
1679
|
+
form_params = opts[:form_params] || {}
|
|
1680
|
+
|
|
1681
|
+
# http body (model)
|
|
1682
|
+
post_body = opts[:debug_body]
|
|
1683
|
+
|
|
1684
|
+
# return_type
|
|
1685
|
+
return_type = opts[:debug_return_type] || 'GetTenantResponse'
|
|
1686
|
+
|
|
1687
|
+
# auth_names
|
|
1688
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1689
|
+
|
|
1690
|
+
new_options = opts.merge(
|
|
1691
|
+
:operation => :"DefaultApi.get_tenant",
|
|
1692
|
+
:header_params => header_params,
|
|
1693
|
+
:query_params => query_params,
|
|
1694
|
+
:form_params => form_params,
|
|
1695
|
+
:body => post_body,
|
|
1696
|
+
:auth_names => auth_names,
|
|
1697
|
+
:return_type => return_type
|
|
1698
|
+
)
|
|
1699
|
+
|
|
1700
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1701
|
+
if @api_client.config.debugging
|
|
1702
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_tenant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1703
|
+
end
|
|
1704
|
+
return data, status_code, headers
|
|
1705
|
+
end
|
|
1706
|
+
|
|
1707
|
+
# Retrieves the current user's identity, tenant, and databases.
|
|
1708
|
+
# @param [Hash] opts the optional parameters
|
|
1709
|
+
# @return [GetUserIdentityResponse]
|
|
1710
|
+
def get_user_identity(opts = {})
|
|
1711
|
+
data, _status_code, _headers = get_user_identity_with_http_info(opts)
|
|
1712
|
+
data
|
|
1713
|
+
end
|
|
1714
|
+
|
|
1715
|
+
# Retrieves the current user's identity, tenant, and databases.
|
|
1716
|
+
# @param [Hash] opts the optional parameters
|
|
1717
|
+
# @return [Array<(GetUserIdentityResponse, Integer, Hash)>] GetUserIdentityResponse data, response status code and response headers
|
|
1718
|
+
def get_user_identity_with_http_info(opts = {})
|
|
1719
|
+
if @api_client.config.debugging
|
|
1720
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_user_identity ...'
|
|
1721
|
+
end
|
|
1722
|
+
# resource path
|
|
1723
|
+
local_var_path = '/api/v2/auth/identity'
|
|
1724
|
+
|
|
1725
|
+
# query parameters
|
|
1726
|
+
query_params = opts[:query_params] || {}
|
|
1727
|
+
|
|
1728
|
+
# header parameters
|
|
1729
|
+
header_params = opts[:header_params] || {}
|
|
1730
|
+
# HTTP header 'Accept' (if needed)
|
|
1731
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1732
|
+
|
|
1733
|
+
# form parameters
|
|
1734
|
+
form_params = opts[:form_params] || {}
|
|
1735
|
+
|
|
1736
|
+
# http body (model)
|
|
1737
|
+
post_body = opts[:debug_body]
|
|
1738
|
+
|
|
1739
|
+
# return_type
|
|
1740
|
+
return_type = opts[:debug_return_type] || 'GetUserIdentityResponse'
|
|
1741
|
+
|
|
1742
|
+
# auth_names
|
|
1743
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1744
|
+
|
|
1745
|
+
new_options = opts.merge(
|
|
1746
|
+
:operation => :"DefaultApi.get_user_identity",
|
|
1747
|
+
:header_params => header_params,
|
|
1748
|
+
:query_params => query_params,
|
|
1749
|
+
:form_params => form_params,
|
|
1750
|
+
:body => post_body,
|
|
1751
|
+
:auth_names => auth_names,
|
|
1752
|
+
:return_type => return_type
|
|
1753
|
+
)
|
|
1754
|
+
|
|
1755
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1756
|
+
if @api_client.config.debugging
|
|
1757
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_user_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1758
|
+
end
|
|
1759
|
+
return data, status_code, headers
|
|
1760
|
+
end
|
|
1761
|
+
|
|
1762
|
+
# Health check endpoint that returns 200 if the server and executor are ready
|
|
1763
|
+
# @param [Hash] opts the optional parameters
|
|
1764
|
+
# @return [Object]
|
|
1765
|
+
def healthcheck(opts = {})
|
|
1766
|
+
data, _status_code, _headers = healthcheck_with_http_info(opts)
|
|
1767
|
+
data
|
|
1768
|
+
end
|
|
1769
|
+
|
|
1770
|
+
# Health check endpoint that returns 200 if the server and executor are ready
|
|
1771
|
+
# @param [Hash] opts the optional parameters
|
|
1772
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1773
|
+
def healthcheck_with_http_info(opts = {})
|
|
1774
|
+
if @api_client.config.debugging
|
|
1775
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.healthcheck ...'
|
|
1776
|
+
end
|
|
1777
|
+
# resource path
|
|
1778
|
+
local_var_path = '/api/v2/healthcheck'
|
|
1779
|
+
|
|
1780
|
+
# query parameters
|
|
1781
|
+
query_params = opts[:query_params] || {}
|
|
1782
|
+
|
|
1783
|
+
# header parameters
|
|
1784
|
+
header_params = opts[:header_params] || {}
|
|
1785
|
+
# HTTP header 'Accept' (if needed)
|
|
1786
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1787
|
+
|
|
1788
|
+
# form parameters
|
|
1789
|
+
form_params = opts[:form_params] || {}
|
|
1790
|
+
|
|
1791
|
+
# http body (model)
|
|
1792
|
+
post_body = opts[:debug_body]
|
|
1793
|
+
|
|
1794
|
+
# return_type
|
|
1795
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1796
|
+
|
|
1797
|
+
# auth_names
|
|
1798
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1799
|
+
|
|
1800
|
+
new_options = opts.merge(
|
|
1801
|
+
:operation => :"DefaultApi.healthcheck",
|
|
1802
|
+
:header_params => header_params,
|
|
1803
|
+
:query_params => query_params,
|
|
1804
|
+
:form_params => form_params,
|
|
1805
|
+
:body => post_body,
|
|
1806
|
+
:auth_names => auth_names,
|
|
1807
|
+
:return_type => return_type
|
|
1808
|
+
)
|
|
1809
|
+
|
|
1810
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1811
|
+
if @api_client.config.debugging
|
|
1812
|
+
@api_client.config.logger.debug "API called: DefaultApi#healthcheck\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1813
|
+
end
|
|
1814
|
+
return data, status_code, headers
|
|
1815
|
+
end
|
|
1816
|
+
|
|
1817
|
+
# Heartbeat endpoint that returns a nanosecond timestamp of the current time.
|
|
1818
|
+
# @param [Hash] opts the optional parameters
|
|
1819
|
+
# @return [HeartbeatResponse]
|
|
1820
|
+
def heartbeat(opts = {})
|
|
1821
|
+
data, _status_code, _headers = heartbeat_with_http_info(opts)
|
|
1822
|
+
data
|
|
1823
|
+
end
|
|
1824
|
+
|
|
1825
|
+
# Heartbeat endpoint that returns a nanosecond timestamp of the current time.
|
|
1826
|
+
# @param [Hash] opts the optional parameters
|
|
1827
|
+
# @return [Array<(HeartbeatResponse, Integer, Hash)>] HeartbeatResponse data, response status code and response headers
|
|
1828
|
+
def heartbeat_with_http_info(opts = {})
|
|
1829
|
+
if @api_client.config.debugging
|
|
1830
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.heartbeat ...'
|
|
1831
|
+
end
|
|
1832
|
+
# resource path
|
|
1833
|
+
local_var_path = '/api/v2/heartbeat'
|
|
1834
|
+
|
|
1835
|
+
# query parameters
|
|
1836
|
+
query_params = opts[:query_params] || {}
|
|
1837
|
+
|
|
1838
|
+
# header parameters
|
|
1839
|
+
header_params = opts[:header_params] || {}
|
|
1840
|
+
# HTTP header 'Accept' (if needed)
|
|
1841
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1842
|
+
|
|
1843
|
+
# form parameters
|
|
1844
|
+
form_params = opts[:form_params] || {}
|
|
1845
|
+
|
|
1846
|
+
# http body (model)
|
|
1847
|
+
post_body = opts[:debug_body]
|
|
1848
|
+
|
|
1849
|
+
# return_type
|
|
1850
|
+
return_type = opts[:debug_return_type] || 'HeartbeatResponse'
|
|
1851
|
+
|
|
1852
|
+
# auth_names
|
|
1853
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1854
|
+
|
|
1855
|
+
new_options = opts.merge(
|
|
1856
|
+
:operation => :"DefaultApi.heartbeat",
|
|
1857
|
+
:header_params => header_params,
|
|
1858
|
+
:query_params => query_params,
|
|
1859
|
+
:form_params => form_params,
|
|
1860
|
+
:body => post_body,
|
|
1861
|
+
:auth_names => auth_names,
|
|
1862
|
+
:return_type => return_type
|
|
1863
|
+
)
|
|
1864
|
+
|
|
1865
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1866
|
+
if @api_client.config.debugging
|
|
1867
|
+
@api_client.config.logger.debug "API called: DefaultApi#heartbeat\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1868
|
+
end
|
|
1869
|
+
return data, status_code, headers
|
|
1870
|
+
end
|
|
1871
|
+
|
|
1872
|
+
# Lists all collections in the specified database.
|
|
1873
|
+
# @param tenant [Object] Tenant ID
|
|
1874
|
+
# @param database [Object] Database name to list collections from
|
|
1875
|
+
# @param [Hash] opts the optional parameters
|
|
1876
|
+
# @option opts [Object] :limit Limit for pagination
|
|
1877
|
+
# @option opts [Object] :offset Offset for pagination
|
|
1878
|
+
# @return [Object]
|
|
1879
|
+
def list_collections(tenant, database, opts = {})
|
|
1880
|
+
data, _status_code, _headers = list_collections_with_http_info(tenant, database, opts)
|
|
1881
|
+
data
|
|
1882
|
+
end
|
|
1883
|
+
|
|
1884
|
+
# Lists all collections in the specified database.
|
|
1885
|
+
# @param tenant [Object] Tenant ID
|
|
1886
|
+
# @param database [Object] Database name to list collections from
|
|
1887
|
+
# @param [Hash] opts the optional parameters
|
|
1888
|
+
# @option opts [Object] :limit Limit for pagination
|
|
1889
|
+
# @option opts [Object] :offset Offset for pagination
|
|
1890
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1891
|
+
def list_collections_with_http_info(tenant, database, opts = {})
|
|
1892
|
+
if @api_client.config.debugging
|
|
1893
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_collections ...'
|
|
1894
|
+
end
|
|
1895
|
+
# verify the required parameter 'tenant' is set
|
|
1896
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1897
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.list_collections"
|
|
1898
|
+
end
|
|
1899
|
+
# verify the required parameter 'database' is set
|
|
1900
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
1901
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.list_collections"
|
|
1902
|
+
end
|
|
1903
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
|
|
1904
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_collections, must be greater than or equal to 0.'
|
|
1905
|
+
end
|
|
1906
|
+
|
|
1907
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1908
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DefaultApi.list_collections, must be greater than or equal to 0.'
|
|
1909
|
+
end
|
|
1910
|
+
|
|
1911
|
+
# resource path
|
|
1912
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s))
|
|
1913
|
+
|
|
1914
|
+
# query parameters
|
|
1915
|
+
query_params = opts[:query_params] || {}
|
|
1916
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1917
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1918
|
+
|
|
1919
|
+
# header parameters
|
|
1920
|
+
header_params = opts[:header_params] || {}
|
|
1921
|
+
# HTTP header 'Accept' (if needed)
|
|
1922
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1923
|
+
|
|
1924
|
+
# form parameters
|
|
1925
|
+
form_params = opts[:form_params] || {}
|
|
1926
|
+
|
|
1927
|
+
# http body (model)
|
|
1928
|
+
post_body = opts[:debug_body]
|
|
1929
|
+
|
|
1930
|
+
# return_type
|
|
1931
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1932
|
+
|
|
1933
|
+
# auth_names
|
|
1934
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1935
|
+
|
|
1936
|
+
new_options = opts.merge(
|
|
1937
|
+
:operation => :"DefaultApi.list_collections",
|
|
1938
|
+
:header_params => header_params,
|
|
1939
|
+
:query_params => query_params,
|
|
1940
|
+
:form_params => form_params,
|
|
1941
|
+
:body => post_body,
|
|
1942
|
+
:auth_names => auth_names,
|
|
1943
|
+
:return_type => return_type
|
|
1944
|
+
)
|
|
1945
|
+
|
|
1946
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1947
|
+
if @api_client.config.debugging
|
|
1948
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_collections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1949
|
+
end
|
|
1950
|
+
return data, status_code, headers
|
|
1951
|
+
end
|
|
1952
|
+
|
|
1953
|
+
# Lists all databases for a given tenant.
|
|
1954
|
+
# @param tenant [Object] Tenant ID to list databases for
|
|
1955
|
+
# @param [Hash] opts the optional parameters
|
|
1956
|
+
# @option opts [Object] :limit Limit for pagination
|
|
1957
|
+
# @option opts [Object] :offset Offset for pagination
|
|
1958
|
+
# @return [Object]
|
|
1959
|
+
def list_databases(tenant, opts = {})
|
|
1960
|
+
data, _status_code, _headers = list_databases_with_http_info(tenant, opts)
|
|
1961
|
+
data
|
|
1962
|
+
end
|
|
1963
|
+
|
|
1964
|
+
# Lists all databases for a given tenant.
|
|
1965
|
+
# @param tenant [Object] Tenant ID to list databases for
|
|
1966
|
+
# @param [Hash] opts the optional parameters
|
|
1967
|
+
# @option opts [Object] :limit Limit for pagination
|
|
1968
|
+
# @option opts [Object] :offset Offset for pagination
|
|
1969
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1970
|
+
def list_databases_with_http_info(tenant, opts = {})
|
|
1971
|
+
if @api_client.config.debugging
|
|
1972
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_databases ...'
|
|
1973
|
+
end
|
|
1974
|
+
# verify the required parameter 'tenant' is set
|
|
1975
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1976
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.list_databases"
|
|
1977
|
+
end
|
|
1978
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
|
|
1979
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_databases, must be greater than or equal to 0.'
|
|
1980
|
+
end
|
|
1981
|
+
|
|
1982
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
1983
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling DefaultApi.list_databases, must be greater than or equal to 0.'
|
|
1984
|
+
end
|
|
1985
|
+
|
|
1986
|
+
# resource path
|
|
1987
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
1988
|
+
|
|
1989
|
+
# query parameters
|
|
1990
|
+
query_params = opts[:query_params] || {}
|
|
1991
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1992
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1993
|
+
|
|
1994
|
+
# header parameters
|
|
1995
|
+
header_params = opts[:header_params] || {}
|
|
1996
|
+
# HTTP header 'Accept' (if needed)
|
|
1997
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1998
|
+
|
|
1999
|
+
# form parameters
|
|
2000
|
+
form_params = opts[:form_params] || {}
|
|
2001
|
+
|
|
2002
|
+
# http body (model)
|
|
2003
|
+
post_body = opts[:debug_body]
|
|
2004
|
+
|
|
2005
|
+
# return_type
|
|
2006
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2007
|
+
|
|
2008
|
+
# auth_names
|
|
2009
|
+
auth_names = opts[:debug_auth_names] || []
|
|
2010
|
+
|
|
2011
|
+
new_options = opts.merge(
|
|
2012
|
+
:operation => :"DefaultApi.list_databases",
|
|
2013
|
+
:header_params => header_params,
|
|
2014
|
+
:query_params => query_params,
|
|
2015
|
+
:form_params => form_params,
|
|
2016
|
+
:body => post_body,
|
|
2017
|
+
:auth_names => auth_names,
|
|
2018
|
+
:return_type => return_type
|
|
2019
|
+
)
|
|
2020
|
+
|
|
2021
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2022
|
+
if @api_client.config.debugging
|
|
2023
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_databases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2024
|
+
end
|
|
2025
|
+
return data, status_code, headers
|
|
2026
|
+
end
|
|
2027
|
+
|
|
2028
|
+
# Pre-flight checks endpoint reporting basic readiness info.
|
|
2029
|
+
# @param [Hash] opts the optional parameters
|
|
2030
|
+
# @return [ChecklistResponse]
|
|
2031
|
+
def pre_flight_checks(opts = {})
|
|
2032
|
+
data, _status_code, _headers = pre_flight_checks_with_http_info(opts)
|
|
2033
|
+
data
|
|
2034
|
+
end
|
|
2035
|
+
|
|
2036
|
+
# Pre-flight checks endpoint reporting basic readiness info.
|
|
2037
|
+
# @param [Hash] opts the optional parameters
|
|
2038
|
+
# @return [Array<(ChecklistResponse, Integer, Hash)>] ChecklistResponse data, response status code and response headers
|
|
2039
|
+
def pre_flight_checks_with_http_info(opts = {})
|
|
2040
|
+
if @api_client.config.debugging
|
|
2041
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.pre_flight_checks ...'
|
|
2042
|
+
end
|
|
2043
|
+
# resource path
|
|
2044
|
+
local_var_path = '/api/v2/pre-flight-checks'
|
|
2045
|
+
|
|
2046
|
+
# query parameters
|
|
2047
|
+
query_params = opts[:query_params] || {}
|
|
2048
|
+
|
|
2049
|
+
# header parameters
|
|
2050
|
+
header_params = opts[:header_params] || {}
|
|
2051
|
+
# HTTP header 'Accept' (if needed)
|
|
2052
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2053
|
+
|
|
2054
|
+
# form parameters
|
|
2055
|
+
form_params = opts[:form_params] || {}
|
|
2056
|
+
|
|
2057
|
+
# http body (model)
|
|
2058
|
+
post_body = opts[:debug_body]
|
|
2059
|
+
|
|
2060
|
+
# return_type
|
|
2061
|
+
return_type = opts[:debug_return_type] || 'ChecklistResponse'
|
|
2062
|
+
|
|
2063
|
+
# auth_names
|
|
2064
|
+
auth_names = opts[:debug_auth_names] || []
|
|
2065
|
+
|
|
2066
|
+
new_options = opts.merge(
|
|
2067
|
+
:operation => :"DefaultApi.pre_flight_checks",
|
|
2068
|
+
:header_params => header_params,
|
|
2069
|
+
:query_params => query_params,
|
|
2070
|
+
:form_params => form_params,
|
|
2071
|
+
:body => post_body,
|
|
2072
|
+
:auth_names => auth_names,
|
|
2073
|
+
:return_type => return_type
|
|
2074
|
+
)
|
|
2075
|
+
|
|
2076
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2077
|
+
if @api_client.config.debugging
|
|
2078
|
+
@api_client.config.logger.debug "API called: DefaultApi#pre_flight_checks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2079
|
+
end
|
|
2080
|
+
return data, status_code, headers
|
|
2081
|
+
end
|
|
2082
|
+
|
|
2083
|
+
# Reset endpoint allowing authorized users to reset the database.
|
|
2084
|
+
# @param [Hash] opts the optional parameters
|
|
2085
|
+
# @return [Object]
|
|
2086
|
+
def reset(opts = {})
|
|
2087
|
+
data, _status_code, _headers = reset_with_http_info(opts)
|
|
2088
|
+
data
|
|
2089
|
+
end
|
|
2090
|
+
|
|
2091
|
+
# Reset endpoint allowing authorized users to reset the database.
|
|
2092
|
+
# @param [Hash] opts the optional parameters
|
|
2093
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2094
|
+
def reset_with_http_info(opts = {})
|
|
2095
|
+
if @api_client.config.debugging
|
|
2096
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.reset ...'
|
|
2097
|
+
end
|
|
2098
|
+
# resource path
|
|
2099
|
+
local_var_path = '/api/v2/reset'
|
|
2100
|
+
|
|
2101
|
+
# query parameters
|
|
2102
|
+
query_params = opts[:query_params] || {}
|
|
2103
|
+
|
|
2104
|
+
# header parameters
|
|
2105
|
+
header_params = opts[:header_params] || {}
|
|
2106
|
+
# HTTP header 'Accept' (if needed)
|
|
2107
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json'])
|
|
2108
|
+
|
|
2109
|
+
# form parameters
|
|
2110
|
+
form_params = opts[:form_params] || {}
|
|
2111
|
+
|
|
2112
|
+
# http body (model)
|
|
2113
|
+
post_body = opts[:debug_body]
|
|
2114
|
+
|
|
2115
|
+
# return_type
|
|
2116
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2117
|
+
|
|
2118
|
+
# auth_names
|
|
2119
|
+
auth_names = opts[:debug_auth_names] || []
|
|
2120
|
+
|
|
2121
|
+
new_options = opts.merge(
|
|
2122
|
+
:operation => :"DefaultApi.reset",
|
|
2123
|
+
:header_params => header_params,
|
|
2124
|
+
:query_params => query_params,
|
|
2125
|
+
:form_params => form_params,
|
|
2126
|
+
:body => post_body,
|
|
2127
|
+
:auth_names => auth_names,
|
|
2128
|
+
:return_type => return_type
|
|
2129
|
+
)
|
|
2130
|
+
|
|
2131
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2132
|
+
if @api_client.config.debugging
|
|
2133
|
+
@api_client.config.logger.debug "API called: DefaultApi#reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2134
|
+
end
|
|
2135
|
+
return data, status_code, headers
|
|
2136
|
+
end
|
|
2137
|
+
|
|
2138
|
+
# Updates an existing collection's name or metadata.
|
|
2139
|
+
# @param tenant [Object] Tenant ID
|
|
2140
|
+
# @param database [Object] Database name
|
|
2141
|
+
# @param collection_id [Object] UUID of the collection to update
|
|
2142
|
+
# @param update_collection_payload [UpdateCollectionPayload]
|
|
2143
|
+
# @param [Hash] opts the optional parameters
|
|
2144
|
+
# @return [Object]
|
|
2145
|
+
def update_collection(tenant, database, collection_id, update_collection_payload, opts = {})
|
|
2146
|
+
data, _status_code, _headers = update_collection_with_http_info(tenant, database, collection_id, update_collection_payload, opts)
|
|
2147
|
+
data
|
|
2148
|
+
end
|
|
2149
|
+
|
|
2150
|
+
# Updates an existing collection's name or metadata.
|
|
2151
|
+
# @param tenant [Object] Tenant ID
|
|
2152
|
+
# @param database [Object] Database name
|
|
2153
|
+
# @param collection_id [Object] UUID of the collection to update
|
|
2154
|
+
# @param update_collection_payload [UpdateCollectionPayload]
|
|
2155
|
+
# @param [Hash] opts the optional parameters
|
|
2156
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2157
|
+
def update_collection_with_http_info(tenant, database, collection_id, update_collection_payload, opts = {})
|
|
2158
|
+
if @api_client.config.debugging
|
|
2159
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.update_collection ...'
|
|
2160
|
+
end
|
|
2161
|
+
# verify the required parameter 'tenant' is set
|
|
2162
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
2163
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling DefaultApi.update_collection"
|
|
2164
|
+
end
|
|
2165
|
+
# verify the required parameter 'database' is set
|
|
2166
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
2167
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling DefaultApi.update_collection"
|
|
2168
|
+
end
|
|
2169
|
+
# verify the required parameter 'collection_id' is set
|
|
2170
|
+
if @api_client.config.client_side_validation && collection_id.nil?
|
|
2171
|
+
fail ArgumentError, "Missing the required parameter 'collection_id' when calling DefaultApi.update_collection"
|
|
2172
|
+
end
|
|
2173
|
+
# verify the required parameter 'update_collection_payload' is set
|
|
2174
|
+
if @api_client.config.client_side_validation && update_collection_payload.nil?
|
|
2175
|
+
fail ArgumentError, "Missing the required parameter 'update_collection_payload' when calling DefaultApi.update_collection"
|
|
2176
|
+
end
|
|
2177
|
+
# resource path
|
|
2178
|
+
local_var_path = '/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'collection_id' + '}', CGI.escape(collection_id.to_s))
|
|
2179
|
+
|
|
2180
|
+
# query parameters
|
|
2181
|
+
query_params = opts[:query_params] || {}
|
|
2182
|
+
|
|
2183
|
+
# header parameters
|
|
2184
|
+
header_params = opts[:header_params] || {}
|
|
2185
|
+
# HTTP header 'Accept' (if needed)
|
|
2186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2187
|
+
# HTTP header 'Content-Type'
|
|
2188
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2189
|
+
if !content_type.nil?
|
|
2190
|
+
header_params['Content-Type'] = content_type
|
|
2191
|
+
end
|
|
2192
|
+
|
|
2193
|
+
# form parameters
|
|
2194
|
+
form_params = opts[:form_params] || {}
|
|
2195
|
+
|
|
2196
|
+
# http body (model)
|
|
2197
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_collection_payload)
|
|
2198
|
+
|
|
2199
|
+
# return_type
|
|
2200
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2201
|
+
|
|
2202
|
+
# auth_names
|
|
2203
|
+
auth_names = opts[:debug_auth_names] || []
|
|
2204
|
+
|
|
2205
|
+
new_options = opts.merge(
|
|
2206
|
+
:operation => :"DefaultApi.update_collection",
|
|
2207
|
+
:header_params => header_params,
|
|
2208
|
+
:query_params => query_params,
|
|
2209
|
+
:form_params => form_params,
|
|
2210
|
+
:body => post_body,
|
|
2211
|
+
:auth_names => auth_names,
|
|
2212
|
+
:return_type => return_type
|
|
2213
|
+
)
|
|
2214
|
+
|
|
2215
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2216
|
+
if @api_client.config.debugging
|
|
2217
|
+
@api_client.config.logger.debug "API called: DefaultApi#update_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2218
|
+
end
|
|
2219
|
+
return data, status_code, headers
|
|
2220
|
+
end
|
|
2221
|
+
|
|
2222
|
+
# Updates an existing tenant by name.
|
|
2223
|
+
# @param tenant_name [Object] Tenant to update
|
|
2224
|
+
# @param update_tenant_payload [UpdateTenantPayload]
|
|
2225
|
+
# @param [Hash] opts the optional parameters
|
|
2226
|
+
# @return [Object]
|
|
2227
|
+
def update_tenant(tenant_name, update_tenant_payload, opts = {})
|
|
2228
|
+
data, _status_code, _headers = update_tenant_with_http_info(tenant_name, update_tenant_payload, opts)
|
|
2229
|
+
data
|
|
2230
|
+
end
|
|
2231
|
+
|
|
2232
|
+
# Updates an existing tenant by name.
|
|
2233
|
+
# @param tenant_name [Object] Tenant to update
|
|
2234
|
+
# @param update_tenant_payload [UpdateTenantPayload]
|
|
2235
|
+
# @param [Hash] opts the optional parameters
|
|
2236
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2237
|
+
def update_tenant_with_http_info(tenant_name, update_tenant_payload, opts = {})
|
|
2238
|
+
if @api_client.config.debugging
|
|
2239
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.update_tenant ...'
|
|
2240
|
+
end
|
|
2241
|
+
# verify the required parameter 'tenant_name' is set
|
|
2242
|
+
if @api_client.config.client_side_validation && tenant_name.nil?
|
|
2243
|
+
fail ArgumentError, "Missing the required parameter 'tenant_name' when calling DefaultApi.update_tenant"
|
|
2244
|
+
end
|
|
2245
|
+
# verify the required parameter 'update_tenant_payload' is set
|
|
2246
|
+
if @api_client.config.client_side_validation && update_tenant_payload.nil?
|
|
2247
|
+
fail ArgumentError, "Missing the required parameter 'update_tenant_payload' when calling DefaultApi.update_tenant"
|
|
2248
|
+
end
|
|
2249
|
+
# resource path
|
|
2250
|
+
local_var_path = '/api/v2/tenants/{tenant_name}'.sub('{' + 'tenant_name' + '}', CGI.escape(tenant_name.to_s))
|
|
2251
|
+
|
|
2252
|
+
# query parameters
|
|
2253
|
+
query_params = opts[:query_params] || {}
|
|
2254
|
+
|
|
2255
|
+
# header parameters
|
|
2256
|
+
header_params = opts[:header_params] || {}
|
|
2257
|
+
# HTTP header 'Accept' (if needed)
|
|
2258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2259
|
+
# HTTP header 'Content-Type'
|
|
2260
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2261
|
+
if !content_type.nil?
|
|
2262
|
+
header_params['Content-Type'] = content_type
|
|
2263
|
+
end
|
|
2264
|
+
|
|
2265
|
+
# form parameters
|
|
2266
|
+
form_params = opts[:form_params] || {}
|
|
2267
|
+
|
|
2268
|
+
# http body (model)
|
|
2269
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_tenant_payload)
|
|
2270
|
+
|
|
2271
|
+
# return_type
|
|
2272
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2273
|
+
|
|
2274
|
+
# auth_names
|
|
2275
|
+
auth_names = opts[:debug_auth_names] || []
|
|
2276
|
+
|
|
2277
|
+
new_options = opts.merge(
|
|
2278
|
+
:operation => :"DefaultApi.update_tenant",
|
|
2279
|
+
:header_params => header_params,
|
|
2280
|
+
:query_params => query_params,
|
|
2281
|
+
:form_params => form_params,
|
|
2282
|
+
:body => post_body,
|
|
2283
|
+
:auth_names => auth_names,
|
|
2284
|
+
:return_type => return_type
|
|
2285
|
+
)
|
|
2286
|
+
|
|
2287
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
2288
|
+
if @api_client.config.debugging
|
|
2289
|
+
@api_client.config.logger.debug "API called: DefaultApi#update_tenant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2290
|
+
end
|
|
2291
|
+
return data, status_code, headers
|
|
2292
|
+
end
|
|
2293
|
+
|
|
2294
|
+
# Returns the version of the server.
|
|
2295
|
+
# @param [Hash] opts the optional parameters
|
|
2296
|
+
# @return [Object]
|
|
2297
|
+
def version(opts = {})
|
|
2298
|
+
data, _status_code, _headers = version_with_http_info(opts)
|
|
2299
|
+
data
|
|
2300
|
+
end
|
|
2301
|
+
|
|
2302
|
+
# Returns the version of the server.
|
|
2303
|
+
# @param [Hash] opts the optional parameters
|
|
2304
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
2305
|
+
def version_with_http_info(opts = {})
|
|
2306
|
+
if @api_client.config.debugging
|
|
2307
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.version ...'
|
|
2308
|
+
end
|
|
2309
|
+
# resource path
|
|
2310
|
+
local_var_path = '/api/v2/version'
|
|
2311
|
+
|
|
2312
|
+
# query parameters
|
|
2313
|
+
query_params = opts[:query_params] || {}
|
|
2314
|
+
|
|
2315
|
+
# header parameters
|
|
2316
|
+
header_params = opts[:header_params] || {}
|
|
2317
|
+
# HTTP header 'Accept' (if needed)
|
|
2318
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
|
|
2319
|
+
|
|
2320
|
+
# form parameters
|
|
2321
|
+
form_params = opts[:form_params] || {}
|
|
2322
|
+
|
|
2323
|
+
# http body (model)
|
|
2324
|
+
post_body = opts[:debug_body]
|
|
2325
|
+
|
|
2326
|
+
# return_type
|
|
2327
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
2328
|
+
|
|
2329
|
+
# auth_names
|
|
2330
|
+
auth_names = opts[:debug_auth_names] || []
|
|
2331
|
+
|
|
2332
|
+
new_options = opts.merge(
|
|
2333
|
+
:operation => :"DefaultApi.version",
|
|
2334
|
+
:header_params => header_params,
|
|
2335
|
+
:query_params => query_params,
|
|
2336
|
+
:form_params => form_params,
|
|
2337
|
+
:body => post_body,
|
|
2338
|
+
:auth_names => auth_names,
|
|
2339
|
+
:return_type => return_type
|
|
2340
|
+
)
|
|
2341
|
+
|
|
2342
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2343
|
+
if @api_client.config.debugging
|
|
2344
|
+
@api_client.config.logger.debug "API called: DefaultApi#version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2345
|
+
end
|
|
2346
|
+
return data, status_code, headers
|
|
2347
|
+
end
|
|
2348
|
+
end
|
|
2349
|
+
end
|