sz-apimatic-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +153 -0
- data/bin/console +15 -0
- data/lib/seltz_api/api_helper.rb +10 -0
- data/lib/seltz_api/apis/agent_api.rb +140 -0
- data/lib/seltz_api/apis/answer_api.rb +61 -0
- data/lib/seltz_api/apis/base_api.rb +67 -0
- data/lib/seltz_api/apis/fetch_api.rb +48 -0
- data/lib/seltz_api/apis/monitors_api.rb +161 -0
- data/lib/seltz_api/apis/records_api.rb +97 -0
- data/lib/seltz_api/apis/runs_api.rb +109 -0
- data/lib/seltz_api/apis/search_api.rb +55 -0
- data/lib/seltz_api/client.rb +111 -0
- data/lib/seltz_api/configuration.rb +165 -0
- data/lib/seltz_api/exceptions/api_exception.rb +21 -0
- data/lib/seltz_api/exceptions/error_envelope_exception.rb +46 -0
- data/lib/seltz_api/http/api_response.rb +19 -0
- data/lib/seltz_api/http/auth/custom_header_authentication.rb +52 -0
- data/lib/seltz_api/http/http_call_back.rb +10 -0
- data/lib/seltz_api/http/http_method_enum.rb +10 -0
- data/lib/seltz_api/http/http_request.rb +10 -0
- data/lib/seltz_api/http/http_response.rb +10 -0
- data/lib/seltz_api/http/proxy_settings.rb +22 -0
- data/lib/seltz_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/seltz_api/logging/sdk_logger.rb +17 -0
- data/lib/seltz_api/models/agent_run.rb +161 -0
- data/lib/seltz_api/models/agent_run_citation.rb +85 -0
- data/lib/seltz_api/models/agent_run_grounding.rb +94 -0
- data/lib/seltz_api/models/agent_run_output.rb +131 -0
- data/lib/seltz_api/models/agent_run_output2.rb +131 -0
- data/lib/seltz_api/models/agent_run_request.rb +100 -0
- data/lib/seltz_api/models/agent_run_request2.rb +100 -0
- data/lib/seltz_api/models/agent_run_source.rb +86 -0
- data/lib/seltz_api/models/agent_run_status.rb +49 -0
- data/lib/seltz_api/models/agent_run_status2.rb +48 -0
- data/lib/seltz_api/models/agent_run_stop_reason.rb +53 -0
- data/lib/seltz_api/models/agent_run_stop_reason2.rb +52 -0
- data/lib/seltz_api/models/answer_http_request.rb +172 -0
- data/lib/seltz_api/models/answer_http_response.rb +93 -0
- data/lib/seltz_api/models/base_model.rb +110 -0
- data/lib/seltz_api/models/content_options.rb +99 -0
- data/lib/seltz_api/models/create_agent_run_request.rb +104 -0
- data/lib/seltz_api/models/create_monitor_request.rb +143 -0
- data/lib/seltz_api/models/create_monitor_response.rb +90 -0
- data/lib/seltz_api/models/document.rb +128 -0
- data/lib/seltz_api/models/envelope_error.rb +83 -0
- data/lib/seltz_api/models/envelope_error1.rb +82 -0
- data/lib/seltz_api/models/fetch_error.rb +107 -0
- data/lib/seltz_api/models/fetch_error1.rb +108 -0
- data/lib/seltz_api/models/fetch_request.rb +144 -0
- data/lib/seltz_api/models/fetch_response.rb +87 -0
- data/lib/seltz_api/models/fetch_result.rb +176 -0
- data/lib/seltz_api/models/fetch_status.rb +36 -0
- data/lib/seltz_api/models/fetch_status2.rb +40 -0
- data/lib/seltz_api/models/fields.rb +108 -0
- data/lib/seltz_api/models/fields2.rb +101 -0
- data/lib/seltz_api/models/get_monitor_response.rb +87 -0
- data/lib/seltz_api/models/get_run_response.rb +76 -0
- data/lib/seltz_api/models/http_citation.rb +86 -0
- data/lib/seltz_api/models/list_agent_runs_response.rb +96 -0
- data/lib/seltz_api/models/list_monitors_response.rb +97 -0
- data/lib/seltz_api/models/list_records_response.rb +96 -0
- data/lib/seltz_api/models/list_run_records_response.rb +96 -0
- data/lib/seltz_api/models/list_run_requests_response.rb +84 -0
- data/lib/seltz_api/models/list_runs_response.rb +96 -0
- data/lib/seltz_api/models/monitor.rb +157 -0
- data/lib/seltz_api/models/monitor_search_request.rb +110 -0
- data/lib/seltz_api/models/monitor_status.rb +47 -0
- data/lib/seltz_api/models/monitor_status2.rb +45 -0
- data/lib/seltz_api/models/payload.rb +74 -0
- data/lib/seltz_api/models/record.rb +116 -0
- data/lib/seltz_api/models/record_type.rb +26 -0
- data/lib/seltz_api/models/request_status.rb +36 -0
- data/lib/seltz_api/models/run.rb +200 -0
- data/lib/seltz_api/models/run_request.rb +127 -0
- data/lib/seltz_api/models/run_state.rb +40 -0
- data/lib/seltz_api/models/run_state2.rb +41 -0
- data/lib/seltz_api/models/run_status.rb +47 -0
- data/lib/seltz_api/models/schedule.rb +73 -0
- data/lib/seltz_api/models/search_record.rb +101 -0
- data/lib/seltz_api/models/search_request.rb +208 -0
- data/lib/seltz_api/models/search_request_ref.rb +87 -0
- data/lib/seltz_api/models/search_response.rb +85 -0
- data/lib/seltz_api/models/snippet.rb +76 -0
- data/lib/seltz_api/models/snippet_options.rb +151 -0
- data/lib/seltz_api/models/update_monitor_request.rb +153 -0
- data/lib/seltz_api/models/update_monitor_response.rb +77 -0
- data/lib/seltz_api/models/webhook.rb +113 -0
- data/lib/seltz_api/models/webhook1.rb +114 -0
- data/lib/seltz_api/utilities/date_time_helper.rb +11 -0
- data/lib/seltz_api/utilities/file_wrapper.rb +28 -0
- data/lib/seltz_api/utilities/union_type_lookup.rb +62 -0
- data/lib/seltz_api.rb +115 -0
- metadata +178 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# Run Model.
|
|
8
|
+
class Run < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :completed_at
|
|
15
|
+
|
|
16
|
+
# The lowest `record_id` this run produced. Records are not contiguous; use
|
|
17
|
+
# `record_count` for the count.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :first_record_id
|
|
20
|
+
|
|
21
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
22
|
+
# `record_count` for the count.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :last_record_id
|
|
25
|
+
|
|
26
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
27
|
+
# `record_count` for the count.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :monitor_id
|
|
30
|
+
|
|
31
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
32
|
+
# `record_count` for the count.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :record_count
|
|
35
|
+
|
|
36
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
37
|
+
# `record_count` for the count.
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
attr_accessor :requests_failed
|
|
40
|
+
|
|
41
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
42
|
+
# `record_count` for the count.
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
attr_accessor :requests_ok
|
|
45
|
+
|
|
46
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
47
|
+
# `record_count` for the count.
|
|
48
|
+
# @return [Integer]
|
|
49
|
+
attr_accessor :requests_total
|
|
50
|
+
|
|
51
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
52
|
+
# `record_count` for the count.
|
|
53
|
+
# @return [String]
|
|
54
|
+
attr_accessor :run_id
|
|
55
|
+
|
|
56
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
57
|
+
# `record_count` for the count.
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :started_at
|
|
60
|
+
|
|
61
|
+
# The highest `record_id` this run produced. Records are not contiguous; use
|
|
62
|
+
# `record_count` for the count.
|
|
63
|
+
# @return [RunStatus]
|
|
64
|
+
attr_accessor :status
|
|
65
|
+
|
|
66
|
+
# Prose for a human, empty when completed.
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :status_reason
|
|
69
|
+
|
|
70
|
+
# A mapping from model property names to API property names.
|
|
71
|
+
def self.names
|
|
72
|
+
@_hash = {} if @_hash.nil?
|
|
73
|
+
@_hash['completed_at'] = 'completed_at'
|
|
74
|
+
@_hash['first_record_id'] = 'first_record_id'
|
|
75
|
+
@_hash['last_record_id'] = 'last_record_id'
|
|
76
|
+
@_hash['monitor_id'] = 'monitor_id'
|
|
77
|
+
@_hash['record_count'] = 'record_count'
|
|
78
|
+
@_hash['requests_failed'] = 'requests_failed'
|
|
79
|
+
@_hash['requests_ok'] = 'requests_ok'
|
|
80
|
+
@_hash['requests_total'] = 'requests_total'
|
|
81
|
+
@_hash['run_id'] = 'run_id'
|
|
82
|
+
@_hash['started_at'] = 'started_at'
|
|
83
|
+
@_hash['status'] = 'status'
|
|
84
|
+
@_hash['status_reason'] = 'status_reason'
|
|
85
|
+
@_hash
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# An array for optional fields
|
|
89
|
+
def self.optionals
|
|
90
|
+
%w[
|
|
91
|
+
completed_at
|
|
92
|
+
first_record_id
|
|
93
|
+
last_record_id
|
|
94
|
+
monitor_id
|
|
95
|
+
record_count
|
|
96
|
+
requests_failed
|
|
97
|
+
requests_ok
|
|
98
|
+
requests_total
|
|
99
|
+
run_id
|
|
100
|
+
started_at
|
|
101
|
+
status_reason
|
|
102
|
+
]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# An array for nullable fields
|
|
106
|
+
def self.nullables
|
|
107
|
+
%w[
|
|
108
|
+
completed_at
|
|
109
|
+
started_at
|
|
110
|
+
]
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def initialize(status: RunStatus::COMPLETED, completed_at: SKIP,
|
|
114
|
+
first_record_id: '0', last_record_id: '0', monitor_id: SKIP,
|
|
115
|
+
record_count: 0, requests_failed: 0, requests_ok: 0,
|
|
116
|
+
requests_total: 0, run_id: '0', started_at: SKIP,
|
|
117
|
+
status_reason: SKIP, additional_properties: nil)
|
|
118
|
+
# Add additional model properties to the instance
|
|
119
|
+
additional_properties = {} if additional_properties.nil?
|
|
120
|
+
|
|
121
|
+
@completed_at = completed_at unless completed_at == SKIP
|
|
122
|
+
@first_record_id = first_record_id unless first_record_id == SKIP
|
|
123
|
+
@last_record_id = last_record_id unless last_record_id == SKIP
|
|
124
|
+
@monitor_id = monitor_id unless monitor_id == SKIP
|
|
125
|
+
@record_count = record_count unless record_count == SKIP
|
|
126
|
+
@requests_failed = requests_failed unless requests_failed == SKIP
|
|
127
|
+
@requests_ok = requests_ok unless requests_ok == SKIP
|
|
128
|
+
@requests_total = requests_total unless requests_total == SKIP
|
|
129
|
+
@run_id = run_id unless run_id == SKIP
|
|
130
|
+
@started_at = started_at unless started_at == SKIP
|
|
131
|
+
@status = status
|
|
132
|
+
@status_reason = status_reason unless status_reason == SKIP
|
|
133
|
+
@additional_properties = additional_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Creates an instance of the object from a hash.
|
|
137
|
+
def self.from_hash(hash)
|
|
138
|
+
return nil unless hash
|
|
139
|
+
|
|
140
|
+
# Extract variables from the hash.
|
|
141
|
+
status = hash['status'] ||= RunStatus::COMPLETED
|
|
142
|
+
completed_at = hash.key?('completed_at') ? hash['completed_at'] : SKIP
|
|
143
|
+
first_record_id = hash['first_record_id'] ||= '0'
|
|
144
|
+
last_record_id = hash['last_record_id'] ||= '0'
|
|
145
|
+
monitor_id = hash.key?('monitor_id') ? hash['monitor_id'] : SKIP
|
|
146
|
+
record_count = hash['record_count'] ||= 0
|
|
147
|
+
requests_failed = hash['requests_failed'] ||= 0
|
|
148
|
+
requests_ok = hash['requests_ok'] ||= 0
|
|
149
|
+
requests_total = hash['requests_total'] ||= 0
|
|
150
|
+
run_id = hash['run_id'] ||= '0'
|
|
151
|
+
started_at = hash.key?('started_at') ? hash['started_at'] : SKIP
|
|
152
|
+
status_reason = hash.key?('status_reason') ? hash['status_reason'] : SKIP
|
|
153
|
+
|
|
154
|
+
# Create a new hash for additional properties, removing known properties.
|
|
155
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
156
|
+
|
|
157
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
158
|
+
new_hash, proc { |value| value }
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
# Create object from extracted values.
|
|
162
|
+
Run.new(status: status,
|
|
163
|
+
completed_at: completed_at,
|
|
164
|
+
first_record_id: first_record_id,
|
|
165
|
+
last_record_id: last_record_id,
|
|
166
|
+
monitor_id: monitor_id,
|
|
167
|
+
record_count: record_count,
|
|
168
|
+
requests_failed: requests_failed,
|
|
169
|
+
requests_ok: requests_ok,
|
|
170
|
+
requests_total: requests_total,
|
|
171
|
+
run_id: run_id,
|
|
172
|
+
started_at: started_at,
|
|
173
|
+
status_reason: status_reason,
|
|
174
|
+
additional_properties: additional_properties)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Provides a human-readable string representation of the object.
|
|
178
|
+
def to_s
|
|
179
|
+
class_name = self.class.name.split('::').last
|
|
180
|
+
"<#{class_name} completed_at: #{@completed_at}, first_record_id: #{@first_record_id},"\
|
|
181
|
+
" last_record_id: #{@last_record_id}, monitor_id: #{@monitor_id}, record_count:"\
|
|
182
|
+
" #{@record_count}, requests_failed: #{@requests_failed}, requests_ok: #{@requests_ok},"\
|
|
183
|
+
" requests_total: #{@requests_total}, run_id: #{@run_id}, started_at: #{@started_at},"\
|
|
184
|
+
" status: #{@status}, status_reason: #{@status_reason}, additional_properties:"\
|
|
185
|
+
" #{@additional_properties}>"
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
189
|
+
def inspect
|
|
190
|
+
class_name = self.class.name.split('::').last
|
|
191
|
+
"<#{class_name} completed_at: #{@completed_at.inspect}, first_record_id:"\
|
|
192
|
+
" #{@first_record_id.inspect}, last_record_id: #{@last_record_id.inspect}, monitor_id:"\
|
|
193
|
+
" #{@monitor_id.inspect}, record_count: #{@record_count.inspect}, requests_failed:"\
|
|
194
|
+
" #{@requests_failed.inspect}, requests_ok: #{@requests_ok.inspect}, requests_total:"\
|
|
195
|
+
" #{@requests_total.inspect}, run_id: #{@run_id.inspect}, started_at:"\
|
|
196
|
+
" #{@started_at.inspect}, status: #{@status.inspect}, status_reason:"\
|
|
197
|
+
" #{@status_reason.inspect}, additional_properties: #{@additional_properties}>"
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# One run's outcome for one search request.
|
|
8
|
+
class RunRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :completed_at
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Integer]
|
|
18
|
+
attr_accessor :new_records
|
|
19
|
+
|
|
20
|
+
# Why the request failed, empty when it succeeded. Not machine-readable.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :reason
|
|
23
|
+
|
|
24
|
+
# Why the request failed, empty when it succeeded. Not machine-readable.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :request_id
|
|
27
|
+
|
|
28
|
+
# Why the request failed, empty when it succeeded. Not machine-readable.
|
|
29
|
+
# @return [Integer]
|
|
30
|
+
attr_accessor :results_returned
|
|
31
|
+
|
|
32
|
+
# Why the request failed, empty when it succeeded. Not machine-readable.
|
|
33
|
+
# @return [RequestStatus]
|
|
34
|
+
attr_accessor :status
|
|
35
|
+
|
|
36
|
+
# A mapping from model property names to API property names.
|
|
37
|
+
def self.names
|
|
38
|
+
@_hash = {} if @_hash.nil?
|
|
39
|
+
@_hash['completed_at'] = 'completed_at'
|
|
40
|
+
@_hash['new_records'] = 'new_records'
|
|
41
|
+
@_hash['reason'] = 'reason'
|
|
42
|
+
@_hash['request_id'] = 'request_id'
|
|
43
|
+
@_hash['results_returned'] = 'results_returned'
|
|
44
|
+
@_hash['status'] = 'status'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
%w[
|
|
51
|
+
completed_at
|
|
52
|
+
new_records
|
|
53
|
+
reason
|
|
54
|
+
request_id
|
|
55
|
+
results_returned
|
|
56
|
+
]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
%w[
|
|
62
|
+
completed_at
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(status: RequestStatus::OK, completed_at: SKIP,
|
|
67
|
+
new_records: 0, reason: SKIP, request_id: SKIP,
|
|
68
|
+
results_returned: 0, additional_properties: nil)
|
|
69
|
+
# Add additional model properties to the instance
|
|
70
|
+
additional_properties = {} if additional_properties.nil?
|
|
71
|
+
|
|
72
|
+
@completed_at = completed_at unless completed_at == SKIP
|
|
73
|
+
@new_records = new_records unless new_records == SKIP
|
|
74
|
+
@reason = reason unless reason == SKIP
|
|
75
|
+
@request_id = request_id unless request_id == SKIP
|
|
76
|
+
@results_returned = results_returned unless results_returned == SKIP
|
|
77
|
+
@status = status
|
|
78
|
+
@additional_properties = additional_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Creates an instance of the object from a hash.
|
|
82
|
+
def self.from_hash(hash)
|
|
83
|
+
return nil unless hash
|
|
84
|
+
|
|
85
|
+
# Extract variables from the hash.
|
|
86
|
+
status = hash['status'] ||= RequestStatus::OK
|
|
87
|
+
completed_at = hash.key?('completed_at') ? hash['completed_at'] : SKIP
|
|
88
|
+
new_records = hash['new_records'] ||= 0
|
|
89
|
+
reason = hash.key?('reason') ? hash['reason'] : SKIP
|
|
90
|
+
request_id = hash.key?('request_id') ? hash['request_id'] : SKIP
|
|
91
|
+
results_returned = hash['results_returned'] ||= 0
|
|
92
|
+
|
|
93
|
+
# Create a new hash for additional properties, removing known properties.
|
|
94
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
95
|
+
|
|
96
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
97
|
+
new_hash, proc { |value| value }
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
# Create object from extracted values.
|
|
101
|
+
RunRequest.new(status: status,
|
|
102
|
+
completed_at: completed_at,
|
|
103
|
+
new_records: new_records,
|
|
104
|
+
reason: reason,
|
|
105
|
+
request_id: request_id,
|
|
106
|
+
results_returned: results_returned,
|
|
107
|
+
additional_properties: additional_properties)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} completed_at: #{@completed_at}, new_records: #{@new_records}, reason:"\
|
|
114
|
+
" #{@reason}, request_id: #{@request_id}, results_returned: #{@results_returned}, status:"\
|
|
115
|
+
" #{@status}, additional_properties: #{@additional_properties}>"
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
119
|
+
def inspect
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} completed_at: #{@completed_at.inspect}, new_records:"\
|
|
122
|
+
" #{@new_records.inspect}, reason: #{@reason.inspect}, request_id: #{@request_id.inspect},"\
|
|
123
|
+
" results_returned: #{@results_returned.inspect}, status: #{@status.inspect},"\
|
|
124
|
+
" additional_properties: #{@additional_properties}>"
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# Whether a monitor has a run open on it right now.
|
|
8
|
+
class RunState
|
|
9
|
+
RUN_STATE = [
|
|
10
|
+
# TODO: Write general description for IDLE
|
|
11
|
+
IDLE = 'idle'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for RUNNING
|
|
14
|
+
RUNNING = 'running'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for UNKNOWN
|
|
17
|
+
UNKNOWN = 'unknown'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
RUN_STATE.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = IDLE)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'idle' then IDLE
|
|
33
|
+
when 'running' then RUNNING
|
|
34
|
+
when 'unknown' then UNKNOWN
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# Live run state. Returned by this RPC only — the list endpoints do not
|
|
8
|
+
# include it.
|
|
9
|
+
class RunState2
|
|
10
|
+
RUN_STATE2 = [
|
|
11
|
+
# TODO: Write general description for IDLE
|
|
12
|
+
IDLE = 'idle'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for RUNNING
|
|
15
|
+
RUNNING = 'running'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for UNKNOWN
|
|
18
|
+
UNKNOWN = 'unknown'.freeze
|
|
19
|
+
].freeze
|
|
20
|
+
|
|
21
|
+
def self.validate(value)
|
|
22
|
+
return false if value.nil?
|
|
23
|
+
|
|
24
|
+
RUN_STATE2.include?(value)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_value(value, default_value = IDLE)
|
|
28
|
+
return default_value if value.nil?
|
|
29
|
+
|
|
30
|
+
str = value.to_s.strip
|
|
31
|
+
|
|
32
|
+
case str.downcase
|
|
33
|
+
when 'idle' then IDLE
|
|
34
|
+
when 'running' then RUNNING
|
|
35
|
+
when 'unknown' then UNKNOWN
|
|
36
|
+
else
|
|
37
|
+
default_value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# A run's outcome. `completed` -- every request succeeded. `partial` -- at
|
|
8
|
+
# least one request failed after retries and at least one succeeded. `failed`
|
|
9
|
+
# -- no request succeeded, and no records. `skipped` -- not attempted and not
|
|
10
|
+
# billed; see `status_reason`. Any of them may produce no records.
|
|
11
|
+
class RunStatus
|
|
12
|
+
RUN_STATUS = [
|
|
13
|
+
# TODO: Write general description for COMPLETED
|
|
14
|
+
COMPLETED = 'completed'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for PARTIAL
|
|
17
|
+
PARTIAL = 'partial'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for FAILED
|
|
20
|
+
FAILED = 'failed'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for SKIPPED
|
|
23
|
+
SKIPPED = 'skipped'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
RUN_STATUS.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = COMPLETED)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'completed' then COMPLETED
|
|
39
|
+
when 'partial' then PARTIAL
|
|
40
|
+
when 'failed' then FAILED
|
|
41
|
+
when 'skipped' then SKIPPED
|
|
42
|
+
else
|
|
43
|
+
default_value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# Schedule Model.
|
|
8
|
+
class Schedule < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :cadence
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['cadence'] = 'cadence'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(cadence:, additional_properties: nil)
|
|
34
|
+
# Add additional model properties to the instance
|
|
35
|
+
additional_properties = {} if additional_properties.nil?
|
|
36
|
+
|
|
37
|
+
@cadence = cadence
|
|
38
|
+
@additional_properties = additional_properties
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Creates an instance of the object from a hash.
|
|
42
|
+
def self.from_hash(hash)
|
|
43
|
+
return nil unless hash
|
|
44
|
+
|
|
45
|
+
# Extract variables from the hash.
|
|
46
|
+
cadence = hash.key?('cadence') ? hash['cadence'] : nil
|
|
47
|
+
|
|
48
|
+
# Create a new hash for additional properties, removing known properties.
|
|
49
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
50
|
+
|
|
51
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
52
|
+
new_hash, proc { |value| value }
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Create object from extracted values.
|
|
56
|
+
Schedule.new(cadence: cadence,
|
|
57
|
+
additional_properties: additional_properties)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Provides a human-readable string representation of the object.
|
|
61
|
+
def to_s
|
|
62
|
+
class_name = self.class.name.split('::').last
|
|
63
|
+
"<#{class_name} cadence: #{@cadence}, additional_properties: #{@additional_properties}>"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
67
|
+
def inspect
|
|
68
|
+
class_name = self.class.name.split('::').last
|
|
69
|
+
"<#{class_name} cadence: #{@cadence.inspect}, additional_properties:"\
|
|
70
|
+
" #{@additional_properties}>"
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# seltz_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SeltzApi
|
|
7
|
+
# SearchRecord Model.
|
|
8
|
+
class SearchRecord < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Document]
|
|
14
|
+
attr_accessor :document
|
|
15
|
+
|
|
16
|
+
# Only the requests that matched in the run that emitted this record. A
|
|
17
|
+
# record
|
|
18
|
+
# is emitted once, on first sight, so a request that would match it in a
|
|
19
|
+
# later
|
|
20
|
+
# run never attaches to it.
|
|
21
|
+
# @return [Array[SearchRequestRef]]
|
|
22
|
+
attr_accessor :matched_requests
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['document'] = 'document'
|
|
28
|
+
@_hash['matched_requests'] = 'matched_requests'
|
|
29
|
+
@_hash
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# An array for optional fields
|
|
33
|
+
def self.optionals
|
|
34
|
+
%w[
|
|
35
|
+
document
|
|
36
|
+
matched_requests
|
|
37
|
+
]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for nullable fields
|
|
41
|
+
def self.nullables
|
|
42
|
+
%w[
|
|
43
|
+
document
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(document: SKIP, matched_requests: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@document = document unless document == SKIP
|
|
53
|
+
@matched_requests = matched_requests unless matched_requests == SKIP
|
|
54
|
+
@additional_properties = additional_properties
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Creates an instance of the object from a hash.
|
|
58
|
+
def self.from_hash(hash)
|
|
59
|
+
return nil unless hash
|
|
60
|
+
|
|
61
|
+
# Extract variables from the hash.
|
|
62
|
+
document = Document.from_hash(hash['document']) if hash['document']
|
|
63
|
+
# Parameter is an array, so we need to iterate through it
|
|
64
|
+
matched_requests = nil
|
|
65
|
+
unless hash['matched_requests'].nil?
|
|
66
|
+
matched_requests = []
|
|
67
|
+
hash['matched_requests'].each do |structure|
|
|
68
|
+
matched_requests << (SearchRequestRef.from_hash(structure) if structure)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
matched_requests = SKIP unless hash.key?('matched_requests')
|
|
73
|
+
|
|
74
|
+
# Create a new hash for additional properties, removing known properties.
|
|
75
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
76
|
+
|
|
77
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
78
|
+
new_hash, proc { |value| value }
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Create object from extracted values.
|
|
82
|
+
SearchRecord.new(document: document,
|
|
83
|
+
matched_requests: matched_requests,
|
|
84
|
+
additional_properties: additional_properties)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Provides a human-readable string representation of the object.
|
|
88
|
+
def to_s
|
|
89
|
+
class_name = self.class.name.split('::').last
|
|
90
|
+
"<#{class_name} document: #{@document}, matched_requests: #{@matched_requests},"\
|
|
91
|
+
" additional_properties: #{@additional_properties}>"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
95
|
+
def inspect
|
|
96
|
+
class_name = self.class.name.split('::').last
|
|
97
|
+
"<#{class_name} document: #{@document.inspect}, matched_requests:"\
|
|
98
|
+
" #{@matched_requests.inspect}, additional_properties: #{@additional_properties}>"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|