class Ittybit::Links

def self.from_json(json_object:)

Returns:
  • (Ittybit::Links) -

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"]
  parent = parsed_json["parent"]
  new(
    self_: self_,
    parent: parent,
    additional_properties: struct
  )
end

def self.validate_raw(obj:)

Returns:
  • (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.parent&.is_a?(String) != false || raise("Passed value for field obj.parent is not the expected type, validation failed.")
end

def initialize(self_: OMIT, parent: OMIT, additional_properties: nil)

Returns:
  • (Ittybit::Links) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • parent (String) --
  • self_ (String) --
def initialize(self_: OMIT, parent: OMIT, additional_properties: nil)
  @self_ = self_ if self_ != OMIT
  @parent = parent if parent != OMIT
  @additional_properties = additional_properties
  @_field_set = { "self": self_, "parent": parent }.reject do |_k, v|
    v == OMIT
  end
end

def to_json(*_args)

Returns:
  • (String) -
def to_json(*_args)
  @_field_set&.to_json
end