Class: DeleteEnvironmentsEnvironmentIDResponse404Error

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



2038
2039
2040
2041
2042
2043
2044
# File 'lib/schemas.rb', line 2038

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

.from_json!(json) ⇒ Object



2046
2047
2048
# File 'lib/schemas.rb', line 2046

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

Instance Method Details

#to_dynamicObject



2050
2051
2052
2053
2054
2055
# File 'lib/schemas.rb', line 2050

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

#to_json(options = nil) ⇒ Object



2057
2058
2059
# File 'lib/schemas.rb', line 2057

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