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

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["speed"] = (int)this.speed;
      json["duplexMode"] = (int)this.duplexMode;
      return json;
    }

    public static EthLinkMode Decode(LightJson.JsonObject json, Agent agent) {
      EthLinkMode inst = new EthLinkMode();
      inst.speed = (Com.Raritan.Idl.net.EthSpeed)(int)json["speed"];
      inst.duplexMode = (Com.Raritan.Idl.net.EthDuplexMode)(int)json["duplexMode"];
      return inst;
    }

    public Com.Raritan.Idl.net.EthSpeed speed = Com.Raritan.Idl.net.EthSpeed.SPEED_AUTO;
    public Com.Raritan.Idl.net.EthDuplexMode duplexMode = Com.Raritan.Idl.net.EthDuplexMode.DUPLEX_MODE_AUTO;
  }
}
