// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2025 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 EthSettings_4_0_0 : ICloneable {
    public object Clone() {
      EthSettings_4_0_0 copy = new EthSettings_4_0_0();
      copy.linkMode = this.linkMode;
      copy.mtu = this.mtu;
      copy.authType = this.authType;
      copy.eap = this.eap;
      copy.lldpEnabled = this.lldpEnabled;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["linkMode"] = this.linkMode.Encode();
      json["mtu"] = this.mtu;
      json["authType"] = (int)this.authType;
      json["eap"] = this.eap.Encode();
      json["lldpEnabled"] = this.lldpEnabled;
      return json;
    }

    public static EthSettings_4_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      EthSettings_4_0_0 inst = new EthSettings_4_0_0();
      inst.linkMode = Com.Raritan.Idl.net.EthLinkMode.Decode(json["linkMode"], agent);
      inst.mtu = (int)json["mtu"];
      inst.authType = (Com.Raritan.Idl.net.EthAuthType)(int)json["authType"];
      inst.eap = Com.Raritan.Idl.net.EapAuthSettings_3_0_0.Decode(json["eap"], agent);
      inst.lldpEnabled = (bool)json["lldpEnabled"];
      return inst;
    }

    public Com.Raritan.Idl.net.EthLinkMode linkMode = new Com.Raritan.Idl.net.EthLinkMode();
    public int mtu = 0;
    public Com.Raritan.Idl.net.EthAuthType authType = Com.Raritan.Idl.net.EthAuthType.ETH_AUTH_NONE;
    public Com.Raritan.Idl.net.EapAuthSettings_3_0_0 eap = new Com.Raritan.Idl.net.EapAuthSettings_3_0_0();
    public bool lldpEnabled = false;
  }
}
