// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright 2025 Raritan Inc. All rights reserved.
//
// This file was generated by IdlC from User.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 UserCapabilities : ICloneable {
    public object Clone() {
      UserCapabilities copy = new UserCapabilities();
      copy.canSetPassword = this.canSetPassword;
      copy.canSetPreferences = this.canSetPreferences;
      return copy;
    }

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

    public static UserCapabilities Decode(LightJson.JsonObject json, Agent agent) {
      UserCapabilities inst = new UserCapabilities();
      inst.canSetPassword = (bool)json["canSetPassword"];
      inst.canSetPreferences = (bool)json["canSetPreferences"];
      return inst;
    }

    public bool canSetPassword = false;
    public bool canSetPreferences = false;
  }
}
