code: public ApiSuccessResponse cancelConsultationChat(String id, CancelConsultData cancelConsultData) throws ApiException {
          ApiResponse<ApiSuccessResponse> resp = cancelConsultationChatWithHttpInfo(id, cancelConsultData);
          return resp.getData();
      }
docs: Cancel a chat consultation request
  Cancel a chat consultation request that was initialized by calling [/media/chat/interactions/{id}/consult-by-queue](/reference/workspace/Media/index.html#consultByQueue). If the agent has already accepted the invitation, the Workspace API can&#39;t cancel the consultation.
  @param id The ID of the chat interaction. (required)
  @param cancelConsultData Request parameters. (optional)
  @return ApiSuccessResponse
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body