// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2024 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from PeripheralDeviceSlot.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.peripheral {

  public class PosElement_3_0_0 : ICloneable {
    public object Clone() {
      PosElement_3_0_0 copy = new PosElement_3_0_0();
      copy.portType = this.portType;
      copy.port = this.port;
      return copy;
    }

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

    public static PosElement_3_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      PosElement_3_0_0 inst = new PosElement_3_0_0();
      inst.portType = (Com.Raritan.Idl.peripheral.PortType_3_0_0)(int)json["portType"];
      inst.port = (string)json["port"];
      return inst;
    }

    public Com.Raritan.Idl.peripheral.PortType_3_0_0 portType = Com.Raritan.Idl.peripheral.PortType_3_0_0.ONBOARD;
    public string port = "";
  }
}
