Class: GetEnvironmentsEnvironmentIDResponse401Error

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



9802
9803
9804
9805
9806
9807
9808
# File 'lib/schemas.rb', line 9802

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

.from_json!(json) ⇒ Object



9810
9811
9812
# File 'lib/schemas.rb', line 9810

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

Instance Method Details

#to_dynamicObject



9814
9815
9816
9817
9818
9819
# File 'lib/schemas.rb', line 9814

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

#to_json(options = nil) ⇒ Object



9821
9822
9823
# File 'lib/schemas.rb', line 9821

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