// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2020 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from Services.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 ServiceSettings : ICloneable {
    public object Clone() {
      ServiceSettings copy = new ServiceSettings();
      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 ServiceSettings Decode(LightJson.JsonObject json, Agent agent) {
      ServiceSettings inst = new ServiceSettings();
      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;
  }
}
