// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2022 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 PortForwardingProtocolMapping : ICloneable {
    public object Clone() {
      PortForwardingProtocolMapping copy = new PortForwardingProtocolMapping();
      copy.appProtoId = this.appProtoId;
      copy.appProtoName = this.appProtoName;
      copy.transportProtoName = this.transportProtoName;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["appProtoId"] = this.appProtoId;
      json["appProtoName"] = this.appProtoName;
      json["transportProtoName"] = this.transportProtoName;
      return json;
    }

    public static PortForwardingProtocolMapping Decode(LightJson.JsonObject json, Agent agent) {
      PortForwardingProtocolMapping inst = new PortForwardingProtocolMapping();
      inst.appProtoId = (int)json["appProtoId"];
      inst.appProtoName = (string)json["appProtoName"];
      inst.transportProtoName = (string)json["transportProtoName"];
      return inst;
    }

    public int appProtoId = 0;
    public string appProtoName = "";
    public string transportProtoName = "";
  }
}
