// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2020 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 PortForwardingSettings_2_0_0 : ICloneable {
    public object Clone() {
      PortForwardingSettings_2_0_0 copy = new PortForwardingSettings_2_0_0();
      copy.enabled = this.enabled;
      copy.role = this.role;
      copy.masterDownstreamIfName = this.masterDownstreamIfName;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["enabled"] = this.enabled;
      json["role"] = (int)this.role;
      json["masterDownstreamIfName"] = this.masterDownstreamIfName;
      return json;
    }

    public static PortForwardingSettings_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      PortForwardingSettings_2_0_0 inst = new PortForwardingSettings_2_0_0();
      inst.enabled = (bool)json["enabled"];
      inst.role = (Com.Raritan.Idl.net.PortForwardingRole)(int)json["role"];
      inst.masterDownstreamIfName = (string)json["masterDownstreamIfName"];
      return inst;
    }

    public bool enabled = false;
    public Com.Raritan.Idl.net.PortForwardingRole role = Com.Raritan.Idl.net.PortForwardingRole.MASTER;
    public string masterDownstreamIfName = "";
  }
}
