Class: GetNetworkPrivateResponse403Error

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



13983
13984
13985
13986
13987
13988
13989
# File 'lib/schemas.rb', line 13983

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

.from_json!(json) ⇒ Object



13991
13992
13993
# File 'lib/schemas.rb', line 13991

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

Instance Method Details

#to_dynamicObject



13995
13996
13997
13998
13999
14000
# File 'lib/schemas.rb', line 13995

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

#to_json(options = nil) ⇒ Object



14002
14003
14004
# File 'lib/schemas.rb', line 14002

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