Class: TalonOne::IntegrationHubEventRecord
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- TalonOne::IntegrationHubEventRecord
- Defined in:
- lib/talon_one_sdk/models/integration_hub_event_record.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_retry ⇒ Object
Number of delivery retries attempted.
-
#delivered_at ⇒ Object
Timestamp when the event was delivered.
-
#event_type ⇒ Object
Returns the value of attribute event_type.
-
#flow_id ⇒ Object
ID of the integration hub flow.
-
#id ⇒ Object
ID of the event record.
-
#instance_name ⇒ Object
Name of the integration instance.
-
#integration_name ⇒ Object
Name of the integration.
-
#payload ⇒ Object
The event payload as a formatted JSON string.
-
#processed_at ⇒ Object
Timestamp when the event was processed.
-
#published_at ⇒ Object
Timestamp when the event was published.
-
#scheduled_to ⇒ Object
Timestamp after which the event is scheduled to be processed.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ IntegrationHubEventRecord
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ IntegrationHubEventRecord
Initializes the object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 124 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::IntegrationHubEventRecord` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::IntegrationHubEventRecord`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'flow_id') self.flow_id = attributes[:'flow_id'] else self.flow_id = nil end if attributes.key?(:'integration_name') self.integration_name = attributes[:'integration_name'] end if attributes.key?(:'instance_name') self.instance_name = attributes[:'instance_name'] end if attributes.key?(:'event_type') self.event_type = attributes[:'event_type'] else self.event_type = nil end if attributes.key?(:'published_at') self.published_at = attributes[:'published_at'] else self.published_at = nil end if attributes.key?(:'processed_at') self.processed_at = attributes[:'processed_at'] end if attributes.key?(:'delivered_at') self.delivered_at = attributes[:'delivered_at'] end if attributes.key?(:'scheduled_to') self.scheduled_to = attributes[:'scheduled_to'] else self.scheduled_to = nil end if attributes.key?(:'_retry') self._retry = attributes[:'_retry'] else self._retry = nil end if attributes.key?(:'payload') self.payload = attributes[:'payload'] else self.payload = nil end end |
Instance Attribute Details
#_retry ⇒ Object
Number of delivery retries attempted.
45 46 47 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 45 def _retry @_retry end |
#delivered_at ⇒ Object
Timestamp when the event was delivered.
39 40 41 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 39 def delivered_at @delivered_at end |
#event_type ⇒ Object
Returns the value of attribute event_type.
30 31 32 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 30 def event_type @event_type end |
#flow_id ⇒ Object
ID of the integration hub flow.
22 23 24 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 22 def flow_id @flow_id end |
#id ⇒ Object
ID of the event record.
19 20 21 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 19 def id @id end |
#instance_name ⇒ Object
Name of the integration instance.
28 29 30 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 28 def instance_name @instance_name end |
#integration_name ⇒ Object
Name of the integration.
25 26 27 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 25 def integration_name @integration_name end |
#payload ⇒ Object
The event payload as a formatted JSON string.
48 49 50 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 48 def payload @payload end |
#processed_at ⇒ Object
Timestamp when the event was processed.
36 37 38 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 36 def processed_at @processed_at end |
#published_at ⇒ Object
Timestamp when the event was published.
33 34 35 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 33 def published_at @published_at end |
#scheduled_to ⇒ Object
Timestamp after which the event is scheduled to be processed.
42 43 44 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 42 def scheduled_to @scheduled_to end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
90 91 92 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 90 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
95 96 97 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 95 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 73 def self.attribute_map { :'id' => :'id', :'flow_id' => :'flowId', :'integration_name' => :'integrationName', :'instance_name' => :'instanceName', :'event_type' => :'eventType', :'published_at' => :'publishedAt', :'processed_at' => :'processedAt', :'delivered_at' => :'deliveredAt', :'scheduled_to' => :'scheduledTo', :'_retry' => :'retry', :'payload' => :'payload' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 350 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
117 118 119 120 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 117 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 100 def self.openapi_types { :'id' => :'Integer', :'flow_id' => :'Integer', :'integration_name' => :'String', :'instance_name' => :'String', :'event_type' => :'IntegrationHubEventType', :'published_at' => :'Time', :'processed_at' => :'Time', :'delivered_at' => :'Time', :'scheduled_to' => :'Time', :'_retry' => :'Integer', :'payload' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 319 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && flow_id == o.flow_id && integration_name == o.integration_name && instance_name == o.instance_name && event_type == o.event_type && published_at == o.published_at && processed_at == o.processed_at && delivered_at == o.delivered_at && scheduled_to == o.scheduled_to && _retry == o._retry && payload == o.payload end |
#eql?(o) ⇒ Boolean
337 338 339 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 337 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
343 344 345 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 343 def hash [id, flow_id, integration_name, instance_name, event_type, published_at, processed_at, delivered_at, scheduled_to, _retry, payload].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 199 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @flow_id.nil? invalid_properties.push('invalid value for "flow_id", flow_id cannot be nil.') end if @event_type.nil? invalid_properties.push('invalid value for "event_type", event_type cannot be nil.') end if @published_at.nil? invalid_properties.push('invalid value for "published_at", published_at cannot be nil.') end if @scheduled_to.nil? invalid_properties.push('invalid value for "scheduled_to", scheduled_to cannot be nil.') end if @_retry.nil? invalid_properties.push('invalid value for "_retry", _retry cannot be nil.') end if @payload.nil? invalid_properties.push('invalid value for "payload", payload cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 372 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/talon_one_sdk/models/integration_hub_event_record.rb', line 235 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @flow_id.nil? return false if @event_type.nil? return false if @published_at.nil? return false if @scheduled_to.nil? return false if @_retry.nil? return false if @payload.nil? true end |