Package com.google.genai.gaos
Class Interactions
java.lang.Object
com.google.genai.gaos.Interactions
-
Method Summary
Modifier and TypeMethodDescriptionasync()Switches to the async SDK.cancel()Cancels an interaction by id.Cancels an interaction by id.Cancels an interaction by id.create()Creates a new interaction.Creates a new interaction.create(String apiVersion, CreateInteractionRequestBody body, Options options) Creates a new interaction.delete()Deletes the interaction by id.Deletes the interaction by id.Deletes the interaction by id.get()Retrieves the full details of a single interaction based on its `Interaction.id`.get(GetInteractionByIdRequest request) Retrieves the full details of a single interaction based on its `Interaction.id`.get(GetInteractionByIdRequest request, Options options) Retrieves the full details of a single interaction based on its `Interaction.id`.
-
Method Details
-
async
Switches to the async SDK.- Returns:
- The async SDK
-
create
Creates a new interaction.- Returns:
- The call builder
-
create
Creates a new interaction.- Parameters:
body- The request body.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
create
public CreateInteractionResponse create(@Nullable String apiVersion, @Nonnull CreateInteractionRequestBody body, @Nullable Options options) Creates a new interaction.- Parameters:
apiVersion- API version for request routing.body- The request body.options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
Deletes the interaction by id.- Returns:
- The call builder
-
delete
Deletes the interaction by id.- Parameters:
id- Required. The name of the interaction to delete.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
delete
public DeleteInteractionResponse delete(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Deletes the interaction by id.- Parameters:
apiVersion- API version for request routing.id- Required. The name of the interaction to delete.options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
Retrieves the full details of a single interaction based on its `Interaction.id`.- Returns:
- The call builder
-
get
Retrieves the full details of a single interaction based on its `Interaction.id`.- Parameters:
request- The request object containing all the parameters for the API call.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
get
public GetInteractionByIdResponse get(@Nonnull GetInteractionByIdRequest request, @Nullable Options options) Retrieves the full details of a single interaction based on its `Interaction.id`.- Parameters:
request- The request object containing all the parameters for the API call.options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
cancel
Cancels an interaction by id. This only applies to background interactions that are still running.- Returns:
- The call builder
-
cancel
Cancels an interaction by id. This only applies to background interactions that are still running.- Parameters:
id- Required. The name of the interaction to cancel.- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-
cancel
public CancelInteractionByIdResponse cancel(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options) Cancels an interaction by id. This only applies to background interactions that are still running.- Parameters:
apiVersion- API version for request routing.id- Required. The name of the interaction to cancel.options- additional options- Returns:
- The response from the API call
- Throws:
RuntimeException- subclass if the API call fails
-