// 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 IpRoute : ICloneable {
    public object Clone() {
      IpRoute copy = new IpRoute();
      copy.destNetAddrCidr = this.destNetAddrCidr;
      copy.nextHopAddr = this.nextHopAddr;
      copy.ifName = this.ifName;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["destNetAddrCidr"] = this.destNetAddrCidr.Encode();
      json["nextHopAddr"] = this.nextHopAddr;
      json["ifName"] = this.ifName;
      return json;
    }

    public static IpRoute Decode(LightJson.JsonObject json, Agent agent) {
      IpRoute inst = new IpRoute();
      inst.destNetAddrCidr = Com.Raritan.Idl.net.IpAddrCidr.Decode(json["destNetAddrCidr"], agent);
      inst.nextHopAddr = (string)json["nextHopAddr"];
      inst.ifName = (string)json["ifName"];
      return inst;
    }

    public Com.Raritan.Idl.net.IpAddrCidr destNetAddrCidr = new Com.Raritan.Idl.net.IpAddrCidr();
    public string nextHopAddr = "";
    public string ifName = "";
  }
}
