Class: GetApisAPIIDTasksTaskIDResponse401

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
# File 'lib/schemas.rb', line 5948

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                                         d["detail"],
    instance:                                       d["instance"],
    status:                                         d["status"],
    title:                                          d["title"],
    get_apis_api_id_tasks_task_id_response401_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



5959
5960
5961
# File 'lib/schemas.rb', line 5959

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



5963
5964
5965
5966
5967
5968
5969
5970
5971
# File 'lib/schemas.rb', line 5963

def to_dynamic
  {
    "detail"   => detail,
    "instance" => instance,
    "status"   => status,
    "title"    => title,
    "type"     => get_apis_api_id_tasks_task_id_response401_type,
  }
end

#to_json(options = nil) ⇒ Object



5973
5974
5975
# File 'lib/schemas.rb', line 5973

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end