Class: GetEnvironmentsEnvironmentIDResponse500Error

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



9891
9892
9893
9894
9895
9896
9897
# File 'lib/schemas.rb', line 9891

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

.from_json!(json) ⇒ Object



9899
9900
9901
# File 'lib/schemas.rb', line 9899

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

Instance Method Details

#to_dynamicObject



9903
9904
9905
9906
9907
9908
# File 'lib/schemas.rb', line 9903

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

#to_json(options = nil) ⇒ Object



9910
9911
9912
# File 'lib/schemas.rb', line 9910

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