Class: GetEnvironmentsEnvironmentIDResponse500

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



9918
9919
9920
9921
9922
9923
# File 'lib/schemas.rb', line 9918

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

.from_json!(json) ⇒ Object



9925
9926
9927
# File 'lib/schemas.rb', line 9925

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

Instance Method Details

#to_dynamicObject



9929
9930
9931
9932
9933
# File 'lib/schemas.rb', line 9929

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

#to_json(options = nil) ⇒ Object



9935
9936
9937
# File 'lib/schemas.rb', line 9935

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