Class: Hook0::Generated::ReplayEvent
- Inherits:
-
Object
- Object
- Hook0::Generated::ReplayEvent
- Defined in:
- lib/hook0/generated/models.rb
Overview
The ReplayEvent the API declares.
Instance Attribute Summary collapse
-
#application_id ⇒ Object
readonly
Returns the value of attribute application_id.
Class Method Summary collapse
-
.from_json(value) ⇒ ReplayEvent
Read one out of what the API answered.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Whether that value carries the same members as this one.
-
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
-
#initialize(application_id:) ⇒ ReplayEvent
constructor
A new instance of ReplayEvent.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(application_id:) ⇒ ReplayEvent
Returns a new instance of ReplayEvent.
2206 2207 2208 2209 |
# File 'lib/hook0/generated/models.rb', line 2206 def initialize(application_id:) @application_id = application_id freeze end |
Instance Attribute Details
#application_id ⇒ Object (readonly)
Returns the value of attribute application_id.
2203 2204 2205 |
# File 'lib/hook0/generated/models.rb', line 2203 def application_id @application_id end |
Class Method Details
.from_json(value) ⇒ ReplayEvent
Read one out of what the API answered.
2215 2216 2217 2218 2219 2220 |
# File 'lib/hook0/generated/models.rb', line 2215 def self.from_json(value) fields = Runtime.as_fields(value, "ReplayEvent") new( application_id: Runtime.read(fields, "application_id", Runtime::UUID) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
2235 2236 2237 |
# File 'lib/hook0/generated/models.rb', line 2235 def ==(other) other.is_a?(ReplayEvent) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
2243 2244 2245 |
# File 'lib/hook0/generated/models.rb', line 2243 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
2225 2226 2227 2228 2229 |
# File 'lib/hook0/generated/models.rb', line 2225 def to_h out = {} out["application_id"] = @application_id out end |