Class: DeleteNetworkPrivateElementTypeElementIDResponse

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



3482
3483
3484
3485
3486
3487
# File 'lib/schemas.rb', line 3482

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    element_type: d["elementType"] ? DeleteNetworkPrivateElementTypeElementIDResponseElementType.from_dynamic!(d["elementType"]) : nil,
  )
end

.from_json!(json) ⇒ Object



3489
3490
3491
# File 'lib/schemas.rb', line 3489

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

Instance Method Details

#to_dynamicObject



3493
3494
3495
3496
3497
# File 'lib/schemas.rb', line 3493

def to_dynamic
  {
    "elementType" => element_type&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



3499
3500
3501
# File 'lib/schemas.rb', line 3499

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