AssistantQueryRequest


class AssistantQueryRequest : EgressRequest<AssistantQueryResponse!>, Parcelable
kotlin.Any
   ↳ android.app.privatecompute.EgressRequest<android.app.privatecompute.AssistantQueryResponse>
   ↳ android.app.privatecompute.AssistantQueryRequest

Request object specifically for Assistant Query Egress operations. Binds this request to the AssistantQueryResponse type.

These requests are subject to system validations, rate limits, and user consent. If the non-PCC process does not return the response in a reasonable timeframe, the platform will unbind from the non-PCC process and return PccEgressException.ERROR_NO_RESPONSE_FROM_EGRESS_SERVICE via the callback.

A request is considered invalid and will cause PccSandboxManager.egressData to throw IllegalArgumentException synchronously if:

  • The request or its Query payload is null.
  • The Query.getSessionId() or Query.getQueryString() is null.
  • The session ID has already been used (reused/replayed).
  • The query string size exceeds the maximum allowed limit (10 KB).
  • The calling package does not contain the user-chosen default Assistant.

A request will cause PccSandboxManager.egressData to throw IllegalStateException synchronously if:

  • The user has not consented to egress for the Assistant service.
  • The egress rate limit has been exceeded. The system enforces two limits:
    • A maximum of 100 successful egress calls in a rolling 24-hour window.
    • A maximum of 200 total egress attempts in a rolling 24-hour window.

Summary

Nested classes

Builder for AssistantQueryRequest.

Payload containing the raw query details to be routed to the non-PCC assistant process.

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

AssistantQueryRequest.Query

Returns the query payload associated with this request.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AssistantQueryRequest!>

Creator for AssistantQueryRequest instance.

Public methods

describeContents

fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getQuery

fun getQuery(): AssistantQueryRequest.Query

Returns the query payload associated with this request.

Return
AssistantQueryRequest.Query The Query payload.
This value cannot be null.

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:

Properties

CREATOR

static val CREATOR: Parcelable.Creator<AssistantQueryRequest!>

Creator for AssistantQueryRequest instance.