// 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 RoutingSettings : ICloneable {
    public object Clone() {
      RoutingSettings copy = new RoutingSettings();
      copy.ipv4 = this.ipv4;
      copy.ipv6 = this.ipv6;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["ipv4"] = this.ipv4.Encode();
      json["ipv6"] = this.ipv6.Encode();
      return json;
    }

    public static RoutingSettings Decode(LightJson.JsonObject json, Agent agent) {
      RoutingSettings inst = new RoutingSettings();
      inst.ipv4 = Com.Raritan.Idl.net.IpRoutingSettings.Decode(json["ipv4"], agent);
      inst.ipv6 = Com.Raritan.Idl.net.IpRoutingSettings.Decode(json["ipv6"], agent);
      return inst;
    }

    public Com.Raritan.Idl.net.IpRoutingSettings ipv4 = new Com.Raritan.Idl.net.IpRoutingSettings();
    public Com.Raritan.Idl.net.IpRoutingSettings ipv6 = new Com.Raritan.Idl.net.IpRoutingSettings();
  }
}
