Class: PutEnvironmentsEnvironmentIDResponse401Error

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



32267
32268
32269
32270
32271
32272
32273
# File 'lib/schemas.rb', line 32267

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

.from_json!(json) ⇒ Object



32275
32276
32277
# File 'lib/schemas.rb', line 32275

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

Instance Method Details

#to_dynamicObject



32279
32280
32281
32282
32283
32284
# File 'lib/schemas.rb', line 32279

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

#to_json(options = nil) ⇒ Object



32286
32287
32288
# File 'lib/schemas.rb', line 32286

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