Class: GetEnvironmentsEnvironmentIDResponse400Error

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



9745
9746
9747
9748
9749
9750
9751
# File 'lib/schemas.rb', line 9745

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

.from_json!(json) ⇒ Object



9753
9754
9755
# File 'lib/schemas.rb', line 9753

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

Instance Method Details

#to_dynamicObject



9757
9758
9759
9760
9761
9762
# File 'lib/schemas.rb', line 9757

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

#to_json(options = nil) ⇒ Object



9764
9765
9766
# File 'lib/schemas.rb', line 9764

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