Package zendesk.core

Class AnonymousIdentity

  • All Implemented Interfaces:
    Identity


    public final class AnonymousIdentity
    extends java.lang.Object
    implements Identity

    This class models an identity which is used to identify an End User within a Zendesk instance.
    Please use the AnonymousIdentity.Builder to create an instance of this class. A UUID will be created if necessary and associated with the identity.

    If you don't know anything about your user please create an Identity like this:

              Identity identity = new AnonymousIdentity();
          

    If you do know something about the user then you can use the optional methods in the AnonymousIdentity.Builder to specify them.

    See Also:
    Anonymous access docs on developer.zendesk.com
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  AnonymousIdentity.Builder
      This is a builder class which is used to generate a Identity
    • Constructor Summary

      Constructors 
      Constructor and Description
      AnonymousIdentity()
      Creates a new, empty instance of an AnonymousIdentity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object o) 
      java.lang.String getEmail()
      Gets the email address associated with this anonymous identity
      java.lang.String getName()
      Gets the name associated with this anonymous identity
      java.lang.String getSdkGuid()
      Gets the sdk guid associated with this anonymous identity
      int hashCode() 
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnonymousIdentity

        public AnonymousIdentity()
        Creates a new, empty instance of an AnonymousIdentity.

        This constructor provides the most basic authentication identity, and should be used when no additional information about the user is desired. To include values for name, or email address, use the AnonymousIdentity.Builder.

    • Method Detail

      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getEmail

        public java.lang.String getEmail()
        Gets the email address associated with this anonymous identity
        Returns:
        The email address or null if it was not set
      • getName

        public java.lang.String getName()
        Gets the name associated with this anonymous identity
        Returns:
        The name or null if it was not set
      • getSdkGuid

        public java.lang.String getSdkGuid()
        Gets the sdk guid associated with this anonymous identity
        Returns:
        The sdk guid