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