appnigma-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +359 -0
- data/lib/appnigma/checks.rb +90 -0
- data/lib/appnigma/client.rb +118 -0
- data/lib/appnigma/connections.rb +31 -0
- data/lib/appnigma/constants.rb +80 -0
- data/lib/appnigma/crm.rb +40 -0
- data/lib/appnigma/errors.rb +135 -0
- data/lib/appnigma/generated/api/default_api.rb +972 -0
- data/lib/appnigma/generated/api_client.rb +441 -0
- data/lib/appnigma/generated/api_error.rb +58 -0
- data/lib/appnigma/generated/api_model_base.rb +88 -0
- data/lib/appnigma/generated/configuration.rb +392 -0
- data/lib/appnigma/generated/models/connection_status.rb +41 -0
- data/lib/appnigma/generated/models/create_connection_link_input.rb +265 -0
- data/lib/appnigma/generated/models/create_connection_link_output.rb +205 -0
- data/lib/appnigma/generated/models/crm_company.rb +322 -0
- data/lib/appnigma/generated/models/crm_company_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_company_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_contact.rb +404 -0
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_custom_field.rb +189 -0
- data/lib/appnigma/generated/models/crm_deal.rb +479 -0
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_email.rb +249 -0
- data/lib/appnigma/generated/models/crm_get_input.rb +272 -0
- data/lib/appnigma/generated/models/crm_labelled.rb +190 -0
- data/lib/appnigma/generated/models/crm_list_input.rb +303 -0
- data/lib/appnigma/generated/models/crm_phone.rb +249 -0
- data/lib/appnigma/generated/models/function_entry.rb +346 -0
- data/lib/appnigma/generated/models/function_owner.rb +105 -0
- data/lib/appnigma/generated/models/function_owner_one_of.rb +201 -0
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +227 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +251 -0
- data/lib/appnigma/generated/models/get_guide_output.rb +178 -0
- data/lib/appnigma/generated/models/json_value.rb +106 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +179 -0
- data/lib/appnigma/generated/models/platform_request_input.rb +314 -0
- data/lib/appnigma/generated/models/platform_request_input_body.rb +104 -0
- data/lib/appnigma/generated/models/platform_request_output.rb +221 -0
- data/lib/appnigma/generated/models/post_input.rb +327 -0
- data/lib/appnigma/generated/models/post_input_record_value.rb +104 -0
- data/lib/appnigma/generated/models/post_output.rb +203 -0
- data/lib/appnigma/generated/models/pull_input.rb +335 -0
- data/lib/appnigma/generated/models/pull_output.rb +191 -0
- data/lib/appnigma/generated/models/pull_output_records_inner.rb +205 -0
- data/lib/appnigma/generated/models/run_input.rb +332 -0
- data/lib/appnigma/generated/models/run_output.rb +164 -0
- data/lib/appnigma/generated/models/sdk_error.rb +177 -0
- data/lib/appnigma/generated/models/sdk_error_error.rb +254 -0
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +211 -0
- data/lib/appnigma/generated/models/sdk_problem.rb +205 -0
- data/lib/appnigma/generated/version.rb +15 -0
- data/lib/appnigma/generated.rb +82 -0
- data/lib/appnigma/names.rb +62 -0
- data/lib/appnigma/retry.rb +80 -0
- data/lib/appnigma/transport.rb +138 -0
- data/lib/appnigma/version.rb +9 -0
- data/lib/appnigma.rb +16 -0
- metadata +155 -0
|
@@ -0,0 +1,205 @@
|
|
|
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: 1.0.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 PullOutputRecordsInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :properties
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'id' => :'id',
|
|
26
|
+
:'properties' => :'properties'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'id' => :'String',
|
|
44
|
+
:'properties' => :'Hash<String, String>'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns attribute type mapping
|
|
55
|
+
def self.acceptable_openapi_types
|
|
56
|
+
openapi_types
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns the nullable attributes
|
|
60
|
+
def self.acceptable_openapi_nullable
|
|
61
|
+
openapi_nullable
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::PullOutputRecordsInner` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::PullOutputRecordsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
76
|
+
end
|
|
77
|
+
h[k.to_sym] = v
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'id')
|
|
81
|
+
self.id = attributes[:'id']
|
|
82
|
+
else
|
|
83
|
+
self.id = nil
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'properties')
|
|
87
|
+
if (value = attributes[:'properties']).is_a?(Hash)
|
|
88
|
+
self.properties = value
|
|
89
|
+
end
|
|
90
|
+
else
|
|
91
|
+
self.properties = nil
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
if @id.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if @properties.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "properties", properties cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
return false if @id.nil?
|
|
116
|
+
return false if @properties.nil?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] id Value to be assigned
|
|
122
|
+
def id=(id)
|
|
123
|
+
if id.nil?
|
|
124
|
+
fail ArgumentError, 'id cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@id = id
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Custom attribute writer method with validation
|
|
131
|
+
# @param [Object] properties Value to be assigned
|
|
132
|
+
def properties=(properties)
|
|
133
|
+
if properties.nil?
|
|
134
|
+
fail ArgumentError, 'properties cannot be nil'
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
@properties = properties
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Checks equality by comparing each attribute.
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def ==(o)
|
|
143
|
+
return true if self.equal?(o)
|
|
144
|
+
self.class == o.class &&
|
|
145
|
+
id == o.id &&
|
|
146
|
+
properties == o.properties
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[id, properties].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
return nil unless attributes.is_a?(Hash)
|
|
166
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
167
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
168
|
+
map = acceptable_attribute_map
|
|
169
|
+
transformed_hash = {}
|
|
170
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
171
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = nil
|
|
173
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
174
|
+
# check to ensure the input is an array given that the attribute
|
|
175
|
+
# is documented as an array but the input is not
|
|
176
|
+
if attributes[map[key]].is_a?(Array)
|
|
177
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
178
|
+
end
|
|
179
|
+
elsif !attributes[map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
new(transformed_hash)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
191
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
if value.nil?
|
|
194
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
end
|
|
@@ -0,0 +1,332 @@
|
|
|
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: 1.0.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 RunInput < ApiModelBase
|
|
18
|
+
# Your own id for the end customer.
|
|
19
|
+
attr_accessor :end_customer_id
|
|
20
|
+
|
|
21
|
+
# The platform the function runs on; it must be switched on for your company.
|
|
22
|
+
attr_accessor :platform
|
|
23
|
+
|
|
24
|
+
# The function's name, the same as its file name.
|
|
25
|
+
attr_accessor :function_name
|
|
26
|
+
|
|
27
|
+
# What the function takes, in the shape it declared.
|
|
28
|
+
attr_accessor :input
|
|
29
|
+
|
|
30
|
+
# One version of the function. Left out, the live one runs.
|
|
31
|
+
attr_accessor :version
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'end_customer_id' => :'endCustomerId',
|
|
37
|
+
:'platform' => :'platform',
|
|
38
|
+
:'function_name' => :'functionName',
|
|
39
|
+
:'input' => :'input',
|
|
40
|
+
:'version' => :'version'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns attribute mapping this model knows about
|
|
45
|
+
def self.acceptable_attribute_map
|
|
46
|
+
attribute_map
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns all the JSON keys this model knows about
|
|
50
|
+
def self.acceptable_attributes
|
|
51
|
+
acceptable_attribute_map.values
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.openapi_types
|
|
56
|
+
{
|
|
57
|
+
:'end_customer_id' => :'String',
|
|
58
|
+
:'platform' => :'String',
|
|
59
|
+
:'function_name' => :'String',
|
|
60
|
+
:'input' => :'Hash<String, JsonValue>',
|
|
61
|
+
:'version' => :'Integer'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns attribute type mapping
|
|
72
|
+
def self.acceptable_openapi_types
|
|
73
|
+
openapi_types
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns the nullable attributes
|
|
77
|
+
def self.acceptable_openapi_nullable
|
|
78
|
+
openapi_nullable
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::RunInput` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::RunInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
+
end
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'end_customer_id')
|
|
98
|
+
self.end_customer_id = attributes[:'end_customer_id']
|
|
99
|
+
else
|
|
100
|
+
self.end_customer_id = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'platform')
|
|
104
|
+
self.platform = attributes[:'platform']
|
|
105
|
+
else
|
|
106
|
+
self.platform = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'function_name')
|
|
110
|
+
self.function_name = attributes[:'function_name']
|
|
111
|
+
else
|
|
112
|
+
self.function_name = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'input')
|
|
116
|
+
if (value = attributes[:'input']).is_a?(Hash)
|
|
117
|
+
self.input = value
|
|
118
|
+
end
|
|
119
|
+
else
|
|
120
|
+
self.input = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'version')
|
|
124
|
+
self.version = attributes[:'version']
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
129
|
+
# @return Array for valid properties with the reasons
|
|
130
|
+
def list_invalid_properties
|
|
131
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
if @end_customer_id.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
138
|
+
if @end_customer_id !~ pattern
|
|
139
|
+
invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @platform.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
147
|
+
if @platform !~ pattern
|
|
148
|
+
invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @function_name.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "function_name", function_name cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
156
|
+
if @function_name !~ pattern
|
|
157
|
+
invalid_properties.push("invalid value for \"function_name\", must conform to the pattern #{pattern}.")
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @input.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if !@version.nil? && @version > 9007199254740991
|
|
165
|
+
invalid_properties.push('invalid value for "version", must be smaller than or equal to 9007199254740991.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if !@version.nil? && @version < 1
|
|
169
|
+
invalid_properties.push('invalid value for "version", must be greater than or equal to 1.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
invalid_properties
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Check to see if the all the properties in the model are valid
|
|
176
|
+
# @return true if the model is valid
|
|
177
|
+
def valid?
|
|
178
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
179
|
+
return false if @end_customer_id.nil?
|
|
180
|
+
return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
181
|
+
return false if @platform.nil?
|
|
182
|
+
return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
183
|
+
return false if @function_name.nil?
|
|
184
|
+
return false if @function_name !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
185
|
+
return false if @input.nil?
|
|
186
|
+
return false if !@version.nil? && @version > 9007199254740991
|
|
187
|
+
return false if !@version.nil? && @version < 1
|
|
188
|
+
true
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Custom attribute writer method with validation
|
|
192
|
+
# @param [Object] end_customer_id Value to be assigned
|
|
193
|
+
def end_customer_id=(end_customer_id)
|
|
194
|
+
if end_customer_id.nil?
|
|
195
|
+
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
199
|
+
if end_customer_id !~ pattern
|
|
200
|
+
fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@end_customer_id = end_customer_id
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] platform Value to be assigned
|
|
208
|
+
def platform=(platform)
|
|
209
|
+
if platform.nil?
|
|
210
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
214
|
+
if platform !~ pattern
|
|
215
|
+
fail ArgumentError, "invalid value for \"platform\", must conform to the pattern #{pattern}."
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
@platform = platform
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Custom attribute writer method with validation
|
|
222
|
+
# @param [Object] function_name Value to be assigned
|
|
223
|
+
def function_name=(function_name)
|
|
224
|
+
if function_name.nil?
|
|
225
|
+
fail ArgumentError, 'function_name cannot be nil'
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
229
|
+
if function_name !~ pattern
|
|
230
|
+
fail ArgumentError, "invalid value for \"function_name\", must conform to the pattern #{pattern}."
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
@function_name = function_name
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method with validation
|
|
237
|
+
# @param [Object] input Value to be assigned
|
|
238
|
+
def input=(input)
|
|
239
|
+
if input.nil?
|
|
240
|
+
fail ArgumentError, 'input cannot be nil'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
@input = input
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] version Value to be assigned
|
|
248
|
+
def version=(version)
|
|
249
|
+
if version.nil?
|
|
250
|
+
fail ArgumentError, 'version cannot be nil'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if version > 9007199254740991
|
|
254
|
+
fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 9007199254740991.'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if version < 1
|
|
258
|
+
fail ArgumentError, 'invalid value for "version", must be greater than or equal to 1.'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
@version = version
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Checks equality by comparing each attribute.
|
|
265
|
+
# @param [Object] Object to be compared
|
|
266
|
+
def ==(o)
|
|
267
|
+
return true if self.equal?(o)
|
|
268
|
+
self.class == o.class &&
|
|
269
|
+
end_customer_id == o.end_customer_id &&
|
|
270
|
+
platform == o.platform &&
|
|
271
|
+
function_name == o.function_name &&
|
|
272
|
+
input == o.input &&
|
|
273
|
+
version == o.version
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# @see the `==` method
|
|
277
|
+
# @param [Object] Object to be compared
|
|
278
|
+
def eql?(o)
|
|
279
|
+
self == o
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Calculates hash code according to all attributes.
|
|
283
|
+
# @return [Integer] Hash code
|
|
284
|
+
def hash
|
|
285
|
+
[end_customer_id, platform, function_name, input, version].hash
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Builds the object from hash
|
|
289
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
290
|
+
# @return [Object] Returns the model itself
|
|
291
|
+
def self.build_from_hash(attributes)
|
|
292
|
+
return nil unless attributes.is_a?(Hash)
|
|
293
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
294
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
295
|
+
map = acceptable_attribute_map
|
|
296
|
+
transformed_hash = {}
|
|
297
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
298
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
299
|
+
transformed_hash["#{key}"] = nil
|
|
300
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
301
|
+
# check to ensure the input is an array given that the attribute
|
|
302
|
+
# is documented as an array but the input is not
|
|
303
|
+
if attributes[map[key]].is_a?(Array)
|
|
304
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
305
|
+
end
|
|
306
|
+
elsif !attributes[map[key]].nil?
|
|
307
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
new(transformed_hash)
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Returns the object in the form of hash
|
|
314
|
+
# @return [Hash] Returns the object in the form of hash
|
|
315
|
+
def to_hash
|
|
316
|
+
hash = {}
|
|
317
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
318
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
319
|
+
value = self.send(attr)
|
|
320
|
+
if value.nil?
|
|
321
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
322
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
hash[param] = _to_hash(value)
|
|
326
|
+
end
|
|
327
|
+
hash
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
@@ -0,0 +1,164 @@
|
|
|
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: 1.0.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 RunOutput < ApiModelBase
|
|
18
|
+
# What the function answered, in the shape it declared
|
|
19
|
+
attr_accessor :output
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'output' => :'output'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'output' => :'JsonValue'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
:'output'
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute type mapping
|
|
53
|
+
def self.acceptable_openapi_types
|
|
54
|
+
openapi_types
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns the nullable attributes
|
|
58
|
+
def self.acceptable_openapi_nullable
|
|
59
|
+
openapi_nullable
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::RunOutput` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::RunOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'output')
|
|
79
|
+
self.output = attributes[:'output']
|
|
80
|
+
else
|
|
81
|
+
self.output = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
invalid_properties
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
def valid?
|
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
97
|
+
true
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Checks equality by comparing each attribute.
|
|
101
|
+
# @param [Object] Object to be compared
|
|
102
|
+
def ==(o)
|
|
103
|
+
return true if self.equal?(o)
|
|
104
|
+
self.class == o.class &&
|
|
105
|
+
output == o.output
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# @see the `==` method
|
|
109
|
+
# @param [Object] Object to be compared
|
|
110
|
+
def eql?(o)
|
|
111
|
+
self == o
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Calculates hash code according to all attributes.
|
|
115
|
+
# @return [Integer] Hash code
|
|
116
|
+
def hash
|
|
117
|
+
[output].hash
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Builds the object from hash
|
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
122
|
+
# @return [Object] Returns the model itself
|
|
123
|
+
def self.build_from_hash(attributes)
|
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
|
125
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
126
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
127
|
+
map = acceptable_attribute_map
|
|
128
|
+
transformed_hash = {}
|
|
129
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
130
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
131
|
+
transformed_hash["#{key}"] = nil
|
|
132
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[map[key]].is_a?(Array)
|
|
136
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[map[key]].nil?
|
|
139
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
new(transformed_hash)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Returns the object in the form of hash
|
|
146
|
+
# @return [Hash] Returns the object in the form of hash
|
|
147
|
+
def to_hash
|
|
148
|
+
hash = {}
|
|
149
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
150
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|