# Class SessionKey

java.lang.Object
com.google.adk.JsonBaseModel
com.google.adk.sessions.SessionKey

public final class SessionKey extends JsonBaseModel
Key for a session, composed of appName, userId and session id.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SessionKey(String appName, String userId, String id)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `appName()`
  `boolean`
  `equals(Object o)`
  `static SessionKey`
  `fromJson(String json)`
  `int`
  `hashCode()`
  `String`
  `id()`
  `String`
  `toString()`
  `String`
  `userId()`

  ### Methods inherited from class JsonBaseModel

  `fromJsonNode, fromJsonString, getMapper, toJson, toJsonNode, toJsonString`
  Modifier and Type
  Method
  Description
  `static <T extends JsonBaseModel>
  T`
  `fromJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode, Class<T> clazz)`
  Deserializes a JsonNode to an object of the given type.
  `static <T extends JsonBaseModel>
  T`
  `fromJsonString(String jsonString, Class<T> clazz)`
  Deserializes a Json string to an object of the given type.
  `static com.fasterxml.jackson.databind.ObjectMapper`
  `getMapper()`
  Returns the mutable ObjectMapper instance used by ADK.
  `String`
  `toJson()`
  Serializes this object (i.e., the ObjectMappper instance used by ADK) to a Json string.
  `protected static com.fasterxml.jackson.databind.JsonNode`
  `toJsonNode(Object object)`
  Serializes an object to a JsonNode.
  `static String`
  `toJsonString(Object object)`
  Serializes an object to a Json string.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SessionKey

    public SessionKey(String appName, String userId, String id)

- ## Method Details

  - ### appName

    public String appName()

  - ### userId

    public String userId()

  - ### id

    public String id()

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### fromJson

    public static SessionKey fromJson(String json)