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

  public class Rating_2_0_0 : ICloneable {
    public object Clone() {
      Rating_2_0_0 copy = new Rating_2_0_0();
      copy.current = this.current;
      copy.decimalCurrent = this.decimalCurrent;
      copy.minVoltage = this.minVoltage;
      copy.maxVoltage = this.maxVoltage;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["current"] = this.current;
      json["decimalCurrent"] = this.decimalCurrent;
      json["minVoltage"] = this.minVoltage;
      json["maxVoltage"] = this.maxVoltage;
      return json;
    }

    public static Rating_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      Rating_2_0_0 inst = new Rating_2_0_0();
      inst.current = (int)json["current"];
      inst.decimalCurrent = (float)json["decimalCurrent"];
      inst.minVoltage = (int)json["minVoltage"];
      inst.maxVoltage = (int)json["maxVoltage"];
      return inst;
    }

    public int current = 0;
    public float decimalCurrent = 0.0f;
    public int minVoltage = 0;
    public int maxVoltage = 0;
  }
}
