class Ittybit::AutomationTrigger
def self.from_json(json_object:)
-
(Ittybit::AutomationTrigger)
-
Parameters:
-
json_object
(String
) --
def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) kind = parsed_json["kind"] event = parsed_json["event"] new( kind: kind, event: event, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) obj.kind&.is_a?(String) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.") obj.event.is_a?(String) != false || raise("Passed value for field obj.event is not the expected type, validation failed.") end
def initialize(event:, kind: OMIT, additional_properties: nil)
-
(Ittybit::AutomationTrigger)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
event
(String
) -- -
kind
(String
) --
def initialize(event:, kind: OMIT, additional_properties: nil) @kind = kind if kind != OMIT @event = event @additional_properties = additional_properties @_field_set = { "kind": kind, "event": event }.reject do |_k, v| v == OMIT end end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end