// 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 IpAddrCidr : ICloneable {
    public object Clone() {
      IpAddrCidr copy = new IpAddrCidr();
      copy.addr = this.addr;
      copy.prefixLen = this.prefixLen;
      return copy;
    }

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

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

    public string addr = "";
    public int prefixLen = 0;
  }
}
