hatchet-sdk 0.13.0 → 0.13.2
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 +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +15 -0
- data/lib/hatchet/clients/rest/README.md +26 -6
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/api_token_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/concurrency_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/sandbox_provider_api.rb +474 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/api_token.rb +16 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/create_api_token_request.rb +32 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_role.rb +321 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_role_list.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/token_capability.rb +341 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/token_capability_list.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_key.rb +1 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_strategy.rb +1 -1
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_concurrency_totals.rb +320 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_sandbox_provider_request.rb +393 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider.rb +486 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event.rb +374 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event_kind.rb +46 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_event_list.rb +239 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_kind.rb +44 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_sandbox_provider_status.rb +242 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_sandbox_provider_request.rb +329 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +15 -0
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet/worker/durable_event_listener.rb +7 -7
- metadata +17 -2
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hatchet API
|
|
3
|
+
|
|
4
|
+
#The Hatchet API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module HatchetSdkRest
|
|
16
|
+
class SandboxProviderApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Sandbox Provider
|
|
23
|
+
# Create a sandbox provider for the tenant. Requires the sandbox operator entitlement.
|
|
24
|
+
# @param tenant [String] The tenant id
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [V1CreateSandboxProviderRequest] :v1_create_sandbox_provider_request
|
|
27
|
+
# @return [V1SandboxProvider]
|
|
28
|
+
def v1_sandbox_provider_create(tenant, opts = {})
|
|
29
|
+
data, _status_code, _headers = v1_sandbox_provider_create_with_http_info(tenant, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create Sandbox Provider
|
|
34
|
+
# Create a sandbox provider for the tenant. Requires the sandbox operator entitlement.
|
|
35
|
+
# @param tenant [String] The tenant id
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [V1CreateSandboxProviderRequest] :v1_create_sandbox_provider_request
|
|
38
|
+
# @return [Array<(V1SandboxProvider, Integer, Hash)>] V1SandboxProvider data, response status code and response headers
|
|
39
|
+
def v1_sandbox_provider_create_with_http_info(tenant, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: SandboxProviderApi.v1_sandbox_provider_create ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'tenant' is set
|
|
44
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling SandboxProviderApi.v1_sandbox_provider_create"
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
48
|
+
fail ArgumentError, 'invalid value for "tenant" when calling SandboxProviderApi.v1_sandbox_provider_create, the character length must be smaller than or equal to 36.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
52
|
+
fail ArgumentError, 'invalid value for "tenant" when calling SandboxProviderApi.v1_sandbox_provider_create, the character length must be greater than or equal to 36.'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/sandbox/providers'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
57
|
+
|
|
58
|
+
# query parameters
|
|
59
|
+
query_params = opts[:query_params] || {}
|
|
60
|
+
|
|
61
|
+
# header parameters
|
|
62
|
+
header_params = opts[:header_params] || {}
|
|
63
|
+
# HTTP header 'Accept' (if needed)
|
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
65
|
+
# HTTP header 'Content-Type'
|
|
66
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
67
|
+
if !content_type.nil?
|
|
68
|
+
header_params['Content-Type'] = content_type
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# form parameters
|
|
72
|
+
form_params = opts[:form_params] || {}
|
|
73
|
+
|
|
74
|
+
# http body (model)
|
|
75
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v1_create_sandbox_provider_request'])
|
|
76
|
+
|
|
77
|
+
# return_type
|
|
78
|
+
return_type = opts[:debug_return_type] || 'V1SandboxProvider'
|
|
79
|
+
|
|
80
|
+
# auth_names
|
|
81
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
82
|
+
|
|
83
|
+
new_options = opts.merge(
|
|
84
|
+
:operation => :"SandboxProviderApi.v1_sandbox_provider_create",
|
|
85
|
+
:header_params => header_params,
|
|
86
|
+
:query_params => query_params,
|
|
87
|
+
:form_params => form_params,
|
|
88
|
+
:body => post_body,
|
|
89
|
+
:auth_names => auth_names,
|
|
90
|
+
:return_type => return_type
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug "API called: SandboxProviderApi#v1_sandbox_provider_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
96
|
+
end
|
|
97
|
+
return data, status_code, headers
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete Sandbox Provider
|
|
101
|
+
# Delete a sandbox provider and every sandbox and snapshot on it. Machines at the sandbox provider are not touched.
|
|
102
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [V1SandboxProvider]
|
|
105
|
+
def v1_sandbox_provider_delete(v1_sandbox_provider, opts = {})
|
|
106
|
+
data, _status_code, _headers = v1_sandbox_provider_delete_with_http_info(v1_sandbox_provider, opts)
|
|
107
|
+
data
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Delete Sandbox Provider
|
|
111
|
+
# Delete a sandbox provider and every sandbox and snapshot on it. Machines at the sandbox provider are not touched.
|
|
112
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Array<(V1SandboxProvider, Integer, Hash)>] V1SandboxProvider data, response status code and response headers
|
|
115
|
+
def v1_sandbox_provider_delete_with_http_info(v1_sandbox_provider, opts = {})
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: SandboxProviderApi.v1_sandbox_provider_delete ...'
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'v1_sandbox_provider' is set
|
|
120
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'v1_sandbox_provider' when calling SandboxProviderApi.v1_sandbox_provider_delete"
|
|
122
|
+
end
|
|
123
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length > 36
|
|
124
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_delete, the character length must be smaller than or equal to 36.'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length < 36
|
|
128
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_delete, the character length must be greater than or equal to 36.'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# resource path
|
|
132
|
+
local_var_path = '/api/v1/stable/sandbox/providers/{v1-sandbox-provider}'.sub('{' + 'v1-sandbox-provider' + '}', CGI.escape(v1_sandbox_provider.to_s))
|
|
133
|
+
|
|
134
|
+
# query parameters
|
|
135
|
+
query_params = opts[:query_params] || {}
|
|
136
|
+
|
|
137
|
+
# header parameters
|
|
138
|
+
header_params = opts[:header_params] || {}
|
|
139
|
+
# HTTP header 'Accept' (if needed)
|
|
140
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = opts[:form_params] || {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = opts[:debug_body]
|
|
147
|
+
|
|
148
|
+
# return_type
|
|
149
|
+
return_type = opts[:debug_return_type] || 'V1SandboxProvider'
|
|
150
|
+
|
|
151
|
+
# auth_names
|
|
152
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
153
|
+
|
|
154
|
+
new_options = opts.merge(
|
|
155
|
+
:operation => :"SandboxProviderApi.v1_sandbox_provider_delete",
|
|
156
|
+
:header_params => header_params,
|
|
157
|
+
:query_params => query_params,
|
|
158
|
+
:form_params => form_params,
|
|
159
|
+
:body => post_body,
|
|
160
|
+
:auth_names => auth_names,
|
|
161
|
+
:return_type => return_type
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug "API called: SandboxProviderApi#v1_sandbox_provider_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
167
|
+
end
|
|
168
|
+
return data, status_code, headers
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# List Sandbox Provider Events
|
|
172
|
+
# List what the sandbox operator observed about the provider, newest first, within the tenant's retention window.
|
|
173
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @option opts [Integer] :limit The number of events to return, at most 500. Defaults to 100.
|
|
176
|
+
# @option opts [Time] :since Only return events created after this time
|
|
177
|
+
# @return [V1SandboxProviderEventList]
|
|
178
|
+
def v1_sandbox_provider_events_list(v1_sandbox_provider, opts = {})
|
|
179
|
+
data, _status_code, _headers = v1_sandbox_provider_events_list_with_http_info(v1_sandbox_provider, opts)
|
|
180
|
+
data
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# List Sandbox Provider Events
|
|
184
|
+
# List what the sandbox operator observed about the provider, newest first, within the tenant's retention window.
|
|
185
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @option opts [Integer] :limit The number of events to return, at most 500. Defaults to 100.
|
|
188
|
+
# @option opts [Time] :since Only return events created after this time
|
|
189
|
+
# @return [Array<(V1SandboxProviderEventList, Integer, Hash)>] V1SandboxProviderEventList data, response status code and response headers
|
|
190
|
+
def v1_sandbox_provider_events_list_with_http_info(v1_sandbox_provider, opts = {})
|
|
191
|
+
if @api_client.config.debugging
|
|
192
|
+
@api_client.config.logger.debug 'Calling API: SandboxProviderApi.v1_sandbox_provider_events_list ...'
|
|
193
|
+
end
|
|
194
|
+
# verify the required parameter 'v1_sandbox_provider' is set
|
|
195
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.nil?
|
|
196
|
+
fail ArgumentError, "Missing the required parameter 'v1_sandbox_provider' when calling SandboxProviderApi.v1_sandbox_provider_events_list"
|
|
197
|
+
end
|
|
198
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length > 36
|
|
199
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_events_list, the character length must be smaller than or equal to 36.'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length < 36
|
|
203
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_events_list, the character length must be greater than or equal to 36.'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# resource path
|
|
207
|
+
local_var_path = '/api/v1/stable/sandbox/providers/{v1-sandbox-provider}/events'.sub('{' + 'v1-sandbox-provider' + '}', CGI.escape(v1_sandbox_provider.to_s))
|
|
208
|
+
|
|
209
|
+
# query parameters
|
|
210
|
+
query_params = opts[:query_params] || {}
|
|
211
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
212
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
213
|
+
|
|
214
|
+
# header parameters
|
|
215
|
+
header_params = opts[:header_params] || {}
|
|
216
|
+
# HTTP header 'Accept' (if needed)
|
|
217
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
218
|
+
|
|
219
|
+
# form parameters
|
|
220
|
+
form_params = opts[:form_params] || {}
|
|
221
|
+
|
|
222
|
+
# http body (model)
|
|
223
|
+
post_body = opts[:debug_body]
|
|
224
|
+
|
|
225
|
+
# return_type
|
|
226
|
+
return_type = opts[:debug_return_type] || 'V1SandboxProviderEventList'
|
|
227
|
+
|
|
228
|
+
# auth_names
|
|
229
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
230
|
+
|
|
231
|
+
new_options = opts.merge(
|
|
232
|
+
:operation => :"SandboxProviderApi.v1_sandbox_provider_events_list",
|
|
233
|
+
:header_params => header_params,
|
|
234
|
+
:query_params => query_params,
|
|
235
|
+
:form_params => form_params,
|
|
236
|
+
:body => post_body,
|
|
237
|
+
:auth_names => auth_names,
|
|
238
|
+
:return_type => return_type
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug "API called: SandboxProviderApi#v1_sandbox_provider_events_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
244
|
+
end
|
|
245
|
+
return data, status_code, headers
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Get Sandbox Provider
|
|
249
|
+
# Get a sandbox provider
|
|
250
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
251
|
+
# @param [Hash] opts the optional parameters
|
|
252
|
+
# @return [V1SandboxProvider]
|
|
253
|
+
def v1_sandbox_provider_get(v1_sandbox_provider, opts = {})
|
|
254
|
+
data, _status_code, _headers = v1_sandbox_provider_get_with_http_info(v1_sandbox_provider, opts)
|
|
255
|
+
data
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Get Sandbox Provider
|
|
259
|
+
# Get a sandbox provider
|
|
260
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
261
|
+
# @param [Hash] opts the optional parameters
|
|
262
|
+
# @return [Array<(V1SandboxProvider, Integer, Hash)>] V1SandboxProvider data, response status code and response headers
|
|
263
|
+
def v1_sandbox_provider_get_with_http_info(v1_sandbox_provider, opts = {})
|
|
264
|
+
if @api_client.config.debugging
|
|
265
|
+
@api_client.config.logger.debug 'Calling API: SandboxProviderApi.v1_sandbox_provider_get ...'
|
|
266
|
+
end
|
|
267
|
+
# verify the required parameter 'v1_sandbox_provider' is set
|
|
268
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.nil?
|
|
269
|
+
fail ArgumentError, "Missing the required parameter 'v1_sandbox_provider' when calling SandboxProviderApi.v1_sandbox_provider_get"
|
|
270
|
+
end
|
|
271
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length > 36
|
|
272
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_get, the character length must be smaller than or equal to 36.'
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length < 36
|
|
276
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_get, the character length must be greater than or equal to 36.'
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# resource path
|
|
280
|
+
local_var_path = '/api/v1/stable/sandbox/providers/{v1-sandbox-provider}'.sub('{' + 'v1-sandbox-provider' + '}', CGI.escape(v1_sandbox_provider.to_s))
|
|
281
|
+
|
|
282
|
+
# query parameters
|
|
283
|
+
query_params = opts[:query_params] || {}
|
|
284
|
+
|
|
285
|
+
# header parameters
|
|
286
|
+
header_params = opts[:header_params] || {}
|
|
287
|
+
# HTTP header 'Accept' (if needed)
|
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
289
|
+
|
|
290
|
+
# form parameters
|
|
291
|
+
form_params = opts[:form_params] || {}
|
|
292
|
+
|
|
293
|
+
# http body (model)
|
|
294
|
+
post_body = opts[:debug_body]
|
|
295
|
+
|
|
296
|
+
# return_type
|
|
297
|
+
return_type = opts[:debug_return_type] || 'V1SandboxProvider'
|
|
298
|
+
|
|
299
|
+
# auth_names
|
|
300
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
301
|
+
|
|
302
|
+
new_options = opts.merge(
|
|
303
|
+
:operation => :"SandboxProviderApi.v1_sandbox_provider_get",
|
|
304
|
+
:header_params => header_params,
|
|
305
|
+
:query_params => query_params,
|
|
306
|
+
:form_params => form_params,
|
|
307
|
+
:body => post_body,
|
|
308
|
+
:auth_names => auth_names,
|
|
309
|
+
:return_type => return_type
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: SandboxProviderApi#v1_sandbox_provider_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# List Sandbox Providers
|
|
320
|
+
# List the sandbox providers of the tenant
|
|
321
|
+
# @param tenant [String] The tenant id
|
|
322
|
+
# @param [Hash] opts the optional parameters
|
|
323
|
+
# @option opts [Integer] :offset The number to skip
|
|
324
|
+
# @option opts [Integer] :limit The number to limit by
|
|
325
|
+
# @return [V1SandboxProviderList]
|
|
326
|
+
def v1_sandbox_provider_list(tenant, opts = {})
|
|
327
|
+
data, _status_code, _headers = v1_sandbox_provider_list_with_http_info(tenant, opts)
|
|
328
|
+
data
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# List Sandbox Providers
|
|
332
|
+
# List the sandbox providers of the tenant
|
|
333
|
+
# @param tenant [String] The tenant id
|
|
334
|
+
# @param [Hash] opts the optional parameters
|
|
335
|
+
# @option opts [Integer] :offset The number to skip
|
|
336
|
+
# @option opts [Integer] :limit The number to limit by
|
|
337
|
+
# @return [Array<(V1SandboxProviderList, Integer, Hash)>] V1SandboxProviderList data, response status code and response headers
|
|
338
|
+
def v1_sandbox_provider_list_with_http_info(tenant, opts = {})
|
|
339
|
+
if @api_client.config.debugging
|
|
340
|
+
@api_client.config.logger.debug 'Calling API: SandboxProviderApi.v1_sandbox_provider_list ...'
|
|
341
|
+
end
|
|
342
|
+
# verify the required parameter 'tenant' is set
|
|
343
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
344
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling SandboxProviderApi.v1_sandbox_provider_list"
|
|
345
|
+
end
|
|
346
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
347
|
+
fail ArgumentError, 'invalid value for "tenant" when calling SandboxProviderApi.v1_sandbox_provider_list, the character length must be smaller than or equal to 36.'
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
351
|
+
fail ArgumentError, 'invalid value for "tenant" when calling SandboxProviderApi.v1_sandbox_provider_list, the character length must be greater than or equal to 36.'
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# resource path
|
|
355
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/sandbox/providers'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
356
|
+
|
|
357
|
+
# query parameters
|
|
358
|
+
query_params = opts[:query_params] || {}
|
|
359
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
360
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
361
|
+
|
|
362
|
+
# header parameters
|
|
363
|
+
header_params = opts[:header_params] || {}
|
|
364
|
+
# HTTP header 'Accept' (if needed)
|
|
365
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
366
|
+
|
|
367
|
+
# form parameters
|
|
368
|
+
form_params = opts[:form_params] || {}
|
|
369
|
+
|
|
370
|
+
# http body (model)
|
|
371
|
+
post_body = opts[:debug_body]
|
|
372
|
+
|
|
373
|
+
# return_type
|
|
374
|
+
return_type = opts[:debug_return_type] || 'V1SandboxProviderList'
|
|
375
|
+
|
|
376
|
+
# auth_names
|
|
377
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
378
|
+
|
|
379
|
+
new_options = opts.merge(
|
|
380
|
+
:operation => :"SandboxProviderApi.v1_sandbox_provider_list",
|
|
381
|
+
:header_params => header_params,
|
|
382
|
+
:query_params => query_params,
|
|
383
|
+
:form_params => form_params,
|
|
384
|
+
:body => post_body,
|
|
385
|
+
:auth_names => auth_names,
|
|
386
|
+
:return_type => return_type
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
390
|
+
if @api_client.config.debugging
|
|
391
|
+
@api_client.config.logger.debug "API called: SandboxProviderApi#v1_sandbox_provider_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
392
|
+
end
|
|
393
|
+
return data, status_code, headers
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Update Sandbox Provider
|
|
397
|
+
# Update a sandbox provider
|
|
398
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
399
|
+
# @param [Hash] opts the optional parameters
|
|
400
|
+
# @option opts [V1UpdateSandboxProviderRequest] :v1_update_sandbox_provider_request
|
|
401
|
+
# @return [V1SandboxProvider]
|
|
402
|
+
def v1_sandbox_provider_update(v1_sandbox_provider, opts = {})
|
|
403
|
+
data, _status_code, _headers = v1_sandbox_provider_update_with_http_info(v1_sandbox_provider, opts)
|
|
404
|
+
data
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Update Sandbox Provider
|
|
408
|
+
# Update a sandbox provider
|
|
409
|
+
# @param v1_sandbox_provider [String] The sandbox provider id
|
|
410
|
+
# @param [Hash] opts the optional parameters
|
|
411
|
+
# @option opts [V1UpdateSandboxProviderRequest] :v1_update_sandbox_provider_request
|
|
412
|
+
# @return [Array<(V1SandboxProvider, Integer, Hash)>] V1SandboxProvider data, response status code and response headers
|
|
413
|
+
def v1_sandbox_provider_update_with_http_info(v1_sandbox_provider, opts = {})
|
|
414
|
+
if @api_client.config.debugging
|
|
415
|
+
@api_client.config.logger.debug 'Calling API: SandboxProviderApi.v1_sandbox_provider_update ...'
|
|
416
|
+
end
|
|
417
|
+
# verify the required parameter 'v1_sandbox_provider' is set
|
|
418
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.nil?
|
|
419
|
+
fail ArgumentError, "Missing the required parameter 'v1_sandbox_provider' when calling SandboxProviderApi.v1_sandbox_provider_update"
|
|
420
|
+
end
|
|
421
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length > 36
|
|
422
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_update, the character length must be smaller than or equal to 36.'
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if @api_client.config.client_side_validation && v1_sandbox_provider.to_s.length < 36
|
|
426
|
+
fail ArgumentError, 'invalid value for "v1_sandbox_provider" when calling SandboxProviderApi.v1_sandbox_provider_update, the character length must be greater than or equal to 36.'
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# resource path
|
|
430
|
+
local_var_path = '/api/v1/stable/sandbox/providers/{v1-sandbox-provider}'.sub('{' + 'v1-sandbox-provider' + '}', CGI.escape(v1_sandbox_provider.to_s))
|
|
431
|
+
|
|
432
|
+
# query parameters
|
|
433
|
+
query_params = opts[:query_params] || {}
|
|
434
|
+
|
|
435
|
+
# header parameters
|
|
436
|
+
header_params = opts[:header_params] || {}
|
|
437
|
+
# HTTP header 'Accept' (if needed)
|
|
438
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
439
|
+
# HTTP header 'Content-Type'
|
|
440
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
441
|
+
if !content_type.nil?
|
|
442
|
+
header_params['Content-Type'] = content_type
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# form parameters
|
|
446
|
+
form_params = opts[:form_params] || {}
|
|
447
|
+
|
|
448
|
+
# http body (model)
|
|
449
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'v1_update_sandbox_provider_request'])
|
|
450
|
+
|
|
451
|
+
# return_type
|
|
452
|
+
return_type = opts[:debug_return_type] || 'V1SandboxProvider'
|
|
453
|
+
|
|
454
|
+
# auth_names
|
|
455
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
456
|
+
|
|
457
|
+
new_options = opts.merge(
|
|
458
|
+
:operation => :"SandboxProviderApi.v1_sandbox_provider_update",
|
|
459
|
+
:header_params => header_params,
|
|
460
|
+
:query_params => query_params,
|
|
461
|
+
:form_params => form_params,
|
|
462
|
+
:body => post_body,
|
|
463
|
+
:auth_names => auth_names,
|
|
464
|
+
:return_type => return_type
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
468
|
+
if @api_client.config.debugging
|
|
469
|
+
@api_client.config.logger.debug "API called: SandboxProviderApi#v1_sandbox_provider_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
470
|
+
end
|
|
471
|
+
return data, status_code, headers
|
|
472
|
+
end
|
|
473
|
+
end
|
|
474
|
+
end
|
|
@@ -1508,6 +1508,77 @@ module HatchetSdkRest
|
|
|
1508
1508
|
return data, status_code, headers
|
|
1509
1509
|
end
|
|
1510
1510
|
|
|
1511
|
+
# List tenant roles
|
|
1512
|
+
# List the roles a tenant member can hold, with the operations each allows
|
|
1513
|
+
# @param tenant [String] The tenant id
|
|
1514
|
+
# @param [Hash] opts the optional parameters
|
|
1515
|
+
# @return [TenantRoleList]
|
|
1516
|
+
def tenant_role_list(tenant, opts = {})
|
|
1517
|
+
data, _status_code, _headers = tenant_role_list_with_http_info(tenant, opts)
|
|
1518
|
+
data
|
|
1519
|
+
end
|
|
1520
|
+
|
|
1521
|
+
# List tenant roles
|
|
1522
|
+
# List the roles a tenant member can hold, with the operations each allows
|
|
1523
|
+
# @param tenant [String] The tenant id
|
|
1524
|
+
# @param [Hash] opts the optional parameters
|
|
1525
|
+
# @return [Array<(TenantRoleList, Integer, Hash)>] TenantRoleList data, response status code and response headers
|
|
1526
|
+
def tenant_role_list_with_http_info(tenant, opts = {})
|
|
1527
|
+
if @api_client.config.debugging
|
|
1528
|
+
@api_client.config.logger.debug 'Calling API: TenantApi.tenant_role_list ...'
|
|
1529
|
+
end
|
|
1530
|
+
# verify the required parameter 'tenant' is set
|
|
1531
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
1532
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling TenantApi.tenant_role_list"
|
|
1533
|
+
end
|
|
1534
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
1535
|
+
fail ArgumentError, 'invalid value for "tenant" when calling TenantApi.tenant_role_list, the character length must be smaller than or equal to 36.'
|
|
1536
|
+
end
|
|
1537
|
+
|
|
1538
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
1539
|
+
fail ArgumentError, 'invalid value for "tenant" when calling TenantApi.tenant_role_list, the character length must be greater than or equal to 36.'
|
|
1540
|
+
end
|
|
1541
|
+
|
|
1542
|
+
# resource path
|
|
1543
|
+
local_var_path = '/api/v1/tenants/{tenant}/roles'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
1544
|
+
|
|
1545
|
+
# query parameters
|
|
1546
|
+
query_params = opts[:query_params] || {}
|
|
1547
|
+
|
|
1548
|
+
# header parameters
|
|
1549
|
+
header_params = opts[:header_params] || {}
|
|
1550
|
+
# HTTP header 'Accept' (if needed)
|
|
1551
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1552
|
+
|
|
1553
|
+
# form parameters
|
|
1554
|
+
form_params = opts[:form_params] || {}
|
|
1555
|
+
|
|
1556
|
+
# http body (model)
|
|
1557
|
+
post_body = opts[:debug_body]
|
|
1558
|
+
|
|
1559
|
+
# return_type
|
|
1560
|
+
return_type = opts[:debug_return_type] || 'TenantRoleList'
|
|
1561
|
+
|
|
1562
|
+
# auth_names
|
|
1563
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
1564
|
+
|
|
1565
|
+
new_options = opts.merge(
|
|
1566
|
+
:operation => :"TenantApi.tenant_role_list",
|
|
1567
|
+
:header_params => header_params,
|
|
1568
|
+
:query_params => query_params,
|
|
1569
|
+
:form_params => form_params,
|
|
1570
|
+
:body => post_body,
|
|
1571
|
+
:auth_names => auth_names,
|
|
1572
|
+
:return_type => return_type
|
|
1573
|
+
)
|
|
1574
|
+
|
|
1575
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1576
|
+
if @api_client.config.debugging
|
|
1577
|
+
@api_client.config.logger.debug "API called: TenantApi#tenant_role_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1578
|
+
end
|
|
1579
|
+
return data, status_code, headers
|
|
1580
|
+
end
|
|
1581
|
+
|
|
1511
1582
|
# Update tenant
|
|
1512
1583
|
# Update an existing tenant
|
|
1513
1584
|
# @param tenant [String] The tenant id
|
|
@@ -26,13 +26,17 @@ module HatchetSdkRest
|
|
|
26
26
|
# When the API token expires.
|
|
27
27
|
attr_accessor :expires_at
|
|
28
28
|
|
|
29
|
+
# The capabilities the token holds, which grant REST operations and gRPC procedures. Tokens created without capabilities hold \"all\", or \"read-only\" if they are read-only.
|
|
30
|
+
attr_accessor :capabilities
|
|
31
|
+
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
33
|
def self.attribute_map
|
|
31
34
|
{
|
|
32
35
|
:'metadata' => :'metadata',
|
|
33
36
|
:'name' => :'name',
|
|
34
37
|
:'read_only' => :'readOnly',
|
|
35
|
-
:'expires_at' => :'expiresAt'
|
|
38
|
+
:'expires_at' => :'expiresAt',
|
|
39
|
+
:'capabilities' => :'capabilities'
|
|
36
40
|
}
|
|
37
41
|
end
|
|
38
42
|
|
|
@@ -52,7 +56,8 @@ module HatchetSdkRest
|
|
|
52
56
|
:'metadata' => :'APIResourceMeta',
|
|
53
57
|
:'name' => :'String',
|
|
54
58
|
:'read_only' => :'Boolean',
|
|
55
|
-
:'expires_at' => :'Time'
|
|
59
|
+
:'expires_at' => :'Time',
|
|
60
|
+
:'capabilities' => :'Array<String>'
|
|
56
61
|
}
|
|
57
62
|
end
|
|
58
63
|
|
|
@@ -101,6 +106,12 @@ module HatchetSdkRest
|
|
|
101
106
|
else
|
|
102
107
|
self.expires_at = nil
|
|
103
108
|
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'capabilities')
|
|
111
|
+
if (value = attributes[:'capabilities']).is_a?(Array)
|
|
112
|
+
self.capabilities = value
|
|
113
|
+
end
|
|
114
|
+
end
|
|
104
115
|
end
|
|
105
116
|
|
|
106
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -195,7 +206,8 @@ module HatchetSdkRest
|
|
|
195
206
|
metadata == o.metadata &&
|
|
196
207
|
name == o.name &&
|
|
197
208
|
read_only == o.read_only &&
|
|
198
|
-
expires_at == o.expires_at
|
|
209
|
+
expires_at == o.expires_at &&
|
|
210
|
+
capabilities == o.capabilities
|
|
199
211
|
end
|
|
200
212
|
|
|
201
213
|
# @see the `==` method
|
|
@@ -207,7 +219,7 @@ module HatchetSdkRest
|
|
|
207
219
|
# Calculates hash code according to all attributes.
|
|
208
220
|
# @return [Integer] Hash code
|
|
209
221
|
def hash
|
|
210
|
-
[metadata, name, read_only, expires_at].hash
|
|
222
|
+
[metadata, name, read_only, expires_at, capabilities].hash
|
|
211
223
|
end
|
|
212
224
|
|
|
213
225
|
# Builds the object from hash
|