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

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["staticRoutes"] = new JsonArray(this.staticRoutes.Select(
        _value => (JsonValue)(_value.Encode())));
      return json;
    }

    public static IpRoutingSettings_3_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      IpRoutingSettings_3_0_0 inst = new IpRoutingSettings_3_0_0();
      inst.staticRoutes = new System.Collections.Generic.List<Com.Raritan.Idl.net.IpRoute>(json["staticRoutes"].AsJsonArray.Select(
        _value => Com.Raritan.Idl.net.IpRoute.Decode(_value, agent)));
      return inst;
    }

    public System.Collections.Generic.IEnumerable<Com.Raritan.Idl.net.IpRoute> staticRoutes = new System.Collections.Generic.List<Com.Raritan.Idl.net.IpRoute>();
  }
}
