Class: DeleteEnvironmentsEnvironmentIDResponse401

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



2008
2009
2010
2011
2012
2013
# File 'lib/schemas.rb', line 2008

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

.from_json!(json) ⇒ Object



2015
2016
2017
# File 'lib/schemas.rb', line 2015

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

Instance Method Details

#to_dynamicObject



2019
2020
2021
2022
2023
# File 'lib/schemas.rb', line 2019

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

#to_json(options = nil) ⇒ Object



2025
2026
2027
# File 'lib/schemas.rb', line 2025

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