Class: GetApisAPIIDSchemasSchemaIDFilesFilePathResponse400

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



4827
4828
4829
4830
4831
4832
4833
4834
# File 'lib/schemas.rb', line 4827

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

.from_json!(json) ⇒ Object



4836
4837
4838
# File 'lib/schemas.rb', line 4836

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

Instance Method Details

#to_dynamicObject



4840
4841
4842
4843
4844
4845
4846
# File 'lib/schemas.rb', line 4840

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => get_apis_api_id_schemas_schema_id_files_file_path_response400_type,
  }
end

#to_json(options = nil) ⇒ Object



4848
4849
4850
# File 'lib/schemas.rb', line 4848

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