Class: DeleteNetworkPrivateElementTypeElementIDResponse401Error

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



3544
3545
3546
3547
3548
3549
3550
# File 'lib/schemas.rb', line 3544

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

.from_json!(json) ⇒ Object



3552
3553
3554
# File 'lib/schemas.rb', line 3552

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

Instance Method Details

#to_dynamicObject



3556
3557
3558
3559
3560
3561
# File 'lib/schemas.rb', line 3556

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

#to_json(options = nil) ⇒ Object



3563
3564
3565
# File 'lib/schemas.rb', line 3563

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