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

  public class Environment_2_0_0 : ICloneable {
    public object Clone() {
      Environment_2_0_0 copy = new Environment_2_0_0();
      copy.maxScriptMemoryGrowth = this.maxScriptMemoryGrowth;
      copy.maxAmountOfScripts = this.maxAmountOfScripts;
      copy.amountOfScripts = this.amountOfScripts;
      copy.maxScriptSize = this.maxScriptSize;
      copy.maxAllScriptSize = this.maxAllScriptSize;
      copy.allScriptSize = this.allScriptSize;
      copy.outputBufferSize = this.outputBufferSize;
      copy.restartInterval = this.restartInterval;
      copy.autoStartDelay = this.autoStartDelay;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["maxScriptMemoryGrowth"] = this.maxScriptMemoryGrowth;
      json["maxAmountOfScripts"] = this.maxAmountOfScripts;
      json["amountOfScripts"] = this.amountOfScripts;
      json["maxScriptSize"] = this.maxScriptSize;
      json["maxAllScriptSize"] = this.maxAllScriptSize;
      json["allScriptSize"] = this.allScriptSize;
      json["outputBufferSize"] = this.outputBufferSize;
      json["restartInterval"] = this.restartInterval;
      json["autoStartDelay"] = this.autoStartDelay;
      return json;
    }

    public static Environment_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      Environment_2_0_0 inst = new Environment_2_0_0();
      inst.maxScriptMemoryGrowth = (int)json["maxScriptMemoryGrowth"];
      inst.maxAmountOfScripts = (int)json["maxAmountOfScripts"];
      inst.amountOfScripts = (int)json["amountOfScripts"];
      inst.maxScriptSize = (int)json["maxScriptSize"];
      inst.maxAllScriptSize = (int)json["maxAllScriptSize"];
      inst.allScriptSize = (int)json["allScriptSize"];
      inst.outputBufferSize = (int)json["outputBufferSize"];
      inst.restartInterval = (int)json["restartInterval"];
      inst.autoStartDelay = (int)json["autoStartDelay"];
      return inst;
    }

    public int maxScriptMemoryGrowth = 0;
    public int maxAmountOfScripts = 0;
    public int amountOfScripts = 0;
    public int maxScriptSize = 0;
    public int maxAllScriptSize = 0;
    public int allScriptSize = 0;
    public int outputBufferSize = 0;
    public int restartInterval = 0;
    public int autoStartDelay = 0;
  }
}
