appnigma-sdk 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +567 -26
- data/exe/appnigma +8 -0
- data/lib/appnigma/actions.rb +33 -0
- data/lib/appnigma/checks.rb +13 -0
- data/lib/appnigma/client.rb +30 -13
- data/lib/appnigma/command.rb +154 -0
- data/lib/appnigma/command_files.rb +46 -0
- data/lib/appnigma/connect_fields.rb +83 -0
- data/lib/appnigma/connections.rb +58 -5
- data/lib/appnigma/constants.rb +57 -0
- data/lib/appnigma/end_customers.rb +29 -0
- data/lib/appnigma/errors.rb +44 -6
- data/lib/appnigma/features.rb +19 -0
- data/lib/appnigma/files.rb +26 -0
- data/lib/appnigma/generated/api/default_api.rb +2103 -402
- data/lib/appnigma/generated/api_client.rb +1 -1
- data/lib/appnigma/generated/api_error.rb +1 -1
- data/lib/appnigma/generated/api_model_base.rb +1 -1
- data/lib/appnigma/generated/configuration.rb +1 -1
- data/lib/appnigma/generated/models/action_entry.rb +1 -1
- data/lib/appnigma/generated/models/check_logic_input.rb +276 -0
- data/lib/appnigma/generated/models/check_logic_output.rb +193 -0
- data/lib/appnigma/generated/models/client_event.rb +309 -0
- data/lib/appnigma/generated/models/client_event_delivery.rb +306 -0
- data/lib/appnigma/generated/models/client_event_type.rb +44 -0
- data/lib/appnigma/generated/models/client_webhook.rb +346 -0
- data/lib/appnigma/generated/models/connect_end_customer_input.rb +243 -0
- data/lib/appnigma/generated/models/connect_end_customer_output.rb +294 -0
- data/lib/appnigma/generated/models/connect_field.rb +308 -0
- data/lib/appnigma/generated/models/connection_status.rb +1 -1
- data/lib/appnigma/generated/models/create_connection_link_input.rb +1 -1
- data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_logic_input.rb +273 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger.rb +104 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger_any_of.rb +257 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger_any_of1.rb +238 -0
- data/lib/appnigma/generated/models/create_logic_output.rb +230 -0
- data/lib/appnigma/generated/models/create_portal_link_input.rb +2 -18
- data/lib/appnigma/generated/models/create_portal_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_webhook_input.rb +187 -0
- data/lib/appnigma/generated/models/create_webhook_output.rb +204 -0
- data/lib/appnigma/generated/models/crm_company.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_create_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_create_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/crm_update_input.rb +1 -1
- data/lib/appnigma/generated/models/delete_end_customer_input.rb +178 -0
- data/lib/appnigma/generated/models/delete_end_customer_output.rb +286 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_connections_inner.rb +238 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_logic_folder.rb +255 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_steps_inner.rb +257 -0
- data/lib/appnigma/generated/models/delete_webhook_input.rb +189 -0
- data/lib/appnigma/generated/models/delete_webhook_output.rb +228 -0
- data/lib/appnigma/generated/models/discard_logic_input.rb +292 -0
- data/lib/appnigma/generated/models/discard_logic_output.rb +254 -0
- data/lib/appnigma/generated/models/disconnect_connection_input.rb +1 -1
- data/lib/appnigma/generated/models/disconnect_connection_output.rb +18 -5
- data/lib/appnigma/generated/models/edit_logic_input.rb +368 -0
- data/lib/appnigma/generated/models/edit_logic_output.rb +298 -0
- data/lib/appnigma/generated/models/encrypted_fields.rb +357 -0
- data/lib/appnigma/generated/models/end_customer.rb +17 -3
- data/lib/appnigma/generated/models/end_customer_connection.rb +1 -1
- data/lib/appnigma/generated/models/function_entry.rb +1 -1
- data/lib/appnigma/generated/models/function_owner.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +1 -1
- data/lib/appnigma/generated/models/get_alerts_output.rb +180 -0
- data/lib/appnigma/generated/models/get_connect_key_output.rb +256 -0
- data/lib/appnigma/generated/models/get_connection_input.rb +1 -1
- data/lib/appnigma/generated/models/get_connection_output.rb +34 -7
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/get_logic_go_live_status_input.rb +247 -0
- data/lib/appnigma/generated/models/get_logic_go_live_status_output.rb +296 -0
- data/lib/appnigma/generated/models/get_logic_input.rb +247 -0
- data/lib/appnigma/generated/models/get_logic_output.rb +240 -0
- data/lib/appnigma/generated/models/get_logic_output_file.rb +204 -0
- data/lib/appnigma/generated/models/get_platform_input.rb +188 -0
- data/lib/appnigma/generated/models/get_platform_output.rb +326 -0
- data/lib/appnigma/generated/models/get_sync_output.rb +207 -0
- data/lib/appnigma/generated/models/go_live_logic_input.rb +316 -0
- data/lib/appnigma/generated/models/go_live_logic_output.rb +281 -0
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_connections_output.rb +3 -3
- data/lib/appnigma/generated/models/list_events_input.rb +302 -0
- data/lib/appnigma/generated/models/list_events_output.rb +193 -0
- data/lib/appnigma/generated/models/list_features_output.rb +179 -0
- data/lib/appnigma/generated/models/list_features_output_features_inner.rb +229 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_logic_input.rb +162 -0
- data/lib/appnigma/generated/models/list_logic_output.rb +209 -0
- data/lib/appnigma/generated/models/list_logic_runs_input.rb +275 -0
- data/lib/appnigma/generated/models/list_logic_runs_output.rb +193 -0
- data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
- data/lib/appnigma/generated/models/list_record_changes_input.rb +375 -0
- data/lib/appnigma/generated/models/list_record_changes_output.rb +193 -0
- data/lib/appnigma/generated/models/list_webhooks_output.rb +180 -0
- data/lib/appnigma/generated/models/logic_check_problem.rb +203 -0
- data/lib/appnigma/generated/models/logic_conditional.rb +3 -3
- data/lib/appnigma/generated/models/logic_draft.rb +257 -0
- data/lib/appnigma/generated/models/logic_entry.rb +441 -0
- data/lib/appnigma/generated/models/logic_entry_failure.rb +205 -0
- data/lib/appnigma/generated/models/logic_folder_problem.rb +218 -0
- data/lib/appnigma/generated/models/logic_run.rb +483 -0
- data/lib/appnigma/generated/models/logic_test_call.rb +269 -0
- data/lib/appnigma/generated/models/platform_entry.rb +63 -6
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +1 -1
- data/lib/appnigma/generated/models/record_change.rb +231 -0
- data/lib/appnigma/generated/models/record_change_record.rb +105 -0
- data/lib/appnigma/generated/models/run_action_input.rb +1 -1
- data/lib/appnigma/generated/models/run_action_output.rb +1 -1
- data/lib/appnigma/generated/models/run_input.rb +1 -1
- data/lib/appnigma/generated/models/run_output.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +81 -6
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/models/set_alerts_input.rb +197 -0
- data/lib/appnigma/generated/models/set_alerts_output.rb +180 -0
- data/lib/appnigma/generated/models/set_sync_input.rb +177 -0
- data/lib/appnigma/generated/models/set_sync_output.rb +207 -0
- data/lib/appnigma/generated/models/switch_logic_off_input.rb +200 -0
- data/lib/appnigma/generated/models/switch_logic_off_output.rb +315 -0
- data/lib/appnigma/generated/models/switch_logic_on_input.rb +200 -0
- data/lib/appnigma/generated/models/switch_logic_on_output.rb +315 -0
- data/lib/appnigma/generated/models/sync_health.rb +231 -0
- data/lib/appnigma/generated/models/test_logic_input.rb +355 -0
- data/lib/appnigma/generated/models/test_logic_output.rb +418 -0
- data/lib/appnigma/generated/models/test_logic_output_error.rb +231 -0
- data/lib/appnigma/generated/models/update_logic_input.rb +359 -0
- data/lib/appnigma/generated/models/update_logic_output.rb +205 -0
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +75 -1
- data/lib/appnigma/logic.rb +176 -0
- data/lib/appnigma/names.rb +4 -4
- data/lib/appnigma/platforms.rb +11 -1
- data/lib/appnigma/portal.rb +8 -5
- data/lib/appnigma/records.rb +46 -0
- data/lib/appnigma/schema_type.rb +149 -0
- data/lib/appnigma/sync.rb +30 -0
- data/lib/appnigma/types_printer.rb +154 -0
- data/lib/appnigma/verify_webhook.rb +107 -0
- data/lib/appnigma/version.rb +2 -2
- data/lib/appnigma/webhooks.rb +79 -0
- data/lib/appnigma.rb +1 -0
- metadata +93 -3
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
4
|
+
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Appnigma::Generated
|
|
17
|
+
class TestLogicOutput < ApiModelBase
|
|
18
|
+
attr_accessor :platform
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Which file ran: the source sent, the saved draft, or the file on main
|
|
23
|
+
attr_accessor :ran_on
|
|
24
|
+
|
|
25
|
+
# False when the file failed the quick check or does not build on its own; problems says why
|
|
26
|
+
attr_accessor :ran
|
|
27
|
+
|
|
28
|
+
# Whether the run answered; false when it ran out of time or stopped, and logs says how far it got
|
|
29
|
+
attr_accessor :finished
|
|
30
|
+
|
|
31
|
+
# What the logic answered, in the shape it declared; null when it failed or did not finish
|
|
32
|
+
attr_accessor :output
|
|
33
|
+
|
|
34
|
+
attr_accessor :error
|
|
35
|
+
|
|
36
|
+
# Why it did not run; empty when it ran
|
|
37
|
+
attr_accessor :problems
|
|
38
|
+
|
|
39
|
+
# Every call it made, in order. None left the sandbox: each was answered empty.
|
|
40
|
+
attr_accessor :calls
|
|
41
|
+
|
|
42
|
+
# What it printed, the last 4,000 characters
|
|
43
|
+
attr_accessor :logs
|
|
44
|
+
|
|
45
|
+
class EnumAttributeValidator
|
|
46
|
+
attr_reader :datatype
|
|
47
|
+
attr_reader :allowable_values
|
|
48
|
+
|
|
49
|
+
def initialize(datatype, allowable_values)
|
|
50
|
+
@allowable_values = allowable_values.map do |value|
|
|
51
|
+
case datatype.to_s
|
|
52
|
+
when /Integer/i
|
|
53
|
+
value.to_i
|
|
54
|
+
when /Float/i
|
|
55
|
+
value.to_f
|
|
56
|
+
else
|
|
57
|
+
value
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def valid?(value)
|
|
63
|
+
!value || allowable_values.include?(value)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
68
|
+
def self.attribute_map
|
|
69
|
+
{
|
|
70
|
+
:'platform' => :'platform',
|
|
71
|
+
:'name' => :'name',
|
|
72
|
+
:'ran_on' => :'ranOn',
|
|
73
|
+
:'ran' => :'ran',
|
|
74
|
+
:'finished' => :'finished',
|
|
75
|
+
:'output' => :'output',
|
|
76
|
+
:'error' => :'error',
|
|
77
|
+
:'problems' => :'problems',
|
|
78
|
+
:'calls' => :'calls',
|
|
79
|
+
:'logs' => :'logs'
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns attribute mapping this model knows about
|
|
84
|
+
def self.acceptable_attribute_map
|
|
85
|
+
attribute_map
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns all the JSON keys this model knows about
|
|
89
|
+
def self.acceptable_attributes
|
|
90
|
+
acceptable_attribute_map.values
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Attribute type mapping.
|
|
94
|
+
def self.openapi_types
|
|
95
|
+
{
|
|
96
|
+
:'platform' => :'String',
|
|
97
|
+
:'name' => :'String',
|
|
98
|
+
:'ran_on' => :'String',
|
|
99
|
+
:'ran' => :'Boolean',
|
|
100
|
+
:'finished' => :'Boolean',
|
|
101
|
+
:'output' => :'JsonValue',
|
|
102
|
+
:'error' => :'TestLogicOutputError',
|
|
103
|
+
:'problems' => :'Array<LogicCheckProblem>',
|
|
104
|
+
:'calls' => :'Array<LogicTestCall>',
|
|
105
|
+
:'logs' => :'String'
|
|
106
|
+
}
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# List of attributes with nullable: true
|
|
110
|
+
def self.openapi_nullable
|
|
111
|
+
Set.new([
|
|
112
|
+
:'output',
|
|
113
|
+
:'error',
|
|
114
|
+
])
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Returns attribute type mapping
|
|
118
|
+
def self.acceptable_openapi_types
|
|
119
|
+
openapi_types
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Returns the nullable attributes
|
|
123
|
+
def self.acceptable_openapi_nullable
|
|
124
|
+
openapi_nullable
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Initializes the object
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
def initialize(attributes = {})
|
|
130
|
+
if (!attributes.is_a?(Hash))
|
|
131
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::TestLogicOutput` initialize method"
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
135
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
136
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
137
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
138
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::TestLogicOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
139
|
+
end
|
|
140
|
+
h[k.to_sym] = v
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'platform')
|
|
144
|
+
self.platform = attributes[:'platform']
|
|
145
|
+
else
|
|
146
|
+
self.platform = nil
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'name')
|
|
150
|
+
self.name = attributes[:'name']
|
|
151
|
+
else
|
|
152
|
+
self.name = nil
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'ran_on')
|
|
156
|
+
self.ran_on = attributes[:'ran_on']
|
|
157
|
+
else
|
|
158
|
+
self.ran_on = nil
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'ran')
|
|
162
|
+
self.ran = attributes[:'ran']
|
|
163
|
+
else
|
|
164
|
+
self.ran = nil
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'finished')
|
|
168
|
+
self.finished = attributes[:'finished']
|
|
169
|
+
else
|
|
170
|
+
self.finished = nil
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'output')
|
|
174
|
+
self.output = attributes[:'output']
|
|
175
|
+
else
|
|
176
|
+
self.output = nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'error')
|
|
180
|
+
self.error = attributes[:'error']
|
|
181
|
+
else
|
|
182
|
+
self.error = nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.key?(:'problems')
|
|
186
|
+
if (value = attributes[:'problems']).is_a?(Array)
|
|
187
|
+
self.problems = value
|
|
188
|
+
end
|
|
189
|
+
else
|
|
190
|
+
self.problems = nil
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'calls')
|
|
194
|
+
if (value = attributes[:'calls']).is_a?(Array)
|
|
195
|
+
self.calls = value
|
|
196
|
+
end
|
|
197
|
+
else
|
|
198
|
+
self.calls = nil
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'logs')
|
|
202
|
+
self.logs = attributes[:'logs']
|
|
203
|
+
else
|
|
204
|
+
self.logs = nil
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
209
|
+
# @return Array for valid properties with the reasons
|
|
210
|
+
def list_invalid_properties
|
|
211
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
212
|
+
invalid_properties = Array.new
|
|
213
|
+
if @platform.nil?
|
|
214
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if @name.nil?
|
|
218
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if @ran_on.nil?
|
|
222
|
+
invalid_properties.push('invalid value for "ran_on", ran_on cannot be nil.')
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if @ran.nil?
|
|
226
|
+
invalid_properties.push('invalid value for "ran", ran cannot be nil.')
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if @finished.nil?
|
|
230
|
+
invalid_properties.push('invalid value for "finished", finished cannot be nil.')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if @problems.nil?
|
|
234
|
+
invalid_properties.push('invalid value for "problems", problems cannot be nil.')
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if @calls.nil?
|
|
238
|
+
invalid_properties.push('invalid value for "calls", calls cannot be nil.')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if @logs.nil?
|
|
242
|
+
invalid_properties.push('invalid value for "logs", logs cannot be nil.')
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
invalid_properties
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Check to see if the all the properties in the model are valid
|
|
249
|
+
# @return true if the model is valid
|
|
250
|
+
def valid?
|
|
251
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
252
|
+
return false if @platform.nil?
|
|
253
|
+
return false if @name.nil?
|
|
254
|
+
return false if @ran_on.nil?
|
|
255
|
+
ran_on_validator = EnumAttributeValidator.new('String', ["sent", "draft", "main"])
|
|
256
|
+
return false unless ran_on_validator.valid?(@ran_on)
|
|
257
|
+
return false if @ran.nil?
|
|
258
|
+
return false if @finished.nil?
|
|
259
|
+
return false if @problems.nil?
|
|
260
|
+
return false if @calls.nil?
|
|
261
|
+
return false if @logs.nil?
|
|
262
|
+
true
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Custom attribute writer method with validation
|
|
266
|
+
# @param [Object] platform Value to be assigned
|
|
267
|
+
def platform=(platform)
|
|
268
|
+
if platform.nil?
|
|
269
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@platform = platform
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] name Value to be assigned
|
|
277
|
+
def name=(name)
|
|
278
|
+
if name.nil?
|
|
279
|
+
fail ArgumentError, 'name cannot be nil'
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
@name = name
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
286
|
+
# @param [Object] ran_on Object to be assigned
|
|
287
|
+
def ran_on=(ran_on)
|
|
288
|
+
validator = EnumAttributeValidator.new('String', ["sent", "draft", "main"])
|
|
289
|
+
unless validator.valid?(ran_on)
|
|
290
|
+
fail ArgumentError, "invalid value for \"ran_on\", must be one of #{validator.allowable_values}."
|
|
291
|
+
end
|
|
292
|
+
@ran_on = ran_on
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Custom attribute writer method with validation
|
|
296
|
+
# @param [Object] ran Value to be assigned
|
|
297
|
+
def ran=(ran)
|
|
298
|
+
if ran.nil?
|
|
299
|
+
fail ArgumentError, 'ran cannot be nil'
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
@ran = ran
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Custom attribute writer method with validation
|
|
306
|
+
# @param [Object] finished Value to be assigned
|
|
307
|
+
def finished=(finished)
|
|
308
|
+
if finished.nil?
|
|
309
|
+
fail ArgumentError, 'finished cannot be nil'
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
@finished = finished
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Custom attribute writer method with validation
|
|
316
|
+
# @param [Object] problems Value to be assigned
|
|
317
|
+
def problems=(problems)
|
|
318
|
+
if problems.nil?
|
|
319
|
+
fail ArgumentError, 'problems cannot be nil'
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
@problems = problems
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
# Custom attribute writer method with validation
|
|
326
|
+
# @param [Object] calls Value to be assigned
|
|
327
|
+
def calls=(calls)
|
|
328
|
+
if calls.nil?
|
|
329
|
+
fail ArgumentError, 'calls cannot be nil'
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
@calls = calls
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Custom attribute writer method with validation
|
|
336
|
+
# @param [Object] logs Value to be assigned
|
|
337
|
+
def logs=(logs)
|
|
338
|
+
if logs.nil?
|
|
339
|
+
fail ArgumentError, 'logs cannot be nil'
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
@logs = logs
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Checks equality by comparing each attribute.
|
|
346
|
+
# @param [Object] Object to be compared
|
|
347
|
+
def ==(o)
|
|
348
|
+
return true if self.equal?(o)
|
|
349
|
+
self.class == o.class &&
|
|
350
|
+
platform == o.platform &&
|
|
351
|
+
name == o.name &&
|
|
352
|
+
ran_on == o.ran_on &&
|
|
353
|
+
ran == o.ran &&
|
|
354
|
+
finished == o.finished &&
|
|
355
|
+
output == o.output &&
|
|
356
|
+
error == o.error &&
|
|
357
|
+
problems == o.problems &&
|
|
358
|
+
calls == o.calls &&
|
|
359
|
+
logs == o.logs
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# @see the `==` method
|
|
363
|
+
# @param [Object] Object to be compared
|
|
364
|
+
def eql?(o)
|
|
365
|
+
self == o
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Calculates hash code according to all attributes.
|
|
369
|
+
# @return [Integer] Hash code
|
|
370
|
+
def hash
|
|
371
|
+
[platform, name, ran_on, ran, finished, output, error, problems, calls, logs].hash
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Builds the object from hash
|
|
375
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
376
|
+
# @return [Object] Returns the model itself
|
|
377
|
+
def self.build_from_hash(attributes)
|
|
378
|
+
return nil unless attributes.is_a?(Hash)
|
|
379
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
380
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
381
|
+
map = acceptable_attribute_map
|
|
382
|
+
transformed_hash = {}
|
|
383
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
384
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
385
|
+
transformed_hash["#{key}"] = nil
|
|
386
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
387
|
+
# check to ensure the input is an array given that the attribute
|
|
388
|
+
# is documented as an array but the input is not
|
|
389
|
+
if attributes[map[key]].is_a?(Array)
|
|
390
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
391
|
+
end
|
|
392
|
+
elsif !attributes[map[key]].nil?
|
|
393
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
394
|
+
end
|
|
395
|
+
end
|
|
396
|
+
new(transformed_hash)
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Returns the object in the form of hash
|
|
400
|
+
# @return [Hash] Returns the object in the form of hash
|
|
401
|
+
def to_hash
|
|
402
|
+
hash = {}
|
|
403
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
404
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
405
|
+
value = self.send(attr)
|
|
406
|
+
if value.nil?
|
|
407
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
408
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
hash[param] = _to_hash(value)
|
|
412
|
+
end
|
|
413
|
+
hash
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
end
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
4
|
+
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Appnigma::Generated
|
|
17
|
+
# How the logic failed, as a live call would answer it; null when it answered
|
|
18
|
+
class TestLogicOutputError < ApiModelBase
|
|
19
|
+
# As a live call would answer it, such as INVALID_INPUT or LOGIC_FAILED
|
|
20
|
+
attr_accessor :code
|
|
21
|
+
|
|
22
|
+
attr_accessor :message
|
|
23
|
+
|
|
24
|
+
attr_accessor :details
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'code' => :'code',
|
|
30
|
+
:'message' => :'message',
|
|
31
|
+
:'details' => :'details'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns attribute mapping this model knows about
|
|
36
|
+
def self.acceptable_attribute_map
|
|
37
|
+
attribute_map
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
acceptable_attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'code' => :'String',
|
|
49
|
+
:'message' => :'String',
|
|
50
|
+
:'details' => :'Object'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute type mapping
|
|
61
|
+
def self.acceptable_openapi_types
|
|
62
|
+
openapi_types
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns the nullable attributes
|
|
66
|
+
def self.acceptable_openapi_nullable
|
|
67
|
+
openapi_nullable
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
if (!attributes.is_a?(Hash))
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::TestLogicOutputError` initialize method"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::TestLogicOutputError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'code')
|
|
87
|
+
self.code = attributes[:'code']
|
|
88
|
+
else
|
|
89
|
+
self.code = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'message')
|
|
93
|
+
self.message = attributes[:'message']
|
|
94
|
+
else
|
|
95
|
+
self.message = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'details')
|
|
99
|
+
self.details = attributes[:'details']
|
|
100
|
+
else
|
|
101
|
+
self.details = nil
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @code.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @message.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @details.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "details", details cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
return false if @code.nil?
|
|
130
|
+
return false if @message.nil?
|
|
131
|
+
return false if @details.nil?
|
|
132
|
+
true
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Custom attribute writer method with validation
|
|
136
|
+
# @param [Object] code Value to be assigned
|
|
137
|
+
def code=(code)
|
|
138
|
+
if code.nil?
|
|
139
|
+
fail ArgumentError, 'code cannot be nil'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
@code = code
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] message Value to be assigned
|
|
147
|
+
def message=(message)
|
|
148
|
+
if message.nil?
|
|
149
|
+
fail ArgumentError, 'message cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@message = message
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] details Value to be assigned
|
|
157
|
+
def details=(details)
|
|
158
|
+
if details.nil?
|
|
159
|
+
fail ArgumentError, 'details cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@details = details
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Checks equality by comparing each attribute.
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def ==(o)
|
|
168
|
+
return true if self.equal?(o)
|
|
169
|
+
self.class == o.class &&
|
|
170
|
+
code == o.code &&
|
|
171
|
+
message == o.message &&
|
|
172
|
+
details == o.details
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @see the `==` method
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def eql?(o)
|
|
178
|
+
self == o
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Calculates hash code according to all attributes.
|
|
182
|
+
# @return [Integer] Hash code
|
|
183
|
+
def hash
|
|
184
|
+
[code, message, details].hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Builds the object from hash
|
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
189
|
+
# @return [Object] Returns the model itself
|
|
190
|
+
def self.build_from_hash(attributes)
|
|
191
|
+
return nil unless attributes.is_a?(Hash)
|
|
192
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
193
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
194
|
+
map = acceptable_attribute_map
|
|
195
|
+
transformed_hash = {}
|
|
196
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
197
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = nil
|
|
199
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
200
|
+
# check to ensure the input is an array given that the attribute
|
|
201
|
+
# is documented as an array but the input is not
|
|
202
|
+
if attributes[map[key]].is_a?(Array)
|
|
203
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
204
|
+
end
|
|
205
|
+
elsif !attributes[map[key]].nil?
|
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
new(transformed_hash)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the object in the form of hash
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_hash
|
|
215
|
+
hash = {}
|
|
216
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
217
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|