class Ittybit::WorkflowTaskStep
def self.from_json(json_object:)
-
(Ittybit::WorkflowTaskStep)
-
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"] format = parsed_json["format"] start = parsed_json["start"] end_ = parsed_json["end"] width = parsed_json["width"] height = parsed_json["height"] fit = parsed_json["fit"] background = parsed_json["background"] quality = parsed_json["quality"] next_ = parsed_json["next"] new( kind: kind, ref: ref, format: format, start: start, end_: end_, width: width, height: height, fit: fit, background: background, quality: quality, 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::WorkflowTaskStepKind) != 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.format&.is_a?(String) != false || raise("Passed value for field obj.format is not the expected type, validation failed.") obj.start&.is_a?(Float) != false || raise("Passed value for field obj.start is not the expected type, validation failed.") obj.end_&.is_a?(Float) != false || raise("Passed value for field obj.end_ is not the expected type, validation failed.") obj.width&.is_a?(Integer) != false || raise("Passed value for field obj.width is not the expected type, validation failed.") obj.height&.is_a?(Integer) != false || raise("Passed value for field obj.height is not the expected type, validation failed.") obj.fit&.is_a?(String) != false || raise("Passed value for field obj.fit is not the expected type, validation failed.") obj.background&.is_a?(String) != false || raise("Passed value for field obj.background is not the expected type, validation failed.") obj.quality&.is_a?(Integer) != false || raise("Passed value for field obj.quality 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, format: OMIT, start: OMIT, end_: OMIT, width: OMIT, height: OMIT, fit: OMIT,
-
(Ittybit::WorkflowTaskStep)
-
Parameters:
-
additional_properties
(OpenStruct
) -- Additional properties unmapped to the current class definition -
next_
(Array
) -- -
quality
(Integer
) -- -
background
(String
) -- -
fit
(String
) -- -
height
(Integer
) -- -
width
(Integer
) -- -
end_
(Float
) -- -
start
(Float
) -- -
format
(String
) -- -
ref
(String
) -- -
kind
(Ittybit::WorkflowTaskStepKind
) --
def initialize(kind:, ref: OMIT, format: OMIT, start: OMIT, end_: OMIT, width: OMIT, height: OMIT, fit: OMIT, background: OMIT, quality: OMIT, next_: OMIT, additional_properties: nil) @kind = kind @ref = ref if ref != OMIT @format = format if format != OMIT @start = start if start != OMIT @end_ = end_ if end_ != OMIT @width = width if width != OMIT @height = height if height != OMIT @fit = fit if fit != OMIT @background = background if background != OMIT @quality = quality if quality != OMIT @next_ = next_ if next_ != OMIT @additional_properties = additional_properties @_field_set = { "kind": kind, "ref": ref, "format": format, "start": start, "end": end_, "width": width, "height": height, "fit": fit, "background": background, "quality": quality, "next": next_ }.reject do |_k, v| v == OMIT end end
def to_json(*_args)
-
(String)
-
def to_json(*_args) @_field_set&.to_json end