Class: GetApisAPIIDSchemasSchemaIDFilesFilePathResponse401

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



4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
# File 'lib/schemas.rb', line 4870

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_schemas_schema_id_files_file_path_response401_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



4881
4882
4883
# File 'lib/schemas.rb', line 4881

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

Instance Method Details

#to_dynamicObject



4885
4886
4887
4888
4889
4890
4891
4892
4893
# File 'lib/schemas.rb', line 4885

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

#to_json(options = nil) ⇒ Object



4895
4896
4897
# File 'lib/schemas.rb', line 4895

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