// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2026 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from PortForwardingAutoSetup.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 PortForwardingAutoSetupExpansionUnit : ICloneable {
    public object Clone() {
      PortForwardingAutoSetupExpansionUnit copy = new PortForwardingAutoSetupExpansionUnit();
      copy.state = this.state;
      copy.errMsg = this.errMsg;
      return copy;
    }

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

    public static PortForwardingAutoSetupExpansionUnit Decode(LightJson.JsonObject json, Agent agent) {
      PortForwardingAutoSetupExpansionUnit inst = new PortForwardingAutoSetupExpansionUnit();
      inst.state = (Com.Raritan.Idl.net.PortForwardingAutoSetupExpansionUnitState)(int)json["state"];
      inst.errMsg = (string)json["errMsg"];
      return inst;
    }

    public Com.Raritan.Idl.net.PortForwardingAutoSetupExpansionUnitState state = Com.Raritan.Idl.net.PortForwardingAutoSetupExpansionUnitState.PF_AUTO_SETUP_UNIT_ALREADY_EXISTS;
    public string errMsg = "";
  }
}
