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

  public class EnergyWiseSettings : ICloneable {
    public object Clone() {
      EnergyWiseSettings copy = new EnergyWiseSettings();
      copy.enabled = this.enabled;
      copy.domainName = this.domainName;
      copy.secret = this.secret;
      copy.port = this.port;
      copy.pollingInterval = this.pollingInterval;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["enabled"] = this.enabled;
      json["domainName"] = this.domainName;
      json["secret"] = this.secret;
      json["port"] = this.port;
      json["pollingInterval"] = this.pollingInterval;
      return json;
    }

    public static EnergyWiseSettings Decode(LightJson.JsonObject json, Agent agent) {
      EnergyWiseSettings inst = new EnergyWiseSettings();
      inst.enabled = (bool)json["enabled"];
      inst.domainName = (string)json["domainName"];
      inst.secret = (string)json["secret"];
      inst.port = (int)json["port"];
      inst.pollingInterval = (int)json["pollingInterval"];
      return inst;
    }

    public bool enabled = false;
    public string domainName = "";
    public string secret = "";
    public int port = 0;
    public int pollingInterval = 0;
  }
}
