// 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 WlanSettings_2_0_0 : ICloneable {
    public object Clone() {
      WlanSettings_2_0_0 copy = new WlanSettings_2_0_0();
      copy.enableHT = this.enableHT;
      copy.ssid = this.ssid;
      copy.bssid = this.bssid;
      copy.secProtocol = this.secProtocol;
      copy.authType = this.authType;
      copy.psk = this.psk;
      copy.clearPsk = this.clearPsk;
      copy.eap = this.eap;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["enableHT"] = this.enableHT;
      json["ssid"] = this.ssid;
      json["bssid"] = this.bssid;
      json["secProtocol"] = (int)this.secProtocol;
      json["authType"] = (int)this.authType;
      json["psk"] = this.psk;
      json["clearPsk"] = this.clearPsk;
      json["eap"] = this.eap.Encode();
      return json;
    }

    public static WlanSettings_2_0_0 Decode(LightJson.JsonObject json, Agent agent) {
      WlanSettings_2_0_0 inst = new WlanSettings_2_0_0();
      inst.enableHT = (bool)json["enableHT"];
      inst.ssid = (string)json["ssid"];
      inst.bssid = (string)json["bssid"];
      inst.secProtocol = (Com.Raritan.Idl.net.WlanSecProtocol)(int)json["secProtocol"];
      inst.authType = (Com.Raritan.Idl.net.WlanAuthType)(int)json["authType"];
      inst.psk = (string)json["psk"];
      inst.clearPsk = (bool)json["clearPsk"];
      inst.eap = Com.Raritan.Idl.net.EapAuthSettings_2_0_0.Decode(json["eap"], agent);
      return inst;
    }

    public bool enableHT = false;
    public string ssid = "";
    public string bssid = "";
    public Com.Raritan.Idl.net.WlanSecProtocol secProtocol = Com.Raritan.Idl.net.WlanSecProtocol.WPA2;
    public Com.Raritan.Idl.net.WlanAuthType authType = Com.Raritan.Idl.net.WlanAuthType.NONE;
    public string psk = "";
    public bool clearPsk = false;
    public Com.Raritan.Idl.net.EapAuthSettings_2_0_0 eap = new Com.Raritan.Idl.net.EapAuthSettings_2_0_0();
  }
}
