# Class ApiResponse

java.lang.Object
com.google.adk.sessions.ApiResponse

All Implemented Interfaces:
  `AutoCloseable`

Direct Known Subclasses:
  `HttpApiResponse`

public abstract class ApiResponse extends Object implements AutoCloseable
The API response contains a response to a call to the GenAI APIs.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApiResponse()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `close()`
  `abstract okhttp3.ResponseBody`
  `getResponseBody()`
  Gets the HttpEntity.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ApiResponse

    public ApiResponse()

- ## Method Details

  - ### getResponseBody

    public abstract okhttp3.ResponseBody getResponseBody()
    Gets the HttpEntity.

  - ### close

    public abstract void close()
    Specified by:
      `close` in interface `AutoCloseable`