// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2023 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 PortForwardingPrimaryUnitAddrInfo : ICloneable {
    public object Clone() {
      PortForwardingPrimaryUnitAddrInfo copy = new PortForwardingPrimaryUnitAddrInfo();
      copy.ifName = this.ifName;
      copy.addr = this.addr;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["ifName"] = this.ifName;
      json["addr"] = this.addr;
      return json;
    }

    public static PortForwardingPrimaryUnitAddrInfo Decode(LightJson.JsonObject json, Agent agent) {
      PortForwardingPrimaryUnitAddrInfo inst = new PortForwardingPrimaryUnitAddrInfo();
      inst.ifName = (string)json["ifName"];
      inst.addr = (string)json["addr"];
      return inst;
    }

    public string ifName = "";
    public string addr = "";
  }
}
