// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2020 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 CommonSettings_2_0_0 : ICloneable {
    public object Clone() {
      CommonSettings_2_0_0 copy = new CommonSettings_2_0_0();
      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 CommonSettings_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      CommonSettings_2_0_0 inst = new CommonSettings_2_0_0();
      inst.dns = Com.Raritan.Idl.net.DnsSettings_2_0_0.Decode(json["dns"], agent);
      inst.routing = Com.Raritan.Idl.net.RoutingSettings_2_0_0.Decode(json["routing"], agent);
      inst.portForwarding = Com.Raritan.Idl.net.PortForwardingSettings_2_0_0.Decode(json["portForwarding"], agent);
      return inst;
    }

    public Com.Raritan.Idl.net.DnsSettings_2_0_0 dns = new Com.Raritan.Idl.net.DnsSettings_2_0_0();
    public Com.Raritan.Idl.net.RoutingSettings_2_0_0 routing = new Com.Raritan.Idl.net.RoutingSettings_2_0_0();
    public Com.Raritan.Idl.net.PortForwardingSettings_2_0_0 portForwarding = new Com.Raritan.Idl.net.PortForwardingSettings_2_0_0();
  }
}
