Class: GetApisAPIIDSchemasSchemaIDFilesResponse400

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



5138
5139
5140
5141
5142
5143
5144
5145
# File 'lib/schemas.rb', line 5138

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

.from_json!(json) ⇒ Object



5147
5148
5149
# File 'lib/schemas.rb', line 5147

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

Instance Method Details

#to_dynamicObject



5151
5152
5153
5154
5155
5156
5157
# File 'lib/schemas.rb', line 5151

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

#to_json(options = nil) ⇒ Object



5159
5160
5161
# File 'lib/schemas.rb', line 5159

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