Class SessionCreateParams.Body.Builder
-
- All Implemented Interfaces:
public final class SessionCreateParams.Body.BuilderA builder for Body.
-
-
Method Summary
-
-
Method Detail
-
agent
final SessionCreateParams.Body.Builder agent(SessionCreateParams.Agent agent)
Agent identifier. Accepts the
agentID string, which pins the latest version for the session, or anagentobject with both id and version specified.
-
agent
final SessionCreateParams.Body.Builder agent(JsonField<SessionCreateParams.Agent> agent)
Sets Builder.agent to an arbitrary JSON value.
You should usually call Builder.agent with a well-typed Agent value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
agent
final SessionCreateParams.Body.Builder agent(String string)
Alias for calling agent with
Agent.ofString(string).
-
agent
final SessionCreateParams.Body.Builder agent(BetaManagedAgentsAgentParams betaManagedAgentsAgentParams)
Alias for calling agent with
Agent.ofBetaManagedAgentsAgentParams(betaManagedAgentsAgentParams).
-
agent
final SessionCreateParams.Body.Builder agent(BetaManagedAgentsAgentWithOverridesParams betaManagedAgentsAgentWithOverridesParams)
Alias for calling agent with
Agent.ofBetaManagedAgentsAgentWithOverridesParams(betaManagedAgentsAgentWithOverridesParams).
-
environmentId
final SessionCreateParams.Body.Builder environmentId(String environmentId)
ID of the
environmentdefining the container configuration for this session.
-
environmentId
final SessionCreateParams.Body.Builder environmentId(JsonField<String> environmentId)
Sets Builder.environmentId to an arbitrary JSON value.
You should usually call Builder.environmentId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
budget
final SessionCreateParams.Body.Builder budget(BetaManagedAgentsBudgetLimit budget)
Enforced spend ceiling for the session. Omit to create an uncapped session. Every model the session can run — the agent's model and each callable agent's model — must have a public list price, or the request is rejected with reason
model_not_budgetable.
-
budget
final SessionCreateParams.Body.Builder budget(JsonField<BetaManagedAgentsBudgetLimit> budget)
Sets Builder.budget to an arbitrary JSON value.
You should usually call Builder.budget with a well-typed BetaManagedAgentsBudgetLimit value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
initialEvents
final SessionCreateParams.Body.Builder initialEvents(List<SessionCreateParams.InitialEvent> initialEvents)
Initial events to send to the
sessionat creation, processed in order. Supportsuser.messageanduser.define_outcomeevents. Maximum 50 events.
-
initialEvents
final SessionCreateParams.Body.Builder initialEvents(JsonField<List<SessionCreateParams.InitialEvent>> initialEvents)
Sets Builder.initialEvents to an arbitrary JSON value.
You should usually call Builder.initialEvents with a well-typed
List<InitialEvent>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
metadata
final SessionCreateParams.Body.Builder metadata(SessionCreateParams.Metadata metadata)
Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
-
metadata
final SessionCreateParams.Body.Builder metadata(JsonField<SessionCreateParams.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
resources
final SessionCreateParams.Body.Builder resources(List<SessionCreateParams.Resource> resources)
Resources (e.g. repositories, files) to mount into the session's container.
-
resources
final SessionCreateParams.Body.Builder resources(JsonField<List<SessionCreateParams.Resource>> resources)
Sets Builder.resources to an arbitrary JSON value.
You should usually call Builder.resources with a well-typed
List<Resource>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
title
final SessionCreateParams.Body.Builder title(String title)
Human-readable session title.
-
title
final SessionCreateParams.Body.Builder title(Optional<String> title)
Alias for calling Builder.title with
title.orElse(null).
-
title
final SessionCreateParams.Body.Builder title(JsonField<String> title)
Sets Builder.title to an arbitrary JSON value.
You should usually call Builder.title with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
vaultIds
final SessionCreateParams.Body.Builder vaultIds(List<String> vaultIds)
Vault IDs for stored credentials the agent can use during the session.
-
vaultIds
final SessionCreateParams.Body.Builder vaultIds(JsonField<List<String>> vaultIds)
Sets Builder.vaultIds to an arbitrary JSON value.
You should usually call Builder.vaultIds with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final SessionCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
limitBudget
final SessionCreateParams.Body.Builder limitBudget(BetaMonetaryAmount maxListCost)
Alias for calling budget with the following:
BetaManagedAgentsBudgetLimit.builder() .maxListCost(maxListCost) .build()
-
addInitialEvent
final SessionCreateParams.Body.Builder addInitialEvent(SessionCreateParams.InitialEvent initialEvent)
Adds a single InitialEvent to initialEvents.
-
addInitialEvent
final SessionCreateParams.Body.Builder addInitialEvent(BetaManagedAgentsUserMessageEventParams userMessage)
Alias for calling addInitialEvent with
InitialEvent.ofUserMessage(userMessage).
-
addInitialEvent
final SessionCreateParams.Body.Builder addInitialEvent(BetaManagedAgentsUserDefineOutcomeEventParams userDefineOutcome)
Alias for calling addInitialEvent with
InitialEvent.ofUserDefineOutcome(userDefineOutcome).
-
addUserMessageInitialEvent
final SessionCreateParams.Body.Builder addUserMessageInitialEvent(List<BetaManagedAgentsUserMessageEventParams.Content> content)
Alias for calling addInitialEvent with the following:
BetaManagedAgentsUserMessageEventParams.builder() .content(content) .build()
-
addResource
final SessionCreateParams.Body.Builder addResource(SessionCreateParams.Resource resource)
-
addResource
final SessionCreateParams.Body.Builder addResource(BetaManagedAgentsGitHubRepositoryResourceParams githubRepository)
Alias for calling addResource with
Resource.ofGitHubRepository(githubRepository).
-
addResource
final SessionCreateParams.Body.Builder addResource(BetaManagedAgentsFileResourceParams file)
Alias for calling addResource with
Resource.ofFile(file).
-
addResource
final SessionCreateParams.Body.Builder addResource(BetaManagedAgentsMemoryStoreResourceParam memoryStore)
Alias for calling addResource with
Resource.ofMemoryStore(memoryStore).
-
addGitHubRepositoryResource
final SessionCreateParams.Body.Builder addGitHubRepositoryResource(String url)
Alias for calling addResource with the following:
BetaManagedAgentsGitHubRepositoryResourceParams.builder() .url(url) .build()
-
addFileResource
final SessionCreateParams.Body.Builder addFileResource(String fileId)
Alias for calling addResource with the following:
BetaManagedAgentsFileResourceParams.builder() .fileId(fileId) .build()
-
addMemoryStoreResource
final SessionCreateParams.Body.Builder addMemoryStoreResource(String memoryStoreId)
Alias for calling addResource with the following:
BetaManagedAgentsMemoryStoreResourceParam.builder() .memoryStoreId(memoryStoreId) .build()
-
addVaultId
final SessionCreateParams.Body.Builder addVaultId(String vaultId)
-
putAdditionalProperty
final SessionCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final SessionCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final SessionCreateParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final SessionCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final SessionCreateParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.agent() .environmentId()
-
-
-
-