Files
ubicloud/serializers/private_subnet.rb
Burak Yucesoy 69ecb12e8d Combine all serializers under top level namespace
We merged all web and api serializers. There is no need for separate namespaces
anymore.
2024-05-28 21:42:31 +03:00

23 lines
510 B
Ruby

# frozen_string_literal: true
class Serializers::PrivateSubnet < Serializers::Base
def self.serialize_internal(ps, options = {})
base = {
id: ps.ubid,
name: ps.name,
state: ps.display_state,
location: ps.display_location,
net4: ps.net4.to_s,
net6: ps.net6.to_s,
firewalls: Serializers::Firewall.serialize(ps.firewalls),
nics: Serializers::Nic.serialize(ps.nics)
}
if options[:include_path]
base[:path] = ps.path
end
base
end
end