class Ittybit::Automations::AutomationsListResponseItemWorkflowItemRef
def self.from_json(json_object:)
-
(Ittybit::Automations::AutomationsListResponseItemWorkflowItemRef)
-
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"] ref = parsed_json["ref"] next_ = parsed_json["next"]&.map do |item| item = item.to_json Ittybit::Automations::AutomationsListResponseItemWorkflowItemRefNextItem.from_json(json_object: item) end new( kind: kind, ref: ref, next_: next_, additional_properties: struct ) end
def self.validate_raw(obj:)
-
(Void)
-
Parameters:
-
obj
(Object
) --
def self.validate_raw(obj:) obj.kind.is_a?(Ittybit::Automations::AutomationsListResponseItemWorkflowItemRefKind) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.") obj.ref&.is_a?(String) != false || raise("Passed value for field obj.ref is not the expected type, validation failed.") obj.next_&.is_a?(Array) != false || raise("Passed value for field obj.next_ is not the expected type, validation failed.") end
def initialize(kind:, ref: OMIT, next_: OMIT, additional_properties: nil)
-
(Ittybit::Automations::AutomationsListResponseItemWorkflowItemRef)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
next_
(Array
) -- -
ref
(String
) -- -
kind
(Ittybit::Automations::AutomationsListResponseItemWorkflowItemRefKind
) --
def initialize(kind:, ref: OMIT, next_: OMIT, additional_properties: nil) @kind = kind @ref = ref if ref != OMIT @next_ = next_ if next_ != OMIT @additional_properties = additional_properties @_field_set = { "kind": kind, "ref": ref, "next": next_ }.reject do |_k, v| v == OMIT end end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end