Class: GetEnvironmentsEnvironmentIDResponse400

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



9772
9773
9774
9775
9776
9777
# File 'lib/schemas.rb', line 9772

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    error: d["error"] ? GetEnvironmentsEnvironmentIDResponse400Error.from_dynamic!(d["error"]) : nil,
  )
end

.from_json!(json) ⇒ Object



9779
9780
9781
# File 'lib/schemas.rb', line 9779

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

Instance Method Details

#to_dynamicObject



9783
9784
9785
9786
9787
# File 'lib/schemas.rb', line 9783

def to_dynamic
  {
    "error" => error&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



9789
9790
9791
# File 'lib/schemas.rb', line 9789

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