io.enterpriseai.RequestOptions
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/RequestOptions.java. Back to the Java SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class RequestOptions
Per call options: explicit Idempotency-Key, W3C traceparent and extra headers. When no Idempotency-Key is given, every POST gets a generated one that stays the same across retries; another method (a PUT such as RagAgentClient.updateBranding) sends it only when given.
RequestOptions.header
RequestOptions header(String name, String value)
Adds a header sent with this call only.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the HTTP header. | |
value | String | yes | Value of the header; a name already present is replaced. |
Returns: RequestOptions. A RequestOptions: Per call options: explicit Idempotency-Key, W3C traceparent and extra headers. When no Idempotency-Key is given, every POST gets a generated one that stays the same across retries; another method (a PUT such as RagAgentClient.updateBranding) sends it only when given.
RequestOptions.headers
Map<String, String> headers()
Extra headers of the call.
This element takes no parameter.
Returns: Map<String, String>. The mutable map of the added headers, in insertion order.
RequestOptions.idempotencyKey
RequestOptions idempotencyKey(String key)
Sets or reads the Idempotency-Key sent on a POST.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
key | String | yes | Idempotency key to send instead of the generated one. |
Returns: RequestOptions. These same RequestOptions for the setter; the key set, or null, for the getter.
RequestOptions.idempotencyKey
String idempotencyKey()
Sets or reads the Idempotency-Key sent on a POST.
This element takes no parameter.
Returns: String. These same RequestOptions for the setter; the key set, or null, for the getter.
RequestOptions.traceparent
RequestOptions traceparent(String value)
Sets or reads the W3C traceparent sent with this call.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
value | String | yes | W3C traceparent, as 00-<trace>-<span>-01. |
Returns: RequestOptions. These same RequestOptions for the setter; the traceparent set, or null, for the getter.
RequestOptions.traceparent
String traceparent()
Sets or reads the W3C traceparent sent with this call.
This element takes no parameter.
Returns: String. These same RequestOptions for the setter; the traceparent set, or null, for the getter.