/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.robotraconteur;

import java.util.*;

public class AuthenticatedUser {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected AuthenticatedUser(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(AuthenticatedUser obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        RobotRaconteurJavaJNI.delete_AuthenticatedUser(swigCPtr);
      }
      swigCPtr = 0;
    }
  }


public String getUsername()
  {
	return _GetUsername();
  }

  public String[] getPrivileges()
  {
	  vectorstring in=_GetPrivileges();
	String[] o=new String[(int)in.size()];
	for (int i=0; i<o.length; i++)
	{
		o[i]=in.get(i);
	}
	return o;
  }

  public String[] getProperties()
  {
	  vectorstring in=_GetProperties();
	String[] o=new String[(int)in.size()];
	for (int i=0; i<o.length; i++)
	{
		o[i]=in.get(i);
	}
	return o;
  }

  public TimeSpec getLoginTime()
  {
	  return _GetLoginTime();

  }

  public TimeSpec getLastAccessTime()
  {
	  return _GetLastAccessTime();


  }


  private String _GetUsername() {
    return RobotRaconteurJavaJNI.AuthenticatedUser__GetUsername(swigCPtr, this);
  }

  private vectorstring _GetPrivileges() {
    return new vectorstring(RobotRaconteurJavaJNI.AuthenticatedUser__GetPrivileges(swigCPtr, this), true);
  }

  private vectorstring _GetProperties() {
    return new vectorstring(RobotRaconteurJavaJNI.AuthenticatedUser__GetProperties(swigCPtr, this), true);
  }

  private com.robotraconteur.TimeSpec _GetLoginTime() {
    return new TimeSpec(RobotRaconteurJavaJNI.AuthenticatedUser__GetLoginTime(swigCPtr, this),true);
}

  private com.robotraconteur.TimeSpec _GetLastAccessTime() {
    return new TimeSpec(RobotRaconteurJavaJNI.AuthenticatedUser__GetLastAccessTime(swigCPtr, this),true);
}

}
