smplkit 3.0.81 → 3.0.83
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/lib/smplkit/_generated/audit/lib/smplkit_audit_client/api/forwarders_api.rb +5 -5
- data/lib/smplkit/_generated/audit/lib/smplkit_audit_client/models/forwarder_delivery.rb +31 -31
- data/lib/smplkit/_generated/audit/spec/api/forwarders_api_spec.rb +2 -2
- data/lib/smplkit/_generated/audit/spec/models/forwarder_delivery_spec.rb +2 -2
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/jobs_api.rb +420 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb +281 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/usage_api.rb +82 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api_client.rb +441 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api_error.rb +58 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api_model_base.rb +88 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/configuration.rb +392 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/http_header.rb +220 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job.rb +401 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_create_request.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_create_resource.rb +237 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_http_configuration.rb +368 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_list_response.rb +193 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_request.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_resource.rb +186 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/job_response.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/list_meta.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/pagination_meta.rb +215 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run.rb +405 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_links.rb +149 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_meta.rb +166 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_list_response.rb +203 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_resource.rb +202 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/run_response.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/usage.rb +274 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/usage_resource.rb +187 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/models/usage_response.rb +165 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/version.rb +15 -0
- data/lib/smplkit/_generated/jobs/lib/smplkit_jobs_client.rb +63 -0
- data/lib/smplkit/_generated/jobs/spec/api/jobs_api_spec.rb +111 -0
- data/lib/smplkit/_generated/jobs/spec/api/runs_api_spec.rb +85 -0
- data/lib/smplkit/_generated/jobs/spec/api/usage_api_spec.rb +47 -0
- data/lib/smplkit/_generated/jobs/spec/models/http_header_spec.rb +42 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_create_request_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_create_resource_spec.rb +52 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_http_configuration_spec.rb +82 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_list_response_spec.rb +42 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_request_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_resource_spec.rb +48 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_response_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/job_spec.rb +110 -0
- data/lib/smplkit/_generated/jobs/spec/models/list_meta_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/pagination_meta_spec.rb +54 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_list_links_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_list_meta_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_list_response_spec.rb +48 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_resource_spec.rb +48 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_response_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/run_spec.rb +138 -0
- data/lib/smplkit/_generated/jobs/spec/models/usage_resource_spec.rb +48 -0
- data/lib/smplkit/_generated/jobs/spec/models/usage_response_spec.rb +36 -0
- data/lib/smplkit/_generated/jobs/spec/models/usage_spec.rb +60 -0
- data/lib/smplkit/_generated/jobs/spec/spec_helper.rb +111 -0
- metadata +54 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c306fbb8f49cc593c4988f4717f10ad634ff28c768b87e132ce8a9e15395962
|
|
4
|
+
data.tar.gz: 10ad1f6409a137133bb63f43f856e48022ca3d6cddd398a5d1aa15e6d8b026b4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2469ab35543347240453b9e90f8913f638049730052e1b306a139cda51ea6fbc5de85abcc3842bb3dfb1691bc089151205799cdac2feff6027b6eb5c07da860
|
|
7
|
+
data.tar.gz: 5f8aa745f79295e3cb7df2280432a5eae1cacde66ad510b639b7409ccbda84065a73c333255dbf62a464b32123608f9bb5265d708ea79afe4de63c49edb6cae7
|
|
@@ -280,12 +280,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
280
280
|
end
|
|
281
281
|
|
|
282
282
|
# List Forwarder Deliveries
|
|
283
|
-
# List delivery log entries for a forwarder. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `
|
|
283
|
+
# List delivery log entries for a forwarder. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `event`, or by a `created_at` range using interval notation (e.g. `[2026-01-01T00:00:00Z,*)`).
|
|
284
284
|
# @param forwarder_id [String]
|
|
285
285
|
# @param [Hash] opts the optional parameters
|
|
286
286
|
# @option opts [String] :filter_status
|
|
287
287
|
# @option opts [String] :filter_created_at
|
|
288
|
-
# @option opts [String] :
|
|
288
|
+
# @option opts [String] :filter_event
|
|
289
289
|
# @option opts [Integer] :page_size
|
|
290
290
|
# @option opts [String] :page_after
|
|
291
291
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-created_at`. Allowed values: `created_at`, `-created_at`. (default to '-created_at')
|
|
@@ -296,12 +296,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
# List Forwarder Deliveries
|
|
299
|
-
# List delivery log entries for a forwarder. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `
|
|
299
|
+
# List delivery log entries for a forwarder. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `event`, or by a `created_at` range using interval notation (e.g. `[2026-01-01T00:00:00Z,*)`).
|
|
300
300
|
# @param forwarder_id [String]
|
|
301
301
|
# @param [Hash] opts the optional parameters
|
|
302
302
|
# @option opts [String] :filter_status
|
|
303
303
|
# @option opts [String] :filter_created_at
|
|
304
|
-
# @option opts [String] :
|
|
304
|
+
# @option opts [String] :filter_event
|
|
305
305
|
# @option opts [Integer] :page_size
|
|
306
306
|
# @option opts [String] :page_after
|
|
307
307
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-created_at`. Allowed values: `created_at`, `-created_at`. (default to '-created_at')
|
|
@@ -329,7 +329,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
329
329
|
query_params = opts[:query_params] || {}
|
|
330
330
|
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
|
331
331
|
query_params[:'filter[created_at]'] = opts[:'filter_created_at'] if !opts[:'filter_created_at'].nil?
|
|
332
|
-
query_params[:'filter[
|
|
332
|
+
query_params[:'filter[event]'] = opts[:'filter_event'] if !opts[:'filter_event'].nil?
|
|
333
333
|
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
334
334
|
query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil?
|
|
335
335
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
@@ -17,10 +17,10 @@ module SmplkitGeneratedClient::Audit
|
|
|
17
17
|
# A log entry for one attempt to deliver an event to a forwarder.
|
|
18
18
|
class ForwarderDelivery < ApiModelBase
|
|
19
19
|
# Forwarder the delivery belongs to.
|
|
20
|
-
attr_accessor :
|
|
20
|
+
attr_accessor :forwarder
|
|
21
21
|
|
|
22
22
|
# Event that was being delivered.
|
|
23
|
-
attr_accessor :
|
|
23
|
+
attr_accessor :event
|
|
24
24
|
|
|
25
25
|
# 1 for the initial delivery, incremented for each retry.
|
|
26
26
|
attr_accessor :attempt_number
|
|
@@ -71,8 +71,8 @@ module SmplkitGeneratedClient::Audit
|
|
|
71
71
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
72
72
|
def self.attribute_map
|
|
73
73
|
{
|
|
74
|
-
:'
|
|
75
|
-
:'
|
|
74
|
+
:'forwarder' => :'forwarder',
|
|
75
|
+
:'event' => :'event',
|
|
76
76
|
:'attempt_number' => :'attempt_number',
|
|
77
77
|
:'status' => :'status',
|
|
78
78
|
:'request' => :'request',
|
|
@@ -97,8 +97,8 @@ module SmplkitGeneratedClient::Audit
|
|
|
97
97
|
# Attribute type mapping.
|
|
98
98
|
def self.openapi_types
|
|
99
99
|
{
|
|
100
|
-
:'
|
|
101
|
-
:'
|
|
100
|
+
:'forwarder' => :'String',
|
|
101
|
+
:'event' => :'String',
|
|
102
102
|
:'attempt_number' => :'Integer',
|
|
103
103
|
:'status' => :'String',
|
|
104
104
|
:'request' => :'Hash<String, Object>',
|
|
@@ -138,16 +138,16 @@ module SmplkitGeneratedClient::Audit
|
|
|
138
138
|
h[k.to_sym] = v
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
if attributes.key?(:'
|
|
142
|
-
self.
|
|
141
|
+
if attributes.key?(:'forwarder')
|
|
142
|
+
self.forwarder = attributes[:'forwarder']
|
|
143
143
|
else
|
|
144
|
-
self.
|
|
144
|
+
self.forwarder = nil
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
if attributes.key?(:'
|
|
148
|
-
self.
|
|
147
|
+
if attributes.key?(:'event')
|
|
148
|
+
self.event = attributes[:'event']
|
|
149
149
|
else
|
|
150
|
-
self.
|
|
150
|
+
self.event = nil
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
if attributes.key?(:'attempt_number')
|
|
@@ -194,12 +194,12 @@ module SmplkitGeneratedClient::Audit
|
|
|
194
194
|
def list_invalid_properties
|
|
195
195
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
196
196
|
invalid_properties = Array.new
|
|
197
|
-
if @
|
|
198
|
-
invalid_properties.push('invalid value for "
|
|
197
|
+
if @forwarder.nil?
|
|
198
|
+
invalid_properties.push('invalid value for "forwarder", forwarder cannot be nil.')
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
-
if @
|
|
202
|
-
invalid_properties.push('invalid value for "
|
|
201
|
+
if @event.nil?
|
|
202
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
203
203
|
end
|
|
204
204
|
|
|
205
205
|
if @attempt_number.nil?
|
|
@@ -217,8 +217,8 @@ module SmplkitGeneratedClient::Audit
|
|
|
217
217
|
# @return true if the model is valid
|
|
218
218
|
def valid?
|
|
219
219
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
220
|
-
return false if @
|
|
221
|
-
return false if @
|
|
220
|
+
return false if @forwarder.nil?
|
|
221
|
+
return false if @event.nil?
|
|
222
222
|
return false if @attempt_number.nil?
|
|
223
223
|
return false if @status.nil?
|
|
224
224
|
status_validator = EnumAttributeValidator.new('String', ["SUCCEEDED", "FAILED"])
|
|
@@ -227,23 +227,23 @@ module SmplkitGeneratedClient::Audit
|
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
# Custom attribute writer method with validation
|
|
230
|
-
# @param [Object]
|
|
231
|
-
def
|
|
232
|
-
if
|
|
233
|
-
fail ArgumentError, '
|
|
230
|
+
# @param [Object] forwarder Value to be assigned
|
|
231
|
+
def forwarder=(forwarder)
|
|
232
|
+
if forwarder.nil?
|
|
233
|
+
fail ArgumentError, 'forwarder cannot be nil'
|
|
234
234
|
end
|
|
235
235
|
|
|
236
|
-
@
|
|
236
|
+
@forwarder = forwarder
|
|
237
237
|
end
|
|
238
238
|
|
|
239
239
|
# Custom attribute writer method with validation
|
|
240
|
-
# @param [Object]
|
|
241
|
-
def
|
|
242
|
-
if
|
|
243
|
-
fail ArgumentError, '
|
|
240
|
+
# @param [Object] event Value to be assigned
|
|
241
|
+
def event=(event)
|
|
242
|
+
if event.nil?
|
|
243
|
+
fail ArgumentError, 'event cannot be nil'
|
|
244
244
|
end
|
|
245
245
|
|
|
246
|
-
@
|
|
246
|
+
@event = event
|
|
247
247
|
end
|
|
248
248
|
|
|
249
249
|
# Custom attribute writer method with validation
|
|
@@ -271,8 +271,8 @@ module SmplkitGeneratedClient::Audit
|
|
|
271
271
|
def ==(o)
|
|
272
272
|
return true if self.equal?(o)
|
|
273
273
|
self.class == o.class &&
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
forwarder == o.forwarder &&
|
|
275
|
+
event == o.event &&
|
|
276
276
|
attempt_number == o.attempt_number &&
|
|
277
277
|
status == o.status &&
|
|
278
278
|
request == o.request &&
|
|
@@ -292,7 +292,7 @@ module SmplkitGeneratedClient::Audit
|
|
|
292
292
|
# Calculates hash code according to all attributes.
|
|
293
293
|
# @return [Integer] Hash code
|
|
294
294
|
def hash
|
|
295
|
-
[
|
|
295
|
+
[forwarder, event, attempt_number, status, request, response_status, response_body, latency_ms, error, created_at].hash
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
# Builds the object from hash
|
|
@@ -82,12 +82,12 @@ describe 'ForwardersApi' do
|
|
|
82
82
|
|
|
83
83
|
# unit tests for list_forwarder_deliveries
|
|
84
84
|
# List Forwarder Deliveries
|
|
85
|
-
# List delivery log entries for a forwarder. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `
|
|
85
|
+
# List delivery log entries for a forwarder. Default sort is `-created_at` (newest first). Filter by `status` (`SUCCEEDED` or `FAILED`, case-insensitive), by `event`, or by a `created_at` range using interval notation (e.g. `[2026-01-01T00:00:00Z,*)`).
|
|
86
86
|
# @param forwarder_id
|
|
87
87
|
# @param [Hash] opts the optional parameters
|
|
88
88
|
# @option opts [String] :filter_status
|
|
89
89
|
# @option opts [String] :filter_created_at
|
|
90
|
-
# @option opts [String] :
|
|
90
|
+
# @option opts [String] :filter_event
|
|
91
91
|
# @option opts [Integer] :page_size
|
|
92
92
|
# @option opts [String] :page_after
|
|
93
93
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-created_at`. Allowed values: `created_at`, `-created_at`.
|
|
@@ -27,13 +27,13 @@ describe SmplkitGeneratedClient::Audit::ForwarderDelivery do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "forwarder"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
describe 'test attribute "
|
|
36
|
+
describe 'test attribute "event"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
39
|
end
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Jobs API
|
|
3
|
+
|
|
4
|
+
#Scheduled HTTP job execution API for smplkit.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module SmplkitGeneratedClient::Jobs
|
|
16
|
+
class JobsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Job
|
|
23
|
+
# Create a job for this account. The caller supplies the job's id (a slug) as `data.id`. Slugs are unique within an account and immutable. An enabled job begins scheduling immediately.
|
|
24
|
+
# @param job_create_request [JobCreateRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [JobResponse]
|
|
27
|
+
def create_job(job_create_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_job_with_http_info(job_create_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Job
|
|
33
|
+
# Create a job for this account. The caller supplies the job's id (a slug) as `data.id`. Slugs are unique within an account and immutable. An enabled job begins scheduling immediately.
|
|
34
|
+
# @param job_create_request [JobCreateRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(JobResponse, Integer, Hash)>] JobResponse data, response status code and response headers
|
|
37
|
+
def create_job_with_http_info(job_create_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.create_job ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'job_create_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && job_create_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'job_create_request' when calling JobsApi.create_job"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/v1/jobs'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(job_create_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'JobResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"JobsApi.create_job",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: JobsApi#create_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Delete Job
|
|
91
|
+
# Delete a job. Its run history is retained; the slug may be reused later.
|
|
92
|
+
# @param job_id [String]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def delete_job(job_id, opts = {})
|
|
96
|
+
delete_job_with_http_info(job_id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete Job
|
|
101
|
+
# Delete a job. Its run history is retained; the slug may be reused later.
|
|
102
|
+
# @param job_id [String]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def delete_job_with_http_info(job_id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.delete_job ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'job_id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobsApi.delete_job"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/api/v1/jobs/{job_id}'.sub('{job_id}', CGI.escape(job_id.to_s))
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type]
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"JobsApi.delete_job",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: JobsApi#delete_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Get Job
|
|
152
|
+
# Retrieve a single job by its id (slug).
|
|
153
|
+
# @param job_id [String]
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [JobResponse]
|
|
156
|
+
def get_job(job_id, opts = {})
|
|
157
|
+
data, _status_code, _headers = get_job_with_http_info(job_id, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Get Job
|
|
162
|
+
# Retrieve a single job by its id (slug).
|
|
163
|
+
# @param job_id [String]
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Array<(JobResponse, Integer, Hash)>] JobResponse data, response status code and response headers
|
|
166
|
+
def get_job_with_http_info(job_id, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.get_job ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'job_id' is set
|
|
171
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobsApi.get_job"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/api/v1/jobs/{job_id}'.sub('{job_id}', CGI.escape(job_id.to_s))
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
184
|
+
|
|
185
|
+
# form parameters
|
|
186
|
+
form_params = opts[:form_params] || {}
|
|
187
|
+
|
|
188
|
+
# http body (model)
|
|
189
|
+
post_body = opts[:debug_body]
|
|
190
|
+
|
|
191
|
+
# return_type
|
|
192
|
+
return_type = opts[:debug_return_type] || 'JobResponse'
|
|
193
|
+
|
|
194
|
+
# auth_names
|
|
195
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
196
|
+
|
|
197
|
+
new_options = opts.merge(
|
|
198
|
+
:operation => :"JobsApi.get_job",
|
|
199
|
+
:header_params => header_params,
|
|
200
|
+
:query_params => query_params,
|
|
201
|
+
:form_params => form_params,
|
|
202
|
+
:body => post_body,
|
|
203
|
+
:auth_names => auth_names,
|
|
204
|
+
:return_type => return_type
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
208
|
+
if @api_client.config.debugging
|
|
209
|
+
@api_client.config.logger.debug "API called: JobsApi#get_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
210
|
+
end
|
|
211
|
+
return data, status_code, headers
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# List Jobs
|
|
215
|
+
# List this account's jobs, newest first.
|
|
216
|
+
# @param [Hash] opts the optional parameters
|
|
217
|
+
# @option opts [Boolean] :filter_enabled
|
|
218
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
219
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
220
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
221
|
+
# @return [JobListResponse]
|
|
222
|
+
def list_jobs(opts = {})
|
|
223
|
+
data, _status_code, _headers = list_jobs_with_http_info(opts)
|
|
224
|
+
data
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# List Jobs
|
|
228
|
+
# List this account's jobs, newest first.
|
|
229
|
+
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @option opts [Boolean] :filter_enabled
|
|
231
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
232
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
233
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
234
|
+
# @return [Array<(JobListResponse, Integer, Hash)>] JobListResponse data, response status code and response headers
|
|
235
|
+
def list_jobs_with_http_info(opts = {})
|
|
236
|
+
if @api_client.config.debugging
|
|
237
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.list_jobs ...'
|
|
238
|
+
end
|
|
239
|
+
# resource path
|
|
240
|
+
local_var_path = '/api/v1/jobs'
|
|
241
|
+
|
|
242
|
+
# query parameters
|
|
243
|
+
query_params = opts[:query_params] || {}
|
|
244
|
+
query_params[:'filter[enabled]'] = opts[:'filter_enabled'] if !opts[:'filter_enabled'].nil?
|
|
245
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
246
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
247
|
+
query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
|
|
248
|
+
|
|
249
|
+
# header parameters
|
|
250
|
+
header_params = opts[:header_params] || {}
|
|
251
|
+
# HTTP header 'Accept' (if needed)
|
|
252
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
253
|
+
|
|
254
|
+
# form parameters
|
|
255
|
+
form_params = opts[:form_params] || {}
|
|
256
|
+
|
|
257
|
+
# http body (model)
|
|
258
|
+
post_body = opts[:debug_body]
|
|
259
|
+
|
|
260
|
+
# return_type
|
|
261
|
+
return_type = opts[:debug_return_type] || 'JobListResponse'
|
|
262
|
+
|
|
263
|
+
# auth_names
|
|
264
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
265
|
+
|
|
266
|
+
new_options = opts.merge(
|
|
267
|
+
:operation => :"JobsApi.list_jobs",
|
|
268
|
+
:header_params => header_params,
|
|
269
|
+
:query_params => query_params,
|
|
270
|
+
:form_params => form_params,
|
|
271
|
+
:body => post_body,
|
|
272
|
+
:auth_names => auth_names,
|
|
273
|
+
:return_type => return_type
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
277
|
+
if @api_client.config.debugging
|
|
278
|
+
@api_client.config.logger.debug "API called: JobsApi#list_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
279
|
+
end
|
|
280
|
+
return data, status_code, headers
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Run Job Now
|
|
284
|
+
# Trigger one immediate run of the job (a `MANUAL` run). The job's schedule and enabled state are untouched. The run is enqueued and executed by the worker; if the account is over its run allotment the run will fail with reason `QUOTA_EXCEEDED` rather than being rejected here.
|
|
285
|
+
# @param job_id [String]
|
|
286
|
+
# @param [Hash] opts the optional parameters
|
|
287
|
+
# @return [RunResponse]
|
|
288
|
+
def run_job_now(job_id, opts = {})
|
|
289
|
+
data, _status_code, _headers = run_job_now_with_http_info(job_id, opts)
|
|
290
|
+
data
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Run Job Now
|
|
294
|
+
# Trigger one immediate run of the job (a `MANUAL` run). The job's schedule and enabled state are untouched. The run is enqueued and executed by the worker; if the account is over its run allotment the run will fail with reason `QUOTA_EXCEEDED` rather than being rejected here.
|
|
295
|
+
# @param job_id [String]
|
|
296
|
+
# @param [Hash] opts the optional parameters
|
|
297
|
+
# @return [Array<(RunResponse, Integer, Hash)>] RunResponse data, response status code and response headers
|
|
298
|
+
def run_job_now_with_http_info(job_id, opts = {})
|
|
299
|
+
if @api_client.config.debugging
|
|
300
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.run_job_now ...'
|
|
301
|
+
end
|
|
302
|
+
# verify the required parameter 'job_id' is set
|
|
303
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
304
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobsApi.run_job_now"
|
|
305
|
+
end
|
|
306
|
+
# resource path
|
|
307
|
+
local_var_path = '/api/v1/jobs/{job_id}/actions/run'.sub('{job_id}', CGI.escape(job_id.to_s))
|
|
308
|
+
|
|
309
|
+
# query parameters
|
|
310
|
+
query_params = opts[:query_params] || {}
|
|
311
|
+
|
|
312
|
+
# header parameters
|
|
313
|
+
header_params = opts[:header_params] || {}
|
|
314
|
+
# HTTP header 'Accept' (if needed)
|
|
315
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
316
|
+
|
|
317
|
+
# form parameters
|
|
318
|
+
form_params = opts[:form_params] || {}
|
|
319
|
+
|
|
320
|
+
# http body (model)
|
|
321
|
+
post_body = opts[:debug_body]
|
|
322
|
+
|
|
323
|
+
# return_type
|
|
324
|
+
return_type = opts[:debug_return_type] || 'RunResponse'
|
|
325
|
+
|
|
326
|
+
# auth_names
|
|
327
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
328
|
+
|
|
329
|
+
new_options = opts.merge(
|
|
330
|
+
:operation => :"JobsApi.run_job_now",
|
|
331
|
+
:header_params => header_params,
|
|
332
|
+
:query_params => query_params,
|
|
333
|
+
:form_params => form_params,
|
|
334
|
+
:body => post_body,
|
|
335
|
+
:auth_names => auth_names,
|
|
336
|
+
:return_type => return_type
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
340
|
+
if @api_client.config.debugging
|
|
341
|
+
@api_client.config.logger.debug "API called: JobsApi#run_job_now\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
342
|
+
end
|
|
343
|
+
return data, status_code, headers
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Update Job
|
|
347
|
+
# Replace an existing job. Every writable field is overwritten. Enabling a paused job is a `PUT` with `enabled: true`; pausing is `enabled: false`. Editing the schedule recomputes the next fire time.
|
|
348
|
+
# @param job_id [String]
|
|
349
|
+
# @param job_request [JobRequest]
|
|
350
|
+
# @param [Hash] opts the optional parameters
|
|
351
|
+
# @return [JobResponse]
|
|
352
|
+
def update_job(job_id, job_request, opts = {})
|
|
353
|
+
data, _status_code, _headers = update_job_with_http_info(job_id, job_request, opts)
|
|
354
|
+
data
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
# Update Job
|
|
358
|
+
# Replace an existing job. Every writable field is overwritten. Enabling a paused job is a `PUT` with `enabled: true`; pausing is `enabled: false`. Editing the schedule recomputes the next fire time.
|
|
359
|
+
# @param job_id [String]
|
|
360
|
+
# @param job_request [JobRequest]
|
|
361
|
+
# @param [Hash] opts the optional parameters
|
|
362
|
+
# @return [Array<(JobResponse, Integer, Hash)>] JobResponse data, response status code and response headers
|
|
363
|
+
def update_job_with_http_info(job_id, job_request, opts = {})
|
|
364
|
+
if @api_client.config.debugging
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.update_job ...'
|
|
366
|
+
end
|
|
367
|
+
# verify the required parameter 'job_id' is set
|
|
368
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobsApi.update_job"
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'job_request' is set
|
|
372
|
+
if @api_client.config.client_side_validation && job_request.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'job_request' when calling JobsApi.update_job"
|
|
374
|
+
end
|
|
375
|
+
# resource path
|
|
376
|
+
local_var_path = '/api/v1/jobs/{job_id}'.sub('{job_id}', CGI.escape(job_id.to_s))
|
|
377
|
+
|
|
378
|
+
# query parameters
|
|
379
|
+
query_params = opts[:query_params] || {}
|
|
380
|
+
|
|
381
|
+
# header parameters
|
|
382
|
+
header_params = opts[:header_params] || {}
|
|
383
|
+
# HTTP header 'Accept' (if needed)
|
|
384
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept']
|
|
385
|
+
# HTTP header 'Content-Type'
|
|
386
|
+
content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
|
|
387
|
+
if !content_type.nil?
|
|
388
|
+
header_params['Content-Type'] = content_type
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
# form parameters
|
|
392
|
+
form_params = opts[:form_params] || {}
|
|
393
|
+
|
|
394
|
+
# http body (model)
|
|
395
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(job_request)
|
|
396
|
+
|
|
397
|
+
# return_type
|
|
398
|
+
return_type = opts[:debug_return_type] || 'JobResponse'
|
|
399
|
+
|
|
400
|
+
# auth_names
|
|
401
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
|
402
|
+
|
|
403
|
+
new_options = opts.merge(
|
|
404
|
+
:operation => :"JobsApi.update_job",
|
|
405
|
+
:header_params => header_params,
|
|
406
|
+
:query_params => query_params,
|
|
407
|
+
:form_params => form_params,
|
|
408
|
+
:body => post_body,
|
|
409
|
+
:auth_names => auth_names,
|
|
410
|
+
:return_type => return_type
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
414
|
+
if @api_client.config.debugging
|
|
415
|
+
@api_client.config.logger.debug "API called: JobsApi#update_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
416
|
+
end
|
|
417
|
+
return data, status_code, headers
|
|
418
|
+
end
|
|
419
|
+
end
|
|
420
|
+
end
|