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

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["relayCycleCnt"] = this.relayCycleCnt;
      json["relayFailCnt"] = this.relayFailCnt;
      return json;
    }

    public static OutletStatistic Decode(LightJson.JsonObject json, Agent agent) {
      OutletStatistic inst = new OutletStatistic();
      inst.relayCycleCnt = (int)json["relayCycleCnt"];
      inst.relayFailCnt = (int)json["relayFailCnt"];
      return inst;
    }

    public int relayCycleCnt = 0;
    public int relayFailCnt = 0;
  }
}
