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

  public class EventType : ICloneable {
    public object Clone() {
      EventType copy = new EventType();
      copy.scope = this.scope;
      copy.key = this.key;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["scope"] = this.scope.ToString();
      json["key"] = this.key;
      return json;
    }

    public static EventType Decode(LightJson.JsonObject json, Agent agent) {
      EventType inst = new EventType();
      inst.scope = new TypeInfo(json["scope"], null);
      inst.key = (int)json["key"];
      return inst;
    }

    public TypeInfo scope = null;
    public int key = 0;
  }
}
