class Vellum::PaginatedSlimDeploymentReadList

def self.from_json(json_object:)

Returns:
  • (PaginatedSlimDeploymentReadList) -

Parameters:
  • json_object (JSON) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  count = struct.count
  next_ = struct.next
  previous = struct.previous
  results = parsed_json["results"].map do |v|
    v = v.to_json
    SlimDeploymentRead.from_json(json_object: v)
  end
  new(count: count, next_: next_, previous: previous, results: results, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.count&.is_a?(Integer) != false || raise("Passed value for field obj.count 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.previous&.is_a?(String) != false || raise("Passed value for field obj.previous is not the expected type, validation failed.")
  obj.results&.is_a?(Array) != false || raise("Passed value for field obj.results is not the expected type, validation failed.")
end

def initialize(count: nil, next_: nil, previous: nil, results: nil, additional_properties: nil)

Returns:
  • (PaginatedSlimDeploymentReadList) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • results (Array) --
  • previous (String) --
  • next_ (String) --
  • count (Integer) --
def initialize(count: nil, next_: nil, previous: nil, results: nil, additional_properties: nil)
  # @type [Integer]
  @count = count
  # @type [String]
  @next_ = next_
  # @type [String]
  @previous = previous
  # @type [Array<SlimDeploymentRead>]
  @results = results
  # @type [OpenStruct] Additional properties unmapped to the current class definition
  @additional_properties = additional_properties
end

def to_json(*_args)

Returns:
  • (JSON) -
def to_json(*_args)
  { "count": @count, "next": @next_, "previous": @previous, "results": @results }.to_json
end