Class: PutNetworkPrivateElementTypeElementIDResponse401Error

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



33617
33618
33619
33620
33621
33622
33623
# File 'lib/schemas.rb', line 33617

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

.from_json!(json) ⇒ Object



33625
33626
33627
# File 'lib/schemas.rb', line 33625

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

Instance Method Details

#to_dynamicObject



33629
33630
33631
33632
33633
33634
# File 'lib/schemas.rb', line 33629

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

#to_json(options = nil) ⇒ Object



33636
33637
33638
# File 'lib/schemas.rb', line 33636

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