Class: PostWorkspacesResponse400

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



27815
27816
27817
27818
27819
27820
27821
# File 'lib/schemas.rb', line 27815

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    message:                          d["message"],
    post_workspaces_response400_name: d["name"],
  )
end

.from_json!(json) ⇒ Object



27823
27824
27825
# File 'lib/schemas.rb', line 27823

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

Instance Method Details

#to_dynamicObject



27827
27828
27829
27830
27831
27832
# File 'lib/schemas.rb', line 27827

def to_dynamic
  {
    "message" => message,
    "name"    => post_workspaces_response400_name,
  }
end

#to_json(options = nil) ⇒ Object



27834
27835
27836
# File 'lib/schemas.rb', line 27834

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