// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2023 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from Net.idl.

using System;
using System.Linq;
using LightJson;
using Com.Raritan.Idl;
using Com.Raritan.JsonRpc;
using Com.Raritan.Util;

#pragma warning disable 0108, 0219, 0414, 1591

namespace Com.Raritan.Idl.net {

  public class CommonInfo : ICloneable {
    public object Clone() {
      CommonInfo copy = new CommonInfo();
      copy.dns = this.dns;
      copy.routing = this.routing;
      copy.portForwarding = this.portForwarding;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["dns"] = this.dns.Encode();
      json["routing"] = this.routing.Encode();
      json["portForwarding"] = this.portForwarding.Encode();
      return json;
    }

    public static CommonInfo Decode(LightJson.JsonObject json, Agent agent) {
      CommonInfo inst = new CommonInfo();
      inst.dns = Com.Raritan.Idl.net.DnsInfo.Decode(json["dns"], agent);
      inst.routing = Com.Raritan.Idl.net.RoutingInfo.Decode(json["routing"], agent);
      inst.portForwarding = Com.Raritan.Idl.net.PortForwardingInfo.Decode(json["portForwarding"], agent);
      return inst;
    }

    public Com.Raritan.Idl.net.DnsInfo dns = new Com.Raritan.Idl.net.DnsInfo();
    public Com.Raritan.Idl.net.RoutingInfo routing = new Com.Raritan.Idl.net.RoutingInfo();
    public Com.Raritan.Idl.net.PortForwardingInfo portForwarding = new Com.Raritan.Idl.net.PortForwardingInfo();
  }
}
