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

  public class Account : ICloneable {
    public object Clone() {
      Account copy = new Account();
      copy.name = this.name;
      copy.info = this.info;
      return copy;
    }

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

    public static Account Decode(LightJson.JsonObject json, Agent agent) {
      Account inst = new Account();
      inst.name = (string)json["name"];
      inst.info = Com.Raritan.Idl.usermgmt.UserInfo.Decode(json["info"], agent);
      return inst;
    }

    public string name = "";
    public Com.Raritan.Idl.usermgmt.UserInfo info = new Com.Raritan.Idl.usermgmt.UserInfo();
  }
}
