// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2020 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from Security.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.security {

  public class SSHKeyFingerprint : ICloneable {
    public object Clone() {
      SSHKeyFingerprint copy = new SSHKeyFingerprint();
      copy.fingerprint = this.fingerprint;
      copy.type = this.type;
      return copy;
    }

    public LightJson.JsonObject Encode() {
      LightJson.JsonObject json = new LightJson.JsonObject();
      json["fingerprint"] = this.fingerprint;
      json["type"] = (int)this.type;
      return json;
    }

    public static SSHKeyFingerprint Decode(LightJson.JsonObject json, Agent agent) {
      SSHKeyFingerprint inst = new SSHKeyFingerprint();
      inst.fingerprint = (string)json["fingerprint"];
      inst.type = (Com.Raritan.Idl.security.SSHKeyFingerprintType)(int)json["type"];
      return inst;
    }

    public string fingerprint = "";
    public Com.Raritan.Idl.security.SSHKeyFingerprintType type = Com.Raritan.Idl.security.SSHKeyFingerprintType.SSH_KEY_FPRINT_TYPE_MD5_HEX;
  }
}
