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

  public class ServiceConfig : ICloneable {
    public object Clone() {
      ServiceConfig copy = new ServiceConfig();
      copy.service = this.service;
      copy.enable = this.enable;
      copy.port = this.port;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["service"] = this.service;
      json["enable"] = this.enable;
      json["port"] = this.port;
      return json;
    }

    public static ServiceConfig Decode(LightJson.JsonObject json, Agent agent) {
      ServiceConfig inst = new ServiceConfig();
      inst.service = (string)json["service"];
      inst.enable = (bool)json["enable"];
      inst.port = (int)json["port"];
      return inst;
    }

    public string service = "";
    public bool enable = false;
    public int port = 0;
  }
}
