managed

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Package managed implements the Qoder Cloud Agents managed API. Service methods and entity fields follow the managed API contract.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Qoder managed API definitions.

Index

Constants

View Source
const DefaultBaseURL = "https://api.qoder.com/api/v1/cloud/"

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) param.Opt[bool]

func Float

func Float(v float64) param.Opt[float64]

func Int

func Int(v int64) param.Opt[int64]

func String

func String(v string) param.Opt[string]

Types

type AdvisorRedactedResultBlockParam

type AdvisorRedactedResultBlockParam struct {
	// Opaque blob produced by a prior response; must be round-tripped verbatim.
	EncryptedContent string            `json:"encrypted_content" api:"required"`
	StopReason       param.Opt[string] `json:"stop_reason,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "advisor_redacted_result".
	Type constant.AdvisorRedactedResult `json:"type" default:"advisor_redacted_result"`
	// contains filtered or unexported fields
}

The properties EncryptedContent, Type are required.

func (AdvisorRedactedResultBlockParam) MarshalJSON

func (r AdvisorRedactedResultBlockParam) MarshalJSON() (data []byte, err error)

func (*AdvisorRedactedResultBlockParam) UnmarshalJSON

func (r *AdvisorRedactedResultBlockParam) UnmarshalJSON(data []byte) error

type AdvisorResultBlockParam

type AdvisorResultBlockParam struct {
	Text       string            `json:"text" api:"required"`
	StopReason param.Opt[string] `json:"stop_reason,omitzero"`
	// This field can be elided, and will marshal its zero value as "advisor_result".
	Type constant.AdvisorResult `json:"type" default:"advisor_result"`
	// contains filtered or unexported fields
}

The properties Text, Type are required.

func (AdvisorResultBlockParam) MarshalJSON

func (r AdvisorResultBlockParam) MarshalJSON() (data []byte, err error)

func (*AdvisorResultBlockParam) UnmarshalJSON

func (r *AdvisorResultBlockParam) UnmarshalJSON(data []byte) error

type AdvisorToolResultBlockParam

type AdvisorToolResultBlockParam struct {
	Content   AdvisorToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                  `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "advisor_tool_result".
	Type constant.AdvisorToolResult `json:"type" default:"advisor_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (AdvisorToolResultBlockParam) MarshalJSON

func (r AdvisorToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*AdvisorToolResultBlockParam) UnmarshalJSON

func (r *AdvisorToolResultBlockParam) UnmarshalJSON(data []byte) error

type AdvisorToolResultBlockParamContentUnion

type AdvisorToolResultBlockParamContentUnion struct {
	OfRequestAdvisorToolResultError     *AdvisorToolResultErrorParam     `json:",omitzero,inline"`
	OfRequestAdvisorResultBlock         *AdvisorResultBlockParam         `json:",omitzero,inline"`
	OfRequestAdvisorRedactedResultBlock *AdvisorRedactedResultBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AdvisorToolResultBlockParamContentUnion) GetEncryptedContent

func (u AdvisorToolResultBlockParamContentUnion) GetEncryptedContent() *string

Returns a pointer to the underlying variant's property, if present.

func (AdvisorToolResultBlockParamContentUnion) GetErrorCode

Returns a pointer to the underlying variant's property, if present.

func (AdvisorToolResultBlockParamContentUnion) GetStopReason

Returns a pointer to the underlying variant's property, if present.

func (AdvisorToolResultBlockParamContentUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (AdvisorToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (AdvisorToolResultBlockParamContentUnion) MarshalJSON

func (u AdvisorToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)

func (*AdvisorToolResultBlockParamContentUnion) UnmarshalJSON

func (u *AdvisorToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type AdvisorToolResultErrorParam

type AdvisorToolResultErrorParam struct {
	// Any of "max_uses_exceeded", "prompt_too_long", "too_many_requests",
	// "overloaded", "unavailable", "execution_time_exceeded", "model_not_found".
	ErrorCode AdvisorToolResultErrorParamErrorCode `json:"error_code,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "advisor_tool_result_error".
	Type constant.AdvisorToolResultError `json:"type" default:"advisor_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (AdvisorToolResultErrorParam) MarshalJSON

func (r AdvisorToolResultErrorParam) MarshalJSON() (data []byte, err error)

func (*AdvisorToolResultErrorParam) UnmarshalJSON

func (r *AdvisorToolResultErrorParam) UnmarshalJSON(data []byte) error

type AdvisorToolResultErrorParamErrorCode

type AdvisorToolResultErrorParamErrorCode string

type AgentArchiveParams

type AgentArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type AgentGetParams

type AgentGetParams struct {
	// Agent version. Omit for the most recent version. Must be at least 1 if
	// specified.
	Version param.Opt[int64] `query:"version,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AgentGetParams) URLQuery

func (r AgentGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AgentGetParams's query parameters as `url.Values`.

type AgentListParams

type AgentListParams struct {
	// Return agents created at or after this time (inclusive).
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return agents created at or before this time (inclusive).
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// Include archived agents in results. Defaults to false.
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum results per page. Default 20, maximum 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor from a previous response.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AgentListParams) URLQuery

func (r AgentListParams) URLQuery() (v url.Values, err error)

URLQuery serializes AgentListParams's query parameters as `url.Values`.

type AgentNewParams

type AgentNewParams struct {
	// Model identifier. Accepts the
	// [model string](https://docs.qoder.com/cloud-agents/api/models/list) or a
	// `model_config` object for additional configuration control
	Model ManagedAgentsModelConfigParams `json:"model,omitzero" api:"required"`
	// Human-readable name for the agent.
	Name string `json:"name" api:"required"`
	// Description of what the agent does.
	Description param.Opt[string] `json:"description,omitzero"`
	// System prompt for the agent.
	System param.Opt[string] `json:"system,omitzero"`
	// MCP servers this agent connects to. Maximum 20. Names must be unique within the
	// array. Every server must be referenced by an `mcp_toolset` in `tools`;
	// unreferenced servers are rejected. See the
	// [MCP connector guide](https://docs.qoder.com/cloud-agents/api/agents/schemas).
	MCPServers []ManagedAgentsURLMCPServerParams `json:"mcp_servers,omitzero"`
	// Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up
	// to 512 chars.
	Metadata map[string]string `json:"metadata,omitzero"`
	// A coordinator topology: the session's primary thread orchestrates work by
	// spawning session threads, each running an agent drawn from the `agents` roster.
	Multiagent ManagedAgentsMultiagentParams `json:"multiagent,omitzero"`
	// Skills available to the agent.
	Skills []ManagedAgentsSkillParamsUnion `json:"skills,omitzero"`
	// Tool configurations available to the agent. Maximum of 128 tools across all
	// toolsets allowed.
	Tools []AgentNewParamsToolUnion `json:"tools,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AgentNewParams) MarshalJSON

func (r AgentNewParams) MarshalJSON() (data []byte, err error)

func (*AgentNewParams) UnmarshalJSON

func (r *AgentNewParams) UnmarshalJSON(data []byte) error

type AgentNewParamsToolUnion

type AgentNewParamsToolUnion struct {
	OfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:",omitzero,inline"`
	OfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:",omitzero,inline"`
	OfCustom               *ManagedAgentsCustomToolParams           `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AgentNewParamsToolUnion) GetConfigs

func (u AgentNewParamsToolUnion) GetConfigs() (res agentNewParamsToolUnionConfigs)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (AgentNewParamsToolUnion) GetDefaultConfig

func (u AgentNewParamsToolUnion) GetDefaultConfig() (res agentNewParamsToolUnionDefaultConfig)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (AgentNewParamsToolUnion) GetDescription

func (u AgentNewParamsToolUnion) GetDescription() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentNewParamsToolUnion) GetInputSchema

Returns a pointer to the underlying variant's property, if present.

func (AgentNewParamsToolUnion) GetMCPServerName

func (u AgentNewParamsToolUnion) GetMCPServerName() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentNewParamsToolUnion) GetName

func (u AgentNewParamsToolUnion) GetName() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentNewParamsToolUnion) GetType

func (u AgentNewParamsToolUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentNewParamsToolUnion) MarshalJSON

func (u AgentNewParamsToolUnion) MarshalJSON() ([]byte, error)

func (*AgentNewParamsToolUnion) UnmarshalJSON

func (u *AgentNewParamsToolUnion) UnmarshalJSON(data []byte) error

type AgentService

type AgentService struct {
	Options  []option.RequestOption
	Versions AgentVersionService
}

AgentService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentService method instead.

func NewAgentService

func NewAgentService(opts ...option.RequestOption) (r AgentService)

NewAgentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AgentService) Archive

func (r *AgentService) Archive(ctx context.Context, agentID string, body AgentArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)

Archive Agent

func (*AgentService) Get

func (r *AgentService) Get(ctx context.Context, agentID string, params AgentGetParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)

Get Agent

func (*AgentService) List

List Agents

func (*AgentService) ListAutoPaging

List Agents

func (*AgentService) New

func (r *AgentService) New(ctx context.Context, params AgentNewParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)

Create Agent

func (*AgentService) Update

func (r *AgentService) Update(ctx context.Context, agentID string, params AgentUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)

Update Agent

type AgentUpdateParams

type AgentUpdateParams struct {
	// Description. Omit to preserve; send empty string or null to clear.
	Description param.Opt[string] `json:"description,omitzero"`
	// System prompt. Omit to preserve; send empty string or null to clear.
	System param.Opt[string] `json:"system,omitzero"`
	// Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.
	Name param.Opt[string] `json:"name,omitzero"`
	// The agent's current version, used to prevent concurrent overwrites. Obtain this
	// value from a create or retrieve response. Must be at least 1 if specified. When
	// supplied, the request fails if it does not match the server's current version;
	// omit to apply the update unconditionally.
	Version param.Opt[int64] `json:"version,omitzero"`
	// MCP servers. Full replacement. Omit to preserve; send empty array or `null` to
	// clear. Names must be unique. Maximum 20. Every server must be referenced by an
	// `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are
	// rejected. See the
	// [MCP connector guide](https://docs.qoder.com/cloud-agents/api/agents/schemas).
	MCPServers []ManagedAgentsURLMCPServerParams `json:"mcp_servers,omitzero"`
	// Metadata patch. Set a key to a string to upsert it, or to null to delete it.
	// Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars
	// each) with values up to 512 chars.
	Metadata map[string]any `json:"metadata,omitzero"`
	// Skills. Full replacement. Omit to preserve; send empty array or null to clear.
	Skills []ManagedAgentsSkillParamsUnion `json:"skills,omitzero"`
	// Tool configurations available to the agent. Full replacement. Omit to preserve;
	// send empty array or null to clear. Maximum of 128 tools across all toolsets
	// allowed.
	Tools []AgentUpdateParamsToolUnion `json:"tools,omitzero"`
	// Model identifier. Accepts the
	// [model string](https://docs.qoder.com/cloud-agents/api/models/list) or a
	// `model_config` object for additional configuration control. Omit to preserve.
	// Cannot be cleared.
	Model ManagedAgentsModelConfigParams `json:"model,omitzero"`
	// A coordinator topology: the session's primary thread orchestrates work by
	// spawning session threads, each running an agent drawn from the `agents` roster.
	Multiagent ManagedAgentsMultiagentParams `json:"multiagent,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AgentUpdateParams) MarshalJSON

func (r AgentUpdateParams) MarshalJSON() (data []byte, err error)

func (*AgentUpdateParams) UnmarshalJSON

func (r *AgentUpdateParams) UnmarshalJSON(data []byte) error

type AgentUpdateParamsToolUnion

type AgentUpdateParamsToolUnion struct {
	OfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:",omitzero,inline"`
	OfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:",omitzero,inline"`
	OfCustom               *ManagedAgentsCustomToolParams           `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (AgentUpdateParamsToolUnion) GetConfigs

func (u AgentUpdateParamsToolUnion) GetConfigs() (res agentUpdateParamsToolUnionConfigs)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (AgentUpdateParamsToolUnion) GetDefaultConfig

func (u AgentUpdateParamsToolUnion) GetDefaultConfig() (res agentUpdateParamsToolUnionDefaultConfig)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (AgentUpdateParamsToolUnion) GetDescription

func (u AgentUpdateParamsToolUnion) GetDescription() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentUpdateParamsToolUnion) GetInputSchema

Returns a pointer to the underlying variant's property, if present.

func (AgentUpdateParamsToolUnion) GetMCPServerName

func (u AgentUpdateParamsToolUnion) GetMCPServerName() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentUpdateParamsToolUnion) GetName

func (u AgentUpdateParamsToolUnion) GetName() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentUpdateParamsToolUnion) GetType

func (u AgentUpdateParamsToolUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (AgentUpdateParamsToolUnion) MarshalJSON

func (u AgentUpdateParamsToolUnion) MarshalJSON() ([]byte, error)

func (*AgentUpdateParamsToolUnion) UnmarshalJSON

func (u *AgentUpdateParamsToolUnion) UnmarshalJSON(data []byte) error

type AgentVersionListParams

type AgentVersionListParams struct {
	// Maximum results per page. Default 20, maximum 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AgentVersionListParams) URLQuery

func (r AgentVersionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes AgentVersionListParams's query parameters as `url.Values`.

type AgentVersionService

type AgentVersionService struct {
	Options []option.RequestOption
}

AgentVersionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentVersionService method instead.

func NewAgentVersionService

func NewAgentVersionService(opts ...option.RequestOption) (r AgentVersionService)

NewAgentVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AgentVersionService) List

List Agent Versions

func (*AgentVersionService) ListAutoPaging

List Agent Versions

type Base64ImageSourceMediaType

type Base64ImageSourceMediaType string

type Base64ImageSourceParam

type Base64ImageSourceParam struct {
	Data string `json:"data" api:"required" format:"byte"`
	// Any of "image/jpeg", "image/png", "image/gif", "image/webp".
	MediaType Base64ImageSourceMediaType `json:"media_type,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as "base64".
	Type constant.Base64 `json:"type" default:"base64"`
	// contains filtered or unexported fields
}

The properties Data, MediaType, Type are required.

func (Base64ImageSourceParam) MarshalJSON

func (r Base64ImageSourceParam) MarshalJSON() (data []byte, err error)

func (*Base64ImageSourceParam) UnmarshalJSON

func (r *Base64ImageSourceParam) UnmarshalJSON(data []byte) error

type Base64PDFSourceParam

type Base64PDFSourceParam struct {
	Data string `json:"data" api:"required" format:"byte"`
	// This field can be elided, and will marshal its zero value as "application/pdf".
	MediaType constant.ApplicationPDF `json:"media_type" default:"application/pdf"`
	// This field can be elided, and will marshal its zero value as "base64".
	Type constant.Base64 `json:"type" default:"base64"`
	// contains filtered or unexported fields
}

The properties Data, MediaType, Type are required.

func (Base64PDFSourceParam) MarshalJSON

func (r Base64PDFSourceParam) MarshalJSON() (data []byte, err error)

func (*Base64PDFSourceParam) UnmarshalJSON

func (r *Base64PDFSourceParam) UnmarshalJSON(data []byte) error

type BashCodeExecutionOutputBlockParam

type BashCodeExecutionOutputBlockParam struct {
	FileID string `json:"file_id" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "bash_code_execution_output".
	Type constant.BashCodeExecutionOutput `json:"type" default:"bash_code_execution_output"`
	// contains filtered or unexported fields
}

The properties FileID, Type are required.

func (BashCodeExecutionOutputBlockParam) MarshalJSON

func (r BashCodeExecutionOutputBlockParam) MarshalJSON() (data []byte, err error)

func (*BashCodeExecutionOutputBlockParam) UnmarshalJSON

func (r *BashCodeExecutionOutputBlockParam) UnmarshalJSON(data []byte) error

type BashCodeExecutionResultBlockParam

type BashCodeExecutionResultBlockParam struct {
	Content    []BashCodeExecutionOutputBlockParam `json:"content,omitzero" api:"required"`
	ReturnCode int64                               `json:"return_code" api:"required"`
	Stderr     string                              `json:"stderr" api:"required"`
	Stdout     string                              `json:"stdout" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "bash_code_execution_result".
	Type constant.BashCodeExecutionResult `json:"type" default:"bash_code_execution_result"`
	// contains filtered or unexported fields
}

The properties Content, ReturnCode, Stderr, Stdout, Type are required.

func (BashCodeExecutionResultBlockParam) MarshalJSON

func (r BashCodeExecutionResultBlockParam) MarshalJSON() (data []byte, err error)

func (*BashCodeExecutionResultBlockParam) UnmarshalJSON

func (r *BashCodeExecutionResultBlockParam) UnmarshalJSON(data []byte) error

type BashCodeExecutionToolResultBlockParam

type BashCodeExecutionToolResultBlockParam struct {
	Content   BashCodeExecutionToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                            `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "bash_code_execution_tool_result".
	Type constant.BashCodeExecutionToolResult `json:"type" default:"bash_code_execution_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (BashCodeExecutionToolResultBlockParam) MarshalJSON

func (r BashCodeExecutionToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*BashCodeExecutionToolResultBlockParam) UnmarshalJSON

func (r *BashCodeExecutionToolResultBlockParam) UnmarshalJSON(data []byte) error

type BashCodeExecutionToolResultBlockParamContentUnion

type BashCodeExecutionToolResultBlockParamContentUnion struct {
	OfRequestBashCodeExecutionToolResultError *BashCodeExecutionToolResultErrorParam `json:",omitzero,inline"`
	OfRequestBashCodeExecutionResultBlock     *BashCodeExecutionResultBlockParam     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BashCodeExecutionToolResultBlockParamContentUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (BashCodeExecutionToolResultBlockParamContentUnion) GetErrorCode

Returns a pointer to the underlying variant's property, if present.

func (BashCodeExecutionToolResultBlockParamContentUnion) GetReturnCode

Returns a pointer to the underlying variant's property, if present.

func (BashCodeExecutionToolResultBlockParamContentUnion) GetStderr

Returns a pointer to the underlying variant's property, if present.

func (BashCodeExecutionToolResultBlockParamContentUnion) GetStdout

Returns a pointer to the underlying variant's property, if present.

func (BashCodeExecutionToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (BashCodeExecutionToolResultBlockParamContentUnion) MarshalJSON

func (*BashCodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON

type BashCodeExecutionToolResultErrorParam

type BashCodeExecutionToolResultErrorParam struct {
	// Any of "invalid_tool_input", "unavailable", "too_many_requests",
	// "execution_time_exceeded", "output_file_too_large".
	ErrorCode BashCodeExecutionToolResultErrorParamErrorCode `json:"error_code,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "bash_code_execution_tool_result_error".
	Type constant.BashCodeExecutionToolResultError `json:"type" default:"bash_code_execution_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (BashCodeExecutionToolResultErrorParam) MarshalJSON

func (r BashCodeExecutionToolResultErrorParam) MarshalJSON() (data []byte, err error)

func (*BashCodeExecutionToolResultErrorParam) UnmarshalJSON

func (r *BashCodeExecutionToolResultErrorParam) UnmarshalJSON(data []byte) error

type BashCodeExecutionToolResultErrorParamErrorCode

type BashCodeExecutionToolResultErrorParamErrorCode string

type BrowserStateBlockParam

type BrowserStateBlockParam struct {
	// All tabs open in the browser after this call — the full inventory, not a delta.
	// May be empty. Whenever non-empty, exactly one entry carries `active: true`.
	Tabs []BrowserStateTabEntryParam `json:"tabs,omitzero" api:"required"`
	// Tabs opened and download state changes during this call. "Nothing to report" is
	// expressed by omitting the field, never by an empty list.
	StateChanges []BrowserStateChangeUnionParam `json:"state_changes,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "browser_state".
	Type constant.BrowserState `json:"type" default:"browser_state"`
	// contains filtered or unexported fields
}

The caller's browser state after a browser toolset member call — the full inventory of open tabs, which tab is active, and any side effects (tabs opened, download state changes) the call produced.

At most one per `tool_result`, only on a non-error result answering a browser toolset member `tool_use`. The server renders the model-visible text from it; the model never sees the raw fields.

The properties Tabs, Type are required.

func (BrowserStateBlockParam) MarshalJSON

func (r BrowserStateBlockParam) MarshalJSON() (data []byte, err error)

func (*BrowserStateBlockParam) UnmarshalJSON

func (r *BrowserStateBlockParam) UnmarshalJSON(data []byte) error

type BrowserStateChangeDownloadCompletedParam

type BrowserStateChangeDownloadCompletedParam struct {
	// The caller-assigned identifier for this download, stable across the state
	// changes reporting it.
	DownloadID string `json:"download_id" api:"required"`
	// The final post-redirect URL the download was served from.
	URL string `json:"url" api:"required"`
	// Where the executor saved the file, on the executor's filesystem. Only included
	// when another tool in the same environment can read the file at that path.
	Path param.Opt[string] `json:"path,omitzero"`
	// The completed download's size.
	SizeBytes param.Opt[int64] `json:"size_bytes,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "download_completed".
	Type constant.DownloadCompleted `json:"type" default:"download_completed"`
	// contains filtered or unexported fields
}

A file download that finished during this call, reported with the same `download_id` as its `download_started` — or without a prior `download_started`, when the download finished during the call that started it (at most one state change per `download_id` per result).

The properties DownloadID, Type, URL are required.

func (BrowserStateChangeDownloadCompletedParam) MarshalJSON

func (r BrowserStateChangeDownloadCompletedParam) MarshalJSON() (data []byte, err error)

func (*BrowserStateChangeDownloadCompletedParam) UnmarshalJSON

func (r *BrowserStateChangeDownloadCompletedParam) UnmarshalJSON(data []byte) error

type BrowserStateChangeDownloadFailedParam

type BrowserStateChangeDownloadFailedParam struct {
	// The caller-assigned identifier for this download, stable across the state
	// changes reporting it.
	DownloadID string `json:"download_id" api:"required"`
	// The final post-redirect URL the download was served from.
	URL string `json:"url" api:"required"`
	// The failure or cancellation detail, when known.
	Error param.Opt[string] `json:"error,omitzero"`
	// This field can be elided, and will marshal its zero value as "download_failed".
	Type constant.DownloadFailed `json:"type" default:"download_failed"`
	// contains filtered or unexported fields
}

A file download that failed — or was cancelled — during this call.

The properties DownloadID, Type, URL are required.

func (BrowserStateChangeDownloadFailedParam) MarshalJSON

func (r BrowserStateChangeDownloadFailedParam) MarshalJSON() (data []byte, err error)

func (*BrowserStateChangeDownloadFailedParam) UnmarshalJSON

func (r *BrowserStateChangeDownloadFailedParam) UnmarshalJSON(data []byte) error

type BrowserStateChangeDownloadStartedParam

type BrowserStateChangeDownloadStartedParam struct {
	// The caller-assigned identifier for this download, stable across the state
	// changes reporting it.
	DownloadID string `json:"download_id" api:"required"`
	// The final post-redirect URL the download was served from.
	URL string `json:"url" api:"required"`
	// This field can be elided, and will marshal its zero value as "download_started".
	Type constant.DownloadStarted `json:"type" default:"download_started"`
	// contains filtered or unexported fields
}

A file download that started during this call.

The properties DownloadID, Type, URL are required.

func (BrowserStateChangeDownloadStartedParam) MarshalJSON

func (r BrowserStateChangeDownloadStartedParam) MarshalJSON() (data []byte, err error)

func (*BrowserStateChangeDownloadStartedParam) UnmarshalJSON

func (r *BrowserStateChangeDownloadStartedParam) UnmarshalJSON(data []byte) error

type BrowserStateChangeTabOpenedParam

type BrowserStateChangeTabOpenedParam struct {
	// The `tab_id` of the opened tab, present in `tabs`.
	TabID string `json:"tab_id" api:"required"`
	// This field can be elided, and will marshal its zero value as "tab_opened".
	Type constant.TabOpened `json:"type" default:"tab_opened"`
	// contains filtered or unexported fields
}

A tab this call's execution opened that remains open at its end — the creation delta of the `tabs` inventory, not an event log.

Carries only the `tab_id`; the tab's `title` and `url` live on its `tabs` entry, which must include the same `tab_id`. A tab opened during a failed call gets no deferred `tab_opened`; it simply appears in the next result's `tabs` inventory.

The properties TabID, Type are required.

func (BrowserStateChangeTabOpenedParam) MarshalJSON

func (r BrowserStateChangeTabOpenedParam) MarshalJSON() (data []byte, err error)

func (*BrowserStateChangeTabOpenedParam) UnmarshalJSON

func (r *BrowserStateChangeTabOpenedParam) UnmarshalJSON(data []byte) error

type BrowserStateChangeUnionParam

type BrowserStateChangeUnionParam struct {
	OfTabOpened         *BrowserStateChangeTabOpenedParam         `json:",omitzero,inline"`
	OfDownloadStarted   *BrowserStateChangeDownloadStartedParam   `json:",omitzero,inline"`
	OfDownloadCompleted *BrowserStateChangeDownloadCompletedParam `json:",omitzero,inline"`
	OfDownloadFailed    *BrowserStateChangeDownloadFailedParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BrowserStateChangeUnionParam) GetDownloadID

func (u BrowserStateChangeUnionParam) GetDownloadID() *string

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) GetError

func (u BrowserStateChangeUnionParam) GetError() *string

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) GetPath

func (u BrowserStateChangeUnionParam) GetPath() *string

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) GetSizeBytes

func (u BrowserStateChangeUnionParam) GetSizeBytes() *int64

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) GetTabID

func (u BrowserStateChangeUnionParam) GetTabID() *string

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) GetType

func (u BrowserStateChangeUnionParam) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) GetURL

Returns a pointer to the underlying variant's property, if present.

func (BrowserStateChangeUnionParam) MarshalJSON

func (u BrowserStateChangeUnionParam) MarshalJSON() ([]byte, error)

func (*BrowserStateChangeUnionParam) UnmarshalJSON

func (u *BrowserStateChangeUnionParam) UnmarshalJSON(data []byte) error

type BrowserStateTabEntryParam

type BrowserStateTabEntryParam struct {
	// The caller-assigned identifier for this tab, unique within the inventory.
	TabID string `json:"tab_id" api:"required"`
	// The title of the page the tab is showing. May be empty.
	Title string `json:"title" api:"required"`
	// The URL of the page the tab is showing. May be empty.
	URL string `json:"url" api:"required"`
	// Whether this tab is the active tab after this call. Whenever `tabs` is
	// non-empty, exactly one entry is marked `active: true`.
	Active param.Opt[bool] `json:"active,omitzero"`
	// contains filtered or unexported fields
}

One open browser tab reported in a `browser_state` block's `tabs` inventory.

`tab_id` is the caller-assigned identifier for the tab; `title` and `url` describe the page the tab is currently showing and may be empty strings (a blank tab legitimately has both empty). `active` marks the tab that is active after this call; whenever `tabs` is non-empty, exactly one entry is marked.

The properties TabID, Title, URL are required.

func (BrowserStateTabEntryParam) MarshalJSON

func (r BrowserStateTabEntryParam) MarshalJSON() (data []byte, err error)

func (*BrowserStateTabEntryParam) UnmarshalJSON

func (r *BrowserStateTabEntryParam) UnmarshalJSON(data []byte) error

type CacheControlEphemeralParam

type CacheControlEphemeralParam struct {
	// The time-to-live for the cache control breakpoint.
	//
	// This may be one the following values:
	//
	// - `5m`: 5 minutes
	// - `1h`: 1 hour
	//
	// Defaults to `5m`.
	//
	// Any of "5m", "1h".
	TTL  CacheControlEphemeralTTL `json:"ttl,omitzero"`
	Type constant.Ephemeral       `json:"type" default:"ephemeral"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with [NewCacheControlEphemeralParam].

func (CacheControlEphemeralParam) MarshalJSON

func (r CacheControlEphemeralParam) MarshalJSON() (data []byte, err error)

func (*CacheControlEphemeralParam) UnmarshalJSON

func (r *CacheControlEphemeralParam) UnmarshalJSON(data []byte) error

type CacheControlEphemeralTTL

type CacheControlEphemeralTTL string

The time-to-live for the cache control breakpoint.

This may be one the following values:

- `5m`: 5 minutes - `1h`: 1 hour

Defaults to `5m`.

type CapabilitySupport

type CapabilitySupport struct {
	// Whether this capability is supported by the model.
	Supported bool `json:"supported" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Supported   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates whether a capability is supported.

func (CapabilitySupport) RawJSON

func (r CapabilitySupport) RawJSON() string

Returns the unmodified JSON received from the API

func (*CapabilitySupport) UnmarshalJSON

func (r *CapabilitySupport) UnmarshalJSON(data []byte) error

type CitationCharLocationParam

type CitationCharLocationParam struct {
	DocumentTitle  param.Opt[string] `json:"document_title,omitzero" api:"required"`
	CitedText      string            `json:"cited_text" api:"required"`
	DocumentIndex  int64             `json:"document_index" api:"required"`
	EndCharIndex   int64             `json:"end_char_index" api:"required"`
	StartCharIndex int64             `json:"start_char_index" api:"required"`
	// This field can be elided, and will marshal its zero value as "char_location".
	Type constant.CharLocation `json:"type" default:"char_location"`
	// contains filtered or unexported fields
}

The properties CitedText, DocumentIndex, DocumentTitle, EndCharIndex, StartCharIndex, Type are required.

func (CitationCharLocationParam) MarshalJSON

func (r CitationCharLocationParam) MarshalJSON() (data []byte, err error)

func (*CitationCharLocationParam) UnmarshalJSON

func (r *CitationCharLocationParam) UnmarshalJSON(data []byte) error

type CitationContentBlockLocationParam

type CitationContentBlockLocationParam struct {
	DocumentTitle param.Opt[string] `json:"document_title,omitzero" api:"required"`
	// The full text of the cited block range, concatenated.
	//
	// Always equals the contents of `content[start_block_index:end_block_index]`
	// joined together. The text block is the minimal citable unit; this field is never
	// a substring of a single block. Not counted toward output tokens, and not counted
	// toward input tokens when sent back in subsequent turns.
	CitedText     string `json:"cited_text" api:"required"`
	DocumentIndex int64  `json:"document_index" api:"required"`
	// Exclusive 0-based end index of the cited block range in the source's `content`
	// array.
	//
	// Always greater than `start_block_index`; a single-block citation has
	// `end_block_index = start_block_index + 1`.
	EndBlockIndex int64 `json:"end_block_index" api:"required"`
	// 0-based index of the first cited block in the source's `content` array.
	StartBlockIndex int64 `json:"start_block_index" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "content_block_location".
	Type constant.ContentBlockLocation `json:"type" default:"content_block_location"`
	// contains filtered or unexported fields
}

The properties CitedText, DocumentIndex, DocumentTitle, EndBlockIndex, StartBlockIndex, Type are required.

func (CitationContentBlockLocationParam) MarshalJSON

func (r CitationContentBlockLocationParam) MarshalJSON() (data []byte, err error)

func (*CitationContentBlockLocationParam) UnmarshalJSON

func (r *CitationContentBlockLocationParam) UnmarshalJSON(data []byte) error

type CitationPageLocationParam

type CitationPageLocationParam struct {
	DocumentTitle   param.Opt[string] `json:"document_title,omitzero" api:"required"`
	CitedText       string            `json:"cited_text" api:"required"`
	DocumentIndex   int64             `json:"document_index" api:"required"`
	EndPageNumber   int64             `json:"end_page_number" api:"required"`
	StartPageNumber int64             `json:"start_page_number" api:"required"`
	// This field can be elided, and will marshal its zero value as "page_location".
	Type constant.PageLocation `json:"type" default:"page_location"`
	// contains filtered or unexported fields
}

The properties CitedText, DocumentIndex, DocumentTitle, EndPageNumber, StartPageNumber, Type are required.

func (CitationPageLocationParam) MarshalJSON

func (r CitationPageLocationParam) MarshalJSON() (data []byte, err error)

func (*CitationPageLocationParam) UnmarshalJSON

func (r *CitationPageLocationParam) UnmarshalJSON(data []byte) error

type CitationSearchResultLocationParam

type CitationSearchResultLocationParam struct {
	Title param.Opt[string] `json:"title,omitzero" api:"required"`
	// The full text of the cited block range, concatenated.
	//
	// Always equals the contents of `content[start_block_index:end_block_index]`
	// joined together. The text block is the minimal citable unit; this field is never
	// a substring of a single block. Not counted toward output tokens, and not counted
	// toward input tokens when sent back in subsequent turns.
	CitedText string `json:"cited_text" api:"required"`
	// Exclusive 0-based end index of the cited block range in the source's `content`
	// array.
	//
	// Always greater than `start_block_index`; a single-block citation has
	// `end_block_index = start_block_index + 1`.
	EndBlockIndex int64 `json:"end_block_index" api:"required"`
	// 0-based index of the cited search result among all `search_result` content
	// blocks in the request, in the order they appear across messages and tool
	// results.
	//
	// Counted separately from `document_index`; server-side web search results are not
	// included in this count.
	SearchResultIndex int64  `json:"search_result_index" api:"required"`
	Source            string `json:"source" api:"required"`
	// 0-based index of the first cited block in the source's `content` array.
	StartBlockIndex int64 `json:"start_block_index" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "search_result_location".
	Type constant.SearchResultLocation `json:"type" default:"search_result_location"`
	// contains filtered or unexported fields
}

The properties CitedText, EndBlockIndex, SearchResultIndex, Source, StartBlockIndex, Title, Type are required.

func (CitationSearchResultLocationParam) MarshalJSON

func (r CitationSearchResultLocationParam) MarshalJSON() (data []byte, err error)

func (*CitationSearchResultLocationParam) UnmarshalJSON

func (r *CitationSearchResultLocationParam) UnmarshalJSON(data []byte) error

type CitationWebSearchResultLocationParam

type CitationWebSearchResultLocationParam struct {
	Title          param.Opt[string] `json:"title,omitzero" api:"required"`
	CitedText      string            `json:"cited_text" api:"required"`
	EncryptedIndex string            `json:"encrypted_index" api:"required"`
	URL            string            `json:"url" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "web_search_result_location".
	Type constant.WebSearchResultLocation `json:"type" default:"web_search_result_location"`
	// contains filtered or unexported fields
}

The properties CitedText, EncryptedIndex, Title, Type, URL are required.

func (CitationWebSearchResultLocationParam) MarshalJSON

func (r CitationWebSearchResultLocationParam) MarshalJSON() (data []byte, err error)

func (*CitationWebSearchResultLocationParam) UnmarshalJSON

func (r *CitationWebSearchResultLocationParam) UnmarshalJSON(data []byte) error

type CitationsConfigParam

type CitationsConfigParam struct {
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// contains filtered or unexported fields
}

func (CitationsConfigParam) MarshalJSON

func (r CitationsConfigParam) MarshalJSON() (data []byte, err error)

func (*CitationsConfigParam) UnmarshalJSON

func (r *CitationsConfigParam) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	Options        []option.RequestOption
	Agents         AgentService
	Sessions       SessionService
	Deployments    DeploymentService
	DeploymentRuns DeploymentRunService
	Dreams         DreamService
	Environments   EnvironmentService
	Skills         SkillService
	Vaults         VaultService
	Files          FileService
	MemoryStores   MemoryStoreService
	Models         ModelService
}

Client exposes concrete services; nested services follow the upstream hierarchy. A client can be shared between goroutines. Configure options before first use.

func NewClient

func NewClient(opts ...option.RequestOption) Client

NewClient uses common authentication defaults and QODER_BASE_URL. Explicit options win.

type CloudConfig

type CloudConfig struct {
	SetupScript string `json:"setup_script"`
	// Network configuration policy.
	Networking CloudConfigNetworkingUnion `json:"networking" api:"required"`
	// Package manager configuration.
	Packages Packages `json:"packages" api:"required"`
	// Environment type
	Type constant.Cloud `json:"type" default:"cloud"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SetupScript respjson.Field
		Networking  respjson.Field
		Packages    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

`cloud` environment configuration.

func (CloudConfig) RawJSON

func (r CloudConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*CloudConfig) UnmarshalJSON

func (r *CloudConfig) UnmarshalJSON(data []byte) error

type CloudConfigNetworkingUnion

type CloudConfigNetworkingUnion struct {
	// Any of "unrestricted", "limited".
	Type string `json:"type"`
	// This field is from variant [LimitedNetwork].
	AllowMCPServers bool `json:"allow_mcp_servers"`
	// This field is from variant [LimitedNetwork].
	AllowPackageManagers bool `json:"allow_package_managers"`
	// This field is from variant [LimitedNetwork].
	AllowedHosts []string `json:"allowed_hosts"`
	JSON         struct {
		Type                 respjson.Field
		AllowMCPServers      respjson.Field
		AllowPackageManagers respjson.Field
		AllowedHosts         respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

CloudConfigNetworkingUnion contains all possible properties and values from UnrestrictedNetwork, LimitedNetwork.

Use the CloudConfigNetworkingUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (CloudConfigNetworkingUnion) AsAny

func (u CloudConfigNetworkingUnion) AsAny() anyCloudConfigNetworking

Use the following switch statement to find the correct variant

switch variant := CloudConfigNetworkingUnion.AsAny().(type) {
case qoder.UnrestrictedNetwork:
case qoder.LimitedNetwork:
default:
  fmt.Errorf("no variant present")
}

func (CloudConfigNetworkingUnion) AsLimited

func (u CloudConfigNetworkingUnion) AsLimited() (v LimitedNetwork)

func (CloudConfigNetworkingUnion) AsUnrestricted

func (u CloudConfigNetworkingUnion) AsUnrestricted() (v UnrestrictedNetwork)

func (CloudConfigNetworkingUnion) RawJSON

func (u CloudConfigNetworkingUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*CloudConfigNetworkingUnion) UnmarshalJSON

func (r *CloudConfigNetworkingUnion) UnmarshalJSON(data []byte) error

type CloudConfigParams

type CloudConfigParams struct {
	SetupScript param.Opt[string] `json:"setup_script,omitzero"`
	// Network configuration policy. Omit on update to preserve the existing value.
	Networking CloudConfigParamsNetworkingUnion `json:"networking,omitzero"`
	// Specify packages (and optionally their versions) available in this environment.
	//
	// When versioning, use the version semantics relevant for the package manager,
	// e.g. for `pip` use `package==1.0.0`. You are responsible for validating the
	// package and version exist. Unversioned installs the latest.
	//
	// Under `limited` networking, requires `networking.allow_package_managers` to be
	// `true`.
	Packages PackagesParams `json:"packages,omitzero"`
	// Environment type
	//
	// This field can be elided, and will marshal its zero value as "cloud".
	Type constant.Cloud `json:"type" default:"cloud"`
	// contains filtered or unexported fields
}

Request params for `cloud` environment configuration.

Fields default to null; on update, omitted fields preserve the existing value.

The property Type is required.

func (CloudConfigParams) MarshalJSON

func (r CloudConfigParams) MarshalJSON() (data []byte, err error)

func (*CloudConfigParams) UnmarshalJSON

func (r *CloudConfigParams) UnmarshalJSON(data []byte) error

type CloudConfigParamsNetworkingUnion

type CloudConfigParamsNetworkingUnion struct {
	OfUnrestricted *UnrestrictedNetworkParam `json:",omitzero,inline"`
	OfLimited      *LimitedNetworkParams     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (CloudConfigParamsNetworkingUnion) GetAllowMCPServers

func (u CloudConfigParamsNetworkingUnion) GetAllowMCPServers() *bool

Returns a pointer to the underlying variant's property, if present.

func (CloudConfigParamsNetworkingUnion) GetAllowPackageManagers

func (u CloudConfigParamsNetworkingUnion) GetAllowPackageManagers() *bool

Returns a pointer to the underlying variant's property, if present.

func (CloudConfigParamsNetworkingUnion) GetAllowedHosts

func (u CloudConfigParamsNetworkingUnion) GetAllowedHosts() []string

Returns a pointer to the underlying variant's property, if present.

func (CloudConfigParamsNetworkingUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (CloudConfigParamsNetworkingUnion) MarshalJSON

func (u CloudConfigParamsNetworkingUnion) MarshalJSON() ([]byte, error)

func (*CloudConfigParamsNetworkingUnion) UnmarshalJSON

func (u *CloudConfigParamsNetworkingUnion) UnmarshalJSON(data []byte) error

type CodeExecutionOutputBlockParam

type CodeExecutionOutputBlockParam struct {
	FileID string `json:"file_id" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "code_execution_output".
	Type constant.CodeExecutionOutput `json:"type" default:"code_execution_output"`
	// contains filtered or unexported fields
}

The properties FileID, Type are required.

func (CodeExecutionOutputBlockParam) MarshalJSON

func (r CodeExecutionOutputBlockParam) MarshalJSON() (data []byte, err error)

func (*CodeExecutionOutputBlockParam) UnmarshalJSON

func (r *CodeExecutionOutputBlockParam) UnmarshalJSON(data []byte) error

type CodeExecutionResultBlockParam

type CodeExecutionResultBlockParam struct {
	Content    []CodeExecutionOutputBlockParam `json:"content,omitzero" api:"required"`
	ReturnCode int64                           `json:"return_code" api:"required"`
	Stderr     string                          `json:"stderr" api:"required"`
	Stdout     string                          `json:"stdout" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "code_execution_result".
	Type constant.CodeExecutionResult `json:"type" default:"code_execution_result"`
	// contains filtered or unexported fields
}

The properties Content, ReturnCode, Stderr, Stdout, Type are required.

func (CodeExecutionResultBlockParam) MarshalJSON

func (r CodeExecutionResultBlockParam) MarshalJSON() (data []byte, err error)

func (*CodeExecutionResultBlockParam) UnmarshalJSON

func (r *CodeExecutionResultBlockParam) UnmarshalJSON(data []byte) error

type CodeExecutionToolResultBlockParam

type CodeExecutionToolResultBlockParam struct {
	// Code execution result with encrypted stdout for PFC + web_search results.
	Content   CodeExecutionToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                        `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "code_execution_tool_result".
	Type constant.CodeExecutionToolResult `json:"type" default:"code_execution_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (CodeExecutionToolResultBlockParam) MarshalJSON

func (r CodeExecutionToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*CodeExecutionToolResultBlockParam) UnmarshalJSON

func (r *CodeExecutionToolResultBlockParam) UnmarshalJSON(data []byte) error

type CodeExecutionToolResultBlockParamContentUnion

type CodeExecutionToolResultBlockParamContentUnion struct {
	OfError                                    *CodeExecutionToolResultErrorParam      `json:",omitzero,inline"`
	OfResultBlock                              *CodeExecutionResultBlockParam          `json:",omitzero,inline"`
	OfRequestEncryptedCodeExecutionResultBlock *EncryptedCodeExecutionResultBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (CodeExecutionToolResultBlockParamContentUnion) GetContent

Returns a pointer to the underlying variant's Content property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) GetEncryptedStdout

func (u CodeExecutionToolResultBlockParamContentUnion) GetEncryptedStdout() *string

Returns a pointer to the underlying variant's property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) GetErrorCode

Returns a pointer to the underlying variant's property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) GetReturnCode

Returns a pointer to the underlying variant's property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) GetStderr

Returns a pointer to the underlying variant's property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) GetStdout

Returns a pointer to the underlying variant's property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (CodeExecutionToolResultBlockParamContentUnion) MarshalJSON

func (*CodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON

func (u *CodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type CodeExecutionToolResultErrorCode

type CodeExecutionToolResultErrorCode string

type CodeExecutionToolResultErrorParam

type CodeExecutionToolResultErrorParam struct {
	// Any of "invalid_tool_input", "unavailable", "too_many_requests",
	// "execution_time_exceeded".
	ErrorCode CodeExecutionToolResultErrorCode `json:"error_code,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "code_execution_tool_result_error".
	Type constant.CodeExecutionToolResultError `json:"type" default:"code_execution_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (CodeExecutionToolResultErrorParam) MarshalJSON

func (r CodeExecutionToolResultErrorParam) MarshalJSON() (data []byte, err error)

func (*CodeExecutionToolResultErrorParam) UnmarshalJSON

func (r *CodeExecutionToolResultErrorParam) UnmarshalJSON(data []byte) error

type CompactionBlockParam

type CompactionBlockParam struct {
	// Summary of previously compacted content, or null if compaction failed
	Content param.Opt[string] `json:"content,omitzero"`
	// Opaque metadata from prior compaction, to be round-tripped verbatim
	EncryptedContent param.Opt[string] `json:"encrypted_content,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "compaction".
	Type constant.Compaction `json:"type" default:"compaction"`
	// contains filtered or unexported fields
}

A compaction block containing summary of previous context.

Users should round-trip these blocks from responses to subsequent requests to maintain context across compaction boundaries.

When content is None, the block represents a failed compaction. The server treats these as no-ops. Empty string content is not allowed.

The property Type is required.

func (CompactionBlockParam) MarshalJSON

func (r CompactionBlockParam) MarshalJSON() (data []byte, err error)

func (*CompactionBlockParam) UnmarshalJSON

func (r *CompactionBlockParam) UnmarshalJSON(data []byte) error

type ContainerUploadBlockParam

type ContainerUploadBlockParam struct {
	FileID string `json:"file_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "container_upload".
	Type constant.ContainerUpload `json:"type" default:"container_upload"`
	// contains filtered or unexported fields
}

A content block that represents a file to be uploaded to the container Files uploaded via this block will be available in the container's input directory.

The properties FileID, Type are required.

func (ContainerUploadBlockParam) MarshalJSON

func (r ContainerUploadBlockParam) MarshalJSON() (data []byte, err error)

func (*ContainerUploadBlockParam) UnmarshalJSON

func (r *ContainerUploadBlockParam) UnmarshalJSON(data []byte) error

type ContentBlockParamUnion

type ContentBlockParamUnion struct {
	OfText                              *TextBlockParam                              `json:",omitzero,inline"`
	OfImage                             *ImageBlockParam                             `json:",omitzero,inline"`
	OfDocument                          *RequestDocumentBlockParam                   `json:",omitzero,inline"`
	OfSearchResult                      *SearchResultBlockParam                      `json:",omitzero,inline"`
	OfThinking                          *ThinkingBlockParam                          `json:",omitzero,inline"`
	OfRedactedThinking                  *RedactedThinkingBlockParam                  `json:",omitzero,inline"`
	OfToolUse                           *ToolUseBlockParam                           `json:",omitzero,inline"`
	OfToolResult                        *ToolResultBlockParam                        `json:",omitzero,inline"`
	OfServerToolUse                     *ServerToolUseBlockParam                     `json:",omitzero,inline"`
	OfWebSearchToolResult               *WebSearchToolResultBlockParam               `json:",omitzero,inline"`
	OfWebFetchToolResult                *WebFetchToolResultBlockParam                `json:",omitzero,inline"`
	OfAdvisorToolResult                 *AdvisorToolResultBlockParam                 `json:",omitzero,inline"`
	OfCodeExecutionToolResult           *CodeExecutionToolResultBlockParam           `json:",omitzero,inline"`
	OfBashCodeExecutionToolResult       *BashCodeExecutionToolResultBlockParam       `json:",omitzero,inline"`
	OfTextEditorCodeExecutionToolResult *TextEditorCodeExecutionToolResultBlockParam `json:",omitzero,inline"`
	OfToolSearchToolResult              *ToolSearchToolResultBlockParam              `json:",omitzero,inline"`
	OfMCPToolUse                        *MCPToolUseBlockParam                        `json:",omitzero,inline"`
	OfMCPToolResult                     *RequestMCPToolResultBlockParam              `json:",omitzero,inline"`
	OfContainerUpload                   *ContainerUploadBlockParam                   `json:",omitzero,inline"`
	OfCompaction                        *CompactionBlockParam                        `json:",omitzero,inline"`
	OfToolAddition                      *RequestToolAdditionBlockParam               `json:",omitzero,inline"`
	OfToolRemoval                       *RequestToolRemovalBlockParam                `json:",omitzero,inline"`
	OfFallback                          *FallbackBlockParam                          `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContentBlockParamUnion) GetCacheControl

Returns a pointer to the underlying variant's CacheControl property, if present.

func (ContentBlockParamUnion) GetCaller

func (u ContentBlockParamUnion) GetCaller() (res contentBlockParamUnionCaller)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ContentBlockParamUnion) GetCitations

func (u ContentBlockParamUnion) GetCitations() (res contentBlockParamUnionCitations)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ContentBlockParamUnion) GetContent

func (u ContentBlockParamUnion) GetContent() (res contentBlockParamUnionContent)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ContentBlockParamUnion) GetContext

func (u ContentBlockParamUnion) GetContext() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetData

func (u ContentBlockParamUnion) GetData() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetEncryptedContent

func (u ContentBlockParamUnion) GetEncryptedContent() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetFileID

func (u ContentBlockParamUnion) GetFileID() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetFrom

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetID

func (u ContentBlockParamUnion) GetID() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetInput

func (u ContentBlockParamUnion) GetInput() *any

Returns a pointer to the underlying variant's Input property, if present.

func (ContentBlockParamUnion) GetIsError

func (u ContentBlockParamUnion) GetIsError() *bool

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetName

func (u ContentBlockParamUnion) GetName() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetServerName

func (u ContentBlockParamUnion) GetServerName() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetSignature

func (u ContentBlockParamUnion) GetSignature() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetSource

func (u ContentBlockParamUnion) GetSource() (res contentBlockParamUnionSource)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ContentBlockParamUnion) GetText

func (u ContentBlockParamUnion) GetText() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetThinking

func (u ContentBlockParamUnion) GetThinking() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetTitle

func (u ContentBlockParamUnion) GetTitle() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetTo

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetTool

func (u ContentBlockParamUnion) GetTool() (res contentBlockParamUnionTool)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ContentBlockParamUnion) GetToolUseID

func (u ContentBlockParamUnion) GetToolUseID() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetToolsetName

func (u ContentBlockParamUnion) GetToolsetName() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetTransformations

func (u ContentBlockParamUnion) GetTransformations() *ImageTransformationsParam

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetTrigger

func (u ContentBlockParamUnion) GetTrigger() *any

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) GetType

func (u ContentBlockParamUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (ContentBlockParamUnion) MarshalJSON

func (u ContentBlockParamUnion) MarshalJSON() ([]byte, error)

func (*ContentBlockParamUnion) UnmarshalJSON

func (u *ContentBlockParamUnion) UnmarshalJSON(data []byte) error

type ContentBlockSourceContentUnionParam

type ContentBlockSourceContentUnionParam struct {
	OfString                    param.Opt[string]                     `json:",omitzero,inline"`
	OfContentBlockSourceContent []ContentBlockSourceContentUnionParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ContentBlockSourceContentUnionParam) MarshalJSON

func (u ContentBlockSourceContentUnionParam) MarshalJSON() ([]byte, error)

func (*ContentBlockSourceContentUnionParam) UnmarshalJSON

func (u *ContentBlockSourceContentUnionParam) UnmarshalJSON(data []byte) error

type ContentBlockSourceParam

type ContentBlockSourceParam struct {
	Content ContentBlockSourceContentUnionParam `json:"content,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as "content".
	Type constant.Content `json:"type" default:"content"`
	// contains filtered or unexported fields
}

The properties Content, Type are required.

func (ContentBlockSourceParam) MarshalJSON

func (r ContentBlockSourceParam) MarshalJSON() (data []byte, err error)

func (*ContentBlockSourceParam) UnmarshalJSON

func (r *ContentBlockSourceParam) UnmarshalJSON(data []byte) error

type ContextManagementCapability

type ContextManagementCapability struct {
	// Indicates whether a capability is supported.
	ClearThinking20251015 CapabilitySupport `json:"clear_thinking_20251015" api:"required"`
	// Indicates whether a capability is supported.
	ClearToolUses20250919 CapabilitySupport `json:"clear_tool_uses_20250919" api:"required"`
	// Indicates whether a capability is supported.
	Compact20260112 CapabilitySupport `json:"compact_20260112" api:"required"`
	// Whether this capability is supported by the model.
	Supported bool `json:"supported" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClearThinking20251015 respjson.Field
		ClearToolUses20250919 respjson.Field
		Compact20260112       respjson.Field
		Supported             respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Context management capability details.

func (ContextManagementCapability) RawJSON

func (r ContextManagementCapability) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContextManagementCapability) UnmarshalJSON

func (r *ContextManagementCapability) UnmarshalJSON(data []byte) error

type Currency

type Currency string
const CurrencyUSD Currency = "USD"

type DeletedFile

type DeletedFile struct {
	// ID of the deleted file.
	ID string `json:"id" api:"required"`
	// Deleted object type.
	//
	// For file deletion, this is always `"file_deleted"`.
	//
	// Any of "file_deleted".
	Type DeletedFileType `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeletedFile) RawJSON

func (r DeletedFile) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeletedFile) UnmarshalJSON

func (r *DeletedFile) UnmarshalJSON(data []byte) error

type DeletedFileType

type DeletedFileType string

Deleted object type.

For file deletion, this is always `"file_deleted"`.

const (
	DeletedFileTypeFileDeleted DeletedFileType = "file_deleted"
)

type DeletedSkill

type DeletedSkill struct {
	// Unique identifier for the skill.
	//
	// The format and length of IDs may change over time.
	ID string `json:"id" api:"required"`
	// Deleted object type.
	//
	// For Skills, this is always `"skill_deleted"`.
	Type constant.SkillDeleted `json:"type" default:"skill_deleted"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeletedSkill) RawJSON

func (r DeletedSkill) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeletedSkill) UnmarshalJSON

func (r *DeletedSkill) UnmarshalJSON(data []byte) error

type DeletedSkillVersion

type DeletedSkillVersion struct {
	// Unique identifier for this Skill Version. The id addresses the version in paths
	// and pins it in references.
	ID string `json:"id" api:"required"`
	// Deleted object type.
	//
	// For Skill Versions, this is always `"skill_version_deleted"`.
	Type constant.SkillVersionDeleted `json:"type" default:"skill_version_deleted"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeletedSkillVersion) RawJSON

func (r DeletedSkillVersion) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeletedSkillVersion) UnmarshalJSON

func (r *DeletedSkillVersion) UnmarshalJSON(data []byte) error

type DeploymentArchiveParams

type DeploymentArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DeploymentGetParams

type DeploymentGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DeploymentListParams

type DeploymentListParams struct {
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Filter by agent ID.
	AgentID param.Opt[string] `query:"agent_id,omitzero" json:"-"`
	// Return deployments created at or after this time (inclusive).
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return deployments created at or before this time (inclusive).
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// When true, includes archived deployments. Default: false (exclude archived).
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum results per page. Default 20, maximum 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Filter by status: `active` or `paused`. Omit for both. To include archived
	// deployments, use `include_archived` instead; the two cannot be combined.
	//
	// Any of "active", "paused".
	Status ManagedAgentsDeploymentStatus `query:"status,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DeploymentListParams) URLQuery

func (r DeploymentListParams) URLQuery() (v url.Values, err error)

URLQuery serializes DeploymentListParams's query parameters as `url.Values`.

type DeploymentNewParams

type DeploymentNewParams struct {
	EnvironmentVariables param.Opt[string] `json:"environment_variables,omitzero"`

	// Agent to deploy. Accepts the `agent` ID string, which pins the latest version,
	// or an `agent` object with both id and version specified. The agent must exist
	// and not be archived.
	Agent DeploymentNewParamsAgentUnion `json:"agent,omitzero" api:"required"`
	// ID of the `environment` defining the container configuration for sessions
	// created from this deployment.
	EnvironmentID string `json:"environment_id" api:"required"`
	// Events to send to each session immediately after creation. At least 1,
	// maximum 50.
	InitialEvents []ManagedAgentsDeploymentInitialEventParamsUnion `json:"initial_events,omitzero" api:"required"`
	// Human-readable name for the deployment.
	Name string `json:"name" api:"required"`
	// Description of what the deployment does.
	Description param.Opt[string] `json:"description,omitzero"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimitParam `json:"budget,omitzero"`
	// Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up
	// to 512 chars.
	Metadata map[string]string `json:"metadata,omitzero"`
	// Resources (e.g. repositories, files) to mount into each session's container.
	// Maximum 500.
	Resources []DeploymentNewParamsResourceUnion `json:"resources,omitzero"`
	// 5-field POSIX cron schedule. Literal wall-clock matching in the configured
	// timezone.
	Schedule ManagedAgentsScheduleParams `json:"schedule,omitzero"`
	// Vault IDs for stored credentials the agent can use during sessions created from
	// this deployment. Maximum 50.
	VaultIDs []string `json:"vault_ids,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DeploymentNewParams) MarshalJSON

func (r DeploymentNewParams) MarshalJSON() (data []byte, err error)

func (*DeploymentNewParams) UnmarshalJSON

func (r *DeploymentNewParams) UnmarshalJSON(data []byte) error

type DeploymentNewParamsAgentUnion

type DeploymentNewParamsAgentUnion struct {
	OfString              param.Opt[string]         `json:",omitzero,inline"`
	OfManagedAgentsAgents *ManagedAgentsAgentParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (DeploymentNewParamsAgentUnion) MarshalJSON

func (u DeploymentNewParamsAgentUnion) MarshalJSON() ([]byte, error)

func (*DeploymentNewParamsAgentUnion) UnmarshalJSON

func (u *DeploymentNewParamsAgentUnion) UnmarshalJSON(data []byte) error

type DeploymentNewParamsResourceUnion

type DeploymentNewParamsResourceUnion struct {
	OfGitHubRepository *ManagedAgentsGitHubRepositoryResourceParams `json:",omitzero,inline"`
	OfFile             *ManagedAgentsFileResourceParams             `json:",omitzero,inline"`
	OfMemoryStore      *ManagedAgentsMemoryStoreResourceParam       `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (DeploymentNewParamsResourceUnion) GetAccess

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetAuthorizationToken

func (u DeploymentNewParamsResourceUnion) GetAuthorizationToken() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetCheckout

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetInstructions

func (u DeploymentNewParamsResourceUnion) GetInstructions() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetMemoryStoreID

func (u DeploymentNewParamsResourceUnion) GetMemoryStoreID() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetMountPath

func (u DeploymentNewParamsResourceUnion) GetMountPath() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) GetURL

Returns a pointer to the underlying variant's property, if present.

func (DeploymentNewParamsResourceUnion) MarshalJSON

func (u DeploymentNewParamsResourceUnion) MarshalJSON() ([]byte, error)

func (*DeploymentNewParamsResourceUnion) UnmarshalJSON

func (u *DeploymentNewParamsResourceUnion) UnmarshalJSON(data []byte) error

type DeploymentPauseParams

type DeploymentPauseParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DeploymentRunGetParams

type DeploymentRunGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DeploymentRunListParams

type DeploymentRunListParams struct {
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Return runs created strictly after this time (exclusive).
	CreatedAtGt param.Opt[time.Time] `query:"created_at[gt],omitzero" format:"date-time" json:"-"`
	// Return runs created at or after this time (inclusive).
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return runs created strictly before this time (exclusive).
	CreatedAtLt param.Opt[time.Time] `query:"created_at[lt],omitzero" format:"date-time" json:"-"`
	// Return runs created at or before this time (inclusive).
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// Filter to a specific deployment. Omit to list across all deployments in the
	// workspace. Filtering by a non-existent `deployment_id` returns 200 with empty
	// data.
	DeploymentID param.Opt[string] `query:"deployment_id,omitzero" json:"-"`
	// Filter: true for runs with non-null `error`, false for runs with non-null
	// `session_id`. Omit for all.
	HasError param.Opt[bool] `query:"has_error,omitzero" json:"-"`
	// Maximum results per page. Default 20, maximum 1000.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor. Pass `next_page` from the previous response. Invalid
	// or expired cursors return 400.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Filter runs by what triggered them. Omit to return all runs.
	//
	// Any of "schedule", "manual".
	TriggerType ManagedAgentsTriggerType `query:"trigger_type,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DeploymentRunListParams) URLQuery

func (r DeploymentRunListParams) URLQuery() (v url.Values, err error)

URLQuery serializes DeploymentRunListParams's query parameters as `url.Values`.

type DeploymentRunParams

type DeploymentRunParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DeploymentRunService

type DeploymentRunService struct {
	Options []option.RequestOption
}

DeploymentRunService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDeploymentRunService method instead.

func NewDeploymentRunService

func NewDeploymentRunService(opts ...option.RequestOption) (r DeploymentRunService)

NewDeploymentRunService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DeploymentRunService) Get

Get Deployment Run

func (*DeploymentRunService) List

List Deployment Runs

func (*DeploymentRunService) ListAutoPaging

List Deployment Runs

type DeploymentScopedRunGetParams added in v0.3.0

type DeploymentScopedRunGetParams struct {
	WorkspaceID param.Opt[string] `header:"qoder-workspace-id,omitzero" json:"-"`
	Betas       []QoderBeta       `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (*DeploymentScopedRunGetParams) UnmarshalJSON added in v0.3.0

func (r *DeploymentScopedRunGetParams) UnmarshalJSON(data []byte) error

type DeploymentScopedRunListParams added in v0.3.0

type DeploymentScopedRunListParams struct {
	Limit           param.Opt[int64]  `query:"limit,omitzero" json:"-"`
	Page            param.Opt[string] `query:"page,omitzero" json:"-"`
	AfterID         param.Opt[string] `query:"after_id,omitzero" json:"-"`
	BeforeID        param.Opt[string] `query:"before_id,omitzero" json:"-"`
	TriggeredAfter  param.Opt[string] `query:"triggered_after,omitzero" json:"-"`
	TriggeredBefore param.Opt[string] `query:"triggered_before,omitzero" json:"-"`
	WorkspaceID     param.Opt[string] `header:"qoder-workspace-id,omitzero" json:"-"`
	Betas           []QoderBeta       `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DeploymentScopedRunListParams) URLQuery added in v0.3.0

func (*DeploymentScopedRunListParams) UnmarshalJSON added in v0.3.0

func (r *DeploymentScopedRunListParams) UnmarshalJSON(data []byte) error

type DeploymentScopedRunService added in v0.3.0

type DeploymentScopedRunService struct{ Options []option.RequestOption }

func NewDeploymentScopedRunService added in v0.3.0

func NewDeploymentScopedRunService(opts ...option.RequestOption) DeploymentScopedRunService

func (*DeploymentScopedRunService) Get added in v0.3.0

Get DeploymentScopedRun.

func (*DeploymentScopedRunService) List added in v0.3.0

List DeploymentScopedRun.

func (*DeploymentScopedRunService) ListAutoPaging added in v0.3.0

type DeploymentService

type DeploymentService struct {
	Options []option.RequestOption
	Runs    DeploymentScopedRunService
}

DeploymentService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDeploymentService method instead.

func NewDeploymentService

func NewDeploymentService(opts ...option.RequestOption) (r DeploymentService)

NewDeploymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DeploymentService) Archive

func (r *DeploymentService) Archive(ctx context.Context, deploymentID string, body DeploymentArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)

Archive Deployment

func (*DeploymentService) Get

func (r *DeploymentService) Get(ctx context.Context, deploymentID string, query DeploymentGetParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)

Get Deployment

func (*DeploymentService) List

List Deployments

func (*DeploymentService) ListAutoPaging

List Deployments

func (*DeploymentService) New

Create Deployment

func (*DeploymentService) Pause

func (r *DeploymentService) Pause(ctx context.Context, deploymentID string, body DeploymentPauseParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)

Pause Deployment

func (*DeploymentService) Run

Run Deployment Now

func (*DeploymentService) Unpause

func (r *DeploymentService) Unpause(ctx context.Context, deploymentID string, body DeploymentUnpauseParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)

Unpause Deployment

func (*DeploymentService) Update

func (r *DeploymentService) Update(ctx context.Context, deploymentID string, params DeploymentUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)

Update Deployment

type DeploymentUnpauseParams

type DeploymentUnpauseParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DeploymentUpdateParams

type DeploymentUpdateParams struct {
	EnvironmentVariables param.Opt[string] `json:"environment_variables,omitzero"`

	// Description. Omit to preserve; send empty string or null to clear.
	Description param.Opt[string] `json:"description,omitzero"`
	// ID of the `environment` where sessions run. Omit to preserve. Cannot be cleared.
	EnvironmentID param.Opt[string] `json:"environment_id,omitzero"`
	// Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.
	Name param.Opt[string] `json:"name,omitzero"`
	// Metadata patch. Set a key to a string to upsert it, or to null to delete it.
	// Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars
	// each) with values up to 512 chars.
	Metadata map[string]any `json:"metadata,omitzero"`
	// Session resources. Full replacement. Omit to preserve; send empty array or null
	// to clear. Maximum 500.
	Resources []DeploymentUpdateParamsResourceUnion `json:"resources,omitzero"`
	// Vault IDs. Full replacement. Omit to preserve; send empty array or null to
	// clear. Maximum 50.
	VaultIDs []string `json:"vault_ids,omitzero"`
	// Agent to deploy. Accepts the `agent` ID string, which re-pins to the latest
	// version, or an `agent` object with both id and version specified. Omit to
	// preserve. Cannot be cleared.
	Agent DeploymentUpdateParamsAgentUnion `json:"agent,omitzero"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimitParam `json:"budget,omitzero"`
	// Initial events. Full replacement. Omit to preserve. Cannot be cleared. At least
	// 1, maximum 50.
	InitialEvents []ManagedAgentsDeploymentInitialEventParamsUnion `json:"initial_events,omitzero"`
	// 5-field POSIX cron schedule. Literal wall-clock matching in the configured
	// timezone.
	Schedule ManagedAgentsScheduleParams `json:"schedule,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DeploymentUpdateParams) MarshalJSON

func (r DeploymentUpdateParams) MarshalJSON() (data []byte, err error)

func (*DeploymentUpdateParams) UnmarshalJSON

func (r *DeploymentUpdateParams) UnmarshalJSON(data []byte) error

type DeploymentUpdateParamsAgentUnion

type DeploymentUpdateParamsAgentUnion struct {
	OfString              param.Opt[string]         `json:",omitzero,inline"`
	OfManagedAgentsAgents *ManagedAgentsAgentParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (DeploymentUpdateParamsAgentUnion) MarshalJSON

func (u DeploymentUpdateParamsAgentUnion) MarshalJSON() ([]byte, error)

func (*DeploymentUpdateParamsAgentUnion) UnmarshalJSON

func (u *DeploymentUpdateParamsAgentUnion) UnmarshalJSON(data []byte) error

type DeploymentUpdateParamsResourceUnion

type DeploymentUpdateParamsResourceUnion struct {
	OfGitHubRepository *ManagedAgentsGitHubRepositoryResourceParams `json:",omitzero,inline"`
	OfFile             *ManagedAgentsFileResourceParams             `json:",omitzero,inline"`
	OfMemoryStore      *ManagedAgentsMemoryStoreResourceParam       `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (DeploymentUpdateParamsResourceUnion) GetAccess

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetAuthorizationToken

func (u DeploymentUpdateParamsResourceUnion) GetAuthorizationToken() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetCheckout

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetInstructions

func (u DeploymentUpdateParamsResourceUnion) GetInstructions() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetMemoryStoreID

func (u DeploymentUpdateParamsResourceUnion) GetMemoryStoreID() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetMountPath

func (u DeploymentUpdateParamsResourceUnion) GetMountPath() *string

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) GetURL

Returns a pointer to the underlying variant's property, if present.

func (DeploymentUpdateParamsResourceUnion) MarshalJSON

func (u DeploymentUpdateParamsResourceUnion) MarshalJSON() ([]byte, error)

func (*DeploymentUpdateParamsResourceUnion) UnmarshalJSON

func (u *DeploymentUpdateParamsResourceUnion) UnmarshalJSON(data []byte) error

type DirectCallerParam

type DirectCallerParam struct {
	Type constant.Direct `json:"type" default:"direct"`
	// contains filtered or unexported fields
}

Tool invocation directly from the model.

This struct has a constant value, construct it with [NewDirectCallerParam].

func (DirectCallerParam) MarshalJSON

func (r DirectCallerParam) MarshalJSON() (data []byte, err error)

func (*DirectCallerParam) UnmarshalJSON

func (r *DirectCallerParam) UnmarshalJSON(data []byte) error

type Dream

type Dream struct {
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	EndedAt time.Time `json:"ended_at" api:"required" format:"date-time"`
	// Failure detail for a Dream whose `status` is `failed`.
	Error        DreamError        `json:"error" api:"required"`
	Inputs       []DreamInputUnion `json:"inputs" api:"required"`
	Instructions string            `json:"instructions" api:"required"`
	// Model identifier and configuration applied to every pipeline stage. Same wire
	// shape as the Agents API ModelConfig.
	Model DreamModelConfig `json:"model" api:"required"`
	// The default destination: the job creates a new output memory store as a clone of
	// the memory_store input and writes the consolidated memories into it. The input
	// store is never mutated.
	OutputBehavior OutputBehaviorUnion `json:"output_behavior" api:"required"`
	Outputs        []DreamOutput       `json:"outputs" api:"required"`
	SessionID      string              `json:"session_id" api:"required"`
	// Lifecycle status of a Dream.
	//
	// Any of "pending", "running", "completed", "failed", "canceled".
	Status DreamStatus `json:"status" api:"required"`
	// Any of "dream".
	Type DreamType `json:"type" api:"required"`
	// Cumulative token usage for the dream across every pipeline stage.
	Usage DreamUsage `json:"usage" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		ArchivedAt     respjson.Field
		CreatedAt      respjson.Field
		EndedAt        respjson.Field
		Error          respjson.Field
		Inputs         respjson.Field
		Instructions   respjson.Field
		Model          respjson.Field
		OutputBehavior respjson.Field
		Outputs        respjson.Field
		SessionID      respjson.Field
		Status         respjson.Field
		Type           respjson.Field
		Usage          respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.

func (Dream) RawJSON

func (r Dream) RawJSON() string

Returns the unmodified JSON received from the API

func (*Dream) UnmarshalJSON

func (r *Dream) UnmarshalJSON(data []byte) error

type DreamArchiveParams

type DreamArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DreamCancelParams

type DreamCancelParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DreamError

type DreamError struct {
	Message string `json:"message" api:"required"`
	Type    string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Failure detail for a Dream whose `status` is `failed`.

func (DreamError) RawJSON

func (r DreamError) RawJSON() string

Returns the unmodified JSON received from the API

func (*DreamError) UnmarshalJSON

func (r *DreamError) UnmarshalJSON(data []byte) error

type DreamGetParams

type DreamGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type DreamInputUnion

type DreamInputUnion struct {
	// This field is from variant [DreamMemoryStoreInput].
	MemoryStoreID string `json:"memory_store_id"`
	// Any of "memory_store", "sessions".
	Type string `json:"type"`
	// This field is from variant [DreamSessionsInput].
	SessionIDs []string `json:"session_ids"`
	JSON       struct {
		MemoryStoreID respjson.Field
		Type          respjson.Field
		SessionIDs    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

DreamInputUnion contains all possible properties and values from DreamMemoryStoreInput, DreamSessionsInput.

Use the DreamInputUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (DreamInputUnion) AsAny

func (u DreamInputUnion) AsAny() anyDreamInput

Use the following switch statement to find the correct variant

switch variant := DreamInputUnion.AsAny().(type) {
case qoder.DreamMemoryStoreInput:
case qoder.DreamSessionsInput:
default:
  fmt.Errorf("no variant present")
}

func (DreamInputUnion) AsMemoryStore

func (u DreamInputUnion) AsMemoryStore() (v DreamMemoryStoreInput)

func (DreamInputUnion) AsSessions

func (u DreamInputUnion) AsSessions() (v DreamSessionsInput)

func (DreamInputUnion) RawJSON

func (u DreamInputUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (DreamInputUnion) ToParam

ToParam converts this DreamInputUnion to a DreamInputUnionParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with DreamInputUnionParam.Overrides()

func (*DreamInputUnion) UnmarshalJSON

func (r *DreamInputUnion) UnmarshalJSON(data []byte) error

type DreamInputUnionParam

type DreamInputUnionParam struct {
	OfMemoryStore *DreamMemoryStoreInputParam `json:",omitzero,inline"`
	OfSessions    *DreamSessionsInputParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func DreamInputParamOfMemoryStore

func DreamInputParamOfMemoryStore(memoryStoreID string) DreamInputUnionParam

func DreamInputParamOfSessions

func DreamInputParamOfSessions(sessionIDs []string) DreamInputUnionParam

func (DreamInputUnionParam) GetMemoryStoreID

func (u DreamInputUnionParam) GetMemoryStoreID() *string

Returns a pointer to the underlying variant's property, if present.

func (DreamInputUnionParam) GetSessionIDs

func (u DreamInputUnionParam) GetSessionIDs() []string

Returns a pointer to the underlying variant's property, if present.

func (DreamInputUnionParam) GetType

func (u DreamInputUnionParam) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (DreamInputUnionParam) MarshalJSON

func (u DreamInputUnionParam) MarshalJSON() ([]byte, error)

func (*DreamInputUnionParam) UnmarshalJSON

func (u *DreamInputUnionParam) UnmarshalJSON(data []byte) error

type DreamListParams

type DreamListParams struct {
	// Return dreams with `created_at` strictly after this timestamp (exclusive lower
	// bound, RFC 3339). Unset applies no lower bound.
	CreatedAtGt param.Opt[time.Time] `query:"created_at[gt],omitzero" format:"date-time" json:"-"`
	// Return dreams with `created_at` strictly before this timestamp (exclusive upper
	// bound, RFC 3339). Unset applies no upper bound.
	CreatedAtLt param.Opt[time.Time] `query:"created_at[lt],omitzero" format:"date-time" json:"-"`
	// Query parameter for include_archived
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Query parameter for limit
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Query parameter for page
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Filter by lifecycle status. Repeat the parameter to match any of multiple
	// statuses. Empty applies no status filter.
	Statuses []DreamStatus `query:"statuses,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DreamListParams) URLQuery

func (r DreamListParams) URLQuery() (v url.Values, err error)

URLQuery serializes DreamListParams's query parameters as `url.Values`.

type DreamMemoryStoreInput

type DreamMemoryStoreInput struct {
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "memory_store".
	Type DreamMemoryStoreInputType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MemoryStoreID respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.

func (DreamMemoryStoreInput) RawJSON

func (r DreamMemoryStoreInput) RawJSON() string

Returns the unmodified JSON received from the API

func (DreamMemoryStoreInput) ToParam

ToParam converts this DreamMemoryStoreInput to a DreamMemoryStoreInputParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with DreamMemoryStoreInputParam.Overrides()

func (*DreamMemoryStoreInput) UnmarshalJSON

func (r *DreamMemoryStoreInput) UnmarshalJSON(data []byte) error

type DreamMemoryStoreInputParam

type DreamMemoryStoreInputParam struct {
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "memory_store".
	Type DreamMemoryStoreInputType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.

The properties MemoryStoreID, Type are required.

func (DreamMemoryStoreInputParam) MarshalJSON

func (r DreamMemoryStoreInputParam) MarshalJSON() (data []byte, err error)

func (*DreamMemoryStoreInputParam) UnmarshalJSON

func (r *DreamMemoryStoreInputParam) UnmarshalJSON(data []byte) error

type DreamMemoryStoreInputType

type DreamMemoryStoreInputType string
const (
	DreamMemoryStoreInputTypeMemoryStore DreamMemoryStoreInputType = "memory_store"
)

type DreamModelConfig

type DreamModelConfig struct {
	// Model identifier. 1-256 characters.
	ID string `json:"id" api:"required"`
	// Inference speed mode. `fast` provides significantly faster output token
	// generation at premium pricing. Not all models support `fast`; invalid
	// combinations are rejected at create time.
	//
	// Any of "standard", "fast".
	Speed DreamModelConfigSpeed `json:"speed"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Speed       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig.

func (DreamModelConfig) RawJSON

func (r DreamModelConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*DreamModelConfig) UnmarshalJSON

func (r *DreamModelConfig) UnmarshalJSON(data []byte) error

type DreamModelConfigParam

type DreamModelConfigParam struct {
	// Model identifier. 1-256 characters.
	ID string `json:"id" api:"required"`
	// Inference speed mode. `fast` provides significantly faster output token
	// generation at premium pricing. Not all models support `fast`; invalid
	// combinations are rejected at create time.
	//
	// Any of "standard", "fast".
	Speed DreamModelConfigParamSpeed `json:"speed,omitzero"`
	// contains filtered or unexported fields
}

Model identifier and configuration applied to every pipeline stage.

The property ID is required.

func (DreamModelConfigParam) MarshalJSON

func (r DreamModelConfigParam) MarshalJSON() (data []byte, err error)

func (*DreamModelConfigParam) UnmarshalJSON

func (r *DreamModelConfigParam) UnmarshalJSON(data []byte) error

type DreamModelConfigParamSpeed

type DreamModelConfigParamSpeed string

Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.

const (
	DreamModelConfigParamSpeedStandard DreamModelConfigParamSpeed = "standard"
	DreamModelConfigParamSpeedFast     DreamModelConfigParamSpeed = "fast"
)

type DreamModelConfigSpeed

type DreamModelConfigSpeed string

Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.

const (
	DreamModelConfigSpeedStandard DreamModelConfigSpeed = "standard"
	DreamModelConfigSpeedFast     DreamModelConfigSpeed = "fast"
)

type DreamNewParams

type DreamNewParams struct {
	Inputs []DreamInputUnionParam `json:"inputs,omitzero" api:"required"`
	// Model identifier and configuration applied to every pipeline stage.
	Model        DreamNewParamsModelUnion `json:"model,omitzero" api:"required"`
	Instructions param.Opt[string]        `json:"instructions,omitzero"`
	// The default destination: the job creates a new output memory store as a clone of
	// the memory_store input and writes the consolidated memories into it. The input
	// store is never mutated.
	OutputBehavior OutputBehaviorUnionParam `json:"output_behavior,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DreamNewParams) MarshalJSON

func (r DreamNewParams) MarshalJSON() (data []byte, err error)

func (*DreamNewParams) UnmarshalJSON

func (r *DreamNewParams) UnmarshalJSON(data []byte) error

type DreamNewParamsModelUnion

type DreamNewParamsModelUnion struct {
	OfString           param.Opt[string]      `json:",omitzero,inline"`
	OfDreamModelConfig *DreamModelConfigParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (DreamNewParamsModelUnion) MarshalJSON

func (u DreamNewParamsModelUnion) MarshalJSON() ([]byte, error)

func (*DreamNewParamsModelUnion) UnmarshalJSON

func (u *DreamNewParamsModelUnion) UnmarshalJSON(data []byte) error

type DreamOutput

type DreamOutput struct {
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "memory_store".
	Type DreamOutputType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MemoryStoreID respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An output memory store the dream writes consolidated memories into.

func (DreamOutput) RawJSON

func (r DreamOutput) RawJSON() string

Returns the unmodified JSON received from the API

func (*DreamOutput) UnmarshalJSON

func (r *DreamOutput) UnmarshalJSON(data []byte) error

type DreamOutputType

type DreamOutputType string
const (
	DreamOutputTypeMemoryStore DreamOutputType = "memory_store"
)

type DreamService

type DreamService struct {
	Options []option.RequestOption
}

DreamService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDreamService method instead.

func NewDreamService

func NewDreamService(opts ...option.RequestOption) (r DreamService)

NewDreamService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DreamService) Archive

func (r *DreamService) Archive(ctx context.Context, dreamID string, body DreamArchiveParams, opts ...option.RequestOption) (res *Dream, err error)

Archive a Dream

func (*DreamService) Cancel

func (r *DreamService) Cancel(ctx context.Context, dreamID string, body DreamCancelParams, opts ...option.RequestOption) (res *Dream, err error)

Cancel a Dream

func (*DreamService) Get

func (r *DreamService) Get(ctx context.Context, dreamID string, query DreamGetParams, opts ...option.RequestOption) (res *Dream, err error)

Get a Dream

func (*DreamService) List

func (r *DreamService) List(ctx context.Context, params DreamListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Dream], err error)

List Dreams

func (*DreamService) ListAutoPaging

List Dreams

func (*DreamService) New

func (r *DreamService) New(ctx context.Context, params DreamNewParams, opts ...option.RequestOption) (res *Dream, err error)

Create a Dream

type DreamSessionsInput

type DreamSessionsInput struct {
	SessionIDs []string `json:"session_ids" api:"required"`
	// Any of "sessions".
	Type DreamSessionsInputType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SessionIDs  respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input session transcripts the dream reads.

func (DreamSessionsInput) RawJSON

func (r DreamSessionsInput) RawJSON() string

Returns the unmodified JSON received from the API

func (DreamSessionsInput) ToParam

ToParam converts this DreamSessionsInput to a DreamSessionsInputParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with DreamSessionsInputParam.Overrides()

func (*DreamSessionsInput) UnmarshalJSON

func (r *DreamSessionsInput) UnmarshalJSON(data []byte) error

type DreamSessionsInputParam

type DreamSessionsInputParam struct {
	SessionIDs []string `json:"session_ids,omitzero" api:"required"`
	// Any of "sessions".
	Type DreamSessionsInputType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Input session transcripts the dream reads.

The properties SessionIDs, Type are required.

func (DreamSessionsInputParam) MarshalJSON

func (r DreamSessionsInputParam) MarshalJSON() (data []byte, err error)

func (*DreamSessionsInputParam) UnmarshalJSON

func (r *DreamSessionsInputParam) UnmarshalJSON(data []byte) error

type DreamSessionsInputType

type DreamSessionsInputType string
const (
	DreamSessionsInputTypeSessions DreamSessionsInputType = "sessions"
)

type DreamStatus

type DreamStatus string

Lifecycle status of a Dream.

const (
	DreamStatusPending   DreamStatus = "pending"
	DreamStatusRunning   DreamStatus = "running"
	DreamStatusCompleted DreamStatus = "completed"
	DreamStatusFailed    DreamStatus = "failed"
	DreamStatusCanceled  DreamStatus = "canceled"
)

type DreamType

type DreamType string
const (
	DreamTypeDream DreamType = "dream"
)

type DreamUsage

type DreamUsage struct {
	// Total tokens used to create prompt-cache entries (sum of all TTL tiers).
	CacheCreationInputTokens int64 `json:"cache_creation_input_tokens" api:"required"`
	// Total tokens read from prompt cache.
	CacheReadInputTokens int64 `json:"cache_read_input_tokens" api:"required"`
	// Total uncached input tokens consumed across every pipeline stage.
	InputTokens int64 `json:"input_tokens" api:"required"`
	// Total output tokens generated across every pipeline stage.
	OutputTokens int64 `json:"output_tokens" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CacheCreationInputTokens respjson.Field
		CacheReadInputTokens     respjson.Field
		InputTokens              respjson.Field
		OutputTokens             respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cumulative token usage for the dream across every pipeline stage.

func (DreamUsage) RawJSON

func (r DreamUsage) RawJSON() string

Returns the unmodified JSON received from the API

func (*DreamUsage) UnmarshalJSON

func (r *DreamUsage) UnmarshalJSON(data []byte) error

type EffortCapability

type EffortCapability struct {
	// Whether the model supports high effort level.
	High CapabilitySupport `json:"high" api:"required"`
	// Whether the model supports low effort level.
	Low CapabilitySupport `json:"low" api:"required"`
	// Whether the model supports max effort level.
	Max CapabilitySupport `json:"max" api:"required"`
	// Whether the model supports medium effort level.
	Medium CapabilitySupport `json:"medium" api:"required"`
	// Whether this capability is supported by the model.
	Supported bool `json:"supported" api:"required"`
	// Indicates whether a capability is supported.
	Xhigh CapabilitySupport `json:"xhigh" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		High        respjson.Field
		Low         respjson.Field
		Max         respjson.Field
		Medium      respjson.Field
		Supported   respjson.Field
		Xhigh       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Effort (reasoning_effort) capability details.

func (EffortCapability) RawJSON

func (r EffortCapability) RawJSON() string

Returns the unmodified JSON received from the API

func (*EffortCapability) UnmarshalJSON

func (r *EffortCapability) UnmarshalJSON(data []byte) error

type EncryptedCodeExecutionResultBlockParam

type EncryptedCodeExecutionResultBlockParam struct {
	Content         []CodeExecutionOutputBlockParam `json:"content,omitzero" api:"required"`
	EncryptedStdout string                          `json:"encrypted_stdout" api:"required"`
	ReturnCode      int64                           `json:"return_code" api:"required"`
	Stderr          string                          `json:"stderr" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "encrypted_code_execution_result".
	Type constant.EncryptedCodeExecutionResult `json:"type" default:"encrypted_code_execution_result"`
	// contains filtered or unexported fields
}

Code execution result with encrypted stdout for PFC + web_search results.

The properties Content, EncryptedStdout, ReturnCode, Stderr, Type are required.

func (EncryptedCodeExecutionResultBlockParam) MarshalJSON

func (r EncryptedCodeExecutionResultBlockParam) MarshalJSON() (data []byte, err error)

func (*EncryptedCodeExecutionResultBlockParam) UnmarshalJSON

func (r *EncryptedCodeExecutionResultBlockParam) UnmarshalJSON(data []byte) error

type Environment

type Environment struct {
	// Environment identifier (e.g., 'env\_...')
	ID string `json:"id" api:"required"`
	// RFC 3339 timestamp when environment was archived, or null if not archived
	ArchivedAt string `json:"archived_at" api:"required"`
	// Environment configuration (either Qoder Cloud or self-hosted)
	Config EnvironmentConfigUnion `json:"config" api:"required"`
	// RFC 3339 timestamp when environment was created
	CreatedAt string `json:"created_at" api:"required"`
	// User-provided description for the environment; null when unset
	Description string `json:"description" api:"required"`
	// User-provided metadata key-value pairs
	Metadata map[string]string `json:"metadata" api:"required"`
	// Human-readable name for the environment
	Name string `json:"name" api:"required"`
	// The type of object (always 'environment')
	Type constant.Environment `json:"type" default:"environment"`
	// RFC 3339 timestamp when environment was last updated
	UpdatedAt string `json:"updated_at" api:"required"`
	// The visibility scope for this environment. 'organization' means visible to all
	// accounts. 'account' means visible only to the owning account.
	//
	// Any of "organization", "account".
	Scope EnvironmentScope `json:"scope"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ArchivedAt  respjson.Field
		Config      respjson.Field
		CreatedAt   respjson.Field
		Description respjson.Field
		Metadata    respjson.Field
		Name        respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		Scope       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Unified Environment resource for both cloud and self-hosted environments.

func (Environment) RawJSON

func (r Environment) RawJSON() string

Returns the unmodified JSON received from the API

func (*Environment) UnmarshalJSON

func (r *Environment) UnmarshalJSON(data []byte) error

type EnvironmentArchiveParams

type EnvironmentArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type EnvironmentConfigUnion

type EnvironmentConfigUnion struct {
	// This field is from variant [CloudConfig].
	Networking CloudConfigNetworkingUnion `json:"networking"`
	// This field is from variant [CloudConfig].
	Packages Packages `json:"packages"`
	// Any of "cloud", "self_hosted".
	Type string `json:"type"`
	JSON struct {
		Networking respjson.Field
		Packages   respjson.Field
		Type       respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

EnvironmentConfigUnion contains all possible properties and values from CloudConfig, SelfHostedConfig.

Use the EnvironmentConfigUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (EnvironmentConfigUnion) AsAny

func (u EnvironmentConfigUnion) AsAny() anyEnvironmentConfig

Use the following switch statement to find the correct variant

switch variant := EnvironmentConfigUnion.AsAny().(type) {
case qoder.CloudConfig:
case qoder.SelfHostedConfig:
default:
  fmt.Errorf("no variant present")
}

func (EnvironmentConfigUnion) AsCloud

func (u EnvironmentConfigUnion) AsCloud() (v CloudConfig)

func (EnvironmentConfigUnion) AsSelfHosted

func (u EnvironmentConfigUnion) AsSelfHosted() (v SelfHostedConfig)

func (EnvironmentConfigUnion) RawJSON

func (u EnvironmentConfigUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*EnvironmentConfigUnion) UnmarshalJSON

func (r *EnvironmentConfigUnion) UnmarshalJSON(data []byte) error

type EnvironmentDeleteParams

type EnvironmentDeleteParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type EnvironmentDeleteResponse

type EnvironmentDeleteResponse struct {
	// Environment identifier
	ID string `json:"id" api:"required"`
	// The type of response
	//
	// Any of "environment_deleted".
	Type EnvironmentDeleteResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Response after deleting an environment.

func (EnvironmentDeleteResponse) RawJSON

func (r EnvironmentDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*EnvironmentDeleteResponse) UnmarshalJSON

func (r *EnvironmentDeleteResponse) UnmarshalJSON(data []byte) error

type EnvironmentDeleteResponseType

type EnvironmentDeleteResponseType string

The type of response

const (
	EnvironmentDeleteResponseTypeEnvironmentDeleted EnvironmentDeleteResponseType = "environment_deleted"
)

type EnvironmentGetParams

type EnvironmentGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type EnvironmentListParams

type EnvironmentListParams struct {
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`

	// Opaque cursor from previous response for pagination. Pass the `next_page` value
	// from the previous response.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Include archived environments in the response
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum number of environments to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentListParams) URLQuery

func (r EnvironmentListParams) URLQuery() (v url.Values, err error)

URLQuery serializes EnvironmentListParams's query parameters as `url.Values`.

type EnvironmentNewParams

type EnvironmentNewParams struct {
	// Human-readable name for the environment
	Name string `json:"name" api:"required"`
	// Optional description of the environment
	Description param.Opt[string] `json:"description,omitzero"`
	// Environment configuration
	Config EnvironmentNewParamsConfigUnion `json:"config,omitzero"`
	// The visibility scope for this environment. 'organization' makes the environment
	// visible to all accounts. 'account' restricts visibility to the owning account
	// only. Only applicable for self-hosted environments. If not specified, defaults
	// based on organization type.
	//
	// Any of "organization", "account".
	Scope EnvironmentNewParamsScope `json:"scope,omitzero"`
	// User-provided metadata key-value pairs
	Metadata map[string]string `json:"metadata,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentNewParams) MarshalJSON

func (r EnvironmentNewParams) MarshalJSON() (data []byte, err error)

func (*EnvironmentNewParams) UnmarshalJSON

func (r *EnvironmentNewParams) UnmarshalJSON(data []byte) error

type EnvironmentNewParamsConfigUnion

type EnvironmentNewParamsConfigUnion struct {
	OfCloud      *CloudConfigParams      `json:",omitzero,inline"`
	OfSelfHosted *SelfHostedConfigParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (EnvironmentNewParamsConfigUnion) GetNetworking

Returns a pointer to the underlying variant's property, if present.

func (EnvironmentNewParamsConfigUnion) GetPackages

Returns a pointer to the underlying variant's property, if present.

func (EnvironmentNewParamsConfigUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (EnvironmentNewParamsConfigUnion) MarshalJSON

func (u EnvironmentNewParamsConfigUnion) MarshalJSON() ([]byte, error)

func (*EnvironmentNewParamsConfigUnion) UnmarshalJSON

func (u *EnvironmentNewParamsConfigUnion) UnmarshalJSON(data []byte) error

type EnvironmentNewParamsScope

type EnvironmentNewParamsScope string

The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type.

const (
	EnvironmentNewParamsScopeOrganization EnvironmentNewParamsScope = "organization"
	EnvironmentNewParamsScopeAccount      EnvironmentNewParamsScope = "account"
)

type EnvironmentScope

type EnvironmentScope string

The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.

const (
	EnvironmentScopeOrganization EnvironmentScope = "organization"
	EnvironmentScopeAccount      EnvironmentScope = "account"
)

type EnvironmentService

type EnvironmentService struct {
	Options []option.RequestOption
	Work    EnvironmentWorkService
}

EnvironmentService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentService method instead.

func NewEnvironmentService

func NewEnvironmentService(opts ...option.RequestOption) (r EnvironmentService)

NewEnvironmentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentService) Archive

func (r *EnvironmentService) Archive(ctx context.Context, environmentID string, body EnvironmentArchiveParams, opts ...option.RequestOption) (res *Environment, err error)

Archive an environment by ID. Archived environments cannot be used to create new sessions.

func (*EnvironmentService) Delete

func (r *EnvironmentService) Delete(ctx context.Context, environmentID string, body EnvironmentDeleteParams, opts ...option.RequestOption) (res *EnvironmentDeleteResponse, err error)

Delete an environment by ID. Returns a confirmation of the deletion.

func (*EnvironmentService) Get

func (r *EnvironmentService) Get(ctx context.Context, environmentID string, query EnvironmentGetParams, opts ...option.RequestOption) (res *Environment, err error)

Retrieve a specific environment by ID.

func (*EnvironmentService) List

List environments with pagination support.

func (*EnvironmentService) ListAutoPaging

List environments with pagination support.

func (*EnvironmentService) New

Create a new environment with the specified configuration.

func (*EnvironmentService) Update

func (r *EnvironmentService) Update(ctx context.Context, environmentID string, params EnvironmentUpdateParams, opts ...option.RequestOption) (res *Environment, err error)

Update an existing environment's configuration.

type EnvironmentUpdateParams

type EnvironmentUpdateParams struct {
	// Updated description of the environment. Omit to preserve; null clears to null;
	// an empty string is stored as an empty string.
	Description param.Opt[string] `json:"description,omitzero"`
	// Updated name for the environment
	Name param.Opt[string] `json:"name,omitzero"`
	// Updated environment configuration
	Config EnvironmentUpdateParamsConfigUnion `json:"config,omitzero"`
	// The visibility scope for this environment. 'organization' makes the environment
	// visible to all accounts. 'account' restricts visibility to the owning account
	// only.
	//
	// Any of "organization", "account".
	Scope EnvironmentUpdateParamsScope `json:"scope,omitzero"`
	// User-provided metadata key-value pairs. Set a value to null or empty string to
	// delete the key.
	Metadata map[string]any `json:"metadata,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentUpdateParams) MarshalJSON

func (r EnvironmentUpdateParams) MarshalJSON() (data []byte, err error)

func (*EnvironmentUpdateParams) UnmarshalJSON

func (r *EnvironmentUpdateParams) UnmarshalJSON(data []byte) error

type EnvironmentUpdateParamsConfigUnion

type EnvironmentUpdateParamsConfigUnion struct {
	OfCloud      *CloudConfigParams      `json:",omitzero,inline"`
	OfSelfHosted *SelfHostedConfigParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (EnvironmentUpdateParamsConfigUnion) GetNetworking

Returns a pointer to the underlying variant's property, if present.

func (EnvironmentUpdateParamsConfigUnion) GetPackages

Returns a pointer to the underlying variant's property, if present.

func (EnvironmentUpdateParamsConfigUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (EnvironmentUpdateParamsConfigUnion) MarshalJSON

func (u EnvironmentUpdateParamsConfigUnion) MarshalJSON() ([]byte, error)

func (*EnvironmentUpdateParamsConfigUnion) UnmarshalJSON

func (u *EnvironmentUpdateParamsConfigUnion) UnmarshalJSON(data []byte) error

type EnvironmentUpdateParamsScope

type EnvironmentUpdateParamsScope string

The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only.

const (
	EnvironmentUpdateParamsScopeOrganization EnvironmentUpdateParamsScope = "organization"
	EnvironmentUpdateParamsScopeAccount      EnvironmentUpdateParamsScope = "account"
)

type EnvironmentWorkAckParams

type EnvironmentWorkAckParams struct {
	EnvironmentID string `path:"environment_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type EnvironmentWorkGetParams

type EnvironmentWorkGetParams struct {
	EnvironmentID string `path:"environment_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type EnvironmentWorkHeartbeatParams

type EnvironmentWorkHeartbeatParams struct {
	EnvironmentID string `path:"environment_id" api:"required" json:"-"`
	// Desired TTL in seconds
	DesiredTTLSeconds param.Opt[int64] `query:"desired_ttl_seconds,omitzero" json:"-"`
	// Expected last_heartbeat for conditional update (optimistic concurrency). Use
	// literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For
	// subsequent heartbeats, echo the server's previous last_heartbeat value exactly.
	// Returns 412 Precondition Failed if the actual value doesn't match.
	ExpectedLastHeartbeat param.Opt[string] `query:"expected_last_heartbeat,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentWorkHeartbeatParams) URLQuery

func (r EnvironmentWorkHeartbeatParams) URLQuery() (v url.Values, err error)

URLQuery serializes EnvironmentWorkHeartbeatParams's query parameters as `url.Values`.

type EnvironmentWorkListParams

type EnvironmentWorkListParams struct {
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Opaque cursor from previous response for pagination
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Maximum number of work items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentWorkListParams) URLQuery

func (r EnvironmentWorkListParams) URLQuery() (v url.Values, err error)

URLQuery serializes EnvironmentWorkListParams's query parameters as `url.Values`.

type EnvironmentWorkPollParams

type EnvironmentWorkPollParams struct {
	// How long to wait for work to arrive before returning. Must be 1-999 in
	// milliseconds. Defaults to non-blocking (returns immediately if no work is
	// available).
	BlockMs param.Opt[int64] `query:"block_ms,omitzero" json:"-"`
	// Reclaim unacknowledged work items older than this many milliseconds. If omitted,
	// uses the default (5000ms).
	ReclaimOlderThanMs param.Opt[int64] `query:"reclaim_older_than_ms,omitzero" json:"-"`
	// Unique identifier for the specific worker polling, used to track aggregated
	// environment-level work metrics in Console
	QoderWorkerID param.Opt[string] `header:"Worker-ID,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentWorkPollParams) URLQuery

func (r EnvironmentWorkPollParams) URLQuery() (v url.Values, err error)

URLQuery serializes EnvironmentWorkPollParams's query parameters as `url.Values`.

type EnvironmentWorkService

type EnvironmentWorkService struct {
	Options []option.RequestOption
}

EnvironmentWorkService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvironmentWorkService method instead.

func NewEnvironmentWorkService

func NewEnvironmentWorkService(opts ...option.RequestOption) (r EnvironmentWorkService)

NewEnvironmentWorkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvironmentWorkService) Ack

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' and removing it from the queue.

func (*EnvironmentWorkService) Get

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Retrieve detailed information about a specific work item.

func (*EnvironmentWorkService) Heartbeat

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Record a heartbeat for a work item to maintain the lease.

func (*EnvironmentWorkService) List

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

List work items in an environment.

func (*EnvironmentWorkService) ListAutoPaging

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

List work items in an environment.

func (*EnvironmentWorkService) Poll

func (r *EnvironmentWorkService) Poll(ctx context.Context, environmentID string, params EnvironmentWorkPollParams, opts ...option.RequestOption) (res *SelfHostedWork, err error)

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Long poll for work items in the queue.

func (*EnvironmentWorkService) Stats

Get statistics about the work queue for an environment.

func (*EnvironmentWorkService) Stop

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Stop a work item, initiating graceful or forced shutdown.

func (*EnvironmentWorkService) Update

Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.

Update work item metadata with merge semantics.

type EnvironmentWorkStatsParams

type EnvironmentWorkStatsParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type EnvironmentWorkStopParams

type EnvironmentWorkStopParams struct {
	EnvironmentID string `path:"environment_id" api:"required" json:"-"`
	// Request to stop a work item.
	SelfHostedWorkStopRequest SelfHostedWorkStopRequestParam
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentWorkStopParams) MarshalJSON

func (r EnvironmentWorkStopParams) MarshalJSON() (data []byte, err error)

func (*EnvironmentWorkStopParams) UnmarshalJSON

func (r *EnvironmentWorkStopParams) UnmarshalJSON(data []byte) error

type EnvironmentWorkUpdateParams

type EnvironmentWorkUpdateParams struct {
	EnvironmentID string `path:"environment_id" api:"required" json:"-"`
	// Request to update work item metadata.
	SelfHostedWorkUpdateRequest SelfHostedWorkUpdateRequestParam
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EnvironmentWorkUpdateParams) MarshalJSON

func (r EnvironmentWorkUpdateParams) MarshalJSON() (data []byte, err error)

func (*EnvironmentWorkUpdateParams) UnmarshalJSON

func (r *EnvironmentWorkUpdateParams) UnmarshalJSON(data []byte) error

type Error

type Error = convention.Error

Error is the standard Qoder HTTP error.

type FallbackBlockParam

type FallbackBlockParam struct {
	// Identifies one hop of a fallback transition.
	From FallbackInfoParam `json:"from,omitzero" api:"required"`
	// Identifies one hop of a fallback transition.
	To FallbackInfoParam `json:"to,omitzero" api:"required"`
	// The response block's `trigger`, echoed verbatim. Accepted and ignored by the
	// server; any object or `null` is allowed.
	Trigger any `json:"trigger,omitzero"`
	// This field can be elided, and will marshal its zero value as "fallback".
	Type constant.Fallback `json:"type" default:"fallback"`
	// contains filtered or unexported fields
}

A `fallback` block echoed back from a prior response.

Accepted in `messages[].content` and not rendered into the prompt; not validated against the request's `fallbacks` chain or top-level `model`.

Echo the assistant turn back verbatim, including this block in its original position. The block marks the boundary between content produced before and after a fallback hop, and the server relies on that boundary to validate the turn: when thinking runs flank the boundary, omitting the block merges them into one span the server cannot validate (the request is rejected), and moving it into the middle of a single run is likewise rejected; between non-thinking blocks the block's placement has no validation effect.

The properties From, To, Type are required.

func (FallbackBlockParam) MarshalJSON

func (r FallbackBlockParam) MarshalJSON() (data []byte, err error)

func (*FallbackBlockParam) UnmarshalJSON

func (r *FallbackBlockParam) UnmarshalJSON(data []byte) error

type FallbackInfoParam

type FallbackInfoParam struct {
	// The model that will complete your prompt.
	//
	// See [models](https://docs.qoder.com/cloud-agents/api/models/list) for additional
	// details and options.
	Model Model `json:"model,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Identifies one hop of a fallback transition.

The property Model is required.

func (FallbackInfoParam) MarshalJSON

func (r FallbackInfoParam) MarshalJSON() (data []byte, err error)

func (*FallbackInfoParam) UnmarshalJSON

func (r *FallbackInfoParam) UnmarshalJSON(data []byte) error

type FileDeleteParams

type FileDeleteParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type FileDocumentSourceParam

type FileDocumentSourceParam struct {
	FileID string `json:"file_id" api:"required"`
	// This field can be elided, and will marshal its zero value as "file".
	Type constant.File `json:"type" default:"file"`
	// contains filtered or unexported fields
}

The properties FileID, Type are required.

func (FileDocumentSourceParam) MarshalJSON

func (r FileDocumentSourceParam) MarshalJSON() (data []byte, err error)

func (*FileDocumentSourceParam) UnmarshalJSON

func (r *FileDocumentSourceParam) UnmarshalJSON(data []byte) error

type FileDownloadParams

type FileDownloadParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type FileGetMetadataParams

type FileGetMetadataParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type FileImageSourceParam

type FileImageSourceParam struct {
	FileID string `json:"file_id" api:"required"`
	// This field can be elided, and will marshal its zero value as "file".
	Type constant.File `json:"type" default:"file"`
	// contains filtered or unexported fields
}

The properties FileID, Type are required.

func (FileImageSourceParam) MarshalJSON

func (r FileImageSourceParam) MarshalJSON() (data []byte, err error)

func (*FileImageSourceParam) UnmarshalJSON

func (r *FileImageSourceParam) UnmarshalJSON(data []byte) error

type FileListParams

type FileListParams struct {
	Name param.Opt[string] `query:"name,omitzero" json:"-"`

	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Opaque page cursor returned in a prior list response's `next_page`. Prefixed
	// `page_`.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Number of items to return per page.
	//
	// Defaults to `20`. Ranges from `1` to `1000`.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by scope ID. Only returns files associated with the specified scope
	// (e.g., a session ID).
	ScopeID param.Opt[string] `query:"scope_id,omitzero" json:"-"`
	// Restrict the result set to Files whose `id` is in this list. At most 100 entries
	// (after de-duplication). Mutually exclusive with `page` and `limit`. When
	// supplied, the response is always a single page (`next_page` is null). IDs that
	// do not resolve to a visible File — including deleted Files — are silently
	// omitted.
	IDs []string `query:"ids,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FileListParams) URLQuery

func (r FileListParams) URLQuery() (v url.Values, err error)

URLQuery serializes FileListParams's query parameters as `url.Values`.

type FileMetadata

type FileMetadata struct {
	Metadata map[string]string `json:"metadata"`
	Status   string            `json:"status"`

	// Unique object identifier.
	//
	// The format and length of IDs may change over time.
	ID string `json:"id" api:"required"`
	// RFC 3339 datetime string representing when the file was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Original filename of the uploaded file.
	Filename string `json:"filename" api:"required"`
	// MIME type of the file.
	MimeType string `json:"mime_type" api:"required"`
	// Size of the file in bytes.
	SizeBytes int64 `json:"size_bytes" api:"required"`
	// Object type.
	//
	// For files, this is always `"file"`.
	Type constant.File `json:"type" default:"file"`
	// Whether the file can be downloaded.
	Downloadable bool `json:"downloadable"`
	// RFC 3339 datetime string representing when the file will expire and become
	// unavailable for download. Null if the file does not expire. For files uploaded
	// with `expires_in_seconds`, this is the upload time plus that value.
	ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
	// The scope of this file, indicating the context in which it was created (e.g., a
	// session).
	Scope FileScope `json:"scope" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Metadata respjson.Field
		Status   respjson.Field

		ID           respjson.Field
		CreatedAt    respjson.Field
		Filename     respjson.Field
		MimeType     respjson.Field
		SizeBytes    respjson.Field
		Type         respjson.Field
		Downloadable respjson.Field
		ExpiresAt    respjson.Field
		Scope        respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileMetadata) RawJSON

func (r FileMetadata) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileMetadata) UnmarshalJSON

func (r *FileMetadata) UnmarshalJSON(data []byte) error

type FileScope

type FileScope struct {
	// The ID of the scoping resource (e.g., the session ID).
	ID string `json:"id" api:"required"`
	// The type of scope (e.g., `"session"`).
	Type constant.Session `json:"type" default:"session"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileScope) RawJSON

func (r FileScope) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileScope) UnmarshalJSON

func (r *FileScope) UnmarshalJSON(data []byte) error

type FileService

type FileService struct {
	Options []option.RequestOption
}

FileService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileService method instead.

func NewFileService

func NewFileService(opts ...option.RequestOption) (r FileService)

NewFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FileService) Delete

func (r *FileService) Delete(ctx context.Context, fileID string, body FileDeleteParams, opts ...option.RequestOption) (res *DeletedFile, err error)

Delete File

func (*FileService) Download

func (r *FileService) Download(ctx context.Context, fileID string, query FileDownloadParams, opts ...option.RequestOption) (res *http.Response, err error)

Download File

func (*FileService) GetMetadata

func (r *FileService) GetMetadata(ctx context.Context, fileID string, query FileGetMetadataParams, opts ...option.RequestOption) (res *FileMetadata, err error)

Get File Metadata

func (*FileService) List

List Files

func (*FileService) ListAutoPaging

List Files

func (*FileService) Upload

func (r *FileService) Upload(ctx context.Context, params FileUploadParams, opts ...option.RequestOption) (res *FileMetadata, err error)

Upload File

type FileUploadParams

type FileUploadParams struct {
	Name param.Opt[string] `json:"name,omitzero"`

	Metadata map[string]string `json:"metadata,omitzero" api:"metadata"`

	// The file to upload. Only the final path component of the part's `filename` is
	// kept; an absent or empty `filename` is replaced with `unnamed` plus the
	// extension for the file's stored `mime_type`, when known.
	File io.Reader `json:"file,omitzero" api:"required" format:"binary"`
	// Seconds from upload until the file expires and its bytes become permanently
	// unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).
	ExpiresInSeconds param.Opt[int64] `json:"expires_in_seconds,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FileUploadParams) MarshalMultipart

func (r FileUploadParams) MarshalMultipart() (data []byte, contentType string, err error)

type HealthCheckWorkData

type HealthCheckWorkData struct {
	// Health check identifier
	ID string `json:"id" api:"required"`
	// Type of work data
	//
	// Any of "healthcheck".
	Type HealthCheckWorkDataType `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Work data for environment health checks.

This resource type is used for assessing the health of containers where work occurs. The data is opaque to users; the runner handles the health check by probing connectivity to required services.

func (HealthCheckWorkData) RawJSON

func (r HealthCheckWorkData) RawJSON() string

Returns the unmodified JSON received from the API

func (*HealthCheckWorkData) UnmarshalJSON

func (r *HealthCheckWorkData) UnmarshalJSON(data []byte) error

type HealthCheckWorkDataType

type HealthCheckWorkDataType string

Type of work data

const (
	HealthCheckWorkDataTypeHealthcheck HealthCheckWorkDataType = "healthcheck"
)

type ImageBlockParam

type ImageBlockParam struct {
	Source ImageBlockParamSourceUnion `json:"source,omitzero" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// Configures the transformations the server applies to this image before the model
	// observes it. Each key names a condition the server transforms images for; its
	// value selects the transformation applied. Omitted keys keep their default
	// behavior, and an empty object is equivalent to omitting the field.
	Transformations ImageTransformationsParam `json:"transformations,omitzero"`
	// This field can be elided, and will marshal its zero value as "image".
	Type constant.Image `json:"type" default:"image"`
	// contains filtered or unexported fields
}

The properties Source, Type are required.

func (ImageBlockParam) MarshalJSON

func (r ImageBlockParam) MarshalJSON() (data []byte, err error)

func (*ImageBlockParam) UnmarshalJSON

func (r *ImageBlockParam) UnmarshalJSON(data []byte) error

type ImageBlockParamSourceUnion

type ImageBlockParamSourceUnion struct {
	OfBase64 *Base64ImageSourceParam `json:",omitzero,inline"`
	OfURL    *URLImageSourceParam    `json:",omitzero,inline"`
	OfFile   *FileImageSourceParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ImageBlockParamSourceUnion) GetData

func (u ImageBlockParamSourceUnion) GetData() *string

Returns a pointer to the underlying variant's property, if present.

func (ImageBlockParamSourceUnion) GetFileID

func (u ImageBlockParamSourceUnion) GetFileID() *string

Returns a pointer to the underlying variant's property, if present.

func (ImageBlockParamSourceUnion) GetMediaType

func (u ImageBlockParamSourceUnion) GetMediaType() *string

Returns a pointer to the underlying variant's property, if present.

func (ImageBlockParamSourceUnion) GetType

func (u ImageBlockParamSourceUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (ImageBlockParamSourceUnion) GetURL

func (u ImageBlockParamSourceUnion) GetURL() *string

Returns a pointer to the underlying variant's property, if present.

func (ImageBlockParamSourceUnion) MarshalJSON

func (u ImageBlockParamSourceUnion) MarshalJSON() ([]byte, error)

func (*ImageBlockParamSourceUnion) UnmarshalJSON

func (u *ImageBlockParamSourceUnion) UnmarshalJSON(data []byte) error

type ImageTransformationsParam

type ImageTransformationsParam struct {
	// What the server does when this image exceeds the model's maximum image size.
	// `"downsize"` (the default) scales the image down to fit, which changes the
	// dimensions the model observes without telling you. `"error"` instead rejects the
	// request with a 400 error naming the image's dimensions and the largest
	// dimensions that fit, so you can scale the image deliberately — your image is
	// never silently scaled down.
	//
	// Any of "downsize", "error".
	OversizedImage ImageTransformationsParamOversizedImage `json:"oversized_image,omitzero"`
	// contains filtered or unexported fields
}

Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field.

func (ImageTransformationsParam) MarshalJSON

func (r ImageTransformationsParam) MarshalJSON() (data []byte, err error)

func (*ImageTransformationsParam) UnmarshalJSON

func (r *ImageTransformationsParam) UnmarshalJSON(data []byte) error

type ImageTransformationsParamOversizedImage

type ImageTransformationsParamOversizedImage string

What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down.

type LimitedNetwork

type LimitedNetwork struct {
	// Permits outbound access to MCP server endpoints configured on the agent, beyond
	// those listed in the `allowed_hosts` array.
	AllowMCPServers bool `json:"allow_mcp_servers" api:"required"`
	// Permits outbound access to public package registries (PyPI, npm, etc.) beyond
	// those listed in the `allowed_hosts` array.
	AllowPackageManagers bool `json:"allow_package_managers" api:"required"`
	// Specifies domains the container can reach.
	AllowedHosts []string `json:"allowed_hosts" api:"required"`
	// Network policy type
	Type constant.Limited `json:"type" default:"limited"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowMCPServers      respjson.Field
		AllowPackageManagers respjson.Field
		AllowedHosts         respjson.Field
		Type                 respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Limited network access.

func (LimitedNetwork) RawJSON

func (r LimitedNetwork) RawJSON() string

Returns the unmodified JSON received from the API

func (*LimitedNetwork) UnmarshalJSON

func (r *LimitedNetwork) UnmarshalJSON(data []byte) error

type LimitedNetworkParams

type LimitedNetworkParams struct {
	// Permits outbound access to MCP server endpoints configured on the agent, beyond
	// those listed in the `allowed_hosts` array. Defaults to `false`.
	AllowMCPServers param.Opt[bool] `json:"allow_mcp_servers,omitzero"`
	// Permits outbound access to public package registries (PyPI, npm, etc.) beyond
	// those listed in the `allowed_hosts` array. Defaults to `false` on creation. Must
	// be `true` when `packages` are specified.
	AllowPackageManagers param.Opt[bool] `json:"allow_package_managers,omitzero"`
	// Specifies domains the container can reach.
	AllowedHosts []string `json:"allowed_hosts,omitzero"`
	// Network policy type
	//
	// This field can be elided, and will marshal its zero value as "limited".
	Type constant.Limited `json:"type" default:"limited"`
	// contains filtered or unexported fields
}

Limited network request params.

Fields default to null; on update, omitted fields preserve the existing value.

The property Type is required.

func (LimitedNetworkParams) MarshalJSON

func (r LimitedNetworkParams) MarshalJSON() (data []byte, err error)

func (*LimitedNetworkParams) UnmarshalJSON

func (r *LimitedNetworkParams) UnmarshalJSON(data []byte) error

type MCPToolUseBlockParam

type MCPToolUseBlockParam struct {
	ID    string `json:"id" api:"required"`
	Input any    `json:"input,omitzero" api:"required"`
	Name  string `json:"name" api:"required"`
	// The name of the MCP server
	ServerName string `json:"server_name" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "mcp_tool_use".
	Type constant.MCPToolUse `json:"type" default:"mcp_tool_use"`
	// contains filtered or unexported fields
}

The properties ID, Input, Name, ServerName, Type are required.

func (MCPToolUseBlockParam) MarshalJSON

func (r MCPToolUseBlockParam) MarshalJSON() (data []byte, err error)

func (*MCPToolUseBlockParam) UnmarshalJSON

func (r *MCPToolUseBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsAPIActor

type ManagedAgentsAPIActor struct {
	// ID of the API key that performed the write. This identifies the key, not the
	// secret.
	APIKeyID string `json:"api_key_id" api:"required"`
	// Any of "api_actor".
	Type ManagedAgentsAPIActorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		APIKeyID    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attribution for a write made directly via the public API (outside of any session).

func (ManagedAgentsAPIActor) RawJSON

func (r ManagedAgentsAPIActor) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsAPIActor) UnmarshalJSON

func (r *ManagedAgentsAPIActor) UnmarshalJSON(data []byte) error

type ManagedAgentsAPIActorType

type ManagedAgentsAPIActorType string
const (
	ManagedAgentsAPIActorTypeAPIActor ManagedAgentsAPIActorType = "api_actor"
)

type ManagedAgentsActorUnion

type ManagedAgentsActorUnion struct {
	// This field is from variant [ManagedAgentsSessionActor].
	SessionID string `json:"session_id"`
	// Any of "session_actor", "api_actor", "user_actor", "service_account_actor".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsAPIActor].
	APIKeyID string `json:"api_key_id"`
	// This field is from variant [ManagedAgentsUserActor].
	UserID string `json:"user_id"`
	// This field is from variant [ManagedAgentsServiceAccountActor].
	ServiceAccountID string `json:"service_account_id"`
	JSON             struct {
		SessionID        respjson.Field
		Type             respjson.Field
		APIKeyID         respjson.Field
		UserID           respjson.Field
		ServiceAccountID respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsActorUnion contains all possible properties and values from ManagedAgentsSessionActor, ManagedAgentsAPIActor, ManagedAgentsUserActor, ManagedAgentsServiceAccountActor.

Use the ManagedAgentsActorUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsActorUnion) AsAPIActor

func (ManagedAgentsActorUnion) AsAny

func (u ManagedAgentsActorUnion) AsAny() anyManagedAgentsActor

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsActorUnion.AsAny().(type) {
case qoder.ManagedAgentsSessionActor:
case qoder.ManagedAgentsAPIActor:
case qoder.ManagedAgentsUserActor:
case qoder.ManagedAgentsServiceAccountActor:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsActorUnion) AsServiceAccountActor

func (u ManagedAgentsActorUnion) AsServiceAccountActor() (v ManagedAgentsServiceAccountActor)

func (ManagedAgentsActorUnion) AsSessionActor

func (u ManagedAgentsActorUnion) AsSessionActor() (v ManagedAgentsSessionActor)

func (ManagedAgentsActorUnion) AsUserActor

func (u ManagedAgentsActorUnion) AsUserActor() (v ManagedAgentsUserActor)

func (ManagedAgentsActorUnion) RawJSON

func (u ManagedAgentsActorUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsActorUnion) UnmarshalJSON

func (r *ManagedAgentsActorUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAdvisor

type ManagedAgentsAdvisor struct {
	// The advisor model id.
	Model string `json:"model" api:"required"`
	// Any of "advisor".
	Type ManagedAgentsAdvisorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Model       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Platform advisor roster entry: a model the session's primary thread may consult mid-turn.

func (ManagedAgentsAdvisor) RawJSON

func (r ManagedAgentsAdvisor) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsAdvisor) UnmarshalJSON

func (r *ManagedAgentsAdvisor) UnmarshalJSON(data []byte) error

type ManagedAgentsAdvisorParams

type ManagedAgentsAdvisorParams struct {
	// A model id. The model must be permitted as an advisor for this agent's model
	// — see the sessions/threads/advisor spec.
	Model string `json:"model" api:"required"`
	// Any of "advisor".
	Type ManagedAgentsAdvisorParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Platform advisor roster entry: a model the session's primary thread may consult mid-turn. At most one per roster; the entry occupies the roster name `qoder.advisor`.

The properties Model, Type are required.

func (ManagedAgentsAdvisorParams) MarshalJSON

func (r ManagedAgentsAdvisorParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAdvisorParams) UnmarshalJSON

func (r *ManagedAgentsAdvisorParams) UnmarshalJSON(data []byte) error

type ManagedAgentsAdvisorParamsType

type ManagedAgentsAdvisorParamsType string
const (
	ManagedAgentsAdvisorParamsTypeAdvisor ManagedAgentsAdvisorParamsType = "advisor"
)

type ManagedAgentsAdvisorType

type ManagedAgentsAdvisorType string
const (
	ManagedAgentsAdvisorTypeAdvisor ManagedAgentsAdvisorType = "advisor"
)

type ManagedAgentsAgent

type ManagedAgentsAgent struct {
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	CreatedAt   time.Time                             `json:"created_at" api:"required" format:"date-time"`
	Description string                                `json:"description" api:"required"`
	MCPServers  []ManagedAgentsMCPServerURLDefinition `json:"mcp_servers" api:"required"`
	Metadata    map[string]string                     `json:"metadata" api:"required"`
	// Model identifier and configuration.
	Model ManagedAgentsModelConfig `json:"model" api:"required"`
	// Resolved coordinator topology with a concrete agent roster.
	Multiagent ManagedAgentsMultiagent        `json:"multiagent" api:"required"`
	Name       string                         `json:"name" api:"required"`
	Skills     []ManagedAgentsAgentSkillUnion `json:"skills" api:"required"`
	System     string                         `json:"system" api:"required"`
	Tools      []ManagedAgentsAgentToolUnion  `json:"tools" api:"required"`
	// Any of "agent".
	Type ManagedAgentsAgentType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// The agent's current version. Starts at 1 and increments when the agent is
	// modified.
	Version int64 `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ArchivedAt  respjson.Field
		CreatedAt   respjson.Field
		Description respjson.Field
		MCPServers  respjson.Field
		Metadata    respjson.Field
		Model       respjson.Field
		Multiagent  respjson.Field
		Name        respjson.Field
		Skills      respjson.Field
		System      respjson.Field
		Tools       respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A Managed Agents `agent`.

func (ManagedAgentsAgent) RawJSON

func (r ManagedAgentsAgent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgent) UnmarshalJSON

func (r *ManagedAgentsAgent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentArchivedDeploymentPausedReasonError

type ManagedAgentsAgentArchivedDeploymentPausedReasonError struct {
	// Any of "agent_archived_error".
	Type ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's agent was archived.

func (ManagedAgentsAgentArchivedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentArchivedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType

type ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsAgentArchivedDeploymentPausedReasonErrorTypeAgentArchivedError ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType = "agent_archived_error"
)

type ManagedAgentsAgentArchivedRunError

type ManagedAgentsAgentArchivedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "agent_archived_error".
	Type ManagedAgentsAgentArchivedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's agent was archived.

func (ManagedAgentsAgentArchivedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentArchivedRunError) UnmarshalJSON

func (r *ManagedAgentsAgentArchivedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentArchivedRunErrorType

type ManagedAgentsAgentArchivedRunErrorType string
const (
	ManagedAgentsAgentArchivedRunErrorTypeAgentArchivedError ManagedAgentsAgentArchivedRunErrorType = "agent_archived_error"
)

type ManagedAgentsAgentCustomToolUseEvent

type ManagedAgentsAgentCustomToolUseEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Input parameters for the tool call.
	Input map[string]any `json:"input" api:"required"`
	// Name of the custom tool being called.
	Name string `json:"name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.custom_tool_use".
	Type ManagedAgentsAgentCustomToolUseEventType `json:"type" api:"required"`
	// When set, this event was cross-posted from a subagent's thread to surface its
	// custom tool use on the primary thread's stream. Empty on the thread's own
	// events. Echo this on a `user.custom_tool_result` event to route the result back.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Input           respjson.Field
		Name            respjson.Field
		ProcessedAt     respjson.Field
		Type            respjson.Field
		SessionThreadID respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event emitted when the agent calls a custom tool. The session goes idle until the client sends a `user.custom_tool_result` event with the result.

func (ManagedAgentsAgentCustomToolUseEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentCustomToolUseEvent) UnmarshalJSON

func (r *ManagedAgentsAgentCustomToolUseEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentCustomToolUseEventType

type ManagedAgentsAgentCustomToolUseEventType string
const (
	ManagedAgentsAgentCustomToolUseEventTypeAgentCustomToolUse ManagedAgentsAgentCustomToolUseEventType = "agent.custom_tool_use"
)

type ManagedAgentsAgentMCPToolResultEvent

type ManagedAgentsAgentMCPToolResultEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// The id of the `agent.mcp_tool_use` event this result corresponds to.
	MCPToolUseID string `json:"mcp_tool_use_id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.mcp_tool_result".
	Type ManagedAgentsAgentMCPToolResultEventType `json:"type" api:"required"`
	// The result content returned by the tool.
	Content []ManagedAgentsAgentMCPToolResultEventContentUnion `json:"content"`
	// Whether the tool execution resulted in an error.
	IsError bool `json:"is_error" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		MCPToolUseID respjson.Field
		ProcessedAt  respjson.Field
		Type         respjson.Field
		Content      respjson.Field
		IsError      respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event representing the result of an MCP tool execution.

func (ManagedAgentsAgentMCPToolResultEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentMCPToolResultEvent) UnmarshalJSON

func (r *ManagedAgentsAgentMCPToolResultEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentMCPToolResultEventContentUnion

type ManagedAgentsAgentMCPToolResultEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "search_result".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion], [string]
	Source ManagedAgentsAgentMCPToolResultEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	Title   string `json:"title"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Citations ManagedAgentsSearchResultCitations `json:"citations"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Content []ManagedAgentsSearchResultContent `json:"content"`
	JSON    struct {
		Text      respjson.Field
		Type      respjson.Field
		Source    respjson.Field
		Context   respjson.Field
		Title     respjson.Field
		Citations respjson.Field
		Content   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentMCPToolResultEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsSearchResultBlock.

Use the ManagedAgentsAgentMCPToolResultEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentMCPToolResultEventContentUnion) AsAny

func (u ManagedAgentsAgentMCPToolResultEventContentUnion) AsAny() anyManagedAgentsAgentMCPToolResultEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentMCPToolResultEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsSearchResultBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentMCPToolResultEventContentUnion) AsDocument

func (ManagedAgentsAgentMCPToolResultEventContentUnion) AsImage

func (ManagedAgentsAgentMCPToolResultEventContentUnion) AsSearchResult

func (ManagedAgentsAgentMCPToolResultEventContentUnion) AsText

func (ManagedAgentsAgentMCPToolResultEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentMCPToolResultEventContentUnion) UnmarshalJSON

type ManagedAgentsAgentMCPToolResultEventContentUnionSource

type ManagedAgentsAgentMCPToolResultEventContentUnionSource struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString  string `json:",inline"`
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		OfString  respjson.Field
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentMCPToolResultEventContentUnionSource is an implicit subunion of ManagedAgentsAgentMCPToolResultEventContentUnion. ManagedAgentsAgentMCPToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentMCPToolResultEventContentUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ManagedAgentsAgentMCPToolResultEventContentUnionSource) UnmarshalJSON

type ManagedAgentsAgentMCPToolResultEventType

type ManagedAgentsAgentMCPToolResultEventType string
const (
	ManagedAgentsAgentMCPToolResultEventTypeAgentMCPToolResult ManagedAgentsAgentMCPToolResultEventType = "agent.mcp_tool_result"
)

type ManagedAgentsAgentMCPToolUseEvent

type ManagedAgentsAgentMCPToolUseEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Input parameters for the tool call.
	Input map[string]any `json:"input" api:"required"`
	// Name of the MCP server providing the tool.
	MCPServerName string `json:"mcp_server_name" api:"required"`
	// Name of the MCP tool being used.
	Name string `json:"name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.mcp_tool_use".
	Type ManagedAgentsAgentMCPToolUseEventType `json:"type" api:"required"`
	// AgentEvaluatedPermission enum
	//
	// Any of "allow", "ask", "deny".
	EvaluatedPermission ManagedAgentsAgentMCPToolUseEventEvaluatedPermission `json:"evaluated_permission"`
	// When set, this event was cross-posted from a subagent's thread to surface its
	// permission request on the primary thread's stream. Empty on the thread's own
	// events. Echo this on a `user.tool_confirmation` event to route the approval
	// back.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Input               respjson.Field
		MCPServerName       respjson.Field
		Name                respjson.Field
		ProcessedAt         respjson.Field
		Type                respjson.Field
		EvaluatedPermission respjson.Field
		SessionThreadID     respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event emitted when the agent invokes a tool provided by an MCP server.

func (ManagedAgentsAgentMCPToolUseEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentMCPToolUseEvent) UnmarshalJSON

func (r *ManagedAgentsAgentMCPToolUseEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentMCPToolUseEventEvaluatedPermission

type ManagedAgentsAgentMCPToolUseEventEvaluatedPermission string

AgentEvaluatedPermission enum

const (
	ManagedAgentsAgentMCPToolUseEventEvaluatedPermissionAllow ManagedAgentsAgentMCPToolUseEventEvaluatedPermission = "allow"
	ManagedAgentsAgentMCPToolUseEventEvaluatedPermissionAsk   ManagedAgentsAgentMCPToolUseEventEvaluatedPermission = "ask"
	ManagedAgentsAgentMCPToolUseEventEvaluatedPermissionDeny  ManagedAgentsAgentMCPToolUseEventEvaluatedPermission = "deny"
)

type ManagedAgentsAgentMCPToolUseEventType

type ManagedAgentsAgentMCPToolUseEventType string
const (
	ManagedAgentsAgentMCPToolUseEventTypeAgentMCPToolUse ManagedAgentsAgentMCPToolUseEventType = "agent.mcp_tool_use"
)

type ManagedAgentsAgentMessageEvent

type ManagedAgentsAgentMessageEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Array of text blocks comprising the agent response.
	Content []ManagedAgentsAgentMessageEventContentUnion `json:"content" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.message".
	Type ManagedAgentsAgentMessageEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Content     respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An agent response event in the session conversation.

func (ManagedAgentsAgentMessageEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentMessageEvent) UnmarshalJSON

func (r *ManagedAgentsAgentMessageEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentMessageEventContentUnion

type ManagedAgentsAgentMessageEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "redacted".
	Type string `json:"type"`
	JSON struct {
		Text respjson.Field
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentMessageEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsRedactedBlock.

Use the ManagedAgentsAgentMessageEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentMessageEventContentUnion) AsAny

func (u ManagedAgentsAgentMessageEventContentUnion) AsAny() anyManagedAgentsAgentMessageEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentMessageEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsRedactedBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentMessageEventContentUnion) AsRedacted

func (ManagedAgentsAgentMessageEventContentUnion) AsText

func (ManagedAgentsAgentMessageEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentMessageEventContentUnion) UnmarshalJSON

func (r *ManagedAgentsAgentMessageEventContentUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentMessageEventType

type ManagedAgentsAgentMessageEventType string
const (
	ManagedAgentsAgentMessageEventTypeAgentMessage ManagedAgentsAgentMessageEventType = "agent.message"
)

type ManagedAgentsAgentMessagePreview

type ManagedAgentsAgentMessagePreview struct {
	// The id the buffered agent.message will carry if it is emitted. Matches the
	// event_id on this preview's event_delta events.
	ID string `json:"id" api:"required"`
	// Any of "agent.message".
	Type ManagedAgentsAgentMessagePreviewType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsAgentMessagePreview) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentMessagePreview) UnmarshalJSON

func (r *ManagedAgentsAgentMessagePreview) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentMessagePreviewType

type ManagedAgentsAgentMessagePreviewType string
const (
	ManagedAgentsAgentMessagePreviewTypeAgentMessage ManagedAgentsAgentMessagePreviewType = "agent.message"
)

type ManagedAgentsAgentParams

type ManagedAgentsAgentParams struct {
	// The `agent` ID.
	ID string `json:"id" api:"required"`
	// Any of "agent".
	Type ManagedAgentsAgentParamsType `json:"type,omitzero" api:"required"`
	// The specific `agent` version to use. Omit to use the latest version. Must be at
	// least 1 if specified.
	Version param.Opt[int64] `json:"version,omitzero"`
	// contains filtered or unexported fields
}

Specification for an Agent. Provide a specific `version` or use the short-form `agent="agent_id"` for the most recent version

The properties ID, Type are required.

func (ManagedAgentsAgentParams) MarshalJSON

func (r ManagedAgentsAgentParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAgentParams) UnmarshalJSON

func (r *ManagedAgentsAgentParams) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentParamsType

type ManagedAgentsAgentParamsType string
const (
	ManagedAgentsAgentParamsTypeAgent ManagedAgentsAgentParamsType = "agent"
)

type ManagedAgentsAgentReference

type ManagedAgentsAgentReference struct {
	ID string `json:"id" api:"required"`
	// Any of "agent".
	Type    ManagedAgentsAgentReferenceType `json:"type" api:"required"`
	Version int64                           `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A resolved agent reference with a concrete version.

func (ManagedAgentsAgentReference) RawJSON

func (r ManagedAgentsAgentReference) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentReference) UnmarshalJSON

func (r *ManagedAgentsAgentReference) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentReferenceType

type ManagedAgentsAgentReferenceType string
const (
	ManagedAgentsAgentReferenceTypeAgent ManagedAgentsAgentReferenceType = "agent"
)

type ManagedAgentsAgentSkillUnion

type ManagedAgentsAgentSkillUnion struct {
	SkillID string `json:"skill_id"`
	// Any of "qoder", "custom".
	Type    string `json:"type"`
	Version string `json:"version"`
	JSON    struct {
		SkillID respjson.Field
		Type    respjson.Field
		Version respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentSkillUnion contains all possible properties and values from ManagedAgentsQoderSkill, ManagedAgentsCustomSkill.

Use the ManagedAgentsAgentSkillUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentSkillUnion) AsAny

func (u ManagedAgentsAgentSkillUnion) AsAny() anyManagedAgentsAgentSkill

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentSkillUnion.AsAny().(type) {
case qoder.ManagedAgentsQoderSkill:
case qoder.ManagedAgentsCustomSkill:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentSkillUnion) AsCustom

func (ManagedAgentsAgentSkillUnion) AsQoder

func (ManagedAgentsAgentSkillUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentSkillUnion) UnmarshalJSON

func (r *ManagedAgentsAgentSkillUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentThinkingEvent

type ManagedAgentsAgentThinkingEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.thinking".
	Type ManagedAgentsAgentThinkingEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.

func (ManagedAgentsAgentThinkingEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThinkingEvent) UnmarshalJSON

func (r *ManagedAgentsAgentThinkingEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentThinkingEventType

type ManagedAgentsAgentThinkingEventType string
const (
	ManagedAgentsAgentThinkingEventTypeAgentThinking ManagedAgentsAgentThinkingEventType = "agent.thinking"
)

type ManagedAgentsAgentThinkingPreview

type ManagedAgentsAgentThinkingPreview struct {
	// The id the buffered agent.thinking will carry if it is emitted. Start-only — no
	// event_delta events follow.
	ID string `json:"id" api:"required"`
	// Any of "agent.thinking".
	Type ManagedAgentsAgentThinkingPreviewType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsAgentThinkingPreview) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThinkingPreview) UnmarshalJSON

func (r *ManagedAgentsAgentThinkingPreview) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentThinkingPreviewType

type ManagedAgentsAgentThinkingPreviewType string
const (
	ManagedAgentsAgentThinkingPreviewTypeAgentThinking ManagedAgentsAgentThinkingPreviewType = "agent.thinking"
)

type ManagedAgentsAgentThreadContextCompactedEvent

type ManagedAgentsAgentThreadContextCompactedEvent struct {
	// Credits for this compaction call, already included in Session totals.
	Usage ManagedAgentsSpanModelUsage `json:"usage"`
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.thread_context_compacted".
	Type ManagedAgentsAgentThreadContextCompactedEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Usage       respjson.Field
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates that context compaction (summarization) occurred during the session.

func (ManagedAgentsAgentThreadContextCompactedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThreadContextCompactedEvent) UnmarshalJSON

func (r *ManagedAgentsAgentThreadContextCompactedEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentThreadContextCompactedEventType

type ManagedAgentsAgentThreadContextCompactedEventType string
const (
	ManagedAgentsAgentThreadContextCompactedEventTypeAgentThreadContextCompacted ManagedAgentsAgentThreadContextCompactedEventType = "agent.thread_context_compacted"
)

type ManagedAgentsAgentThreadMessageReceivedEvent

type ManagedAgentsAgentThreadMessageReceivedEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Message content blocks.
	Content []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:"content" api:"required"`
	// Public `sthr_` ID of the thread that sent the message.
	FromSessionThreadID string `json:"from_session_thread_id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.thread_message_received".
	Type ManagedAgentsAgentThreadMessageReceivedEventType `json:"type" api:"required"`
	// Name of the callable agent this message came from. Absent when received from the
	// primary agent.
	FromAgentName string `json:"from_agent_name" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Content             respjson.Field
		FromSessionThreadID respjson.Field
		ProcessedAt         respjson.Field
		Type                respjson.Field
		FromAgentName       respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Delivery event written to the target thread's input stream when an agent-to-agent message arrives.

func (ManagedAgentsAgentThreadMessageReceivedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThreadMessageReceivedEvent) UnmarshalJSON

func (r *ManagedAgentsAgentThreadMessageReceivedEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentThreadMessageReceivedEventContentUnion

type ManagedAgentsAgentThreadMessageReceivedEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "redacted".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion]
	Source ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Title string `json:"title"`
	JSON  struct {
		Text    respjson.Field
		Type    respjson.Field
		Source  respjson.Field
		Context respjson.Field
		Title   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentThreadMessageReceivedEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsRedactedBlock.

Use the ManagedAgentsAgentThreadMessageReceivedEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsAny

func (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsAny() anyManagedAgentsAgentThreadMessageReceivedEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentThreadMessageReceivedEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsRedactedBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsDocument

func (ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsImage

func (ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsRedacted

func (ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsText

func (ManagedAgentsAgentThreadMessageReceivedEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThreadMessageReceivedEventContentUnion) UnmarshalJSON

type ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource

type ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource struct {
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource is an implicit subunion of ManagedAgentsAgentThreadMessageReceivedEventContentUnion. ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentThreadMessageReceivedEventContentUnion.

func (*ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource) UnmarshalJSON

type ManagedAgentsAgentThreadMessageReceivedEventType

type ManagedAgentsAgentThreadMessageReceivedEventType string
const (
	ManagedAgentsAgentThreadMessageReceivedEventTypeAgentThreadMessageReceived ManagedAgentsAgentThreadMessageReceivedEventType = "agent.thread_message_received"
)

type ManagedAgentsAgentThreadMessageSentEvent

type ManagedAgentsAgentThreadMessageSentEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Message content blocks.
	Content []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:"content" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Public `sthr_` ID of the thread the message was sent to.
	ToSessionThreadID string `json:"to_session_thread_id" api:"required"`
	// Any of "agent.thread_message_sent".
	Type ManagedAgentsAgentThreadMessageSentEventType `json:"type" api:"required"`
	// Name of the callable agent this message was sent to. Absent when sent to the
	// primary agent.
	ToAgentName string `json:"to_agent_name" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		Content           respjson.Field
		ProcessedAt       respjson.Field
		ToSessionThreadID respjson.Field
		Type              respjson.Field
		ToAgentName       respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Observability event emitted to the sender's output stream when an agent-to-agent message is sent.

func (ManagedAgentsAgentThreadMessageSentEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThreadMessageSentEvent) UnmarshalJSON

func (r *ManagedAgentsAgentThreadMessageSentEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentThreadMessageSentEventContentUnion

type ManagedAgentsAgentThreadMessageSentEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "redacted".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion]
	Source ManagedAgentsAgentThreadMessageSentEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Title string `json:"title"`
	JSON  struct {
		Text    respjson.Field
		Type    respjson.Field
		Source  respjson.Field
		Context respjson.Field
		Title   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentThreadMessageSentEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsRedactedBlock.

Use the ManagedAgentsAgentThreadMessageSentEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentThreadMessageSentEventContentUnion) AsAny

func (u ManagedAgentsAgentThreadMessageSentEventContentUnion) AsAny() anyManagedAgentsAgentThreadMessageSentEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentThreadMessageSentEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsRedactedBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentThreadMessageSentEventContentUnion) AsDocument

func (ManagedAgentsAgentThreadMessageSentEventContentUnion) AsImage

func (ManagedAgentsAgentThreadMessageSentEventContentUnion) AsRedacted

func (ManagedAgentsAgentThreadMessageSentEventContentUnion) AsText

func (ManagedAgentsAgentThreadMessageSentEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentThreadMessageSentEventContentUnion) UnmarshalJSON

type ManagedAgentsAgentThreadMessageSentEventContentUnionSource

type ManagedAgentsAgentThreadMessageSentEventContentUnionSource struct {
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentThreadMessageSentEventContentUnionSource is an implicit subunion of ManagedAgentsAgentThreadMessageSentEventContentUnion. ManagedAgentsAgentThreadMessageSentEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentThreadMessageSentEventContentUnion.

func (*ManagedAgentsAgentThreadMessageSentEventContentUnionSource) UnmarshalJSON

type ManagedAgentsAgentThreadMessageSentEventType

type ManagedAgentsAgentThreadMessageSentEventType string
const (
	ManagedAgentsAgentThreadMessageSentEventTypeAgentThreadMessageSent ManagedAgentsAgentThreadMessageSentEventType = "agent.thread_message_sent"
)

type ManagedAgentsAgentToolConfigParamsUnion

type ManagedAgentsAgentToolConfigParamsUnion struct {
	OfBash      *ManagedAgentsBashToolConfigParams      `json:",omitzero,inline"`
	OfEdit      *ManagedAgentsEditToolConfigParams      `json:",omitzero,inline"`
	OfRead      *ManagedAgentsReadToolConfigParams      `json:",omitzero,inline"`
	OfWrite     *ManagedAgentsWriteToolConfigParams     `json:",omitzero,inline"`
	OfGlob      *ManagedAgentsGlobToolConfigParams      `json:",omitzero,inline"`
	OfGrep      *ManagedAgentsGrepToolConfigParams      `json:",omitzero,inline"`
	OfWebFetch  *ManagedAgentsWebFetchToolConfigParams  `json:",omitzero,inline"`
	OfWebSearch *ManagedAgentsWebSearchToolConfigParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsAgentToolConfigParamsUnion) GetAllowedDomains

func (u ManagedAgentsAgentToolConfigParamsUnion) GetAllowedDomains() []string

Returns a pointer to the underlying variant's AllowedDomains property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) GetBlockedDomains

func (u ManagedAgentsAgentToolConfigParamsUnion) GetBlockedDomains() []string

Returns a pointer to the underlying variant's BlockedDomains property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) GetEnabled

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) GetMaxContentTokens

func (u ManagedAgentsAgentToolConfigParamsUnion) GetMaxContentTokens() *int64

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) GetName

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) GetPermissionPolicy

func (u ManagedAgentsAgentToolConfigParamsUnion) GetPermissionPolicy() (res managedAgentsAgentToolConfigParamsUnionPermissionPolicy)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsAgentToolConfigParamsUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) GetUserLocation

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentToolConfigParamsUnion) MarshalJSON

func (u ManagedAgentsAgentToolConfigParamsUnion) MarshalJSON() ([]byte, error)

func (*ManagedAgentsAgentToolConfigParamsUnion) UnmarshalJSON

func (u *ManagedAgentsAgentToolConfigParamsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolConfigUnion

type ManagedAgentsAgentToolConfigUnion struct {
	Enabled bool   `json:"enabled"`
	Name    string `json:"name"`
	// This field is a union of [ManagedAgentsBashToolConfigPermissionPolicyUnion],
	// [ManagedAgentsEditToolConfigPermissionPolicyUnion],
	// [ManagedAgentsReadToolConfigPermissionPolicyUnion],
	// [ManagedAgentsWriteToolConfigPermissionPolicyUnion],
	// [ManagedAgentsGlobToolConfigPermissionPolicyUnion],
	// [ManagedAgentsGrepToolConfigPermissionPolicyUnion],
	// [ManagedAgentsWebFetchToolConfigPermissionPolicyUnion],
	// [ManagedAgentsWebSearchToolConfigPermissionPolicyUnion]
	PermissionPolicy ManagedAgentsAgentToolConfigUnionPermissionPolicy `json:"permission_policy"`
	// Any of "bash", "edit", "read", "write", "glob", "grep", "web_fetch",
	// "web_search".
	Type           string   `json:"type"`
	AllowedDomains []string `json:"allowed_domains"`
	BlockedDomains []string `json:"blocked_domains"`
	// This field is from variant [ManagedAgentsWebFetchToolConfig].
	MaxContentTokens int64 `json:"max_content_tokens"`
	// This field is from variant [ManagedAgentsWebSearchToolConfig].
	UserLocation ManagedAgentsUserLocation `json:"user_location"`
	JSON         struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		AllowedDomains   respjson.Field
		BlockedDomains   respjson.Field
		MaxContentTokens respjson.Field
		UserLocation     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolConfigUnion contains all possible properties and values from ManagedAgentsBashToolConfig, ManagedAgentsEditToolConfig, ManagedAgentsReadToolConfig, ManagedAgentsWriteToolConfig, ManagedAgentsGlobToolConfig, ManagedAgentsGrepToolConfig, ManagedAgentsWebFetchToolConfig, ManagedAgentsWebSearchToolConfig.

Use the ManagedAgentsAgentToolConfigUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentToolConfigUnion) AsAny

func (u ManagedAgentsAgentToolConfigUnion) AsAny() anyManagedAgentsAgentToolConfig

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentToolConfigUnion.AsAny().(type) {
case qoder.ManagedAgentsBashToolConfig:
case qoder.ManagedAgentsEditToolConfig:
case qoder.ManagedAgentsReadToolConfig:
case qoder.ManagedAgentsWriteToolConfig:
case qoder.ManagedAgentsGlobToolConfig:
case qoder.ManagedAgentsGrepToolConfig:
case qoder.ManagedAgentsWebFetchToolConfig:
case qoder.ManagedAgentsWebSearchToolConfig:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentToolConfigUnion) AsBash

func (ManagedAgentsAgentToolConfigUnion) AsEdit

func (ManagedAgentsAgentToolConfigUnion) AsGlob

func (ManagedAgentsAgentToolConfigUnion) AsGrep

func (ManagedAgentsAgentToolConfigUnion) AsRead

func (ManagedAgentsAgentToolConfigUnion) AsWebFetch

func (ManagedAgentsAgentToolConfigUnion) AsWebSearch

func (ManagedAgentsAgentToolConfigUnion) AsWrite

func (ManagedAgentsAgentToolConfigUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolConfigUnion) UnmarshalJSON

func (r *ManagedAgentsAgentToolConfigUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolConfigUnionPermissionPolicy

type ManagedAgentsAgentToolConfigUnionPermissionPolicy struct {
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolConfigUnionPermissionPolicy is an implicit subunion of ManagedAgentsAgentToolConfigUnion. ManagedAgentsAgentToolConfigUnionPermissionPolicy provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentToolConfigUnion.

func (*ManagedAgentsAgentToolConfigUnionPermissionPolicy) UnmarshalJSON

type ManagedAgentsAgentToolResultEvent

type ManagedAgentsAgentToolResultEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// The id of the `agent.tool_use` event this result corresponds to.
	ToolUseID string `json:"tool_use_id" api:"required"`
	// Any of "agent.tool_result".
	Type ManagedAgentsAgentToolResultEventType `json:"type" api:"required"`
	// The result content returned by the tool.
	Content []ManagedAgentsAgentToolResultEventContentUnion `json:"content"`
	// Whether the tool execution resulted in an error.
	IsError bool `json:"is_error" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		ToolUseID   respjson.Field
		Type        respjson.Field
		Content     respjson.Field
		IsError     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event representing the result of an agent tool execution.

func (ManagedAgentsAgentToolResultEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolResultEvent) UnmarshalJSON

func (r *ManagedAgentsAgentToolResultEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolResultEventContentUnion

type ManagedAgentsAgentToolResultEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "search_result".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion], [string]
	Source ManagedAgentsAgentToolResultEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	Title   string `json:"title"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Citations ManagedAgentsSearchResultCitations `json:"citations"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Content []ManagedAgentsSearchResultContent `json:"content"`
	JSON    struct {
		Text      respjson.Field
		Type      respjson.Field
		Source    respjson.Field
		Context   respjson.Field
		Title     respjson.Field
		Citations respjson.Field
		Content   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolResultEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsSearchResultBlock.

Use the ManagedAgentsAgentToolResultEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentToolResultEventContentUnion) AsAny

func (u ManagedAgentsAgentToolResultEventContentUnion) AsAny() anyManagedAgentsAgentToolResultEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentToolResultEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsSearchResultBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentToolResultEventContentUnion) AsDocument

func (ManagedAgentsAgentToolResultEventContentUnion) AsImage

func (ManagedAgentsAgentToolResultEventContentUnion) AsSearchResult

func (ManagedAgentsAgentToolResultEventContentUnion) AsText

func (ManagedAgentsAgentToolResultEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolResultEventContentUnion) UnmarshalJSON

func (r *ManagedAgentsAgentToolResultEventContentUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolResultEventContentUnionSource

type ManagedAgentsAgentToolResultEventContentUnionSource struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString  string `json:",inline"`
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		OfString  respjson.Field
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolResultEventContentUnionSource is an implicit subunion of ManagedAgentsAgentToolResultEventContentUnion. ManagedAgentsAgentToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentToolResultEventContentUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ManagedAgentsAgentToolResultEventContentUnionSource) UnmarshalJSON

type ManagedAgentsAgentToolResultEventType

type ManagedAgentsAgentToolResultEventType string
const (
	ManagedAgentsAgentToolResultEventTypeAgentToolResult ManagedAgentsAgentToolResultEventType = "agent.tool_result"
)

type ManagedAgentsAgentToolUnion

type ManagedAgentsAgentToolUnion struct {
	EnabledTools    []string `json:"enabled_tools"`
	DisallowedTools []string `json:"disallowed_tools"`
	// This field is a union of [[]ManagedAgentsAgentToolConfigUnion],
	// [[]ManagedAgentsMCPToolConfig]
	Configs ManagedAgentsAgentToolUnionConfigs `json:"configs"`
	// This field is a union of [ManagedAgentsAgentToolsetDefaultConfig],
	// [ManagedAgentsMCPToolsetDefaultConfig]
	DefaultConfig ManagedAgentsAgentToolUnionDefaultConfig `json:"default_config"`
	// Any of "agent_toolset_20260401", "mcp_toolset", "custom".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsMCPToolset].
	MCPServerName string `json:"mcp_server_name"`
	// This field is from variant [ManagedAgentsCustomTool].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsCustomTool].
	InputSchema ManagedAgentsCustomToolInputSchema `json:"input_schema"`
	// This field is from variant [ManagedAgentsCustomTool].
	Name string `json:"name"`
	JSON struct {
		EnabledTools    respjson.Field
		DisallowedTools respjson.Field
		Configs         respjson.Field
		DefaultConfig   respjson.Field
		Type            respjson.Field
		MCPServerName   respjson.Field
		Description     respjson.Field
		InputSchema     respjson.Field
		Name            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolUnion contains all possible properties and values from ManagedAgentsAgentToolset20260401, ManagedAgentsMCPToolset, ManagedAgentsCustomTool.

Use the ManagedAgentsAgentToolUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentToolUnion) AsAgentToolset20260401

func (u ManagedAgentsAgentToolUnion) AsAgentToolset20260401() (v ManagedAgentsAgentToolset20260401)

func (ManagedAgentsAgentToolUnion) AsAny

func (u ManagedAgentsAgentToolUnion) AsAny() anyManagedAgentsAgentTool

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentToolUnion.AsAny().(type) {
case qoder.ManagedAgentsAgentToolset20260401:
case qoder.ManagedAgentsMCPToolset:
case qoder.ManagedAgentsCustomTool:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentToolUnion) AsCustom

func (ManagedAgentsAgentToolUnion) AsMCPToolset

func (ManagedAgentsAgentToolUnion) RawJSON

func (u ManagedAgentsAgentToolUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolUnion) UnmarshalJSON

func (r *ManagedAgentsAgentToolUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolUnionConfigs

type ManagedAgentsAgentToolUnionConfigs struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentToolConfigUnion] instead of an object.
	OfManagedAgentsAgentToolConfigArray []ManagedAgentsAgentToolConfigUnion `json:",inline"`
	// This field will be present if the value is a [[]ManagedAgentsMCPToolConfig]
	// instead of an object.
	OfManagedAgentsMCPToolConfigArray []ManagedAgentsMCPToolConfig `json:",inline"`
	JSON                              struct {
		OfManagedAgentsAgentToolConfigArray respjson.Field
		OfManagedAgentsMCPToolConfigArray   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolUnionConfigs is an implicit subunion of ManagedAgentsAgentToolUnion. ManagedAgentsAgentToolUnionConfigs provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentToolUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsAgentToolConfigArray OfManagedAgentsMCPToolConfigArray]

func (*ManagedAgentsAgentToolUnionConfigs) UnmarshalJSON

func (r *ManagedAgentsAgentToolUnionConfigs) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolUnionDefaultConfig

type ManagedAgentsAgentToolUnionDefaultConfig struct {
	Enabled bool `json:"enabled"`
	// This field is a union of
	// [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion],
	// [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion]
	PermissionPolicy ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy `json:"permission_policy"`
	JSON             struct {
		Enabled          respjson.Field
		PermissionPolicy respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolUnionDefaultConfig is an implicit subunion of ManagedAgentsAgentToolUnion. ManagedAgentsAgentToolUnionDefaultConfig provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentToolUnion.

func (*ManagedAgentsAgentToolUnionDefaultConfig) UnmarshalJSON

func (r *ManagedAgentsAgentToolUnionDefaultConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy

type ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy struct {
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy is an implicit subunion of ManagedAgentsAgentToolUnion. ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsAgentToolUnion.

func (*ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy) UnmarshalJSON

type ManagedAgentsAgentToolUseEvent

type ManagedAgentsAgentToolUseEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Input parameters for the tool call.
	Input map[string]any `json:"input" api:"required"`
	// Name of the agent tool being used.
	Name string `json:"name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "agent.tool_use".
	Type ManagedAgentsAgentToolUseEventType `json:"type" api:"required"`
	// AgentEvaluatedPermission enum
	//
	// Any of "allow", "ask", "deny".
	EvaluatedPermission ManagedAgentsAgentToolUseEventEvaluatedPermission `json:"evaluated_permission"`
	// When set, this event was cross-posted from a subagent's thread to surface its
	// permission request on the primary thread's stream. Empty on the thread's own
	// events. Echo this on a `user.tool_confirmation` event to route the approval
	// back.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Input               respjson.Field
		Name                respjson.Field
		ProcessedAt         respjson.Field
		Type                respjson.Field
		EvaluatedPermission respjson.Field
		SessionThreadID     respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event emitted when the agent invokes a built-in agent tool.

func (ManagedAgentsAgentToolUseEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolUseEvent) UnmarshalJSON

func (r *ManagedAgentsAgentToolUseEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolUseEventEvaluatedPermission

type ManagedAgentsAgentToolUseEventEvaluatedPermission string

AgentEvaluatedPermission enum

const (
	ManagedAgentsAgentToolUseEventEvaluatedPermissionAllow ManagedAgentsAgentToolUseEventEvaluatedPermission = "allow"
	ManagedAgentsAgentToolUseEventEvaluatedPermissionAsk   ManagedAgentsAgentToolUseEventEvaluatedPermission = "ask"
	ManagedAgentsAgentToolUseEventEvaluatedPermissionDeny  ManagedAgentsAgentToolUseEventEvaluatedPermission = "deny"
)

type ManagedAgentsAgentToolUseEventType

type ManagedAgentsAgentToolUseEventType string
const (
	ManagedAgentsAgentToolUseEventTypeAgentToolUse ManagedAgentsAgentToolUseEventType = "agent.tool_use"
)

type ManagedAgentsAgentToolset20260401

type ManagedAgentsAgentToolset20260401 struct {
	EnabledTools    []string                            `json:"enabled_tools"`
	DisallowedTools []string                            `json:"disallowed_tools"`
	Configs         []ManagedAgentsAgentToolConfigUnion `json:"configs" api:"required"`
	// Resolved default configuration for agent tools.
	DefaultConfig ManagedAgentsAgentToolsetDefaultConfig `json:"default_config" api:"required"`
	// Any of "agent_toolset_20260401".
	Type ManagedAgentsAgentToolset20260401Type `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EnabledTools    respjson.Field
		DisallowedTools respjson.Field
		Configs         respjson.Field
		DefaultConfig   respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsAgentToolset20260401) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401BashInput

type ManagedAgentsAgentToolset20260401BashInput struct {
	// Shell command to execute. Omit only when `restart` is true.
	Command string `json:"command"`
	// When true, restart the persistent bash session instead of running a command.
	// Subsequent calls without `restart` will run against the fresh session.
	Restart bool `json:"restart"`
	// Per-call timeout in milliseconds. Defaults to the runner-wide tool timeout when
	// omitted or zero.
	TimeoutMs int64 `json:"timeout_ms"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Command     respjson.Field
		Restart     respjson.Field
		TimeoutMs   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input payload for the `bash` tool of the `agent_toolset_20260401` toolset. All fields are optional; a normal invocation supplies `command`, while `restart=true` (with no `command`) reboots the runner-side bash session.

func (ManagedAgentsAgentToolset20260401BashInput) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401BashInput) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401BashInput) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401EditInput

type ManagedAgentsAgentToolset20260401EditInput struct {
	// Path of the file to edit.
	FilePath string `json:"file_path" api:"required"`
	// Replacement text.
	NewString string `json:"new_string" api:"required"`
	// Substring to find and replace.
	OldString string `json:"old_string" api:"required"`
	// When true, replace every occurrence of `old_string` instead of requiring a
	// unique match.
	ReplaceAll bool `json:"replace_all"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FilePath    respjson.Field
		NewString   respjson.Field
		OldString   respjson.Field
		ReplaceAll  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input payload for the `edit` tool. Performs a string replacement in the named file; by default `old_string` must occur exactly once.

func (ManagedAgentsAgentToolset20260401EditInput) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401EditInput) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401EditInput) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401GlobInput

type ManagedAgentsAgentToolset20260401GlobInput struct {
	// Doublestar glob pattern (e.g. `**/*.go`). Absolute patterns are only permitted
	// when the runner is configured to allow them.
	Pattern string `json:"pattern" api:"required"`
	// Optional directory root to search under. Defaults to the runner's working
	// directory.
	Path string `json:"path"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Pattern     respjson.Field
		Path        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input payload for the `glob` tool. Returns paths matching a doublestar glob pattern, newest first.

func (ManagedAgentsAgentToolset20260401GlobInput) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401GlobInput) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401GlobInput) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401GrepInput

type ManagedAgentsAgentToolset20260401GrepInput struct {
	// Regular expression to search for.
	Pattern string `json:"pattern" api:"required"`
	// Optional directory root to search under. Defaults to the runner's working
	// directory.
	Path string `json:"path"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Pattern     respjson.Field
		Path        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input payload for the `grep` tool. Searches file contents for a regular expression, returning matching lines.

func (ManagedAgentsAgentToolset20260401GrepInput) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401GrepInput) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401GrepInput) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401Params

type ManagedAgentsAgentToolset20260401Params struct {
	DisallowedTools []string `json:"disallowed_tools,omitzero"`
	EnabledTools    []string `json:"enabled_tools,omitzero"`
	// Any of "agent_toolset_20260401".
	Type ManagedAgentsAgentToolset20260401ParamsType `json:"type,omitzero" api:"required"`
	// Per-tool configuration overrides.
	Configs []ManagedAgentsAgentToolConfigParamsUnion `json:"configs,omitzero"`
	// Default configuration for all tools in a toolset.
	DefaultConfig ManagedAgentsAgentToolsetDefaultConfigParams `json:"default_config,omitzero"`
	// contains filtered or unexported fields
}

Configuration for built-in agent tools. Use this to enable or disable groups of tools available to the agent.

The property Type is required.

func (ManagedAgentsAgentToolset20260401Params) MarshalJSON

func (r ManagedAgentsAgentToolset20260401Params) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAgentToolset20260401Params) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401Params) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401ParamsType

type ManagedAgentsAgentToolset20260401ParamsType string
const (
	ManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401 ManagedAgentsAgentToolset20260401ParamsType = "agent_toolset_20260401"
)

type ManagedAgentsAgentToolset20260401ReadInput

type ManagedAgentsAgentToolset20260401ReadInput struct {
	// Path of the file to read.
	FilePath string `json:"file_path" api:"required"`
	// Optional `[start_line, end_line]` 1-indexed inclusive range. When omitted the
	// entire file is returned. `end_line` of 0 or negative means "to end of file".
	ViewRange []int64 `json:"view_range"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FilePath    respjson.Field
		ViewRange   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input payload for the `read` tool. Reads file contents relative to the runner's working directory (or absolute when the runner permits).

func (ManagedAgentsAgentToolset20260401ReadInput) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401ReadInput) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401ReadInput) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolset20260401Type

type ManagedAgentsAgentToolset20260401Type string
const (
	ManagedAgentsAgentToolset20260401TypeAgentToolset20260401 ManagedAgentsAgentToolset20260401Type = "agent_toolset_20260401"
)

type ManagedAgentsAgentToolset20260401WriteInput

type ManagedAgentsAgentToolset20260401WriteInput struct {
	// Full file contents to write.
	Content string `json:"content" api:"required"`
	// Path of the file to write.
	FilePath string `json:"file_path" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Content     respjson.Field
		FilePath    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Input payload for the `write` tool. Writes (overwriting) the entire file contents.

func (ManagedAgentsAgentToolset20260401WriteInput) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolset20260401WriteInput) UnmarshalJSON

func (r *ManagedAgentsAgentToolset20260401WriteInput) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolsetDefaultConfig

type ManagedAgentsAgentToolsetDefaultConfig struct {
	Enabled bool `json:"enabled" api:"required"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		PermissionPolicy respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved default configuration for agent tools.

func (ManagedAgentsAgentToolsetDefaultConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolsetDefaultConfig) UnmarshalJSON

func (r *ManagedAgentsAgentToolsetDefaultConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolsetDefaultConfigParams

type ManagedAgentsAgentToolsetDefaultConfigParams struct {
	// Whether tools are enabled and available to the model by default. Defaults to
	// true if not specified.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// contains filtered or unexported fields
}

Default configuration for all tools in a toolset.

func (ManagedAgentsAgentToolsetDefaultConfigParams) MarshalJSON

func (r ManagedAgentsAgentToolsetDefaultConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAgentToolsetDefaultConfigParams) UnmarshalJSON

func (r *ManagedAgentsAgentToolsetDefaultConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion

type ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion

type ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAny() anyManagedAgentsAgentToolsetDefaultConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsAgentType

type ManagedAgentsAgentType string
const (
	ManagedAgentsAgentTypeAgent ManagedAgentsAgentType = "agent"
)

type ManagedAgentsAgentWithOverridesParams

type ManagedAgentsAgentWithOverridesParams struct {
	// The `agent` ID.
	ID string `json:"id" api:"required"`
	// Any of "agent_with_overrides".
	Type ManagedAgentsAgentWithOverridesParamsType `json:"type,omitzero" api:"required"`
	// Replacement system prompt. Up to 100,000 characters. Set to null to clear the
	// agent's system prompt; omit to preserve it.
	System param.Opt[string] `json:"system,omitzero"`
	// The specific `agent` version to use. Omit to use the latest version.
	Version param.Opt[int64] `json:"version,omitzero"`
	// Replacement MCP server list. Full replacement: the provided array becomes the
	// MCP servers. Send an empty array to clear; omit to preserve the agent's servers.
	MCPServers []ManagedAgentsURLMCPServerParams `json:"mcp_servers,omitzero"`
	// Replacement model. Accepts the model string or a `model_config` object. Omit to
	// use the agent's model.
	Model ManagedAgentsModelConfigParams `json:"model,omitzero"`
	// Replacement skill list. Full replacement: the provided array becomes the skills.
	// Send an empty array to clear; omit to preserve the agent's skills.
	Skills []ManagedAgentsSkillParamsUnion `json:"skills,omitzero"`
	// Replacement tool list. Full replacement: the provided array becomes the tool
	// configuration. Send an empty array to clear; omit to preserve the agent's tools.
	Tools []ManagedAgentsAgentWithOverridesParamsToolUnion `json:"tools,omitzero"`
	// contains filtered or unexported fields
}

Reference to an `agent` plus optional configuration overrides. Each provided field replaces the agent's value for the caller's use; the agent resource is unchanged.

The properties ID, Type are required.

func (ManagedAgentsAgentWithOverridesParams) MarshalJSON

func (r ManagedAgentsAgentWithOverridesParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAgentWithOverridesParams) UnmarshalJSON

func (r *ManagedAgentsAgentWithOverridesParams) UnmarshalJSON(data []byte) error

type ManagedAgentsAgentWithOverridesParamsToolUnion

type ManagedAgentsAgentWithOverridesParamsToolUnion struct {
	OfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:",omitzero,inline"`
	OfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:",omitzero,inline"`
	OfCustom               *ManagedAgentsCustomToolParams           `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetConfigs

func (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetConfigs() (res managedAgentsAgentWithOverridesParamsToolUnionConfigs)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetDefaultConfig

func (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetDefaultConfig() (res managedAgentsAgentWithOverridesParamsToolUnionDefaultConfig)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetDescription

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetInputSchema

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetMCPServerName

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetName

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentWithOverridesParamsToolUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsAgentWithOverridesParamsToolUnion) MarshalJSON

func (*ManagedAgentsAgentWithOverridesParamsToolUnion) UnmarshalJSON

type ManagedAgentsAgentWithOverridesParamsType

type ManagedAgentsAgentWithOverridesParamsType string
const (
	ManagedAgentsAgentWithOverridesParamsTypeAgentWithOverrides ManagedAgentsAgentWithOverridesParamsType = "agent_with_overrides"
)

type ManagedAgentsAlwaysAllowPolicy

type ManagedAgentsAlwaysAllowPolicy struct {
	// Any of "always_allow".
	Type ManagedAgentsAlwaysAllowPolicyType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Tool calls are automatically approved without user confirmation.

func (ManagedAgentsAlwaysAllowPolicy) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsAlwaysAllowPolicy) ToParam

ToParam converts this ManagedAgentsAlwaysAllowPolicy to a ManagedAgentsAlwaysAllowPolicyParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsAlwaysAllowPolicyParam.Overrides()

func (*ManagedAgentsAlwaysAllowPolicy) UnmarshalJSON

func (r *ManagedAgentsAlwaysAllowPolicy) UnmarshalJSON(data []byte) error

type ManagedAgentsAlwaysAllowPolicyParam

type ManagedAgentsAlwaysAllowPolicyParam struct {
	// Any of "always_allow".
	Type ManagedAgentsAlwaysAllowPolicyType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Tool calls are automatically approved without user confirmation.

The property Type is required.

func (ManagedAgentsAlwaysAllowPolicyParam) MarshalJSON

func (r ManagedAgentsAlwaysAllowPolicyParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAlwaysAllowPolicyParam) UnmarshalJSON

func (r *ManagedAgentsAlwaysAllowPolicyParam) UnmarshalJSON(data []byte) error

type ManagedAgentsAlwaysAllowPolicyType

type ManagedAgentsAlwaysAllowPolicyType string
const (
	ManagedAgentsAlwaysAllowPolicyTypeAlwaysAllow ManagedAgentsAlwaysAllowPolicyType = "always_allow"
)

type ManagedAgentsAlwaysAskPolicy

type ManagedAgentsAlwaysAskPolicy struct {
	// Any of "always_ask".
	Type ManagedAgentsAlwaysAskPolicyType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Tool calls require user confirmation before execution.

func (ManagedAgentsAlwaysAskPolicy) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsAlwaysAskPolicy) ToParam

ToParam converts this ManagedAgentsAlwaysAskPolicy to a ManagedAgentsAlwaysAskPolicyParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsAlwaysAskPolicyParam.Overrides()

func (*ManagedAgentsAlwaysAskPolicy) UnmarshalJSON

func (r *ManagedAgentsAlwaysAskPolicy) UnmarshalJSON(data []byte) error

type ManagedAgentsAlwaysAskPolicyParam

type ManagedAgentsAlwaysAskPolicyParam struct {
	// Any of "always_ask".
	Type ManagedAgentsAlwaysAskPolicyType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Tool calls require user confirmation before execution.

The property Type is required.

func (ManagedAgentsAlwaysAskPolicyParam) MarshalJSON

func (r ManagedAgentsAlwaysAskPolicyParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsAlwaysAskPolicyParam) UnmarshalJSON

func (r *ManagedAgentsAlwaysAskPolicyParam) UnmarshalJSON(data []byte) error

type ManagedAgentsAlwaysAskPolicyType

type ManagedAgentsAlwaysAskPolicyType string
const (
	ManagedAgentsAlwaysAskPolicyTypeAlwaysAsk ManagedAgentsAlwaysAskPolicyType = "always_ask"
)

type ManagedAgentsBase64DocumentSource

type ManagedAgentsBase64DocumentSource struct {
	// Base64-encoded document data.
	Data string `json:"data" api:"required"`
	// MIME type of the document (e.g., "application/pdf").
	MediaType string `json:"media_type" api:"required"`
	// Any of "base64".
	Type ManagedAgentsBase64DocumentSourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		MediaType   respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Base64-encoded document data.

func (ManagedAgentsBase64DocumentSource) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsBase64DocumentSource) ToParam

ToParam converts this ManagedAgentsBase64DocumentSource to a ManagedAgentsBase64DocumentSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsBase64DocumentSourceParam.Overrides()

func (*ManagedAgentsBase64DocumentSource) UnmarshalJSON

func (r *ManagedAgentsBase64DocumentSource) UnmarshalJSON(data []byte) error

type ManagedAgentsBase64DocumentSourceParam

type ManagedAgentsBase64DocumentSourceParam struct {
	// Base64-encoded document data.
	Data string `json:"data" api:"required"`
	// MIME type of the document (e.g., "application/pdf").
	MediaType string `json:"media_type" api:"required"`
	// Any of "base64".
	Type ManagedAgentsBase64DocumentSourceType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Base64-encoded document data.

The properties Data, MediaType, Type are required.

func (ManagedAgentsBase64DocumentSourceParam) MarshalJSON

func (r ManagedAgentsBase64DocumentSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsBase64DocumentSourceParam) UnmarshalJSON

func (r *ManagedAgentsBase64DocumentSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsBase64DocumentSourceType

type ManagedAgentsBase64DocumentSourceType string
const (
	ManagedAgentsBase64DocumentSourceTypeBase64 ManagedAgentsBase64DocumentSourceType = "base64"
)

type ManagedAgentsBase64ImageSource

type ManagedAgentsBase64ImageSource struct {
	// Base64-encoded image data.
	Data string `json:"data" api:"required"`
	// MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif",
	// "image/webp").
	MediaType string `json:"media_type" api:"required"`
	// Any of "base64".
	Type ManagedAgentsBase64ImageSourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		MediaType   respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Base64-encoded image data.

func (ManagedAgentsBase64ImageSource) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsBase64ImageSource) ToParam

ToParam converts this ManagedAgentsBase64ImageSource to a ManagedAgentsBase64ImageSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsBase64ImageSourceParam.Overrides()

func (*ManagedAgentsBase64ImageSource) UnmarshalJSON

func (r *ManagedAgentsBase64ImageSource) UnmarshalJSON(data []byte) error

type ManagedAgentsBase64ImageSourceParam

type ManagedAgentsBase64ImageSourceParam struct {
	// Base64-encoded image data.
	Data string `json:"data" api:"required"`
	// MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif",
	// "image/webp").
	MediaType string `json:"media_type" api:"required"`
	// Any of "base64".
	Type ManagedAgentsBase64ImageSourceType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Base64-encoded image data.

The properties Data, MediaType, Type are required.

func (ManagedAgentsBase64ImageSourceParam) MarshalJSON

func (r ManagedAgentsBase64ImageSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsBase64ImageSourceParam) UnmarshalJSON

func (r *ManagedAgentsBase64ImageSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsBase64ImageSourceType

type ManagedAgentsBase64ImageSourceType string
const (
	ManagedAgentsBase64ImageSourceTypeBase64 ManagedAgentsBase64ImageSourceType = "base64"
)

type ManagedAgentsBashToolConfig

type ManagedAgentsBashToolConfig struct {
	Enabled bool          `json:"enabled" api:"required"`
	Name    constant.Bash `json:"name" default:"bash"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsBashToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.Bash                                    `json:"type" default:"bash"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the bash tool.

func (ManagedAgentsBashToolConfig) RawJSON

func (r ManagedAgentsBashToolConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsBashToolConfig) UnmarshalJSON

func (r *ManagedAgentsBashToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsBashToolConfigParams

type ManagedAgentsBashToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsBashToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Any of "bash".
	Type ManagedAgentsBashToolConfigParamsType `json:"type,omitzero"`
	// Must be "bash".
	//
	// This field can be elided, and will marshal its zero value as "bash".
	Name constant.Bash `json:"name" default:"bash"`
	// contains filtered or unexported fields
}

Configuration override for the bash tool.

The property Name is required.

func (ManagedAgentsBashToolConfigParams) MarshalJSON

func (r ManagedAgentsBashToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsBashToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsBashToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsBashToolConfigParamsPermissionPolicyUnion

type ManagedAgentsBashToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsBashToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsBashToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsBashToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsBashToolConfigParamsType

type ManagedAgentsBashToolConfigParamsType string
const (
	ManagedAgentsBashToolConfigParamsTypeBash ManagedAgentsBashToolConfigParamsType = "bash"
)

type ManagedAgentsBashToolConfigPermissionPolicyUnion

type ManagedAgentsBashToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsBashToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsBashToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsBashToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsBashToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsBashToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsBashToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsBillingError

type ManagedAgentsBillingError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsBillingErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "billing_error".
	Type ManagedAgentsBillingErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		RetryStatus respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The caller's organization or workspace cannot make model requests — out of credits or spend limit reached. Retrying with the same credentials will not succeed; the caller must resolve the billing state.

func (ManagedAgentsBillingError) RawJSON

func (r ManagedAgentsBillingError) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsBillingError) UnmarshalJSON

func (r *ManagedAgentsBillingError) UnmarshalJSON(data []byte) error

type ManagedAgentsBillingErrorRetryStatusUnion

type ManagedAgentsBillingErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsBillingErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsBillingErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsBillingErrorRetryStatusUnion) AsAny

func (u ManagedAgentsBillingErrorRetryStatusUnion) AsAny() anyManagedAgentsBillingErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsBillingErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsBillingErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsBillingErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsBillingErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsBillingErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsBillingErrorRetryStatusUnion) UnmarshalJSON

func (r *ManagedAgentsBillingErrorRetryStatusUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsBillingErrorType

type ManagedAgentsBillingErrorType string
const (
	ManagedAgentsBillingErrorTypeBillingError ManagedAgentsBillingErrorType = "billing_error"
)

type ManagedAgentsBranchCheckout

type ManagedAgentsBranchCheckout struct {
	// Branch name to check out.
	Name string `json:"name" api:"required"`
	// Any of "branch".
	Type ManagedAgentsBranchCheckoutType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsBranchCheckout) RawJSON

func (r ManagedAgentsBranchCheckout) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsBranchCheckout) ToParam

ToParam converts this ManagedAgentsBranchCheckout to a ManagedAgentsBranchCheckoutParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsBranchCheckoutParam.Overrides()

func (*ManagedAgentsBranchCheckout) UnmarshalJSON

func (r *ManagedAgentsBranchCheckout) UnmarshalJSON(data []byte) error

type ManagedAgentsBranchCheckoutParam

type ManagedAgentsBranchCheckoutParam struct {
	// Branch name to check out.
	Name string `json:"name" api:"required"`
	// Any of "branch".
	Type ManagedAgentsBranchCheckoutType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The properties Name, Type are required.

func (ManagedAgentsBranchCheckoutParam) MarshalJSON

func (r ManagedAgentsBranchCheckoutParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsBranchCheckoutParam) UnmarshalJSON

func (r *ManagedAgentsBranchCheckoutParam) UnmarshalJSON(data []byte) error

type ManagedAgentsBranchCheckoutType

type ManagedAgentsBranchCheckoutType string
const (
	ManagedAgentsBranchCheckoutTypeBranch ManagedAgentsBranchCheckoutType = "branch"
)

type ManagedAgentsBudgetLimit

type ManagedAgentsBudgetLimit struct {
	// Positive decimal Credits, with at most 12 integer and 2 fractional digits.
	MaxCreditCost string `json:"max_credit_cost" api:"required"`
	// Any of "limit".
	Type ManagedAgentsBudgetLimitType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MaxCreditCost respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A total model and sandbox credit limit. Once reached, new user messages are rejected; an already running turn continues to completion.

func (ManagedAgentsBudgetLimit) RawJSON

func (r ManagedAgentsBudgetLimit) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsBudgetLimit) ToParam

ToParam converts this ManagedAgentsBudgetLimit to a ManagedAgentsBudgetLimitParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsBudgetLimitParam.Overrides()

func (*ManagedAgentsBudgetLimit) UnmarshalJSON

func (r *ManagedAgentsBudgetLimit) UnmarshalJSON(data []byte) error

type ManagedAgentsBudgetLimitParam

type ManagedAgentsBudgetLimitParam struct {
	// Positive decimal Credits, with at most 12 integer and 2 fractional digits.
	MaxCreditCost string `json:"max_credit_cost" api:"required"`
	// Any of "limit".
	Type ManagedAgentsBudgetLimitType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

A total model and sandbox credit limit. Once reached, new user messages are rejected; an already running turn continues to completion.

The properties MaxCreditCost, Type are required.

func (ManagedAgentsBudgetLimitParam) MarshalJSON

func (r ManagedAgentsBudgetLimitParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsBudgetLimitParam) UnmarshalJSON

func (r *ManagedAgentsBudgetLimitParam) UnmarshalJSON(data []byte) error

type ManagedAgentsBudgetLimitType

type ManagedAgentsBudgetLimitType string
const (
	ManagedAgentsBudgetLimitTypeLimit ManagedAgentsBudgetLimitType = "limit"
)

type ManagedAgentsCacheCreationUsage

type ManagedAgentsCacheCreationUsage struct {
	// Tokens used to create 1-hour ephemeral cache entries.
	Ephemeral1hInputTokens int64 `json:"ephemeral_1h_input_tokens"`
	// Tokens used to create 5-minute ephemeral cache entries.
	Ephemeral5mInputTokens int64 `json:"ephemeral_5m_input_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ephemeral1hInputTokens respjson.Field
		Ephemeral5mInputTokens respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Prompt-cache creation token usage broken down by cache lifetime.

func (ManagedAgentsCacheCreationUsage) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsCacheCreationUsage) UnmarshalJSON

func (r *ManagedAgentsCacheCreationUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsCommitCheckout

type ManagedAgentsCommitCheckout struct {
	// Full commit SHA to check out.
	Sha string `json:"sha" api:"required"`
	// Any of "commit".
	Type ManagedAgentsCommitCheckoutType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Sha         respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsCommitCheckout) RawJSON

func (r ManagedAgentsCommitCheckout) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsCommitCheckout) ToParam

ToParam converts this ManagedAgentsCommitCheckout to a ManagedAgentsCommitCheckoutParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsCommitCheckoutParam.Overrides()

func (*ManagedAgentsCommitCheckout) UnmarshalJSON

func (r *ManagedAgentsCommitCheckout) UnmarshalJSON(data []byte) error

type ManagedAgentsCommitCheckoutParam

type ManagedAgentsCommitCheckoutParam struct {
	// Full commit SHA to check out.
	Sha string `json:"sha" api:"required"`
	// Any of "commit".
	Type ManagedAgentsCommitCheckoutType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The properties Sha, Type are required.

func (ManagedAgentsCommitCheckoutParam) MarshalJSON

func (r ManagedAgentsCommitCheckoutParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsCommitCheckoutParam) UnmarshalJSON

func (r *ManagedAgentsCommitCheckoutParam) UnmarshalJSON(data []byte) error

type ManagedAgentsCommitCheckoutType

type ManagedAgentsCommitCheckoutType string
const (
	ManagedAgentsCommitCheckoutTypeCommit ManagedAgentsCommitCheckoutType = "commit"
)

type ManagedAgentsCredential

type ManagedAgentsCredential struct {
	// Unique identifier for the credential.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// Authentication details for a credential.
	Auth ManagedAgentsCredentialAuthUnion `json:"auth" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Arbitrary key-value metadata attached to the credential.
	Metadata map[string]string `json:"metadata" api:"required"`
	// Any of "vault_credential".
	Type ManagedAgentsCredentialType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Identifier of the vault this credential belongs to.
	VaultID string `json:"vault_id" api:"required"`
	// Human-readable name for the credential.
	DisplayName string `json:"display_name" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ArchivedAt  respjson.Field
		Auth        respjson.Field
		CreatedAt   respjson.Field
		Metadata    respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		VaultID     respjson.Field
		DisplayName respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A credential stored in a vault. Sensitive fields are never returned in responses.

func (ManagedAgentsCredential) RawJSON

func (r ManagedAgentsCredential) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsCredential) UnmarshalJSON

func (r *ManagedAgentsCredential) UnmarshalJSON(data []byte) error

type ManagedAgentsCredentialAuthUnion

type ManagedAgentsCredentialAuthUnion struct {
	MCPServerURL string `json:"mcp_server_url"`
	// Any of "mcp_oauth", "static_bearer", "environment_variable".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsMCPOAuthAuthResponse].
	ExpiresAt time.Time `json:"expires_at"`
	// This field is from variant [ManagedAgentsMCPOAuthAuthResponse].
	Refresh ManagedAgentsMCPOAuthRefreshResponse `json:"refresh"`
	// This field is from variant [ManagedAgentsEnvironmentVariableAuthResponse].
	InjectionLocation ManagedAgentsInjectionLocationResponse `json:"injection_location"`
	// This field is from variant [ManagedAgentsEnvironmentVariableAuthResponse].
	Networking ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion `json:"networking"`
	// This field is from variant [ManagedAgentsEnvironmentVariableAuthResponse].
	SecretName string `json:"secret_name"`
	JSON       struct {
		MCPServerURL      respjson.Field
		Type              respjson.Field
		ExpiresAt         respjson.Field
		Refresh           respjson.Field
		InjectionLocation respjson.Field
		Networking        respjson.Field
		SecretName        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsCredentialAuthUnion contains all possible properties and values from ManagedAgentsMCPOAuthAuthResponse, ManagedAgentsStaticBearerAuthResponse, ManagedAgentsEnvironmentVariableAuthResponse.

Use the ManagedAgentsCredentialAuthUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsCredentialAuthUnion) AsAny

func (u ManagedAgentsCredentialAuthUnion) AsAny() anyManagedAgentsCredentialAuth

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsCredentialAuthUnion.AsAny().(type) {
case qoder.ManagedAgentsMCPOAuthAuthResponse:
case qoder.ManagedAgentsStaticBearerAuthResponse:
case qoder.ManagedAgentsEnvironmentVariableAuthResponse:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsCredentialAuthUnion) AsEnvironmentVariable

func (ManagedAgentsCredentialAuthUnion) AsMCPOAuth

func (ManagedAgentsCredentialAuthUnion) AsStaticBearer

func (ManagedAgentsCredentialAuthUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsCredentialAuthUnion) UnmarshalJSON

func (r *ManagedAgentsCredentialAuthUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsCredentialHostUnreachableError

type ManagedAgentsCredentialHostUnreachableError struct {
	// ID of the affected credential.
	CredentialID string `json:"credential_id" api:"required"`
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "credential_host_unreachable_error".
	Type ManagedAgentsCredentialHostUnreachableErrorType `json:"type" api:"required"`
	// ID of the vault containing the affected credential.
	VaultID string `json:"vault_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CredentialID respjson.Field
		Message      respjson.Field
		RetryStatus  respjson.Field
		Type         respjson.Field
		VaultID      respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An `environment_variable` credential's `auth.networking.allowed_hosts` includes a host the environment's network policy does not permit.

func (ManagedAgentsCredentialHostUnreachableError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsCredentialHostUnreachableError) UnmarshalJSON

func (r *ManagedAgentsCredentialHostUnreachableError) UnmarshalJSON(data []byte) error

type ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion

type ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsAny

func (u ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsAny() anyManagedAgentsCredentialHostUnreachableErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) UnmarshalJSON

type ManagedAgentsCredentialHostUnreachableErrorType

type ManagedAgentsCredentialHostUnreachableErrorType string
const (
	ManagedAgentsCredentialHostUnreachableErrorTypeCredentialHostUnreachableError ManagedAgentsCredentialHostUnreachableErrorType = "credential_host_unreachable_error"
)

type ManagedAgentsCredentialNetworkingParamsUnion

type ManagedAgentsCredentialNetworkingParamsUnion struct {
	OfUnrestricted *ManagedAgentsUnrestrictedCredentialNetworkingParams `json:",omitzero,inline"`
	OfLimited      *ManagedAgentsLimitedCredentialNetworkingParams      `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func ManagedAgentsCredentialNetworkingParamsOfLimited

func ManagedAgentsCredentialNetworkingParamsOfLimited(allowedHosts []string) ManagedAgentsCredentialNetworkingParamsUnion

func (ManagedAgentsCredentialNetworkingParamsUnion) GetAllowedHosts

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsCredentialNetworkingParamsUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsCredentialNetworkingParamsUnion) MarshalJSON

func (*ManagedAgentsCredentialNetworkingParamsUnion) UnmarshalJSON

func (u *ManagedAgentsCredentialNetworkingParamsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsCredentialType

type ManagedAgentsCredentialType string
const (
	ManagedAgentsCredentialTypeVaultCredential ManagedAgentsCredentialType = "vault_credential"
)

type ManagedAgentsCredentialValidation

type ManagedAgentsCredentialValidation struct {
	// Unique identifier of the credential that was validated.
	CredentialID string `json:"credential_id" api:"required"`
	// Whether the credential has a refresh token configured.
	HasRefreshToken bool `json:"has_refresh_token" api:"required"`
	// The failing step of an MCP validation probe.
	MCPProbe ManagedAgentsMCPProbe `json:"mcp_probe" api:"required"`
	// Outcome of a refresh-token exchange attempted during credential validation.
	Refresh ManagedAgentsRefreshObject `json:"refresh" api:"required"`
	// Overall verdict of a credential validation probe.
	//
	// Any of "valid", "invalid", "unknown".
	Status ManagedAgentsCredentialValidationStatus `json:"status" api:"required"`
	// Any of "vault_credential_validation".
	Type ManagedAgentsCredentialValidationType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	ValidatedAt time.Time `json:"validated_at" api:"required" format:"date-time"`
	// Identifier of the vault containing the credential.
	VaultID string `json:"vault_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CredentialID    respjson.Field
		HasRefreshToken respjson.Field
		MCPProbe        respjson.Field
		Refresh         respjson.Field
		Status          respjson.Field
		Type            respjson.Field
		ValidatedAt     respjson.Field
		VaultID         respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Result of live-probing a credential against its configured MCP server.

func (ManagedAgentsCredentialValidation) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsCredentialValidation) UnmarshalJSON

func (r *ManagedAgentsCredentialValidation) UnmarshalJSON(data []byte) error

type ManagedAgentsCredentialValidationStatus

type ManagedAgentsCredentialValidationStatus string

Overall verdict of a credential validation probe.

const (
	ManagedAgentsCredentialValidationStatusValid   ManagedAgentsCredentialValidationStatus = "valid"
	ManagedAgentsCredentialValidationStatusInvalid ManagedAgentsCredentialValidationStatus = "invalid"
	ManagedAgentsCredentialValidationStatusUnknown ManagedAgentsCredentialValidationStatus = "unknown"
)

type ManagedAgentsCredentialValidationType

type ManagedAgentsCredentialValidationType string
const (
	ManagedAgentsCredentialValidationTypeVaultCredentialValidation ManagedAgentsCredentialValidationType = "vault_credential_validation"
)

type ManagedAgentsCustomSkill

type ManagedAgentsCustomSkill struct {
	SkillID string `json:"skill_id" api:"required"`
	// Any of "custom".
	Type    ManagedAgentsCustomSkillType `json:"type" api:"required"`
	Version string                       `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SkillID     respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A resolved user-created custom skill.

func (ManagedAgentsCustomSkill) RawJSON

func (r ManagedAgentsCustomSkill) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsCustomSkill) UnmarshalJSON

func (r *ManagedAgentsCustomSkill) UnmarshalJSON(data []byte) error

type ManagedAgentsCustomSkillParams

type ManagedAgentsCustomSkillParams struct {
	// Tagged ID of the custom skill (e.g., "skill_01XJ5...").
	SkillID string `json:"skill_id" api:"required"`
	// Any of "custom".
	Type ManagedAgentsCustomSkillParamsType `json:"type,omitzero" api:"required"`
	// Version to pin. Defaults to latest if omitted.
	Version param.Opt[string] `json:"version,omitzero"`
	// contains filtered or unexported fields
}

A user-created custom skill.

The properties SkillID, Type are required.

func (ManagedAgentsCustomSkillParams) MarshalJSON

func (r ManagedAgentsCustomSkillParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsCustomSkillParams) UnmarshalJSON

func (r *ManagedAgentsCustomSkillParams) UnmarshalJSON(data []byte) error

type ManagedAgentsCustomSkillParamsType

type ManagedAgentsCustomSkillParamsType string
const (
	ManagedAgentsCustomSkillParamsTypeCustom ManagedAgentsCustomSkillParamsType = "custom"
)

type ManagedAgentsCustomSkillType

type ManagedAgentsCustomSkillType string
const (
	ManagedAgentsCustomSkillTypeCustom ManagedAgentsCustomSkillType = "custom"
)

type ManagedAgentsCustomTool

type ManagedAgentsCustomTool struct {
	Description string `json:"description" api:"required"`
	// JSON Schema for custom tool input parameters.
	InputSchema ManagedAgentsCustomToolInputSchema `json:"input_schema" api:"required"`
	Name        string                             `json:"name" api:"required"`
	// Any of "custom".
	Type ManagedAgentsCustomToolType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Description respjson.Field
		InputSchema respjson.Field
		Name        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A custom tool as returned in API responses.

func (ManagedAgentsCustomTool) RawJSON

func (r ManagedAgentsCustomTool) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsCustomTool) UnmarshalJSON

func (r *ManagedAgentsCustomTool) UnmarshalJSON(data []byte) error

type ManagedAgentsCustomToolInputSchema

type ManagedAgentsCustomToolInputSchema struct {
	Type        constant.Object `json:"type" default:"object"`
	Properties  map[string]any  `json:"properties" api:"nullable"`
	Required    []string        `json:"required" api:"nullable"`
	ExtraFields map[string]any  `json:"" api:"extrafields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		Properties  respjson.Field
		Required    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

JSON Schema for custom tool input parameters.

func (ManagedAgentsCustomToolInputSchema) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsCustomToolInputSchema) ToParam

ToParam converts this ManagedAgentsCustomToolInputSchema to a ManagedAgentsCustomToolInputSchemaParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsCustomToolInputSchemaParam.Overrides()

func (*ManagedAgentsCustomToolInputSchema) UnmarshalJSON

func (r *ManagedAgentsCustomToolInputSchema) UnmarshalJSON(data []byte) error

type ManagedAgentsCustomToolInputSchemaParam

type ManagedAgentsCustomToolInputSchemaParam struct {
	Properties map[string]any `json:"properties,omitzero"`
	Required   []string       `json:"required,omitzero"`
	// This field can be elided, and will marshal its zero value as "object".
	Type        constant.Object `json:"type" default:"object"`
	ExtraFields map[string]any  `json:"-"`
	// contains filtered or unexported fields
}

JSON Schema for custom tool input parameters.

The property Type is required.

func (ManagedAgentsCustomToolInputSchemaParam) MarshalJSON

func (r ManagedAgentsCustomToolInputSchemaParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsCustomToolInputSchemaParam) UnmarshalJSON

func (r *ManagedAgentsCustomToolInputSchemaParam) UnmarshalJSON(data []byte) error

type ManagedAgentsCustomToolParams

type ManagedAgentsCustomToolParams struct {
	// Description of what the tool does, shown to the agent to help it decide when to
	// use the tool.
	Description string `json:"description" api:"required"`
	// JSON Schema for custom tool input parameters.
	InputSchema ManagedAgentsCustomToolInputSchemaParam `json:"input_schema,omitzero" api:"required"`
	// Unique name for the tool. 1-128 characters; letters, digits, underscores, and
	// hyphens.
	Name string `json:"name" api:"required"`
	// Any of "custom".
	Type ManagedAgentsCustomToolParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

A custom tool that is executed by the API client rather than the agent. When the agent calls this tool, an `agent.custom_tool_use` event is emitted and the session goes idle, waiting for the client to provide the result via a `user.custom_tool_result` event.

The properties Description, InputSchema, Name, Type are required.

func (ManagedAgentsCustomToolParams) MarshalJSON

func (r ManagedAgentsCustomToolParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsCustomToolParams) UnmarshalJSON

func (r *ManagedAgentsCustomToolParams) UnmarshalJSON(data []byte) error

type ManagedAgentsCustomToolParamsType

type ManagedAgentsCustomToolParamsType string
const (
	ManagedAgentsCustomToolParamsTypeCustom ManagedAgentsCustomToolParamsType = "custom"
)

type ManagedAgentsCustomToolType

type ManagedAgentsCustomToolType string
const (
	ManagedAgentsCustomToolTypeCustom ManagedAgentsCustomToolType = "custom"
)

type ManagedAgentsDeleteSessionResource

type ManagedAgentsDeleteSessionResource struct {
	ID string `json:"id" api:"required"`
	// Any of "session_resource_deleted".
	Type ManagedAgentsDeleteSessionResourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Confirmation of resource deletion.

func (ManagedAgentsDeleteSessionResource) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeleteSessionResource) UnmarshalJSON

func (r *ManagedAgentsDeleteSessionResource) UnmarshalJSON(data []byte) error

type ManagedAgentsDeleteSessionResourceType

type ManagedAgentsDeleteSessionResourceType string
const (
	ManagedAgentsDeleteSessionResourceTypeSessionResourceDeleted ManagedAgentsDeleteSessionResourceType = "session_resource_deleted"
)

type ManagedAgentsDeletedCredential

type ManagedAgentsDeletedCredential struct {
	// Unique identifier of the deleted credential.
	ID string `json:"id" api:"required"`
	// Any of "vault_credential_deleted".
	Type ManagedAgentsDeletedCredentialType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Confirmation of a deleted credential.

func (ManagedAgentsDeletedCredential) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeletedCredential) UnmarshalJSON

func (r *ManagedAgentsDeletedCredential) UnmarshalJSON(data []byte) error

type ManagedAgentsDeletedCredentialType

type ManagedAgentsDeletedCredentialType string
const (
	ManagedAgentsDeletedCredentialTypeVaultCredentialDeleted ManagedAgentsDeletedCredentialType = "vault_credential_deleted"
)

type ManagedAgentsDeletedMemory

type ManagedAgentsDeletedMemory struct {
	// ID of the deleted memory (a `mem_...` value).
	ID string `json:"id" api:"required"`
	// Any of "memory_deleted".
	Type ManagedAgentsDeletedMemoryType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Tombstone returned by [Delete a memory](/en/api/beta/memory_stores/memories/delete). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](/en/api/beta/memory_stores/memory_versions/list) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).

func (ManagedAgentsDeletedMemory) RawJSON

func (r ManagedAgentsDeletedMemory) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeletedMemory) UnmarshalJSON

func (r *ManagedAgentsDeletedMemory) UnmarshalJSON(data []byte) error

type ManagedAgentsDeletedMemoryStore

type ManagedAgentsDeletedMemoryStore struct {
	// ID of the deleted memory store (a `memstore_...` identifier). The store and all
	// its memories and versions are no longer retrievable.
	ID string `json:"id" api:"required"`
	// Any of "memory_store_deleted".
	Type ManagedAgentsDeletedMemoryStoreType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Confirmation that a `memory_store` was deleted.

func (ManagedAgentsDeletedMemoryStore) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeletedMemoryStore) UnmarshalJSON

func (r *ManagedAgentsDeletedMemoryStore) UnmarshalJSON(data []byte) error

type ManagedAgentsDeletedMemoryStoreType

type ManagedAgentsDeletedMemoryStoreType string
const (
	ManagedAgentsDeletedMemoryStoreTypeMemoryStoreDeleted ManagedAgentsDeletedMemoryStoreType = "memory_store_deleted"
)

type ManagedAgentsDeletedMemoryType

type ManagedAgentsDeletedMemoryType string
const (
	ManagedAgentsDeletedMemoryTypeMemoryDeleted ManagedAgentsDeletedMemoryType = "memory_deleted"
)

type ManagedAgentsDeletedSession

type ManagedAgentsDeletedSession struct {
	ID string `json:"id" api:"required"`
	// Any of "session_deleted".
	Type ManagedAgentsDeletedSessionType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Confirmation that a `session` has been permanently deleted.

func (ManagedAgentsDeletedSession) RawJSON

func (r ManagedAgentsDeletedSession) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeletedSession) UnmarshalJSON

func (r *ManagedAgentsDeletedSession) UnmarshalJSON(data []byte) error

type ManagedAgentsDeletedSessionType

type ManagedAgentsDeletedSessionType string
const (
	ManagedAgentsDeletedSessionTypeSessionDeleted ManagedAgentsDeletedSessionType = "session_deleted"
)

type ManagedAgentsDeletedVault

type ManagedAgentsDeletedVault struct {
	// Unique identifier of the deleted vault.
	ID string `json:"id" api:"required"`
	// Any of "vault_deleted".
	Type ManagedAgentsDeletedVaultType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Confirmation of a deleted vault.

func (ManagedAgentsDeletedVault) RawJSON

func (r ManagedAgentsDeletedVault) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeletedVault) UnmarshalJSON

func (r *ManagedAgentsDeletedVault) UnmarshalJSON(data []byte) error

type ManagedAgentsDeletedVaultType

type ManagedAgentsDeletedVaultType string
const (
	ManagedAgentsDeletedVaultTypeVaultDeleted ManagedAgentsDeletedVaultType = "vault_deleted"
)

type ManagedAgentsDeltaContent

type ManagedAgentsDeltaContent struct {
	// Regular text content.
	Content ManagedAgentsTextBlock `json:"content" api:"required"`
	// Any of "content_delta".
	Type ManagedAgentsDeltaContentType `json:"type" api:"required"`
	// Which entry in the previewed event's content array this fragment lands in.
	// Insert content as that entry when the index is new; append to the existing entry
	// otherwise.
	Index int64 `json:"index"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Content     respjson.Field
		Type        respjson.Field
		Index       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsDeltaContent) RawJSON

func (r ManagedAgentsDeltaContent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeltaContent) UnmarshalJSON

func (r *ManagedAgentsDeltaContent) UnmarshalJSON(data []byte) error

type ManagedAgentsDeltaContentType

type ManagedAgentsDeltaContentType string
const (
	ManagedAgentsDeltaContentTypeContentDelta ManagedAgentsDeltaContentType = "content_delta"
)

type ManagedAgentsDeltaEvent

type ManagedAgentsDeltaEvent struct {
	// One fragment of the previewed event. The delta type is named for the previewed
	// event's field it streams into: agent.message events stream content_delta
	// fragments, each a partial element of the content array.
	Delta ManagedAgentsDeltaContent `json:"delta" api:"required"`
	// The id of the event being previewed. Matches event.id on the corresponding
	// event_start and the buffered event that reconciles the preview.
	EventID string `json:"event_id" api:"required"`
	// Any of "event_delta".
	Type ManagedAgentsDeltaEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Delta       respjson.Field
		EventID     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An incremental update to an event that is still being streamed. Deltas are best-effort and may stop early; when the buffered event with id == event_id is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no buffered event — its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.

func (ManagedAgentsDeltaEvent) RawJSON

func (r ManagedAgentsDeltaEvent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeltaEvent) UnmarshalJSON

func (r *ManagedAgentsDeltaEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsDeltaEventType

type ManagedAgentsDeltaEventType string
const (
	ManagedAgentsDeltaEventTypeEventDelta ManagedAgentsDeltaEventType = "event_delta"
)

type ManagedAgentsDeltaType

type ManagedAgentsDeltaType string

EventDeltaType enum

const (
	ManagedAgentsDeltaTypeAgentMessage  ManagedAgentsDeltaType = "agent.message"
	ManagedAgentsDeltaTypeAgentThinking ManagedAgentsDeltaType = "agent.thinking"
)

type ManagedAgentsDeployment

type ManagedAgentsDeployment struct {
	EnvironmentVariables string `json:"environment_variables"`

	// Unique identifier for this deployment.
	ID string `json:"id" api:"required"`
	// A resolved agent reference with a concrete version.
	Agent ManagedAgentsAgentReference `json:"agent" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Description of what the deployment does.
	Description string `json:"description" api:"required"`
	// ID of the `environment` where sessions run.
	EnvironmentID string `json:"environment_id" api:"required"`
	// Events sent to each session immediately after creation.
	InitialEvents []ManagedAgentsDeploymentInitialEventUnion `json:"initial_events" api:"required"`
	// Arbitrary key-value metadata. Maximum 16 pairs.
	Metadata map[string]string `json:"metadata" api:"required"`
	// Human-readable name.
	Name string `json:"name" api:"required"`
	// Why a deployment is paused. Non-null exactly when `status` is `paused`.
	PausedReason ManagedAgentsDeploymentPausedReasonUnion `json:"paused_reason" api:"required"`
	// Resources attached to sessions created from this deployment. Echoes the input
	// minus write-only credentials.
	Resources []ManagedAgentsSessionResourceConfigUnion `json:"resources" api:"required"`
	// 5-field POSIX cron schedule with computed runtime timestamps.
	Schedule ManagedAgentsSchedule `json:"schedule" api:"required"`
	// Lifecycle status of a deployment.
	//
	// Any of "active", "paused".
	Status ManagedAgentsDeploymentStatus `json:"status" api:"required"`
	// Any of "deployment".
	Type ManagedAgentsDeploymentType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Vault IDs supplying stored credentials for sessions created from this
	// deployment.
	VaultIDs []string `json:"vault_ids" api:"required"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimit `json:"budget" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EnvironmentVariables respjson.Field

		ID            respjson.Field
		Agent         respjson.Field
		ArchivedAt    respjson.Field
		CreatedAt     respjson.Field
		Description   respjson.Field
		EnvironmentID respjson.Field
		InitialEvents respjson.Field
		Metadata      respjson.Field
		Name          respjson.Field
		PausedReason  respjson.Field
		Resources     respjson.Field
		Schedule      respjson.Field
		Status        respjson.Field
		Type          respjson.Field
		UpdatedAt     respjson.Field
		VaultIDs      respjson.Field
		Budget        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A deployment is a configured instance of an agent — it binds the agent to everything needed to run it autonomously: an environment, credentials, initial events, and an optional schedule.

func (ManagedAgentsDeployment) RawJSON

func (r ManagedAgentsDeployment) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeployment) UnmarshalJSON

func (r *ManagedAgentsDeployment) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentInitialEventParamsUnion

type ManagedAgentsDeploymentInitialEventParamsUnion struct {
	OfUserMessage       *ManagedAgentsUserMessageEventParams       `json:",omitzero,inline"`
	OfUserDefineOutcome *ManagedAgentsUserDefineOutcomeEventParams `json:",omitzero,inline"`
	OfSystemMessage     *ManagedAgentsSystemMessageEventParams     `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsDeploymentInitialEventParamsUnion) GetContent

func (u ManagedAgentsDeploymentInitialEventParamsUnion) GetContent() (res managedAgentsDeploymentInitialEventParamsUnionContent)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsDeploymentInitialEventParamsUnion) GetDescription

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDeploymentInitialEventParamsUnion) GetMaxIterations

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDeploymentInitialEventParamsUnion) GetRubric

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDeploymentInitialEventParamsUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDeploymentInitialEventParamsUnion) MarshalJSON

func (*ManagedAgentsDeploymentInitialEventParamsUnion) UnmarshalJSON

type ManagedAgentsDeploymentInitialEventUnion

type ManagedAgentsDeploymentInitialEventUnion struct {
	// This field is a union of
	// [[]ManagedAgentsDeploymentUserMessageEventContentUnion],
	// [[]ManagedAgentsSystemContentBlock]
	Content ManagedAgentsDeploymentInitialEventUnionContent `json:"content"`
	// Any of "user.message", "user.define_outcome", "system.message".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsDeploymentUserDefineOutcomeEvent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsDeploymentUserDefineOutcomeEvent].
	Rubric ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion `json:"rubric"`
	// This field is from variant [ManagedAgentsDeploymentUserDefineOutcomeEvent].
	MaxIterations int64 `json:"max_iterations"`
	JSON          struct {
		Content       respjson.Field
		Type          respjson.Field
		Description   respjson.Field
		Rubric        respjson.Field
		MaxIterations respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentInitialEventUnion contains all possible properties and values from ManagedAgentsDeploymentUserMessageEvent, ManagedAgentsDeploymentUserDefineOutcomeEvent, ManagedAgentsDeploymentSystemMessageEvent.

Use the ManagedAgentsDeploymentInitialEventUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDeploymentInitialEventUnion) AsAny

func (u ManagedAgentsDeploymentInitialEventUnion) AsAny() anyManagedAgentsDeploymentInitialEvent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDeploymentInitialEventUnion.AsAny().(type) {
case qoder.ManagedAgentsDeploymentUserMessageEvent:
case qoder.ManagedAgentsDeploymentUserDefineOutcomeEvent:
case qoder.ManagedAgentsDeploymentSystemMessageEvent:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDeploymentInitialEventUnion) AsSystemMessage

func (ManagedAgentsDeploymentInitialEventUnion) AsUserDefineOutcome

func (ManagedAgentsDeploymentInitialEventUnion) AsUserMessage

func (ManagedAgentsDeploymentInitialEventUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentInitialEventUnion) UnmarshalJSON

func (r *ManagedAgentsDeploymentInitialEventUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentInitialEventUnionContent

type ManagedAgentsDeploymentInitialEventUnionContent struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsDeploymentUserMessageEventContentUnion] instead of an
	// object.
	OfManagedAgentsDeploymentUserMessageEventContentArray []ManagedAgentsDeploymentUserMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsSystemContentBlock] instead of an object.
	OfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:",inline"`
	JSON                                   struct {
		OfManagedAgentsDeploymentUserMessageEventContentArray respjson.Field
		OfManagedAgentsSystemContentBlockArray                respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentInitialEventUnionContent is an implicit subunion of ManagedAgentsDeploymentInitialEventUnion. ManagedAgentsDeploymentInitialEventUnionContent provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsDeploymentInitialEventUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsDeploymentUserMessageEventContentArray OfManagedAgentsSystemContentBlockArray]

func (*ManagedAgentsDeploymentInitialEventUnionContent) UnmarshalJSON

type ManagedAgentsDeploymentPausedReasonErrorUnion

type ManagedAgentsDeploymentPausedReasonErrorUnion struct {
	// Any of "environment_archived_error", "agent_archived_error",
	// "environment_not_found_error", "vault_not_found_error", "file_not_found_error",
	// "session_resource_not_found_error", "workspace_archived_error",
	// "organization_disabled_error", "memory_store_archived_error",
	// "skill_not_found_error", "vault_archived_error", "unknown_error",
	// "self_hosted_resources_unsupported_error", "mcp_egress_blocked_error".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentPausedReasonErrorUnion contains all possible properties and values from ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError, ManagedAgentsAgentArchivedDeploymentPausedReasonError, ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError, ManagedAgentsVaultNotFoundDeploymentPausedReasonError, ManagedAgentsFileNotFoundDeploymentPausedReasonError, ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError, ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError, ManagedAgentsOrganizationDisabledDeploymentPausedReasonError, ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError, ManagedAgentsSkillNotFoundDeploymentPausedReasonError, ManagedAgentsVaultArchivedDeploymentPausedReasonError, ManagedAgentsUnknownDeploymentPausedReasonError, ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError, ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError.

Use the ManagedAgentsDeploymentPausedReasonErrorUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsAgentArchivedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsAny

func (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsAny() anyManagedAgentsDeploymentPausedReasonError

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDeploymentPausedReasonErrorUnion.AsAny().(type) {
case qoder.ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError:
case qoder.ManagedAgentsAgentArchivedDeploymentPausedReasonError:
case qoder.ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError:
case qoder.ManagedAgentsVaultNotFoundDeploymentPausedReasonError:
case qoder.ManagedAgentsFileNotFoundDeploymentPausedReasonError:
case qoder.ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError:
case qoder.ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError:
case qoder.ManagedAgentsOrganizationDisabledDeploymentPausedReasonError:
case qoder.ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError:
case qoder.ManagedAgentsSkillNotFoundDeploymentPausedReasonError:
case qoder.ManagedAgentsVaultArchivedDeploymentPausedReasonError:
case qoder.ManagedAgentsUnknownDeploymentPausedReasonError:
case qoder.ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError:
case qoder.ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsEnvironmentArchivedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsEnvironmentNotFoundError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsFileNotFoundError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsMCPEgressBlockedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsMemoryStoreArchivedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsOrganizationDisabledError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsSelfHostedResourcesUnsupportedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsSessionResourceNotFoundError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsSkillNotFoundError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsUnknownError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsVaultArchivedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsVaultNotFoundError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) AsWorkspaceArchivedError

func (ManagedAgentsDeploymentPausedReasonErrorUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentPausedReasonErrorUnion) UnmarshalJSON

func (r *ManagedAgentsDeploymentPausedReasonErrorUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentPausedReasonUnion

type ManagedAgentsDeploymentPausedReasonUnion struct {
	// Any of "manual", "error".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsErrorDeploymentPausedReason].
	Error ManagedAgentsDeploymentPausedReasonErrorUnion `json:"error"`
	JSON  struct {
		Type  respjson.Field
		Error respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentPausedReasonUnion contains all possible properties and values from ManagedAgentsManualDeploymentPausedReason, ManagedAgentsErrorDeploymentPausedReason.

Use the ManagedAgentsDeploymentPausedReasonUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDeploymentPausedReasonUnion) AsAny

func (u ManagedAgentsDeploymentPausedReasonUnion) AsAny() anyManagedAgentsDeploymentPausedReason

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDeploymentPausedReasonUnion.AsAny().(type) {
case qoder.ManagedAgentsManualDeploymentPausedReason:
case qoder.ManagedAgentsErrorDeploymentPausedReason:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDeploymentPausedReasonUnion) AsError

func (ManagedAgentsDeploymentPausedReasonUnion) AsManual

func (ManagedAgentsDeploymentPausedReasonUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentPausedReasonUnion) UnmarshalJSON

func (r *ManagedAgentsDeploymentPausedReasonUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentRun

type ManagedAgentsDeploymentRun struct {
	// Unique identifier for this run (`drun_...`).
	ID string `json:"id" api:"required"`
	// A resolved agent reference with a concrete version.
	Agent ManagedAgentsAgentReference `json:"agent" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// ID of the deployment that produced this run.
	DeploymentID string `json:"deployment_id" api:"required"`
	// Why the run failed to create a session. The type identifies the failure; message
	// is human-readable detail.
	Error ManagedAgentsDeploymentRunErrorUnion `json:"error" api:"required"`
	// Populated on success. Null on creation failure. Exactly one of `session_id` or
	// `error` is non-null.
	SessionID string `json:"session_id" api:"required"`
	// Describes what triggered a deployment run, with trigger-specific metadata.
	TriggerContext ManagedAgentsTriggerContextUnion `json:"trigger_context" api:"required"`
	// Any of "deployment_run".
	Type ManagedAgentsDeploymentRunType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		Agent          respjson.Field
		CreatedAt      respjson.Field
		DeploymentID   respjson.Field
		Error          respjson.Field
		SessionID      respjson.Field
		TriggerContext respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A persistent, append-only record of a single deployment execution. Records session creation success or failure — no session lifecycle tracking.

func (ManagedAgentsDeploymentRun) RawJSON

func (r ManagedAgentsDeploymentRun) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentRun) UnmarshalJSON

func (r *ManagedAgentsDeploymentRun) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentRunErrorUnion

type ManagedAgentsDeploymentRunErrorUnion struct {
	Message string `json:"message"`
	// Any of "environment_archived_error", "agent_archived_error",
	// "environment_not_found_error", "vault_not_found_error", "vault_archived_error",
	// "file_not_found_error", "memory_store_archived_error", "skill_not_found_error",
	// "session_resource_not_found_error", "workspace_archived_error",
	// "organization_disabled_error", "session_rate_limited_error",
	// "session_creation_rejected_error", "unknown_error",
	// "self_hosted_resources_unsupported_error", "mcp_egress_blocked_error".
	Type string `json:"type"`
	JSON struct {
		Message respjson.Field
		Type    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentRunErrorUnion contains all possible properties and values from ManagedAgentsEnvironmentArchivedRunError, ManagedAgentsAgentArchivedRunError, ManagedAgentsEnvironmentNotFoundRunError, ManagedAgentsVaultNotFoundRunError, ManagedAgentsVaultArchivedRunError, ManagedAgentsFileNotFoundRunError, ManagedAgentsMemoryStoreArchivedRunError, ManagedAgentsSkillNotFoundRunError, ManagedAgentsSessionResourceNotFoundRunError, ManagedAgentsWorkspaceArchivedRunError, ManagedAgentsOrganizationDisabledRunError, ManagedAgentsSessionRateLimitedRunError, ManagedAgentsSessionCreationRejectedRunError, ManagedAgentsUnknownRunError, ManagedAgentsSelfHostedResourcesUnsupportedRunError, ManagedAgentsMCPEgressBlockedRunError.

Use the ManagedAgentsDeploymentRunErrorUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDeploymentRunErrorUnion) AsAgentArchivedError

func (ManagedAgentsDeploymentRunErrorUnion) AsAny

func (u ManagedAgentsDeploymentRunErrorUnion) AsAny() anyManagedAgentsDeploymentRunError

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDeploymentRunErrorUnion.AsAny().(type) {
case qoder.ManagedAgentsEnvironmentArchivedRunError:
case qoder.ManagedAgentsAgentArchivedRunError:
case qoder.ManagedAgentsEnvironmentNotFoundRunError:
case qoder.ManagedAgentsVaultNotFoundRunError:
case qoder.ManagedAgentsVaultArchivedRunError:
case qoder.ManagedAgentsFileNotFoundRunError:
case qoder.ManagedAgentsMemoryStoreArchivedRunError:
case qoder.ManagedAgentsSkillNotFoundRunError:
case qoder.ManagedAgentsSessionResourceNotFoundRunError:
case qoder.ManagedAgentsWorkspaceArchivedRunError:
case qoder.ManagedAgentsOrganizationDisabledRunError:
case qoder.ManagedAgentsSessionRateLimitedRunError:
case qoder.ManagedAgentsSessionCreationRejectedRunError:
case qoder.ManagedAgentsUnknownRunError:
case qoder.ManagedAgentsSelfHostedResourcesUnsupportedRunError:
case qoder.ManagedAgentsMCPEgressBlockedRunError:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDeploymentRunErrorUnion) AsEnvironmentArchivedError

func (ManagedAgentsDeploymentRunErrorUnion) AsEnvironmentNotFoundError

func (ManagedAgentsDeploymentRunErrorUnion) AsFileNotFoundError

func (ManagedAgentsDeploymentRunErrorUnion) AsMCPEgressBlockedError

func (ManagedAgentsDeploymentRunErrorUnion) AsMemoryStoreArchivedError

func (ManagedAgentsDeploymentRunErrorUnion) AsOrganizationDisabledError

func (ManagedAgentsDeploymentRunErrorUnion) AsSelfHostedResourcesUnsupportedError

func (ManagedAgentsDeploymentRunErrorUnion) AsSessionCreationRejectedError

func (ManagedAgentsDeploymentRunErrorUnion) AsSessionRateLimitedError

func (ManagedAgentsDeploymentRunErrorUnion) AsSessionResourceNotFoundError

func (ManagedAgentsDeploymentRunErrorUnion) AsSkillNotFoundError

func (ManagedAgentsDeploymentRunErrorUnion) AsUnknownError

func (ManagedAgentsDeploymentRunErrorUnion) AsVaultArchivedError

func (ManagedAgentsDeploymentRunErrorUnion) AsVaultNotFoundError

func (ManagedAgentsDeploymentRunErrorUnion) AsWorkspaceArchivedError

func (ManagedAgentsDeploymentRunErrorUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentRunErrorUnion) UnmarshalJSON

func (r *ManagedAgentsDeploymentRunErrorUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentRunType

type ManagedAgentsDeploymentRunType string
const (
	ManagedAgentsDeploymentRunTypeDeploymentRun ManagedAgentsDeploymentRunType = "deployment_run"
)

type ManagedAgentsDeploymentStatus

type ManagedAgentsDeploymentStatus string

Lifecycle status of a deployment.

const (
	ManagedAgentsDeploymentStatusActive ManagedAgentsDeploymentStatus = "active"
	ManagedAgentsDeploymentStatusPaused ManagedAgentsDeploymentStatus = "paused"
)

type ManagedAgentsDeploymentSystemMessageEvent

type ManagedAgentsDeploymentSystemMessageEvent struct {
	// System content blocks to append. Text-only.
	Content []ManagedAgentsSystemContentBlock `json:"content" api:"required"`
	// Any of "system.message".
	Type ManagedAgentsDeploymentSystemMessageEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Content     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt.

func (ManagedAgentsDeploymentSystemMessageEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentSystemMessageEvent) UnmarshalJSON

func (r *ManagedAgentsDeploymentSystemMessageEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentSystemMessageEventType

type ManagedAgentsDeploymentSystemMessageEventType string
const (
	ManagedAgentsDeploymentSystemMessageEventTypeSystemMessage ManagedAgentsDeploymentSystemMessageEventType = "system.message"
)

type ManagedAgentsDeploymentType

type ManagedAgentsDeploymentType string
const (
	ManagedAgentsDeploymentTypeDeployment ManagedAgentsDeploymentType = "deployment"
)

type ManagedAgentsDeploymentUserDefineOutcomeEvent

type ManagedAgentsDeploymentUserDefineOutcomeEvent struct {
	// What the agent should produce. This is the task specification.
	Description string `json:"description" api:"required"`
	// Rubric for grading the quality of an outcome.
	Rubric ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion `json:"rubric" api:"required"`
	// Any of "user.define_outcome".
	Type ManagedAgentsDeploymentUserDefineOutcomeEventType `json:"type" api:"required"`
	// Eval→revision cycles before giving up. Default 3, max 20.
	MaxIterations int64 `json:"max_iterations" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Description   respjson.Field
		Rubric        respjson.Field
		Type          respjson.Field
		MaxIterations respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An outcome the agent should work toward. The agent begins work on receipt.

func (ManagedAgentsDeploymentUserDefineOutcomeEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentUserDefineOutcomeEvent) UnmarshalJSON

func (r *ManagedAgentsDeploymentUserDefineOutcomeEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion

type ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion struct {
	// This field is from variant [ManagedAgentsFileRubric].
	FileID string `json:"file_id"`
	// Any of "file", "text".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsTextRubric].
	Content string `json:"content"`
	JSON    struct {
		FileID  respjson.Field
		Type    respjson.Field
		Content respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion contains all possible properties and values from ManagedAgentsFileRubric, ManagedAgentsTextRubric.

Use the ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsAny

func (u ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsAny() anyManagedAgentsDeploymentUserDefineOutcomeEventRubric

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion.AsAny().(type) {
case qoder.ManagedAgentsFileRubric:
case qoder.ManagedAgentsTextRubric:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsFile

func (ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsText

func (ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) UnmarshalJSON

type ManagedAgentsDeploymentUserDefineOutcomeEventType

type ManagedAgentsDeploymentUserDefineOutcomeEventType string
const (
	ManagedAgentsDeploymentUserDefineOutcomeEventTypeUserDefineOutcome ManagedAgentsDeploymentUserDefineOutcomeEventType = "user.define_outcome"
)

type ManagedAgentsDeploymentUserMessageEvent

type ManagedAgentsDeploymentUserMessageEvent struct {
	// Array of content blocks for the user message.
	Content []ManagedAgentsDeploymentUserMessageEventContentUnion `json:"content" api:"required"`
	// Any of "user.message".
	Type ManagedAgentsDeploymentUserMessageEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Content     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A user message sent to the session.

func (ManagedAgentsDeploymentUserMessageEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentUserMessageEvent) UnmarshalJSON

func (r *ManagedAgentsDeploymentUserMessageEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsDeploymentUserMessageEventContentUnion

type ManagedAgentsDeploymentUserMessageEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "redacted".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion]
	Source ManagedAgentsDeploymentUserMessageEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Title string `json:"title"`
	JSON  struct {
		Text    respjson.Field
		Type    respjson.Field
		Source  respjson.Field
		Context respjson.Field
		Title   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentUserMessageEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsRedactedBlock.

Use the ManagedAgentsDeploymentUserMessageEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDeploymentUserMessageEventContentUnion) AsAny

func (u ManagedAgentsDeploymentUserMessageEventContentUnion) AsAny() anyManagedAgentsDeploymentUserMessageEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDeploymentUserMessageEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsRedactedBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDeploymentUserMessageEventContentUnion) AsDocument

func (ManagedAgentsDeploymentUserMessageEventContentUnion) AsImage

func (ManagedAgentsDeploymentUserMessageEventContentUnion) AsRedacted

func (ManagedAgentsDeploymentUserMessageEventContentUnion) AsText

func (ManagedAgentsDeploymentUserMessageEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDeploymentUserMessageEventContentUnion) UnmarshalJSON

type ManagedAgentsDeploymentUserMessageEventContentUnionSource

type ManagedAgentsDeploymentUserMessageEventContentUnionSource struct {
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDeploymentUserMessageEventContentUnionSource is an implicit subunion of ManagedAgentsDeploymentUserMessageEventContentUnion. ManagedAgentsDeploymentUserMessageEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsDeploymentUserMessageEventContentUnion.

func (*ManagedAgentsDeploymentUserMessageEventContentUnionSource) UnmarshalJSON

type ManagedAgentsDeploymentUserMessageEventType

type ManagedAgentsDeploymentUserMessageEventType string
const (
	ManagedAgentsDeploymentUserMessageEventTypeUserMessage ManagedAgentsDeploymentUserMessageEventType = "user.message"
)

type ManagedAgentsDocumentBlock

type ManagedAgentsDocumentBlock struct {
	// Union type for document source variants.
	Source ManagedAgentsDocumentBlockSourceUnion `json:"source" api:"required"`
	// Any of "document".
	Type ManagedAgentsDocumentBlockType `json:"type" api:"required"`
	// Additional context about the document for the model.
	Context string `json:"context" api:"nullable"`
	// The title of the document.
	Title string `json:"title" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Source      respjson.Field
		Type        respjson.Field
		Context     respjson.Field
		Title       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Document content, either specified directly as base64 data, as text, or as a reference via a URL.

func (ManagedAgentsDocumentBlock) RawJSON

func (r ManagedAgentsDocumentBlock) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsDocumentBlock) ToParam

ToParam converts this ManagedAgentsDocumentBlock to a ManagedAgentsDocumentBlockParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsDocumentBlockParam.Overrides()

func (*ManagedAgentsDocumentBlock) UnmarshalJSON

func (r *ManagedAgentsDocumentBlock) UnmarshalJSON(data []byte) error

type ManagedAgentsDocumentBlockParam

type ManagedAgentsDocumentBlockParam struct {
	// Union type for document source variants.
	Source ManagedAgentsDocumentBlockSourceUnionParam `json:"source,omitzero" api:"required"`
	// Any of "document".
	Type ManagedAgentsDocumentBlockType `json:"type,omitzero" api:"required"`
	// Additional context about the document for the model.
	Context param.Opt[string] `json:"context,omitzero"`
	// The title of the document.
	Title param.Opt[string] `json:"title,omitzero"`
	// contains filtered or unexported fields
}

Document content, either specified directly as base64 data, as text, or as a reference via a URL.

The properties Source, Type are required.

func (ManagedAgentsDocumentBlockParam) MarshalJSON

func (r ManagedAgentsDocumentBlockParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsDocumentBlockParam) UnmarshalJSON

func (r *ManagedAgentsDocumentBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsDocumentBlockSourceUnion

type ManagedAgentsDocumentBlockSourceUnion struct {
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	// Any of "base64", "text", "url", "file".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsURLDocumentSource].
	URL string `json:"url"`
	// This field is from variant [ManagedAgentsFileDocumentSource].
	FileID string `json:"file_id"`
	JSON   struct {
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsDocumentBlockSourceUnion contains all possible properties and values from ManagedAgentsBase64DocumentSource, ManagedAgentsPlainTextDocumentSource, ManagedAgentsURLDocumentSource, ManagedAgentsFileDocumentSource.

Use the ManagedAgentsDocumentBlockSourceUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsDocumentBlockSourceUnion) AsAny

func (u ManagedAgentsDocumentBlockSourceUnion) AsAny() anyManagedAgentsDocumentBlockSource

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsDocumentBlockSourceUnion.AsAny().(type) {
case qoder.ManagedAgentsBase64DocumentSource:
case qoder.ManagedAgentsPlainTextDocumentSource:
case qoder.ManagedAgentsURLDocumentSource:
case qoder.ManagedAgentsFileDocumentSource:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsDocumentBlockSourceUnion) AsBase64

func (ManagedAgentsDocumentBlockSourceUnion) AsFile

func (ManagedAgentsDocumentBlockSourceUnion) AsText

func (ManagedAgentsDocumentBlockSourceUnion) AsURL

func (ManagedAgentsDocumentBlockSourceUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsDocumentBlockSourceUnion) UnmarshalJSON

func (r *ManagedAgentsDocumentBlockSourceUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsDocumentBlockSourceUnionParam

type ManagedAgentsDocumentBlockSourceUnionParam struct {
	OfBase64 *ManagedAgentsBase64DocumentSourceParam    `json:",omitzero,inline"`
	OfText   *ManagedAgentsPlainTextDocumentSourceParam `json:",omitzero,inline"`
	OfURL    *ManagedAgentsURLDocumentSourceParam       `json:",omitzero,inline"`
	OfFile   *ManagedAgentsFileDocumentSourceParam      `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsDocumentBlockSourceUnionParam) GetData

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDocumentBlockSourceUnionParam) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDocumentBlockSourceUnionParam) GetMediaType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDocumentBlockSourceUnionParam) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDocumentBlockSourceUnionParam) GetURL

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsDocumentBlockSourceUnionParam) MarshalJSON

func (*ManagedAgentsDocumentBlockSourceUnionParam) UnmarshalJSON

func (u *ManagedAgentsDocumentBlockSourceUnionParam) UnmarshalJSON(data []byte) error

type ManagedAgentsDocumentBlockType

type ManagedAgentsDocumentBlockType string
const (
	ManagedAgentsDocumentBlockTypeDocument ManagedAgentsDocumentBlockType = "document"
)

type ManagedAgentsEditToolConfig

type ManagedAgentsEditToolConfig struct {
	Enabled bool          `json:"enabled" api:"required"`
	Name    constant.Edit `json:"name" default:"edit"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsEditToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.Edit                                    `json:"type" default:"edit"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the edit tool.

func (ManagedAgentsEditToolConfig) RawJSON

func (r ManagedAgentsEditToolConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsEditToolConfig) UnmarshalJSON

func (r *ManagedAgentsEditToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsEditToolConfigParams

type ManagedAgentsEditToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsEditToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Any of "edit".
	Type ManagedAgentsEditToolConfigParamsType `json:"type,omitzero"`
	// Must be "edit".
	//
	// This field can be elided, and will marshal its zero value as "edit".
	Name constant.Edit `json:"name" default:"edit"`
	// contains filtered or unexported fields
}

Configuration override for the edit tool.

The property Name is required.

func (ManagedAgentsEditToolConfigParams) MarshalJSON

func (r ManagedAgentsEditToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEditToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsEditToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsEditToolConfigParamsPermissionPolicyUnion

type ManagedAgentsEditToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsEditToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEditToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsEditToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsEditToolConfigParamsType

type ManagedAgentsEditToolConfigParamsType string
const (
	ManagedAgentsEditToolConfigParamsTypeEdit ManagedAgentsEditToolConfigParamsType = "edit"
)

type ManagedAgentsEditToolConfigPermissionPolicyUnion

type ManagedAgentsEditToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsEditToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsEditToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsEditToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsEditToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsEditToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEditToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsEffortHigh

type ManagedAgentsEffortHigh struct {
	// Any of "high".
	Type ManagedAgentsEffortHighType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

High effort. Favors reasoning depth.

func (ManagedAgentsEffortHigh) RawJSON

func (r ManagedAgentsEffortHigh) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsEffortHigh) ToParam

ToParam converts this ManagedAgentsEffortHigh to a ManagedAgentsEffortHighParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsEffortHighParam.Overrides()

func (*ManagedAgentsEffortHigh) UnmarshalJSON

func (r *ManagedAgentsEffortHigh) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortHighParam

type ManagedAgentsEffortHighParam struct {
	// Any of "high".
	Type ManagedAgentsEffortHighType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

High effort. Favors reasoning depth.

The property Type is required.

func (ManagedAgentsEffortHighParam) MarshalJSON

func (r ManagedAgentsEffortHighParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEffortHighParam) UnmarshalJSON

func (r *ManagedAgentsEffortHighParam) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortHighType

type ManagedAgentsEffortHighType string
const (
	ManagedAgentsEffortHighTypeHigh ManagedAgentsEffortHighType = "high"
)

type ManagedAgentsEffortLow

type ManagedAgentsEffortLow struct {
	// Any of "low".
	Type ManagedAgentsEffortLowType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Low effort. Favors latency over reasoning depth.

func (ManagedAgentsEffortLow) RawJSON

func (r ManagedAgentsEffortLow) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsEffortLow) ToParam

ToParam converts this ManagedAgentsEffortLow to a ManagedAgentsEffortLowParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsEffortLowParam.Overrides()

func (*ManagedAgentsEffortLow) UnmarshalJSON

func (r *ManagedAgentsEffortLow) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortLowParam

type ManagedAgentsEffortLowParam struct {
	// Any of "low".
	Type ManagedAgentsEffortLowType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Low effort. Favors latency over reasoning depth.

The property Type is required.

func (ManagedAgentsEffortLowParam) MarshalJSON

func (r ManagedAgentsEffortLowParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEffortLowParam) UnmarshalJSON

func (r *ManagedAgentsEffortLowParam) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortLowType

type ManagedAgentsEffortLowType string
const (
	ManagedAgentsEffortLowTypeLow ManagedAgentsEffortLowType = "low"
)

type ManagedAgentsEffortMax

type ManagedAgentsEffortMax struct {
	// Any of "max".
	Type ManagedAgentsEffortMaxType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Maximum effort. Favors reasoning depth over latency.

func (ManagedAgentsEffortMax) RawJSON

func (r ManagedAgentsEffortMax) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsEffortMax) ToParam

ToParam converts this ManagedAgentsEffortMax to a ManagedAgentsEffortMaxParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsEffortMaxParam.Overrides()

func (*ManagedAgentsEffortMax) UnmarshalJSON

func (r *ManagedAgentsEffortMax) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortMaxParam

type ManagedAgentsEffortMaxParam struct {
	// Any of "max".
	Type ManagedAgentsEffortMaxType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Maximum effort. Favors reasoning depth over latency.

The property Type is required.

func (ManagedAgentsEffortMaxParam) MarshalJSON

func (r ManagedAgentsEffortMaxParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEffortMaxParam) UnmarshalJSON

func (r *ManagedAgentsEffortMaxParam) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortMaxType

type ManagedAgentsEffortMaxType string
const (
	ManagedAgentsEffortMaxTypeMax ManagedAgentsEffortMaxType = "max"
)

type ManagedAgentsEffortMedium

type ManagedAgentsEffortMedium struct {
	// Any of "medium".
	Type ManagedAgentsEffortMediumType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Medium effort. Balances latency and reasoning depth.

func (ManagedAgentsEffortMedium) RawJSON

func (r ManagedAgentsEffortMedium) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsEffortMedium) ToParam

ToParam converts this ManagedAgentsEffortMedium to a ManagedAgentsEffortMediumParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsEffortMediumParam.Overrides()

func (*ManagedAgentsEffortMedium) UnmarshalJSON

func (r *ManagedAgentsEffortMedium) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortMediumParam

type ManagedAgentsEffortMediumParam struct {
	// Any of "medium".
	Type ManagedAgentsEffortMediumType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Medium effort. Balances latency and reasoning depth.

The property Type is required.

func (ManagedAgentsEffortMediumParam) MarshalJSON

func (r ManagedAgentsEffortMediumParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEffortMediumParam) UnmarshalJSON

func (r *ManagedAgentsEffortMediumParam) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortMediumType

type ManagedAgentsEffortMediumType string
const (
	ManagedAgentsEffortMediumTypeMedium ManagedAgentsEffortMediumType = "medium"
)

type ManagedAgentsEffortXhigh

type ManagedAgentsEffortXhigh struct {
	// Any of "xhigh".
	Type ManagedAgentsEffortXhighType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Extra-high effort. Not all models accept this level.

func (ManagedAgentsEffortXhigh) RawJSON

func (r ManagedAgentsEffortXhigh) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsEffortXhigh) ToParam

ToParam converts this ManagedAgentsEffortXhigh to a ManagedAgentsEffortXhighParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsEffortXhighParam.Overrides()

func (*ManagedAgentsEffortXhigh) UnmarshalJSON

func (r *ManagedAgentsEffortXhigh) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortXhighParam

type ManagedAgentsEffortXhighParam struct {
	// Any of "xhigh".
	Type ManagedAgentsEffortXhighType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Extra-high effort. Not all models accept this level.

The property Type is required.

func (ManagedAgentsEffortXhighParam) MarshalJSON

func (r ManagedAgentsEffortXhighParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEffortXhighParam) UnmarshalJSON

func (r *ManagedAgentsEffortXhighParam) UnmarshalJSON(data []byte) error

type ManagedAgentsEffortXhighType

type ManagedAgentsEffortXhighType string
const (
	ManagedAgentsEffortXhighTypeXhigh ManagedAgentsEffortXhighType = "xhigh"
)

type ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError

type ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError struct {
	// Any of "environment_archived_error".
	Type ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's environment was archived.

func (ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType

type ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorTypeEnvironmentArchivedError ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType = "environment_archived_error"
)

type ManagedAgentsEnvironmentArchivedRunError

type ManagedAgentsEnvironmentArchivedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "environment_archived_error".
	Type ManagedAgentsEnvironmentArchivedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's environment was archived.

func (ManagedAgentsEnvironmentArchivedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEnvironmentArchivedRunError) UnmarshalJSON

func (r *ManagedAgentsEnvironmentArchivedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsEnvironmentArchivedRunErrorType

type ManagedAgentsEnvironmentArchivedRunErrorType string
const (
	ManagedAgentsEnvironmentArchivedRunErrorTypeEnvironmentArchivedError ManagedAgentsEnvironmentArchivedRunErrorType = "environment_archived_error"
)

type ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError

type ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError struct {
	// Any of "environment_not_found_error".
	Type ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's environment no longer exists.

func (ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType

type ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType string
const (
	ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorTypeEnvironmentNotFoundError ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType = "environment_not_found_error"
)

type ManagedAgentsEnvironmentNotFoundRunError

type ManagedAgentsEnvironmentNotFoundRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "environment_not_found_error".
	Type ManagedAgentsEnvironmentNotFoundRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's environment no longer exists.

func (ManagedAgentsEnvironmentNotFoundRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEnvironmentNotFoundRunError) UnmarshalJSON

func (r *ManagedAgentsEnvironmentNotFoundRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsEnvironmentNotFoundRunErrorType

type ManagedAgentsEnvironmentNotFoundRunErrorType string
const (
	ManagedAgentsEnvironmentNotFoundRunErrorTypeEnvironmentNotFoundError ManagedAgentsEnvironmentNotFoundRunErrorType = "environment_not_found_error"
)

type ManagedAgentsEnvironmentVariableAuthResponse

type ManagedAgentsEnvironmentVariableAuthResponse struct {
	// Where in the outbound request the secret value is substituted.
	InjectionLocation ManagedAgentsInjectionLocationResponse `json:"injection_location" api:"required"`
	// Outbound hosts the secret value is substituted on.
	Networking ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion `json:"networking" api:"required"`
	// Name of the environment variable.
	SecretName string `json:"secret_name" api:"required"`
	// Any of "environment_variable".
	Type ManagedAgentsEnvironmentVariableAuthResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InjectionLocation respjson.Field
		Networking        respjson.Field
		SecretName        respjson.Field
		Type              respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Environment variable credential details. The secret value is never returned.

func (ManagedAgentsEnvironmentVariableAuthResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEnvironmentVariableAuthResponse) UnmarshalJSON

func (r *ManagedAgentsEnvironmentVariableAuthResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion

type ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion struct {
	// Any of "unrestricted", "limited".
	Type string `json:"type"`
	// This field is from variant
	// [ManagedAgentsLimitedCredentialNetworkingResponse].
	AllowedHosts []string `json:"allowed_hosts"`
	JSON         struct {
		Type         respjson.Field
		AllowedHosts respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion contains all possible properties and values from ManagedAgentsUnrestrictedCredentialNetworkingResponse, ManagedAgentsLimitedCredentialNetworkingResponse.

Use the ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsAny

func (u ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsAny() anyManagedAgentsEnvironmentVariableAuthResponseNetworking

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion.AsAny().(type) {
case qoder.ManagedAgentsUnrestrictedCredentialNetworkingResponse:
case qoder.ManagedAgentsLimitedCredentialNetworkingResponse:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsLimited

func (ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsUnrestricted

func (ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) UnmarshalJSON

type ManagedAgentsEnvironmentVariableAuthResponseType

type ManagedAgentsEnvironmentVariableAuthResponseType string
const (
	ManagedAgentsEnvironmentVariableAuthResponseTypeEnvironmentVariable ManagedAgentsEnvironmentVariableAuthResponseType = "environment_variable"
)

type ManagedAgentsEnvironmentVariableCreateParams

type ManagedAgentsEnvironmentVariableCreateParams struct {
	// Outbound hosts the secret value is substituted on.
	Networking ManagedAgentsCredentialNetworkingParamsUnion `json:"networking,omitzero" api:"required"`
	// Name of the environment variable. Immutable after create.
	SecretName string `json:"secret_name" api:"required"`
	// Secret value. Write-only; never returned in responses.
	SecretValue string `json:"secret_value" api:"required"`
	// Any of "environment_variable".
	Type ManagedAgentsEnvironmentVariableCreateParamsType `json:"type,omitzero" api:"required"`
	// Where in the outbound request the secret value may be substituted.
	InjectionLocation ManagedAgentsInjectionLocationParams `json:"injection_location,omitzero"`
	// contains filtered or unexported fields
}

Parameters for creating an environment variable credential.

The properties Networking, SecretName, SecretValue, Type are required.

func (ManagedAgentsEnvironmentVariableCreateParams) MarshalJSON

func (r ManagedAgentsEnvironmentVariableCreateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEnvironmentVariableCreateParams) UnmarshalJSON

func (r *ManagedAgentsEnvironmentVariableCreateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsEnvironmentVariableCreateParamsType

type ManagedAgentsEnvironmentVariableCreateParamsType string
const (
	ManagedAgentsEnvironmentVariableCreateParamsTypeEnvironmentVariable ManagedAgentsEnvironmentVariableCreateParamsType = "environment_variable"
)

type ManagedAgentsEnvironmentVariableUpdateParams

type ManagedAgentsEnvironmentVariableUpdateParams struct {
	// Any of "environment_variable".
	Type ManagedAgentsEnvironmentVariableUpdateParamsType `json:"type,omitzero" api:"required"`
	// Updated secret value.
	SecretValue param.Opt[string] `json:"secret_value,omitzero"`
	// Updated injection location.
	InjectionLocation ManagedAgentsInjectionLocationUpdateParams `json:"injection_location,omitzero"`
	// Updated networking scope. Full replacement.
	Networking ManagedAgentsCredentialNetworkingParamsUnion `json:"networking,omitzero"`
	// contains filtered or unexported fields
}

Parameters for updating an environment variable credential. `secret_name` is immutable.

The property Type is required.

func (ManagedAgentsEnvironmentVariableUpdateParams) MarshalJSON

func (r ManagedAgentsEnvironmentVariableUpdateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsEnvironmentVariableUpdateParams) UnmarshalJSON

func (r *ManagedAgentsEnvironmentVariableUpdateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsEnvironmentVariableUpdateParamsType

type ManagedAgentsEnvironmentVariableUpdateParamsType string
const (
	ManagedAgentsEnvironmentVariableUpdateParamsTypeEnvironmentVariable ManagedAgentsEnvironmentVariableUpdateParamsType = "environment_variable"
)

type ManagedAgentsErrorDeploymentPausedReason

type ManagedAgentsErrorDeploymentPausedReason struct {
	// The error that triggered an auto-pause. Matches the failed run's `error.type`.
	Error ManagedAgentsDeploymentPausedReasonErrorUnion `json:"error" api:"required"`
	// Any of "error".
	Type ManagedAgentsErrorDeploymentPausedReasonType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Error       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A scheduled fire recorded a failed run whose error auto-pauses the deployment.

func (ManagedAgentsErrorDeploymentPausedReason) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsErrorDeploymentPausedReason) UnmarshalJSON

func (r *ManagedAgentsErrorDeploymentPausedReason) UnmarshalJSON(data []byte) error

type ManagedAgentsErrorDeploymentPausedReasonType

type ManagedAgentsErrorDeploymentPausedReasonType string
const (
	ManagedAgentsErrorDeploymentPausedReasonTypeError ManagedAgentsErrorDeploymentPausedReasonType = "error"
)

type ManagedAgentsEventParamsUnion

type ManagedAgentsEventParamsUnion struct {
	OfUserMessage          *ManagedAgentsUserMessageEventParams          `json:",omitzero,inline"`
	OfUserInterrupt        *ManagedAgentsUserInterruptEventParams        `json:",omitzero,inline"`
	OfUserToolConfirmation *ManagedAgentsUserToolConfirmationEventParams `json:",omitzero,inline"`
	OfUserCustomToolResult *ManagedAgentsUserCustomToolResultEventParams `json:",omitzero,inline"`
	OfUserDefineOutcome    *ManagedAgentsUserDefineOutcomeEventParams    `json:",omitzero,inline"`
	OfUserToolResult       *ManagedAgentsUserToolResultEventParams       `json:",omitzero,inline"`
	OfSystemMessage        *ManagedAgentsSystemMessageEventParams        `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func ManagedAgentsEventParamsOfUserCustomToolResult

func ManagedAgentsEventParamsOfUserCustomToolResult(customToolUseID string) ManagedAgentsEventParamsUnion

func ManagedAgentsEventParamsOfUserToolResult

func ManagedAgentsEventParamsOfUserToolResult(toolUseID string) ManagedAgentsEventParamsUnion

func (ManagedAgentsEventParamsUnion) GetContent

func (u ManagedAgentsEventParamsUnion) GetContent() (res managedAgentsEventParamsUnionContent)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsEventParamsUnion) GetCustomToolUseID

func (u ManagedAgentsEventParamsUnion) GetCustomToolUseID() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetDenyMessage

func (u ManagedAgentsEventParamsUnion) GetDenyMessage() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetDescription

func (u ManagedAgentsEventParamsUnion) GetDescription() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetIsError

func (u ManagedAgentsEventParamsUnion) GetIsError() *bool

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetMaxIterations

func (u ManagedAgentsEventParamsUnion) GetMaxIterations() *int64

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetResult

func (u ManagedAgentsEventParamsUnion) GetResult() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetRubric

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetSessionThreadID

func (u ManagedAgentsEventParamsUnion) GetSessionThreadID() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetToolUseID

func (u ManagedAgentsEventParamsUnion) GetToolUseID() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsEventParamsUnion) MarshalJSON

func (u ManagedAgentsEventParamsUnion) MarshalJSON() ([]byte, error)

func (*ManagedAgentsEventParamsUnion) UnmarshalJSON

func (u *ManagedAgentsEventParamsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsFileDocumentSource

type ManagedAgentsFileDocumentSource struct {
	// ID of a previously uploaded file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileDocumentSourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Document referenced by file ID.

func (ManagedAgentsFileDocumentSource) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsFileDocumentSource) ToParam

ToParam converts this ManagedAgentsFileDocumentSource to a ManagedAgentsFileDocumentSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsFileDocumentSourceParam.Overrides()

func (*ManagedAgentsFileDocumentSource) UnmarshalJSON

func (r *ManagedAgentsFileDocumentSource) UnmarshalJSON(data []byte) error

type ManagedAgentsFileDocumentSourceParam

type ManagedAgentsFileDocumentSourceParam struct {
	// ID of a previously uploaded file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileDocumentSourceType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Document referenced by file ID.

The properties FileID, Type are required.

func (ManagedAgentsFileDocumentSourceParam) MarshalJSON

func (r ManagedAgentsFileDocumentSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsFileDocumentSourceParam) UnmarshalJSON

func (r *ManagedAgentsFileDocumentSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsFileDocumentSourceType

type ManagedAgentsFileDocumentSourceType string
const (
	ManagedAgentsFileDocumentSourceTypeFile ManagedAgentsFileDocumentSourceType = "file"
)

type ManagedAgentsFileImageSource

type ManagedAgentsFileImageSource struct {
	// ID of a previously uploaded file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileImageSourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Image referenced by file ID.

func (ManagedAgentsFileImageSource) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsFileImageSource) ToParam

ToParam converts this ManagedAgentsFileImageSource to a ManagedAgentsFileImageSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsFileImageSourceParam.Overrides()

func (*ManagedAgentsFileImageSource) UnmarshalJSON

func (r *ManagedAgentsFileImageSource) UnmarshalJSON(data []byte) error

type ManagedAgentsFileImageSourceParam

type ManagedAgentsFileImageSourceParam struct {
	// ID of a previously uploaded file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileImageSourceType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Image referenced by file ID.

The properties FileID, Type are required.

func (ManagedAgentsFileImageSourceParam) MarshalJSON

func (r ManagedAgentsFileImageSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsFileImageSourceParam) UnmarshalJSON

func (r *ManagedAgentsFileImageSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsFileImageSourceType

type ManagedAgentsFileImageSourceType string
const (
	ManagedAgentsFileImageSourceTypeFile ManagedAgentsFileImageSourceType = "file"
)

type ManagedAgentsFileNotFoundDeploymentPausedReasonError

type ManagedAgentsFileNotFoundDeploymentPausedReasonError struct {
	// Any of "file_not_found_error".
	Type ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A file resource referenced by the deployment no longer exists.

func (ManagedAgentsFileNotFoundDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsFileNotFoundDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType

type ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType string
const (
	ManagedAgentsFileNotFoundDeploymentPausedReasonErrorTypeFileNotFoundError ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType = "file_not_found_error"
)

type ManagedAgentsFileNotFoundRunError

type ManagedAgentsFileNotFoundRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "file_not_found_error".
	Type ManagedAgentsFileNotFoundRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A file resource referenced by the deployment no longer exists.

func (ManagedAgentsFileNotFoundRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsFileNotFoundRunError) UnmarshalJSON

func (r *ManagedAgentsFileNotFoundRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsFileNotFoundRunErrorType

type ManagedAgentsFileNotFoundRunErrorType string
const (
	ManagedAgentsFileNotFoundRunErrorTypeFileNotFoundError ManagedAgentsFileNotFoundRunErrorType = "file_not_found_error"
)

type ManagedAgentsFileResource

type ManagedAgentsFileResource struct {
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	FileID    string    `json:"file_id" api:"required"`
	MountPath string    `json:"mount_path" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileResourceType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		FileID      respjson.Field
		MountPath   respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsFileResource) RawJSON

func (r ManagedAgentsFileResource) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsFileResource) UnmarshalJSON

func (r *ManagedAgentsFileResource) UnmarshalJSON(data []byte) error

type ManagedAgentsFileResourceConfig

type ManagedAgentsFileResourceConfig struct {
	// ID of a previously uploaded file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileResourceConfigType `json:"type" api:"required"`
	// Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
	MountPath string `json:"mount_path" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		Type        respjson.Field
		MountPath   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A file mounted into each session's container.

func (ManagedAgentsFileResourceConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsFileResourceConfig) UnmarshalJSON

func (r *ManagedAgentsFileResourceConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsFileResourceConfigType

type ManagedAgentsFileResourceConfigType string
const (
	ManagedAgentsFileResourceConfigTypeFile ManagedAgentsFileResourceConfigType = "file"
)

type ManagedAgentsFileResourceParams

type ManagedAgentsFileResourceParams struct {
	// ID of a previously uploaded file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileResourceParamsType `json:"type,omitzero" api:"required"`
	// Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
	MountPath param.Opt[string] `json:"mount_path,omitzero"`
	// contains filtered or unexported fields
}

Mount a file uploaded via the Files API into the session.

The properties FileID, Type are required.

func (ManagedAgentsFileResourceParams) MarshalJSON

func (r ManagedAgentsFileResourceParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsFileResourceParams) UnmarshalJSON

func (r *ManagedAgentsFileResourceParams) UnmarshalJSON(data []byte) error

type ManagedAgentsFileResourceParamsType

type ManagedAgentsFileResourceParamsType string
const (
	ManagedAgentsFileResourceParamsTypeFile ManagedAgentsFileResourceParamsType = "file"
)

type ManagedAgentsFileResourceType

type ManagedAgentsFileResourceType string
const (
	ManagedAgentsFileResourceTypeFile ManagedAgentsFileResourceType = "file"
)

type ManagedAgentsFileRubric

type ManagedAgentsFileRubric struct {
	// ID of the rubric file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileRubricType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FileID      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Rubric referenced by a file uploaded via the Files API.

func (ManagedAgentsFileRubric) RawJSON

func (r ManagedAgentsFileRubric) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsFileRubric) UnmarshalJSON

func (r *ManagedAgentsFileRubric) UnmarshalJSON(data []byte) error

type ManagedAgentsFileRubricParams

type ManagedAgentsFileRubricParams struct {
	// ID of the rubric file.
	FileID string `json:"file_id" api:"required"`
	// Any of "file".
	Type ManagedAgentsFileRubricParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Rubric referenced by a file uploaded via the Files API.

The properties FileID, Type are required.

func (ManagedAgentsFileRubricParams) MarshalJSON

func (r ManagedAgentsFileRubricParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsFileRubricParams) UnmarshalJSON

func (r *ManagedAgentsFileRubricParams) UnmarshalJSON(data []byte) error

type ManagedAgentsFileRubricParamsType

type ManagedAgentsFileRubricParamsType string
const (
	ManagedAgentsFileRubricParamsTypeFile ManagedAgentsFileRubricParamsType = "file"
)

type ManagedAgentsFileRubricType

type ManagedAgentsFileRubricType string
const (
	ManagedAgentsFileRubricTypeFile ManagedAgentsFileRubricType = "file"
)

type ManagedAgentsGitHubRepositoryResource

type ManagedAgentsGitHubRepositoryResource struct {
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	MountPath string    `json:"mount_path" api:"required"`
	// Any of "github_repository".
	Type ManagedAgentsGitHubRepositoryResourceType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time                                          `json:"updated_at" api:"required" format:"date-time"`
	URL       string                                             `json:"url" api:"required"`
	Checkout  ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:"checkout" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		MountPath   respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		URL         respjson.Field
		Checkout    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsGitHubRepositoryResource) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsGitHubRepositoryResource) UnmarshalJSON

func (r *ManagedAgentsGitHubRepositoryResource) UnmarshalJSON(data []byte) error

type ManagedAgentsGitHubRepositoryResourceCheckoutUnion

type ManagedAgentsGitHubRepositoryResourceCheckoutUnion struct {
	// This field is from variant [ManagedAgentsBranchCheckout].
	Name string `json:"name"`
	// Any of "branch", "commit".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsCommitCheckout].
	Sha  string `json:"sha"`
	JSON struct {
		Name respjson.Field
		Type respjson.Field
		Sha  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsGitHubRepositoryResourceCheckoutUnion contains all possible properties and values from ManagedAgentsBranchCheckout, ManagedAgentsCommitCheckout.

Use the ManagedAgentsGitHubRepositoryResourceCheckoutUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsAny

func (u ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsAny() anyManagedAgentsGitHubRepositoryResourceCheckout

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsGitHubRepositoryResourceCheckoutUnion.AsAny().(type) {
case qoder.ManagedAgentsBranchCheckout:
case qoder.ManagedAgentsCommitCheckout:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsBranch

func (ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsCommit

func (ManagedAgentsGitHubRepositoryResourceCheckoutUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsGitHubRepositoryResourceCheckoutUnion) UnmarshalJSON

type ManagedAgentsGitHubRepositoryResourceConfig

type ManagedAgentsGitHubRepositoryResourceConfig struct {
	// Any of "github_repository".
	Type ManagedAgentsGitHubRepositoryResourceConfigType `json:"type" api:"required"`
	// Github URL of the repository
	URL string `json:"url" api:"required"`
	// Branch or commit to check out. Defaults to the repository's default branch.
	Checkout ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion `json:"checkout" api:"nullable"`
	// Mount path in the container. Defaults to `/workspace/<repo-name>`.
	MountPath string `json:"mount_path" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		Checkout    respjson.Field
		MountPath   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A GitHub repository mounted into each session's container. The authorization token is write-only and never returned.

func (ManagedAgentsGitHubRepositoryResourceConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsGitHubRepositoryResourceConfig) UnmarshalJSON

func (r *ManagedAgentsGitHubRepositoryResourceConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion

type ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion struct {
	// This field is from variant [ManagedAgentsBranchCheckout].
	Name string `json:"name"`
	// Any of "branch", "commit".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsCommitCheckout].
	Sha  string `json:"sha"`
	JSON struct {
		Name respjson.Field
		Type respjson.Field
		Sha  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion contains all possible properties and values from ManagedAgentsBranchCheckout, ManagedAgentsCommitCheckout.

Use the ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsAny

func (u ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsAny() anyManagedAgentsGitHubRepositoryResourceConfigCheckout

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion.AsAny().(type) {
case qoder.ManagedAgentsBranchCheckout:
case qoder.ManagedAgentsCommitCheckout:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsBranch

func (ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsCommit

func (ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) UnmarshalJSON

type ManagedAgentsGitHubRepositoryResourceConfigType

type ManagedAgentsGitHubRepositoryResourceConfigType string
const (
	ManagedAgentsGitHubRepositoryResourceConfigTypeGitHubRepository ManagedAgentsGitHubRepositoryResourceConfigType = "github_repository"
)

type ManagedAgentsGitHubRepositoryResourceParams

type ManagedAgentsGitHubRepositoryResourceParams struct {
	// GitHub authorization token used to clone the repository.
	AuthorizationToken string `json:"authorization_token" api:"required"`
	// Any of "github_repository".
	Type ManagedAgentsGitHubRepositoryResourceParamsType `json:"type,omitzero" api:"required"`
	// Github URL of the repository
	URL string `json:"url" api:"required"`
	// Mount path in the container. Defaults to `/workspace/<repo-name>`.
	MountPath param.Opt[string] `json:"mount_path,omitzero"`
	// Branch or commit to check out. Defaults to the repository's default branch.
	Checkout ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion `json:"checkout,omitzero"`
	// contains filtered or unexported fields
}

Mount a GitHub repository into the session's container.

The properties AuthorizationToken, Type, URL are required.

func (ManagedAgentsGitHubRepositoryResourceParams) MarshalJSON

func (r ManagedAgentsGitHubRepositoryResourceParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsGitHubRepositoryResourceParams) UnmarshalJSON

func (r *ManagedAgentsGitHubRepositoryResourceParams) UnmarshalJSON(data []byte) error

type ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion

type ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion struct {
	OfBranch *ManagedAgentsBranchCheckoutParam `json:",omitzero,inline"`
	OfCommit *ManagedAgentsCommitCheckoutParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) GetName

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) GetSha

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) MarshalJSON

func (*ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) UnmarshalJSON

type ManagedAgentsGitHubRepositoryResourceParamsType

type ManagedAgentsGitHubRepositoryResourceParamsType string
const (
	ManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository ManagedAgentsGitHubRepositoryResourceParamsType = "github_repository"
)

type ManagedAgentsGitHubRepositoryResourceType

type ManagedAgentsGitHubRepositoryResourceType string
const (
	ManagedAgentsGitHubRepositoryResourceTypeGitHubRepository ManagedAgentsGitHubRepositoryResourceType = "github_repository"
)

type ManagedAgentsGlobToolConfig

type ManagedAgentsGlobToolConfig struct {
	Enabled bool          `json:"enabled" api:"required"`
	Name    constant.Glob `json:"name" default:"glob"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsGlobToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.Glob                                    `json:"type" default:"glob"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the glob tool.

func (ManagedAgentsGlobToolConfig) RawJSON

func (r ManagedAgentsGlobToolConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsGlobToolConfig) UnmarshalJSON

func (r *ManagedAgentsGlobToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsGlobToolConfigParams

type ManagedAgentsGlobToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Any of "glob".
	Type ManagedAgentsGlobToolConfigParamsType `json:"type,omitzero"`
	// Must be "glob".
	//
	// This field can be elided, and will marshal its zero value as "glob".
	Name constant.Glob `json:"name" default:"glob"`
	// contains filtered or unexported fields
}

Configuration override for the glob tool.

The property Name is required.

func (ManagedAgentsGlobToolConfigParams) MarshalJSON

func (r ManagedAgentsGlobToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsGlobToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsGlobToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion

type ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsGlobToolConfigParamsType

type ManagedAgentsGlobToolConfigParamsType string
const (
	ManagedAgentsGlobToolConfigParamsTypeGlob ManagedAgentsGlobToolConfigParamsType = "glob"
)

type ManagedAgentsGlobToolConfigPermissionPolicyUnion

type ManagedAgentsGlobToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsGlobToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsGlobToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsGlobToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsGlobToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsGlobToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsGlobToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsGrepToolConfig

type ManagedAgentsGrepToolConfig struct {
	Enabled bool          `json:"enabled" api:"required"`
	Name    constant.Grep `json:"name" default:"grep"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsGrepToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.Grep                                    `json:"type" default:"grep"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the grep tool.

func (ManagedAgentsGrepToolConfig) RawJSON

func (r ManagedAgentsGrepToolConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsGrepToolConfig) UnmarshalJSON

func (r *ManagedAgentsGrepToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsGrepToolConfigParams

type ManagedAgentsGrepToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Any of "grep".
	Type ManagedAgentsGrepToolConfigParamsType `json:"type,omitzero"`
	// Must be "grep".
	//
	// This field can be elided, and will marshal its zero value as "grep".
	Name constant.Grep `json:"name" default:"grep"`
	// contains filtered or unexported fields
}

Configuration override for the grep tool.

The property Name is required.

func (ManagedAgentsGrepToolConfigParams) MarshalJSON

func (r ManagedAgentsGrepToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsGrepToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsGrepToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion

type ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsGrepToolConfigParamsType

type ManagedAgentsGrepToolConfigParamsType string
const (
	ManagedAgentsGrepToolConfigParamsTypeGrep ManagedAgentsGrepToolConfigParamsType = "grep"
)

type ManagedAgentsGrepToolConfigPermissionPolicyUnion

type ManagedAgentsGrepToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsGrepToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsGrepToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsGrepToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsGrepToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsGrepToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsGrepToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsImageBlock

type ManagedAgentsImageBlock struct {
	// Union type for image source variants.
	Source ManagedAgentsImageBlockSourceUnion `json:"source" api:"required"`
	// Any of "image".
	Type ManagedAgentsImageBlockType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Source      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Image content specified directly as base64 data or as a reference via a URL.

func (ManagedAgentsImageBlock) RawJSON

func (r ManagedAgentsImageBlock) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsImageBlock) ToParam

ToParam converts this ManagedAgentsImageBlock to a ManagedAgentsImageBlockParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsImageBlockParam.Overrides()

func (*ManagedAgentsImageBlock) UnmarshalJSON

func (r *ManagedAgentsImageBlock) UnmarshalJSON(data []byte) error

type ManagedAgentsImageBlockParam

type ManagedAgentsImageBlockParam struct {
	// Union type for image source variants.
	Source ManagedAgentsImageBlockSourceUnionParam `json:"source,omitzero" api:"required"`
	// Any of "image".
	Type ManagedAgentsImageBlockType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Image content specified directly as base64 data or as a reference via a URL.

The properties Source, Type are required.

func (ManagedAgentsImageBlockParam) MarshalJSON

func (r ManagedAgentsImageBlockParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsImageBlockParam) UnmarshalJSON

func (r *ManagedAgentsImageBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsImageBlockSourceUnion

type ManagedAgentsImageBlockSourceUnion struct {
	// This field is from variant [ManagedAgentsBase64ImageSource].
	Data string `json:"data"`
	// This field is from variant [ManagedAgentsBase64ImageSource].
	MediaType string `json:"media_type"`
	// Any of "base64", "url", "file".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsURLImageSource].
	URL string `json:"url"`
	// This field is from variant [ManagedAgentsFileImageSource].
	FileID string `json:"file_id"`
	JSON   struct {
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsImageBlockSourceUnion contains all possible properties and values from ManagedAgentsBase64ImageSource, ManagedAgentsURLImageSource, ManagedAgentsFileImageSource.

Use the ManagedAgentsImageBlockSourceUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsImageBlockSourceUnion) AsAny

func (u ManagedAgentsImageBlockSourceUnion) AsAny() anyManagedAgentsImageBlockSource

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsImageBlockSourceUnion.AsAny().(type) {
case qoder.ManagedAgentsBase64ImageSource:
case qoder.ManagedAgentsURLImageSource:
case qoder.ManagedAgentsFileImageSource:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsImageBlockSourceUnion) AsBase64

func (ManagedAgentsImageBlockSourceUnion) AsFile

func (ManagedAgentsImageBlockSourceUnion) AsURL

func (ManagedAgentsImageBlockSourceUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsImageBlockSourceUnion) UnmarshalJSON

func (r *ManagedAgentsImageBlockSourceUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsImageBlockSourceUnionParam

type ManagedAgentsImageBlockSourceUnionParam struct {
	OfBase64 *ManagedAgentsBase64ImageSourceParam `json:",omitzero,inline"`
	OfURL    *ManagedAgentsURLImageSourceParam    `json:",omitzero,inline"`
	OfFile   *ManagedAgentsFileImageSourceParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsImageBlockSourceUnionParam) GetData

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsImageBlockSourceUnionParam) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsImageBlockSourceUnionParam) GetMediaType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsImageBlockSourceUnionParam) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsImageBlockSourceUnionParam) GetURL

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsImageBlockSourceUnionParam) MarshalJSON

func (u ManagedAgentsImageBlockSourceUnionParam) MarshalJSON() ([]byte, error)

func (*ManagedAgentsImageBlockSourceUnionParam) UnmarshalJSON

func (u *ManagedAgentsImageBlockSourceUnionParam) UnmarshalJSON(data []byte) error

type ManagedAgentsImageBlockType

type ManagedAgentsImageBlockType string
const (
	ManagedAgentsImageBlockTypeImage ManagedAgentsImageBlockType = "image"
)

type ManagedAgentsInjectionLocationParams

type ManagedAgentsInjectionLocationParams struct {
	// Substitute when the placeholder appears in the request body.
	Body param.Opt[bool] `json:"body,omitzero"`
	// Substitute when the placeholder appears in a request header value.
	Header param.Opt[bool] `json:"header,omitzero"`
	// contains filtered or unexported fields
}

Where in the outbound request the secret value may be substituted.

func (ManagedAgentsInjectionLocationParams) MarshalJSON

func (r ManagedAgentsInjectionLocationParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsInjectionLocationParams) UnmarshalJSON

func (r *ManagedAgentsInjectionLocationParams) UnmarshalJSON(data []byte) error

type ManagedAgentsInjectionLocationResponse

type ManagedAgentsInjectionLocationResponse struct {
	// Whether the placeholder is substituted in the request body.
	Body bool `json:"body" api:"required"`
	// Whether the placeholder is substituted in request header values.
	Header bool `json:"header" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Body        respjson.Field
		Header      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Where in the outbound request the secret value is substituted.

func (ManagedAgentsInjectionLocationResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsInjectionLocationResponse) UnmarshalJSON

func (r *ManagedAgentsInjectionLocationResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsInjectionLocationUpdateParams

type ManagedAgentsInjectionLocationUpdateParams struct {
	// Substitute when the placeholder appears in the request body.
	Body param.Opt[bool] `json:"body,omitzero"`
	// Substitute when the placeholder appears in a request header value.
	Header param.Opt[bool] `json:"header,omitzero"`
	// contains filtered or unexported fields
}

Updated injection location.

func (ManagedAgentsInjectionLocationUpdateParams) MarshalJSON

func (r ManagedAgentsInjectionLocationUpdateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsInjectionLocationUpdateParams) UnmarshalJSON

func (r *ManagedAgentsInjectionLocationUpdateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsLimitedCredentialNetworkingParams

type ManagedAgentsLimitedCredentialNetworkingParams struct {
	// Hostnames on which the secret will be substituted. Each entry is a bare hostname
	// (`api.example.com`), an IPv4 address (`192.0.2.1`), or a `*.`-prefixed wildcard
	// (`*.example.com`). URLs, ports, paths, and IPv6 addresses are not accepted. At
	// most 16 entries.
	AllowedHosts []string `json:"allowed_hosts,omitzero" api:"required"`
	// Any of "limited".
	Type ManagedAgentsLimitedCredentialNetworkingParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Substitute the secret only on requests to the listed hosts.

The properties AllowedHosts, Type are required.

func (ManagedAgentsLimitedCredentialNetworkingParams) MarshalJSON

func (r ManagedAgentsLimitedCredentialNetworkingParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsLimitedCredentialNetworkingParams) UnmarshalJSON

type ManagedAgentsLimitedCredentialNetworkingParamsType

type ManagedAgentsLimitedCredentialNetworkingParamsType string
const (
	ManagedAgentsLimitedCredentialNetworkingParamsTypeLimited ManagedAgentsLimitedCredentialNetworkingParamsType = "limited"
)

type ManagedAgentsLimitedCredentialNetworkingResponse

type ManagedAgentsLimitedCredentialNetworkingResponse struct {
	// Hostnames on which the secret will be substituted. An entry matches the request
	// host exactly; a `*.`-prefixed entry matches any subdomain of the named domain
	// but not the domain itself.
	AllowedHosts []string `json:"allowed_hosts" api:"required"`
	// Any of "limited".
	Type ManagedAgentsLimitedCredentialNetworkingResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedHosts respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The secret is substituted only on requests to the listed hosts.

func (ManagedAgentsLimitedCredentialNetworkingResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsLimitedCredentialNetworkingResponse) UnmarshalJSON

type ManagedAgentsLimitedCredentialNetworkingResponseType

type ManagedAgentsLimitedCredentialNetworkingResponseType string
const (
	ManagedAgentsLimitedCredentialNetworkingResponseTypeLimited ManagedAgentsLimitedCredentialNetworkingResponseType = "limited"
)

type ManagedAgentsMCPAuthenticationFailedError

type ManagedAgentsMCPAuthenticationFailedError struct {
	// Name of the MCP server that failed authentication.
	MCPServerName string `json:"mcp_server_name" api:"required"`
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "mcp_authentication_failed_error".
	Type ManagedAgentsMCPAuthenticationFailedErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MCPServerName respjson.Field
		Message       respjson.Field
		RetryStatus   respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Authentication to an MCP server failed.

func (ManagedAgentsMCPAuthenticationFailedError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPAuthenticationFailedError) UnmarshalJSON

func (r *ManagedAgentsMCPAuthenticationFailedError) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion

type ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsAny

func (u ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsAny() anyManagedAgentsMCPAuthenticationFailedErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) UnmarshalJSON

type ManagedAgentsMCPAuthenticationFailedErrorType

type ManagedAgentsMCPAuthenticationFailedErrorType string
const (
	ManagedAgentsMCPAuthenticationFailedErrorTypeMCPAuthenticationFailedError ManagedAgentsMCPAuthenticationFailedErrorType = "mcp_authentication_failed_error"
)

type ManagedAgentsMCPConnectionFailedError

type ManagedAgentsMCPConnectionFailedError struct {
	// Name of the MCP server that failed to connect.
	MCPServerName string `json:"mcp_server_name" api:"required"`
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "mcp_connection_failed_error".
	Type ManagedAgentsMCPConnectionFailedErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MCPServerName respjson.Field
		Message       respjson.Field
		RetryStatus   respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Failed to connect to an MCP server.

func (ManagedAgentsMCPConnectionFailedError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPConnectionFailedError) UnmarshalJSON

func (r *ManagedAgentsMCPConnectionFailedError) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion

type ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsAny

func (u ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsAny() anyManagedAgentsMCPConnectionFailedErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) UnmarshalJSON

type ManagedAgentsMCPConnectionFailedErrorType

type ManagedAgentsMCPConnectionFailedErrorType string
const (
	ManagedAgentsMCPConnectionFailedErrorTypeMCPConnectionFailedError ManagedAgentsMCPConnectionFailedErrorType = "mcp_connection_failed_error"
)

type ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError

type ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError struct {
	// Any of "mcp_egress_blocked_error".
	Type ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An MCP server host used by the deployment's agent is blocked by the environment's network policy.

func (ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType

type ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorTypeMCPEgressBlockedError ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType = "mcp_egress_blocked_error"
)

type ManagedAgentsMCPEgressBlockedRunError

type ManagedAgentsMCPEgressBlockedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "mcp_egress_blocked_error".
	Type ManagedAgentsMCPEgressBlockedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An MCP server host used by the deployment's agent is blocked by the environment's network policy.

func (ManagedAgentsMCPEgressBlockedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPEgressBlockedRunError) UnmarshalJSON

func (r *ManagedAgentsMCPEgressBlockedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPEgressBlockedRunErrorType

type ManagedAgentsMCPEgressBlockedRunErrorType string
const (
	ManagedAgentsMCPEgressBlockedRunErrorTypeMCPEgressBlockedError ManagedAgentsMCPEgressBlockedRunErrorType = "mcp_egress_blocked_error"
)

type ManagedAgentsMCPOAuthAuthResponse

type ManagedAgentsMCPOAuthAuthResponse struct {
	// URL of the MCP server this credential authenticates against.
	MCPServerURL string `json:"mcp_server_url" api:"required"`
	// Any of "mcp_oauth".
	Type ManagedAgentsMCPOAuthAuthResponseType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	ExpiresAt time.Time `json:"expires_at" api:"nullable" format:"date-time"`
	// OAuth refresh token configuration returned in credential responses.
	Refresh ManagedAgentsMCPOAuthRefreshResponse `json:"refresh" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MCPServerURL respjson.Field
		Type         respjson.Field
		ExpiresAt    respjson.Field
		Refresh      respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth credential details for an MCP server.

func (ManagedAgentsMCPOAuthAuthResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPOAuthAuthResponse) UnmarshalJSON

func (r *ManagedAgentsMCPOAuthAuthResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPOAuthAuthResponseType

type ManagedAgentsMCPOAuthAuthResponseType string
const (
	ManagedAgentsMCPOAuthAuthResponseTypeMCPOAuth ManagedAgentsMCPOAuthAuthResponseType = "mcp_oauth"
)

type ManagedAgentsMCPOAuthCreateParams

type ManagedAgentsMCPOAuthCreateParams struct {
	// OAuth access token.
	AccessToken string `json:"access_token" api:"required"`
	// URL of the MCP server this credential authenticates against.
	MCPServerURL string `json:"mcp_server_url" api:"required"`
	// Any of "mcp_oauth".
	Type ManagedAgentsMCPOAuthCreateParamsType `json:"type,omitzero" api:"required"`
	// A timestamp in RFC 3339 format
	ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
	// OAuth refresh token parameters for creating a credential with refresh support.
	Refresh ManagedAgentsMCPOAuthRefreshParams `json:"refresh,omitzero"`
	// contains filtered or unexported fields
}

Parameters for creating an MCP OAuth credential.

The properties AccessToken, MCPServerURL, Type are required.

func (ManagedAgentsMCPOAuthCreateParams) MarshalJSON

func (r ManagedAgentsMCPOAuthCreateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPOAuthCreateParams) UnmarshalJSON

func (r *ManagedAgentsMCPOAuthCreateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPOAuthCreateParamsType

type ManagedAgentsMCPOAuthCreateParamsType string
const (
	ManagedAgentsMCPOAuthCreateParamsTypeMCPOAuth ManagedAgentsMCPOAuthCreateParamsType = "mcp_oauth"
)

type ManagedAgentsMCPOAuthRefreshParams

type ManagedAgentsMCPOAuthRefreshParams struct {
	// OAuth client ID.
	ClientID string `json:"client_id" api:"required"`
	// OAuth refresh token.
	RefreshToken string `json:"refresh_token" api:"required"`
	// Token endpoint URL used to refresh the access token.
	TokenEndpoint string `json:"token_endpoint" api:"required"`
	// Token endpoint requires no client authentication.
	TokenEndpointAuth ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion `json:"token_endpoint_auth,omitzero" api:"required"`
	// OAuth resource indicator.
	Resource param.Opt[string] `json:"resource,omitzero"`
	// OAuth scope for the refresh request.
	Scope param.Opt[string] `json:"scope,omitzero"`
	// contains filtered or unexported fields
}

OAuth refresh token parameters for creating a credential with refresh support.

The properties ClientID, RefreshToken, TokenEndpoint, TokenEndpointAuth are required.

func (ManagedAgentsMCPOAuthRefreshParams) MarshalJSON

func (r ManagedAgentsMCPOAuthRefreshParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPOAuthRefreshParams) UnmarshalJSON

func (r *ManagedAgentsMCPOAuthRefreshParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion

type ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion struct {
	OfNone              *ManagedAgentsTokenEndpointAuthNoneParam  `json:",omitzero,inline"`
	OfClientSecretBasic *ManagedAgentsTokenEndpointAuthBasicParam `json:",omitzero,inline"`
	OfClientSecretPost  *ManagedAgentsTokenEndpointAuthPostParam  `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) GetClientSecret

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) MarshalJSON

func (*ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) UnmarshalJSON

type ManagedAgentsMCPOAuthRefreshResponse

type ManagedAgentsMCPOAuthRefreshResponse struct {
	// OAuth client ID.
	ClientID string `json:"client_id" api:"required"`
	// Token endpoint URL used to refresh the access token.
	TokenEndpoint string `json:"token_endpoint" api:"required"`
	// Token endpoint requires no client authentication.
	TokenEndpointAuth ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion `json:"token_endpoint_auth" api:"required"`
	// OAuth resource indicator.
	Resource string `json:"resource" api:"nullable"`
	// OAuth scope for the refresh request.
	Scope string `json:"scope" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClientID          respjson.Field
		TokenEndpoint     respjson.Field
		TokenEndpointAuth respjson.Field
		Resource          respjson.Field
		Scope             respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OAuth refresh token configuration returned in credential responses.

func (ManagedAgentsMCPOAuthRefreshResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPOAuthRefreshResponse) UnmarshalJSON

func (r *ManagedAgentsMCPOAuthRefreshResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion

type ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion struct {
	// Any of "none", "client_secret_basic", "client_secret_post".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion contains all possible properties and values from ManagedAgentsTokenEndpointAuthNoneResponse, ManagedAgentsTokenEndpointAuthBasicResponse, ManagedAgentsTokenEndpointAuthPostResponse.

Use the ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsAny

func (u ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsAny() anyManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuth

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion.AsAny().(type) {
case qoder.ManagedAgentsTokenEndpointAuthNoneResponse:
case qoder.ManagedAgentsTokenEndpointAuthBasicResponse:
case qoder.ManagedAgentsTokenEndpointAuthPostResponse:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsClientSecretBasic

func (ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsClientSecretPost

func (ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsNone

func (ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) UnmarshalJSON

type ManagedAgentsMCPOAuthRefreshUpdateParams

type ManagedAgentsMCPOAuthRefreshUpdateParams struct {
	// Updated OAuth refresh token.
	RefreshToken param.Opt[string] `json:"refresh_token,omitzero"`
	// Updated OAuth scope for the refresh request.
	Scope param.Opt[string] `json:"scope,omitzero"`
	// Updated HTTP Basic authentication parameters for the token endpoint.
	TokenEndpointAuth ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion `json:"token_endpoint_auth,omitzero"`
	// contains filtered or unexported fields
}

Parameters for updating OAuth refresh token configuration.

func (ManagedAgentsMCPOAuthRefreshUpdateParams) MarshalJSON

func (r ManagedAgentsMCPOAuthRefreshUpdateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPOAuthRefreshUpdateParams) UnmarshalJSON

func (r *ManagedAgentsMCPOAuthRefreshUpdateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion

type ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion struct {
	OfClientSecretBasic *ManagedAgentsTokenEndpointAuthBasicUpdateParam `json:",omitzero,inline"`
	OfClientSecretPost  *ManagedAgentsTokenEndpointAuthPostUpdateParam  `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) GetClientSecret

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) MarshalJSON

func (*ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) UnmarshalJSON

type ManagedAgentsMCPOAuthUpdateParams

type ManagedAgentsMCPOAuthUpdateParams struct {
	// Any of "mcp_oauth".
	Type ManagedAgentsMCPOAuthUpdateParamsType `json:"type,omitzero" api:"required"`
	// Updated OAuth access token.
	AccessToken param.Opt[string] `json:"access_token,omitzero"`
	// A timestamp in RFC 3339 format
	ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
	// Parameters for updating OAuth refresh token configuration.
	Refresh ManagedAgentsMCPOAuthRefreshUpdateParams `json:"refresh,omitzero"`
	// contains filtered or unexported fields
}

Parameters for updating an MCP OAuth credential. The `mcp_server_url` is immutable.

The property Type is required.

func (ManagedAgentsMCPOAuthUpdateParams) MarshalJSON

func (r ManagedAgentsMCPOAuthUpdateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPOAuthUpdateParams) UnmarshalJSON

func (r *ManagedAgentsMCPOAuthUpdateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPOAuthUpdateParamsType

type ManagedAgentsMCPOAuthUpdateParamsType string
const (
	ManagedAgentsMCPOAuthUpdateParamsTypeMCPOAuth ManagedAgentsMCPOAuthUpdateParamsType = "mcp_oauth"
)

type ManagedAgentsMCPProbe

type ManagedAgentsMCPProbe struct {
	// An HTTP response captured during a credential validation probe.
	HTTPResponse ManagedAgentsRefreshHTTPResponse `json:"http_response" api:"required"`
	// The MCP method that failed (for example `initialize` or `tools/list`).
	Method string `json:"method" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HTTPResponse respjson.Field
		Method       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The failing step of an MCP validation probe.

func (ManagedAgentsMCPProbe) RawJSON

func (r ManagedAgentsMCPProbe) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPProbe) UnmarshalJSON

func (r *ManagedAgentsMCPProbe) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPServerURLDefinition

type ManagedAgentsMCPServerURLDefinition struct {
	Name string `json:"name" api:"required"`
	// Any of "url".
	Type ManagedAgentsMCPServerURLDefinitionType `json:"type" api:"required"`
	URL  string                                  `json:"url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

URL-based MCP server connection as returned in API responses.

func (ManagedAgentsMCPServerURLDefinition) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPServerURLDefinition) UnmarshalJSON

func (r *ManagedAgentsMCPServerURLDefinition) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPServerURLDefinitionType

type ManagedAgentsMCPServerURLDefinitionType string
const (
	ManagedAgentsMCPServerURLDefinitionTypeURL ManagedAgentsMCPServerURLDefinitionType = "url"
)

type ManagedAgentsMCPToolConfig

type ManagedAgentsMCPToolConfig struct {
	Enabled bool   `json:"enabled" api:"required"`
	Name    string `json:"name" api:"required"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsMCPToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved configuration for a specific MCP tool.

func (ManagedAgentsMCPToolConfig) RawJSON

func (r ManagedAgentsMCPToolConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPToolConfig) UnmarshalJSON

func (r *ManagedAgentsMCPToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPToolConfigParams

type ManagedAgentsMCPToolConfigParams struct {
	// Name of the MCP tool to configure. 1-128 characters.
	Name string `json:"name" api:"required"`
	// Whether this tool is enabled. Overrides the `default_config` setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// contains filtered or unexported fields
}

Configuration override for a specific MCP tool.

The property Name is required.

func (ManagedAgentsMCPToolConfigParams) MarshalJSON

func (r ManagedAgentsMCPToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsMCPToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion

type ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsMCPToolConfigPermissionPolicyUnion

type ManagedAgentsMCPToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMCPToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsMCPToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsMCPToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMCPToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMCPToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsMCPToolset

type ManagedAgentsMCPToolset struct {
	Configs []ManagedAgentsMCPToolConfig `json:"configs" api:"required"`
	// Resolved default configuration for all tools from an MCP server.
	DefaultConfig ManagedAgentsMCPToolsetDefaultConfig `json:"default_config" api:"required"`
	MCPServerName string                               `json:"mcp_server_name" api:"required"`
	// Any of "mcp_toolset".
	Type ManagedAgentsMCPToolsetType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Configs       respjson.Field
		DefaultConfig respjson.Field
		MCPServerName respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ManagedAgentsMCPToolset) RawJSON

func (r ManagedAgentsMCPToolset) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPToolset) UnmarshalJSON

func (r *ManagedAgentsMCPToolset) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPToolsetDefaultConfig

type ManagedAgentsMCPToolsetDefaultConfig struct {
	Enabled bool `json:"enabled" api:"required"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		PermissionPolicy respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved default configuration for all tools from an MCP server.

func (ManagedAgentsMCPToolsetDefaultConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPToolsetDefaultConfig) UnmarshalJSON

func (r *ManagedAgentsMCPToolsetDefaultConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPToolsetDefaultConfigParams

type ManagedAgentsMCPToolsetDefaultConfigParams struct {
	// Whether tools are enabled by default. Defaults to true if not specified.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// contains filtered or unexported fields
}

Default configuration for all tools from an MCP server.

func (ManagedAgentsMCPToolsetDefaultConfigParams) MarshalJSON

func (r ManagedAgentsMCPToolsetDefaultConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPToolsetDefaultConfigParams) UnmarshalJSON

func (r *ManagedAgentsMCPToolsetDefaultConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion

type ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion

type ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAny() anyManagedAgentsMCPToolsetDefaultConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsMCPToolsetParams

type ManagedAgentsMCPToolsetParams struct {
	// Name of the MCP server. Must match a server name from the mcp_servers array.
	// 1-255 characters.
	MCPServerName string `json:"mcp_server_name" api:"required"`
	// Any of "mcp_toolset".
	Type ManagedAgentsMCPToolsetParamsType `json:"type,omitzero" api:"required"`
	// Per-tool configuration overrides.
	Configs []ManagedAgentsMCPToolConfigParams `json:"configs,omitzero"`
	// Default configuration for all tools from an MCP server.
	DefaultConfig ManagedAgentsMCPToolsetDefaultConfigParams `json:"default_config,omitzero"`
	// contains filtered or unexported fields
}

Configuration for tools from an MCP server defined in `mcp_servers`.

The properties MCPServerName, Type are required.

func (ManagedAgentsMCPToolsetParams) MarshalJSON

func (r ManagedAgentsMCPToolsetParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMCPToolsetParams) UnmarshalJSON

func (r *ManagedAgentsMCPToolsetParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMCPToolsetParamsType

type ManagedAgentsMCPToolsetParamsType string
const (
	ManagedAgentsMCPToolsetParamsTypeMCPToolset ManagedAgentsMCPToolsetParamsType = "mcp_toolset"
)

type ManagedAgentsMCPToolsetType

type ManagedAgentsMCPToolsetType string
const (
	ManagedAgentsMCPToolsetTypeMCPToolset ManagedAgentsMCPToolsetType = "mcp_toolset"
)

type ManagedAgentsManualDeploymentPausedReason

type ManagedAgentsManualDeploymentPausedReason struct {
	// Any of "manual".
	Type ManagedAgentsManualDeploymentPausedReasonType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The caller invoked the pause endpoint on the deployment.

func (ManagedAgentsManualDeploymentPausedReason) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsManualDeploymentPausedReason) UnmarshalJSON

func (r *ManagedAgentsManualDeploymentPausedReason) UnmarshalJSON(data []byte) error

type ManagedAgentsManualDeploymentPausedReasonType

type ManagedAgentsManualDeploymentPausedReasonType string
const (
	ManagedAgentsManualDeploymentPausedReasonTypeManual ManagedAgentsManualDeploymentPausedReasonType = "manual"
)

type ManagedAgentsManualTriggerContext

type ManagedAgentsManualTriggerContext struct {
	// Any of "manual".
	Type ManagedAgentsManualTriggerContextType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The run was started manually by creating a session directly against the deployment.

func (ManagedAgentsManualTriggerContext) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsManualTriggerContext) UnmarshalJSON

func (r *ManagedAgentsManualTriggerContext) UnmarshalJSON(data []byte) error

type ManagedAgentsManualTriggerContextType

type ManagedAgentsManualTriggerContextType string
const (
	ManagedAgentsManualTriggerContextTypeManual ManagedAgentsManualTriggerContextType = "manual"
)

type ManagedAgentsMemory

type ManagedAgentsMemory struct {
	Metadata map[string]string `json:"metadata"`

	// Unique identifier for this memory (a `mem_...` value). Stable across renames;
	// use this ID, not the path, to read, update, or delete the memory.
	ID string `json:"id" api:"required"`
	// Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The
	// server applies no normalization, so clients can compute the same hash locally
	// for staleness checks and as the value for a `content_sha256` precondition on
	// update. Always populated, regardless of `view`.
	ContentSha256 string `json:"content_sha256" api:"required"`
	// Size of `content` in bytes (the UTF-8 plaintext length). Always populated,
	// regardless of `view`.
	ContentSizeBytes int64 `json:"content_size_bytes" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// ID of the memory store this memory belongs to (a `memstore_...` value).
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// ID of the `memory_version` representing this memory's current content (a
	// `memver_...` value). This is the authoritative head pointer; `memory_version`
	// objects do not carry an `is_latest` flag, so compare against this field instead.
	// Enumerate the history via
	// [List memory versions](/en/api/beta/memory_stores/memory_versions/list).
	MemoryVersionID string `json:"memory_version_id" api:"required"`
	// Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`.
	// Always starts with `/`. Paths are case-sensitive and unique within a store.
	// Maximum 1,024 bytes.
	Path string `json:"path" api:"required"`
	// Any of "memory".
	Type ManagedAgentsMemoryType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// The memory's UTF-8 text content. Populated when `view=full`; `null` when
	// `view=basic`. Maximum 100 kB (102,400 bytes).
	Content string `json:"content" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Metadata respjson.Field

		ID               respjson.Field
		ContentSha256    respjson.Field
		ContentSizeBytes respjson.Field
		CreatedAt        respjson.Field
		MemoryStoreID    respjson.Field
		MemoryVersionID  respjson.Field
		Path             respjson.Field
		Type             respjson.Field
		UpdatedAt        respjson.Field
		Content          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.

func (ManagedAgentsMemory) RawJSON

func (r ManagedAgentsMemory) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemory) UnmarshalJSON

func (r *ManagedAgentsMemory) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryListItemUnion

type ManagedAgentsMemoryListItemUnion struct {
	// This field is from variant [ManagedAgentsMemory].
	ID string `json:"id"`
	// This field is from variant [ManagedAgentsMemory].
	ContentSha256 string `json:"content_sha256"`
	// This field is from variant [ManagedAgentsMemory].
	ContentSizeBytes int64 `json:"content_size_bytes"`
	// This field is from variant [ManagedAgentsMemory].
	CreatedAt time.Time `json:"created_at"`
	// This field is from variant [ManagedAgentsMemory].
	MemoryStoreID string `json:"memory_store_id"`
	// This field is from variant [ManagedAgentsMemory].
	MemoryVersionID string `json:"memory_version_id"`
	Path            string `json:"path"`
	// Any of "memory", "memory_prefix".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsMemory].
	UpdatedAt time.Time `json:"updated_at"`
	// This field is from variant [ManagedAgentsMemory].
	Content string `json:"content"`
	JSON    struct {
		ID               respjson.Field
		ContentSha256    respjson.Field
		ContentSizeBytes respjson.Field
		CreatedAt        respjson.Field
		MemoryStoreID    respjson.Field
		MemoryVersionID  respjson.Field
		Path             respjson.Field
		Type             respjson.Field
		UpdatedAt        respjson.Field
		Content          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMemoryListItemUnion contains all possible properties and values from ManagedAgentsMemory, ManagedAgentsMemoryPrefix.

Use the ManagedAgentsMemoryListItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMemoryListItemUnion) AsAny

func (u ManagedAgentsMemoryListItemUnion) AsAny() anyManagedAgentsMemoryListItem

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMemoryListItemUnion.AsAny().(type) {
case qoder.ManagedAgentsMemory:
case qoder.ManagedAgentsMemoryPrefix:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMemoryListItemUnion) AsMemory

func (ManagedAgentsMemoryListItemUnion) AsMemoryPrefix

func (ManagedAgentsMemoryListItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryListItemUnion) UnmarshalJSON

func (r *ManagedAgentsMemoryListItemUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryPrefix

type ManagedAgentsMemoryPrefix struct {
	// The rolled-up path prefix, including a trailing `/` (e.g. `/projects/foo/`).
	// Pass this value as `path_prefix` on a subsequent list call to drill into the
	// directory.
	Path string `json:"path" api:"required"`
	// Any of "memory_prefix".
	Type ManagedAgentsMemoryPrefixType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Path        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A rolled-up directory marker returned by [List memories](/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.

func (ManagedAgentsMemoryPrefix) RawJSON

func (r ManagedAgentsMemoryPrefix) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryPrefix) UnmarshalJSON

func (r *ManagedAgentsMemoryPrefix) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryPrefixType

type ManagedAgentsMemoryPrefixType string
const (
	ManagedAgentsMemoryPrefixTypeMemoryPrefix ManagedAgentsMemoryPrefixType = "memory_prefix"
)

type ManagedAgentsMemoryStore

type ManagedAgentsMemoryStore struct {
	// Unique identifier for the memory store (a `memstore_...` tagged ID). Use this
	// when attaching the store to a session, or in the `{memory_store_id}` path
	// parameter of subsequent calls.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Human-readable name for the store. 1–255 characters. The store's mount-path slug
	// under `/mnt/memory/` is derived from this name.
	Name string `json:"name" api:"required"`
	// Any of "memory_store".
	Type ManagedAgentsMemoryStoreType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"nullable" format:"date-time"`
	// Free-text description of what the store contains, up to 1024 characters.
	// Included in the agent's system prompt when the store is attached, so word it to
	// be useful to the agent. Empty string when unset.
	Description string `json:"description"`
	// Arbitrary key-value tags for your own bookkeeping (such as the end user a store
	// belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.
	// Returned on retrieve/list but not filterable.
	Metadata map[string]string `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ArchivedAt  respjson.Field
		Description respjson.Field
		Metadata    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A `memory_store`: a named container for agent memories, scoped to a workspace. Attach a store to a session via `resources[]` to mount it as a directory the agent can read and write.

func (ManagedAgentsMemoryStore) RawJSON

func (r ManagedAgentsMemoryStore) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryStore) UnmarshalJSON

func (r *ManagedAgentsMemoryStore) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError

type ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError struct {
	// Any of "memory_store_archived_error".
	Type ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A memory store referenced by the deployment is archived.

func (ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType

type ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorTypeMemoryStoreArchivedError ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType = "memory_store_archived_error"
)

type ManagedAgentsMemoryStoreArchivedRunError

type ManagedAgentsMemoryStoreArchivedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "memory_store_archived_error".
	Type ManagedAgentsMemoryStoreArchivedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A memory store referenced by the deployment is archived.

func (ManagedAgentsMemoryStoreArchivedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryStoreArchivedRunError) UnmarshalJSON

func (r *ManagedAgentsMemoryStoreArchivedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryStoreArchivedRunErrorType

type ManagedAgentsMemoryStoreArchivedRunErrorType string
const (
	ManagedAgentsMemoryStoreArchivedRunErrorTypeMemoryStoreArchivedError ManagedAgentsMemoryStoreArchivedRunErrorType = "memory_store_archived_error"
)

type ManagedAgentsMemoryStoreResource

type ManagedAgentsMemoryStoreResource struct {
	// The memory store ID (memstore\_...). Must belong to the caller's organization
	// and workspace.
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "memory_store".
	Type ManagedAgentsMemoryStoreResourceType `json:"type" api:"required"`
	// Access mode for an attached memory store.
	//
	// Any of "read_write", "read_only".
	Access ManagedAgentsMemoryStoreResourceAccess `json:"access" api:"nullable"`
	// Description of the memory store, snapshotted at attach time. Rendered into the
	// agent's system prompt. Empty string when the store has no description.
	Description string `json:"description"`
	// Per-attachment guidance for the agent on how to use this store. Rendered into
	// the memory section of the system prompt. Max 4096 chars.
	Instructions string `json:"instructions" api:"nullable"`
	// Filesystem path where the store is mounted in the session container, e.g.
	// /mnt/memory/user-preferences. Derived from the store's name. Output-only.
	MountPath string `json:"mount_path" api:"nullable"`
	// Display name of the memory store, snapshotted at attach time. Later edits to the
	// store's name do not propagate to this resource.
	Name string `json:"name" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MemoryStoreID respjson.Field
		Type          respjson.Field
		Access        respjson.Field
		Description   respjson.Field
		Instructions  respjson.Field
		MountPath     respjson.Field
		Name          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A memory store attached to an agent session.

func (ManagedAgentsMemoryStoreResource) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryStoreResource) UnmarshalJSON

func (r *ManagedAgentsMemoryStoreResource) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryStoreResourceAccess

type ManagedAgentsMemoryStoreResourceAccess string

Access mode for an attached memory store.

const (
	ManagedAgentsMemoryStoreResourceAccessReadWrite ManagedAgentsMemoryStoreResourceAccess = "read_write"
	ManagedAgentsMemoryStoreResourceAccessReadOnly  ManagedAgentsMemoryStoreResourceAccess = "read_only"
)

type ManagedAgentsMemoryStoreResourceConfig

type ManagedAgentsMemoryStoreResourceConfig struct {
	// The memory store ID (memstore\_...). Must belong to the caller's organization
	// and workspace.
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "memory_store".
	Type ManagedAgentsMemoryStoreResourceConfigType `json:"type" api:"required"`
	// Access mode for an attached memory store.
	//
	// Any of "read_write", "read_only".
	Access ManagedAgentsMemoryStoreResourceConfigAccess `json:"access" api:"nullable"`
	// Per-attachment guidance for the agent on how to use this store. Rendered into
	// the memory section of the system prompt. Max 4096 chars.
	Instructions string `json:"instructions" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MemoryStoreID respjson.Field
		Type          respjson.Field
		Access        respjson.Field
		Instructions  respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A memory store attached to each session created from this deployment.

func (ManagedAgentsMemoryStoreResourceConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryStoreResourceConfig) UnmarshalJSON

func (r *ManagedAgentsMemoryStoreResourceConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryStoreResourceConfigAccess

type ManagedAgentsMemoryStoreResourceConfigAccess string

Access mode for an attached memory store.

const (
	ManagedAgentsMemoryStoreResourceConfigAccessReadWrite ManagedAgentsMemoryStoreResourceConfigAccess = "read_write"
	ManagedAgentsMemoryStoreResourceConfigAccessReadOnly  ManagedAgentsMemoryStoreResourceConfigAccess = "read_only"
)

type ManagedAgentsMemoryStoreResourceConfigType

type ManagedAgentsMemoryStoreResourceConfigType string
const (
	ManagedAgentsMemoryStoreResourceConfigTypeMemoryStore ManagedAgentsMemoryStoreResourceConfigType = "memory_store"
)

type ManagedAgentsMemoryStoreResourceParam

type ManagedAgentsMemoryStoreResourceParam struct {
	// The memory store ID (memstore\_...). Must belong to the caller's organization
	// and workspace.
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "memory_store".
	Type ManagedAgentsMemoryStoreResourceParamType `json:"type,omitzero" api:"required"`
	// Per-attachment guidance for the agent on how to use this store. Rendered into
	// the memory section of the system prompt. Max 4096 chars.
	Instructions param.Opt[string] `json:"instructions,omitzero"`
	// Access mode for an attached memory store.
	//
	// Any of "read_write", "read_only".
	Access ManagedAgentsMemoryStoreResourceParamAccess `json:"access,omitzero"`
	// contains filtered or unexported fields
}

Parameters for attaching a memory store to an agent session.

The properties MemoryStoreID, Type are required.

func (ManagedAgentsMemoryStoreResourceParam) MarshalJSON

func (r ManagedAgentsMemoryStoreResourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMemoryStoreResourceParam) UnmarshalJSON

func (r *ManagedAgentsMemoryStoreResourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryStoreResourceParamAccess

type ManagedAgentsMemoryStoreResourceParamAccess string

Access mode for an attached memory store.

const (
	ManagedAgentsMemoryStoreResourceParamAccessReadWrite ManagedAgentsMemoryStoreResourceParamAccess = "read_write"
	ManagedAgentsMemoryStoreResourceParamAccessReadOnly  ManagedAgentsMemoryStoreResourceParamAccess = "read_only"
)

type ManagedAgentsMemoryStoreResourceParamType

type ManagedAgentsMemoryStoreResourceParamType string
const (
	ManagedAgentsMemoryStoreResourceParamTypeMemoryStore ManagedAgentsMemoryStoreResourceParamType = "memory_store"
)

type ManagedAgentsMemoryStoreResourceType

type ManagedAgentsMemoryStoreResourceType string
const (
	ManagedAgentsMemoryStoreResourceTypeMemoryStore ManagedAgentsMemoryStoreResourceType = "memory_store"
)

type ManagedAgentsMemoryStoreType

type ManagedAgentsMemoryStoreType string
const (
	ManagedAgentsMemoryStoreTypeMemoryStore ManagedAgentsMemoryStoreType = "memory_store"
)

type ManagedAgentsMemoryType

type ManagedAgentsMemoryType string
const (
	ManagedAgentsMemoryTypeMemory ManagedAgentsMemoryType = "memory"
)

type ManagedAgentsMemoryVersion

type ManagedAgentsMemoryVersion struct {
	// Unique identifier for this version (a `memver_...` value).
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// ID of the memory this version snapshots (a `mem_...` value). Remains valid after
	// the memory is deleted; pass it as `memory_id` to
	// [List memory versions](/en/api/beta/memory_stores/memory_versions/list) to
	// retrieve the memory's retained versions, including the `deleted` row while the
	// lineage is retained.
	MemoryID string `json:"memory_id" api:"required"`
	// ID of the memory store this version belongs to (a `memstore_...` value).
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// The kind of mutation a `memory_version` records. Every non-no-op mutation to a
	// memory appends exactly one version row with one of these values.
	//
	// Any of "created", "modified", "deleted".
	Operation ManagedAgentsMemoryVersionOperation `json:"operation" api:"required"`
	// Any of "memory_version".
	Type ManagedAgentsMemoryVersionType `json:"type" api:"required"`
	// The memory's UTF-8 text content as of this version. `null` when `view=basic`,
	// when `operation` is `deleted`, or when `redacted_at` is set.
	Content string `json:"content" api:"nullable"`
	// Lowercase hex SHA-256 digest of `content` as of this version (64 characters).
	// `null` when `redacted_at` is set or `operation` is `deleted`. Populated
	// regardless of `view` otherwise.
	ContentSha256 string `json:"content_sha256" api:"nullable"`
	// Size of `content` in bytes as of this version. `null` when `redacted_at` is set
	// or `operation` is `deleted`. Populated regardless of `view` otherwise.
	ContentSizeBytes int64 `json:"content_size_bytes" api:"nullable"`
	// Identifies who performed a write or redact operation. Captured at write time on
	// the `memory_version` row. The API key that created a session is not recorded on
	// agent writes; attribution answers who made the write, not who is ultimately
	// responsible. Look up session provenance separately via the
	// [Sessions API](/en/api/beta/sessions/retrieve).
	CreatedBy ManagedAgentsActorUnion `json:"created_by"`
	// The memory's path at the time of this write. `null` if and only if `redacted_at`
	// is set.
	Path string `json:"path" api:"nullable"`
	// A timestamp in RFC 3339 format
	RedactedAt time.Time `json:"redacted_at" api:"nullable" format:"date-time"`
	// Identifies who performed a write or redact operation. Captured at write time on
	// the `memory_version` row. The API key that created a session is not recorded on
	// agent writes; attribution answers who made the write, not who is ultimately
	// responsible. Look up session provenance separately via the
	// [Sessions API](/en/api/beta/sessions/retrieve).
	RedactedBy ManagedAgentsActorUnion `json:"redacted_by"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		CreatedAt        respjson.Field
		MemoryID         respjson.Field
		MemoryStoreID    respjson.Field
		Operation        respjson.Field
		Type             respjson.Field
		Content          respjson.Field
		ContentSha256    respjson.Field
		ContentSizeBytes respjson.Field
		CreatedBy        respjson.Field
		Path             respjson.Field
		RedactedAt       respjson.Field
		RedactedBy       respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and are not deleted with the memory; each version is retained for at least the version retention period after it was written, unless the store itself is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.

func (ManagedAgentsMemoryVersion) RawJSON

func (r ManagedAgentsMemoryVersion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMemoryVersion) UnmarshalJSON

func (r *ManagedAgentsMemoryVersion) UnmarshalJSON(data []byte) error

type ManagedAgentsMemoryVersionOperation

type ManagedAgentsMemoryVersionOperation string

The kind of mutation a `memory_version` records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.

const (
	ManagedAgentsMemoryVersionOperationCreated  ManagedAgentsMemoryVersionOperation = "created"
	ManagedAgentsMemoryVersionOperationModified ManagedAgentsMemoryVersionOperation = "modified"
	ManagedAgentsMemoryVersionOperationDeleted  ManagedAgentsMemoryVersionOperation = "deleted"
)

type ManagedAgentsMemoryVersionType

type ManagedAgentsMemoryVersionType string
const (
	ManagedAgentsMemoryVersionTypeMemoryVersion ManagedAgentsMemoryVersionType = "memory_version"
)

type ManagedAgentsMemoryView

type ManagedAgentsMemoryView string

Selects which projection of a `memory` or `memory_version` the server returns. `basic` returns the object with `content` set to `null`; `full` populates `content`. When omitted, the default is endpoint-specific: retrieve operations default to `full`; list, create, and update operations default to `basic`. Listing with `view=full` caps `limit` at 20.

const (
	ManagedAgentsMemoryViewBasic ManagedAgentsMemoryView = "basic"
	ManagedAgentsMemoryViewFull  ManagedAgentsMemoryView = "full"
)

type ManagedAgentsModel

type ManagedAgentsModel = string

The model that will power your agent.

See [models](https://docs.qoder.com/cloud-agents/api/models/list) for additional details and options.

type ManagedAgentsModelConfig

type ManagedAgentsModelConfig struct {
	ContextWindow int64 `json:"context_window"`

	// The model that will power your agent.
	//
	// See [models](https://docs.qoder.com/cloud-agents/api/models/list) for additional
	// details and options.
	ID ManagedAgentsModel `json:"id" api:"required"`
	// How hard the model works on each turn. Sets `output_config.effort` on every
	// Messages call the session makes.
	Effort ManagedAgentsModelConfigEffortUnion `json:"effort"`
	// Geographic region for model inference. When unset, requests fall through to the
	// workspace's default_inference_geo.
	InferenceGeo string `json:"inference_geo"`
	// Inference speed mode. `fast` provides significantly faster output token
	// generation at premium pricing. Not all models support `fast`; invalid
	// combinations are rejected at create time.
	//
	// Any of "standard", "fast".
	Speed ManagedAgentsModelConfigSpeed `json:"speed"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ContextWindow respjson.Field

		ID           respjson.Field
		Effort       respjson.Field
		InferenceGeo respjson.Field
		Speed        respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Model identifier and configuration.

func (ManagedAgentsModelConfig) RawJSON

func (r ManagedAgentsModelConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelConfig) UnmarshalJSON

func (r *ManagedAgentsModelConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsModelConfigEffortUnion

type ManagedAgentsModelConfigEffortUnion struct {
	// Any of "low", "medium", "high", "xhigh", "max".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsModelConfigEffortUnion contains all possible properties and values from ManagedAgentsEffortLow, ManagedAgentsEffortMedium, ManagedAgentsEffortHigh, ManagedAgentsEffortXhigh, ManagedAgentsEffortMax.

Use the ManagedAgentsModelConfigEffortUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsModelConfigEffortUnion) AsAny

func (u ManagedAgentsModelConfigEffortUnion) AsAny() anyManagedAgentsModelConfigEffort

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsModelConfigEffortUnion.AsAny().(type) {
case qoder.ManagedAgentsEffortLow:
case qoder.ManagedAgentsEffortMedium:
case qoder.ManagedAgentsEffortHigh:
case qoder.ManagedAgentsEffortXhigh:
case qoder.ManagedAgentsEffortMax:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsModelConfigEffortUnion) AsHigh

func (ManagedAgentsModelConfigEffortUnion) AsLow

func (ManagedAgentsModelConfigEffortUnion) AsMax

func (ManagedAgentsModelConfigEffortUnion) AsMedium

func (ManagedAgentsModelConfigEffortUnion) AsXhigh

func (ManagedAgentsModelConfigEffortUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelConfigEffortUnion) UnmarshalJSON

func (r *ManagedAgentsModelConfigEffortUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsModelConfigParams

type ManagedAgentsModelConfigParams struct {
	ContextWindow param.Opt[int64] `json:"context_window,omitzero"`

	// The model that will power your agent.
	//
	// See [models](https://docs.qoder.com/cloud-agents/api/models/list) for additional
	// details and options.
	ID ManagedAgentsModel `json:"id,omitzero" api:"required"`
	// Geographic region for model inference. When unset, requests fall through to the
	// workspace's default_inference_geo. On update, `model` is whole-object
	// replacement — omitting inference_geo clears it.
	InferenceGeo param.Opt[string] `json:"inference_geo,omitzero"`
	// How hard the model works on each inference call. Accepts a bare level string
	// (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model
	// default; on update, omitting it leaves the stored value unchanged.
	Effort ManagedAgentsModelConfigParamsEffortUnion `json:"effort,omitzero"`
	// Inference speed mode. `fast` provides significantly faster output token
	// generation at premium pricing. Not all models support `fast`; invalid
	// combinations are rejected at create time.
	//
	// Any of "standard", "fast".
	Speed ManagedAgentsModelConfigParamsSpeed `json:"speed,omitzero"`
	// contains filtered or unexported fields
}

An object that defines additional configuration control over model use

The property ID is required.

func (ManagedAgentsModelConfigParams) MarshalJSON

func (r ManagedAgentsModelConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsModelConfigParams) UnmarshalJSON

func (r *ManagedAgentsModelConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel

type ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel string

How hard the model works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time.

const (
	ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelLow    ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = "low"
	ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelMedium ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = "medium"
	ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelHigh   ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = "high"
	ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelXhigh  ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = "xhigh"
	ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelMax    ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = "max"
)

type ManagedAgentsModelConfigParamsEffortUnion

type ManagedAgentsModelConfigParamsEffortUnion struct {
	// Check if union is this variant with
	// !param.IsOmitted(union.OfManagedAgentsModelConfigsEffortManagedAgentsEffortLevel)
	OfManagedAgentsModelConfigsEffortManagedAgentsEffortLevel param.Opt[string]               `json:",omitzero,inline"`
	OfManagedAgentsEffortLow                                  *ManagedAgentsEffortLowParam    `json:",omitzero,inline"`
	OfManagedAgentsEffortMedium                               *ManagedAgentsEffortMediumParam `json:",omitzero,inline"`
	OfManagedAgentsEffortHigh                                 *ManagedAgentsEffortHighParam   `json:",omitzero,inline"`
	OfManagedAgentsEffortXhigh                                *ManagedAgentsEffortXhighParam  `json:",omitzero,inline"`
	OfManagedAgentsEffortMax                                  *ManagedAgentsEffortMaxParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsModelConfigParamsEffortUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsModelConfigParamsEffortUnion) MarshalJSON

func (*ManagedAgentsModelConfigParamsEffortUnion) UnmarshalJSON

func (u *ManagedAgentsModelConfigParamsEffortUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsModelConfigParamsSpeed

type ManagedAgentsModelConfigParamsSpeed string

Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.

const (
	ManagedAgentsModelConfigParamsSpeedStandard ManagedAgentsModelConfigParamsSpeed = "standard"
	ManagedAgentsModelConfigParamsSpeedFast     ManagedAgentsModelConfigParamsSpeed = "fast"
)

type ManagedAgentsModelConfigSpeed

type ManagedAgentsModelConfigSpeed string

Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.

const (
	ManagedAgentsModelConfigSpeedStandard ManagedAgentsModelConfigSpeed = "standard"
	ManagedAgentsModelConfigSpeedFast     ManagedAgentsModelConfigSpeed = "fast"
)

type ManagedAgentsModelOverloadedError

type ManagedAgentsModelOverloadedError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsModelOverloadedErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "model_overloaded_error".
	Type ManagedAgentsModelOverloadedErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		RetryStatus respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The model is currently overloaded. Emitted after automatic retries are exhausted.

func (ManagedAgentsModelOverloadedError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelOverloadedError) UnmarshalJSON

func (r *ManagedAgentsModelOverloadedError) UnmarshalJSON(data []byte) error

type ManagedAgentsModelOverloadedErrorRetryStatusUnion

type ManagedAgentsModelOverloadedErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsModelOverloadedErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsModelOverloadedErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsAny

func (u ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsAny() anyManagedAgentsModelOverloadedErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsModelOverloadedErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsModelOverloadedErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelOverloadedErrorRetryStatusUnion) UnmarshalJSON

type ManagedAgentsModelOverloadedErrorType

type ManagedAgentsModelOverloadedErrorType string
const (
	ManagedAgentsModelOverloadedErrorTypeModelOverloadedError ManagedAgentsModelOverloadedErrorType = "model_overloaded_error"
)

type ManagedAgentsModelRateLimitedError

type ManagedAgentsModelRateLimitedError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsModelRateLimitedErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "model_rate_limited_error".
	Type ManagedAgentsModelRateLimitedErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		RetryStatus respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The model request was rate-limited.

func (ManagedAgentsModelRateLimitedError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelRateLimitedError) UnmarshalJSON

func (r *ManagedAgentsModelRateLimitedError) UnmarshalJSON(data []byte) error

type ManagedAgentsModelRateLimitedErrorRetryStatusUnion

type ManagedAgentsModelRateLimitedErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsModelRateLimitedErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsModelRateLimitedErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsAny

func (u ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsAny() anyManagedAgentsModelRateLimitedErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsModelRateLimitedErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsModelRateLimitedErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelRateLimitedErrorRetryStatusUnion) UnmarshalJSON

type ManagedAgentsModelRateLimitedErrorType

type ManagedAgentsModelRateLimitedErrorType string
const (
	ManagedAgentsModelRateLimitedErrorTypeModelRateLimitedError ManagedAgentsModelRateLimitedErrorType = "model_rate_limited_error"
)

type ManagedAgentsModelRequestFailedError

type ManagedAgentsModelRequestFailedError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsModelRequestFailedErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "model_request_failed_error".
	Type ManagedAgentsModelRequestFailedErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		RetryStatus respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A model request failed for a reason other than overload or rate-limiting.

func (ManagedAgentsModelRequestFailedError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelRequestFailedError) UnmarshalJSON

func (r *ManagedAgentsModelRequestFailedError) UnmarshalJSON(data []byte) error

type ManagedAgentsModelRequestFailedErrorRetryStatusUnion

type ManagedAgentsModelRequestFailedErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsModelRequestFailedErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsModelRequestFailedErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsAny

func (u ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsAny() anyManagedAgentsModelRequestFailedErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsModelRequestFailedErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsModelRequestFailedErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsModelRequestFailedErrorRetryStatusUnion) UnmarshalJSON

type ManagedAgentsModelRequestFailedErrorType

type ManagedAgentsModelRequestFailedErrorType string
const (
	ManagedAgentsModelRequestFailedErrorTypeModelRequestFailedError ManagedAgentsModelRequestFailedErrorType = "model_request_failed_error"
)

type ManagedAgentsMultiagent

type ManagedAgentsMultiagent struct {
	// Agents the coordinator may spawn as session threads, each resolved to a specific
	// version.
	Agents []ManagedAgentsMultiagentAgentUnion `json:"agents" api:"required"`
	// Any of "coordinator".
	Type ManagedAgentsMultiagentType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Agents      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved coordinator topology with a concrete agent roster.

func (ManagedAgentsMultiagent) RawJSON

func (r ManagedAgentsMultiagent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsMultiagent) UnmarshalJSON

func (r *ManagedAgentsMultiagent) UnmarshalJSON(data []byte) error

type ManagedAgentsMultiagentAgentUnion

type ManagedAgentsMultiagentAgentUnion struct {
	// This field is from variant [ManagedAgentsAgentReference].
	ID string `json:"id"`
	// Any of "agent", "advisor".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsAgentReference].
	Version int64 `json:"version"`
	// This field is from variant [ManagedAgentsAdvisor].
	Model string `json:"model"`
	JSON  struct {
		ID      respjson.Field
		Type    respjson.Field
		Version respjson.Field
		Model   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsMultiagentAgentUnion contains all possible properties and values from ManagedAgentsAgentReference, ManagedAgentsAdvisor.

Use the ManagedAgentsMultiagentAgentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsMultiagentAgentUnion) AsAdvisor

func (ManagedAgentsMultiagentAgentUnion) AsAgent

func (ManagedAgentsMultiagentAgentUnion) AsAny

func (u ManagedAgentsMultiagentAgentUnion) AsAny() anyManagedAgentsMultiagentAgent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsMultiagentAgentUnion.AsAny().(type) {
case qoder.ManagedAgentsAgentReference:
case qoder.ManagedAgentsAdvisor:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsMultiagentAgentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsMultiagentAgentUnion) UnmarshalJSON

func (r *ManagedAgentsMultiagentAgentUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsMultiagentParams

type ManagedAgentsMultiagentParams struct {
	// Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is
	// an agent ID string, a versioned `{"type":"agent","id","version"}` reference, or
	// `{"type":"self"}` to allow recursive self-invocation. Entries must reference
	// distinct agents (after resolving `self` and string forms); at most one `self`.
	// Referenced agents must exist, must not be archived, and must not themselves have
	// `multiagent` set (depth limit 1).
	Agents []ManagedAgentsMultiagentRosterEntryParamsUnion `json:"agents,omitzero" api:"required"`
	// Any of "coordinator".
	Type ManagedAgentsMultiagentParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the `agents` roster.

The properties Agents, Type are required.

func (ManagedAgentsMultiagentParams) MarshalJSON

func (r ManagedAgentsMultiagentParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMultiagentParams) UnmarshalJSON

func (r *ManagedAgentsMultiagentParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMultiagentParamsType

type ManagedAgentsMultiagentParamsType string
const (
	ManagedAgentsMultiagentParamsTypeCoordinator ManagedAgentsMultiagentParamsType = "coordinator"
)

type ManagedAgentsMultiagentRosterEntryParamsUnion

type ManagedAgentsMultiagentRosterEntryParamsUnion struct {
	OfString                       param.Opt[string]                  `json:",omitzero,inline"`
	OfManagedAgentsAgents          *ManagedAgentsAgentParams          `json:",omitzero,inline"`
	OfManagedAgentsMultiagentSelfs *ManagedAgentsMultiagentSelfParams `json:",omitzero,inline"`
	OfManagedAgentsAdvisors        *ManagedAgentsAdvisorParams        `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsMultiagentRosterEntryParamsUnion) GetID

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMultiagentRosterEntryParamsUnion) GetModel

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMultiagentRosterEntryParamsUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMultiagentRosterEntryParamsUnion) GetVersion

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsMultiagentRosterEntryParamsUnion) MarshalJSON

func (*ManagedAgentsMultiagentRosterEntryParamsUnion) UnmarshalJSON

func (u *ManagedAgentsMultiagentRosterEntryParamsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsMultiagentSelfParams

type ManagedAgentsMultiagentSelfParams struct {
	// Any of "self".
	Type ManagedAgentsMultiagentSelfParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Sentinel roster entry meaning "the agent that owns this configuration". Resolved server-side to a concrete agent reference.

The property Type is required.

func (ManagedAgentsMultiagentSelfParams) MarshalJSON

func (r ManagedAgentsMultiagentSelfParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsMultiagentSelfParams) UnmarshalJSON

func (r *ManagedAgentsMultiagentSelfParams) UnmarshalJSON(data []byte) error

type ManagedAgentsMultiagentSelfParamsType

type ManagedAgentsMultiagentSelfParamsType string
const (
	ManagedAgentsMultiagentSelfParamsTypeSelf ManagedAgentsMultiagentSelfParamsType = "self"
)

type ManagedAgentsMultiagentType

type ManagedAgentsMultiagentType string
const (
	ManagedAgentsMultiagentTypeCoordinator ManagedAgentsMultiagentType = "coordinator"
)

type ManagedAgentsOrganizationDisabledDeploymentPausedReasonError

type ManagedAgentsOrganizationDisabledDeploymentPausedReasonError struct {
	// Any of "organization_disabled_error".
	Type ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's organization is disabled.

func (ManagedAgentsOrganizationDisabledDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsOrganizationDisabledDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType

type ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType string
const (
	ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorTypeOrganizationDisabledError ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType = "organization_disabled_error"
)

type ManagedAgentsOrganizationDisabledRunError

type ManagedAgentsOrganizationDisabledRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "organization_disabled_error".
	Type ManagedAgentsOrganizationDisabledRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's organization is disabled.

func (ManagedAgentsOrganizationDisabledRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsOrganizationDisabledRunError) UnmarshalJSON

func (r *ManagedAgentsOrganizationDisabledRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsOrganizationDisabledRunErrorType

type ManagedAgentsOrganizationDisabledRunErrorType string
const (
	ManagedAgentsOrganizationDisabledRunErrorTypeOrganizationDisabledError ManagedAgentsOrganizationDisabledRunErrorType = "organization_disabled_error"
)

type ManagedAgentsOutcomeEvaluationResource

type ManagedAgentsOutcomeEvaluationResource struct {
	// A timestamp in RFC 3339 format
	CompletedAt time.Time `json:"completed_at" api:"required" format:"date-time"`
	// What the agent should produce.
	Description string `json:"description" api:"required"`
	// Grader's verdict text from the most recent evaluation. For `satisfied`, explains
	// why criteria are met; for `needs_revision` (intermediate), what's missing; for
	// `failed`, why unrecoverable.
	Explanation string `json:"explanation" api:"required"`
	// 0-indexed revision cycle the outcome is currently on.
	Iteration int64 `json:"iteration" api:"required"`
	// Server-generated outc\_ ID for this outcome.
	OutcomeID string `json:"outcome_id" api:"required"`
	// Current evaluation state. `pending` before the agent begins work; `running`
	// while producing or revising; `evaluating` while the grader scores;
	// `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.
	Result string `json:"result" api:"required"`
	// Any of "outcome_evaluation".
	Type ManagedAgentsOutcomeEvaluationResourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CompletedAt respjson.Field
		Description respjson.Field
		Explanation respjson.Field
		Iteration   respjson.Field
		OutcomeID   respjson.Field
		Result      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Evaluation state for a single outcome defined via a `define_outcome` event.

func (ManagedAgentsOutcomeEvaluationResource) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsOutcomeEvaluationResource) UnmarshalJSON

func (r *ManagedAgentsOutcomeEvaluationResource) UnmarshalJSON(data []byte) error

type ManagedAgentsOutcomeEvaluationResourceType

type ManagedAgentsOutcomeEvaluationResourceType string
const (
	ManagedAgentsOutcomeEvaluationResourceTypeOutcomeEvaluation ManagedAgentsOutcomeEvaluationResourceType = "outcome_evaluation"
)

type ManagedAgentsPlainTextDocumentSource

type ManagedAgentsPlainTextDocumentSource struct {
	// The plain text content.
	Data string `json:"data" api:"required"`
	// MIME type of the text content. Must be "text/plain".
	//
	// Any of "text/plain".
	MediaType ManagedAgentsPlainTextDocumentSourceMediaType `json:"media_type" api:"required"`
	// Any of "text".
	Type ManagedAgentsPlainTextDocumentSourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		MediaType   respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Plain text document content.

func (ManagedAgentsPlainTextDocumentSource) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsPlainTextDocumentSource) ToParam

ToParam converts this ManagedAgentsPlainTextDocumentSource to a ManagedAgentsPlainTextDocumentSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsPlainTextDocumentSourceParam.Overrides()

func (*ManagedAgentsPlainTextDocumentSource) UnmarshalJSON

func (r *ManagedAgentsPlainTextDocumentSource) UnmarshalJSON(data []byte) error

type ManagedAgentsPlainTextDocumentSourceMediaType

type ManagedAgentsPlainTextDocumentSourceMediaType string

MIME type of the text content. Must be "text/plain".

const (
	ManagedAgentsPlainTextDocumentSourceMediaTypeTextPlain ManagedAgentsPlainTextDocumentSourceMediaType = "text/plain"
)

type ManagedAgentsPlainTextDocumentSourceParam

type ManagedAgentsPlainTextDocumentSourceParam struct {
	// The plain text content.
	Data string `json:"data" api:"required"`
	// MIME type of the text content. Must be "text/plain".
	//
	// Any of "text/plain".
	MediaType ManagedAgentsPlainTextDocumentSourceMediaType `json:"media_type,omitzero" api:"required"`
	// Any of "text".
	Type ManagedAgentsPlainTextDocumentSourceType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Plain text document content.

The properties Data, MediaType, Type are required.

func (ManagedAgentsPlainTextDocumentSourceParam) MarshalJSON

func (r ManagedAgentsPlainTextDocumentSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsPlainTextDocumentSourceParam) UnmarshalJSON

func (r *ManagedAgentsPlainTextDocumentSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsPlainTextDocumentSourceType

type ManagedAgentsPlainTextDocumentSourceType string
const (
	ManagedAgentsPlainTextDocumentSourceTypeText ManagedAgentsPlainTextDocumentSourceType = "text"
)

type ManagedAgentsPreconditionParam

type ManagedAgentsPreconditionParam struct {
	// Any of "content_sha256".
	Type ManagedAgentsPreconditionType `json:"type,omitzero" api:"required"`
	// Expected `content_sha256` of the stored memory (64 lowercase hexadecimal
	// characters). Typically the `content_sha256` returned by a prior read or list
	// call. Because the server applies no content normalization, clients can also
	// compute this locally as the SHA-256 of the UTF-8 content bytes.
	ContentSha256 param.Opt[string] `json:"content_sha256,omitzero"`
	// contains filtered or unexported fields
}

Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409.

The property Type is required.

func (ManagedAgentsPreconditionParam) MarshalJSON

func (r ManagedAgentsPreconditionParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsPreconditionParam) UnmarshalJSON

func (r *ManagedAgentsPreconditionParam) UnmarshalJSON(data []byte) error

type ManagedAgentsPreconditionType

type ManagedAgentsPreconditionType string
const (
	ManagedAgentsPreconditionTypeContentSha256 ManagedAgentsPreconditionType = "content_sha256"
)

type ManagedAgentsQoderSkill

type ManagedAgentsQoderSkill struct {
	SkillID string `json:"skill_id" api:"required"`
	// Any of "qoder".
	Type    ManagedAgentsQoderSkillType `json:"type" api:"required"`
	Version string                      `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SkillID     respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A resolved Qoder-managed skill.

func (ManagedAgentsQoderSkill) RawJSON

func (r ManagedAgentsQoderSkill) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsQoderSkill) UnmarshalJSON

func (r *ManagedAgentsQoderSkill) UnmarshalJSON(data []byte) error

type ManagedAgentsQoderSkillParams

type ManagedAgentsQoderSkillParams struct {
	// Identifier of the Qoder skill (e.g., "xlsx").
	SkillID string `json:"skill_id" api:"required"`
	// Any of "qoder".
	Type ManagedAgentsQoderSkillParamsType `json:"type,omitzero" api:"required"`
	// Version to pin. Defaults to latest if omitted.
	Version param.Opt[string] `json:"version,omitzero"`
	// contains filtered or unexported fields
}

An Qoder-managed skill.

The properties SkillID, Type are required.

func (ManagedAgentsQoderSkillParams) MarshalJSON

func (r ManagedAgentsQoderSkillParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsQoderSkillParams) UnmarshalJSON

func (r *ManagedAgentsQoderSkillParams) UnmarshalJSON(data []byte) error

type ManagedAgentsQoderSkillParamsType

type ManagedAgentsQoderSkillParamsType string
const (
	ManagedAgentsQoderSkillParamsTypeQoder ManagedAgentsQoderSkillParamsType = "qoder"
)

type ManagedAgentsQoderSkillType

type ManagedAgentsQoderSkillType string
const (
	ManagedAgentsQoderSkillTypeQoder ManagedAgentsQoderSkillType = "qoder"
)

type ManagedAgentsReadToolConfig

type ManagedAgentsReadToolConfig struct {
	Enabled bool          `json:"enabled" api:"required"`
	Name    constant.Read `json:"name" default:"read"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsReadToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.Read                                    `json:"type" default:"read"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the read tool.

func (ManagedAgentsReadToolConfig) RawJSON

func (r ManagedAgentsReadToolConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsReadToolConfig) UnmarshalJSON

func (r *ManagedAgentsReadToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsReadToolConfigParams

type ManagedAgentsReadToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsReadToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Any of "read".
	Type ManagedAgentsReadToolConfigParamsType `json:"type,omitzero"`
	// Must be "read".
	//
	// This field can be elided, and will marshal its zero value as "read".
	Name constant.Read `json:"name" default:"read"`
	// contains filtered or unexported fields
}

Configuration override for the read tool.

The property Name is required.

func (ManagedAgentsReadToolConfigParams) MarshalJSON

func (r ManagedAgentsReadToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsReadToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsReadToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsReadToolConfigParamsPermissionPolicyUnion

type ManagedAgentsReadToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsReadToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsReadToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsReadToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsReadToolConfigParamsType

type ManagedAgentsReadToolConfigParamsType string
const (
	ManagedAgentsReadToolConfigParamsTypeRead ManagedAgentsReadToolConfigParamsType = "read"
)

type ManagedAgentsReadToolConfigPermissionPolicyUnion

type ManagedAgentsReadToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsReadToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsReadToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsReadToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsReadToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsReadToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsReadToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsRedactedBlock

type ManagedAgentsRedactedBlock struct {
	// Any of "redacted".
	Type ManagedAgentsRedactedBlockType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Placeholder for content withheld by Qoder model policy.

func (ManagedAgentsRedactedBlock) RawJSON

func (r ManagedAgentsRedactedBlock) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsRedactedBlock) ToParam

ToParam converts this ManagedAgentsRedactedBlock to a ManagedAgentsRedactedBlockParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsRedactedBlockParam.Overrides()

func (*ManagedAgentsRedactedBlock) UnmarshalJSON

func (r *ManagedAgentsRedactedBlock) UnmarshalJSON(data []byte) error

type ManagedAgentsRedactedBlockParam

type ManagedAgentsRedactedBlockParam struct {
	// Any of "redacted".
	Type ManagedAgentsRedactedBlockType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Placeholder for content withheld by Qoder model policy.

The property Type is required.

func (ManagedAgentsRedactedBlockParam) MarshalJSON

func (r ManagedAgentsRedactedBlockParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsRedactedBlockParam) UnmarshalJSON

func (r *ManagedAgentsRedactedBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsRedactedBlockType

type ManagedAgentsRedactedBlockType string
const (
	ManagedAgentsRedactedBlockTypeRedacted ManagedAgentsRedactedBlockType = "redacted"
)

type ManagedAgentsRefreshHTTPResponse

type ManagedAgentsRefreshHTTPResponse struct {
	// Response body. May be truncated and has sensitive values scrubbed.
	Body string `json:"body" api:"required"`
	// Whether `body` was truncated.
	BodyTruncated bool `json:"body_truncated" api:"required"`
	// Value of the `Content-Type` response header.
	ContentType string `json:"content_type" api:"required"`
	// HTTP status code.
	StatusCode int64 `json:"status_code" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Body          respjson.Field
		BodyTruncated respjson.Field
		ContentType   respjson.Field
		StatusCode    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An HTTP response captured during a credential validation probe.

func (ManagedAgentsRefreshHTTPResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsRefreshHTTPResponse) UnmarshalJSON

func (r *ManagedAgentsRefreshHTTPResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsRefreshObject

type ManagedAgentsRefreshObject struct {
	// An HTTP response captured during a credential validation probe.
	HTTPResponse ManagedAgentsRefreshHTTPResponse `json:"http_response" api:"required"`
	// Outcome of a refresh-token exchange attempted during credential validation.
	//
	// Any of "succeeded", "failed", "connect_error", "no_refresh_token".
	Status ManagedAgentsRefreshObjectStatus `json:"status" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		HTTPResponse respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Outcome of a refresh-token exchange attempted during credential validation.

func (ManagedAgentsRefreshObject) RawJSON

func (r ManagedAgentsRefreshObject) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsRefreshObject) UnmarshalJSON

func (r *ManagedAgentsRefreshObject) UnmarshalJSON(data []byte) error

type ManagedAgentsRefreshObjectStatus

type ManagedAgentsRefreshObjectStatus string

Outcome of a refresh-token exchange attempted during credential validation.

const (
	ManagedAgentsRefreshObjectStatusSucceeded      ManagedAgentsRefreshObjectStatus = "succeeded"
	ManagedAgentsRefreshObjectStatusFailed         ManagedAgentsRefreshObjectStatus = "failed"
	ManagedAgentsRefreshObjectStatusConnectError   ManagedAgentsRefreshObjectStatus = "connect_error"
	ManagedAgentsRefreshObjectStatusNoRefreshToken ManagedAgentsRefreshObjectStatus = "no_refresh_token"
)

type ManagedAgentsRetryStatusExhausted

type ManagedAgentsRetryStatusExhausted struct {
	// Any of "exhausted".
	Type ManagedAgentsRetryStatusExhaustedType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

This turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.

func (ManagedAgentsRetryStatusExhausted) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsRetryStatusExhausted) UnmarshalJSON

func (r *ManagedAgentsRetryStatusExhausted) UnmarshalJSON(data []byte) error

type ManagedAgentsRetryStatusExhaustedType

type ManagedAgentsRetryStatusExhaustedType string
const (
	ManagedAgentsRetryStatusExhaustedTypeExhausted ManagedAgentsRetryStatusExhaustedType = "exhausted"
)

type ManagedAgentsRetryStatusRetrying

type ManagedAgentsRetryStatusRetrying struct {
	// Any of "retrying".
	Type ManagedAgentsRetryStatusRetryingType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The server is retrying automatically. Client should wait; the same error type may fire again as retrying, then once as exhausted when the retry budget runs out.

func (ManagedAgentsRetryStatusRetrying) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsRetryStatusRetrying) UnmarshalJSON

func (r *ManagedAgentsRetryStatusRetrying) UnmarshalJSON(data []byte) error

type ManagedAgentsRetryStatusRetryingType

type ManagedAgentsRetryStatusRetryingType string
const (
	ManagedAgentsRetryStatusRetryingTypeRetrying ManagedAgentsRetryStatusRetryingType = "retrying"
)

type ManagedAgentsRetryStatusTerminal

type ManagedAgentsRetryStatusTerminal struct {
	// Any of "terminal".
	Type ManagedAgentsRetryStatusTerminalType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The session encountered a terminal error and will transition to `terminated` state.

func (ManagedAgentsRetryStatusTerminal) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsRetryStatusTerminal) UnmarshalJSON

func (r *ManagedAgentsRetryStatusTerminal) UnmarshalJSON(data []byte) error

type ManagedAgentsRetryStatusTerminalType

type ManagedAgentsRetryStatusTerminalType string
const (
	ManagedAgentsRetryStatusTerminalTypeTerminal ManagedAgentsRetryStatusTerminalType = "terminal"
)

type ManagedAgentsSchedule

type ManagedAgentsSchedule struct {
	// 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,
	// "0 9 \* \* 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean
	// Sunday. Extended cron syntax - seconds or year fields, and the special
	// characters L, W, #, and ? - is not supported, nor are predefined shortcuts
	// (@daily).
	Expression string `json:"expression" api:"required"`
	// IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
	Timezone string `json:"timezone" api:"required"`
	// Any of "cron".
	Type ManagedAgentsScheduleType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	LastRunAt time.Time `json:"last_run_at" api:"nullable" format:"date-time"`
	// Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused
	// deployments (reflects what the schedule would do if unpaused); empty once the
	// deployment is archived (`archived_at` set). Each fire is offset by a small
	// per-schedule jitter, so a run will actually start at or shortly after its listed
	// time.
	UpcomingRunsAt []time.Time `json:"upcoming_runs_at" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Expression     respjson.Field
		Timezone       respjson.Field
		Type           respjson.Field
		LastRunAt      respjson.Field
		UpcomingRunsAt respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

5-field POSIX cron schedule with computed runtime timestamps.

func (ManagedAgentsSchedule) RawJSON

func (r ManagedAgentsSchedule) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSchedule) UnmarshalJSON

func (r *ManagedAgentsSchedule) UnmarshalJSON(data []byte) error

type ManagedAgentsScheduleParams

type ManagedAgentsScheduleParams struct {
	// 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,
	// "0 9 \* \* 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean
	// Sunday. Extended cron syntax - seconds or year fields, and the special
	// characters L, W, #, and ? - is not supported, nor are predefined shortcuts
	// (@daily).
	Expression string `json:"expression" api:"required"`
	// Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
	// Validated against the IANA timezone database.
	Timezone string `json:"timezone" api:"required"`
	// Any of "cron".
	Type ManagedAgentsScheduleParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

The properties Expression, Timezone, Type are required.

func (ManagedAgentsScheduleParams) MarshalJSON

func (r ManagedAgentsScheduleParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsScheduleParams) UnmarshalJSON

func (r *ManagedAgentsScheduleParams) UnmarshalJSON(data []byte) error

type ManagedAgentsScheduleParamsType

type ManagedAgentsScheduleParamsType string
const (
	ManagedAgentsScheduleParamsTypeCron ManagedAgentsScheduleParamsType = "cron"
)

type ManagedAgentsScheduleTriggerContext

type ManagedAgentsScheduleTriggerContext struct {
	// A timestamp in RFC 3339 format
	ScheduledAt time.Time `json:"scheduled_at" api:"required" format:"date-time"`
	// Any of "schedule".
	Type ManagedAgentsScheduleTriggerContextType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ScheduledAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The run was fired by the deployment's cron schedule.

func (ManagedAgentsScheduleTriggerContext) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsScheduleTriggerContext) UnmarshalJSON

func (r *ManagedAgentsScheduleTriggerContext) UnmarshalJSON(data []byte) error

type ManagedAgentsScheduleTriggerContextType

type ManagedAgentsScheduleTriggerContextType string
const (
	ManagedAgentsScheduleTriggerContextTypeSchedule ManagedAgentsScheduleTriggerContextType = "schedule"
)

type ManagedAgentsScheduleType

type ManagedAgentsScheduleType string
const (
	ManagedAgentsScheduleTypeCron ManagedAgentsScheduleType = "cron"
)

type ManagedAgentsSearchResultBlock

type ManagedAgentsSearchResultBlock struct {
	// Citation settings for a search result.
	Citations ManagedAgentsSearchResultCitations `json:"citations" api:"required"`
	// Array of text content blocks from the search result.
	Content []ManagedAgentsSearchResultContent `json:"content" api:"required"`
	// The URL source of the search result.
	Source string `json:"source" api:"required"`
	// The title of the search result.
	Title string `json:"title" api:"required"`
	// Any of "search_result".
	Type ManagedAgentsSearchResultBlockType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Citations   respjson.Field
		Content     respjson.Field
		Source      respjson.Field
		Title       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A block containing a web search result.

func (ManagedAgentsSearchResultBlock) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsSearchResultBlock) ToParam

ToParam converts this ManagedAgentsSearchResultBlock to a ManagedAgentsSearchResultBlockParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsSearchResultBlockParam.Overrides()

func (*ManagedAgentsSearchResultBlock) UnmarshalJSON

func (r *ManagedAgentsSearchResultBlock) UnmarshalJSON(data []byte) error

type ManagedAgentsSearchResultBlockParam

type ManagedAgentsSearchResultBlockParam struct {
	// Citation settings for a search result.
	Citations ManagedAgentsSearchResultCitationsParam `json:"citations,omitzero" api:"required"`
	// Array of text content blocks from the search result.
	Content []ManagedAgentsSearchResultContentParam `json:"content,omitzero" api:"required"`
	// The URL source of the search result.
	Source string `json:"source" api:"required"`
	// The title of the search result.
	Title string `json:"title" api:"required"`
	// Any of "search_result".
	Type ManagedAgentsSearchResultBlockType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

A block containing a web search result.

The properties Citations, Content, Source, Title, Type are required.

func (ManagedAgentsSearchResultBlockParam) MarshalJSON

func (r ManagedAgentsSearchResultBlockParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsSearchResultBlockParam) UnmarshalJSON

func (r *ManagedAgentsSearchResultBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsSearchResultBlockType

type ManagedAgentsSearchResultBlockType string
const (
	ManagedAgentsSearchResultBlockTypeSearchResult ManagedAgentsSearchResultBlockType = "search_result"
)

type ManagedAgentsSearchResultCitations

type ManagedAgentsSearchResultCitations struct {
	// Whether citations are enabled for this search result.
	Enabled bool `json:"enabled" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Citation settings for a search result.

func (ManagedAgentsSearchResultCitations) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsSearchResultCitations) ToParam

ToParam converts this ManagedAgentsSearchResultCitations to a ManagedAgentsSearchResultCitationsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsSearchResultCitationsParam.Overrides()

func (*ManagedAgentsSearchResultCitations) UnmarshalJSON

func (r *ManagedAgentsSearchResultCitations) UnmarshalJSON(data []byte) error

type ManagedAgentsSearchResultCitationsParam

type ManagedAgentsSearchResultCitationsParam struct {
	// Whether citations are enabled for this search result.
	Enabled bool `json:"enabled" api:"required"`
	// contains filtered or unexported fields
}

Citation settings for a search result.

The property Enabled is required.

func (ManagedAgentsSearchResultCitationsParam) MarshalJSON

func (r ManagedAgentsSearchResultCitationsParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsSearchResultCitationsParam) UnmarshalJSON

func (r *ManagedAgentsSearchResultCitationsParam) UnmarshalJSON(data []byte) error

type ManagedAgentsSearchResultContent

type ManagedAgentsSearchResultContent struct {
	// The text content.
	Text string `json:"text" api:"required"`
	// Any of "text".
	Type ManagedAgentsSearchResultContentType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Text content within a search result.

func (ManagedAgentsSearchResultContent) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsSearchResultContent) ToParam

ToParam converts this ManagedAgentsSearchResultContent to a ManagedAgentsSearchResultContentParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsSearchResultContentParam.Overrides()

func (*ManagedAgentsSearchResultContent) UnmarshalJSON

func (r *ManagedAgentsSearchResultContent) UnmarshalJSON(data []byte) error

type ManagedAgentsSearchResultContentParam

type ManagedAgentsSearchResultContentParam struct {
	// The text content.
	Text string `json:"text" api:"required"`
	// Any of "text".
	Type ManagedAgentsSearchResultContentType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Text content within a search result.

The properties Text, Type are required.

func (ManagedAgentsSearchResultContentParam) MarshalJSON

func (r ManagedAgentsSearchResultContentParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsSearchResultContentParam) UnmarshalJSON

func (r *ManagedAgentsSearchResultContentParam) UnmarshalJSON(data []byte) error

type ManagedAgentsSearchResultContentType

type ManagedAgentsSearchResultContentType string
const (
	ManagedAgentsSearchResultContentTypeText ManagedAgentsSearchResultContentType = "text"
)

type ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError

type ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError struct {
	// Any of "self_hosted_resources_unsupported_error".
	Type ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment configures resources, but its environment is self-hosted and cannot mount them.

func (ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType

type ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorTypeSelfHostedResourcesUnsupportedError ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType = "self_hosted_resources_unsupported_error"
)

type ManagedAgentsSelfHostedResourcesUnsupportedRunError

type ManagedAgentsSelfHostedResourcesUnsupportedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "self_hosted_resources_unsupported_error".
	Type ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment configures resources, but its environment is self-hosted and cannot mount them.

func (ManagedAgentsSelfHostedResourcesUnsupportedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSelfHostedResourcesUnsupportedRunError) UnmarshalJSON

type ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType

type ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType string
const (
	ManagedAgentsSelfHostedResourcesUnsupportedRunErrorTypeSelfHostedResourcesUnsupportedError ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType = "self_hosted_resources_unsupported_error"
)

type ManagedAgentsSendSessionEvents

type ManagedAgentsSendSessionEvents struct {
	// Sent events
	Data []ManagedAgentsSendSessionEventsDataUnion `json:"data"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Events that were successfully sent to the session.

func (ManagedAgentsSendSessionEvents) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSendSessionEvents) UnmarshalJSON

func (r *ManagedAgentsSendSessionEvents) UnmarshalJSON(data []byte) error

type ManagedAgentsSendSessionEventsDataUnion

type ManagedAgentsSendSessionEventsDataUnion struct {
	ID string `json:"id"`
	// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion],
	// [[]ManagedAgentsUserToolResultEventContentUnion],
	// [[]ManagedAgentsSystemContentBlock]
	Content ManagedAgentsSendSessionEventsDataUnionContent `json:"content"`
	// Any of "user.message", "user.interrupt", "user.tool_confirmation",
	// "user.custom_tool_result", "user.define_outcome", "user.tool_result",
	// "system.message".
	Type            string    `json:"type"`
	ProcessedAt     time.Time `json:"processed_at"`
	SessionThreadID string    `json:"session_thread_id"`
	// This field is from variant [ManagedAgentsUserToolConfirmationEvent].
	Result    ManagedAgentsUserToolConfirmationEventResult `json:"result"`
	ToolUseID string                                       `json:"tool_use_id"`
	// This field is from variant [ManagedAgentsUserToolConfirmationEvent].
	DenyMessage string `json:"deny_message"`
	// This field is from variant [ManagedAgentsUserCustomToolResultEvent].
	CustomToolUseID string `json:"custom_tool_use_id"`
	IsError         bool   `json:"is_error"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	MaxIterations int64 `json:"max_iterations"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	OutcomeID string `json:"outcome_id"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Rubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:"rubric"`
	JSON   struct {
		ID              respjson.Field
		Content         respjson.Field
		Type            respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		Result          respjson.Field
		ToolUseID       respjson.Field
		DenyMessage     respjson.Field
		CustomToolUseID respjson.Field
		IsError         respjson.Field
		Description     respjson.Field
		MaxIterations   respjson.Field
		OutcomeID       respjson.Field
		Rubric          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSendSessionEventsDataUnion contains all possible properties and values from ManagedAgentsUserMessageEvent, ManagedAgentsUserInterruptEvent, ManagedAgentsUserToolConfirmationEvent, ManagedAgentsUserCustomToolResultEvent, ManagedAgentsUserDefineOutcomeEvent, ManagedAgentsUserToolResultEvent, ManagedAgentsSystemMessageEvent.

Use the ManagedAgentsSendSessionEventsDataUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSendSessionEventsDataUnion) AsAny

func (u ManagedAgentsSendSessionEventsDataUnion) AsAny() anyManagedAgentsSendSessionEventsData

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSendSessionEventsDataUnion.AsAny().(type) {
case qoder.ManagedAgentsUserMessageEvent:
case qoder.ManagedAgentsUserInterruptEvent:
case qoder.ManagedAgentsUserToolConfirmationEvent:
case qoder.ManagedAgentsUserCustomToolResultEvent:
case qoder.ManagedAgentsUserDefineOutcomeEvent:
case qoder.ManagedAgentsUserToolResultEvent:
case qoder.ManagedAgentsSystemMessageEvent:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSendSessionEventsDataUnion) AsSystemMessage

func (ManagedAgentsSendSessionEventsDataUnion) AsUserCustomToolResult

func (ManagedAgentsSendSessionEventsDataUnion) AsUserDefineOutcome

func (ManagedAgentsSendSessionEventsDataUnion) AsUserInterrupt

func (ManagedAgentsSendSessionEventsDataUnion) AsUserMessage

func (ManagedAgentsSendSessionEventsDataUnion) AsUserToolConfirmation

func (ManagedAgentsSendSessionEventsDataUnion) AsUserToolResult

func (ManagedAgentsSendSessionEventsDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSendSessionEventsDataUnion) UnmarshalJSON

func (r *ManagedAgentsSendSessionEventsDataUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSendSessionEventsDataUnionContent

type ManagedAgentsSendSessionEventsDataUnionContent struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.
	OfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsSystemContentBlock] instead of an object.
	OfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:",inline"`
	JSON                                   struct {
		OfManagedAgentsUserMessageEventContentArray          respjson.Field
		OfManagedAgentsUserCustomToolResultEventContentArray respjson.Field
		OfManagedAgentsUserToolResultEventContentArray       respjson.Field
		OfManagedAgentsSystemContentBlockArray               respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSendSessionEventsDataUnionContent is an implicit subunion of ManagedAgentsSendSessionEventsDataUnion. ManagedAgentsSendSessionEventsDataUnionContent provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSendSessionEventsDataUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsUserMessageEventContentArray OfManagedAgentsUserCustomToolResultEventContentArray OfManagedAgentsUserToolResultEventContentArray OfManagedAgentsSystemContentBlockArray]

func (*ManagedAgentsSendSessionEventsDataUnionContent) UnmarshalJSON

type ManagedAgentsServerToolUsage

type ManagedAgentsServerToolUsage struct {
	// Number of server-executed web fetch requests.
	WebFetchRequests int64 `json:"web_fetch_requests"`
	// Number of server-executed web search requests.
	WebSearchRequests int64 `json:"web_search_requests"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		WebFetchRequests  respjson.Field
		WebSearchRequests respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cumulative count of server-executed tool invocations, broken down by tool.

func (ManagedAgentsServerToolUsage) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsServerToolUsage) UnmarshalJSON

func (r *ManagedAgentsServerToolUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsServiceAccountActor

type ManagedAgentsServiceAccountActor struct {
	// ID of the service account that performed the write (a `svac_...` value).
	ServiceAccountID string                       `json:"service_account_id" api:"required"`
	Type             constant.ServiceAccountActor `json:"type" default:"service_account_actor"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ServiceAccountID respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.

func (ManagedAgentsServiceAccountActor) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsServiceAccountActor) UnmarshalJSON

func (r *ManagedAgentsServiceAccountActor) UnmarshalJSON(data []byte) error

type ManagedAgentsSession

type ManagedAgentsSession struct {
	EnvironmentVariables map[string]string `json:"environment_variables"`

	ID string `json:"id" api:"required"`
	// Resolved `agent` definition for a `session`. Snapshot of the `agent` at
	// `session` creation time.
	Agent ManagedAgentsSessionAgent `json:"agent" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimit `json:"budget" api:"nullable"`
	// A timestamp in RFC 3339 format
	CreatedAt     time.Time         `json:"created_at" api:"required" format:"date-time"`
	EnvironmentID string            `json:"environment_id" api:"required"`
	Metadata      map[string]string `json:"metadata" api:"required"`
	// Per-outcome evaluation state. One entry per `define_outcome` event sent to the
	// session.
	OutcomeEvaluations []ManagedAgentsOutcomeEvaluationResource `json:"outcome_evaluations" api:"required"`
	Resources          []ManagedAgentsSessionResourceUnion      `json:"resources" api:"required"`
	// Timing statistics for a session.
	Stats ManagedAgentsSessionStats `json:"stats" api:"required"`
	// SessionStatus enum
	//
	// Any of "rescheduling", "running", "idle", "terminated".
	Status ManagedAgentsSessionStatus `json:"status" api:"required"`
	Title  string                     `json:"title" api:"required"`
	// Any of "session".
	Type ManagedAgentsSessionType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Cumulative Credits snapshot. Replace previous values; do not sum snapshots.
	// Legacy token and list-cost fields remain available for older responses.
	Usage ManagedAgentsSessionUsage `json:"usage"`
	// Vault IDs attached to the session at creation. Empty when no vaults were
	// supplied.
	VaultIDs []string `json:"vault_ids" api:"required"`
	// Deployment ID when the session was created from a deployment reference. Null
	// otherwise.
	DeploymentID string `json:"deployment_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EnvironmentVariables respjson.Field

		ID                 respjson.Field
		Agent              respjson.Field
		ArchivedAt         respjson.Field
		Budget             respjson.Field
		CreatedAt          respjson.Field
		EnvironmentID      respjson.Field
		Metadata           respjson.Field
		OutcomeEvaluations respjson.Field
		Resources          respjson.Field
		Stats              respjson.Field
		Status             respjson.Field
		Title              respjson.Field
		Type               respjson.Field
		UpdatedAt          respjson.Field
		Usage              respjson.Field
		VaultIDs           respjson.Field
		DeploymentID       respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A Managed Agents `session`.

func (ManagedAgentsSession) RawJSON

func (r ManagedAgentsSession) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSession) UnmarshalJSON

func (r *ManagedAgentsSession) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionActor

type ManagedAgentsSessionActor struct {
	// ID of the session that performed the write (a `sesn_...` value). Look up the
	// session via [Retrieve a session](/en/api/beta/sessions/retrieve) for further
	// provenance.
	SessionID string `json:"session_id" api:"required"`
	// Any of "session_actor".
	Type ManagedAgentsSessionActorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SessionID   respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attribution for a write made by an agent during a session, through the mounted filesystem at `/mnt/memory/`.

func (ManagedAgentsSessionActor) RawJSON

func (r ManagedAgentsSessionActor) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionActor) UnmarshalJSON

func (r *ManagedAgentsSessionActor) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionActorType

type ManagedAgentsSessionActorType string
const (
	ManagedAgentsSessionActorTypeSessionActor ManagedAgentsSessionActorType = "session_actor"
)

type ManagedAgentsSessionAgent

type ManagedAgentsSessionAgent struct {
	ID          string                                `json:"id" api:"required"`
	Description string                                `json:"description" api:"required"`
	MCPServers  []ManagedAgentsMCPServerURLDefinition `json:"mcp_servers" api:"required"`
	// Model identifier and configuration.
	Model ManagedAgentsModelConfig `json:"model" api:"required"`
	// Resolved coordinator topology with full agent definitions for each roster
	// member.
	Multiagent ManagedAgentsSessionMultiagentCoordinator `json:"multiagent" api:"required"`
	Name       string                                    `json:"name" api:"required"`
	Skills     []ManagedAgentsSessionAgentSkillUnion     `json:"skills" api:"required"`
	System     string                                    `json:"system" api:"required"`
	Tools      []ManagedAgentsSessionAgentToolUnion      `json:"tools" api:"required"`
	// Any of "agent".
	Type    ManagedAgentsSessionAgentType `json:"type" api:"required"`
	Version int64                         `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Description respjson.Field
		MCPServers  respjson.Field
		Model       respjson.Field
		Multiagent  respjson.Field
		Name        respjson.Field
		Skills      respjson.Field
		System      respjson.Field
		Tools       respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.

func (ManagedAgentsSessionAgent) RawJSON

func (r ManagedAgentsSessionAgent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionAgent) UnmarshalJSON

func (r *ManagedAgentsSessionAgent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionAgentSkillUnion

type ManagedAgentsSessionAgentSkillUnion struct {
	SkillID string `json:"skill_id"`
	// Any of "qoder", "custom".
	Type    string `json:"type"`
	Version string `json:"version"`
	JSON    struct {
		SkillID respjson.Field
		Type    respjson.Field
		Version respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionAgentSkillUnion contains all possible properties and values from ManagedAgentsQoderSkill, ManagedAgentsCustomSkill.

Use the ManagedAgentsSessionAgentSkillUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionAgentSkillUnion) AsAny

func (u ManagedAgentsSessionAgentSkillUnion) AsAny() anyManagedAgentsSessionAgentSkill

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionAgentSkillUnion.AsAny().(type) {
case qoder.ManagedAgentsQoderSkill:
case qoder.ManagedAgentsCustomSkill:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionAgentSkillUnion) AsCustom

func (ManagedAgentsSessionAgentSkillUnion) AsQoder

func (ManagedAgentsSessionAgentSkillUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionAgentSkillUnion) UnmarshalJSON

func (r *ManagedAgentsSessionAgentSkillUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionAgentToolUnion

type ManagedAgentsSessionAgentToolUnion struct {
	EnabledTools    []string `json:"enabled_tools"`
	DisallowedTools []string `json:"disallowed_tools"`
	// This field is a union of [[]ManagedAgentsAgentToolConfigUnion],
	// [[]ManagedAgentsMCPToolConfig]
	Configs ManagedAgentsSessionAgentToolUnionConfigs `json:"configs"`
	// This field is a union of [ManagedAgentsAgentToolsetDefaultConfig],
	// [ManagedAgentsMCPToolsetDefaultConfig]
	DefaultConfig ManagedAgentsSessionAgentToolUnionDefaultConfig `json:"default_config"`
	// Any of "agent_toolset_20260401", "mcp_toolset", "custom".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsMCPToolset].
	MCPServerName string `json:"mcp_server_name"`
	// This field is from variant [ManagedAgentsCustomTool].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsCustomTool].
	InputSchema ManagedAgentsCustomToolInputSchema `json:"input_schema"`
	// This field is from variant [ManagedAgentsCustomTool].
	Name string `json:"name"`
	JSON struct {
		EnabledTools    respjson.Field
		DisallowedTools respjson.Field
		Configs         respjson.Field
		DefaultConfig   respjson.Field
		Type            respjson.Field
		MCPServerName   respjson.Field
		Description     respjson.Field
		InputSchema     respjson.Field
		Name            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionAgentToolUnion contains all possible properties and values from ManagedAgentsAgentToolset20260401, ManagedAgentsMCPToolset, ManagedAgentsCustomTool.

Use the ManagedAgentsSessionAgentToolUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionAgentToolUnion) AsAgentToolset20260401

func (ManagedAgentsSessionAgentToolUnion) AsAny

func (u ManagedAgentsSessionAgentToolUnion) AsAny() anyManagedAgentsSessionAgentTool

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionAgentToolUnion.AsAny().(type) {
case qoder.ManagedAgentsAgentToolset20260401:
case qoder.ManagedAgentsMCPToolset:
case qoder.ManagedAgentsCustomTool:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionAgentToolUnion) AsCustom

func (ManagedAgentsSessionAgentToolUnion) AsMCPToolset

func (ManagedAgentsSessionAgentToolUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionAgentToolUnion) UnmarshalJSON

func (r *ManagedAgentsSessionAgentToolUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionAgentToolUnionConfigs

type ManagedAgentsSessionAgentToolUnionConfigs struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentToolConfigUnion] instead of an object.
	OfManagedAgentsAgentToolConfigArray []ManagedAgentsAgentToolConfigUnion `json:",inline"`
	// This field will be present if the value is a [[]ManagedAgentsMCPToolConfig]
	// instead of an object.
	OfManagedAgentsMCPToolConfigArray []ManagedAgentsMCPToolConfig `json:",inline"`
	JSON                              struct {
		OfManagedAgentsAgentToolConfigArray respjson.Field
		OfManagedAgentsMCPToolConfigArray   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionAgentToolUnionConfigs is an implicit subunion of ManagedAgentsSessionAgentToolUnion. ManagedAgentsSessionAgentToolUnionConfigs provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionAgentToolUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsAgentToolConfigArray OfManagedAgentsMCPToolConfigArray]

func (*ManagedAgentsSessionAgentToolUnionConfigs) UnmarshalJSON

func (r *ManagedAgentsSessionAgentToolUnionConfigs) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionAgentToolUnionDefaultConfig

type ManagedAgentsSessionAgentToolUnionDefaultConfig struct {
	Enabled bool `json:"enabled"`
	// This field is a union of
	// [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion],
	// [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion]
	PermissionPolicy ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy `json:"permission_policy"`
	JSON             struct {
		Enabled          respjson.Field
		PermissionPolicy respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionAgentToolUnionDefaultConfig is an implicit subunion of ManagedAgentsSessionAgentToolUnion. ManagedAgentsSessionAgentToolUnionDefaultConfig provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionAgentToolUnion.

func (*ManagedAgentsSessionAgentToolUnionDefaultConfig) UnmarshalJSON

type ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy

type ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy struct {
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy is an implicit subunion of ManagedAgentsSessionAgentToolUnion. ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionAgentToolUnion.

func (*ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy) UnmarshalJSON

type ManagedAgentsSessionAgentType

type ManagedAgentsSessionAgentType string
const (
	ManagedAgentsSessionAgentTypeAgent ManagedAgentsSessionAgentType = "agent"
)

type ManagedAgentsSessionAgentUpdateParam

type ManagedAgentsSessionAgentUpdateParam struct {
	Model  ManagedAgentsModelConfigParams  `json:"model,omitzero"`
	System param.Opt[string]               `json:"system,omitzero"`
	Skills []ManagedAgentsSkillParamsUnion `json:"skills,omitzero"`

	// Replacement MCP server list. Full replacement: the provided array becomes the
	// new value. Send an empty array to clear; omit to preserve.
	MCPServers []ManagedAgentsURLMCPServerParams `json:"mcp_servers,omitzero"`
	// Replacement tool list. Full replacement: the provided array becomes the new
	// value. Send an empty array to clear; omit to preserve.
	Tools []ManagedAgentsSessionAgentUpdateToolUnionParam `json:"tools,omitzero"`
	// contains filtered or unexported fields
}

Mid-session agent configuration update. Only `tools` and `mcp_servers` are updatable. Full replacement: the provided array becomes the new value. To preserve existing entries, GET the session, modify the array, and POST it back.

func (ManagedAgentsSessionAgentUpdateParam) MarshalJSON

func (r ManagedAgentsSessionAgentUpdateParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsSessionAgentUpdateParam) UnmarshalJSON

func (r *ManagedAgentsSessionAgentUpdateParam) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionAgentUpdateToolUnionParam

type ManagedAgentsSessionAgentUpdateToolUnionParam struct {
	OfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:",omitzero,inline"`
	OfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:",omitzero,inline"`
	OfCustom               *ManagedAgentsCustomToolParams           `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetConfigs

func (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetConfigs() (res managedAgentsSessionAgentUpdateToolUnionParamConfigs)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetDefaultConfig

func (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetDefaultConfig() (res managedAgentsSessionAgentUpdateToolUnionParamDefaultConfig)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetDescription

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetInputSchema

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetMCPServerName

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetName

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSessionAgentUpdateToolUnionParam) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSessionAgentUpdateToolUnionParam) MarshalJSON

func (*ManagedAgentsSessionAgentUpdateToolUnionParam) UnmarshalJSON

func (u *ManagedAgentsSessionAgentUpdateToolUnionParam) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionBudgetReached

type ManagedAgentsSessionBudgetReached struct {
	// Any of "budget_reached".
	Type ManagedAgentsSessionBudgetReachedType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The agent stopped because the session's tracked list cost reached its budget, or because its usage includes a model with no list price (which the budget cannot measure). Raise the budget to continue — or, if raising is rejected because a model has no list price, remove the budget.

func (ManagedAgentsSessionBudgetReached) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionBudgetReached) UnmarshalJSON

func (r *ManagedAgentsSessionBudgetReached) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionBudgetReachedType

type ManagedAgentsSessionBudgetReachedType string
const (
	ManagedAgentsSessionBudgetReachedTypeBudgetReached ManagedAgentsSessionBudgetReachedType = "budget_reached"
)

type ManagedAgentsSessionCreationRejectedRunError

type ManagedAgentsSessionCreationRejectedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "session_creation_rejected_error".
	Type ManagedAgentsSessionCreationRejectedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The session create request was rejected with a non-retryable validation error.

func (ManagedAgentsSessionCreationRejectedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionCreationRejectedRunError) UnmarshalJSON

func (r *ManagedAgentsSessionCreationRejectedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionCreationRejectedRunErrorType

type ManagedAgentsSessionCreationRejectedRunErrorType string
const (
	ManagedAgentsSessionCreationRejectedRunErrorTypeSessionCreationRejectedError ManagedAgentsSessionCreationRejectedRunErrorType = "session_creation_rejected_error"
)

type ManagedAgentsSessionDeletedEvent

type ManagedAgentsSessionDeletedEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.deleted".
	Type ManagedAgentsSessionDeletedEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.

func (ManagedAgentsSessionDeletedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionDeletedEvent) UnmarshalJSON

func (r *ManagedAgentsSessionDeletedEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionDeletedEventType

type ManagedAgentsSessionDeletedEventType string
const (
	ManagedAgentsSessionDeletedEventTypeSessionDeleted ManagedAgentsSessionDeletedEventType = "session.deleted"
)

type ManagedAgentsSessionEndTurn

type ManagedAgentsSessionEndTurn struct {
	// Any of "end_turn".
	Type ManagedAgentsSessionEndTurnType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The agent completed its turn naturally and is ready for the next user message.

func (ManagedAgentsSessionEndTurn) RawJSON

func (r ManagedAgentsSessionEndTurn) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionEndTurn) UnmarshalJSON

func (r *ManagedAgentsSessionEndTurn) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionEndTurnType

type ManagedAgentsSessionEndTurnType string
const (
	ManagedAgentsSessionEndTurnTypeEndTurn ManagedAgentsSessionEndTurnType = "end_turn"
)

type ManagedAgentsSessionErrorEvent

type ManagedAgentsSessionErrorEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// An unknown or unexpected error occurred during session execution. A fallback
	// variant; clients that don't recognize a new error code can match on
	// `retry_status` and `message` alone.
	Error ManagedAgentsSessionErrorEventErrorUnion `json:"error" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.error".
	Type ManagedAgentsSessionErrorEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Error       respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An error event indicating a problem occurred during session execution.

func (ManagedAgentsSessionErrorEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionErrorEvent) UnmarshalJSON

func (r *ManagedAgentsSessionErrorEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionErrorEventErrorUnion

type ManagedAgentsSessionErrorEventErrorUnion struct {
	Message string `json:"message"`
	// This field is a union of [ManagedAgentsUnknownErrorRetryStatusUnion],
	// [ManagedAgentsModelOverloadedErrorRetryStatusUnion],
	// [ManagedAgentsModelRateLimitedErrorRetryStatusUnion],
	// [ManagedAgentsModelRequestFailedErrorRetryStatusUnion],
	// [ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion],
	// [ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion],
	// [ManagedAgentsBillingErrorRetryStatusUnion],
	// [ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion]
	RetryStatus ManagedAgentsSessionErrorEventErrorUnionRetryStatus `json:"retry_status"`
	// Any of "unknown_error", "model_overloaded_error", "model_rate_limited_error",
	// "model_request_failed_error", "mcp_connection_failed_error",
	// "mcp_authentication_failed_error", "billing_error",
	// "credential_host_unreachable_error".
	Type          string `json:"type"`
	MCPServerName string `json:"mcp_server_name"`
	// This field is from variant [ManagedAgentsCredentialHostUnreachableError].
	CredentialID string `json:"credential_id"`
	// This field is from variant [ManagedAgentsCredentialHostUnreachableError].
	VaultID string `json:"vault_id"`
	JSON    struct {
		Message       respjson.Field
		RetryStatus   respjson.Field
		Type          respjson.Field
		MCPServerName respjson.Field
		CredentialID  respjson.Field
		VaultID       respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionErrorEventErrorUnion contains all possible properties and values from ManagedAgentsUnknownError, ManagedAgentsModelOverloadedError, ManagedAgentsModelRateLimitedError, ManagedAgentsModelRequestFailedError, ManagedAgentsMCPConnectionFailedError, ManagedAgentsMCPAuthenticationFailedError, ManagedAgentsBillingError, ManagedAgentsCredentialHostUnreachableError.

Use the ManagedAgentsSessionErrorEventErrorUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionErrorEventErrorUnion) AsAny

func (u ManagedAgentsSessionErrorEventErrorUnion) AsAny() anyManagedAgentsSessionErrorEventError

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionErrorEventErrorUnion.AsAny().(type) {
case qoder.ManagedAgentsUnknownError:
case qoder.ManagedAgentsModelOverloadedError:
case qoder.ManagedAgentsModelRateLimitedError:
case qoder.ManagedAgentsModelRequestFailedError:
case qoder.ManagedAgentsMCPConnectionFailedError:
case qoder.ManagedAgentsMCPAuthenticationFailedError:
case qoder.ManagedAgentsBillingError:
case qoder.ManagedAgentsCredentialHostUnreachableError:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionErrorEventErrorUnion) AsBillingError

func (ManagedAgentsSessionErrorEventErrorUnion) AsCredentialHostUnreachableError

func (ManagedAgentsSessionErrorEventErrorUnion) AsMCPAuthenticationFailedError

func (ManagedAgentsSessionErrorEventErrorUnion) AsMCPConnectionFailedError

func (ManagedAgentsSessionErrorEventErrorUnion) AsModelOverloadedError

func (ManagedAgentsSessionErrorEventErrorUnion) AsModelRateLimitedError

func (ManagedAgentsSessionErrorEventErrorUnion) AsModelRequestFailedError

func (ManagedAgentsSessionErrorEventErrorUnion) AsUnknownError

func (ManagedAgentsSessionErrorEventErrorUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionErrorEventErrorUnion) UnmarshalJSON

func (r *ManagedAgentsSessionErrorEventErrorUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionErrorEventErrorUnionRetryStatus

type ManagedAgentsSessionErrorEventErrorUnionRetryStatus struct {
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionErrorEventErrorUnionRetryStatus is an implicit subunion of ManagedAgentsSessionErrorEventErrorUnion. ManagedAgentsSessionErrorEventErrorUnionRetryStatus provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionErrorEventErrorUnion.

func (*ManagedAgentsSessionErrorEventErrorUnionRetryStatus) UnmarshalJSON

type ManagedAgentsSessionErrorEventType

type ManagedAgentsSessionErrorEventType string
const (
	ManagedAgentsSessionErrorEventTypeSessionError ManagedAgentsSessionErrorEventType = "session.error"
)

type ManagedAgentsSessionEventUnion

type ManagedAgentsSessionEventUnion struct {
	ModelCredits          float64 `json:"model_credits"`
	SandboxRuntimeCredits float64 `json:"sandbox_runtime_credits"`
	TotalCredits          float64 `json:"total_credits"`
	ID                    string  `json:"id"`
	// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion],
	// [[]ManagedAgentsAgentMessageEventContentUnion],
	// [[]ManagedAgentsAgentMCPToolResultEventContentUnion],
	// [[]ManagedAgentsAgentToolResultEventContentUnion],
	// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion],
	// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion],
	// [[]ManagedAgentsUserToolResultEventContentUnion],
	// [[]ManagedAgentsSystemContentBlock]
	Content ManagedAgentsSessionEventUnionContent `json:"content"`
	// Any of "user.message", "user.interrupt", "user.tool_confirmation",
	// "user.custom_tool_result", "agent.custom_tool_use", "agent.message",
	// "agent.thinking", "agent.mcp_tool_use", "agent.mcp_tool_result",
	// "agent.tool_use", "agent.tool_result", "agent.thread_message_received",
	// "agent.thread_message_sent", "agent.thread_context_compacted", "session.error",
	// "session.status_rescheduled", "session.status_running", "session.status_idle",
	// "session.status_terminated", "session.thread_created",
	// "span.outcome_evaluation_start", "span.outcome_evaluation_end",
	// "span.model_request_start", "span.model_request_end",
	// "span.outcome_evaluation_ongoing", "user.define_outcome", "session.deleted",
	// "session.thread_status_running", "session.thread_status_idle",
	// "session.thread_status_terminated", "user.tool_result",
	// "session.thread_status_rescheduled", "session.updated", "system.message",
	// "session.usage".
	Type            string    `json:"type"`
	ProcessedAt     time.Time `json:"processed_at"`
	SessionThreadID string    `json:"session_thread_id"`
	Result          string    `json:"result"`
	ToolUseID       string    `json:"tool_use_id"`
	// This field is from variant [ManagedAgentsUserToolConfirmationEvent].
	DenyMessage string `json:"deny_message"`
	// This field is from variant [ManagedAgentsUserCustomToolResultEvent].
	CustomToolUseID string `json:"custom_tool_use_id"`
	IsError         bool   `json:"is_error"`
	Input           any    `json:"input"`
	Name            string `json:"name"`
	// This field is from variant [ManagedAgentsAgentMCPToolUseEvent].
	MCPServerName       string `json:"mcp_server_name"`
	EvaluatedPermission string `json:"evaluated_permission"`
	// This field is from variant [ManagedAgentsAgentMCPToolResultEvent].
	MCPToolUseID string `json:"mcp_tool_use_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].
	FromSessionThreadID string `json:"from_session_thread_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].
	FromAgentName string `json:"from_agent_name"`
	// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].
	ToSessionThreadID string `json:"to_session_thread_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].
	ToAgentName string `json:"to_agent_name"`
	// This field is from variant [ManagedAgentsSessionErrorEvent].
	Error ManagedAgentsSessionErrorEventErrorUnion `json:"error"`
	// This field is a union of
	// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],
	// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion]
	StopReason ManagedAgentsSessionEventUnionStopReason `json:"stop_reason"`
	AgentName  string                                   `json:"agent_name"`
	Iteration  int64                                    `json:"iteration"`
	OutcomeID  string                                   `json:"outcome_id"`
	// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].
	Explanation string `json:"explanation"`
	// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].
	OutcomeEvaluationStartID string `json:"outcome_evaluation_start_id"`
	// This field is a union of [ManagedAgentsSpanModelUsage],
	// [ManagedAgentsSessionUsageSnapshot]
	Usage ManagedAgentsSessionEventUnionUsage `json:"usage"`
	// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].
	ModelRequestStartID string `json:"model_request_start_id"`
	// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].
	ModelUsage ManagedAgentsSpanModelUsage `json:"model_usage"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	MaxIterations int64 `json:"max_iterations"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Rubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:"rubric"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Agent ManagedAgentsSessionAgent `json:"agent"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Budget ManagedAgentsBudgetLimit `json:"budget"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Metadata map[string]string `json:"metadata"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Title string `json:"title"`
	JSON  struct {
		ModelCredits             respjson.Field
		SandboxRuntimeCredits    respjson.Field
		TotalCredits             respjson.Field
		ID                       respjson.Field
		Content                  respjson.Field
		Type                     respjson.Field
		ProcessedAt              respjson.Field
		SessionThreadID          respjson.Field
		Result                   respjson.Field
		ToolUseID                respjson.Field
		DenyMessage              respjson.Field
		CustomToolUseID          respjson.Field
		IsError                  respjson.Field
		Input                    respjson.Field
		Name                     respjson.Field
		MCPServerName            respjson.Field
		EvaluatedPermission      respjson.Field
		MCPToolUseID             respjson.Field
		FromSessionThreadID      respjson.Field
		FromAgentName            respjson.Field
		ToSessionThreadID        respjson.Field
		ToAgentName              respjson.Field
		Error                    respjson.Field
		StopReason               respjson.Field
		AgentName                respjson.Field
		Iteration                respjson.Field
		OutcomeID                respjson.Field
		Explanation              respjson.Field
		OutcomeEvaluationStartID respjson.Field
		Usage                    respjson.Field
		ModelRequestStartID      respjson.Field
		ModelUsage               respjson.Field
		Description              respjson.Field
		MaxIterations            respjson.Field
		Rubric                   respjson.Field
		Agent                    respjson.Field
		Budget                   respjson.Field
		Metadata                 respjson.Field
		Title                    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionEventUnion contains all possible properties and values from ManagedAgentsUserMessageEvent, ManagedAgentsUserInterruptEvent, ManagedAgentsUserToolConfirmationEvent, ManagedAgentsUserCustomToolResultEvent, ManagedAgentsAgentCustomToolUseEvent, ManagedAgentsAgentMessageEvent, ManagedAgentsAgentThinkingEvent, ManagedAgentsAgentMCPToolUseEvent, ManagedAgentsAgentMCPToolResultEvent, ManagedAgentsAgentToolUseEvent, ManagedAgentsAgentToolResultEvent, ManagedAgentsAgentThreadMessageReceivedEvent, ManagedAgentsAgentThreadMessageSentEvent, ManagedAgentsAgentThreadContextCompactedEvent, ManagedAgentsSessionErrorEvent, ManagedAgentsSessionStatusRescheduledEvent, ManagedAgentsSessionStatusRunningEvent, ManagedAgentsSessionStatusIdleEvent, ManagedAgentsSessionStatusTerminatedEvent, ManagedAgentsSessionThreadCreatedEvent, ManagedAgentsSpanOutcomeEvaluationStartEvent, ManagedAgentsSpanOutcomeEvaluationEndEvent, ManagedAgentsSpanModelRequestStartEvent, ManagedAgentsSpanModelRequestEndEvent, ManagedAgentsSpanOutcomeEvaluationOngoingEvent, ManagedAgentsUserDefineOutcomeEvent, ManagedAgentsSessionDeletedEvent, ManagedAgentsSessionThreadStatusRunningEvent, ManagedAgentsSessionThreadStatusIdleEvent, ManagedAgentsSessionThreadStatusTerminatedEvent, ManagedAgentsUserToolResultEvent, ManagedAgentsSessionThreadStatusRescheduledEvent, ManagedAgentsSessionUpdatedEvent, ManagedAgentsSystemMessageEvent, ManagedAgentsSessionUsageEvent.

Use the ManagedAgentsSessionEventUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionEventUnion) AsAgentCustomToolUse

func (ManagedAgentsSessionEventUnion) AsAgentMCPToolResult

func (ManagedAgentsSessionEventUnion) AsAgentMCPToolUse

func (ManagedAgentsSessionEventUnion) AsAgentMessage

func (ManagedAgentsSessionEventUnion) AsAgentThinking

func (ManagedAgentsSessionEventUnion) AsAgentThreadContextCompacted

func (ManagedAgentsSessionEventUnion) AsAgentThreadMessageReceived

func (ManagedAgentsSessionEventUnion) AsAgentThreadMessageSent

func (ManagedAgentsSessionEventUnion) AsAgentToolResult

func (ManagedAgentsSessionEventUnion) AsAgentToolUse

func (ManagedAgentsSessionEventUnion) AsAny

func (u ManagedAgentsSessionEventUnion) AsAny() anyManagedAgentsSessionEvent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionEventUnion.AsAny().(type) {
case qoder.ManagedAgentsUserMessageEvent:
case qoder.ManagedAgentsUserInterruptEvent:
case qoder.ManagedAgentsUserToolConfirmationEvent:
case qoder.ManagedAgentsUserCustomToolResultEvent:
case qoder.ManagedAgentsAgentCustomToolUseEvent:
case qoder.ManagedAgentsAgentMessageEvent:
case qoder.ManagedAgentsAgentThinkingEvent:
case qoder.ManagedAgentsAgentMCPToolUseEvent:
case qoder.ManagedAgentsAgentMCPToolResultEvent:
case qoder.ManagedAgentsAgentToolUseEvent:
case qoder.ManagedAgentsAgentToolResultEvent:
case qoder.ManagedAgentsAgentThreadMessageReceivedEvent:
case qoder.ManagedAgentsAgentThreadMessageSentEvent:
case qoder.ManagedAgentsAgentThreadContextCompactedEvent:
case qoder.ManagedAgentsSessionErrorEvent:
case qoder.ManagedAgentsSessionStatusRescheduledEvent:
case qoder.ManagedAgentsSessionStatusRunningEvent:
case qoder.ManagedAgentsSessionStatusIdleEvent:
case qoder.ManagedAgentsSessionStatusTerminatedEvent:
case qoder.ManagedAgentsSessionThreadCreatedEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationStartEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationEndEvent:
case qoder.ManagedAgentsSpanModelRequestStartEvent:
case qoder.ManagedAgentsSpanModelRequestEndEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationOngoingEvent:
case qoder.ManagedAgentsUserDefineOutcomeEvent:
case qoder.ManagedAgentsSessionDeletedEvent:
case qoder.ManagedAgentsSessionThreadStatusRunningEvent:
case qoder.ManagedAgentsSessionThreadStatusIdleEvent:
case qoder.ManagedAgentsSessionThreadStatusTerminatedEvent:
case qoder.ManagedAgentsUserToolResultEvent:
case qoder.ManagedAgentsSessionThreadStatusRescheduledEvent:
case qoder.ManagedAgentsSessionUpdatedEvent:
case qoder.ManagedAgentsSystemMessageEvent:
case qoder.ManagedAgentsSessionUsageEvent:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionEventUnion) AsSessionDeleted

func (ManagedAgentsSessionEventUnion) AsSessionError

func (ManagedAgentsSessionEventUnion) AsSessionStatusIdle

func (ManagedAgentsSessionEventUnion) AsSessionStatusRescheduled

func (ManagedAgentsSessionEventUnion) AsSessionStatusRunning

func (ManagedAgentsSessionEventUnion) AsSessionStatusTerminated

func (ManagedAgentsSessionEventUnion) AsSessionThreadCreated

func (ManagedAgentsSessionEventUnion) AsSessionThreadStatusIdle

func (ManagedAgentsSessionEventUnion) AsSessionThreadStatusRescheduled

func (ManagedAgentsSessionEventUnion) AsSessionThreadStatusRunning

func (ManagedAgentsSessionEventUnion) AsSessionThreadStatusTerminated

func (ManagedAgentsSessionEventUnion) AsSessionUpdated

func (ManagedAgentsSessionEventUnion) AsSessionUsage

func (ManagedAgentsSessionEventUnion) AsSpanModelRequestEnd

func (ManagedAgentsSessionEventUnion) AsSpanModelRequestStart

func (ManagedAgentsSessionEventUnion) AsSpanOutcomeEvaluationEnd

func (ManagedAgentsSessionEventUnion) AsSpanOutcomeEvaluationOngoing

func (ManagedAgentsSessionEventUnion) AsSpanOutcomeEvaluationStart

func (ManagedAgentsSessionEventUnion) AsSystemMessage

func (ManagedAgentsSessionEventUnion) AsUserCustomToolResult

func (ManagedAgentsSessionEventUnion) AsUserDefineOutcome

func (ManagedAgentsSessionEventUnion) AsUserInterrupt

func (ManagedAgentsSessionEventUnion) AsUserMessage

func (ManagedAgentsSessionEventUnion) AsUserToolConfirmation

func (ManagedAgentsSessionEventUnion) AsUserToolResult

func (ManagedAgentsSessionEventUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionEventUnion) UnmarshalJSON

func (r *ManagedAgentsSessionEventUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionEventUnionContent

type ManagedAgentsSessionEventUnionContent struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.
	OfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentMessageEventContentUnion] instead of an object.
	OfManagedAgentsAgentMessageEventContentArray []ManagedAgentsAgentMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentMCPToolResultEventContentUnion] instead of an object.
	OfManagedAgentsAgentMCPToolResultEventContentArray []ManagedAgentsAgentMCPToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentToolResultEventContentUnion] instead of an object.
	OfManagedAgentsAgentToolResultEventContentArray []ManagedAgentsAgentToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion] instead of an
	// object.
	OfManagedAgentsAgentThreadMessageReceivedEventContentArray []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion] instead of an
	// object.
	OfManagedAgentsAgentThreadMessageSentEventContentArray []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsSystemContentBlock] instead of an object.
	OfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:",inline"`
	JSON                                   struct {
		OfManagedAgentsUserMessageEventContentArray                respjson.Field
		OfManagedAgentsUserCustomToolResultEventContentArray       respjson.Field
		OfManagedAgentsAgentMessageEventContentArray               respjson.Field
		OfManagedAgentsAgentMCPToolResultEventContentArray         respjson.Field
		OfManagedAgentsAgentToolResultEventContentArray            respjson.Field
		OfManagedAgentsAgentThreadMessageReceivedEventContentArray respjson.Field
		OfManagedAgentsAgentThreadMessageSentEventContentArray     respjson.Field
		OfManagedAgentsUserToolResultEventContentArray             respjson.Field
		OfManagedAgentsSystemContentBlockArray                     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionEventUnionContent is an implicit subunion of ManagedAgentsSessionEventUnion. ManagedAgentsSessionEventUnionContent provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionEventUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsUserMessageEventContentArray OfManagedAgentsUserCustomToolResultEventContentArray OfManagedAgentsAgentMessageEventContentArray OfManagedAgentsAgentMCPToolResultEventContentArray OfManagedAgentsAgentToolResultEventContentArray OfManagedAgentsAgentThreadMessageReceivedEventContentArray OfManagedAgentsAgentThreadMessageSentEventContentArray OfManagedAgentsUserToolResultEventContentArray OfManagedAgentsSystemContentBlockArray]

func (*ManagedAgentsSessionEventUnionContent) UnmarshalJSON

func (r *ManagedAgentsSessionEventUnionContent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionEventUnionStopReason

type ManagedAgentsSessionEventUnionStopReason struct {
	Type string `json:"type"`
	// This field is from variant
	// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],
	// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion].
	EventIDs []string `json:"event_ids"`
	JSON     struct {
		Type     respjson.Field
		EventIDs respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionEventUnionStopReason is an implicit subunion of ManagedAgentsSessionEventUnion. ManagedAgentsSessionEventUnionStopReason provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionEventUnion.

func (*ManagedAgentsSessionEventUnionStopReason) UnmarshalJSON

func (r *ManagedAgentsSessionEventUnionStopReason) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionEventUnionUsage

type ManagedAgentsSessionEventUnionUsage struct {
	Credits float64 `json:"credits"`
	// This field is from variant [ManagedAgentsSpanModelUsage].
	CacheCreationInputTokens int64 `json:"cache_creation_input_tokens"`
	CacheReadInputTokens     int64 `json:"cache_read_input_tokens"`
	InputTokens              int64 `json:"input_tokens"`
	OutputTokens             int64 `json:"output_tokens"`
	// This field is from variant [ManagedAgentsSpanModelUsage].
	Speed ManagedAgentsSpanModelUsageSpeed `json:"speed"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ActiveSeconds float64 `json:"active_seconds"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	CacheCreation ManagedAgentsCacheCreationUsage `json:"cache_creation"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ListCost MonetaryAmount `json:"list_cost"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ServerToolUse ManagedAgentsServerToolUsage `json:"server_tool_use"`
	JSON          struct {
		Credits                  respjson.Field
		CacheCreationInputTokens respjson.Field
		CacheReadInputTokens     respjson.Field
		InputTokens              respjson.Field
		OutputTokens             respjson.Field
		Speed                    respjson.Field
		ActiveSeconds            respjson.Field
		CacheCreation            respjson.Field
		ListCost                 respjson.Field
		ServerToolUse            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionEventUnionUsage is an implicit subunion of ManagedAgentsSessionEventUnion. ManagedAgentsSessionEventUnionUsage provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionEventUnion.

func (*ManagedAgentsSessionEventUnionUsage) UnmarshalJSON

func (r *ManagedAgentsSessionEventUnionUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionMultiagentCoordinator

type ManagedAgentsSessionMultiagentCoordinator struct {
	// Full `agent` definitions the coordinator may spawn as session threads.
	Agents []ManagedAgentsSessionMultiagentCoordinatorAgentUnion `json:"agents" api:"required"`
	// Any of "coordinator".
	Type ManagedAgentsSessionMultiagentCoordinatorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Agents      respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved coordinator topology with full agent definitions for each roster member.

func (ManagedAgentsSessionMultiagentCoordinator) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionMultiagentCoordinator) UnmarshalJSON

func (r *ManagedAgentsSessionMultiagentCoordinator) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionMultiagentCoordinatorAgentUnion

type ManagedAgentsSessionMultiagentCoordinatorAgentUnion struct {
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	ID string `json:"id"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	MCPServers []ManagedAgentsMCPServerURLDefinition `json:"mcp_servers"`
	// This field is a union of [ManagedAgentsModelConfig], [string]
	Model ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel `json:"model"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Name string `json:"name"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Skills []ManagedAgentsSessionThreadAgentSkillUnion `json:"skills"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	System string `json:"system"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Tools []ManagedAgentsSessionThreadAgentToolUnion `json:"tools"`
	// Any of "agent", "advisor".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Version int64 `json:"version"`
	JSON    struct {
		ID          respjson.Field
		Description respjson.Field
		MCPServers  respjson.Field
		Model       respjson.Field
		Name        respjson.Field
		Skills      respjson.Field
		System      respjson.Field
		Tools       respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionMultiagentCoordinatorAgentUnion contains all possible properties and values from ManagedAgentsSessionThreadAgent, ManagedAgentsAdvisor.

Use the ManagedAgentsSessionMultiagentCoordinatorAgentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAdvisor

func (ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAgent

func (ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAny

func (u ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAny() anyManagedAgentsSessionMultiagentCoordinatorAgent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionMultiagentCoordinatorAgentUnion.AsAny().(type) {
case qoder.ManagedAgentsSessionThreadAgent:
case qoder.ManagedAgentsAdvisor:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionMultiagentCoordinatorAgentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionMultiagentCoordinatorAgentUnion) UnmarshalJSON

type ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel

type ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field is from variant [ManagedAgentsModelConfig].
	ID ManagedAgentsModel `json:"id"`
	// This field is from variant [ManagedAgentsModelConfig].
	Effort ManagedAgentsModelConfigEffortUnion `json:"effort"`
	// This field is from variant [ManagedAgentsModelConfig].
	InferenceGeo string `json:"inference_geo"`
	// This field is from variant [ManagedAgentsModelConfig].
	Speed ManagedAgentsModelConfigSpeed `json:"speed"`
	JSON  struct {
		OfString     respjson.Field
		ID           respjson.Field
		Effort       respjson.Field
		InferenceGeo respjson.Field
		Speed        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel is an implicit subunion of ManagedAgentsSessionMultiagentCoordinatorAgentUnion. ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionMultiagentCoordinatorAgentUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel) UnmarshalJSON

type ManagedAgentsSessionMultiagentCoordinatorType

type ManagedAgentsSessionMultiagentCoordinatorType string
const (
	ManagedAgentsSessionMultiagentCoordinatorTypeCoordinator ManagedAgentsSessionMultiagentCoordinatorType = "coordinator"
)

type ManagedAgentsSessionRateLimitedRunError

type ManagedAgentsSessionRateLimitedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "session_rate_limited_error".
	Type ManagedAgentsSessionRateLimitedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Session creation was rejected due to rate limiting. The schedule keeps firing; subsequent runs may succeed.

func (ManagedAgentsSessionRateLimitedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionRateLimitedRunError) UnmarshalJSON

func (r *ManagedAgentsSessionRateLimitedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionRateLimitedRunErrorType

type ManagedAgentsSessionRateLimitedRunErrorType string
const (
	ManagedAgentsSessionRateLimitedRunErrorTypeSessionRateLimitedError ManagedAgentsSessionRateLimitedRunErrorType = "session_rate_limited_error"
)

type ManagedAgentsSessionRequiresAction

type ManagedAgentsSessionRequiresAction struct {
	// The ids of events the agent is blocked on. Resolving fewer than all re-emits
	// `session.status_idle` with the remainder.
	EventIDs []string `json:"event_ids" api:"required"`
	// Any of "requires_action".
	Type ManagedAgentsSessionRequiresActionType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EventIDs    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.

func (ManagedAgentsSessionRequiresAction) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionRequiresAction) UnmarshalJSON

func (r *ManagedAgentsSessionRequiresAction) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionRequiresActionType

type ManagedAgentsSessionRequiresActionType string
const (
	ManagedAgentsSessionRequiresActionTypeRequiresAction ManagedAgentsSessionRequiresActionType = "requires_action"
)

type ManagedAgentsSessionResourceConfigUnion

type ManagedAgentsSessionResourceConfigUnion struct {
	// Any of "github_repository", "file", "memory_store".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResourceConfig].
	URL string `json:"url"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResourceConfig].
	Checkout  ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion `json:"checkout"`
	MountPath string                                                   `json:"mount_path"`
	// This field is from variant [ManagedAgentsFileResourceConfig].
	FileID string `json:"file_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResourceConfig].
	MemoryStoreID string `json:"memory_store_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResourceConfig].
	Access ManagedAgentsMemoryStoreResourceConfigAccess `json:"access"`
	// This field is from variant [ManagedAgentsMemoryStoreResourceConfig].
	Instructions string `json:"instructions"`
	JSON         struct {
		Type          respjson.Field
		URL           respjson.Field
		Checkout      respjson.Field
		MountPath     respjson.Field
		FileID        respjson.Field
		MemoryStoreID respjson.Field
		Access        respjson.Field
		Instructions  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionResourceConfigUnion contains all possible properties and values from ManagedAgentsGitHubRepositoryResourceConfig, ManagedAgentsFileResourceConfig, ManagedAgentsMemoryStoreResourceConfig.

Use the ManagedAgentsSessionResourceConfigUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionResourceConfigUnion) AsAny

func (u ManagedAgentsSessionResourceConfigUnion) AsAny() anyManagedAgentsSessionResourceConfig

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionResourceConfigUnion.AsAny().(type) {
case qoder.ManagedAgentsGitHubRepositoryResourceConfig:
case qoder.ManagedAgentsFileResourceConfig:
case qoder.ManagedAgentsMemoryStoreResourceConfig:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionResourceConfigUnion) AsFile

func (ManagedAgentsSessionResourceConfigUnion) AsGitHubRepository

func (ManagedAgentsSessionResourceConfigUnion) AsMemoryStore

func (ManagedAgentsSessionResourceConfigUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionResourceConfigUnion) UnmarshalJSON

func (r *ManagedAgentsSessionResourceConfigUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError

type ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError struct {
	// Any of "session_resource_not_found_error".
	Type ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A referenced resource no longer exists and its kind was not reported.

func (ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType

type ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType string
const (
	ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorTypeSessionResourceNotFoundError ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType = "session_resource_not_found_error"
)

type ManagedAgentsSessionResourceNotFoundRunError

type ManagedAgentsSessionResourceNotFoundRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "session_resource_not_found_error".
	Type ManagedAgentsSessionResourceNotFoundRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A referenced resource no longer exists and its kind was not reported.

func (ManagedAgentsSessionResourceNotFoundRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionResourceNotFoundRunError) UnmarshalJSON

func (r *ManagedAgentsSessionResourceNotFoundRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionResourceNotFoundRunErrorType

type ManagedAgentsSessionResourceNotFoundRunErrorType string
const (
	ManagedAgentsSessionResourceNotFoundRunErrorTypeSessionResourceNotFoundError ManagedAgentsSessionResourceNotFoundRunErrorType = "session_resource_not_found_error"
)

type ManagedAgentsSessionResourceUnion

type ManagedAgentsSessionResourceUnion struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	MountPath string    `json:"mount_path"`
	// Any of "github_repository", "file", "memory_store".
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updated_at"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResource].
	URL string `json:"url"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResource].
	Checkout ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:"checkout"`
	// This field is from variant [ManagedAgentsFileResource].
	FileID string `json:"file_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	MemoryStoreID string `json:"memory_store_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Access ManagedAgentsMemoryStoreResourceAccess `json:"access"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Instructions string `json:"instructions"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Name string `json:"name"`
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		MountPath     respjson.Field
		Type          respjson.Field
		UpdatedAt     respjson.Field
		URL           respjson.Field
		Checkout      respjson.Field
		FileID        respjson.Field
		MemoryStoreID respjson.Field
		Access        respjson.Field
		Description   respjson.Field
		Instructions  respjson.Field
		Name          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionResourceUnion contains all possible properties and values from ManagedAgentsGitHubRepositoryResource, ManagedAgentsFileResource, ManagedAgentsMemoryStoreResource.

Use the ManagedAgentsSessionResourceUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionResourceUnion) AsAny

func (u ManagedAgentsSessionResourceUnion) AsAny() anyManagedAgentsSessionResource

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionResourceUnion.AsAny().(type) {
case qoder.ManagedAgentsGitHubRepositoryResource:
case qoder.ManagedAgentsFileResource:
case qoder.ManagedAgentsMemoryStoreResource:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionResourceUnion) AsFile

func (ManagedAgentsSessionResourceUnion) AsGitHubRepository

func (ManagedAgentsSessionResourceUnion) AsMemoryStore

func (ManagedAgentsSessionResourceUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionResourceUnion) UnmarshalJSON

func (r *ManagedAgentsSessionResourceUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionRetriesExhausted

type ManagedAgentsSessionRetriesExhausted struct {
	// Any of "retries_exhausted".
	Type ManagedAgentsSessionRetriesExhaustedType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`.

func (ManagedAgentsSessionRetriesExhausted) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionRetriesExhausted) UnmarshalJSON

func (r *ManagedAgentsSessionRetriesExhausted) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionRetriesExhaustedType

type ManagedAgentsSessionRetriesExhaustedType string
const (
	ManagedAgentsSessionRetriesExhaustedTypeRetriesExhausted ManagedAgentsSessionRetriesExhaustedType = "retries_exhausted"
)

type ManagedAgentsSessionStats

type ManagedAgentsSessionStats struct {
	// Cumulative time in seconds the session spent in `running` status. Excludes idle
	// time.
	ActiveSeconds float64 `json:"active_seconds"`
	// Elapsed time since session creation in seconds. For terminated sessions, frozen
	// at the final update.
	DurationSeconds float64 `json:"duration_seconds"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActiveSeconds   respjson.Field
		DurationSeconds respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Timing statistics for a session.

func (ManagedAgentsSessionStats) RawJSON

func (r ManagedAgentsSessionStats) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionStats) UnmarshalJSON

func (r *ManagedAgentsSessionStats) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionStatus

type ManagedAgentsSessionStatus string

SessionStatus enum

const (
	ManagedAgentsSessionStatusRescheduling ManagedAgentsSessionStatus = "rescheduling"
	ManagedAgentsSessionStatusRunning      ManagedAgentsSessionStatus = "running"
	ManagedAgentsSessionStatusIdle         ManagedAgentsSessionStatus = "idle"
	ManagedAgentsSessionStatusTerminated   ManagedAgentsSessionStatus = "terminated"
)

type ManagedAgentsSessionStatusIdleEvent

type ManagedAgentsSessionStatusIdleEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// The agent completed its turn naturally and is ready for the next user message.
	StopReason ManagedAgentsSessionStatusIdleEventStopReasonUnion `json:"stop_reason" api:"required"`
	// Any of "session.status_idle".
	Type ManagedAgentsSessionStatusIdleEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		StopReason  respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates the agent has paused and is awaiting user input.

func (ManagedAgentsSessionStatusIdleEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionStatusIdleEvent) UnmarshalJSON

func (r *ManagedAgentsSessionStatusIdleEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionStatusIdleEventStopReasonUnion

type ManagedAgentsSessionStatusIdleEventStopReasonUnion struct {
	// Any of "end_turn", "requires_action", "retries_exhausted", "budget_reached".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsSessionRequiresAction].
	EventIDs []string `json:"event_ids"`
	JSON     struct {
		Type     respjson.Field
		EventIDs respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionStatusIdleEventStopReasonUnion contains all possible properties and values from ManagedAgentsSessionEndTurn, ManagedAgentsSessionRequiresAction, ManagedAgentsSessionRetriesExhausted, ManagedAgentsSessionBudgetReached.

Use the ManagedAgentsSessionStatusIdleEventStopReasonUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsAny

func (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsAny() anyManagedAgentsSessionStatusIdleEventStopReason

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionStatusIdleEventStopReasonUnion.AsAny().(type) {
case qoder.ManagedAgentsSessionEndTurn:
case qoder.ManagedAgentsSessionRequiresAction:
case qoder.ManagedAgentsSessionRetriesExhausted:
case qoder.ManagedAgentsSessionBudgetReached:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsBudgetReached

func (ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsEndTurn

func (ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsRequiresAction

func (ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsRetriesExhausted

func (ManagedAgentsSessionStatusIdleEventStopReasonUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionStatusIdleEventStopReasonUnion) UnmarshalJSON

type ManagedAgentsSessionStatusIdleEventType

type ManagedAgentsSessionStatusIdleEventType string
const (
	ManagedAgentsSessionStatusIdleEventTypeSessionStatusIdle ManagedAgentsSessionStatusIdleEventType = "session.status_idle"
)

type ManagedAgentsSessionStatusRescheduledEvent

type ManagedAgentsSessionStatusRescheduledEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.status_rescheduled".
	Type ManagedAgentsSessionStatusRescheduledEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates the session is recovering from an error state and is rescheduled for execution.

func (ManagedAgentsSessionStatusRescheduledEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionStatusRescheduledEvent) UnmarshalJSON

func (r *ManagedAgentsSessionStatusRescheduledEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionStatusRescheduledEventType

type ManagedAgentsSessionStatusRescheduledEventType string
const (
	ManagedAgentsSessionStatusRescheduledEventTypeSessionStatusRescheduled ManagedAgentsSessionStatusRescheduledEventType = "session.status_rescheduled"
)

type ManagedAgentsSessionStatusRunningEvent

type ManagedAgentsSessionStatusRunningEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.status_running".
	Type ManagedAgentsSessionStatusRunningEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates the session is actively running and the agent is working.

func (ManagedAgentsSessionStatusRunningEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionStatusRunningEvent) UnmarshalJSON

func (r *ManagedAgentsSessionStatusRunningEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionStatusRunningEventType

type ManagedAgentsSessionStatusRunningEventType string
const (
	ManagedAgentsSessionStatusRunningEventTypeSessionStatusRunning ManagedAgentsSessionStatusRunningEventType = "session.status_running"
)

type ManagedAgentsSessionStatusTerminatedEvent

type ManagedAgentsSessionStatusTerminatedEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.status_terminated".
	Type ManagedAgentsSessionStatusTerminatedEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Indicates the session has terminated, either due to an error or completion.

func (ManagedAgentsSessionStatusTerminatedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionStatusTerminatedEvent) UnmarshalJSON

func (r *ManagedAgentsSessionStatusTerminatedEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionStatusTerminatedEventType

type ManagedAgentsSessionStatusTerminatedEventType string
const (
	ManagedAgentsSessionStatusTerminatedEventTypeSessionStatusTerminated ManagedAgentsSessionStatusTerminatedEventType = "session.status_terminated"
)

type ManagedAgentsSessionThread

type ManagedAgentsSessionThread struct {
	// Unique identifier for this thread.
	ID string `json:"id" api:"required"`
	// The resolved agent a session thread runs: a saved-agent snapshot, the platform
	// advisor entry, or an inline-defined (ephemeral) agent snapshot.
	Agent ManagedAgentsSessionThreadAgentUnion `json:"agent" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Parent thread that spawned this thread. Null for the primary thread.
	ParentThreadID string `json:"parent_thread_id" api:"required"`
	// The session this thread belongs to.
	SessionID string `json:"session_id" api:"required"`
	// Timing statistics for a session thread.
	Stats ManagedAgentsSessionThreadStats `json:"stats" api:"required"`
	// SessionThreadStatus enum
	//
	// Any of "running", "idle", "rescheduling", "terminated".
	Status ManagedAgentsSessionThreadStatus `json:"status" api:"required"`
	// Any of "session_thread".
	Type ManagedAgentsSessionThreadType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// Cumulative token usage for a session thread across all turns.
	Usage ManagedAgentsSessionThreadUsage `json:"usage" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		Agent          respjson.Field
		ArchivedAt     respjson.Field
		CreatedAt      respjson.Field
		ParentThreadID respjson.Field
		SessionID      respjson.Field
		Stats          respjson.Field
		Status         respjson.Field
		Type           respjson.Field
		UpdatedAt      respjson.Field
		Usage          respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An execution thread within a `session`. Each session has one primary thread plus zero or more child threads spawned by the coordinator.

func (ManagedAgentsSessionThread) RawJSON

func (r ManagedAgentsSessionThread) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThread) UnmarshalJSON

func (r *ManagedAgentsSessionThread) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadAgent

type ManagedAgentsSessionThreadAgent struct {
	ID          string                                `json:"id" api:"required"`
	Description string                                `json:"description" api:"required"`
	MCPServers  []ManagedAgentsMCPServerURLDefinition `json:"mcp_servers" api:"required"`
	// Model identifier and configuration.
	Model  ManagedAgentsModelConfig                    `json:"model" api:"required"`
	Name   string                                      `json:"name" api:"required"`
	Skills []ManagedAgentsSessionThreadAgentSkillUnion `json:"skills" api:"required"`
	System string                                      `json:"system" api:"required"`
	Tools  []ManagedAgentsSessionThreadAgentToolUnion  `json:"tools" api:"required"`
	// Any of "agent".
	Type    ManagedAgentsSessionThreadAgentType `json:"type" api:"required"`
	Version int64                               `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Description respjson.Field
		MCPServers  respjson.Field
		Model       respjson.Field
		Name        respjson.Field
		Skills      respjson.Field
		System      respjson.Field
		Tools       respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.

func (ManagedAgentsSessionThreadAgent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadAgent) UnmarshalJSON

func (r *ManagedAgentsSessionThreadAgent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadAgentSkillUnion

type ManagedAgentsSessionThreadAgentSkillUnion struct {
	SkillID string `json:"skill_id"`
	// Any of "qoder", "custom".
	Type    string `json:"type"`
	Version string `json:"version"`
	JSON    struct {
		SkillID respjson.Field
		Type    respjson.Field
		Version respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentSkillUnion contains all possible properties and values from ManagedAgentsQoderSkill, ManagedAgentsCustomSkill.

Use the ManagedAgentsSessionThreadAgentSkillUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionThreadAgentSkillUnion) AsAny

func (u ManagedAgentsSessionThreadAgentSkillUnion) AsAny() anyManagedAgentsSessionThreadAgentSkill

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionThreadAgentSkillUnion.AsAny().(type) {
case qoder.ManagedAgentsQoderSkill:
case qoder.ManagedAgentsCustomSkill:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionThreadAgentSkillUnion) AsCustom

func (ManagedAgentsSessionThreadAgentSkillUnion) AsQoder

func (ManagedAgentsSessionThreadAgentSkillUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadAgentSkillUnion) UnmarshalJSON

func (r *ManagedAgentsSessionThreadAgentSkillUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadAgentToolUnion

type ManagedAgentsSessionThreadAgentToolUnion struct {
	EnabledTools    []string `json:"enabled_tools"`
	DisallowedTools []string `json:"disallowed_tools"`
	// This field is a union of [[]ManagedAgentsAgentToolConfigUnion],
	// [[]ManagedAgentsMCPToolConfig]
	Configs ManagedAgentsSessionThreadAgentToolUnionConfigs `json:"configs"`
	// This field is a union of [ManagedAgentsAgentToolsetDefaultConfig],
	// [ManagedAgentsMCPToolsetDefaultConfig]
	DefaultConfig ManagedAgentsSessionThreadAgentToolUnionDefaultConfig `json:"default_config"`
	// Any of "agent_toolset_20260401", "mcp_toolset", "custom".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsMCPToolset].
	MCPServerName string `json:"mcp_server_name"`
	// This field is from variant [ManagedAgentsCustomTool].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsCustomTool].
	InputSchema ManagedAgentsCustomToolInputSchema `json:"input_schema"`
	// This field is from variant [ManagedAgentsCustomTool].
	Name string `json:"name"`
	JSON struct {
		EnabledTools    respjson.Field
		DisallowedTools respjson.Field
		Configs         respjson.Field
		DefaultConfig   respjson.Field
		Type            respjson.Field
		MCPServerName   respjson.Field
		Description     respjson.Field
		InputSchema     respjson.Field
		Name            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentToolUnion contains all possible properties and values from ManagedAgentsAgentToolset20260401, ManagedAgentsMCPToolset, ManagedAgentsCustomTool.

Use the ManagedAgentsSessionThreadAgentToolUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionThreadAgentToolUnion) AsAgentToolset20260401

func (ManagedAgentsSessionThreadAgentToolUnion) AsAny

func (u ManagedAgentsSessionThreadAgentToolUnion) AsAny() anyManagedAgentsSessionThreadAgentTool

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionThreadAgentToolUnion.AsAny().(type) {
case qoder.ManagedAgentsAgentToolset20260401:
case qoder.ManagedAgentsMCPToolset:
case qoder.ManagedAgentsCustomTool:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionThreadAgentToolUnion) AsCustom

func (ManagedAgentsSessionThreadAgentToolUnion) AsMCPToolset

func (ManagedAgentsSessionThreadAgentToolUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadAgentToolUnion) UnmarshalJSON

func (r *ManagedAgentsSessionThreadAgentToolUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadAgentToolUnionConfigs

type ManagedAgentsSessionThreadAgentToolUnionConfigs struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentToolConfigUnion] instead of an object.
	OfManagedAgentsAgentToolConfigArray []ManagedAgentsAgentToolConfigUnion `json:",inline"`
	// This field will be present if the value is a [[]ManagedAgentsMCPToolConfig]
	// instead of an object.
	OfManagedAgentsMCPToolConfigArray []ManagedAgentsMCPToolConfig `json:",inline"`
	JSON                              struct {
		OfManagedAgentsAgentToolConfigArray respjson.Field
		OfManagedAgentsMCPToolConfigArray   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentToolUnionConfigs is an implicit subunion of ManagedAgentsSessionThreadAgentToolUnion. ManagedAgentsSessionThreadAgentToolUnionConfigs provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionThreadAgentToolUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsAgentToolConfigArray OfManagedAgentsMCPToolConfigArray]

func (*ManagedAgentsSessionThreadAgentToolUnionConfigs) UnmarshalJSON

type ManagedAgentsSessionThreadAgentToolUnionDefaultConfig

type ManagedAgentsSessionThreadAgentToolUnionDefaultConfig struct {
	Enabled bool `json:"enabled"`
	// This field is a union of
	// [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion],
	// [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion]
	PermissionPolicy ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy `json:"permission_policy"`
	JSON             struct {
		Enabled          respjson.Field
		PermissionPolicy respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentToolUnionDefaultConfig is an implicit subunion of ManagedAgentsSessionThreadAgentToolUnion. ManagedAgentsSessionThreadAgentToolUnionDefaultConfig provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionThreadAgentToolUnion.

func (*ManagedAgentsSessionThreadAgentToolUnionDefaultConfig) UnmarshalJSON

type ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy

type ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy struct {
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy is an implicit subunion of ManagedAgentsSessionThreadAgentToolUnion. ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionThreadAgentToolUnion.

func (*ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy) UnmarshalJSON

type ManagedAgentsSessionThreadAgentType

type ManagedAgentsSessionThreadAgentType string
const (
	ManagedAgentsSessionThreadAgentTypeAgent ManagedAgentsSessionThreadAgentType = "agent"
)

type ManagedAgentsSessionThreadAgentUnion

type ManagedAgentsSessionThreadAgentUnion struct {
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	ID string `json:"id"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	MCPServers []ManagedAgentsMCPServerURLDefinition `json:"mcp_servers"`
	// This field is a union of [ManagedAgentsModelConfig], [string]
	Model ManagedAgentsSessionThreadAgentUnionModel `json:"model"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Name string `json:"name"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Skills []ManagedAgentsSessionThreadAgentSkillUnion `json:"skills"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	System string `json:"system"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Tools []ManagedAgentsSessionThreadAgentToolUnion `json:"tools"`
	// Any of "agent", "advisor".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsSessionThreadAgent].
	Version int64 `json:"version"`
	JSON    struct {
		ID          respjson.Field
		Description respjson.Field
		MCPServers  respjson.Field
		Model       respjson.Field
		Name        respjson.Field
		Skills      respjson.Field
		System      respjson.Field
		Tools       respjson.Field
		Type        respjson.Field
		Version     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentUnion contains all possible properties and values from ManagedAgentsSessionThreadAgent, ManagedAgentsAdvisor.

Use the ManagedAgentsSessionThreadAgentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionThreadAgentUnion) AsAdvisor

func (ManagedAgentsSessionThreadAgentUnion) AsAgent

func (ManagedAgentsSessionThreadAgentUnion) AsAny

func (u ManagedAgentsSessionThreadAgentUnion) AsAny() anyManagedAgentsSessionThreadAgent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionThreadAgentUnion.AsAny().(type) {
case qoder.ManagedAgentsSessionThreadAgent:
case qoder.ManagedAgentsAdvisor:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionThreadAgentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadAgentUnion) UnmarshalJSON

func (r *ManagedAgentsSessionThreadAgentUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadAgentUnionModel

type ManagedAgentsSessionThreadAgentUnionModel struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field is from variant [ManagedAgentsModelConfig].
	ID ManagedAgentsModel `json:"id"`
	// This field is from variant [ManagedAgentsModelConfig].
	Effort ManagedAgentsModelConfigEffortUnion `json:"effort"`
	// This field is from variant [ManagedAgentsModelConfig].
	InferenceGeo string `json:"inference_geo"`
	// This field is from variant [ManagedAgentsModelConfig].
	Speed ManagedAgentsModelConfigSpeed `json:"speed"`
	JSON  struct {
		OfString     respjson.Field
		ID           respjson.Field
		Effort       respjson.Field
		InferenceGeo respjson.Field
		Speed        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadAgentUnionModel is an implicit subunion of ManagedAgentsSessionThreadAgentUnion. ManagedAgentsSessionThreadAgentUnionModel provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsSessionThreadAgentUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ManagedAgentsSessionThreadAgentUnionModel) UnmarshalJSON

func (r *ManagedAgentsSessionThreadAgentUnionModel) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadCreatedEvent

type ManagedAgentsSessionThreadCreatedEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Name of the callable agent the thread runs.
	AgentName string `json:"agent_name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Public `sthr_` ID of the newly created thread.
	SessionThreadID string `json:"session_thread_id" api:"required"`
	// Any of "session.thread_created".
	Type ManagedAgentsSessionThreadCreatedEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		AgentName       respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when a subagent is spawned as a new thread. Written to the parent thread's output stream so clients observing the session see child creation.

func (ManagedAgentsSessionThreadCreatedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadCreatedEvent) UnmarshalJSON

func (r *ManagedAgentsSessionThreadCreatedEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadCreatedEventType

type ManagedAgentsSessionThreadCreatedEventType string
const (
	ManagedAgentsSessionThreadCreatedEventTypeSessionThreadCreated ManagedAgentsSessionThreadCreatedEventType = "session.thread_created"
)

type ManagedAgentsSessionThreadStats

type ManagedAgentsSessionThreadStats struct {
	// Cumulative time in seconds the thread spent actively running. Excludes idle
	// time.
	ActiveSeconds float64 `json:"active_seconds"`
	// Elapsed time since thread creation in seconds. For archived threads, frozen at
	// the final update.
	DurationSeconds float64 `json:"duration_seconds"`
	// Time in seconds for the thread to begin running. Zero for child threads, which
	// start immediately.
	StartupSeconds float64 `json:"startup_seconds"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActiveSeconds   respjson.Field
		DurationSeconds respjson.Field
		StartupSeconds  respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Timing statistics for a session thread.

func (ManagedAgentsSessionThreadStats) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadStats) UnmarshalJSON

func (r *ManagedAgentsSessionThreadStats) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadStatus

type ManagedAgentsSessionThreadStatus string

SessionThreadStatus enum

const (
	ManagedAgentsSessionThreadStatusRunning      ManagedAgentsSessionThreadStatus = "running"
	ManagedAgentsSessionThreadStatusIdle         ManagedAgentsSessionThreadStatus = "idle"
	ManagedAgentsSessionThreadStatusRescheduling ManagedAgentsSessionThreadStatus = "rescheduling"
	ManagedAgentsSessionThreadStatusTerminated   ManagedAgentsSessionThreadStatus = "terminated"
)

type ManagedAgentsSessionThreadStatusIdleEvent

type ManagedAgentsSessionThreadStatusIdleEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Name of the agent the thread runs.
	AgentName string `json:"agent_name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Public sthr\_ ID of the thread that went idle.
	SessionThreadID string `json:"session_thread_id" api:"required"`
	// The agent completed its turn naturally and is ready for the next user message.
	StopReason ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion `json:"stop_reason" api:"required"`
	// Any of "session.thread_status_idle".
	Type ManagedAgentsSessionThreadStatusIdleEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		AgentName       respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		StopReason      respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A session thread has yielded and is awaiting input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.

func (ManagedAgentsSessionThreadStatusIdleEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadStatusIdleEvent) UnmarshalJSON

func (r *ManagedAgentsSessionThreadStatusIdleEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion

type ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion struct {
	// Any of "end_turn", "requires_action", "retries_exhausted", "budget_reached".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsSessionRequiresAction].
	EventIDs []string `json:"event_ids"`
	JSON     struct {
		Type     respjson.Field
		EventIDs respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion contains all possible properties and values from ManagedAgentsSessionEndTurn, ManagedAgentsSessionRequiresAction, ManagedAgentsSessionRetriesExhausted, ManagedAgentsSessionBudgetReached.

Use the ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsAny

func (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsAny() anyManagedAgentsSessionThreadStatusIdleEventStopReason

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion.AsAny().(type) {
case qoder.ManagedAgentsSessionEndTurn:
case qoder.ManagedAgentsSessionRequiresAction:
case qoder.ManagedAgentsSessionRetriesExhausted:
case qoder.ManagedAgentsSessionBudgetReached:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsBudgetReached

func (ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsEndTurn

func (ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsRequiresAction

func (ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsRetriesExhausted

func (ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) UnmarshalJSON

type ManagedAgentsSessionThreadStatusIdleEventType

type ManagedAgentsSessionThreadStatusIdleEventType string
const (
	ManagedAgentsSessionThreadStatusIdleEventTypeSessionThreadStatusIdle ManagedAgentsSessionThreadStatusIdleEventType = "session.thread_status_idle"
)

type ManagedAgentsSessionThreadStatusRescheduledEvent

type ManagedAgentsSessionThreadStatusRescheduledEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Name of the agent the thread runs.
	AgentName string `json:"agent_name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Public sthr\_ ID of the thread that is retrying.
	SessionThreadID string `json:"session_thread_id" api:"required"`
	// Any of "session.thread_status_rescheduled".
	Type ManagedAgentsSessionThreadStatusRescheduledEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		AgentName       respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A session thread hit a transient error and is retrying automatically. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.

func (ManagedAgentsSessionThreadStatusRescheduledEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadStatusRescheduledEvent) UnmarshalJSON

type ManagedAgentsSessionThreadStatusRescheduledEventType

type ManagedAgentsSessionThreadStatusRescheduledEventType string
const (
	ManagedAgentsSessionThreadStatusRescheduledEventTypeSessionThreadStatusRescheduled ManagedAgentsSessionThreadStatusRescheduledEventType = "session.thread_status_rescheduled"
)

type ManagedAgentsSessionThreadStatusRunningEvent

type ManagedAgentsSessionThreadStatusRunningEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Name of the agent the thread runs.
	AgentName string `json:"agent_name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Public sthr\_ ID of the thread that started running.
	SessionThreadID string `json:"session_thread_id" api:"required"`
	// Any of "session.thread_status_running".
	Type ManagedAgentsSessionThreadStatusRunningEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		AgentName       respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.

func (ManagedAgentsSessionThreadStatusRunningEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadStatusRunningEvent) UnmarshalJSON

func (r *ManagedAgentsSessionThreadStatusRunningEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionThreadStatusRunningEventType

type ManagedAgentsSessionThreadStatusRunningEventType string
const (
	ManagedAgentsSessionThreadStatusRunningEventTypeSessionThreadStatusRunning ManagedAgentsSessionThreadStatusRunningEventType = "session.thread_status_running"
)

type ManagedAgentsSessionThreadStatusTerminatedEvent

type ManagedAgentsSessionThreadStatusTerminatedEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Name of the agent the thread runs.
	AgentName string `json:"agent_name" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Public sthr\_ ID of the thread that terminated.
	SessionThreadID string `json:"session_thread_id" api:"required"`
	// Any of "session.thread_status_terminated".
	Type ManagedAgentsSessionThreadStatusTerminatedEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		AgentName       respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		Type            respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A session thread has terminated and will accept no further input. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.

func (ManagedAgentsSessionThreadStatusTerminatedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadStatusTerminatedEvent) UnmarshalJSON

type ManagedAgentsSessionThreadStatusTerminatedEventType

type ManagedAgentsSessionThreadStatusTerminatedEventType string
const (
	ManagedAgentsSessionThreadStatusTerminatedEventTypeSessionThreadStatusTerminated ManagedAgentsSessionThreadStatusTerminatedEventType = "session.thread_status_terminated"
)

type ManagedAgentsSessionThreadType

type ManagedAgentsSessionThreadType string
const (
	ManagedAgentsSessionThreadTypeSessionThread ManagedAgentsSessionThreadType = "session_thread"
)

type ManagedAgentsSessionThreadUsage

type ManagedAgentsSessionThreadUsage struct {
	// Cumulative time in seconds this thread spent in running status. Equal to
	// `stats.active_seconds`; surfaced here so a thread's usage carries every quantity
	// its cost is priced on.
	ActiveSeconds float64 `json:"active_seconds"`
	// Prompt-cache creation token usage broken down by cache lifetime.
	CacheCreation ManagedAgentsCacheCreationUsage `json:"cache_creation"`
	// Total tokens read from prompt cache.
	CacheReadInputTokens int64 `json:"cache_read_input_tokens"`
	// Total input tokens consumed across all turns.
	InputTokens int64 `json:"input_tokens"`
	// A monetary amount in a specific currency.
	ListCost MonetaryAmount `json:"list_cost" api:"nullable"`
	// Total output tokens generated across all turns.
	OutputTokens int64 `json:"output_tokens"`
	// Cumulative count of server-executed tool invocations, broken down by tool.
	ServerToolUse ManagedAgentsServerToolUsage `json:"server_tool_use" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActiveSeconds        respjson.Field
		CacheCreation        respjson.Field
		CacheReadInputTokens respjson.Field
		InputTokens          respjson.Field
		ListCost             respjson.Field
		OutputTokens         respjson.Field
		ServerToolUse        respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cumulative token usage for a session thread across all turns.

func (ManagedAgentsSessionThreadUsage) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionThreadUsage) UnmarshalJSON

func (r *ManagedAgentsSessionThreadUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionType

type ManagedAgentsSessionType string
const (
	ManagedAgentsSessionTypeSession ManagedAgentsSessionType = "session"
)

type ManagedAgentsSessionUpdatedEvent

type ManagedAgentsSessionUpdatedEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.updated".
	Type ManagedAgentsSessionUpdatedEventType `json:"type" api:"required"`
	// Resolved `agent` definition for a `session`. Snapshot of the `agent` at
	// `session` creation time.
	Agent ManagedAgentsSessionAgent `json:"agent" api:"nullable"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimit `json:"budget" api:"nullable"`
	// The session's full metadata bag after the update. Present when the update set
	// non-empty metadata; absent when metadata was unchanged or cleared to empty.
	Metadata map[string]string `json:"metadata"`
	// The session's new title. Present only when the update changed it.
	Title string `json:"title" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		Agent       respjson.Field
		Budget      respjson.Field
		Metadata    respjson.Field
		Title       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when an UpdateSession request changed at least one field. Carries only the fields that changed; absent fields were not part of the update. The new configuration applies from the next turn.

func (ManagedAgentsSessionUpdatedEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionUpdatedEvent) UnmarshalJSON

func (r *ManagedAgentsSessionUpdatedEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionUpdatedEventType

type ManagedAgentsSessionUpdatedEventType string
const (
	ManagedAgentsSessionUpdatedEventTypeSessionUpdated ManagedAgentsSessionUpdatedEventType = "session.updated"
)

type ManagedAgentsSessionUsage

type ManagedAgentsSessionUsage struct {
	ModelCredits          float64 `json:"model_credits"`
	SandboxRuntimeCredits float64 `json:"sandbox_runtime_credits"`
	TotalCredits          float64 `json:"total_credits"`
	// Cumulative time in seconds during which the session had at least one thread in
	// running status. Overlapping activity from concurrent threads is counted once,
	// unlike `stats.active_seconds`, which sums each thread's own active time. This is
	// the duration the session's runtime cost is priced on.
	ActiveSeconds float64 `json:"active_seconds"`
	// Prompt-cache creation token usage broken down by cache lifetime.
	CacheCreation ManagedAgentsCacheCreationUsage `json:"cache_creation"`
	// Total tokens read from prompt cache.
	CacheReadInputTokens int64 `json:"cache_read_input_tokens"`
	// Total input tokens consumed across all turns.
	InputTokens int64 `json:"input_tokens"`
	// A monetary amount in a specific currency.
	ListCost MonetaryAmount `json:"list_cost" api:"nullable"`
	// Total output tokens generated across all turns.
	OutputTokens int64 `json:"output_tokens"`
	// Cumulative count of server-executed tool invocations, broken down by tool.
	ServerToolUse ManagedAgentsServerToolUsage `json:"server_tool_use" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ModelCredits          respjson.Field
		SandboxRuntimeCredits respjson.Field
		TotalCredits          respjson.Field
		ActiveSeconds         respjson.Field
		CacheCreation         respjson.Field
		CacheReadInputTokens  respjson.Field
		InputTokens           respjson.Field
		ListCost              respjson.Field
		OutputTokens          respjson.Field
		ServerToolUse         respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cumulative Credits snapshot. Replace previous values; do not sum snapshots. Legacy token and list-cost fields remain available for older responses.

func (ManagedAgentsSessionUsage) RawJSON

func (r ManagedAgentsSessionUsage) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionUsage) UnmarshalJSON

func (r *ManagedAgentsSessionUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionUsageEvent

type ManagedAgentsSessionUsageEvent struct {
	ModelCredits          float64 `json:"model_credits"`
	SandboxRuntimeCredits float64 `json:"sandbox_runtime_credits"`
	TotalCredits          float64 `json:"total_credits"`
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "session.usage".
	Type ManagedAgentsSessionUsageEventType `json:"type" api:"required"`
	// Point-in-time snapshot of a session's cumulative usage.
	Usage ManagedAgentsSessionUsageSnapshot `json:"usage"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimit `json:"budget" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ModelCredits          respjson.Field
		SandboxRuntimeCredits respjson.Field
		TotalCredits          respjson.Field
		ID                    respjson.Field
		ProcessedAt           respjson.Field
		Type                  respjson.Field
		Usage                 respjson.Field
		Budget                respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Cumulative Credits emitted before session.status_idle when usage is available. Credits are top-level fields; Usage and Budget are legacy response fields.

func (ManagedAgentsSessionUsageEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionUsageEvent) UnmarshalJSON

func (r *ManagedAgentsSessionUsageEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSessionUsageEventType

type ManagedAgentsSessionUsageEventType string
const (
	ManagedAgentsSessionUsageEventTypeSessionUsage ManagedAgentsSessionUsageEventType = "session.usage"
)

type ManagedAgentsSessionUsageSnapshot

type ManagedAgentsSessionUsageSnapshot struct {
	// Cumulative time in seconds during which the session had at least one thread in
	// running status. Overlapping activity from concurrent threads is counted once.
	// This is the duration the session's runtime cost is priced on.
	ActiveSeconds float64 `json:"active_seconds"`
	// Prompt-cache creation token usage broken down by cache lifetime.
	CacheCreation ManagedAgentsCacheCreationUsage `json:"cache_creation"`
	// Total tokens read from prompt cache.
	CacheReadInputTokens int64 `json:"cache_read_input_tokens"`
	// Total input tokens consumed across all turns.
	InputTokens int64 `json:"input_tokens"`
	// A monetary amount in a specific currency.
	ListCost MonetaryAmount `json:"list_cost"`
	// Total output tokens generated across all turns.
	OutputTokens int64 `json:"output_tokens"`
	// Cumulative count of server-executed tool invocations, broken down by tool.
	ServerToolUse ManagedAgentsServerToolUsage `json:"server_tool_use"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActiveSeconds        respjson.Field
		CacheCreation        respjson.Field
		CacheReadInputTokens respjson.Field
		InputTokens          respjson.Field
		ListCost             respjson.Field
		OutputTokens         respjson.Field
		ServerToolUse        respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Point-in-time snapshot of a session's cumulative usage.

func (ManagedAgentsSessionUsageSnapshot) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSessionUsageSnapshot) UnmarshalJSON

func (r *ManagedAgentsSessionUsageSnapshot) UnmarshalJSON(data []byte) error

type ManagedAgentsSkillNotFoundDeploymentPausedReasonError

type ManagedAgentsSkillNotFoundDeploymentPausedReasonError struct {
	// Any of "skill_not_found_error".
	Type ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A skill referenced by the deployment's agent no longer exists.

func (ManagedAgentsSkillNotFoundDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSkillNotFoundDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType

type ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType string
const (
	ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorTypeSkillNotFoundError ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType = "skill_not_found_error"
)

type ManagedAgentsSkillNotFoundRunError

type ManagedAgentsSkillNotFoundRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "skill_not_found_error".
	Type ManagedAgentsSkillNotFoundRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A skill referenced by the deployment's agent no longer exists.

func (ManagedAgentsSkillNotFoundRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSkillNotFoundRunError) UnmarshalJSON

func (r *ManagedAgentsSkillNotFoundRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsSkillNotFoundRunErrorType

type ManagedAgentsSkillNotFoundRunErrorType string
const (
	ManagedAgentsSkillNotFoundRunErrorTypeSkillNotFoundError ManagedAgentsSkillNotFoundRunErrorType = "skill_not_found_error"
)

type ManagedAgentsSkillParamsUnion

type ManagedAgentsSkillParamsUnion struct {
	OfQoder  *ManagedAgentsQoderSkillParams  `json:",omitzero,inline"`
	OfCustom *ManagedAgentsCustomSkillParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func ManagedAgentsSkillParamsOfCustom

func ManagedAgentsSkillParamsOfCustom(skillID string) ManagedAgentsSkillParamsUnion

func ManagedAgentsSkillParamsOfQoder

func ManagedAgentsSkillParamsOfQoder(skillID string) ManagedAgentsSkillParamsUnion

func (ManagedAgentsSkillParamsUnion) GetSkillID

func (u ManagedAgentsSkillParamsUnion) GetSkillID() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSkillParamsUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSkillParamsUnion) GetVersion

func (u ManagedAgentsSkillParamsUnion) GetVersion() *string

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsSkillParamsUnion) MarshalJSON

func (u ManagedAgentsSkillParamsUnion) MarshalJSON() ([]byte, error)

func (*ManagedAgentsSkillParamsUnion) UnmarshalJSON

func (u *ManagedAgentsSkillParamsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsSpanModelRequestEndEvent

type ManagedAgentsSpanModelRequestEndEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Whether the model request resulted in an error.
	IsError bool `json:"is_error" api:"required"`
	// The id of the corresponding `span.model_request_start` event.
	ModelRequestStartID string `json:"model_request_start_id" api:"required"`
	// Credits for a single model request; legacy token fields may appear in older responses.
	ModelUsage ManagedAgentsSpanModelUsage `json:"model_usage"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "span.model_request_end".
	Type ManagedAgentsSpanModelRequestEndEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		IsError             respjson.Field
		ModelRequestStartID respjson.Field
		ModelUsage          respjson.Field
		ProcessedAt         respjson.Field
		Type                respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when a model request completes.

func (ManagedAgentsSpanModelRequestEndEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSpanModelRequestEndEvent) UnmarshalJSON

func (r *ManagedAgentsSpanModelRequestEndEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSpanModelRequestEndEventType

type ManagedAgentsSpanModelRequestEndEventType string
const (
	ManagedAgentsSpanModelRequestEndEventTypeSpanModelRequestEnd ManagedAgentsSpanModelRequestEndEventType = "span.model_request_end"
)

type ManagedAgentsSpanModelRequestStartEvent

type ManagedAgentsSpanModelRequestStartEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "span.model_request_start".
	Type ManagedAgentsSpanModelRequestStartEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when a model request is initiated by the agent.

func (ManagedAgentsSpanModelRequestStartEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSpanModelRequestStartEvent) UnmarshalJSON

func (r *ManagedAgentsSpanModelRequestStartEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSpanModelRequestStartEventType

type ManagedAgentsSpanModelRequestStartEventType string
const (
	ManagedAgentsSpanModelRequestStartEventTypeSpanModelRequestStart ManagedAgentsSpanModelRequestStartEventType = "span.model_request_start"
)

type ManagedAgentsSpanModelUsage

type ManagedAgentsSpanModelUsage struct {
	Credits float64 `json:"credits"`
	// Tokens used to create prompt cache in this request.
	CacheCreationInputTokens int64 `json:"cache_creation_input_tokens"`
	// Tokens read from prompt cache in this request.
	CacheReadInputTokens int64 `json:"cache_read_input_tokens"`
	// Input tokens consumed by this request.
	InputTokens int64 `json:"input_tokens"`
	// Output tokens generated by this request.
	OutputTokens int64 `json:"output_tokens"`
	// Inference speed mode. `fast` provides significantly faster output token
	// generation at premium pricing. Not all models support `fast`; invalid
	// combinations are rejected at create time.
	//
	// Any of "standard", "fast".
	Speed ManagedAgentsSpanModelUsageSpeed `json:"speed" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Credits                  respjson.Field
		CacheCreationInputTokens respjson.Field
		CacheReadInputTokens     respjson.Field
		InputTokens              respjson.Field
		OutputTokens             respjson.Field
		Speed                    respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Credits for a single model request; legacy token fields may appear in older responses.

func (ManagedAgentsSpanModelUsage) RawJSON

func (r ManagedAgentsSpanModelUsage) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsSpanModelUsage) UnmarshalJSON

func (r *ManagedAgentsSpanModelUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsSpanModelUsageSpeed

type ManagedAgentsSpanModelUsageSpeed string

Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.

const (
	ManagedAgentsSpanModelUsageSpeedStandard ManagedAgentsSpanModelUsageSpeed = "standard"
	ManagedAgentsSpanModelUsageSpeedFast     ManagedAgentsSpanModelUsageSpeed = "fast"
)

type ManagedAgentsSpanOutcomeEvaluationEndEvent

type ManagedAgentsSpanOutcomeEvaluationEndEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Human-readable explanation of the verdict. For `needs_revision`, describes which
	// criteria failed and why.
	Explanation string `json:"explanation" api:"required"`
	// 0-indexed revision cycle, matching the corresponding
	// `span.outcome_evaluation_start`.
	Iteration int64 `json:"iteration" api:"required"`
	// The id of the corresponding `span.outcome_evaluation_start` event.
	OutcomeEvaluationStartID string `json:"outcome_evaluation_start_id" api:"required"`
	// The `outc_` ID of the outcome being evaluated.
	OutcomeID string `json:"outcome_id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Evaluation verdict. 'satisfied': criteria met, session goes idle.
	// 'needs_revision': criteria not met, another revision cycle follows.
	// 'max_iterations_reached': evaluation budget exhausted with criteria still unmet
	// — one final acknowledgment turn follows before the session goes idle, but no
	// further evaluation runs. 'failed': grader determined the rubric does not apply
	// to the deliverables. 'interrupted': user sent an interrupt while evaluation was
	// in progress.
	Result string `json:"result" api:"required"`
	// Any of "span.outcome_evaluation_end".
	Type ManagedAgentsSpanOutcomeEvaluationEndEventType `json:"type" api:"required"`
	// Credits for a single model request; legacy token fields may appear in older responses.
	Usage ManagedAgentsSpanModelUsage `json:"usage" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                       respjson.Field
		Explanation              respjson.Field
		Iteration                respjson.Field
		OutcomeEvaluationStartID respjson.Field
		OutcomeID                respjson.Field
		ProcessedAt              respjson.Field
		Result                   respjson.Field
		Type                     respjson.Field
		Usage                    respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when an outcome evaluation cycle completes. Carries the verdict and aggregate token usage. A verdict of `needs_revision` means another evaluation cycle follows; `satisfied`, `max_iterations_reached`, `failed`, or `interrupted` are terminal — no further evaluation cycles follow.

func (ManagedAgentsSpanOutcomeEvaluationEndEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSpanOutcomeEvaluationEndEvent) UnmarshalJSON

func (r *ManagedAgentsSpanOutcomeEvaluationEndEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSpanOutcomeEvaluationEndEventType

type ManagedAgentsSpanOutcomeEvaluationEndEventType string
const (
	ManagedAgentsSpanOutcomeEvaluationEndEventTypeSpanOutcomeEvaluationEnd ManagedAgentsSpanOutcomeEvaluationEndEventType = "span.outcome_evaluation_end"
)

type ManagedAgentsSpanOutcomeEvaluationOngoingEvent

type ManagedAgentsSpanOutcomeEvaluationOngoingEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// 0-indexed revision cycle, matching the corresponding
	// `span.outcome_evaluation_start`.
	Iteration int64 `json:"iteration" api:"required"`
	// The `outc_` ID of the outcome being evaluated.
	OutcomeID string `json:"outcome_id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "span.outcome_evaluation_ongoing".
	Type ManagedAgentsSpanOutcomeEvaluationOngoingEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Iteration   respjson.Field
		OutcomeID   respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Periodic heartbeat emitted while an outcome evaluation cycle is in progress. Distinguishes 'evaluation is actively running' from 'evaluation is stuck' between the corresponding `span.outcome_evaluation_start` and `span.outcome_evaluation_end` events.

func (ManagedAgentsSpanOutcomeEvaluationOngoingEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSpanOutcomeEvaluationOngoingEvent) UnmarshalJSON

type ManagedAgentsSpanOutcomeEvaluationOngoingEventType

type ManagedAgentsSpanOutcomeEvaluationOngoingEventType string
const (
	ManagedAgentsSpanOutcomeEvaluationOngoingEventTypeSpanOutcomeEvaluationOngoing ManagedAgentsSpanOutcomeEvaluationOngoingEventType = "span.outcome_evaluation_ongoing"
)

type ManagedAgentsSpanOutcomeEvaluationStartEvent

type ManagedAgentsSpanOutcomeEvaluationStartEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// 0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation
	// after the first revision; etc.
	Iteration int64 `json:"iteration" api:"required"`
	// The `outc_` ID of the outcome being evaluated.
	OutcomeID string `json:"outcome_id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Any of "span.outcome_evaluation_start".
	Type ManagedAgentsSpanOutcomeEvaluationStartEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Iteration   respjson.Field
		OutcomeID   respjson.Field
		ProcessedAt respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Emitted when an outcome evaluation cycle begins.

func (ManagedAgentsSpanOutcomeEvaluationStartEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSpanOutcomeEvaluationStartEvent) UnmarshalJSON

func (r *ManagedAgentsSpanOutcomeEvaluationStartEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSpanOutcomeEvaluationStartEventType

type ManagedAgentsSpanOutcomeEvaluationStartEventType string
const (
	ManagedAgentsSpanOutcomeEvaluationStartEventTypeSpanOutcomeEvaluationStart ManagedAgentsSpanOutcomeEvaluationStartEventType = "span.outcome_evaluation_start"
)

type ManagedAgentsStartEvent

type ManagedAgentsStartEvent struct {
	// The previewed event's type and id. The event type determines which delta types
	// the preview's event_delta events carry: agent.message events stream
	// content_delta fragments; agent.thinking previews are start-only — no deltas
	// follow, and the buffered agent.thinking with the same id concludes them.
	Event ManagedAgentsStartEventPreviewUnion `json:"event" api:"required"`
	// Any of "event_start".
	Type ManagedAgentsStartEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Event       respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Opens a preview of a buffered event. Carries the previewed event's type and id only. Followed by zero or more event_delta events with the same event id, normally concluded by the buffered event carrying that id. If the producing model request ends without that event (an error or interrupt mid-stream), its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.

func (ManagedAgentsStartEvent) RawJSON

func (r ManagedAgentsStartEvent) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsStartEvent) UnmarshalJSON

func (r *ManagedAgentsStartEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsStartEventPreviewUnion

type ManagedAgentsStartEventPreviewUnion struct {
	ID string `json:"id"`
	// Any of "agent.message", "agent.thinking".
	Type string `json:"type"`
	JSON struct {
		ID   respjson.Field
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStartEventPreviewUnion contains all possible properties and values from ManagedAgentsAgentMessagePreview, ManagedAgentsAgentThinkingPreview.

Use the ManagedAgentsStartEventPreviewUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsStartEventPreviewUnion) AsAgentMessage

func (ManagedAgentsStartEventPreviewUnion) AsAgentThinking

func (ManagedAgentsStartEventPreviewUnion) AsAny

func (u ManagedAgentsStartEventPreviewUnion) AsAny() anyManagedAgentsStartEventPreview

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsStartEventPreviewUnion.AsAny().(type) {
case qoder.ManagedAgentsAgentMessagePreview:
case qoder.ManagedAgentsAgentThinkingPreview:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsStartEventPreviewUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsStartEventPreviewUnion) UnmarshalJSON

func (r *ManagedAgentsStartEventPreviewUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsStartEventType

type ManagedAgentsStartEventType string
const (
	ManagedAgentsStartEventTypeEventStart ManagedAgentsStartEventType = "event_start"
)

type ManagedAgentsStaticBearerAuthResponse

type ManagedAgentsStaticBearerAuthResponse struct {
	// URL of the MCP server this credential authenticates against.
	MCPServerURL string `json:"mcp_server_url" api:"required"`
	// Any of "static_bearer".
	Type ManagedAgentsStaticBearerAuthResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MCPServerURL respjson.Field
		Type         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Static bearer token credential details for an MCP server.

func (ManagedAgentsStaticBearerAuthResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsStaticBearerAuthResponse) UnmarshalJSON

func (r *ManagedAgentsStaticBearerAuthResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsStaticBearerAuthResponseType

type ManagedAgentsStaticBearerAuthResponseType string
const (
	ManagedAgentsStaticBearerAuthResponseTypeStaticBearer ManagedAgentsStaticBearerAuthResponseType = "static_bearer"
)

type ManagedAgentsStaticBearerCreateParams

type ManagedAgentsStaticBearerCreateParams struct {
	// Static bearer token value.
	Token string `json:"token" api:"required"`
	// URL of the MCP server this credential authenticates against.
	MCPServerURL string `json:"mcp_server_url" api:"required"`
	// Any of "static_bearer".
	Type ManagedAgentsStaticBearerCreateParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Parameters for creating a static bearer token credential.

The properties Token, MCPServerURL, Type are required.

func (ManagedAgentsStaticBearerCreateParams) MarshalJSON

func (r ManagedAgentsStaticBearerCreateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsStaticBearerCreateParams) UnmarshalJSON

func (r *ManagedAgentsStaticBearerCreateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsStaticBearerCreateParamsType

type ManagedAgentsStaticBearerCreateParamsType string
const (
	ManagedAgentsStaticBearerCreateParamsTypeStaticBearer ManagedAgentsStaticBearerCreateParamsType = "static_bearer"
)

type ManagedAgentsStaticBearerUpdateParams

type ManagedAgentsStaticBearerUpdateParams struct {
	// Any of "static_bearer".
	Type ManagedAgentsStaticBearerUpdateParamsType `json:"type,omitzero" api:"required"`
	// Updated static bearer token value.
	Token param.Opt[string] `json:"token,omitzero"`
	// contains filtered or unexported fields
}

Parameters for updating a static bearer token credential. The `mcp_server_url` is immutable.

The property Type is required.

func (ManagedAgentsStaticBearerUpdateParams) MarshalJSON

func (r ManagedAgentsStaticBearerUpdateParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsStaticBearerUpdateParams) UnmarshalJSON

func (r *ManagedAgentsStaticBearerUpdateParams) UnmarshalJSON(data []byte) error

type ManagedAgentsStaticBearerUpdateParamsType

type ManagedAgentsStaticBearerUpdateParamsType string
const (
	ManagedAgentsStaticBearerUpdateParamsTypeStaticBearer ManagedAgentsStaticBearerUpdateParamsType = "static_bearer"
)

type ManagedAgentsStreamSessionEventsUnion

type ManagedAgentsStreamSessionEventsUnion struct {
	ModelCredits          float64 `json:"model_credits"`
	SandboxRuntimeCredits float64 `json:"sandbox_runtime_credits"`
	TotalCredits          float64 `json:"total_credits"`
	ID                    string  `json:"id"`
	// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion],
	// [[]ManagedAgentsAgentMessageEventContentUnion],
	// [[]ManagedAgentsAgentMCPToolResultEventContentUnion],
	// [[]ManagedAgentsAgentToolResultEventContentUnion],
	// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion],
	// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion],
	// [[]ManagedAgentsUserToolResultEventContentUnion],
	// [[]ManagedAgentsSystemContentBlock]
	Content ManagedAgentsStreamSessionEventsUnionContent `json:"content"`
	// Any of "user.message", "user.interrupt", "user.tool_confirmation",
	// "user.custom_tool_result", "agent.custom_tool_use", "agent.message",
	// "agent.thinking", "agent.mcp_tool_use", "agent.mcp_tool_result",
	// "agent.tool_use", "agent.tool_result", "agent.thread_message_received",
	// "agent.thread_message_sent", "agent.thread_context_compacted", "session.error",
	// "session.status_rescheduled", "session.status_running", "session.status_idle",
	// "session.status_terminated", "session.thread_created",
	// "span.outcome_evaluation_start", "span.outcome_evaluation_end",
	// "span.model_request_start", "span.model_request_end",
	// "span.outcome_evaluation_ongoing", "user.define_outcome", "session.deleted",
	// "session.thread_status_running", "session.thread_status_idle",
	// "session.thread_status_terminated", "user.tool_result",
	// "session.thread_status_rescheduled", "session.updated", "event_start",
	// "event_delta", "system.message", "session.usage".
	Type            string    `json:"type"`
	ProcessedAt     time.Time `json:"processed_at"`
	SessionThreadID string    `json:"session_thread_id"`
	Result          string    `json:"result"`
	ToolUseID       string    `json:"tool_use_id"`
	// This field is from variant [ManagedAgentsUserToolConfirmationEvent].
	DenyMessage string `json:"deny_message"`
	// This field is from variant [ManagedAgentsUserCustomToolResultEvent].
	CustomToolUseID string `json:"custom_tool_use_id"`
	IsError         bool   `json:"is_error"`
	Input           any    `json:"input"`
	Name            string `json:"name"`
	// This field is from variant [ManagedAgentsAgentMCPToolUseEvent].
	MCPServerName       string `json:"mcp_server_name"`
	EvaluatedPermission string `json:"evaluated_permission"`
	// This field is from variant [ManagedAgentsAgentMCPToolResultEvent].
	MCPToolUseID string `json:"mcp_tool_use_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].
	FromSessionThreadID string `json:"from_session_thread_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].
	FromAgentName string `json:"from_agent_name"`
	// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].
	ToSessionThreadID string `json:"to_session_thread_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].
	ToAgentName string `json:"to_agent_name"`
	// This field is from variant [ManagedAgentsSessionErrorEvent].
	Error ManagedAgentsSessionErrorEventErrorUnion `json:"error"`
	// This field is a union of
	// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],
	// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion]
	StopReason ManagedAgentsStreamSessionEventsUnionStopReason `json:"stop_reason"`
	AgentName  string                                          `json:"agent_name"`
	Iteration  int64                                           `json:"iteration"`
	OutcomeID  string                                          `json:"outcome_id"`
	// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].
	Explanation string `json:"explanation"`
	// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].
	OutcomeEvaluationStartID string `json:"outcome_evaluation_start_id"`
	// This field is a union of [ManagedAgentsSpanModelUsage],
	// [ManagedAgentsSessionUsageSnapshot]
	Usage ManagedAgentsStreamSessionEventsUnionUsage `json:"usage"`
	// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].
	ModelRequestStartID string `json:"model_request_start_id"`
	// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].
	ModelUsage ManagedAgentsSpanModelUsage `json:"model_usage"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	MaxIterations int64 `json:"max_iterations"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Rubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:"rubric"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Agent ManagedAgentsSessionAgent `json:"agent"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Budget ManagedAgentsBudgetLimit `json:"budget"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Metadata map[string]string `json:"metadata"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Title string `json:"title"`
	// This field is from variant [ManagedAgentsStartEvent].
	Event ManagedAgentsStartEventPreviewUnion `json:"event"`
	// This field is from variant [ManagedAgentsDeltaEvent].
	Delta ManagedAgentsDeltaContent `json:"delta"`
	// This field is from variant [ManagedAgentsDeltaEvent].
	EventID string `json:"event_id"`
	JSON    struct {
		ModelCredits             respjson.Field
		SandboxRuntimeCredits    respjson.Field
		TotalCredits             respjson.Field
		ID                       respjson.Field
		Content                  respjson.Field
		Type                     respjson.Field
		ProcessedAt              respjson.Field
		SessionThreadID          respjson.Field
		Result                   respjson.Field
		ToolUseID                respjson.Field
		DenyMessage              respjson.Field
		CustomToolUseID          respjson.Field
		IsError                  respjson.Field
		Input                    respjson.Field
		Name                     respjson.Field
		MCPServerName            respjson.Field
		EvaluatedPermission      respjson.Field
		MCPToolUseID             respjson.Field
		FromSessionThreadID      respjson.Field
		FromAgentName            respjson.Field
		ToSessionThreadID        respjson.Field
		ToAgentName              respjson.Field
		Error                    respjson.Field
		StopReason               respjson.Field
		AgentName                respjson.Field
		Iteration                respjson.Field
		OutcomeID                respjson.Field
		Explanation              respjson.Field
		OutcomeEvaluationStartID respjson.Field
		Usage                    respjson.Field
		ModelRequestStartID      respjson.Field
		ModelUsage               respjson.Field
		Description              respjson.Field
		MaxIterations            respjson.Field
		Rubric                   respjson.Field
		Agent                    respjson.Field
		Budget                   respjson.Field
		Metadata                 respjson.Field
		Title                    respjson.Field
		Event                    respjson.Field
		Delta                    respjson.Field
		EventID                  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionEventsUnion contains all possible properties and values from ManagedAgentsUserMessageEvent, ManagedAgentsUserInterruptEvent, ManagedAgentsUserToolConfirmationEvent, ManagedAgentsUserCustomToolResultEvent, ManagedAgentsAgentCustomToolUseEvent, ManagedAgentsAgentMessageEvent, ManagedAgentsAgentThinkingEvent, ManagedAgentsAgentMCPToolUseEvent, ManagedAgentsAgentMCPToolResultEvent, ManagedAgentsAgentToolUseEvent, ManagedAgentsAgentToolResultEvent, ManagedAgentsAgentThreadMessageReceivedEvent, ManagedAgentsAgentThreadMessageSentEvent, ManagedAgentsAgentThreadContextCompactedEvent, ManagedAgentsSessionErrorEvent, ManagedAgentsSessionStatusRescheduledEvent, ManagedAgentsSessionStatusRunningEvent, ManagedAgentsSessionStatusIdleEvent, ManagedAgentsSessionStatusTerminatedEvent, ManagedAgentsSessionThreadCreatedEvent, ManagedAgentsSpanOutcomeEvaluationStartEvent, ManagedAgentsSpanOutcomeEvaluationEndEvent, ManagedAgentsSpanModelRequestStartEvent, ManagedAgentsSpanModelRequestEndEvent, ManagedAgentsSpanOutcomeEvaluationOngoingEvent, ManagedAgentsUserDefineOutcomeEvent, ManagedAgentsSessionDeletedEvent, ManagedAgentsSessionThreadStatusRunningEvent, ManagedAgentsSessionThreadStatusIdleEvent, ManagedAgentsSessionThreadStatusTerminatedEvent, ManagedAgentsUserToolResultEvent, ManagedAgentsSessionThreadStatusRescheduledEvent, ManagedAgentsSessionUpdatedEvent, ManagedAgentsStartEvent, ManagedAgentsDeltaEvent, ManagedAgentsSystemMessageEvent, ManagedAgentsSessionUsageEvent.

Use the ManagedAgentsStreamSessionEventsUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsStreamSessionEventsUnion) AsAgentCustomToolUse

func (ManagedAgentsStreamSessionEventsUnion) AsAgentMCPToolResult

func (ManagedAgentsStreamSessionEventsUnion) AsAgentMCPToolUse

func (ManagedAgentsStreamSessionEventsUnion) AsAgentMessage

func (ManagedAgentsStreamSessionEventsUnion) AsAgentThinking

func (ManagedAgentsStreamSessionEventsUnion) AsAgentThreadContextCompacted

func (ManagedAgentsStreamSessionEventsUnion) AsAgentThreadMessageReceived

func (ManagedAgentsStreamSessionEventsUnion) AsAgentThreadMessageSent

func (ManagedAgentsStreamSessionEventsUnion) AsAgentToolResult

func (ManagedAgentsStreamSessionEventsUnion) AsAgentToolUse

func (ManagedAgentsStreamSessionEventsUnion) AsAny

func (u ManagedAgentsStreamSessionEventsUnion) AsAny() anyManagedAgentsStreamSessionEvents

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsStreamSessionEventsUnion.AsAny().(type) {
case qoder.ManagedAgentsUserMessageEvent:
case qoder.ManagedAgentsUserInterruptEvent:
case qoder.ManagedAgentsUserToolConfirmationEvent:
case qoder.ManagedAgentsUserCustomToolResultEvent:
case qoder.ManagedAgentsAgentCustomToolUseEvent:
case qoder.ManagedAgentsAgentMessageEvent:
case qoder.ManagedAgentsAgentThinkingEvent:
case qoder.ManagedAgentsAgentMCPToolUseEvent:
case qoder.ManagedAgentsAgentMCPToolResultEvent:
case qoder.ManagedAgentsAgentToolUseEvent:
case qoder.ManagedAgentsAgentToolResultEvent:
case qoder.ManagedAgentsAgentThreadMessageReceivedEvent:
case qoder.ManagedAgentsAgentThreadMessageSentEvent:
case qoder.ManagedAgentsAgentThreadContextCompactedEvent:
case qoder.ManagedAgentsSessionErrorEvent:
case qoder.ManagedAgentsSessionStatusRescheduledEvent:
case qoder.ManagedAgentsSessionStatusRunningEvent:
case qoder.ManagedAgentsSessionStatusIdleEvent:
case qoder.ManagedAgentsSessionStatusTerminatedEvent:
case qoder.ManagedAgentsSessionThreadCreatedEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationStartEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationEndEvent:
case qoder.ManagedAgentsSpanModelRequestStartEvent:
case qoder.ManagedAgentsSpanModelRequestEndEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationOngoingEvent:
case qoder.ManagedAgentsUserDefineOutcomeEvent:
case qoder.ManagedAgentsSessionDeletedEvent:
case qoder.ManagedAgentsSessionThreadStatusRunningEvent:
case qoder.ManagedAgentsSessionThreadStatusIdleEvent:
case qoder.ManagedAgentsSessionThreadStatusTerminatedEvent:
case qoder.ManagedAgentsUserToolResultEvent:
case qoder.ManagedAgentsSessionThreadStatusRescheduledEvent:
case qoder.ManagedAgentsSessionUpdatedEvent:
case qoder.ManagedAgentsStartEvent:
case qoder.ManagedAgentsDeltaEvent:
case qoder.ManagedAgentsSystemMessageEvent:
case qoder.ManagedAgentsSessionUsageEvent:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsStreamSessionEventsUnion) AsEventDelta

func (ManagedAgentsStreamSessionEventsUnion) AsEventStart

func (ManagedAgentsStreamSessionEventsUnion) AsSessionDeleted

func (ManagedAgentsStreamSessionEventsUnion) AsSessionError

func (ManagedAgentsStreamSessionEventsUnion) AsSessionStatusIdle

func (ManagedAgentsStreamSessionEventsUnion) AsSessionStatusRescheduled

func (ManagedAgentsStreamSessionEventsUnion) AsSessionStatusRunning

func (ManagedAgentsStreamSessionEventsUnion) AsSessionStatusTerminated

func (ManagedAgentsStreamSessionEventsUnion) AsSessionThreadCreated

func (ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusIdle

func (ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusRescheduled

func (ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusRunning

func (ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusTerminated

func (ManagedAgentsStreamSessionEventsUnion) AsSessionUpdated

func (ManagedAgentsStreamSessionEventsUnion) AsSessionUsage

func (ManagedAgentsStreamSessionEventsUnion) AsSpanModelRequestEnd

func (ManagedAgentsStreamSessionEventsUnion) AsSpanModelRequestStart

func (ManagedAgentsStreamSessionEventsUnion) AsSpanOutcomeEvaluationEnd

func (ManagedAgentsStreamSessionEventsUnion) AsSpanOutcomeEvaluationOngoing

func (ManagedAgentsStreamSessionEventsUnion) AsSpanOutcomeEvaluationStart

func (ManagedAgentsStreamSessionEventsUnion) AsSystemMessage

func (ManagedAgentsStreamSessionEventsUnion) AsUserCustomToolResult

func (ManagedAgentsStreamSessionEventsUnion) AsUserDefineOutcome

func (ManagedAgentsStreamSessionEventsUnion) AsUserInterrupt

func (ManagedAgentsStreamSessionEventsUnion) AsUserMessage

func (ManagedAgentsStreamSessionEventsUnion) AsUserToolConfirmation

func (ManagedAgentsStreamSessionEventsUnion) AsUserToolResult

func (ManagedAgentsStreamSessionEventsUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsStreamSessionEventsUnion) UnmarshalJSON

func (r *ManagedAgentsStreamSessionEventsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsStreamSessionEventsUnionContent

type ManagedAgentsStreamSessionEventsUnionContent struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.
	OfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentMessageEventContentUnion] instead of an object.
	OfManagedAgentsAgentMessageEventContentArray []ManagedAgentsAgentMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentMCPToolResultEventContentUnion] instead of an object.
	OfManagedAgentsAgentMCPToolResultEventContentArray []ManagedAgentsAgentMCPToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentToolResultEventContentUnion] instead of an object.
	OfManagedAgentsAgentToolResultEventContentArray []ManagedAgentsAgentToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion] instead of an
	// object.
	OfManagedAgentsAgentThreadMessageReceivedEventContentArray []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion] instead of an
	// object.
	OfManagedAgentsAgentThreadMessageSentEventContentArray []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsSystemContentBlock] instead of an object.
	OfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:",inline"`
	JSON                                   struct {
		OfManagedAgentsUserMessageEventContentArray                respjson.Field
		OfManagedAgentsUserCustomToolResultEventContentArray       respjson.Field
		OfManagedAgentsAgentMessageEventContentArray               respjson.Field
		OfManagedAgentsAgentMCPToolResultEventContentArray         respjson.Field
		OfManagedAgentsAgentToolResultEventContentArray            respjson.Field
		OfManagedAgentsAgentThreadMessageReceivedEventContentArray respjson.Field
		OfManagedAgentsAgentThreadMessageSentEventContentArray     respjson.Field
		OfManagedAgentsUserToolResultEventContentArray             respjson.Field
		OfManagedAgentsSystemContentBlockArray                     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionEventsUnionContent is an implicit subunion of ManagedAgentsStreamSessionEventsUnion. ManagedAgentsStreamSessionEventsUnionContent provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsStreamSessionEventsUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsUserMessageEventContentArray OfManagedAgentsUserCustomToolResultEventContentArray OfManagedAgentsAgentMessageEventContentArray OfManagedAgentsAgentMCPToolResultEventContentArray OfManagedAgentsAgentToolResultEventContentArray OfManagedAgentsAgentThreadMessageReceivedEventContentArray OfManagedAgentsAgentThreadMessageSentEventContentArray OfManagedAgentsUserToolResultEventContentArray OfManagedAgentsSystemContentBlockArray]

func (*ManagedAgentsStreamSessionEventsUnionContent) UnmarshalJSON

func (r *ManagedAgentsStreamSessionEventsUnionContent) UnmarshalJSON(data []byte) error

type ManagedAgentsStreamSessionEventsUnionStopReason

type ManagedAgentsStreamSessionEventsUnionStopReason struct {
	Type string `json:"type"`
	// This field is from variant
	// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],
	// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion].
	EventIDs []string `json:"event_ids"`
	JSON     struct {
		Type     respjson.Field
		EventIDs respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionEventsUnionStopReason is an implicit subunion of ManagedAgentsStreamSessionEventsUnion. ManagedAgentsStreamSessionEventsUnionStopReason provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsStreamSessionEventsUnion.

func (*ManagedAgentsStreamSessionEventsUnionStopReason) UnmarshalJSON

type ManagedAgentsStreamSessionEventsUnionUsage

type ManagedAgentsStreamSessionEventsUnionUsage struct {
	Credits float64 `json:"credits"`
	// This field is from variant [ManagedAgentsSpanModelUsage].
	CacheCreationInputTokens int64 `json:"cache_creation_input_tokens"`
	CacheReadInputTokens     int64 `json:"cache_read_input_tokens"`
	InputTokens              int64 `json:"input_tokens"`
	OutputTokens             int64 `json:"output_tokens"`
	// This field is from variant [ManagedAgentsSpanModelUsage].
	Speed ManagedAgentsSpanModelUsageSpeed `json:"speed"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ActiveSeconds float64 `json:"active_seconds"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	CacheCreation ManagedAgentsCacheCreationUsage `json:"cache_creation"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ListCost MonetaryAmount `json:"list_cost"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ServerToolUse ManagedAgentsServerToolUsage `json:"server_tool_use"`
	JSON          struct {
		Credits                  respjson.Field
		CacheCreationInputTokens respjson.Field
		CacheReadInputTokens     respjson.Field
		InputTokens              respjson.Field
		OutputTokens             respjson.Field
		Speed                    respjson.Field
		ActiveSeconds            respjson.Field
		CacheCreation            respjson.Field
		ListCost                 respjson.Field
		ServerToolUse            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionEventsUnionUsage is an implicit subunion of ManagedAgentsStreamSessionEventsUnion. ManagedAgentsStreamSessionEventsUnionUsage provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsStreamSessionEventsUnion.

func (*ManagedAgentsStreamSessionEventsUnionUsage) UnmarshalJSON

func (r *ManagedAgentsStreamSessionEventsUnionUsage) UnmarshalJSON(data []byte) error

type ManagedAgentsStreamSessionThreadEventsUnion

type ManagedAgentsStreamSessionThreadEventsUnion struct {
	ModelCredits          float64 `json:"model_credits"`
	SandboxRuntimeCredits float64 `json:"sandbox_runtime_credits"`
	TotalCredits          float64 `json:"total_credits"`
	ID                    string  `json:"id"`
	// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion],
	// [[]ManagedAgentsAgentMessageEventContentUnion],
	// [[]ManagedAgentsAgentMCPToolResultEventContentUnion],
	// [[]ManagedAgentsAgentToolResultEventContentUnion],
	// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion],
	// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion],
	// [[]ManagedAgentsUserToolResultEventContentUnion],
	// [[]ManagedAgentsSystemContentBlock]
	Content ManagedAgentsStreamSessionThreadEventsUnionContent `json:"content"`
	// Any of "user.message", "user.interrupt", "user.tool_confirmation",
	// "user.custom_tool_result", "agent.custom_tool_use", "agent.message",
	// "agent.thinking", "agent.mcp_tool_use", "agent.mcp_tool_result",
	// "agent.tool_use", "agent.tool_result", "agent.thread_message_received",
	// "agent.thread_message_sent", "agent.thread_context_compacted", "session.error",
	// "session.status_rescheduled", "session.status_running", "session.status_idle",
	// "session.status_terminated", "session.thread_created",
	// "span.outcome_evaluation_start", "span.outcome_evaluation_end",
	// "span.model_request_start", "span.model_request_end",
	// "span.outcome_evaluation_ongoing", "user.define_outcome", "session.deleted",
	// "session.thread_status_running", "session.thread_status_idle",
	// "session.thread_status_terminated", "user.tool_result",
	// "session.thread_status_rescheduled", "session.updated", "event_start",
	// "event_delta", "system.message", "session.usage".
	Type            string    `json:"type"`
	ProcessedAt     time.Time `json:"processed_at"`
	SessionThreadID string    `json:"session_thread_id"`
	Result          string    `json:"result"`
	ToolUseID       string    `json:"tool_use_id"`
	// This field is from variant [ManagedAgentsUserToolConfirmationEvent].
	DenyMessage string `json:"deny_message"`
	// This field is from variant [ManagedAgentsUserCustomToolResultEvent].
	CustomToolUseID string `json:"custom_tool_use_id"`
	IsError         bool   `json:"is_error"`
	Input           any    `json:"input"`
	Name            string `json:"name"`
	// This field is from variant [ManagedAgentsAgentMCPToolUseEvent].
	MCPServerName       string `json:"mcp_server_name"`
	EvaluatedPermission string `json:"evaluated_permission"`
	// This field is from variant [ManagedAgentsAgentMCPToolResultEvent].
	MCPToolUseID string `json:"mcp_tool_use_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].
	FromSessionThreadID string `json:"from_session_thread_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].
	FromAgentName string `json:"from_agent_name"`
	// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].
	ToSessionThreadID string `json:"to_session_thread_id"`
	// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].
	ToAgentName string `json:"to_agent_name"`
	// This field is from variant [ManagedAgentsSessionErrorEvent].
	Error ManagedAgentsSessionErrorEventErrorUnion `json:"error"`
	// This field is a union of
	// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],
	// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion]
	StopReason ManagedAgentsStreamSessionThreadEventsUnionStopReason `json:"stop_reason"`
	AgentName  string                                                `json:"agent_name"`
	Iteration  int64                                                 `json:"iteration"`
	OutcomeID  string                                                `json:"outcome_id"`
	// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].
	Explanation string `json:"explanation"`
	// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].
	OutcomeEvaluationStartID string `json:"outcome_evaluation_start_id"`
	// This field is a union of [ManagedAgentsSpanModelUsage],
	// [ManagedAgentsSessionUsageSnapshot]
	Usage ManagedAgentsStreamSessionThreadEventsUnionUsage `json:"usage"`
	// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].
	ModelRequestStartID string `json:"model_request_start_id"`
	// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].
	ModelUsage ManagedAgentsSpanModelUsage `json:"model_usage"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	MaxIterations int64 `json:"max_iterations"`
	// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].
	Rubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:"rubric"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Agent ManagedAgentsSessionAgent `json:"agent"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Budget ManagedAgentsBudgetLimit `json:"budget"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Metadata map[string]string `json:"metadata"`
	// This field is from variant [ManagedAgentsSessionUpdatedEvent].
	Title string `json:"title"`
	// This field is from variant [ManagedAgentsStartEvent].
	Event ManagedAgentsStartEventPreviewUnion `json:"event"`
	// This field is from variant [ManagedAgentsDeltaEvent].
	Delta ManagedAgentsDeltaContent `json:"delta"`
	// This field is from variant [ManagedAgentsDeltaEvent].
	EventID string `json:"event_id"`
	JSON    struct {
		ModelCredits             respjson.Field
		SandboxRuntimeCredits    respjson.Field
		TotalCredits             respjson.Field
		ID                       respjson.Field
		Content                  respjson.Field
		Type                     respjson.Field
		ProcessedAt              respjson.Field
		SessionThreadID          respjson.Field
		Result                   respjson.Field
		ToolUseID                respjson.Field
		DenyMessage              respjson.Field
		CustomToolUseID          respjson.Field
		IsError                  respjson.Field
		Input                    respjson.Field
		Name                     respjson.Field
		MCPServerName            respjson.Field
		EvaluatedPermission      respjson.Field
		MCPToolUseID             respjson.Field
		FromSessionThreadID      respjson.Field
		FromAgentName            respjson.Field
		ToSessionThreadID        respjson.Field
		ToAgentName              respjson.Field
		Error                    respjson.Field
		StopReason               respjson.Field
		AgentName                respjson.Field
		Iteration                respjson.Field
		OutcomeID                respjson.Field
		Explanation              respjson.Field
		OutcomeEvaluationStartID respjson.Field
		Usage                    respjson.Field
		ModelRequestStartID      respjson.Field
		ModelUsage               respjson.Field
		Description              respjson.Field
		MaxIterations            respjson.Field
		Rubric                   respjson.Field
		Agent                    respjson.Field
		Budget                   respjson.Field
		Metadata                 respjson.Field
		Title                    respjson.Field
		Event                    respjson.Field
		Delta                    respjson.Field
		EventID                  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionThreadEventsUnion contains all possible properties and values from ManagedAgentsUserMessageEvent, ManagedAgentsUserInterruptEvent, ManagedAgentsUserToolConfirmationEvent, ManagedAgentsUserCustomToolResultEvent, ManagedAgentsAgentCustomToolUseEvent, ManagedAgentsAgentMessageEvent, ManagedAgentsAgentThinkingEvent, ManagedAgentsAgentMCPToolUseEvent, ManagedAgentsAgentMCPToolResultEvent, ManagedAgentsAgentToolUseEvent, ManagedAgentsAgentToolResultEvent, ManagedAgentsAgentThreadMessageReceivedEvent, ManagedAgentsAgentThreadMessageSentEvent, ManagedAgentsAgentThreadContextCompactedEvent, ManagedAgentsSessionErrorEvent, ManagedAgentsSessionStatusRescheduledEvent, ManagedAgentsSessionStatusRunningEvent, ManagedAgentsSessionStatusIdleEvent, ManagedAgentsSessionStatusTerminatedEvent, ManagedAgentsSessionThreadCreatedEvent, ManagedAgentsSpanOutcomeEvaluationStartEvent, ManagedAgentsSpanOutcomeEvaluationEndEvent, ManagedAgentsSpanModelRequestStartEvent, ManagedAgentsSpanModelRequestEndEvent, ManagedAgentsSpanOutcomeEvaluationOngoingEvent, ManagedAgentsUserDefineOutcomeEvent, ManagedAgentsSessionDeletedEvent, ManagedAgentsSessionThreadStatusRunningEvent, ManagedAgentsSessionThreadStatusIdleEvent, ManagedAgentsSessionThreadStatusTerminatedEvent, ManagedAgentsUserToolResultEvent, ManagedAgentsSessionThreadStatusRescheduledEvent, ManagedAgentsSessionUpdatedEvent, ManagedAgentsStartEvent, ManagedAgentsDeltaEvent, ManagedAgentsSystemMessageEvent, ManagedAgentsSessionUsageEvent.

Use the ManagedAgentsStreamSessionThreadEventsUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentCustomToolUse

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentMCPToolResult

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentMCPToolUse

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentMessage

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThinking

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThreadContextCompacted

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThreadMessageReceived

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThreadMessageSent

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentToolResult

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAgentToolUse

func (ManagedAgentsStreamSessionThreadEventsUnion) AsAny

func (u ManagedAgentsStreamSessionThreadEventsUnion) AsAny() anyManagedAgentsStreamSessionThreadEvents

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsStreamSessionThreadEventsUnion.AsAny().(type) {
case qoder.ManagedAgentsUserMessageEvent:
case qoder.ManagedAgentsUserInterruptEvent:
case qoder.ManagedAgentsUserToolConfirmationEvent:
case qoder.ManagedAgentsUserCustomToolResultEvent:
case qoder.ManagedAgentsAgentCustomToolUseEvent:
case qoder.ManagedAgentsAgentMessageEvent:
case qoder.ManagedAgentsAgentThinkingEvent:
case qoder.ManagedAgentsAgentMCPToolUseEvent:
case qoder.ManagedAgentsAgentMCPToolResultEvent:
case qoder.ManagedAgentsAgentToolUseEvent:
case qoder.ManagedAgentsAgentToolResultEvent:
case qoder.ManagedAgentsAgentThreadMessageReceivedEvent:
case qoder.ManagedAgentsAgentThreadMessageSentEvent:
case qoder.ManagedAgentsAgentThreadContextCompactedEvent:
case qoder.ManagedAgentsSessionErrorEvent:
case qoder.ManagedAgentsSessionStatusRescheduledEvent:
case qoder.ManagedAgentsSessionStatusRunningEvent:
case qoder.ManagedAgentsSessionStatusIdleEvent:
case qoder.ManagedAgentsSessionStatusTerminatedEvent:
case qoder.ManagedAgentsSessionThreadCreatedEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationStartEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationEndEvent:
case qoder.ManagedAgentsSpanModelRequestStartEvent:
case qoder.ManagedAgentsSpanModelRequestEndEvent:
case qoder.ManagedAgentsSpanOutcomeEvaluationOngoingEvent:
case qoder.ManagedAgentsUserDefineOutcomeEvent:
case qoder.ManagedAgentsSessionDeletedEvent:
case qoder.ManagedAgentsSessionThreadStatusRunningEvent:
case qoder.ManagedAgentsSessionThreadStatusIdleEvent:
case qoder.ManagedAgentsSessionThreadStatusTerminatedEvent:
case qoder.ManagedAgentsUserToolResultEvent:
case qoder.ManagedAgentsSessionThreadStatusRescheduledEvent:
case qoder.ManagedAgentsSessionUpdatedEvent:
case qoder.ManagedAgentsStartEvent:
case qoder.ManagedAgentsDeltaEvent:
case qoder.ManagedAgentsSystemMessageEvent:
case qoder.ManagedAgentsSessionUsageEvent:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsStreamSessionThreadEventsUnion) AsEventDelta

func (ManagedAgentsStreamSessionThreadEventsUnion) AsEventStart

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionDeleted

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionError

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusIdle

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusRescheduled

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusRunning

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusTerminated

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadCreated

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusIdle

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusRescheduled

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusRunning

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusTerminated

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionUpdated

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSessionUsage

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSpanModelRequestEnd

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSpanModelRequestStart

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSpanOutcomeEvaluationEnd

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSpanOutcomeEvaluationOngoing

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSpanOutcomeEvaluationStart

func (ManagedAgentsStreamSessionThreadEventsUnion) AsSystemMessage

func (ManagedAgentsStreamSessionThreadEventsUnion) AsUserCustomToolResult

func (ManagedAgentsStreamSessionThreadEventsUnion) AsUserDefineOutcome

func (ManagedAgentsStreamSessionThreadEventsUnion) AsUserInterrupt

func (ManagedAgentsStreamSessionThreadEventsUnion) AsUserMessage

func (ManagedAgentsStreamSessionThreadEventsUnion) AsUserToolConfirmation

func (ManagedAgentsStreamSessionThreadEventsUnion) AsUserToolResult

func (ManagedAgentsStreamSessionThreadEventsUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsStreamSessionThreadEventsUnion) UnmarshalJSON

func (r *ManagedAgentsStreamSessionThreadEventsUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsStreamSessionThreadEventsUnionContent

type ManagedAgentsStreamSessionThreadEventsUnionContent struct {
	// This field will be present if the value is a
	// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.
	OfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentMessageEventContentUnion] instead of an object.
	OfManagedAgentsAgentMessageEventContentArray []ManagedAgentsAgentMessageEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentMCPToolResultEventContentUnion] instead of an object.
	OfManagedAgentsAgentMCPToolResultEventContentArray []ManagedAgentsAgentMCPToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentToolResultEventContentUnion] instead of an object.
	OfManagedAgentsAgentToolResultEventContentArray []ManagedAgentsAgentToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion] instead of an
	// object.
	OfManagedAgentsAgentThreadMessageReceivedEventContentArray []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion] instead of an
	// object.
	OfManagedAgentsAgentThreadMessageSentEventContentArray []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.
	OfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ManagedAgentsSystemContentBlock] instead of an object.
	OfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:",inline"`
	JSON                                   struct {
		OfManagedAgentsUserMessageEventContentArray                respjson.Field
		OfManagedAgentsUserCustomToolResultEventContentArray       respjson.Field
		OfManagedAgentsAgentMessageEventContentArray               respjson.Field
		OfManagedAgentsAgentMCPToolResultEventContentArray         respjson.Field
		OfManagedAgentsAgentToolResultEventContentArray            respjson.Field
		OfManagedAgentsAgentThreadMessageReceivedEventContentArray respjson.Field
		OfManagedAgentsAgentThreadMessageSentEventContentArray     respjson.Field
		OfManagedAgentsUserToolResultEventContentArray             respjson.Field
		OfManagedAgentsSystemContentBlockArray                     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionThreadEventsUnionContent is an implicit subunion of ManagedAgentsStreamSessionThreadEventsUnion. ManagedAgentsStreamSessionThreadEventsUnionContent provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsStreamSessionThreadEventsUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsUserMessageEventContentArray OfManagedAgentsUserCustomToolResultEventContentArray OfManagedAgentsAgentMessageEventContentArray OfManagedAgentsAgentMCPToolResultEventContentArray OfManagedAgentsAgentToolResultEventContentArray OfManagedAgentsAgentThreadMessageReceivedEventContentArray OfManagedAgentsAgentThreadMessageSentEventContentArray OfManagedAgentsUserToolResultEventContentArray OfManagedAgentsSystemContentBlockArray]

func (*ManagedAgentsStreamSessionThreadEventsUnionContent) UnmarshalJSON

type ManagedAgentsStreamSessionThreadEventsUnionStopReason

type ManagedAgentsStreamSessionThreadEventsUnionStopReason struct {
	Type string `json:"type"`
	// This field is from variant
	// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],
	// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion].
	EventIDs []string `json:"event_ids"`
	JSON     struct {
		Type     respjson.Field
		EventIDs respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionThreadEventsUnionStopReason is an implicit subunion of ManagedAgentsStreamSessionThreadEventsUnion. ManagedAgentsStreamSessionThreadEventsUnionStopReason provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsStreamSessionThreadEventsUnion.

func (*ManagedAgentsStreamSessionThreadEventsUnionStopReason) UnmarshalJSON

type ManagedAgentsStreamSessionThreadEventsUnionUsage

type ManagedAgentsStreamSessionThreadEventsUnionUsage struct {
	Credits float64 `json:"credits"`
	// This field is from variant [ManagedAgentsSpanModelUsage].
	CacheCreationInputTokens int64 `json:"cache_creation_input_tokens"`
	CacheReadInputTokens     int64 `json:"cache_read_input_tokens"`
	InputTokens              int64 `json:"input_tokens"`
	OutputTokens             int64 `json:"output_tokens"`
	// This field is from variant [ManagedAgentsSpanModelUsage].
	Speed ManagedAgentsSpanModelUsageSpeed `json:"speed"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ActiveSeconds float64 `json:"active_seconds"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	CacheCreation ManagedAgentsCacheCreationUsage `json:"cache_creation"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ListCost MonetaryAmount `json:"list_cost"`
	// This field is from variant [ManagedAgentsSessionUsageSnapshot].
	ServerToolUse ManagedAgentsServerToolUsage `json:"server_tool_use"`
	JSON          struct {
		Credits                  respjson.Field
		CacheCreationInputTokens respjson.Field
		CacheReadInputTokens     respjson.Field
		InputTokens              respjson.Field
		OutputTokens             respjson.Field
		Speed                    respjson.Field
		ActiveSeconds            respjson.Field
		CacheCreation            respjson.Field
		ListCost                 respjson.Field
		ServerToolUse            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsStreamSessionThreadEventsUnionUsage is an implicit subunion of ManagedAgentsStreamSessionThreadEventsUnion. ManagedAgentsStreamSessionThreadEventsUnionUsage provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsStreamSessionThreadEventsUnion.

func (*ManagedAgentsStreamSessionThreadEventsUnionUsage) UnmarshalJSON

type ManagedAgentsSystemContentBlock

type ManagedAgentsSystemContentBlock struct {
	// The text content.
	Text string `json:"text" api:"required"`
	// Any of "text".
	Type ManagedAgentsSystemContentBlockType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Regular text content.

func (ManagedAgentsSystemContentBlock) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsSystemContentBlock) ToParam

ToParam converts this ManagedAgentsSystemContentBlock to a ManagedAgentsSystemContentBlockParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsSystemContentBlockParam.Overrides()

func (*ManagedAgentsSystemContentBlock) UnmarshalJSON

func (r *ManagedAgentsSystemContentBlock) UnmarshalJSON(data []byte) error

type ManagedAgentsSystemContentBlockParam

type ManagedAgentsSystemContentBlockParam struct {
	// The text content.
	Text string `json:"text" api:"required"`
	// Any of "text".
	Type ManagedAgentsSystemContentBlockType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Regular text content.

The properties Text, Type are required.

func (ManagedAgentsSystemContentBlockParam) MarshalJSON

func (r ManagedAgentsSystemContentBlockParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsSystemContentBlockParam) UnmarshalJSON

func (r *ManagedAgentsSystemContentBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsSystemContentBlockType

type ManagedAgentsSystemContentBlockType string
const (
	ManagedAgentsSystemContentBlockTypeText ManagedAgentsSystemContentBlockType = "text"
)

type ManagedAgentsSystemMessageEvent

type ManagedAgentsSystemMessageEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// System content blocks. Text-only.
	Content []ManagedAgentsSystemContentBlock `json:"content" api:"required"`
	// Any of "system.message".
	Type ManagedAgentsSystemMessageEventType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"nullable" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Content     respjson.Field
		Type        respjson.Field
		ProcessedAt respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A mid-conversation system message event. Carries system-role content that is appended to the session as a `role: "system"` turn.

func (ManagedAgentsSystemMessageEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsSystemMessageEvent) UnmarshalJSON

func (r *ManagedAgentsSystemMessageEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsSystemMessageEventParams

type ManagedAgentsSystemMessageEventParams struct {
	// System content blocks to append. Text-only.
	Content []ManagedAgentsSystemContentBlockParam `json:"content,omitzero" api:"required"`
	// Any of "system.message".
	Type ManagedAgentsSystemMessageEventParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a `role: "system"` turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the `user.message`, `user.tool_result`, or `user.custom_tool_result` it accompanies. Only supported on models that accept mid-conversation system messages.

The properties Content, Type are required.

func (ManagedAgentsSystemMessageEventParams) MarshalJSON

func (r ManagedAgentsSystemMessageEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsSystemMessageEventParams) UnmarshalJSON

func (r *ManagedAgentsSystemMessageEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsSystemMessageEventParamsType

type ManagedAgentsSystemMessageEventParamsType string
const (
	ManagedAgentsSystemMessageEventParamsTypeSystemMessage ManagedAgentsSystemMessageEventParamsType = "system.message"
)

type ManagedAgentsSystemMessageEventType

type ManagedAgentsSystemMessageEventType string
const (
	ManagedAgentsSystemMessageEventTypeSystemMessage ManagedAgentsSystemMessageEventType = "system.message"
)

type ManagedAgentsTextBlock

type ManagedAgentsTextBlock struct {
	// The text content.
	Text string `json:"text" api:"required"`
	// Any of "text".
	Type ManagedAgentsTextBlockType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Regular text content.

func (ManagedAgentsTextBlock) RawJSON

func (r ManagedAgentsTextBlock) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsTextBlock) ToParam

ToParam converts this ManagedAgentsTextBlock to a ManagedAgentsTextBlockParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsTextBlockParam.Overrides()

func (*ManagedAgentsTextBlock) UnmarshalJSON

func (r *ManagedAgentsTextBlock) UnmarshalJSON(data []byte) error

type ManagedAgentsTextBlockParam

type ManagedAgentsTextBlockParam struct {
	// The text content.
	Text string `json:"text" api:"required"`
	// Any of "text".
	Type ManagedAgentsTextBlockType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Regular text content.

The properties Text, Type are required.

func (ManagedAgentsTextBlockParam) MarshalJSON

func (r ManagedAgentsTextBlockParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTextBlockParam) UnmarshalJSON

func (r *ManagedAgentsTextBlockParam) UnmarshalJSON(data []byte) error

type ManagedAgentsTextBlockType

type ManagedAgentsTextBlockType string
const (
	ManagedAgentsTextBlockTypeText ManagedAgentsTextBlockType = "text"
)

type ManagedAgentsTextRubric

type ManagedAgentsTextRubric struct {
	// Rubric content. Plain text or markdown — the grader treats it as freeform text.
	Content string `json:"content" api:"required"`
	// Any of "text".
	Type ManagedAgentsTextRubricType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Content     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Rubric content provided inline as text.

func (ManagedAgentsTextRubric) RawJSON

func (r ManagedAgentsTextRubric) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsTextRubric) UnmarshalJSON

func (r *ManagedAgentsTextRubric) UnmarshalJSON(data []byte) error

type ManagedAgentsTextRubricParams

type ManagedAgentsTextRubricParams struct {
	// Rubric content. Plain text or markdown — the grader treats it as freeform text.
	// Maximum 262144 characters.
	Content string `json:"content" api:"required"`
	// Any of "text".
	Type ManagedAgentsTextRubricParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Rubric content provided inline as text.

The properties Content, Type are required.

func (ManagedAgentsTextRubricParams) MarshalJSON

func (r ManagedAgentsTextRubricParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTextRubricParams) UnmarshalJSON

func (r *ManagedAgentsTextRubricParams) UnmarshalJSON(data []byte) error

type ManagedAgentsTextRubricParamsType

type ManagedAgentsTextRubricParamsType string
const (
	ManagedAgentsTextRubricParamsTypeText ManagedAgentsTextRubricParamsType = "text"
)

type ManagedAgentsTextRubricType

type ManagedAgentsTextRubricType string
const (
	ManagedAgentsTextRubricTypeText ManagedAgentsTextRubricType = "text"
)

type ManagedAgentsTokenEndpointAuthBasicParam

type ManagedAgentsTokenEndpointAuthBasicParam struct {
	// OAuth client secret.
	ClientSecret string `json:"client_secret" api:"required"`
	// Any of "client_secret_basic".
	Type ManagedAgentsTokenEndpointAuthBasicParamType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Token endpoint uses HTTP Basic authentication with client credentials.

The properties ClientSecret, Type are required.

func (ManagedAgentsTokenEndpointAuthBasicParam) MarshalJSON

func (r ManagedAgentsTokenEndpointAuthBasicParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTokenEndpointAuthBasicParam) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthBasicParam) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthBasicParamType

type ManagedAgentsTokenEndpointAuthBasicParamType string
const (
	ManagedAgentsTokenEndpointAuthBasicParamTypeClientSecretBasic ManagedAgentsTokenEndpointAuthBasicParamType = "client_secret_basic"
)

type ManagedAgentsTokenEndpointAuthBasicResponse

type ManagedAgentsTokenEndpointAuthBasicResponse struct {
	// Any of "client_secret_basic".
	Type ManagedAgentsTokenEndpointAuthBasicResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token endpoint uses HTTP Basic authentication with client credentials.

func (ManagedAgentsTokenEndpointAuthBasicResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsTokenEndpointAuthBasicResponse) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthBasicResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthBasicResponseType

type ManagedAgentsTokenEndpointAuthBasicResponseType string
const (
	ManagedAgentsTokenEndpointAuthBasicResponseTypeClientSecretBasic ManagedAgentsTokenEndpointAuthBasicResponseType = "client_secret_basic"
)

type ManagedAgentsTokenEndpointAuthBasicUpdateParam

type ManagedAgentsTokenEndpointAuthBasicUpdateParam struct {
	// Any of "client_secret_basic".
	Type ManagedAgentsTokenEndpointAuthBasicUpdateParamType `json:"type,omitzero" api:"required"`
	// Updated OAuth client secret.
	ClientSecret param.Opt[string] `json:"client_secret,omitzero"`
	// contains filtered or unexported fields
}

Updated HTTP Basic authentication parameters for the token endpoint.

The property Type is required.

func (ManagedAgentsTokenEndpointAuthBasicUpdateParam) MarshalJSON

func (r ManagedAgentsTokenEndpointAuthBasicUpdateParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTokenEndpointAuthBasicUpdateParam) UnmarshalJSON

type ManagedAgentsTokenEndpointAuthBasicUpdateParamType

type ManagedAgentsTokenEndpointAuthBasicUpdateParamType string
const (
	ManagedAgentsTokenEndpointAuthBasicUpdateParamTypeClientSecretBasic ManagedAgentsTokenEndpointAuthBasicUpdateParamType = "client_secret_basic"
)

type ManagedAgentsTokenEndpointAuthNoneParam

type ManagedAgentsTokenEndpointAuthNoneParam struct {
	// Any of "none".
	Type ManagedAgentsTokenEndpointAuthNoneParamType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Token endpoint requires no client authentication.

The property Type is required.

func (ManagedAgentsTokenEndpointAuthNoneParam) MarshalJSON

func (r ManagedAgentsTokenEndpointAuthNoneParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTokenEndpointAuthNoneParam) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthNoneParam) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthNoneParamType

type ManagedAgentsTokenEndpointAuthNoneParamType string
const (
	ManagedAgentsTokenEndpointAuthNoneParamTypeNone ManagedAgentsTokenEndpointAuthNoneParamType = "none"
)

type ManagedAgentsTokenEndpointAuthNoneResponse

type ManagedAgentsTokenEndpointAuthNoneResponse struct {
	// Any of "none".
	Type ManagedAgentsTokenEndpointAuthNoneResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token endpoint requires no client authentication.

func (ManagedAgentsTokenEndpointAuthNoneResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsTokenEndpointAuthNoneResponse) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthNoneResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthNoneResponseType

type ManagedAgentsTokenEndpointAuthNoneResponseType string
const (
	ManagedAgentsTokenEndpointAuthNoneResponseTypeNone ManagedAgentsTokenEndpointAuthNoneResponseType = "none"
)

type ManagedAgentsTokenEndpointAuthPostParam

type ManagedAgentsTokenEndpointAuthPostParam struct {
	// OAuth client secret.
	ClientSecret string `json:"client_secret" api:"required"`
	// Any of "client_secret_post".
	Type ManagedAgentsTokenEndpointAuthPostParamType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Token endpoint uses POST body authentication with client credentials.

The properties ClientSecret, Type are required.

func (ManagedAgentsTokenEndpointAuthPostParam) MarshalJSON

func (r ManagedAgentsTokenEndpointAuthPostParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTokenEndpointAuthPostParam) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthPostParam) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthPostParamType

type ManagedAgentsTokenEndpointAuthPostParamType string
const (
	ManagedAgentsTokenEndpointAuthPostParamTypeClientSecretPost ManagedAgentsTokenEndpointAuthPostParamType = "client_secret_post"
)

type ManagedAgentsTokenEndpointAuthPostResponse

type ManagedAgentsTokenEndpointAuthPostResponse struct {
	// Any of "client_secret_post".
	Type ManagedAgentsTokenEndpointAuthPostResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token endpoint uses POST body authentication with client credentials.

func (ManagedAgentsTokenEndpointAuthPostResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsTokenEndpointAuthPostResponse) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthPostResponse) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthPostResponseType

type ManagedAgentsTokenEndpointAuthPostResponseType string
const (
	ManagedAgentsTokenEndpointAuthPostResponseTypeClientSecretPost ManagedAgentsTokenEndpointAuthPostResponseType = "client_secret_post"
)

type ManagedAgentsTokenEndpointAuthPostUpdateParam

type ManagedAgentsTokenEndpointAuthPostUpdateParam struct {
	// Any of "client_secret_post".
	Type ManagedAgentsTokenEndpointAuthPostUpdateParamType `json:"type,omitzero" api:"required"`
	// Updated OAuth client secret.
	ClientSecret param.Opt[string] `json:"client_secret,omitzero"`
	// contains filtered or unexported fields
}

Updated POST body authentication parameters for the token endpoint.

The property Type is required.

func (ManagedAgentsTokenEndpointAuthPostUpdateParam) MarshalJSON

func (r ManagedAgentsTokenEndpointAuthPostUpdateParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsTokenEndpointAuthPostUpdateParam) UnmarshalJSON

func (r *ManagedAgentsTokenEndpointAuthPostUpdateParam) UnmarshalJSON(data []byte) error

type ManagedAgentsTokenEndpointAuthPostUpdateParamType

type ManagedAgentsTokenEndpointAuthPostUpdateParamType string
const (
	ManagedAgentsTokenEndpointAuthPostUpdateParamTypeClientSecretPost ManagedAgentsTokenEndpointAuthPostUpdateParamType = "client_secret_post"
)

type ManagedAgentsTriggerContextUnion

type ManagedAgentsTriggerContextUnion struct {
	// This field is from variant [ManagedAgentsScheduleTriggerContext].
	ScheduledAt time.Time `json:"scheduled_at"`
	// Any of "schedule", "manual".
	Type string `json:"type"`
	JSON struct {
		ScheduledAt respjson.Field
		Type        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsTriggerContextUnion contains all possible properties and values from ManagedAgentsScheduleTriggerContext, ManagedAgentsManualTriggerContext.

Use the ManagedAgentsTriggerContextUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsTriggerContextUnion) AsAny

func (u ManagedAgentsTriggerContextUnion) AsAny() anyManagedAgentsTriggerContext

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsTriggerContextUnion.AsAny().(type) {
case qoder.ManagedAgentsScheduleTriggerContext:
case qoder.ManagedAgentsManualTriggerContext:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsTriggerContextUnion) AsManual

func (ManagedAgentsTriggerContextUnion) AsSchedule

func (ManagedAgentsTriggerContextUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsTriggerContextUnion) UnmarshalJSON

func (r *ManagedAgentsTriggerContextUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsTriggerType

type ManagedAgentsTriggerType string

What triggered a deployment run.

const (
	ManagedAgentsTriggerTypeSchedule ManagedAgentsTriggerType = "schedule"
	ManagedAgentsTriggerTypeManual   ManagedAgentsTriggerType = "manual"
)

type ManagedAgentsURLDocumentSource

type ManagedAgentsURLDocumentSource struct {
	// Any of "url".
	Type ManagedAgentsURLDocumentSourceType `json:"type" api:"required"`
	// URL of the document to fetch.
	URL string `json:"url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Document referenced by URL.

func (ManagedAgentsURLDocumentSource) RawJSON

Returns the unmodified JSON received from the API

func (ManagedAgentsURLDocumentSource) ToParam

ToParam converts this ManagedAgentsURLDocumentSource to a ManagedAgentsURLDocumentSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsURLDocumentSourceParam.Overrides()

func (*ManagedAgentsURLDocumentSource) UnmarshalJSON

func (r *ManagedAgentsURLDocumentSource) UnmarshalJSON(data []byte) error

type ManagedAgentsURLDocumentSourceParam

type ManagedAgentsURLDocumentSourceParam struct {
	// Any of "url".
	Type ManagedAgentsURLDocumentSourceType `json:"type,omitzero" api:"required"`
	// URL of the document to fetch.
	URL string `json:"url" api:"required"`
	// contains filtered or unexported fields
}

Document referenced by URL.

The properties Type, URL are required.

func (ManagedAgentsURLDocumentSourceParam) MarshalJSON

func (r ManagedAgentsURLDocumentSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsURLDocumentSourceParam) UnmarshalJSON

func (r *ManagedAgentsURLDocumentSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsURLDocumentSourceType

type ManagedAgentsURLDocumentSourceType string
const (
	ManagedAgentsURLDocumentSourceTypeURL ManagedAgentsURLDocumentSourceType = "url"
)

type ManagedAgentsURLImageSource

type ManagedAgentsURLImageSource struct {
	// Any of "url".
	Type ManagedAgentsURLImageSourceType `json:"type" api:"required"`
	// URL of the image to fetch.
	URL string `json:"url" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Image referenced by URL.

func (ManagedAgentsURLImageSource) RawJSON

func (r ManagedAgentsURLImageSource) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsURLImageSource) ToParam

ToParam converts this ManagedAgentsURLImageSource to a ManagedAgentsURLImageSourceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsURLImageSourceParam.Overrides()

func (*ManagedAgentsURLImageSource) UnmarshalJSON

func (r *ManagedAgentsURLImageSource) UnmarshalJSON(data []byte) error

type ManagedAgentsURLImageSourceParam

type ManagedAgentsURLImageSourceParam struct {
	// Any of "url".
	Type ManagedAgentsURLImageSourceType `json:"type,omitzero" api:"required"`
	// URL of the image to fetch.
	URL string `json:"url" api:"required"`
	// contains filtered or unexported fields
}

Image referenced by URL.

The properties Type, URL are required.

func (ManagedAgentsURLImageSourceParam) MarshalJSON

func (r ManagedAgentsURLImageSourceParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsURLImageSourceParam) UnmarshalJSON

func (r *ManagedAgentsURLImageSourceParam) UnmarshalJSON(data []byte) error

type ManagedAgentsURLImageSourceType

type ManagedAgentsURLImageSourceType string
const (
	ManagedAgentsURLImageSourceTypeURL ManagedAgentsURLImageSourceType = "url"
)

type ManagedAgentsURLMCPServerParams

type ManagedAgentsURLMCPServerParams struct {
	// Unique name for this server, referenced by mcp_toolset configurations. 1-255
	// characters.
	Name string `json:"name" api:"required"`
	// Any of "url".
	Type ManagedAgentsURLMCPServerParamsType `json:"type,omitzero" api:"required"`
	// Endpoint URL for the MCP server.
	URL string `json:"url" api:"required"`
	// contains filtered or unexported fields
}

URL-based MCP server connection.

The properties Name, Type, URL are required.

func (ManagedAgentsURLMCPServerParams) MarshalJSON

func (r ManagedAgentsURLMCPServerParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsURLMCPServerParams) UnmarshalJSON

func (r *ManagedAgentsURLMCPServerParams) UnmarshalJSON(data []byte) error

type ManagedAgentsURLMCPServerParamsType

type ManagedAgentsURLMCPServerParamsType string
const (
	ManagedAgentsURLMCPServerParamsTypeURL ManagedAgentsURLMCPServerParamsType = "url"
)

type ManagedAgentsUnknownDeploymentPausedReasonError

type ManagedAgentsUnknownDeploymentPausedReasonError struct {
	// Any of "unknown_error".
	Type ManagedAgentsUnknownDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An unrecognized error auto-paused the deployment. A fallback variant; matches a run whose `error.type` is `unknown_error`.

func (ManagedAgentsUnknownDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUnknownDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsUnknownDeploymentPausedReasonErrorType

type ManagedAgentsUnknownDeploymentPausedReasonErrorType string
const (
	ManagedAgentsUnknownDeploymentPausedReasonErrorTypeUnknownError ManagedAgentsUnknownDeploymentPausedReasonErrorType = "unknown_error"
)

type ManagedAgentsUnknownError

type ManagedAgentsUnknownError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// What the client should do next in response to this error.
	RetryStatus ManagedAgentsUnknownErrorRetryStatusUnion `json:"retry_status" api:"required"`
	// Any of "unknown_error".
	Type ManagedAgentsUnknownErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		RetryStatus respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An unknown or unexpected error occurred during session execution. A fallback variant; clients that don't recognize a new error code can match on `retry_status` and `message` alone.

func (ManagedAgentsUnknownError) RawJSON

func (r ManagedAgentsUnknownError) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsUnknownError) UnmarshalJSON

func (r *ManagedAgentsUnknownError) UnmarshalJSON(data []byte) error

type ManagedAgentsUnknownErrorRetryStatusUnion

type ManagedAgentsUnknownErrorRetryStatusUnion struct {
	// Any of "retrying", "exhausted", "terminal".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUnknownErrorRetryStatusUnion contains all possible properties and values from ManagedAgentsRetryStatusRetrying, ManagedAgentsRetryStatusExhausted, ManagedAgentsRetryStatusTerminal.

Use the ManagedAgentsUnknownErrorRetryStatusUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsUnknownErrorRetryStatusUnion) AsAny

func (u ManagedAgentsUnknownErrorRetryStatusUnion) AsAny() anyManagedAgentsUnknownErrorRetryStatus

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsUnknownErrorRetryStatusUnion.AsAny().(type) {
case qoder.ManagedAgentsRetryStatusRetrying:
case qoder.ManagedAgentsRetryStatusExhausted:
case qoder.ManagedAgentsRetryStatusTerminal:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsUnknownErrorRetryStatusUnion) AsExhausted

func (ManagedAgentsUnknownErrorRetryStatusUnion) AsRetrying

func (ManagedAgentsUnknownErrorRetryStatusUnion) AsTerminal

func (ManagedAgentsUnknownErrorRetryStatusUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUnknownErrorRetryStatusUnion) UnmarshalJSON

func (r *ManagedAgentsUnknownErrorRetryStatusUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsUnknownErrorType

type ManagedAgentsUnknownErrorType string
const (
	ManagedAgentsUnknownErrorTypeUnknownError ManagedAgentsUnknownErrorType = "unknown_error"
)

type ManagedAgentsUnknownRunError

type ManagedAgentsUnknownRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "unknown_error".
	Type ManagedAgentsUnknownRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An unknown or unexpected error caused the run to fail. A fallback variant; clients that do not recognize a new error type can match on message alone.

func (ManagedAgentsUnknownRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUnknownRunError) UnmarshalJSON

func (r *ManagedAgentsUnknownRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsUnknownRunErrorType

type ManagedAgentsUnknownRunErrorType string
const (
	ManagedAgentsUnknownRunErrorTypeUnknownError ManagedAgentsUnknownRunErrorType = "unknown_error"
)

type ManagedAgentsUnrestrictedCredentialNetworkingParams

type ManagedAgentsUnrestrictedCredentialNetworkingParams struct {
	// Any of "unrestricted".
	Type ManagedAgentsUnrestrictedCredentialNetworkingParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Substitute the secret on any host the session's Environment network policy permits egress to. The Environment's network policy is the only boundary on where the secret can reach.

The property Type is required.

func (ManagedAgentsUnrestrictedCredentialNetworkingParams) MarshalJSON

func (r ManagedAgentsUnrestrictedCredentialNetworkingParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUnrestrictedCredentialNetworkingParams) UnmarshalJSON

type ManagedAgentsUnrestrictedCredentialNetworkingParamsType

type ManagedAgentsUnrestrictedCredentialNetworkingParamsType string
const (
	ManagedAgentsUnrestrictedCredentialNetworkingParamsTypeUnrestricted ManagedAgentsUnrestrictedCredentialNetworkingParamsType = "unrestricted"
)

type ManagedAgentsUnrestrictedCredentialNetworkingResponse

type ManagedAgentsUnrestrictedCredentialNetworkingResponse struct {
	// Any of "unrestricted".
	Type ManagedAgentsUnrestrictedCredentialNetworkingResponseType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The secret is substituted on any host the session's Environment network policy permits egress to.

func (ManagedAgentsUnrestrictedCredentialNetworkingResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUnrestrictedCredentialNetworkingResponse) UnmarshalJSON

type ManagedAgentsUnrestrictedCredentialNetworkingResponseType

type ManagedAgentsUnrestrictedCredentialNetworkingResponseType string
const (
	ManagedAgentsUnrestrictedCredentialNetworkingResponseTypeUnrestricted ManagedAgentsUnrestrictedCredentialNetworkingResponseType = "unrestricted"
)

type ManagedAgentsUserActor

type ManagedAgentsUserActor struct {
	// Any of "user_actor".
	Type ManagedAgentsUserActorType `json:"type" api:"required"`
	// ID of the user who performed the write (a `user_...` value).
	UserID string `json:"user_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		UserID      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Attribution for a write made by a human user through the Qoder Console.

func (ManagedAgentsUserActor) RawJSON

func (r ManagedAgentsUserActor) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserActor) UnmarshalJSON

func (r *ManagedAgentsUserActor) UnmarshalJSON(data []byte) error

type ManagedAgentsUserActorType

type ManagedAgentsUserActorType string
const (
	ManagedAgentsUserActorTypeUserActor ManagedAgentsUserActorType = "user_actor"
)

type ManagedAgentsUserCustomToolResultEvent

type ManagedAgentsUserCustomToolResultEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// The id of the `agent.custom_tool_use` event this result corresponds to, which
	// can be found in the last `session.status_idle`
	// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)
	// `stop_reason.event_ids` field.
	CustomToolUseID string `json:"custom_tool_use_id" api:"required"`
	// Any of "user.custom_tool_result".
	Type ManagedAgentsUserCustomToolResultEventType `json:"type" api:"required"`
	// The result content returned by the tool.
	Content []ManagedAgentsUserCustomToolResultEventContentUnion `json:"content"`
	// Whether the tool execution resulted in an error.
	IsError bool `json:"is_error" api:"nullable"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"nullable" format:"date-time"`
	// Routes this result to a subagent thread. Copy from the `agent.custom_tool_use`
	// event's `session_thread_id`.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CustomToolUseID respjson.Field
		Type            respjson.Field
		Content         respjson.Field
		IsError         respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event sent by the client providing the result of a custom tool execution.

func (ManagedAgentsUserCustomToolResultEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserCustomToolResultEvent) UnmarshalJSON

func (r *ManagedAgentsUserCustomToolResultEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsUserCustomToolResultEventContentUnion

type ManagedAgentsUserCustomToolResultEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "search_result".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion], [string]
	Source ManagedAgentsUserCustomToolResultEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	Title   string `json:"title"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Citations ManagedAgentsSearchResultCitations `json:"citations"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Content []ManagedAgentsSearchResultContent `json:"content"`
	JSON    struct {
		Text      respjson.Field
		Type      respjson.Field
		Source    respjson.Field
		Context   respjson.Field
		Title     respjson.Field
		Citations respjson.Field
		Content   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserCustomToolResultEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsSearchResultBlock.

Use the ManagedAgentsUserCustomToolResultEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsUserCustomToolResultEventContentUnion) AsAny

func (u ManagedAgentsUserCustomToolResultEventContentUnion) AsAny() anyManagedAgentsUserCustomToolResultEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsUserCustomToolResultEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsSearchResultBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsUserCustomToolResultEventContentUnion) AsDocument

func (ManagedAgentsUserCustomToolResultEventContentUnion) AsImage

func (ManagedAgentsUserCustomToolResultEventContentUnion) AsSearchResult

func (ManagedAgentsUserCustomToolResultEventContentUnion) AsText

func (ManagedAgentsUserCustomToolResultEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserCustomToolResultEventContentUnion) UnmarshalJSON

type ManagedAgentsUserCustomToolResultEventContentUnionSource

type ManagedAgentsUserCustomToolResultEventContentUnionSource struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString  string `json:",inline"`
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		OfString  respjson.Field
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserCustomToolResultEventContentUnionSource is an implicit subunion of ManagedAgentsUserCustomToolResultEventContentUnion. ManagedAgentsUserCustomToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsUserCustomToolResultEventContentUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ManagedAgentsUserCustomToolResultEventContentUnionSource) UnmarshalJSON

type ManagedAgentsUserCustomToolResultEventParams

type ManagedAgentsUserCustomToolResultEventParams struct {
	// The id of the `agent.custom_tool_use` event this result corresponds to, which
	// can be found in the last `session.status_idle`
	// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)
	// `stop_reason.event_ids` field.
	CustomToolUseID string `json:"custom_tool_use_id" api:"required"`
	// Any of "user.custom_tool_result".
	Type ManagedAgentsUserCustomToolResultEventParamsType `json:"type,omitzero" api:"required"`
	// Whether the tool execution resulted in an error.
	IsError param.Opt[bool] `json:"is_error,omitzero"`
	// The result content returned by the tool.
	Content []ManagedAgentsUserCustomToolResultEventParamsContentUnion `json:"content,omitzero"`
	// contains filtered or unexported fields
}

Parameters for providing the result of a custom tool execution.

The properties CustomToolUseID, Type are required.

func (ManagedAgentsUserCustomToolResultEventParams) MarshalJSON

func (r ManagedAgentsUserCustomToolResultEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserCustomToolResultEventParams) UnmarshalJSON

func (r *ManagedAgentsUserCustomToolResultEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsUserCustomToolResultEventParamsContentUnion

type ManagedAgentsUserCustomToolResultEventParamsContentUnion struct {
	OfText         *ManagedAgentsTextBlockParam         `json:",omitzero,inline"`
	OfImage        *ManagedAgentsImageBlockParam        `json:",omitzero,inline"`
	OfDocument     *ManagedAgentsDocumentBlockParam     `json:",omitzero,inline"`
	OfSearchResult *ManagedAgentsSearchResultBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetCitations

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetContext

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetSource

func (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetSource() (res managedAgentsUserCustomToolResultEventParamsContentUnionSource)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetTitle

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserCustomToolResultEventParamsContentUnion) MarshalJSON

func (*ManagedAgentsUserCustomToolResultEventParamsContentUnion) UnmarshalJSON

type ManagedAgentsUserCustomToolResultEventParamsType

type ManagedAgentsUserCustomToolResultEventParamsType string
const (
	ManagedAgentsUserCustomToolResultEventParamsTypeUserCustomToolResult ManagedAgentsUserCustomToolResultEventParamsType = "user.custom_tool_result"
)

type ManagedAgentsUserCustomToolResultEventType

type ManagedAgentsUserCustomToolResultEventType string
const (
	ManagedAgentsUserCustomToolResultEventTypeUserCustomToolResult ManagedAgentsUserCustomToolResultEventType = "user.custom_tool_result"
)

type ManagedAgentsUserDefineOutcomeEvent

type ManagedAgentsUserDefineOutcomeEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// What the agent should produce. Copied from the input event.
	Description string `json:"description" api:"required"`
	// Evaluate-then-revise cycles before giving up. Default 3, max 20.
	MaxIterations int64 `json:"max_iterations" api:"required"`
	// Server-generated `outc_` ID for this outcome. Referenced by
	// `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.
	OutcomeID string `json:"outcome_id" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"required" format:"date-time"`
	// Rubric for grading the quality of an outcome.
	Rubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:"rubric" api:"required"`
	// Any of "user.define_outcome".
	Type ManagedAgentsUserDefineOutcomeEventType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		Description   respjson.Field
		MaxIterations respjson.Field
		OutcomeID     respjson.Field
		ProcessedAt   respjson.Field
		Rubric        respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Echo of a `user.define_outcome` input event. Carries the server-generated `outcome_id` that subsequent `span.outcome_evaluation_*` events reference.

func (ManagedAgentsUserDefineOutcomeEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserDefineOutcomeEvent) UnmarshalJSON

func (r *ManagedAgentsUserDefineOutcomeEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsUserDefineOutcomeEventParams

type ManagedAgentsUserDefineOutcomeEventParams struct {
	// What the agent should produce. This is the task specification.
	Description string `json:"description" api:"required"`
	// Rubric for grading the quality of an outcome.
	Rubric ManagedAgentsUserDefineOutcomeEventParamsRubricUnion `json:"rubric,omitzero" api:"required"`
	// Any of "user.define_outcome".
	Type ManagedAgentsUserDefineOutcomeEventParamsType `json:"type,omitzero" api:"required"`
	// Eval→revision cycles before giving up. Default 3, max 20.
	MaxIterations param.Opt[int64] `json:"max_iterations,omitzero"`
	// contains filtered or unexported fields
}

Parameters for defining an outcome the agent should work toward. The agent begins work on receipt.

The properties Description, Rubric, Type are required.

func (ManagedAgentsUserDefineOutcomeEventParams) MarshalJSON

func (r ManagedAgentsUserDefineOutcomeEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserDefineOutcomeEventParams) UnmarshalJSON

func (r *ManagedAgentsUserDefineOutcomeEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsUserDefineOutcomeEventParamsRubricUnion

type ManagedAgentsUserDefineOutcomeEventParamsRubricUnion struct {
	OfFile *ManagedAgentsFileRubricParams `json:",omitzero,inline"`
	OfText *ManagedAgentsTextRubricParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) MarshalJSON

func (*ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) UnmarshalJSON

type ManagedAgentsUserDefineOutcomeEventParamsType

type ManagedAgentsUserDefineOutcomeEventParamsType string
const (
	ManagedAgentsUserDefineOutcomeEventParamsTypeUserDefineOutcome ManagedAgentsUserDefineOutcomeEventParamsType = "user.define_outcome"
)

type ManagedAgentsUserDefineOutcomeEventRubricUnion

type ManagedAgentsUserDefineOutcomeEventRubricUnion struct {
	// This field is from variant [ManagedAgentsFileRubric].
	FileID string `json:"file_id"`
	// Any of "file", "text".
	Type string `json:"type"`
	// This field is from variant [ManagedAgentsTextRubric].
	Content string `json:"content"`
	JSON    struct {
		FileID  respjson.Field
		Type    respjson.Field
		Content respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserDefineOutcomeEventRubricUnion contains all possible properties and values from ManagedAgentsFileRubric, ManagedAgentsTextRubric.

Use the ManagedAgentsUserDefineOutcomeEventRubricUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsUserDefineOutcomeEventRubricUnion) AsAny

func (u ManagedAgentsUserDefineOutcomeEventRubricUnion) AsAny() anyManagedAgentsUserDefineOutcomeEventRubric

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsUserDefineOutcomeEventRubricUnion.AsAny().(type) {
case qoder.ManagedAgentsFileRubric:
case qoder.ManagedAgentsTextRubric:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsUserDefineOutcomeEventRubricUnion) AsFile

func (ManagedAgentsUserDefineOutcomeEventRubricUnion) AsText

func (ManagedAgentsUserDefineOutcomeEventRubricUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserDefineOutcomeEventRubricUnion) UnmarshalJSON

type ManagedAgentsUserDefineOutcomeEventType

type ManagedAgentsUserDefineOutcomeEventType string
const (
	ManagedAgentsUserDefineOutcomeEventTypeUserDefineOutcome ManagedAgentsUserDefineOutcomeEventType = "user.define_outcome"
)

type ManagedAgentsUserInterruptEvent

type ManagedAgentsUserInterruptEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Any of "user.interrupt".
	Type ManagedAgentsUserInterruptEventType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"nullable" format:"date-time"`
	// If absent, interrupts every non-archived thread in a multiagent session (or the
	// primary alone in a single-agent session). If present, interrupts only the named
	// thread.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Type            respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An interrupt event that pauses agent execution and returns control to the user.

func (ManagedAgentsUserInterruptEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserInterruptEvent) UnmarshalJSON

func (r *ManagedAgentsUserInterruptEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsUserInterruptEventParams

type ManagedAgentsUserInterruptEventParams struct {
	// Any of "user.interrupt".
	Type ManagedAgentsUserInterruptEventParamsType `json:"type,omitzero" api:"required"`
	// If absent, interrupts every non-archived thread in a multiagent session (or the
	// primary alone in a single-agent session). If present, interrupts only the named
	// thread.
	SessionThreadID param.Opt[string] `json:"session_thread_id,omitzero"`
	// contains filtered or unexported fields
}

Parameters for sending an interrupt to pause the agent.

The property Type is required.

func (ManagedAgentsUserInterruptEventParams) MarshalJSON

func (r ManagedAgentsUserInterruptEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserInterruptEventParams) UnmarshalJSON

func (r *ManagedAgentsUserInterruptEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsUserInterruptEventParamsType

type ManagedAgentsUserInterruptEventParamsType string
const (
	ManagedAgentsUserInterruptEventParamsTypeUserInterrupt ManagedAgentsUserInterruptEventParamsType = "user.interrupt"
)

type ManagedAgentsUserInterruptEventType

type ManagedAgentsUserInterruptEventType string
const (
	ManagedAgentsUserInterruptEventTypeUserInterrupt ManagedAgentsUserInterruptEventType = "user.interrupt"
)

type ManagedAgentsUserLocation

type ManagedAgentsUserLocation struct {
	// Location precision. Only "approximate" is supported.
	Type constant.Approximate `json:"type" default:"approximate"`
	// City name.
	City string `json:"city" api:"nullable"`
	// Two-letter ISO 3166-1 country code, uppercase.
	Country string `json:"country" api:"nullable"`
	// Region or state name.
	Region string `json:"region" api:"nullable"`
	// IANA timezone identifier, e.g. "America/Los_Angeles".
	Timezone string `json:"timezone" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		City        respjson.Field
		Country     respjson.Field
		Region      respjson.Field
		Timezone    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Approximate user location for search result localization.

func (ManagedAgentsUserLocation) RawJSON

func (r ManagedAgentsUserLocation) RawJSON() string

Returns the unmodified JSON received from the API

func (ManagedAgentsUserLocation) ToParam

ToParam converts this ManagedAgentsUserLocation to a ManagedAgentsUserLocationParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ManagedAgentsUserLocationParam.Overrides()

func (*ManagedAgentsUserLocation) UnmarshalJSON

func (r *ManagedAgentsUserLocation) UnmarshalJSON(data []byte) error

type ManagedAgentsUserLocationParam

type ManagedAgentsUserLocationParam struct {
	// City name.
	City param.Opt[string] `json:"city,omitzero"`
	// Two-letter ISO 3166-1 country code, uppercase.
	Country param.Opt[string] `json:"country,omitzero"`
	// Region or state name.
	Region param.Opt[string] `json:"region,omitzero"`
	// IANA timezone identifier, e.g. "America/Los_Angeles".
	Timezone param.Opt[string] `json:"timezone,omitzero"`
	// Location precision. Only "approximate" is supported.
	//
	// This field can be elided, and will marshal its zero value as "approximate".
	Type constant.Approximate `json:"type" default:"approximate"`
	// contains filtered or unexported fields
}

Approximate user location for search result localization.

The property Type is required.

func (ManagedAgentsUserLocationParam) MarshalJSON

func (r ManagedAgentsUserLocationParam) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserLocationParam) UnmarshalJSON

func (r *ManagedAgentsUserLocationParam) UnmarshalJSON(data []byte) error

type ManagedAgentsUserMessageEvent

type ManagedAgentsUserMessageEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// Array of content blocks comprising the user message.
	Content []ManagedAgentsUserMessageEventContentUnion `json:"content" api:"required"`
	// Any of "user.message".
	Type ManagedAgentsUserMessageEventType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"nullable" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Content     respjson.Field
		Type        respjson.Field
		ProcessedAt respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A user message event in the session conversation.

func (ManagedAgentsUserMessageEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserMessageEvent) UnmarshalJSON

func (r *ManagedAgentsUserMessageEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsUserMessageEventContentUnion

type ManagedAgentsUserMessageEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "redacted".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion]
	Source ManagedAgentsUserMessageEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Title string `json:"title"`
	JSON  struct {
		Text    respjson.Field
		Type    respjson.Field
		Source  respjson.Field
		Context respjson.Field
		Title   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserMessageEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsRedactedBlock.

Use the ManagedAgentsUserMessageEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsUserMessageEventContentUnion) AsAny

func (u ManagedAgentsUserMessageEventContentUnion) AsAny() anyManagedAgentsUserMessageEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsUserMessageEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsRedactedBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsUserMessageEventContentUnion) AsDocument

func (ManagedAgentsUserMessageEventContentUnion) AsImage

func (ManagedAgentsUserMessageEventContentUnion) AsRedacted

func (ManagedAgentsUserMessageEventContentUnion) AsText

func (ManagedAgentsUserMessageEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserMessageEventContentUnion) UnmarshalJSON

func (r *ManagedAgentsUserMessageEventContentUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsUserMessageEventContentUnionSource

type ManagedAgentsUserMessageEventContentUnionSource struct {
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserMessageEventContentUnionSource is an implicit subunion of ManagedAgentsUserMessageEventContentUnion. ManagedAgentsUserMessageEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsUserMessageEventContentUnion.

func (*ManagedAgentsUserMessageEventContentUnionSource) UnmarshalJSON

type ManagedAgentsUserMessageEventParams

type ManagedAgentsUserMessageEventParams struct {
	// Array of content blocks for the user message.
	Content []ManagedAgentsUserMessageEventParamsContentUnion `json:"content,omitzero" api:"required"`
	// Any of "user.message".
	Type ManagedAgentsUserMessageEventParamsType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Parameters for sending a user message to the session.

The properties Content, Type are required.

func (ManagedAgentsUserMessageEventParams) MarshalJSON

func (r ManagedAgentsUserMessageEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserMessageEventParams) UnmarshalJSON

func (r *ManagedAgentsUserMessageEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsUserMessageEventParamsContentUnion

type ManagedAgentsUserMessageEventParamsContentUnion struct {
	OfText     *ManagedAgentsTextBlockParam     `json:",omitzero,inline"`
	OfImage    *ManagedAgentsImageBlockParam    `json:",omitzero,inline"`
	OfDocument *ManagedAgentsDocumentBlockParam `json:",omitzero,inline"`
	OfRedacted *ManagedAgentsRedactedBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsUserMessageEventParamsContentUnion) GetContext

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserMessageEventParamsContentUnion) GetSource

func (u ManagedAgentsUserMessageEventParamsContentUnion) GetSource() (res managedAgentsUserMessageEventParamsContentUnionSource)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsUserMessageEventParamsContentUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserMessageEventParamsContentUnion) GetTitle

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserMessageEventParamsContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserMessageEventParamsContentUnion) MarshalJSON

func (*ManagedAgentsUserMessageEventParamsContentUnion) UnmarshalJSON

type ManagedAgentsUserMessageEventParamsType

type ManagedAgentsUserMessageEventParamsType string
const (
	ManagedAgentsUserMessageEventParamsTypeUserMessage ManagedAgentsUserMessageEventParamsType = "user.message"
)

type ManagedAgentsUserMessageEventType

type ManagedAgentsUserMessageEventType string
const (
	ManagedAgentsUserMessageEventTypeUserMessage ManagedAgentsUserMessageEventType = "user.message"
)

type ManagedAgentsUserToolConfirmationEvent

type ManagedAgentsUserToolConfirmationEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// UserToolConfirmationResult enum
	//
	// Any of "allow", "deny".
	Result ManagedAgentsUserToolConfirmationEventResult `json:"result" api:"required"`
	// The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result
	// corresponds to, which can be found in the last `session.status_idle`
	// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)
	// `stop_reason.event_ids` field.
	ToolUseID string `json:"tool_use_id" api:"required"`
	// Any of "user.tool_confirmation".
	Type ManagedAgentsUserToolConfirmationEventType `json:"type" api:"required"`
	// Optional message providing context for a 'deny' decision. Only allowed when
	// result is 'deny'.
	DenyMessage string `json:"deny_message" api:"nullable"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"nullable" format:"date-time"`
	// When set, the confirmation routes to this subagent's thread rather than the
	// primary. Echo this from the `session_thread_id` on the `agent.tool_use` or
	// `agent.mcp_tool_use` event that prompted the approval.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Result          respjson.Field
		ToolUseID       respjson.Field
		Type            respjson.Field
		DenyMessage     respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A tool confirmation event that approves or denies a pending tool execution.

func (ManagedAgentsUserToolConfirmationEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserToolConfirmationEvent) UnmarshalJSON

func (r *ManagedAgentsUserToolConfirmationEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsUserToolConfirmationEventParams

type ManagedAgentsUserToolConfirmationEventParams struct {
	// UserToolConfirmationResult enum
	//
	// Any of "allow", "deny".
	Result ManagedAgentsUserToolConfirmationEventParamsResult `json:"result,omitzero" api:"required"`
	// The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result
	// corresponds to, which can be found in the last `session.status_idle`
	// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)
	// `stop_reason.event_ids` field.
	ToolUseID string `json:"tool_use_id" api:"required"`
	// Any of "user.tool_confirmation".
	Type ManagedAgentsUserToolConfirmationEventParamsType `json:"type,omitzero" api:"required"`
	// Optional message providing context for a 'deny' decision. Only allowed when
	// result is 'deny'.
	DenyMessage param.Opt[string] `json:"deny_message,omitzero"`
	// contains filtered or unexported fields
}

Parameters for confirming or denying a tool execution request.

The properties Result, ToolUseID, Type are required.

func (ManagedAgentsUserToolConfirmationEventParams) MarshalJSON

func (r ManagedAgentsUserToolConfirmationEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserToolConfirmationEventParams) UnmarshalJSON

func (r *ManagedAgentsUserToolConfirmationEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsUserToolConfirmationEventParamsResult

type ManagedAgentsUserToolConfirmationEventParamsResult string

UserToolConfirmationResult enum

const (
	ManagedAgentsUserToolConfirmationEventParamsResultAllow ManagedAgentsUserToolConfirmationEventParamsResult = "allow"
	ManagedAgentsUserToolConfirmationEventParamsResultDeny  ManagedAgentsUserToolConfirmationEventParamsResult = "deny"
)

type ManagedAgentsUserToolConfirmationEventParamsType

type ManagedAgentsUserToolConfirmationEventParamsType string
const (
	ManagedAgentsUserToolConfirmationEventParamsTypeUserToolConfirmation ManagedAgentsUserToolConfirmationEventParamsType = "user.tool_confirmation"
)

type ManagedAgentsUserToolConfirmationEventResult

type ManagedAgentsUserToolConfirmationEventResult string

UserToolConfirmationResult enum

const (
	ManagedAgentsUserToolConfirmationEventResultAllow ManagedAgentsUserToolConfirmationEventResult = "allow"
	ManagedAgentsUserToolConfirmationEventResultDeny  ManagedAgentsUserToolConfirmationEventResult = "deny"
)

type ManagedAgentsUserToolConfirmationEventType

type ManagedAgentsUserToolConfirmationEventType string
const (
	ManagedAgentsUserToolConfirmationEventTypeUserToolConfirmation ManagedAgentsUserToolConfirmationEventType = "user.tool_confirmation"
)

type ManagedAgentsUserToolResultEvent

type ManagedAgentsUserToolResultEvent struct {
	// Unique identifier for this event.
	ID string `json:"id" api:"required"`
	// The id of the `agent.tool_use` event this result corresponds to, which can be
	// found in the last `session.status_idle`
	// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)
	// `stop_reason.event_ids` field.
	ToolUseID string `json:"tool_use_id" api:"required"`
	// Any of "user.tool_result".
	Type ManagedAgentsUserToolResultEventType `json:"type" api:"required"`
	// The result content returned by the tool.
	Content []ManagedAgentsUserToolResultEventContentUnion `json:"content"`
	// Whether the tool execution resulted in an error.
	IsError bool `json:"is_error" api:"nullable"`
	// A timestamp in RFC 3339 format
	ProcessedAt time.Time `json:"processed_at" api:"nullable" format:"date-time"`
	// Routes this result to a subagent thread. Copy from the `agent.tool_use` event's
	// `session_thread_id`.
	SessionThreadID string `json:"session_thread_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		ToolUseID       respjson.Field
		Type            respjson.Field
		Content         respjson.Field
		IsError         respjson.Field
		ProcessedAt     respjson.Field
		SessionThreadID respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event sent by the client providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.

func (ManagedAgentsUserToolResultEvent) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserToolResultEvent) UnmarshalJSON

func (r *ManagedAgentsUserToolResultEvent) UnmarshalJSON(data []byte) error

type ManagedAgentsUserToolResultEventContentUnion

type ManagedAgentsUserToolResultEventContentUnion struct {
	// This field is from variant [ManagedAgentsTextBlock].
	Text string `json:"text"`
	// Any of "text", "image", "document", "search_result".
	Type string `json:"type"`
	// This field is a union of [ManagedAgentsImageBlockSourceUnion],
	// [ManagedAgentsDocumentBlockSourceUnion], [string]
	Source ManagedAgentsUserToolResultEventContentUnionSource `json:"source"`
	// This field is from variant [ManagedAgentsDocumentBlock].
	Context string `json:"context"`
	Title   string `json:"title"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Citations ManagedAgentsSearchResultCitations `json:"citations"`
	// This field is from variant [ManagedAgentsSearchResultBlock].
	Content []ManagedAgentsSearchResultContent `json:"content"`
	JSON    struct {
		Text      respjson.Field
		Type      respjson.Field
		Source    respjson.Field
		Context   respjson.Field
		Title     respjson.Field
		Citations respjson.Field
		Content   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserToolResultEventContentUnion contains all possible properties and values from ManagedAgentsTextBlock, ManagedAgentsImageBlock, ManagedAgentsDocumentBlock, ManagedAgentsSearchResultBlock.

Use the ManagedAgentsUserToolResultEventContentUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsUserToolResultEventContentUnion) AsAny

func (u ManagedAgentsUserToolResultEventContentUnion) AsAny() anyManagedAgentsUserToolResultEventContent

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsUserToolResultEventContentUnion.AsAny().(type) {
case qoder.ManagedAgentsTextBlock:
case qoder.ManagedAgentsImageBlock:
case qoder.ManagedAgentsDocumentBlock:
case qoder.ManagedAgentsSearchResultBlock:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsUserToolResultEventContentUnion) AsDocument

func (ManagedAgentsUserToolResultEventContentUnion) AsImage

func (ManagedAgentsUserToolResultEventContentUnion) AsSearchResult

func (ManagedAgentsUserToolResultEventContentUnion) AsText

func (ManagedAgentsUserToolResultEventContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsUserToolResultEventContentUnion) UnmarshalJSON

func (r *ManagedAgentsUserToolResultEventContentUnion) UnmarshalJSON(data []byte) error

type ManagedAgentsUserToolResultEventContentUnionSource

type ManagedAgentsUserToolResultEventContentUnionSource struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString  string `json:",inline"`
	Data      string `json:"data"`
	MediaType string `json:"media_type"`
	Type      string `json:"type"`
	URL       string `json:"url"`
	FileID    string `json:"file_id"`
	JSON      struct {
		OfString  respjson.Field
		Data      respjson.Field
		MediaType respjson.Field
		Type      respjson.Field
		URL       respjson.Field
		FileID    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsUserToolResultEventContentUnionSource is an implicit subunion of ManagedAgentsUserToolResultEventContentUnion. ManagedAgentsUserToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ManagedAgentsUserToolResultEventContentUnion.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (*ManagedAgentsUserToolResultEventContentUnionSource) UnmarshalJSON

type ManagedAgentsUserToolResultEventParams

type ManagedAgentsUserToolResultEventParams struct {
	// The id of the `agent.tool_use` event this result corresponds to, which can be
	// found in the last `session.status_idle`
	// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)
	// `stop_reason.event_ids` field.
	ToolUseID string `json:"tool_use_id" api:"required"`
	// Any of "user.tool_result".
	Type ManagedAgentsUserToolResultEventParamsType `json:"type,omitzero" api:"required"`
	// Whether the tool execution resulted in an error.
	IsError param.Opt[bool] `json:"is_error,omitzero"`
	// The result content returned by the tool.
	Content []ManagedAgentsUserToolResultEventParamsContentUnion `json:"content,omitzero"`
	// contains filtered or unexported fields
}

Parameters for providing the result of an agent-toolset tool execution. Only valid on `self_hosted` environments, where sandbox-routed tools are executed by the client rather than the server.

The properties ToolUseID, Type are required.

func (ManagedAgentsUserToolResultEventParams) MarshalJSON

func (r ManagedAgentsUserToolResultEventParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsUserToolResultEventParams) UnmarshalJSON

func (r *ManagedAgentsUserToolResultEventParams) UnmarshalJSON(data []byte) error

type ManagedAgentsUserToolResultEventParamsContentUnion

type ManagedAgentsUserToolResultEventParamsContentUnion struct {
	OfText         *ManagedAgentsTextBlockParam         `json:",omitzero,inline"`
	OfImage        *ManagedAgentsImageBlockParam        `json:",omitzero,inline"`
	OfDocument     *ManagedAgentsDocumentBlockParam     `json:",omitzero,inline"`
	OfSearchResult *ManagedAgentsSearchResultBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetCitations

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetContext

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetSource

func (u ManagedAgentsUserToolResultEventParamsContentUnion) GetSource() (res managedAgentsUserToolResultEventParamsContentUnionSource)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetTitle

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserToolResultEventParamsContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsUserToolResultEventParamsContentUnion) MarshalJSON

func (*ManagedAgentsUserToolResultEventParamsContentUnion) UnmarshalJSON

type ManagedAgentsUserToolResultEventParamsType

type ManagedAgentsUserToolResultEventParamsType string
const (
	ManagedAgentsUserToolResultEventParamsTypeUserToolResult ManagedAgentsUserToolResultEventParamsType = "user.tool_result"
)

type ManagedAgentsUserToolResultEventType

type ManagedAgentsUserToolResultEventType string
const (
	ManagedAgentsUserToolResultEventTypeUserToolResult ManagedAgentsUserToolResultEventType = "user.tool_result"
)

type ManagedAgentsVault

type ManagedAgentsVault struct {
	// Unique identifier for the vault.
	ID string `json:"id" api:"required"`
	// A timestamp in RFC 3339 format
	ArchivedAt time.Time `json:"archived_at" api:"required" format:"date-time"`
	// A timestamp in RFC 3339 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Human-readable name for the vault.
	DisplayName string `json:"display_name" api:"required"`
	// Arbitrary key-value metadata attached to the vault.
	Metadata map[string]string `json:"metadata" api:"required"`
	// Any of "vault".
	Type ManagedAgentsVaultType `json:"type" api:"required"`
	// A timestamp in RFC 3339 format
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ArchivedAt  respjson.Field
		CreatedAt   respjson.Field
		DisplayName respjson.Field
		Metadata    respjson.Field
		Type        respjson.Field
		UpdatedAt   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A vault that stores credentials for use by agents during sessions.

func (ManagedAgentsVault) RawJSON

func (r ManagedAgentsVault) RawJSON() string

Returns the unmodified JSON received from the API

func (*ManagedAgentsVault) UnmarshalJSON

func (r *ManagedAgentsVault) UnmarshalJSON(data []byte) error

type ManagedAgentsVaultArchivedDeploymentPausedReasonError

type ManagedAgentsVaultArchivedDeploymentPausedReasonError struct {
	// Any of "vault_archived_error".
	Type ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A vault referenced by the deployment is archived.

func (ManagedAgentsVaultArchivedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsVaultArchivedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType

type ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsVaultArchivedDeploymentPausedReasonErrorTypeVaultArchivedError ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType = "vault_archived_error"
)

type ManagedAgentsVaultArchivedRunError

type ManagedAgentsVaultArchivedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "vault_archived_error".
	Type ManagedAgentsVaultArchivedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A vault referenced by the deployment is archived.

func (ManagedAgentsVaultArchivedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsVaultArchivedRunError) UnmarshalJSON

func (r *ManagedAgentsVaultArchivedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsVaultArchivedRunErrorType

type ManagedAgentsVaultArchivedRunErrorType string
const (
	ManagedAgentsVaultArchivedRunErrorTypeVaultArchivedError ManagedAgentsVaultArchivedRunErrorType = "vault_archived_error"
)

type ManagedAgentsVaultNotFoundDeploymentPausedReasonError

type ManagedAgentsVaultNotFoundDeploymentPausedReasonError struct {
	// Any of "vault_not_found_error".
	Type ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A vault referenced by the deployment no longer exists.

func (ManagedAgentsVaultNotFoundDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsVaultNotFoundDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType

type ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType string
const (
	ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorTypeVaultNotFoundError ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType = "vault_not_found_error"
)

type ManagedAgentsVaultNotFoundRunError

type ManagedAgentsVaultNotFoundRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "vault_not_found_error".
	Type ManagedAgentsVaultNotFoundRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A vault referenced by the deployment no longer exists.

func (ManagedAgentsVaultNotFoundRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsVaultNotFoundRunError) UnmarshalJSON

func (r *ManagedAgentsVaultNotFoundRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsVaultNotFoundRunErrorType

type ManagedAgentsVaultNotFoundRunErrorType string
const (
	ManagedAgentsVaultNotFoundRunErrorTypeVaultNotFoundError ManagedAgentsVaultNotFoundRunErrorType = "vault_not_found_error"
)

type ManagedAgentsVaultType

type ManagedAgentsVaultType string
const (
	ManagedAgentsVaultTypeVault ManagedAgentsVaultType = "vault"
)

type ManagedAgentsWebFetchToolConfig

type ManagedAgentsWebFetchToolConfig struct {
	Enabled bool              `json:"enabled" api:"required"`
	Name    constant.WebFetch `json:"name" default:"web_fetch"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsWebFetchToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.WebFetch                                    `json:"type" default:"web_fetch"`
	AllowedDomains   []string                                             `json:"allowed_domains"`
	BlockedDomains   []string                                             `json:"blocked_domains"`
	MaxContentTokens int64                                                `json:"max_content_tokens" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		AllowedDomains   respjson.Field
		BlockedDomains   respjson.Field
		MaxContentTokens respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the web_fetch tool.

func (ManagedAgentsWebFetchToolConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWebFetchToolConfig) UnmarshalJSON

func (r *ManagedAgentsWebFetchToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsWebFetchToolConfigParams

type ManagedAgentsWebFetchToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Maximum number of tokens of fetched text content to include in context per call.
	// Does not apply to binary content such as PDFs.
	MaxContentTokens param.Opt[int64] `json:"max_content_tokens,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Only fetch URLs whose host is one of these domains or a subdomain of one. Each
	// entry is a plain hostname like "docs.example.com" (no scheme, port, or path). At
	// most 64 entries; an empty list is rejected (omit the field instead). Cannot be
	// combined with blocked_domains.
	AllowedDomains []string `json:"allowed_domains,omitzero"`
	// Never fetch URLs whose host is one of these domains or a subdomain of one. Each
	// entry is a plain hostname like "ads.example.com" (no scheme, port, or path). At
	// most 64 entries; an empty list is rejected (omit the field instead). Cannot be
	// combined with allowed_domains.
	BlockedDomains []string `json:"blocked_domains,omitzero"`
	// Any of "web_fetch".
	Type ManagedAgentsWebFetchToolConfigParamsType `json:"type,omitzero"`
	// Must be "web_fetch".
	//
	// This field can be elided, and will marshal its zero value as "web_fetch".
	Name constant.WebFetch `json:"name" default:"web_fetch"`
	// contains filtered or unexported fields
}

Configuration override for the web_fetch tool.

The property Name is required.

func (ManagedAgentsWebFetchToolConfigParams) MarshalJSON

func (r ManagedAgentsWebFetchToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsWebFetchToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsWebFetchToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion

type ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsWebFetchToolConfigParamsType

type ManagedAgentsWebFetchToolConfigParamsType string
const (
	ManagedAgentsWebFetchToolConfigParamsTypeWebFetch ManagedAgentsWebFetchToolConfigParamsType = "web_fetch"
)

type ManagedAgentsWebFetchToolConfigPermissionPolicyUnion

type ManagedAgentsWebFetchToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsWebFetchToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsWebFetchToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsWebFetchToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsWebFetchToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsWebSearchToolConfig

type ManagedAgentsWebSearchToolConfig struct {
	Enabled bool               `json:"enabled" api:"required"`
	Name    constant.WebSearch `json:"name" default:"web_search"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsWebSearchToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.WebSearch                                    `json:"type" default:"web_search"`
	AllowedDomains   []string                                              `json:"allowed_domains"`
	BlockedDomains   []string                                              `json:"blocked_domains"`
	// Approximate user location for search result localization.
	UserLocation ManagedAgentsUserLocation `json:"user_location" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		AllowedDomains   respjson.Field
		BlockedDomains   respjson.Field
		UserLocation     respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the web_search tool.

func (ManagedAgentsWebSearchToolConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWebSearchToolConfig) UnmarshalJSON

func (r *ManagedAgentsWebSearchToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsWebSearchToolConfigParams

type ManagedAgentsWebSearchToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Only return search results whose host is one of these domains or a subdomain of
	// one. Each entry is a plain hostname like "docs.example.com" (no scheme or port;
	// an optional path suffix is accepted). At most 64 entries; an empty list is
	// rejected (omit the field instead). Cannot be combined with blocked_domains.
	AllowedDomains []string `json:"allowed_domains,omitzero"`
	// Never return search results whose host is one of these domains or a subdomain of
	// one. Each entry is a plain hostname like "ads.example.com" (no scheme or port;
	// an optional path suffix is accepted). At most 64 entries; an empty list is
	// rejected (omit the field instead). Cannot be combined with allowed_domains.
	BlockedDomains []string `json:"blocked_domains,omitzero"`
	// Any of "web_search".
	Type ManagedAgentsWebSearchToolConfigParamsType `json:"type,omitzero"`
	// Approximate user location for search result localization.
	UserLocation ManagedAgentsUserLocationParam `json:"user_location,omitzero"`
	// Must be "web_search".
	//
	// This field can be elided, and will marshal its zero value as "web_search".
	Name constant.WebSearch `json:"name" default:"web_search"`
	// contains filtered or unexported fields
}

Configuration override for the web_search tool.

The property Name is required.

func (ManagedAgentsWebSearchToolConfigParams) MarshalJSON

func (r ManagedAgentsWebSearchToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsWebSearchToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsWebSearchToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion

type ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsWebSearchToolConfigParamsType

type ManagedAgentsWebSearchToolConfigParamsType string
const (
	ManagedAgentsWebSearchToolConfigParamsTypeWebSearch ManagedAgentsWebSearchToolConfigParamsType = "web_search"
)

type ManagedAgentsWebSearchToolConfigPermissionPolicyUnion

type ManagedAgentsWebSearchToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsWebSearchToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsWebSearchToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsWebSearchToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsWebSearchToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError

type ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError struct {
	// Any of "workspace_archived_error".
	Type ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's workspace was archived.

func (ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError) UnmarshalJSON

type ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType

type ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType string
const (
	ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorTypeWorkspaceArchivedError ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType = "workspace_archived_error"
)

type ManagedAgentsWorkspaceArchivedRunError

type ManagedAgentsWorkspaceArchivedRunError struct {
	// Human-readable error description.
	Message string `json:"message" api:"required"`
	// Any of "workspace_archived_error".
	Type ManagedAgentsWorkspaceArchivedRunErrorType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The deployment's workspace was archived.

func (ManagedAgentsWorkspaceArchivedRunError) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWorkspaceArchivedRunError) UnmarshalJSON

func (r *ManagedAgentsWorkspaceArchivedRunError) UnmarshalJSON(data []byte) error

type ManagedAgentsWorkspaceArchivedRunErrorType

type ManagedAgentsWorkspaceArchivedRunErrorType string
const (
	ManagedAgentsWorkspaceArchivedRunErrorTypeWorkspaceArchivedError ManagedAgentsWorkspaceArchivedRunErrorType = "workspace_archived_error"
)

type ManagedAgentsWriteToolConfig

type ManagedAgentsWriteToolConfig struct {
	Enabled bool           `json:"enabled" api:"required"`
	Name    constant.Write `json:"name" default:"write"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsWriteToolConfigPermissionPolicyUnion `json:"permission_policy" api:"required"`
	Type             constant.Write                                    `json:"type" default:"write"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled          respjson.Field
		Name             respjson.Field
		PermissionPolicy respjson.Field
		Type             respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for the write tool.

func (ManagedAgentsWriteToolConfig) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWriteToolConfig) UnmarshalJSON

func (r *ManagedAgentsWriteToolConfig) UnmarshalJSON(data []byte) error

type ManagedAgentsWriteToolConfigParams

type ManagedAgentsWriteToolConfigParams struct {
	// Whether this tool is enabled and available to the model. Overrides the
	// default_config setting.
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Permission policy for tool execution.
	PermissionPolicy ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion `json:"permission_policy,omitzero"`
	// Any of "write".
	Type ManagedAgentsWriteToolConfigParamsType `json:"type,omitzero"`
	// Must be "write".
	//
	// This field can be elided, and will marshal its zero value as "write".
	Name constant.Write `json:"name" default:"write"`
	// contains filtered or unexported fields
}

Configuration override for the write tool.

The property Name is required.

func (ManagedAgentsWriteToolConfigParams) MarshalJSON

func (r ManagedAgentsWriteToolConfigParams) MarshalJSON() (data []byte, err error)

func (*ManagedAgentsWriteToolConfigParams) UnmarshalJSON

func (r *ManagedAgentsWriteToolConfigParams) UnmarshalJSON(data []byte) error

type ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion

type ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion struct {
	OfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:",omitzero,inline"`
	OfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion) MarshalJSON

func (*ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion) UnmarshalJSON

type ManagedAgentsWriteToolConfigParamsType

type ManagedAgentsWriteToolConfigParamsType string
const (
	ManagedAgentsWriteToolConfigParamsTypeWrite ManagedAgentsWriteToolConfigParamsType = "write"
)

type ManagedAgentsWriteToolConfigPermissionPolicyUnion

type ManagedAgentsWriteToolConfigPermissionPolicyUnion struct {
	// Any of "always_allow", "always_ask".
	Type string `json:"type"`
	JSON struct {
		Type respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ManagedAgentsWriteToolConfigPermissionPolicyUnion contains all possible properties and values from ManagedAgentsAlwaysAllowPolicy, ManagedAgentsAlwaysAskPolicy.

Use the ManagedAgentsWriteToolConfigPermissionPolicyUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAlwaysAllow

func (ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAlwaysAsk

func (ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAny

func (u ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsWriteToolConfigPermissionPolicy

Use the following switch statement to find the correct variant

switch variant := ManagedAgentsWriteToolConfigPermissionPolicyUnion.AsAny().(type) {
case qoder.ManagedAgentsAlwaysAllowPolicy:
case qoder.ManagedAgentsAlwaysAskPolicy:
default:
  fmt.Errorf("no variant present")
}

func (ManagedAgentsWriteToolConfigPermissionPolicyUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ManagedAgentsWriteToolConfigPermissionPolicyUnion) UnmarshalJSON

type MemoryStoreArchiveParams

type MemoryStoreArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type MemoryStoreDeleteParams

type MemoryStoreDeleteParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type MemoryStoreGetParams

type MemoryStoreGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type MemoryStoreListParams

type MemoryStoreListParams struct {
	Name param.Opt[string] `query:"name,omitzero" json:"-"`

	// Return only stores whose `created_at` is at or after this time (inclusive). Sent
	// on the wire as `created_at[gte]`.
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return only stores whose `created_at` is at or before this time (inclusive).
	// Sent on the wire as `created_at[lte]`.
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// When `true`, archived stores are included in the results. Defaults to `false`
	// (archived stores are excluded).
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum number of stores to return per page. Must be between 1 and 100. Defaults
	// to 20 when omitted.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a
	// previous response to fetch the next page; omit for the first page.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreListParams) URLQuery

func (r MemoryStoreListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreListParams's query parameters as `url.Values`.

type MemoryStoreMemoryDeleteParams

type MemoryStoreMemoryDeleteParams struct {
	MemoryStoreID string `path:"memory_store_id" api:"required" json:"-"`
	// Query parameter for expected_content_sha256
	ExpectedContentSha256 param.Opt[string] `query:"expected_content_sha256,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryDeleteParams) URLQuery

func (r MemoryStoreMemoryDeleteParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryDeleteParams's query parameters as `url.Values`.

type MemoryStoreMemoryGetParams

type MemoryStoreMemoryGetParams struct {
	MemoryStoreID string `path:"memory_store_id" api:"required" json:"-"`
	// Query parameter for view
	//
	// Any of "basic", "full".
	View ManagedAgentsMemoryView `query:"view,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryGetParams) URLQuery

func (r MemoryStoreMemoryGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryGetParams's query parameters as `url.Values`.

type MemoryStoreMemoryListParams

type MemoryStoreMemoryListParams struct {
	// `0` (or omitted) returns all descendants below `path_prefix` (recursive). `1`
	// returns immediate children only; deeper entries roll up as `memory_prefix`
	// items. `depth=1` behaves like `ls`; omitting `depth` behaves like `find`.
	Depth param.Opt[int64] `query:"depth,omitzero" json:"-"`
	// Maximum number of items to return per page. Must be between 1 and 100. Defaults
	// to 20 when omitted. Capped at 20 when `view=full`. Both `memory` and
	// `memory_prefix` items count toward the limit.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a
	// previous response to fetch the next page; omit for the first page.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional path prefix filter. Must end with `/` (segment-aligned), e.g.,
	// `/notes/`. This value appears in request URLs. Do not include secrets or
	// personally identifiable information.
	PathPrefix param.Opt[string] `query:"path_prefix,omitzero" json:"-"`
	// Which projection of each `memory` to return. Defaults to `basic` (content
	// omitted). `full` populates `content` on each item and caps `limit` at 20; use
	// this as the bulk-read path for export and sync.
	//
	// Any of "basic", "full".
	View ManagedAgentsMemoryView `query:"view,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryListParams) URLQuery

func (r MemoryStoreMemoryListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryListParams's query parameters as `url.Values`.

type MemoryStoreMemoryNewParams

type MemoryStoreMemoryNewParams struct {
	Metadata map[string]string `json:"metadata,omitzero"`

	// UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required;
	// pass `""` explicitly to create an empty memory.
	Content param.Opt[string] `json:"content,omitzero" api:"required"`
	// Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start
	// with `/`, contain at least one non-empty segment, and be at most 1,024 bytes.
	// Must not contain empty segments, `.` or `..` segments, control or format
	// characters, or the Unicode line and paragraph separators (U+2028, U+2029), and
	// must be NFC-normalized. Paths are case-sensitive.
	Path string `json:"path" api:"required"`
	// Query parameter for view
	//
	// Any of "basic", "full".
	View ManagedAgentsMemoryView `query:"view,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryNewParams) MarshalJSON

func (r MemoryStoreMemoryNewParams) MarshalJSON() (data []byte, err error)

func (MemoryStoreMemoryNewParams) URLQuery

func (r MemoryStoreMemoryNewParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryNewParams's query parameters as `url.Values`.

func (*MemoryStoreMemoryNewParams) UnmarshalJSON

func (r *MemoryStoreMemoryNewParams) UnmarshalJSON(data []byte) error

type MemoryStoreMemoryService

type MemoryStoreMemoryService struct {
	Options []option.RequestOption
}

MemoryStoreMemoryService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemoryStoreMemoryService method instead.

func NewMemoryStoreMemoryService

func NewMemoryStoreMemoryService(opts ...option.RequestOption) (r MemoryStoreMemoryService)

NewMemoryStoreMemoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MemoryStoreMemoryService) Delete

Delete a memory

func (*MemoryStoreMemoryService) Get

Retrieve a memory

func (*MemoryStoreMemoryService) List

List memories

func (*MemoryStoreMemoryService) ListAutoPaging

List memories

func (*MemoryStoreMemoryService) New

Create a memory

func (*MemoryStoreMemoryService) Update

Update a memory

type MemoryStoreMemoryUpdateParams

type MemoryStoreMemoryUpdateParams struct {
	ContentSha256 param.Opt[string] `json:"content_sha256,omitzero"`

	Metadata map[string]any `json:"metadata,omitzero"`

	MemoryStoreID string `path:"memory_store_id" api:"required" json:"-"`
	// New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to
	// leave the content unchanged (e.g., for a rename-only update).
	Content param.Opt[string] `json:"content,omitzero"`
	// New path for the memory (a rename). Must start with `/`, contain at least one
	// non-empty segment, and be at most 1,024 bytes. Must not contain empty segments,
	// `.` or `..` segments, control or format characters, or the Unicode line and
	// paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are
	// case-sensitive. The memory's `id` is preserved across renames. Omit to leave the
	// path unchanged.
	Path param.Opt[string] `json:"path,omitzero"`
	// Query parameter for view
	//
	// Any of "basic", "full".
	View ManagedAgentsMemoryView `query:"view,omitzero" json:"-"`
	// Optimistic-concurrency precondition: the update applies only if the memory's
	// stored `content_sha256` equals the supplied value. On mismatch, the request
	// returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and
	// retry against the fresh state. If the precondition fails but the stored state
	// already exactly matches the requested `content` and `path`, the server returns
	// 200 instead of 409.
	Precondition ManagedAgentsPreconditionParam `json:"precondition,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryUpdateParams) MarshalJSON

func (r MemoryStoreMemoryUpdateParams) MarshalJSON() (data []byte, err error)

func (MemoryStoreMemoryUpdateParams) URLQuery

func (r MemoryStoreMemoryUpdateParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryUpdateParams's query parameters as `url.Values`.

func (*MemoryStoreMemoryUpdateParams) UnmarshalJSON

func (r *MemoryStoreMemoryUpdateParams) UnmarshalJSON(data []byte) error

type MemoryStoreMemoryVersionGetParams

type MemoryStoreMemoryVersionGetParams struct {
	MemoryStoreID string `path:"memory_store_id" api:"required" json:"-"`
	// Query parameter for view
	//
	// Any of "basic", "full".
	View ManagedAgentsMemoryView `query:"view,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryVersionGetParams) URLQuery

func (r MemoryStoreMemoryVersionGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryVersionGetParams's query parameters as `url.Values`.

type MemoryStoreMemoryVersionListParams

type MemoryStoreMemoryVersionListParams struct {
	// Query parameter for api_key_id
	APIKeyID param.Opt[string] `query:"api_key_id,omitzero" json:"-"`
	// Return versions created at or after this time (inclusive).
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return versions created at or before this time (inclusive).
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// Query parameter for limit
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Query parameter for memory_id
	MemoryID param.Opt[string] `query:"memory_id,omitzero" json:"-"`
	// Query parameter for page
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Query parameter for service_account_id
	ServiceAccountID param.Opt[string] `query:"service_account_id,omitzero" json:"-"`
	// Query parameter for session_id
	SessionID param.Opt[string] `query:"session_id,omitzero" json:"-"`
	// Query parameter for operation
	//
	// Any of "created", "modified", "deleted".
	Operation ManagedAgentsMemoryVersionOperation `query:"operation,omitzero" json:"-"`
	// Query parameter for view
	//
	// Any of "basic", "full".
	View ManagedAgentsMemoryView `query:"view,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreMemoryVersionListParams) URLQuery

func (r MemoryStoreMemoryVersionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MemoryStoreMemoryVersionListParams's query parameters as `url.Values`.

type MemoryStoreMemoryVersionRedactParams

type MemoryStoreMemoryVersionRedactParams struct {
	MemoryStoreID string `path:"memory_store_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type MemoryStoreMemoryVersionService

type MemoryStoreMemoryVersionService struct {
	Options []option.RequestOption
}

MemoryStoreMemoryVersionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemoryStoreMemoryVersionService method instead.

func NewMemoryStoreMemoryVersionService

func NewMemoryStoreMemoryVersionService(opts ...option.RequestOption) (r MemoryStoreMemoryVersionService)

NewMemoryStoreMemoryVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MemoryStoreMemoryVersionService) Get

Retrieve a memory version

func (*MemoryStoreMemoryVersionService) List

List memory versions

func (*MemoryStoreMemoryVersionService) ListAutoPaging

List memory versions

func (*MemoryStoreMemoryVersionService) Redact

Redact a memory version

type MemoryStoreNewParams

type MemoryStoreNewParams struct {
	// Human-readable name for the store. Required; 1–255 characters; no control
	// characters. The mount-path slug under `/mnt/memory/` is derived from this name
	// (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be
	// unique within a workspace.
	Name string `json:"name" api:"required"`
	// Free-text description of what the store contains, up to 1024 characters.
	// Included in the agent's system prompt when the store is attached, so word it to
	// be useful to the agent.
	Description param.Opt[string] `json:"description,omitzero"`
	// Arbitrary key-value tags for your own bookkeeping (such as the end user a store
	// belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.
	// Not visible to the agent.
	Metadata map[string]string `json:"metadata,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreNewParams) MarshalJSON

func (r MemoryStoreNewParams) MarshalJSON() (data []byte, err error)

func (*MemoryStoreNewParams) UnmarshalJSON

func (r *MemoryStoreNewParams) UnmarshalJSON(data []byte) error

type MemoryStoreService

type MemoryStoreService struct {
	Options        []option.RequestOption
	Memories       MemoryStoreMemoryService
	MemoryVersions MemoryStoreMemoryVersionService
}

MemoryStoreService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemoryStoreService method instead.

func NewMemoryStoreService

func NewMemoryStoreService(opts ...option.RequestOption) (r MemoryStoreService)

NewMemoryStoreService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MemoryStoreService) Archive

func (r *MemoryStoreService) Archive(ctx context.Context, memoryStoreID string, body MemoryStoreArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)

Archive a memory store

func (*MemoryStoreService) Delete

Delete a memory store

func (*MemoryStoreService) Get

func (r *MemoryStoreService) Get(ctx context.Context, memoryStoreID string, query MemoryStoreGetParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)

Retrieve a memory store

func (*MemoryStoreService) List

List memory stores

func (*MemoryStoreService) ListAutoPaging

List memory stores

func (*MemoryStoreService) New

Create a memory store

func (*MemoryStoreService) Update

func (r *MemoryStoreService) Update(ctx context.Context, memoryStoreID string, params MemoryStoreUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)

Update a memory store

type MemoryStoreUpdateParams

type MemoryStoreUpdateParams struct {
	// New description for the store, up to 1024 characters. Pass an empty string to
	// clear it.
	Description param.Opt[string] `json:"description,omitzero"`
	// New human-readable name for the store. 1–255 characters; no control characters.
	// Renaming changes the slug used for the store's `mount_path` in sessions created
	// after the update.
	Name param.Opt[string] `json:"name,omitzero"`
	// Metadata patch. Set a key to a string to upsert it, or to null to delete it.
	// Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars
	// each) with values up to 512 chars.
	Metadata map[string]any `json:"metadata,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MemoryStoreUpdateParams) MarshalJSON

func (r MemoryStoreUpdateParams) MarshalJSON() (data []byte, err error)

func (*MemoryStoreUpdateParams) UnmarshalJSON

func (r *MemoryStoreUpdateParams) UnmarshalJSON(data []byte) error

type Model

type Model = string

Model identifies a model available to the API.

type ModelCapabilities

type ModelCapabilities struct {
	// Whether the model supports the Batch API.
	Batch CapabilitySupport `json:"batch" api:"required"`
	// Whether the model supports citation generation.
	Citations CapabilitySupport `json:"citations" api:"required"`
	// Whether the model supports code execution tools.
	CodeExecution CapabilitySupport `json:"code_execution" api:"required"`
	// Context management support and available strategies.
	ContextManagement ContextManagementCapability `json:"context_management" api:"required"`
	// Effort (reasoning_effort) support and available levels.
	Effort EffortCapability `json:"effort" api:"required"`
	// Whether the model accepts image content blocks.
	ImageInput CapabilitySupport `json:"image_input" api:"required"`
	// Whether the model accepts PDF content blocks.
	PDFInput CapabilitySupport `json:"pdf_input" api:"required"`
	// Whether the model supports structured output / JSON mode / strict tool schemas.
	StructuredOutputs CapabilitySupport `json:"structured_outputs" api:"required"`
	// Thinking capability and supported type configurations.
	Thinking ThinkingCapability `json:"thinking" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Batch             respjson.Field
		Citations         respjson.Field
		CodeExecution     respjson.Field
		ContextManagement respjson.Field
		Effort            respjson.Field
		ImageInput        respjson.Field
		PDFInput          respjson.Field
		StructuredOutputs respjson.Field
		Thinking          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Model capability information.

func (ModelCapabilities) RawJSON

func (r ModelCapabilities) RawJSON() string

Returns the unmodified JSON received from the API

func (*ModelCapabilities) UnmarshalJSON

func (r *ModelCapabilities) UnmarshalJSON(data []byte) error

type ModelInfo

type ModelInfo struct {
	Source                  string   `json:"source"`
	IsEnabled               bool     `json:"is_enabled"`
	IsNew                   bool     `json:"is_new"`
	PriceFactor             float64  `json:"price_factor"`
	Efforts                 []string `json:"efforts"`
	DefaultEffort           string   `json:"default_effort"`
	DefaultContextWindow    int64    `json:"default_context_window"`
	AvailableContextWindows []int64  `json:"available_context_windows"`

	// Unique model identifier.
	ID string `json:"id" api:"required"`
	// Model IDs this model accepts as `fallbacks[i].model` on the Messages API. An
	// empty list means the `fallbacks` parameter is not supported for this model as
	// primary.
	AllowedFallbackModels []string `json:"allowed_fallback_models" api:"required"`
	// Model capability information.
	Capabilities ModelCapabilities `json:"capabilities" api:"required"`
	// RFC 3339 datetime string representing the time at which the model was released.
	// May be set to an epoch value if the release date is unknown.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// A human-readable name for the model.
	DisplayName string `json:"display_name" api:"required"`
	// Maximum input context window size in tokens for this model.
	MaxInputTokens int64 `json:"max_input_tokens" api:"required"`
	// Maximum value for the `max_tokens` parameter when using this model.
	MaxTokens int64 `json:"max_tokens" api:"required"`
	// Object type.
	//
	// For Models, this is always `"model"`.
	Type constant.Model `json:"type" default:"model"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Source                  respjson.Field
		IsEnabled               respjson.Field
		IsNew                   respjson.Field
		PriceFactor             respjson.Field
		Efforts                 respjson.Field
		DefaultEffort           respjson.Field
		DefaultContextWindow    respjson.Field
		AvailableContextWindows respjson.Field

		ID                    respjson.Field
		AllowedFallbackModels respjson.Field
		Capabilities          respjson.Field
		CreatedAt             respjson.Field
		DisplayName           respjson.Field
		MaxInputTokens        respjson.Field
		MaxTokens             respjson.Field
		Type                  respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ModelInfo) RawJSON

func (r ModelInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*ModelInfo) UnmarshalJSON

func (r *ModelInfo) UnmarshalJSON(data []byte) error

type ModelListParams

type ModelListParams struct {
	// ID of the object to use as a cursor for pagination. When provided, returns the
	// page of results immediately after this object.
	AfterID param.Opt[string] `query:"after_id,omitzero" json:"-"`
	// ID of the object to use as a cursor for pagination. When provided, returns the
	// page of results immediately before this object.
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	// Number of items to return per page.
	//
	// Defaults to `20`. Ranges from `1` to `1000`.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ModelListParams) URLQuery

func (r ModelListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ModelListParams's query parameters as `url.Values`.

type ModelService

type ModelService struct {
	Options []option.RequestOption
}

ModelService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelService method instead.

func NewModelService

func NewModelService(opts ...option.RequestOption) (r ModelService)

NewModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ModelService) List

func (r *ModelService) List(ctx context.Context, params ModelListParams, opts ...option.RequestOption) (res *pagination.Page[ModelInfo], err error)

List available models.

The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.

func (*ModelService) ListAutoPaging

List available models.

The Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.

type MonetaryAmount

type MonetaryAmount struct {
	// Amount in minor units of the currency, as an integer decimal string with no
	// leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a
	// number so no float rounding is ever applied.
	Amount string `json:"amount" api:"required"`
	// Uppercase ISO-4217 currency code. `USD` is the only currency currently
	// supported; the accepted set is closed and grows only when a new currency is
	// priced.
	//
	// Any of "USD".
	Currency Currency `json:"currency" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Currency    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A monetary amount in a specific currency.

func (MonetaryAmount) RawJSON

func (r MonetaryAmount) RawJSON() string

Returns the unmodified JSON received from the API

func (MonetaryAmount) ToParam

func (r MonetaryAmount) ToParam() MonetaryAmountParam

ToParam converts this MonetaryAmount to a MonetaryAmountParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MonetaryAmountParam.Overrides()

func (*MonetaryAmount) UnmarshalJSON

func (r *MonetaryAmount) UnmarshalJSON(data []byte) error

type MonetaryAmountParam

type MonetaryAmountParam struct {
	// Amount in minor units of the currency, as an integer decimal string with no
	// leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a
	// number so no float rounding is ever applied.
	Amount string `json:"amount" api:"required"`
	// Uppercase ISO-4217 currency code. `USD` is the only currency currently
	// supported; the accepted set is closed and grows only when a new currency is
	// priced.
	//
	// Any of "USD".
	Currency Currency `json:"currency,omitzero" api:"required"`
	// contains filtered or unexported fields
}

A monetary amount in a specific currency.

The properties Amount, Currency are required.

func (MonetaryAmountParam) MarshalJSON

func (r MonetaryAmountParam) MarshalJSON() (data []byte, err error)

func (*MonetaryAmountParam) UnmarshalJSON

func (r *MonetaryAmountParam) UnmarshalJSON(data []byte) error

type OutputBehaviorCreateNew

type OutputBehaviorCreateNew struct {
	// Any of "create_new".
	Type OutputBehaviorCreateNewType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.

func (OutputBehaviorCreateNew) RawJSON

func (r OutputBehaviorCreateNew) RawJSON() string

Returns the unmodified JSON received from the API

func (OutputBehaviorCreateNew) ToParam

ToParam converts this OutputBehaviorCreateNew to a OutputBehaviorCreateNewParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OutputBehaviorCreateNewParam.Overrides()

func (*OutputBehaviorCreateNew) UnmarshalJSON

func (r *OutputBehaviorCreateNew) UnmarshalJSON(data []byte) error

type OutputBehaviorCreateNewParam

type OutputBehaviorCreateNewParam struct {
	// Any of "create_new".
	Type OutputBehaviorCreateNewType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.

The property Type is required.

func (OutputBehaviorCreateNewParam) MarshalJSON

func (r OutputBehaviorCreateNewParam) MarshalJSON() (data []byte, err error)

func (*OutputBehaviorCreateNewParam) UnmarshalJSON

func (r *OutputBehaviorCreateNewParam) UnmarshalJSON(data []byte) error

type OutputBehaviorCreateNewType

type OutputBehaviorCreateNewType string
const (
	OutputBehaviorCreateNewTypeCreateNew OutputBehaviorCreateNewType = "create_new"
)

type OutputBehaviorUnion

type OutputBehaviorUnion struct {
	// Any of "create_new", "update_existing".
	Type string `json:"type"`
	// This field is from variant [OutputBehaviorUpdateExisting].
	MemoryStoreID string `json:"memory_store_id"`
	JSON          struct {
		Type          respjson.Field
		MemoryStoreID respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OutputBehaviorUnion contains all possible properties and values from OutputBehaviorCreateNew, OutputBehaviorUpdateExisting.

Use the OutputBehaviorUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (OutputBehaviorUnion) AsAny

func (u OutputBehaviorUnion) AsAny() anyOutputBehavior

Use the following switch statement to find the correct variant

switch variant := OutputBehaviorUnion.AsAny().(type) {
case qoder.OutputBehaviorCreateNew:
case qoder.OutputBehaviorUpdateExisting:
default:
  fmt.Errorf("no variant present")
}

func (OutputBehaviorUnion) AsCreateNew

func (u OutputBehaviorUnion) AsCreateNew() (v OutputBehaviorCreateNew)

func (OutputBehaviorUnion) AsUpdateExisting

func (u OutputBehaviorUnion) AsUpdateExisting() (v OutputBehaviorUpdateExisting)

func (OutputBehaviorUnion) RawJSON

func (u OutputBehaviorUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (OutputBehaviorUnion) ToParam

ToParam converts this OutputBehaviorUnion to a OutputBehaviorUnionParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OutputBehaviorUnionParam.Overrides()

func (*OutputBehaviorUnion) UnmarshalJSON

func (r *OutputBehaviorUnion) UnmarshalJSON(data []byte) error

type OutputBehaviorUnionParam

type OutputBehaviorUnionParam struct {
	OfCreateNew      *OutputBehaviorCreateNewParam      `json:",omitzero,inline"`
	OfUpdateExisting *OutputBehaviorUpdateExistingParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func OutputBehaviorParamOfUpdateExisting

func OutputBehaviorParamOfUpdateExisting(memoryStoreID string) OutputBehaviorUnionParam

func (OutputBehaviorUnionParam) GetMemoryStoreID

func (u OutputBehaviorUnionParam) GetMemoryStoreID() *string

Returns a pointer to the underlying variant's property, if present.

func (OutputBehaviorUnionParam) GetType

func (u OutputBehaviorUnionParam) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (OutputBehaviorUnionParam) MarshalJSON

func (u OutputBehaviorUnionParam) MarshalJSON() ([]byte, error)

func (*OutputBehaviorUnionParam) UnmarshalJSON

func (u *OutputBehaviorUnionParam) UnmarshalJSON(data []byte) error

type OutputBehaviorUpdateExisting

type OutputBehaviorUpdateExisting struct {
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "update_existing".
	Type OutputBehaviorUpdateExistingType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MemoryStoreID respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.

func (OutputBehaviorUpdateExisting) RawJSON

Returns the unmodified JSON received from the API

func (OutputBehaviorUpdateExisting) ToParam

ToParam converts this OutputBehaviorUpdateExisting to a OutputBehaviorUpdateExistingParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with OutputBehaviorUpdateExistingParam.Overrides()

func (*OutputBehaviorUpdateExisting) UnmarshalJSON

func (r *OutputBehaviorUpdateExisting) UnmarshalJSON(data []byte) error

type OutputBehaviorUpdateExistingParam

type OutputBehaviorUpdateExistingParam struct {
	MemoryStoreID string `json:"memory_store_id" api:"required"`
	// Any of "update_existing".
	Type OutputBehaviorUpdateExistingType `json:"type,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.

The properties MemoryStoreID, Type are required.

func (OutputBehaviorUpdateExistingParam) MarshalJSON

func (r OutputBehaviorUpdateExistingParam) MarshalJSON() (data []byte, err error)

func (*OutputBehaviorUpdateExistingParam) UnmarshalJSON

func (r *OutputBehaviorUpdateExistingParam) UnmarshalJSON(data []byte) error

type OutputBehaviorUpdateExistingType

type OutputBehaviorUpdateExistingType string
const (
	OutputBehaviorUpdateExistingTypeUpdateExisting OutputBehaviorUpdateExistingType = "update_existing"
)

type Packages

type Packages struct {
	// Ubuntu/Debian packages to install
	Apt []string `json:"apt" api:"required"`
	// Rust packages to install
	Cargo []string `json:"cargo" api:"required"`
	// Ruby packages to install
	Gem []string `json:"gem" api:"required"`
	// Go packages to install
	Go []string `json:"go" api:"required"`
	// Node.js packages to install
	Npm []string `json:"npm" api:"required"`
	// Python packages to install
	Pip []string `json:"pip" api:"required"`
	// Package configuration type
	//
	// Any of "packages".
	Type PackagesType `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Apt         respjson.Field
		Cargo       respjson.Field
		Gem         respjson.Field
		Go          respjson.Field
		Npm         respjson.Field
		Pip         respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Packages (and their versions) available in this environment.

func (Packages) RawJSON

func (r Packages) RawJSON() string

Returns the unmodified JSON received from the API

func (*Packages) UnmarshalJSON

func (r *Packages) UnmarshalJSON(data []byte) error

type PackagesParams

type PackagesParams struct {
	// Ubuntu/Debian packages to install
	Apt []string `json:"apt,omitzero"`
	// Rust packages to install
	Cargo []string `json:"cargo,omitzero"`
	// Ruby packages to install
	Gem []string `json:"gem,omitzero"`
	// Go packages to install
	Go []string `json:"go,omitzero"`
	// Node.js packages to install
	Npm []string `json:"npm,omitzero"`
	// Python packages to install
	Pip []string `json:"pip,omitzero"`
	// Package configuration type
	//
	// Any of "packages".
	Type PackagesParamsType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

Specify packages (and optionally their versions) available in this environment.

When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest.

Under `limited` networking, requires `networking.allow_package_managers` to be `true`.

func (PackagesParams) MarshalJSON

func (r PackagesParams) MarshalJSON() (data []byte, err error)

func (*PackagesParams) UnmarshalJSON

func (r *PackagesParams) UnmarshalJSON(data []byte) error

type PackagesParamsType

type PackagesParamsType string

Package configuration type

const (
	PackagesParamsTypePackages PackagesParamsType = "packages"
)

type PackagesType

type PackagesType string

Package configuration type

const (
	PackagesTypePackages PackagesType = "packages"
)

type PlainTextSourceParam

type PlainTextSourceParam struct {
	Data string `json:"data" api:"required"`
	// This field can be elided, and will marshal its zero value as "text/plain".
	MediaType constant.TextPlain `json:"media_type" default:"text/plain"`
	// This field can be elided, and will marshal its zero value as "text".
	Type constant.Text `json:"type" default:"text"`
	// contains filtered or unexported fields
}

The properties Data, MediaType, Type are required.

func (PlainTextSourceParam) MarshalJSON

func (r PlainTextSourceParam) MarshalJSON() (data []byte, err error)

func (*PlainTextSourceParam) UnmarshalJSON

func (r *PlainTextSourceParam) UnmarshalJSON(data []byte) error

type QoderBeta

type QoderBeta = string

type RedactedThinkingBlockParam

type RedactedThinkingBlockParam struct {
	// The `data` value of this redacted thinking block, exactly as returned by the API
	// in a previous response. Opaque and encrypted; pass it back unchanged.
	Data string `json:"data" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "redacted_thinking".
	Type constant.RedactedThinking `json:"type" default:"redacted_thinking"`
	// contains filtered or unexported fields
}

The properties Data, Type are required.

func (RedactedThinkingBlockParam) MarshalJSON

func (r RedactedThinkingBlockParam) MarshalJSON() (data []byte, err error)

func (*RedactedThinkingBlockParam) UnmarshalJSON

func (r *RedactedThinkingBlockParam) UnmarshalJSON(data []byte) error

type RequestDocumentBlockParam

type RequestDocumentBlockParam struct {
	Source  RequestDocumentBlockSourceUnionParam `json:"source,omitzero" api:"required"`
	Context param.Opt[string]                    `json:"context,omitzero"`
	Title   param.Opt[string]                    `json:"title,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	Citations    CitationsConfigParam       `json:"citations,omitzero"`
	// This field can be elided, and will marshal its zero value as "document".
	Type constant.Document `json:"type" default:"document"`
	// contains filtered or unexported fields
}

The properties Source, Type are required.

func (RequestDocumentBlockParam) MarshalJSON

func (r RequestDocumentBlockParam) MarshalJSON() (data []byte, err error)

func (*RequestDocumentBlockParam) UnmarshalJSON

func (r *RequestDocumentBlockParam) UnmarshalJSON(data []byte) error

type RequestDocumentBlockSourceUnionParam

type RequestDocumentBlockSourceUnionParam struct {
	OfBase64  *Base64PDFSourceParam    `json:",omitzero,inline"`
	OfText    *PlainTextSourceParam    `json:",omitzero,inline"`
	OfContent *ContentBlockSourceParam `json:",omitzero,inline"`
	OfURL     *URLPDFSourceParam       `json:",omitzero,inline"`
	OfFile    *FileDocumentSourceParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (RequestDocumentBlockSourceUnionParam) GetContent

Returns a pointer to the underlying variant's property, if present.

func (RequestDocumentBlockSourceUnionParam) GetData

Returns a pointer to the underlying variant's property, if present.

func (RequestDocumentBlockSourceUnionParam) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (RequestDocumentBlockSourceUnionParam) GetMediaType

func (u RequestDocumentBlockSourceUnionParam) GetMediaType() *string

Returns a pointer to the underlying variant's property, if present.

func (RequestDocumentBlockSourceUnionParam) GetType

Returns a pointer to the underlying variant's property, if present.

func (RequestDocumentBlockSourceUnionParam) GetURL

Returns a pointer to the underlying variant's property, if present.

func (RequestDocumentBlockSourceUnionParam) MarshalJSON

func (u RequestDocumentBlockSourceUnionParam) MarshalJSON() ([]byte, error)

func (*RequestDocumentBlockSourceUnionParam) UnmarshalJSON

func (u *RequestDocumentBlockSourceUnionParam) UnmarshalJSON(data []byte) error

type RequestMCPToolResultBlockParam

type RequestMCPToolResultBlockParam struct {
	ToolUseID string          `json:"tool_use_id" api:"required"`
	IsError   param.Opt[bool] `json:"is_error,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam                 `json:"cache_control,omitzero"`
	Content      RequestMCPToolResultBlockParamContentUnion `json:"content,omitzero"`
	// This field can be elided, and will marshal its zero value as "mcp_tool_result".
	Type constant.MCPToolResult `json:"type" default:"mcp_tool_result"`
	// contains filtered or unexported fields
}

The properties ToolUseID, Type are required.

func (RequestMCPToolResultBlockParam) MarshalJSON

func (r RequestMCPToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*RequestMCPToolResultBlockParam) UnmarshalJSON

func (r *RequestMCPToolResultBlockParam) UnmarshalJSON(data []byte) error

type RequestMCPToolResultBlockParamContentUnion

type RequestMCPToolResultBlockParamContentUnion struct {
	OfString                    param.Opt[string] `json:",omitzero,inline"`
	OfMCPToolResultBlockContent []TextBlockParam  `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (RequestMCPToolResultBlockParamContentUnion) MarshalJSON

func (*RequestMCPToolResultBlockParamContentUnion) UnmarshalJSON

func (u *RequestMCPToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type RequestToolAdditionBlockParam

type RequestToolAdditionBlockParam struct {
	// Reference to a single tool the caller declared directly in `tools[]`. Does not
	// accept the composed `{server}_{name}` form the server assigns to MCP-resolved
	// tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
	Tool RequestToolAdditionBlockToolUnionParam `json:"tool,omitzero" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "tool_addition".
	Type constant.ToolAddition `json:"type" default:"tool_addition"`
	// contains filtered or unexported fields
}

Mid-conversation directive to surface a declared tool.

`tool` references a tool (or MCP toolset) by name from the request's `tools`; it is offered to the model from this point in the conversation onward.

The properties Tool, Type are required.

func (RequestToolAdditionBlockParam) MarshalJSON

func (r RequestToolAdditionBlockParam) MarshalJSON() (data []byte, err error)

func (*RequestToolAdditionBlockParam) UnmarshalJSON

func (r *RequestToolAdditionBlockParam) UnmarshalJSON(data []byte) error

type RequestToolAdditionBlockToolUnionParam

type RequestToolAdditionBlockToolUnionParam struct {
	OfToolReference       *ToolChangeToolReferenceParam       `json:",omitzero,inline"`
	OfMCPToolReference    *ToolChangeMCPToolReferenceParam    `json:",omitzero,inline"`
	OfMCPToolsetReference *ToolChangeMCPToolsetReferenceParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (RequestToolAdditionBlockToolUnionParam) GetName

Returns a pointer to the underlying variant's property, if present.

func (RequestToolAdditionBlockToolUnionParam) GetServerName

Returns a pointer to the underlying variant's property, if present.

func (RequestToolAdditionBlockToolUnionParam) GetType

Returns a pointer to the underlying variant's property, if present.

func (RequestToolAdditionBlockToolUnionParam) MarshalJSON

func (u RequestToolAdditionBlockToolUnionParam) MarshalJSON() ([]byte, error)

func (*RequestToolAdditionBlockToolUnionParam) UnmarshalJSON

func (u *RequestToolAdditionBlockToolUnionParam) UnmarshalJSON(data []byte) error

type RequestToolRemovalBlockParam

type RequestToolRemovalBlockParam struct {
	// Reference to a single tool the caller declared directly in `tools[]`. Does not
	// accept the composed `{server}_{name}` form the server assigns to MCP-resolved
	// tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.
	Tool RequestToolRemovalBlockToolUnionParam `json:"tool,omitzero" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "tool_removal".
	Type constant.ToolRemoval `json:"type" default:"tool_removal"`
	// contains filtered or unexported fields
}

Mid-conversation directive to withdraw a tool.

`tool` references a tool (or MCP toolset) by name from the request's `tools`; it is no longer offered to the model from this point in the conversation onward.

The properties Tool, Type are required.

func (RequestToolRemovalBlockParam) MarshalJSON

func (r RequestToolRemovalBlockParam) MarshalJSON() (data []byte, err error)

func (*RequestToolRemovalBlockParam) UnmarshalJSON

func (r *RequestToolRemovalBlockParam) UnmarshalJSON(data []byte) error

type RequestToolRemovalBlockToolUnionParam

type RequestToolRemovalBlockToolUnionParam struct {
	OfToolReference       *ToolChangeToolReferenceParam       `json:",omitzero,inline"`
	OfMCPToolReference    *ToolChangeMCPToolReferenceParam    `json:",omitzero,inline"`
	OfMCPToolsetReference *ToolChangeMCPToolsetReferenceParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (RequestToolRemovalBlockToolUnionParam) GetName

Returns a pointer to the underlying variant's property, if present.

func (RequestToolRemovalBlockToolUnionParam) GetServerName

func (u RequestToolRemovalBlockToolUnionParam) GetServerName() *string

Returns a pointer to the underlying variant's property, if present.

func (RequestToolRemovalBlockToolUnionParam) GetType

Returns a pointer to the underlying variant's property, if present.

func (RequestToolRemovalBlockToolUnionParam) MarshalJSON

func (u RequestToolRemovalBlockToolUnionParam) MarshalJSON() ([]byte, error)

func (*RequestToolRemovalBlockToolUnionParam) UnmarshalJSON

func (u *RequestToolRemovalBlockToolUnionParam) UnmarshalJSON(data []byte) error

type ResumableSessionEventStream

type ResumableSessionEventStream struct {
	// contains filtered or unexported fields
}

ResumableSessionEventStream is a Session Event stream that reconnects after retryable HTTP, transport, read, and unexpected EOF failures.

func (*ResumableSessionEventStream) Close

func (*ResumableSessionEventStream) Current

func (*ResumableSessionEventStream) Err

func (*ResumableSessionEventStream) LastEventID

func (s *ResumableSessionEventStream) LastEventID() string

func (*ResumableSessionEventStream) Next

type SearchResultBlockParam

type SearchResultBlockParam struct {
	Content []TextBlockParam `json:"content,omitzero" api:"required"`
	Source  string           `json:"source" api:"required"`
	Title   string           `json:"title" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	Citations    CitationsConfigParam       `json:"citations,omitzero"`
	// This field can be elided, and will marshal its zero value as "search_result".
	Type constant.SearchResult `json:"type" default:"search_result"`
	// contains filtered or unexported fields
}

The properties Content, Source, Title, Type are required.

func (SearchResultBlockParam) MarshalJSON

func (r SearchResultBlockParam) MarshalJSON() (data []byte, err error)

func (*SearchResultBlockParam) UnmarshalJSON

func (r *SearchResultBlockParam) UnmarshalJSON(data []byte) error

type SelfHostedConfig

type SelfHostedConfig struct {
	// Environment type
	Type constant.SelfHosted `json:"type" default:"self_hosted"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Configuration for self-hosted environments.

func (SelfHostedConfig) RawJSON

func (r SelfHostedConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*SelfHostedConfig) UnmarshalJSON

func (r *SelfHostedConfig) UnmarshalJSON(data []byte) error

type SelfHostedConfigParams

type SelfHostedConfigParams struct {
	// Environment type
	Type constant.SelfHosted `json:"type" default:"self_hosted"`
	// contains filtered or unexported fields
}

Request params for `self_hosted` environment configuration.

This struct has a constant value, construct it with NewSelfHostedConfigParams.

func NewSelfHostedConfigParams

func NewSelfHostedConfigParams() SelfHostedConfigParams

func (SelfHostedConfigParams) MarshalJSON

func (r SelfHostedConfigParams) MarshalJSON() (data []byte, err error)

func (*SelfHostedConfigParams) UnmarshalJSON

func (r *SelfHostedConfigParams) UnmarshalJSON(data []byte) error

type SelfHostedWork

type SelfHostedWork struct {
	// Work identifier (e.g., 'work\_...')
	ID string `json:"id" api:"required"`
	// RFC 3339 timestamp when work was acknowledged by Environment Manager
	AcknowledgedAt string `json:"acknowledged_at" api:"required"`
	// RFC 3339 timestamp when work was created
	CreatedAt string `json:"created_at" api:"required"`
	// The actual work to be performed
	Data SessionWorkData `json:"data" api:"required"`
	// Environment identifier this work belongs to (e.g., `env_...`)
	EnvironmentID string `json:"environment_id" api:"required"`
	// RFC 3339 timestamp of the most recent heartbeat
	LatestHeartbeatAt string `json:"latest_heartbeat_at" api:"required"`
	// User-provided metadata key-value pairs associated with this work item
	Metadata map[string]string `json:"metadata" api:"required"`
	// Credential payload used by the environment worker to execute this work item. May
	// be populated when polling for work; null on all other retrieval paths.
	Secret string `json:"secret" api:"required"`
	// RFC 3339 timestamp when work execution started
	StartedAt string `json:"started_at" api:"required"`
	// Current state of the work item
	//
	// Any of "queued", "starting", "active", "stopping", "stopped".
	State SelfHostedWorkState `json:"state" api:"required"`
	// RFC 3339 timestamp when stop was requested
	StopRequestedAt string `json:"stop_requested_at" api:"required"`
	// RFC 3339 timestamp when work execution stopped
	StoppedAt string `json:"stopped_at" api:"required"`
	// The type of object (always 'work')
	Type constant.Work `json:"type" default:"work"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		AcknowledgedAt    respjson.Field
		CreatedAt         respjson.Field
		Data              respjson.Field
		EnvironmentID     respjson.Field
		LatestHeartbeatAt respjson.Field
		Metadata          respjson.Field
		Secret            respjson.Field
		StartedAt         respjson.Field
		State             respjson.Field
		StopRequestedAt   respjson.Field
		StoppedAt         respjson.Field
		Type              respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Work resource representing a unit of work in a self-hosted environment.

Work items are queued when sessions are created or when long-dormant sessions receive new messages. The Environment Manager polls for work items and executes them on customer-hosted infrastructure.

func (SelfHostedWork) RawJSON

func (r SelfHostedWork) RawJSON() string

Returns the unmodified JSON received from the API

func (*SelfHostedWork) UnmarshalJSON

func (r *SelfHostedWork) UnmarshalJSON(data []byte) error

type SelfHostedWorkHeartbeatResponse

type SelfHostedWorkHeartbeatResponse struct {
	// RFC 3339 timestamp of the actual heartbeat from DB
	LastHeartbeat string `json:"last_heartbeat" api:"required"`
	// Whether the heartbeat succeeded in extending the lease
	LeaseExtended bool `json:"lease_extended" api:"required"`
	// Current state of the work item (active/stopping/stopped)
	//
	// Any of "queued", "starting", "active", "stopping", "stopped".
	State SelfHostedWorkHeartbeatResponseState `json:"state" api:"required"`
	// Effective TTL applied to the lease
	TTLSeconds int64 `json:"ttl_seconds" api:"required"`
	// The type of response
	Type constant.WorkHeartbeat `json:"type" default:"work_heartbeat"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LastHeartbeat respjson.Field
		LeaseExtended respjson.Field
		State         respjson.Field
		TTLSeconds    respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Response after recording a heartbeat for a work item.

func (SelfHostedWorkHeartbeatResponse) RawJSON

Returns the unmodified JSON received from the API

func (*SelfHostedWorkHeartbeatResponse) UnmarshalJSON

func (r *SelfHostedWorkHeartbeatResponse) UnmarshalJSON(data []byte) error

type SelfHostedWorkHeartbeatResponseState

type SelfHostedWorkHeartbeatResponseState string

Current state of the work item (active/stopping/stopped)

const (
	SelfHostedWorkHeartbeatResponseStateQueued   SelfHostedWorkHeartbeatResponseState = "queued"
	SelfHostedWorkHeartbeatResponseStateStarting SelfHostedWorkHeartbeatResponseState = "starting"
	SelfHostedWorkHeartbeatResponseStateActive   SelfHostedWorkHeartbeatResponseState = "active"
	SelfHostedWorkHeartbeatResponseStateStopping SelfHostedWorkHeartbeatResponseState = "stopping"
	SelfHostedWorkHeartbeatResponseStateStopped  SelfHostedWorkHeartbeatResponseState = "stopped"
)

type SelfHostedWorkListResponse

type SelfHostedWorkListResponse struct {
	// List of work items
	Data []SelfHostedWork `json:"data" api:"required"`
	// Opaque cursor for fetching the next page of results
	NextPage string `json:"next_page" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		NextPage    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Response when listing work items with cursor-based pagination.

func (SelfHostedWorkListResponse) RawJSON

func (r SelfHostedWorkListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SelfHostedWorkListResponse) UnmarshalJSON

func (r *SelfHostedWorkListResponse) UnmarshalJSON(data []byte) error

type SelfHostedWorkQueueStats

type SelfHostedWorkQueueStats struct {
	// Number of work items waiting to be picked up (lag from consumer group)
	Depth int64 `json:"depth" api:"required"`
	// RFC 3339 timestamp of oldest item in the work stream (includes both queued and
	// pending items), null if stream empty
	OldestQueuedAt string `json:"oldest_queued_at" api:"required"`
	// Number of work items being processed (polled but not acknowledged)
	Pending int64 `json:"pending" api:"required"`
	// The type of object
	Type constant.WorkQueueStats `json:"type" default:"work_queue_stats"`
	// Number of workers that have polled for work in the last 30 seconds. Requires
	// worker_id to be sent with poll requests.
	WorkersPolling int64 `json:"workers_polling" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Depth          respjson.Field
		OldestQueuedAt respjson.Field
		Pending        respjson.Field
		Type           respjson.Field
		WorkersPolling respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Statistics about the work queue for an environment.

Uses Redis Stream consumer group metrics for O(1) queries.

func (SelfHostedWorkQueueStats) RawJSON

func (r SelfHostedWorkQueueStats) RawJSON() string

Returns the unmodified JSON received from the API

func (*SelfHostedWorkQueueStats) UnmarshalJSON

func (r *SelfHostedWorkQueueStats) UnmarshalJSON(data []byte) error

type SelfHostedWorkState

type SelfHostedWorkState string

Current state of the work item

const (
	SelfHostedWorkStateQueued   SelfHostedWorkState = "queued"
	SelfHostedWorkStateStarting SelfHostedWorkState = "starting"
	SelfHostedWorkStateActive   SelfHostedWorkState = "active"
	SelfHostedWorkStateStopping SelfHostedWorkState = "stopping"
	SelfHostedWorkStateStopped  SelfHostedWorkState = "stopped"
)

type SelfHostedWorkStopRequestParam

type SelfHostedWorkStopRequestParam struct {
	// If true, immediately stop work without graceful shutdown
	Force param.Opt[bool] `json:"force,omitzero"`
	// contains filtered or unexported fields
}

Request to stop a work item.

func (SelfHostedWorkStopRequestParam) MarshalJSON

func (r SelfHostedWorkStopRequestParam) MarshalJSON() (data []byte, err error)

func (*SelfHostedWorkStopRequestParam) UnmarshalJSON

func (r *SelfHostedWorkStopRequestParam) UnmarshalJSON(data []byte) error

type SelfHostedWorkUpdateRequestParam

type SelfHostedWorkUpdateRequestParam struct {
	// Metadata patch. Set a key to a string to upsert it, or to null to delete it.
	// Omit the field to preserve existing metadata.
	Metadata map[string]any `json:"metadata,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Request to update work item metadata.

The property Metadata is required.

func (SelfHostedWorkUpdateRequestParam) MarshalJSON

func (r SelfHostedWorkUpdateRequestParam) MarshalJSON() (data []byte, err error)

func (*SelfHostedWorkUpdateRequestParam) UnmarshalJSON

func (r *SelfHostedWorkUpdateRequestParam) UnmarshalJSON(data []byte) error

type ServerToolCaller20260120Param

type ServerToolCaller20260120Param struct {
	ToolID string `json:"tool_id" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "code_execution_20260120".
	Type constant.CodeExecution20260120 `json:"type" default:"code_execution_20260120"`
	// contains filtered or unexported fields
}

The properties ToolID, Type are required.

func (ServerToolCaller20260120Param) MarshalJSON

func (r ServerToolCaller20260120Param) MarshalJSON() (data []byte, err error)

func (*ServerToolCaller20260120Param) UnmarshalJSON

func (r *ServerToolCaller20260120Param) UnmarshalJSON(data []byte) error

type ServerToolCallerParam

type ServerToolCallerParam struct {
	ToolID string `json:"tool_id" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "code_execution_20250825".
	Type constant.CodeExecution20250825 `json:"type" default:"code_execution_20250825"`
	// contains filtered or unexported fields
}

Tool invocation generated by a server-side tool.

The properties ToolID, Type are required.

func (ServerToolCallerParam) MarshalJSON

func (r ServerToolCallerParam) MarshalJSON() (data []byte, err error)

func (*ServerToolCallerParam) UnmarshalJSON

func (r *ServerToolCallerParam) UnmarshalJSON(data []byte) error

type ServerToolUseBlockParam

type ServerToolUseBlockParam struct {
	ID    string `json:"id" api:"required"`
	Input any    `json:"input,omitzero" api:"required"`
	// Any of "advisor", "web_search", "web_fetch", "code_execution",
	// "bash_code_execution", "text_editor_code_execution", "tool_search_tool_regex",
	// "tool_search_tool_bm25".
	Name ServerToolUseBlockParamName `json:"name,omitzero" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// Tool invocation directly from the model.
	Caller ServerToolUseBlockParamCallerUnion `json:"caller,omitzero"`
	// This field can be elided, and will marshal its zero value as "server_tool_use".
	Type constant.ServerToolUse `json:"type" default:"server_tool_use"`
	// contains filtered or unexported fields
}

The properties ID, Input, Name, Type are required.

func (ServerToolUseBlockParam) MarshalJSON

func (r ServerToolUseBlockParam) MarshalJSON() (data []byte, err error)

func (*ServerToolUseBlockParam) UnmarshalJSON

func (r *ServerToolUseBlockParam) UnmarshalJSON(data []byte) error

type ServerToolUseBlockParamCallerUnion

type ServerToolUseBlockParamCallerUnion struct {
	OfDirect                *DirectCallerParam             `json:",omitzero,inline"`
	OfCodeExecution20250825 *ServerToolCallerParam         `json:",omitzero,inline"`
	OfCodeExecution20260120 *ServerToolCaller20260120Param `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ServerToolUseBlockParamCallerUnion) GetToolID

Returns a pointer to the underlying variant's property, if present.

func (ServerToolUseBlockParamCallerUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ServerToolUseBlockParamCallerUnion) MarshalJSON

func (u ServerToolUseBlockParamCallerUnion) MarshalJSON() ([]byte, error)

func (*ServerToolUseBlockParamCallerUnion) UnmarshalJSON

func (u *ServerToolUseBlockParamCallerUnion) UnmarshalJSON(data []byte) error

type ServerToolUseBlockParamName

type ServerToolUseBlockParamName string

type SessionArchiveParams

type SessionArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionCancelParams added in v0.3.0

type SessionCancelParams struct {
	WorkspaceID param.Opt[string] `header:"qoder-workspace-id,omitzero" json:"-"`
	Betas       []QoderBeta       `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (*SessionCancelParams) UnmarshalJSON added in v0.3.0

func (r *SessionCancelParams) UnmarshalJSON(data []byte) error

type SessionCancelResponse added in v0.3.0

type SessionCancelResponse struct {
	ID     string `json:"id"`
	Type   string `json:"type"`
	Status string `json:"status"`
	JSON   struct {
		ID          respjson.Field
		Type        respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SessionCancelResponse) RawJSON added in v0.3.0

func (r SessionCancelResponse) RawJSON() string

func (*SessionCancelResponse) UnmarshalJSON added in v0.3.0

func (r *SessionCancelResponse) UnmarshalJSON(data []byte) error

type SessionDeleteParams

type SessionDeleteParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionEventListParams

type SessionEventListParams struct {
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Return events created after this time (exclusive). Compared against the event's
	// `processed_at` value.
	CreatedAtGt param.Opt[time.Time] `query:"created_at[gt],omitzero" format:"date-time" json:"-"`
	// Return events created at or after this time (inclusive). Compared against the
	// event's `processed_at` value.
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return events created before this time (exclusive). Compared against the event's
	// `processed_at` value.
	CreatedAtLt param.Opt[time.Time] `query:"created_at[lt],omitzero" format:"date-time" json:"-"`
	// Return events created at or before this time (inclusive). Compared against the
	// event's `processed_at` value.
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// Query parameter for limit
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor from a previous response's `next_page`.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Sort direction for results, ordered by the event's `processed_at`. Defaults to
	// `asc` (chronological).
	//
	// Any of "asc", "desc".
	Order SessionEventListParamsOrder `query:"order,omitzero" json:"-"`
	// Filter by event type. Values match the `type` field on returned events (for
	// example, `user.message` or `agent.tool_use`). Omit to return all event types.
	Types []string `query:"types,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionEventListParams) URLQuery

func (r SessionEventListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionEventListParams's query parameters as `url.Values`.

type SessionEventListParamsOrder

type SessionEventListParamsOrder string

Sort direction for results, ordered by the event's `processed_at`. Defaults to `asc` (chronological).

const (
	SessionEventListParamsOrderAsc  SessionEventListParamsOrder = "asc"
	SessionEventListParamsOrderDesc SessionEventListParamsOrder = "desc"
)

type SessionEventSendParams

type SessionEventSendParams struct {
	// Events to send to the `session`.
	Events []ManagedAgentsEventParamsUnion `json:"events,omitzero" api:"required"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionEventSendParams) MarshalJSON

func (r SessionEventSendParams) MarshalJSON() (data []byte, err error)

func (*SessionEventSendParams) UnmarshalJSON

func (r *SessionEventSendParams) UnmarshalJSON(data []byte) error

type SessionEventService

type SessionEventService struct {
	Options []option.RequestOption
}

SessionEventService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionEventService method instead.

func NewSessionEventService

func NewSessionEventService(opts ...option.RequestOption) (r SessionEventService)

NewSessionEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SessionEventService) List

List Events

func (*SessionEventService) ListAutoPaging

List Events

func (*SessionEventService) NewResumableStream

NewResumableStream subscribes to Session Events and reconnects retryable failures with the latest yielded Last-Event-ID cursor.

func (*SessionEventService) Send

Send Events

func (*SessionEventService) StreamEvents

Stream Events

type SessionEventStreamParams

type SessionEventStreamParams struct {
	// When set, this connection also receives streaming deltas (`event_start`,
	// `event_delta`) while an event is being produced, before the event itself
	// arrives. Deltas are best-effort; when the final event is produced it carries the
	// complete content. A model request that ends early (an error or interrupt)
	// produces no final event — its terminal `span.model_request_end` closes the
	// preview. Accepts one or more event types to preview and may be repeated:
	// `agent.message` streams `content_delta` fragments; `agent.thinking` is
	// start-only — a signal that the agent has begun extended thinking, concluded by
	// the `agent.thinking` event itself. Only previews of the requested event types
	// are sent.
	EventDeltas []ManagedAgentsDeltaType `query:"event_deltas,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// Resume the subscription after this Event ID.
	LastEventID param.Opt[string] `header:"Last-Event-ID,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionEventStreamParams) URLQuery

func (r SessionEventStreamParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionEventStreamParams's query parameters as `url.Values`.

type SessionGetParams

type SessionGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionListParams

type SessionListParams struct {
	// Filter sessions created with this agent ID.
	AgentID param.Opt[string] `query:"agent_id,omitzero" json:"-"`
	// Filter by agent version. Only applies when `agent_id` is also set.
	AgentVersion param.Opt[int64] `query:"agent_version,omitzero" json:"-"`
	// Return sessions created after this time (exclusive).
	CreatedAtGt param.Opt[time.Time] `query:"created_at[gt],omitzero" format:"date-time" json:"-"`
	// Return sessions created at or after this time (inclusive).
	CreatedAtGte param.Opt[time.Time] `query:"created_at[gte],omitzero" format:"date-time" json:"-"`
	// Return sessions created before this time (exclusive).
	CreatedAtLt param.Opt[time.Time] `query:"created_at[lt],omitzero" format:"date-time" json:"-"`
	// Return sessions created at or before this time (inclusive).
	CreatedAtLte param.Opt[time.Time] `query:"created_at[lte],omitzero" format:"date-time" json:"-"`
	// Filter sessions created by this deployment ID.
	DeploymentID param.Opt[string] `query:"deployment_id,omitzero" json:"-"`
	// When true, includes archived sessions. Default: false (exclude archived).
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum number of results to return.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter sessions whose resources contain a `memory_store` with this memory store
	// ID.
	MemoryStoreID param.Opt[string] `query:"memory_store_id,omitzero" json:"-"`
	// Opaque pagination cursor from a previous response.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Sort direction for results, ordered by `created_at`. Defaults to `desc` (newest
	// first).
	//
	// Any of "asc", "desc".
	Order SessionListParamsOrder `query:"order,omitzero" json:"-"`
	// Filter by session status. Repeat the parameter to match any of multiple
	// statuses.
	//
	// Any of "rescheduling", "running", "idle", "terminated".
	Statuses []string `query:"statuses,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionListParams) URLQuery

func (r SessionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionListParams's query parameters as `url.Values`.

type SessionListParamsOrder

type SessionListParamsOrder string

Sort direction for results, ordered by `created_at`. Defaults to `desc` (newest first).

const (
	SessionListParamsOrderAsc  SessionListParamsOrder = "asc"
	SessionListParamsOrderDesc SessionListParamsOrder = "desc"
)

type SessionNewParams

type SessionNewParams struct {
	EnvironmentVariables map[string]string `json:"environment_variables,omitzero"`

	// Agent identifier. Accepts the `agent` ID string, which pins the latest version
	// for the session, or an `agent` object with both id and version specified.
	Agent SessionNewParamsAgentUnion `json:"agent,omitzero" api:"required"`
	// ID of the `environment` defining the container configuration for this session.
	EnvironmentID string `json:"environment_id" api:"required"`
	// Human-readable session title.
	Title param.Opt[string] `json:"title,omitzero"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimitParam `json:"budget,omitzero"`
	// Initial events to send to the `session` at creation, processed in order.
	// Supports `user.message` and `user.define_outcome` events. Maximum 50 events.
	InitialEvents []SessionNewParamsInitialEventUnion `json:"initial_events,omitzero"`
	// Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up
	// to 64 chars, values up to 512 chars.
	Metadata map[string]string `json:"metadata,omitzero"`
	// Resources (e.g. repositories, files) to mount into the session's container.
	Resources []SessionNewParamsResourceUnion `json:"resources,omitzero"`
	// Vault IDs for stored credentials the agent can use during the session.
	VaultIDs []string `json:"vault_ids,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionNewParams) MarshalJSON

func (r SessionNewParams) MarshalJSON() (data []byte, err error)

func (*SessionNewParams) UnmarshalJSON

func (r *SessionNewParams) UnmarshalJSON(data []byte) error

type SessionNewParamsAgentUnion

type SessionNewParamsAgentUnion struct {
	OfString                           param.Opt[string]                      `json:",omitzero,inline"`
	OfManagedAgentsAgents              *ManagedAgentsAgentParams              `json:",omitzero,inline"`
	OfManagedAgentsAgentWithOverridess *ManagedAgentsAgentWithOverridesParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (SessionNewParamsAgentUnion) GetID

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetMCPServers

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetModel

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetSkills

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetSystem

func (u SessionNewParamsAgentUnion) GetSystem() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetTools

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetType

func (u SessionNewParamsAgentUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) GetVersion

func (u SessionNewParamsAgentUnion) GetVersion() *int64

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsAgentUnion) MarshalJSON

func (u SessionNewParamsAgentUnion) MarshalJSON() ([]byte, error)

func (*SessionNewParamsAgentUnion) UnmarshalJSON

func (u *SessionNewParamsAgentUnion) UnmarshalJSON(data []byte) error

type SessionNewParamsInitialEventUnion

type SessionNewParamsInitialEventUnion struct {
	OfUserMessage       *ManagedAgentsUserMessageEventParams       `json:",omitzero,inline"`
	OfUserDefineOutcome *ManagedAgentsUserDefineOutcomeEventParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (SessionNewParamsInitialEventUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsInitialEventUnion) GetDescription

func (u SessionNewParamsInitialEventUnion) GetDescription() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsInitialEventUnion) GetMaxIterations

func (u SessionNewParamsInitialEventUnion) GetMaxIterations() *int64

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsInitialEventUnion) GetRubric

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsInitialEventUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsInitialEventUnion) MarshalJSON

func (u SessionNewParamsInitialEventUnion) MarshalJSON() ([]byte, error)

func (*SessionNewParamsInitialEventUnion) UnmarshalJSON

func (u *SessionNewParamsInitialEventUnion) UnmarshalJSON(data []byte) error

type SessionNewParamsResourceUnion

type SessionNewParamsResourceUnion struct {
	OfGitHubRepository *ManagedAgentsGitHubRepositoryResourceParams `json:",omitzero,inline"`
	OfFile             *ManagedAgentsFileResourceParams             `json:",omitzero,inline"`
	OfMemoryStore      *ManagedAgentsMemoryStoreResourceParam       `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (SessionNewParamsResourceUnion) GetAccess

func (u SessionNewParamsResourceUnion) GetAccess() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetAuthorizationToken

func (u SessionNewParamsResourceUnion) GetAuthorizationToken() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetCheckout

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetFileID

func (u SessionNewParamsResourceUnion) GetFileID() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetInstructions

func (u SessionNewParamsResourceUnion) GetInstructions() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetMemoryStoreID

func (u SessionNewParamsResourceUnion) GetMemoryStoreID() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetMountPath

func (u SessionNewParamsResourceUnion) GetMountPath() *string

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) GetURL

Returns a pointer to the underlying variant's property, if present.

func (SessionNewParamsResourceUnion) MarshalJSON

func (u SessionNewParamsResourceUnion) MarshalJSON() ([]byte, error)

func (*SessionNewParamsResourceUnion) UnmarshalJSON

func (u *SessionNewParamsResourceUnion) UnmarshalJSON(data []byte) error

type SessionResourceAddParams

type SessionResourceAddParams struct {
	// Mount a file uploaded via the Files API into the session.
	ManagedAgentsFileResourceParams ManagedAgentsFileResourceParams
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionResourceAddParams) MarshalJSON

func (r SessionResourceAddParams) MarshalJSON() (data []byte, err error)

func (*SessionResourceAddParams) UnmarshalJSON

func (r *SessionResourceAddParams) UnmarshalJSON(data []byte) error

type SessionResourceDeleteParams

type SessionResourceDeleteParams struct {
	SessionID string `path:"session_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionResourceGetParams

type SessionResourceGetParams struct {
	SessionID string `path:"session_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionResourceGetResponseUnion

type SessionResourceGetResponseUnion struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	MountPath string    `json:"mount_path"`
	// Any of "github_repository", "file", "memory_store".
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updated_at"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResource].
	URL string `json:"url"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResource].
	Checkout ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:"checkout"`
	// This field is from variant [ManagedAgentsFileResource].
	FileID string `json:"file_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	MemoryStoreID string `json:"memory_store_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Access ManagedAgentsMemoryStoreResourceAccess `json:"access"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Instructions string `json:"instructions"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Name string `json:"name"`
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		MountPath     respjson.Field
		Type          respjson.Field
		UpdatedAt     respjson.Field
		URL           respjson.Field
		Checkout      respjson.Field
		FileID        respjson.Field
		MemoryStoreID respjson.Field
		Access        respjson.Field
		Description   respjson.Field
		Instructions  respjson.Field
		Name          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SessionResourceGetResponseUnion contains all possible properties and values from ManagedAgentsGitHubRepositoryResource, ManagedAgentsFileResource, ManagedAgentsMemoryStoreResource.

Use the SessionResourceGetResponseUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (SessionResourceGetResponseUnion) AsAny

func (u SessionResourceGetResponseUnion) AsAny() anySessionResourceGetResponse

Use the following switch statement to find the correct variant

switch variant := SessionResourceGetResponseUnion.AsAny().(type) {
case qoder.ManagedAgentsGitHubRepositoryResource:
case qoder.ManagedAgentsFileResource:
case qoder.ManagedAgentsMemoryStoreResource:
default:
  fmt.Errorf("no variant present")
}

func (SessionResourceGetResponseUnion) AsFile

func (SessionResourceGetResponseUnion) AsGitHubRepository

func (SessionResourceGetResponseUnion) AsMemoryStore

func (SessionResourceGetResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*SessionResourceGetResponseUnion) UnmarshalJSON

func (r *SessionResourceGetResponseUnion) UnmarshalJSON(data []byte) error

type SessionResourceListParams

type SessionResourceListParams struct {
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Maximum number of resources to return per page (max 1000). If omitted, returns
	// all resources.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque cursor from a previous response's `next_page` field.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionResourceListParams) URLQuery

func (r SessionResourceListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionResourceListParams's query parameters as `url.Values`.

type SessionResourceService

type SessionResourceService struct {
	Options []option.RequestOption
}

SessionResourceService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionResourceService method instead.

func NewSessionResourceService

func NewSessionResourceService(opts ...option.RequestOption) (r SessionResourceService)

NewSessionResourceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SessionResourceService) Add

Add Session Resource

func (*SessionResourceService) Delete

Delete Session Resource

func (*SessionResourceService) Get

Get Session Resource

func (*SessionResourceService) List

List Session Resources

func (*SessionResourceService) ListAutoPaging

List Session Resources

func (*SessionResourceService) Update

Update Session Resource

type SessionResourceUpdateParams

type SessionResourceUpdateParams struct {
	Password param.Opt[string] `json:"password,omitzero"`

	SessionID string `path:"session_id" api:"required" json:"-"`
	// New authorization token for the resource. Currently only `github_repository`
	// resources support token rotation.
	AuthorizationToken string `json:"authorization_token,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionResourceUpdateParams) MarshalJSON

func (r SessionResourceUpdateParams) MarshalJSON() (data []byte, err error)

func (*SessionResourceUpdateParams) UnmarshalJSON

func (r *SessionResourceUpdateParams) UnmarshalJSON(data []byte) error

type SessionResourceUpdateResponseUnion

type SessionResourceUpdateResponseUnion struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	MountPath string    `json:"mount_path"`
	// Any of "github_repository", "file", "memory_store".
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updated_at"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResource].
	URL string `json:"url"`
	// This field is from variant [ManagedAgentsGitHubRepositoryResource].
	Checkout ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:"checkout"`
	// This field is from variant [ManagedAgentsFileResource].
	FileID string `json:"file_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	MemoryStoreID string `json:"memory_store_id"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Access ManagedAgentsMemoryStoreResourceAccess `json:"access"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Description string `json:"description"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Instructions string `json:"instructions"`
	// This field is from variant [ManagedAgentsMemoryStoreResource].
	Name string `json:"name"`
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		MountPath     respjson.Field
		Type          respjson.Field
		UpdatedAt     respjson.Field
		URL           respjson.Field
		Checkout      respjson.Field
		FileID        respjson.Field
		MemoryStoreID respjson.Field
		Access        respjson.Field
		Description   respjson.Field
		Instructions  respjson.Field
		Name          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

SessionResourceUpdateResponseUnion contains all possible properties and values from ManagedAgentsGitHubRepositoryResource, ManagedAgentsFileResource, ManagedAgentsMemoryStoreResource.

Use the SessionResourceUpdateResponseUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (SessionResourceUpdateResponseUnion) AsAny

func (u SessionResourceUpdateResponseUnion) AsAny() anySessionResourceUpdateResponse

Use the following switch statement to find the correct variant

switch variant := SessionResourceUpdateResponseUnion.AsAny().(type) {
case qoder.ManagedAgentsGitHubRepositoryResource:
case qoder.ManagedAgentsFileResource:
case qoder.ManagedAgentsMemoryStoreResource:
default:
  fmt.Errorf("no variant present")
}

func (SessionResourceUpdateResponseUnion) AsFile

func (SessionResourceUpdateResponseUnion) AsGitHubRepository

func (SessionResourceUpdateResponseUnion) AsMemoryStore

func (SessionResourceUpdateResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*SessionResourceUpdateResponseUnion) UnmarshalJSON

func (r *SessionResourceUpdateResponseUnion) UnmarshalJSON(data []byte) error

type SessionService

type SessionService struct {
	Options   []option.RequestOption
	Events    SessionEventService
	Resources SessionResourceService
	Threads   SessionThreadService
}

SessionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionService method instead.

func NewSessionService

func NewSessionService(opts ...option.RequestOption) (r SessionService)

NewSessionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SessionService) Archive

func (r *SessionService) Archive(ctx context.Context, sessionID string, body SessionArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)

Archive Session

func (*SessionService) Cancel added in v0.3.0

func (r *SessionService) Cancel(ctx context.Context, sessionID string, params SessionCancelParams, opts ...option.RequestOption) (res *SessionCancelResponse, err error)

Cancel requests cancellation of the current turn (202); an idle session is a safe no-op (200).

func (*SessionService) Delete

func (r *SessionService) Delete(ctx context.Context, sessionID string, body SessionDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedSession, err error)

Delete Session

func (*SessionService) Get

func (r *SessionService) Get(ctx context.Context, sessionID string, query SessionGetParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)

Get Session

func (*SessionService) List

List Sessions

func (*SessionService) ListAutoPaging

List Sessions

func (*SessionService) New

Create Session

func (*SessionService) Update

func (r *SessionService) Update(ctx context.Context, sessionID string, params SessionUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)

Update Session

type SessionThreadArchiveParams

type SessionThreadArchiveParams struct {
	SessionID string `path:"session_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionThreadEventListParams

type SessionThreadEventListParams struct {
	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	SessionID string `path:"session_id" api:"required" json:"-"`
	// Query parameter for limit
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Query parameter for page
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionThreadEventListParams) URLQuery

func (r SessionThreadEventListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionThreadEventListParams's query parameters as `url.Values`.

type SessionThreadEventService

type SessionThreadEventService struct {
	Options []option.RequestOption
}

SessionThreadEventService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionThreadEventService method instead.

func NewSessionThreadEventService

func NewSessionThreadEventService(opts ...option.RequestOption) (r SessionThreadEventService)

NewSessionThreadEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SessionThreadEventService) List

List Session Thread Events

func (*SessionThreadEventService) ListAutoPaging

List Session Thread Events

func (*SessionThreadEventService) StreamEvents

Stream Session Thread Events

type SessionThreadEventStreamParams

type SessionThreadEventStreamParams struct {
	SessionID string `path:"session_id" api:"required" json:"-"`
	// When set, this connection also receives streaming deltas (`event_start`,
	// `event_delta`) while an event is being produced, before the event itself
	// arrives. Deltas are best-effort; when the final event is produced it carries the
	// complete content. A model request that ends early (an error or interrupt)
	// produces no final event — its terminal `span.model_request_end` closes the
	// preview. Accepts one or more event types to preview and may be repeated:
	// `agent.message` streams `content_delta` fragments; `agent.thinking` is
	// start-only — a signal that the agent has begun extended thinking, concluded by
	// the `agent.thinking` event itself. Only previews of the requested event types
	// are sent.
	EventDeltas []ManagedAgentsDeltaType `query:"event_deltas,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionThreadEventStreamParams) URLQuery

func (r SessionThreadEventStreamParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionThreadEventStreamParams's query parameters as `url.Values`.

type SessionThreadGetParams

type SessionThreadGetParams struct {
	SessionID string `path:"session_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SessionThreadListParams

type SessionThreadListParams struct {
	// Maximum results per page. Defaults to 1000.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination cursor from a previous response's `next_page`. Forward-only.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionThreadListParams) URLQuery

func (r SessionThreadListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SessionThreadListParams's query parameters as `url.Values`.

type SessionThreadService

type SessionThreadService struct {
	Options []option.RequestOption
	Events  SessionThreadEventService
}

SessionThreadService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSessionThreadService method instead.

func NewSessionThreadService

func NewSessionThreadService(opts ...option.RequestOption) (r SessionThreadService)

NewSessionThreadService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SessionThreadService) Archive

Archive Session Thread

func (*SessionThreadService) Get

Get Session Thread

func (*SessionThreadService) List

List Session Threads

func (*SessionThreadService) ListAutoPaging

List Session Threads

type SessionUpdateParams

type SessionUpdateParams struct {
	EnvironmentVariables map[string]string `json:"environment_variables,omitzero"`

	// Human-readable session title.
	Title param.Opt[string] `json:"title,omitzero"`
	// Metadata patch. Set a key to a string to upsert it, or to null to delete it.
	// Omit the field to preserve.
	Metadata map[string]any `json:"metadata,omitzero"`
	// Mid-session agent configuration update. Only `tools` and `mcp_servers` are
	// updatable. Full replacement: the provided array becomes the new value. To
	// preserve existing entries, GET the session, modify the array, and POST it back.
	Agent ManagedAgentsSessionAgentUpdateParam `json:"agent,omitzero"`
	// A total model and sandbox credit limit. Once reached, new user messages are
	// rejected; an already running turn continues to completion.
	Budget ManagedAgentsBudgetLimitParam `json:"budget,omitzero"`
	// Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests
	// setting this field are rejected. Reserved for future use.
	VaultIDs []string `json:"vault_ids,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SessionUpdateParams) MarshalJSON

func (r SessionUpdateParams) MarshalJSON() (data []byte, err error)

func (*SessionUpdateParams) UnmarshalJSON

func (r *SessionUpdateParams) UnmarshalJSON(data []byte) error

type SessionWorkData

type SessionWorkData struct {
	// Session identifier (e.g., 'session\_...')
	ID string `json:"id" api:"required"`
	// Type of work data
	Type constant.Session `json:"type" default:"session"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Work data for session work items.

This resource type is used when work represents a session that needs to be executed in a self-hosted environment.

func (SessionWorkData) RawJSON

func (r SessionWorkData) RawJSON() string

Returns the unmodified JSON received from the API

func (*SessionWorkData) UnmarshalJSON

func (r *SessionWorkData) UnmarshalJSON(data []byte) error

type Skill

type Skill struct {
	Metadata map[string]string `json:"metadata"`

	// Unique identifier for the skill.
	//
	// The format and length of IDs may change over time.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the skill was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Human-readable, single-line label for the Skill. Maximum 255 characters. Always
	// set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
	// unique.
	DisplayName string `json:"display_title" api:"required"`
	// ID of the newest Skill Version — what `latest` references resolve to. Always
	// set: a Skill holds at least one version.
	LatestVersionID string `json:"latest_version" api:"required"`
	// Where the Skill comes from.
	//
	// Possible values:
	//
	// - `"custom"`: authored by the platform user; private to their workspace
	// - `"qoder"`: published by Qoder; shared and read-only
	// - `"qoder_example"`: Qoder-published sample Skill
	// - `"plugin"`: resolved from an installed plugin
	Source SkillSource `json:"source" api:"required"`
	// Object type.
	//
	// For Skills, this is always `"skill"`.
	Type constant.Skill `json:"type" default:"skill"`
	// ISO 8601 timestamp of when the skill was last updated.
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Metadata respjson.Field

		ID              respjson.Field
		CreatedAt       respjson.Field
		DisplayName     respjson.Field
		LatestVersionID respjson.Field
		Source          respjson.Field
		Type            respjson.Field
		UpdatedAt       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Skill) RawJSON

func (r Skill) RawJSON() string

Returns the unmodified JSON received from the API

func (*Skill) UnmarshalJSON

func (r *Skill) UnmarshalJSON(data []byte) error

type SkillDeleteParams

type SkillDeleteParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SkillGetParams

type SkillGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SkillListParams

type SkillListParams struct {
	DisplayName param.Opt[string] `query:"display_title,omitzero" json:"-"`

	Name param.Opt[string] `query:"name,omitzero" json:"-"`

	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Pagination token for fetching a specific page of results.
	//
	// Pass the value from a previous response's `next_page` field to get the next page
	// of results.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Filter skills by source.
	//
	// If provided, only skills from the specified source will be returned:
	//
	// - `"custom"`: only return user-created skills
	// - `"qoder"`: only return Qoder-created skills
	Source param.Opt[string] `query:"source,omitzero" json:"-"`
	// Number of results to return per page.
	//
	// Ranges from `1` to `1000`. Defaults to `20`.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SkillListParams) URLQuery

func (r SkillListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SkillListParams's query parameters as `url.Values`.

type SkillNewParams

type SkillNewParams struct {
	Metadata map[string]string `json:"metadata,omitzero" api:"metadata"`

	// Files to upload for the skill.
	//
	// All files must be in the same top-level directory and must include a SKILL.md
	// file at the root of that directory.
	Files []io.Reader `json:"files,omitzero" api:"required" format:"binary"`
	// Human-readable, single-line label for the Skill. Maximum 255 characters. Always
	// set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
	// unique.
	DisplayName param.Opt[string] `json:"display_title,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SkillNewParams) MarshalMultipart

func (r SkillNewParams) MarshalMultipart() (data []byte, contentType string, err error)

type SkillService

type SkillService struct {
	Options  []option.RequestOption
	Versions SkillVersionService
}

SkillService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSkillService method instead.

func NewSkillService

func NewSkillService(opts ...option.RequestOption) (r SkillService)

NewSkillService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SkillService) Delete

func (r *SkillService) Delete(ctx context.Context, skillID string, body SkillDeleteParams, opts ...option.RequestOption) (res *DeletedSkill, err error)

Delete Skill

func (*SkillService) Get

func (r *SkillService) Get(ctx context.Context, skillID string, query SkillGetParams, opts ...option.RequestOption) (res *Skill, err error)

Get Skill

func (*SkillService) List

func (r *SkillService) List(ctx context.Context, params SkillListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Skill], err error)

List Skills

func (*SkillService) ListAutoPaging

List Skills

func (*SkillService) New

func (r *SkillService) New(ctx context.Context, params SkillNewParams, opts ...option.RequestOption) (res *Skill, err error)

Create Skill

type SkillSource

type SkillSource struct {
	// Where the Skill comes from.
	//
	// Possible values:
	//
	// - `"custom"`: authored by the platform user; private to their workspace
	// - `"qoder"`: published by Qoder; shared and read-only
	// - `"qoder_example"`: Qoder-published sample Skill
	// - `"plugin"`: resolved from an installed plugin
	//
	// Any of "custom", "qoder", "qoder_example", "plugin".
	Type SkillSourceType `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SkillSource) RawJSON

func (r SkillSource) RawJSON() string

Returns the unmodified JSON received from the API

func (*SkillSource) UnmarshalJSON

func (r *SkillSource) UnmarshalJSON(data []byte) error

type SkillSourceType

type SkillSourceType string

Where the Skill comes from.

Possible values:

- `"custom"`: authored by the platform user; private to their workspace - `"qoder"`: published by Qoder; shared and read-only - `"qoder_example"`: Qoder-published sample Skill - `"plugin"`: resolved from an installed plugin

const (
	SkillSourceTypeCustom       SkillSourceType = "custom"
	SkillSourceTypeQoder        SkillSourceType = "qoder"
	SkillSourceTypeQoderExample SkillSourceType = "qoder_example"
	SkillSourceTypePlugin       SkillSourceType = "plugin"
)

type SkillVersion

type SkillVersion struct {
	Version   string `json:"version"`
	Directory string `json:"directory"`

	// Unique identifier for this Skill Version. The id addresses the version in paths
	// and pins it in references.
	ID string `json:"id" api:"required"`
	// ISO 8601 timestamp of when the skill was created.
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Description of the skill version.
	//
	// This is extracted from the SKILL.md file in the skill upload.
	Description string `json:"description" api:"required"`
	// The Skill's immutable kebab-case slug, set at creation from the first upload's
	// SKILL.md frontmatter `name` (or its enclosing directory). Every later upload
	// must resolve to the same value. Also the top-level directory of the Skill's
	// mounted files and the base name of a downloaded archive.
	Name string `json:"name" api:"required"`
	// Unique identifier for the skill.
	//
	// The format and length of IDs may change over time.
	SkillID string `json:"skill_id" api:"required"`
	// Object type.
	//
	// For Skill Versions, this is always `"skill_version"`.
	Type constant.SkillVersion `json:"type" default:"skill_version"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Version   respjson.Field
		Directory respjson.Field

		ID          respjson.Field
		CreatedAt   respjson.Field
		Description respjson.Field
		Name        respjson.Field
		SkillID     respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SkillVersion) RawJSON

func (r SkillVersion) RawJSON() string

Returns the unmodified JSON received from the API

func (*SkillVersion) UnmarshalJSON

func (r *SkillVersion) UnmarshalJSON(data []byte) error

type SkillVersionDeleteParams

type SkillVersionDeleteParams struct {
	// Unique identifier for the skill.
	//
	// The format and length of IDs may change over time.
	SkillID string `path:"skill_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SkillVersionDownloadParams

type SkillVersionDownloadParams struct {
	// Unique identifier for the skill.
	//
	// The format and length of IDs may change over time.
	SkillID string `path:"skill_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SkillVersionGetParams

type SkillVersionGetParams struct {
	// Unique identifier for the skill.
	//
	// The format and length of IDs may change over time.
	SkillID string `path:"skill_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type SkillVersionListParams

type SkillVersionListParams struct {
	// Number of results to return per page.
	//
	// Ranges from `1` to `1000`. Defaults to `20`.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optionally set to the `next_page` token from the previous response.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SkillVersionListParams) URLQuery

func (r SkillVersionListParams) URLQuery() (v url.Values, err error)

URLQuery serializes SkillVersionListParams's query parameters as `url.Values`.

type SkillVersionNewParams

type SkillVersionNewParams struct {
	// Files to upload for the skill.
	//
	// All files must be in the same top-level directory and must include a SKILL.md
	// file at the root of that directory.
	Files []io.Reader `json:"files,omitzero" api:"required" format:"binary"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SkillVersionNewParams) MarshalMultipart

func (r SkillVersionNewParams) MarshalMultipart() (data []byte, contentType string, err error)

type SkillVersionService

type SkillVersionService struct {
	Options []option.RequestOption
}

SkillVersionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSkillVersionService method instead.

func NewSkillVersionService

func NewSkillVersionService(opts ...option.RequestOption) (r SkillVersionService)

NewSkillVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SkillVersionService) Delete

Delete Skill Version

func (*SkillVersionService) Download

func (r *SkillVersionService) Download(ctx context.Context, version string, params SkillVersionDownloadParams, opts ...option.RequestOption) (res *http.Response, err error)

Download a skill version's content as a zip archive.

func (*SkillVersionService) Get

func (r *SkillVersionService) Get(ctx context.Context, version string, params SkillVersionGetParams, opts ...option.RequestOption) (res *SkillVersion, err error)

Get Skill Version

func (*SkillVersionService) List

List Skill Versions

func (*SkillVersionService) ListAutoPaging

List Skill Versions

func (*SkillVersionService) New

func (r *SkillVersionService) New(ctx context.Context, skillID string, params SkillVersionNewParams, opts ...option.RequestOption) (res *SkillVersion, err error)

Create Skill Version

type TextBlockParam

type TextBlockParam struct {
	Text      string                   `json:"text" api:"required"`
	Citations []TextCitationParamUnion `json:"citations,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "text".
	Type constant.Text `json:"type" default:"text"`
	// contains filtered or unexported fields
}

The properties Text, Type are required.

func (TextBlockParam) MarshalJSON

func (r TextBlockParam) MarshalJSON() (data []byte, err error)

func (*TextBlockParam) UnmarshalJSON

func (r *TextBlockParam) UnmarshalJSON(data []byte) error

type TextCitationParamUnion

type TextCitationParamUnion struct {
	OfCharLocation            *CitationCharLocationParam            `json:",omitzero,inline"`
	OfPageLocation            *CitationPageLocationParam            `json:",omitzero,inline"`
	OfContentBlockLocation    *CitationContentBlockLocationParam    `json:",omitzero,inline"`
	OfWebSearchResultLocation *CitationWebSearchResultLocationParam `json:",omitzero,inline"`
	OfSearchResultLocation    *CitationSearchResultLocationParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (TextCitationParamUnion) GetCitedText

func (u TextCitationParamUnion) GetCitedText() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetDocumentIndex

func (u TextCitationParamUnion) GetDocumentIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetDocumentTitle

func (u TextCitationParamUnion) GetDocumentTitle() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetEncryptedIndex

func (u TextCitationParamUnion) GetEncryptedIndex() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetEndBlockIndex

func (u TextCitationParamUnion) GetEndBlockIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetEndCharIndex

func (u TextCitationParamUnion) GetEndCharIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetEndPageNumber

func (u TextCitationParamUnion) GetEndPageNumber() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetSearchResultIndex

func (u TextCitationParamUnion) GetSearchResultIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetSource

func (u TextCitationParamUnion) GetSource() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetStartBlockIndex

func (u TextCitationParamUnion) GetStartBlockIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetStartCharIndex

func (u TextCitationParamUnion) GetStartCharIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetStartPageNumber

func (u TextCitationParamUnion) GetStartPageNumber() *int64

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetTitle

func (u TextCitationParamUnion) GetTitle() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetType

func (u TextCitationParamUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) GetURL

func (u TextCitationParamUnion) GetURL() *string

Returns a pointer to the underlying variant's property, if present.

func (TextCitationParamUnion) MarshalJSON

func (u TextCitationParamUnion) MarshalJSON() ([]byte, error)

func (*TextCitationParamUnion) UnmarshalJSON

func (u *TextCitationParamUnion) UnmarshalJSON(data []byte) error

type TextEditorCodeExecutionCreateResultBlockParam

type TextEditorCodeExecutionCreateResultBlockParam struct {
	IsFileUpdate bool `json:"is_file_update" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "text_editor_code_execution_create_result".
	Type constant.TextEditorCodeExecutionCreateResult `json:"type" default:"text_editor_code_execution_create_result"`
	// contains filtered or unexported fields
}

The properties IsFileUpdate, Type are required.

func (TextEditorCodeExecutionCreateResultBlockParam) MarshalJSON

func (r TextEditorCodeExecutionCreateResultBlockParam) MarshalJSON() (data []byte, err error)

func (*TextEditorCodeExecutionCreateResultBlockParam) UnmarshalJSON

func (r *TextEditorCodeExecutionCreateResultBlockParam) UnmarshalJSON(data []byte) error

type TextEditorCodeExecutionStrReplaceResultBlockParam

type TextEditorCodeExecutionStrReplaceResultBlockParam struct {
	NewLines param.Opt[int64] `json:"new_lines,omitzero"`
	NewStart param.Opt[int64] `json:"new_start,omitzero"`
	OldLines param.Opt[int64] `json:"old_lines,omitzero"`
	OldStart param.Opt[int64] `json:"old_start,omitzero"`
	Lines    []string         `json:"lines,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "text_editor_code_execution_str_replace_result".
	Type constant.TextEditorCodeExecutionStrReplaceResult `json:"type" default:"text_editor_code_execution_str_replace_result"`
	// contains filtered or unexported fields
}

The property Type is required.

func (TextEditorCodeExecutionStrReplaceResultBlockParam) MarshalJSON

func (r TextEditorCodeExecutionStrReplaceResultBlockParam) MarshalJSON() (data []byte, err error)

func (*TextEditorCodeExecutionStrReplaceResultBlockParam) UnmarshalJSON

type TextEditorCodeExecutionToolResultBlockParam

type TextEditorCodeExecutionToolResultBlockParam struct {
	Content   TextEditorCodeExecutionToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                                  `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "text_editor_code_execution_tool_result".
	Type constant.TextEditorCodeExecutionToolResult `json:"type" default:"text_editor_code_execution_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (TextEditorCodeExecutionToolResultBlockParam) MarshalJSON

func (r TextEditorCodeExecutionToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*TextEditorCodeExecutionToolResultBlockParam) UnmarshalJSON

func (r *TextEditorCodeExecutionToolResultBlockParam) UnmarshalJSON(data []byte) error

type TextEditorCodeExecutionToolResultBlockParamContentUnion

type TextEditorCodeExecutionToolResultBlockParamContentUnion struct {
	OfRequestTextEditorCodeExecutionToolResultError       *TextEditorCodeExecutionToolResultErrorParam       `json:",omitzero,inline"`
	OfRequestTextEditorCodeExecutionViewResultBlock       *TextEditorCodeExecutionViewResultBlockParam       `json:",omitzero,inline"`
	OfRequestTextEditorCodeExecutionCreateResultBlock     *TextEditorCodeExecutionCreateResultBlockParam     `json:",omitzero,inline"`
	OfRequestTextEditorCodeExecutionStrReplaceResultBlock *TextEditorCodeExecutionStrReplaceResultBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetErrorCode

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetErrorMessage

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetFileType

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetIsFileUpdate

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetLines

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetNewLines

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetNewStart

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetNumLines

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetOldLines

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetOldStart

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetStartLine

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetTotalLines

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (TextEditorCodeExecutionToolResultBlockParamContentUnion) MarshalJSON

func (*TextEditorCodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON

type TextEditorCodeExecutionToolResultErrorParam

type TextEditorCodeExecutionToolResultErrorParam struct {
	// Any of "invalid_tool_input", "unavailable", "too_many_requests",
	// "execution_time_exceeded", "file_not_found".
	ErrorCode    TextEditorCodeExecutionToolResultErrorParamErrorCode `json:"error_code,omitzero" api:"required"`
	ErrorMessage param.Opt[string]                                    `json:"error_message,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "text_editor_code_execution_tool_result_error".
	Type constant.TextEditorCodeExecutionToolResultError `json:"type" default:"text_editor_code_execution_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (TextEditorCodeExecutionToolResultErrorParam) MarshalJSON

func (r TextEditorCodeExecutionToolResultErrorParam) MarshalJSON() (data []byte, err error)

func (*TextEditorCodeExecutionToolResultErrorParam) UnmarshalJSON

func (r *TextEditorCodeExecutionToolResultErrorParam) UnmarshalJSON(data []byte) error

type TextEditorCodeExecutionToolResultErrorParamErrorCode

type TextEditorCodeExecutionToolResultErrorParamErrorCode string

type TextEditorCodeExecutionViewResultBlockParam

type TextEditorCodeExecutionViewResultBlockParam struct {
	Content string `json:"content" api:"required"`
	// Any of "text", "image", "pdf".
	FileType   TextEditorCodeExecutionViewResultBlockParamFileType `json:"file_type,omitzero" api:"required"`
	NumLines   param.Opt[int64]                                    `json:"num_lines,omitzero"`
	StartLine  param.Opt[int64]                                    `json:"start_line,omitzero"`
	TotalLines param.Opt[int64]                                    `json:"total_lines,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "text_editor_code_execution_view_result".
	Type constant.TextEditorCodeExecutionViewResult `json:"type" default:"text_editor_code_execution_view_result"`
	// contains filtered or unexported fields
}

The properties Content, FileType, Type are required.

func (TextEditorCodeExecutionViewResultBlockParam) MarshalJSON

func (r TextEditorCodeExecutionViewResultBlockParam) MarshalJSON() (data []byte, err error)

func (*TextEditorCodeExecutionViewResultBlockParam) UnmarshalJSON

func (r *TextEditorCodeExecutionViewResultBlockParam) UnmarshalJSON(data []byte) error

type TextEditorCodeExecutionViewResultBlockParamFileType

type TextEditorCodeExecutionViewResultBlockParamFileType string

type ThinkingBlockParam

type ThinkingBlockParam struct {
	// The `signature` value of this thinking block, exactly as returned by the API in
	// a previous response. Used to verify that the block was generated by the model.
	//
	// Thinking blocks must be passed back unmodified and in their original order; a
	// modified block results in a 400 `invalid_request_error`.
	Signature string `json:"signature" api:"required"`
	// The `thinking` text of this block as returned by the API.
	Thinking string `json:"thinking" api:"required"`
	// This field can be elided, and will marshal its zero value as "thinking".
	Type constant.Thinking `json:"type" default:"thinking"`
	// contains filtered or unexported fields
}

The properties Signature, Thinking, Type are required.

func (ThinkingBlockParam) MarshalJSON

func (r ThinkingBlockParam) MarshalJSON() (data []byte, err error)

func (*ThinkingBlockParam) UnmarshalJSON

func (r *ThinkingBlockParam) UnmarshalJSON(data []byte) error

type ThinkingCapability

type ThinkingCapability struct {
	// Whether this capability is supported by the model.
	Supported bool `json:"supported" api:"required"`
	// Supported thinking type configurations.
	Types ThinkingTypes `json:"types" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Supported   respjson.Field
		Types       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Thinking capability details.

func (ThinkingCapability) RawJSON

func (r ThinkingCapability) RawJSON() string

Returns the unmodified JSON received from the API

func (*ThinkingCapability) UnmarshalJSON

func (r *ThinkingCapability) UnmarshalJSON(data []byte) error

type ThinkingTypes

type ThinkingTypes struct {
	// Whether the model supports thinking with type 'adaptive' (auto).
	Adaptive CapabilitySupport `json:"adaptive" api:"required"`
	// Whether the model supports thinking with type 'enabled'.
	Enabled CapabilitySupport `json:"enabled" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Adaptive    respjson.Field
		Enabled     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Supported thinking type configurations.

func (ThinkingTypes) RawJSON

func (r ThinkingTypes) RawJSON() string

Returns the unmodified JSON received from the API

func (*ThinkingTypes) UnmarshalJSON

func (r *ThinkingTypes) UnmarshalJSON(data []byte) error

type ToolChangeMCPToolReferenceParam

type ToolChangeMCPToolReferenceParam struct {
	Name       string `json:"name" api:"required"`
	ServerName string `json:"server_name" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_tool_reference".
	Type constant.MCPToolReference `json:"type" default:"mcp_tool_reference"`
	// contains filtered or unexported fields
}

Reference to a single MCP tool by its server and remote name — the same `server_name`/`name` pair `mcp_tool_use` carries.

The properties Name, ServerName, Type are required.

func (ToolChangeMCPToolReferenceParam) MarshalJSON

func (r ToolChangeMCPToolReferenceParam) MarshalJSON() (data []byte, err error)

func (*ToolChangeMCPToolReferenceParam) UnmarshalJSON

func (r *ToolChangeMCPToolReferenceParam) UnmarshalJSON(data []byte) error

type ToolChangeMCPToolsetReferenceParam

type ToolChangeMCPToolsetReferenceParam struct {
	ServerName string `json:"server_name" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_toolset_reference".
	Type constant.MCPToolsetReference `json:"type" default:"mcp_toolset_reference"`
	// contains filtered or unexported fields
}

Reference to every tool in the named MCP server's toolset.

The properties ServerName, Type are required.

func (ToolChangeMCPToolsetReferenceParam) MarshalJSON

func (r ToolChangeMCPToolsetReferenceParam) MarshalJSON() (data []byte, err error)

func (*ToolChangeMCPToolsetReferenceParam) UnmarshalJSON

func (r *ToolChangeMCPToolsetReferenceParam) UnmarshalJSON(data []byte) error

type ToolChangeToolReferenceParam

type ToolChangeToolReferenceParam struct {
	Name string `json:"name" api:"required"`
	// This field can be elided, and will marshal its zero value as "tool_reference".
	Type constant.ToolReference `json:"type" default:"tool_reference"`
	// contains filtered or unexported fields
}

Reference to a single tool the caller declared directly in `tools[]`. Does not accept the composed `{server}_{name}` form the server assigns to MCP-resolved tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.

The properties Name, Type are required.

func (ToolChangeToolReferenceParam) MarshalJSON

func (r ToolChangeToolReferenceParam) MarshalJSON() (data []byte, err error)

func (*ToolChangeToolReferenceParam) UnmarshalJSON

func (r *ToolChangeToolReferenceParam) UnmarshalJSON(data []byte) error

type ToolReferenceBlockParam

type ToolReferenceBlockParam struct {
	ToolName string `json:"tool_name" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as "tool_reference".
	Type constant.ToolReference `json:"type" default:"tool_reference"`
	// contains filtered or unexported fields
}

Tool reference block that can be included in tool_result content.

The properties ToolName, Type are required.

func (ToolReferenceBlockParam) MarshalJSON

func (r ToolReferenceBlockParam) MarshalJSON() (data []byte, err error)

func (*ToolReferenceBlockParam) UnmarshalJSON

func (r *ToolReferenceBlockParam) UnmarshalJSON(data []byte) error

type ToolResultBlockParam

type ToolResultBlockParam struct {
	ToolUseID string `json:"tool_use_id" api:"required"`
	// For a toolset member tool_result, the toolset family of the paired tool_use.
	ToolsetName param.Opt[string] `json:"toolset_name,omitzero"`
	IsError     param.Opt[bool]   `json:"is_error,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam         `json:"cache_control,omitzero"`
	Content      []ToolResultBlockParamContentUnion `json:"content,omitzero"`
	// This field can be elided, and will marshal its zero value as "tool_result".
	Type constant.ToolResult `json:"type" default:"tool_result"`
	// contains filtered or unexported fields
}

The properties ToolUseID, Type are required.

func (ToolResultBlockParam) MarshalJSON

func (r ToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*ToolResultBlockParam) UnmarshalJSON

func (r *ToolResultBlockParam) UnmarshalJSON(data []byte) error

type ToolResultBlockParamContentUnion

type ToolResultBlockParamContentUnion struct {
	OfText          *TextBlockParam            `json:",omitzero,inline"`
	OfImage         *ImageBlockParam           `json:",omitzero,inline"`
	OfSearchResult  *SearchResultBlockParam    `json:",omitzero,inline"`
	OfDocument      *RequestDocumentBlockParam `json:",omitzero,inline"`
	OfToolReference *ToolReferenceBlockParam   `json:",omitzero,inline"`
	OfBrowserState  *BrowserStateBlockParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ToolResultBlockParamContentUnion) GetCacheControl

Returns a pointer to the underlying variant's CacheControl property, if present.

func (ToolResultBlockParamContentUnion) GetCitations

func (u ToolResultBlockParamContentUnion) GetCitations() (res toolResultBlockParamContentUnionCitations)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ToolResultBlockParamContentUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetContext

func (u ToolResultBlockParamContentUnion) GetContext() *string

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetSource

func (u ToolResultBlockParamContentUnion) GetSource() (res toolResultBlockParamContentUnionSource)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (ToolResultBlockParamContentUnion) GetStateChanges

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetTabs

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetTitle

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetToolName

func (u ToolResultBlockParamContentUnion) GetToolName() *string

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetTransformations

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ToolResultBlockParamContentUnion) MarshalJSON

func (u ToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)

func (*ToolResultBlockParamContentUnion) UnmarshalJSON

func (u *ToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type ToolSearchToolResultBlockParam

type ToolSearchToolResultBlockParam struct {
	Content   ToolSearchToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                     `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "tool_search_tool_result".
	Type constant.ToolSearchToolResult `json:"type" default:"tool_search_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (ToolSearchToolResultBlockParam) MarshalJSON

func (r ToolSearchToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*ToolSearchToolResultBlockParam) UnmarshalJSON

func (r *ToolSearchToolResultBlockParam) UnmarshalJSON(data []byte) error

type ToolSearchToolResultBlockParamContentUnion

type ToolSearchToolResultBlockParamContentUnion struct {
	OfRequestToolSearchToolResultError       *ToolSearchToolResultErrorParam       `json:",omitzero,inline"`
	OfRequestToolSearchToolSearchResultBlock *ToolSearchToolSearchResultBlockParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ToolSearchToolResultBlockParamContentUnion) GetErrorCode

Returns a pointer to the underlying variant's property, if present.

func (ToolSearchToolResultBlockParamContentUnion) GetErrorMessage

Returns a pointer to the underlying variant's property, if present.

func (ToolSearchToolResultBlockParamContentUnion) GetToolReferences

Returns a pointer to the underlying variant's property, if present.

func (ToolSearchToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ToolSearchToolResultBlockParamContentUnion) MarshalJSON

func (*ToolSearchToolResultBlockParamContentUnion) UnmarshalJSON

func (u *ToolSearchToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type ToolSearchToolResultErrorParam

type ToolSearchToolResultErrorParam struct {
	// Any of "invalid_tool_input", "unavailable", "too_many_requests",
	// "execution_time_exceeded".
	ErrorCode    ToolSearchToolResultErrorParamErrorCode `json:"error_code,omitzero" api:"required"`
	ErrorMessage param.Opt[string]                       `json:"error_message,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "tool_search_tool_result_error".
	Type constant.ToolSearchToolResultError `json:"type" default:"tool_search_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (ToolSearchToolResultErrorParam) MarshalJSON

func (r ToolSearchToolResultErrorParam) MarshalJSON() (data []byte, err error)

func (*ToolSearchToolResultErrorParam) UnmarshalJSON

func (r *ToolSearchToolResultErrorParam) UnmarshalJSON(data []byte) error

type ToolSearchToolResultErrorParamErrorCode

type ToolSearchToolResultErrorParamErrorCode string

type ToolSearchToolSearchResultBlockParam

type ToolSearchToolSearchResultBlockParam struct {
	ToolReferences []ToolReferenceBlockParam `json:"tool_references,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "tool_search_tool_search_result".
	Type constant.ToolSearchToolSearchResult `json:"type" default:"tool_search_tool_search_result"`
	// contains filtered or unexported fields
}

The properties ToolReferences, Type are required.

func (ToolSearchToolSearchResultBlockParam) MarshalJSON

func (r ToolSearchToolSearchResultBlockParam) MarshalJSON() (data []byte, err error)

func (*ToolSearchToolSearchResultBlockParam) UnmarshalJSON

func (r *ToolSearchToolSearchResultBlockParam) UnmarshalJSON(data []byte) error

type ToolUseBlockParam

type ToolUseBlockParam struct {
	ID    string `json:"id" api:"required"`
	Input any    `json:"input,omitzero" api:"required"`
	Name  string `json:"name" api:"required"`
	// For a toolset member tool_use, the toolset family this member belongs to.
	ToolsetName param.Opt[string] `json:"toolset_name,omitzero"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// Tool invocation directly from the model.
	Caller ToolUseBlockParamCallerUnion `json:"caller,omitzero"`
	// This field can be elided, and will marshal its zero value as "tool_use".
	Type constant.ToolUse `json:"type" default:"tool_use"`
	// contains filtered or unexported fields
}

The properties ID, Input, Name, Type are required.

func (ToolUseBlockParam) MarshalJSON

func (r ToolUseBlockParam) MarshalJSON() (data []byte, err error)

func (*ToolUseBlockParam) UnmarshalJSON

func (r *ToolUseBlockParam) UnmarshalJSON(data []byte) error

type ToolUseBlockParamCallerUnion

type ToolUseBlockParamCallerUnion struct {
	OfDirect                *DirectCallerParam             `json:",omitzero,inline"`
	OfCodeExecution20250825 *ServerToolCallerParam         `json:",omitzero,inline"`
	OfCodeExecution20260120 *ServerToolCaller20260120Param `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ToolUseBlockParamCallerUnion) GetToolID

func (u ToolUseBlockParamCallerUnion) GetToolID() *string

Returns a pointer to the underlying variant's property, if present.

func (ToolUseBlockParamCallerUnion) GetType

func (u ToolUseBlockParamCallerUnion) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (ToolUseBlockParamCallerUnion) MarshalJSON

func (u ToolUseBlockParamCallerUnion) MarshalJSON() ([]byte, error)

func (*ToolUseBlockParamCallerUnion) UnmarshalJSON

func (u *ToolUseBlockParamCallerUnion) UnmarshalJSON(data []byte) error

type URLImageSourceParam

type URLImageSourceParam struct {
	URL string `json:"url" api:"required"`
	// This field can be elided, and will marshal its zero value as "url".
	Type constant.URL `json:"type" default:"url"`
	// contains filtered or unexported fields
}

The properties Type, URL are required.

func (URLImageSourceParam) MarshalJSON

func (r URLImageSourceParam) MarshalJSON() (data []byte, err error)

func (*URLImageSourceParam) UnmarshalJSON

func (r *URLImageSourceParam) UnmarshalJSON(data []byte) error

type URLPDFSourceParam

type URLPDFSourceParam struct {
	URL string `json:"url" api:"required"`
	// This field can be elided, and will marshal its zero value as "url".
	Type constant.URL `json:"type" default:"url"`
	// contains filtered or unexported fields
}

The properties Type, URL are required.

func (URLPDFSourceParam) MarshalJSON

func (r URLPDFSourceParam) MarshalJSON() (data []byte, err error)

func (*URLPDFSourceParam) UnmarshalJSON

func (r *URLPDFSourceParam) UnmarshalJSON(data []byte) error

type UnrestrictedNetwork

type UnrestrictedNetwork struct {
	// Network policy type
	Type constant.Unrestricted `json:"type" default:"unrestricted"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Unrestricted network access.

func (UnrestrictedNetwork) RawJSON

func (r UnrestrictedNetwork) RawJSON() string

Returns the unmodified JSON received from the API

func (UnrestrictedNetwork) ToParam

ToParam converts this UnrestrictedNetwork to a UnrestrictedNetworkParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UnrestrictedNetworkParam.Overrides()

func (*UnrestrictedNetwork) UnmarshalJSON

func (r *UnrestrictedNetwork) UnmarshalJSON(data []byte) error

type UnrestrictedNetworkParam

type UnrestrictedNetworkParam struct {
	// Network policy type
	Type constant.Unrestricted `json:"type" default:"unrestricted"`
	// contains filtered or unexported fields
}

Unrestricted network access.

This struct has a constant value, construct it with NewUnrestrictedNetworkParam.

func NewUnrestrictedNetworkParam

func NewUnrestrictedNetworkParam() UnrestrictedNetworkParam

func (UnrestrictedNetworkParam) MarshalJSON

func (r UnrestrictedNetworkParam) MarshalJSON() (data []byte, err error)

func (*UnrestrictedNetworkParam) UnmarshalJSON

func (r *UnrestrictedNetworkParam) UnmarshalJSON(data []byte) error

type VaultArchiveParams

type VaultArchiveParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultCredentialArchiveParams

type VaultCredentialArchiveParams struct {
	VaultID string `path:"vault_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultCredentialDeleteParams

type VaultCredentialDeleteParams struct {
	VaultID string `path:"vault_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultCredentialGetParams

type VaultCredentialGetParams struct {
	VaultID string `path:"vault_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultCredentialListParams

type VaultCredentialListParams struct {
	Name param.Opt[string] `query:"name,omitzero" json:"-"`

	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Whether to include archived credentials in the results.
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum number of credentials to return per page. Defaults to 20, maximum 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination token from a previous `list_credentials` response.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VaultCredentialListParams) URLQuery

func (r VaultCredentialListParams) URLQuery() (v url.Values, err error)

URLQuery serializes VaultCredentialListParams's query parameters as `url.Values`.

type VaultCredentialMCPOAuthValidateParams

type VaultCredentialMCPOAuthValidateParams struct {
	VaultID string `path:"vault_id" api:"required" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultCredentialNewParams

type VaultCredentialNewParams struct {
	// Authentication details for creating a credential.
	Auth VaultCredentialNewParamsAuthUnion `json:"auth,omitzero" api:"required"`
	// Human-readable name for the credential. Up to 255 characters.
	DisplayName param.Opt[string] `json:"display_name,omitzero"`
	// Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys
	// up to 64 chars, values up to 512 chars.
	Metadata map[string]string `json:"metadata,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VaultCredentialNewParams) MarshalJSON

func (r VaultCredentialNewParams) MarshalJSON() (data []byte, err error)

func (*VaultCredentialNewParams) UnmarshalJSON

func (r *VaultCredentialNewParams) UnmarshalJSON(data []byte) error

type VaultCredentialNewParamsAuthUnion

type VaultCredentialNewParamsAuthUnion struct {
	OfMCPOAuth            *ManagedAgentsMCPOAuthCreateParams            `json:",omitzero,inline"`
	OfStaticBearer        *ManagedAgentsStaticBearerCreateParams        `json:",omitzero,inline"`
	OfEnvironmentVariable *ManagedAgentsEnvironmentVariableCreateParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (VaultCredentialNewParamsAuthUnion) GetAccessToken

func (u VaultCredentialNewParamsAuthUnion) GetAccessToken() *string

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetExpiresAt

func (u VaultCredentialNewParamsAuthUnion) GetExpiresAt() *time.Time

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetInjectionLocation

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetMCPServerURL

func (u VaultCredentialNewParamsAuthUnion) GetMCPServerURL() *string

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetNetworking

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetRefresh

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetSecretName

func (u VaultCredentialNewParamsAuthUnion) GetSecretName() *string

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetSecretValue

func (u VaultCredentialNewParamsAuthUnion) GetSecretValue() *string

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetToken

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialNewParamsAuthUnion) MarshalJSON

func (u VaultCredentialNewParamsAuthUnion) MarshalJSON() ([]byte, error)

func (*VaultCredentialNewParamsAuthUnion) UnmarshalJSON

func (u *VaultCredentialNewParamsAuthUnion) UnmarshalJSON(data []byte) error

type VaultCredentialService

type VaultCredentialService struct {
	Options []option.RequestOption
}

VaultCredentialService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultCredentialService method instead.

func NewVaultCredentialService

func NewVaultCredentialService(opts ...option.RequestOption) (r VaultCredentialService)

NewVaultCredentialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VaultCredentialService) Archive

Archive Credential

func (*VaultCredentialService) Delete

Delete Credential

func (*VaultCredentialService) Get

Get Credential

func (*VaultCredentialService) List

List Credentials

func (*VaultCredentialService) ListAutoPaging

List Credentials

func (*VaultCredentialService) MCPOAuthValidate

Validate Credential

func (*VaultCredentialService) New

Create Credential

func (*VaultCredentialService) Update

Update Credential

type VaultCredentialUpdateParams

type VaultCredentialUpdateParams struct {
	VaultID string `path:"vault_id" api:"required" json:"-"`
	// Deprecated: Qoder does not support updating credential display names.
	// Leave this field omitted; setting it returns an error before sending a request.
	DisplayName param.Opt[string] `json:"display_name,omitzero"`
	// Metadata patch. Set a key to a string to upsert it, or to null to delete it.
	// Omitted keys are preserved.
	Metadata map[string]any `json:"metadata,omitzero"`
	// Updated authentication details for a credential.
	Auth VaultCredentialUpdateParamsAuthUnion `json:"auth,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VaultCredentialUpdateParams) MarshalJSON

func (r VaultCredentialUpdateParams) MarshalJSON() (data []byte, err error)

func (*VaultCredentialUpdateParams) UnmarshalJSON

func (r *VaultCredentialUpdateParams) UnmarshalJSON(data []byte) error

type VaultCredentialUpdateParamsAuthUnion

type VaultCredentialUpdateParamsAuthUnion struct {
	OfMCPOAuth            *ManagedAgentsMCPOAuthUpdateParams            `json:",omitzero,inline"`
	OfStaticBearer        *ManagedAgentsStaticBearerUpdateParams        `json:",omitzero,inline"`
	OfEnvironmentVariable *ManagedAgentsEnvironmentVariableUpdateParams `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (VaultCredentialUpdateParamsAuthUnion) GetAccessToken

func (u VaultCredentialUpdateParamsAuthUnion) GetAccessToken() *string

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetExpiresAt

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetInjectionLocation

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetNetworking

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetRefresh

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetSecretValue

func (u VaultCredentialUpdateParamsAuthUnion) GetSecretValue() *string

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetToken

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (VaultCredentialUpdateParamsAuthUnion) MarshalJSON

func (u VaultCredentialUpdateParamsAuthUnion) MarshalJSON() ([]byte, error)

func (*VaultCredentialUpdateParamsAuthUnion) UnmarshalJSON

func (u *VaultCredentialUpdateParamsAuthUnion) UnmarshalJSON(data []byte) error

type VaultDeleteParams

type VaultDeleteParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultGetParams

type VaultGetParams struct {
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

type VaultListParams

type VaultListParams struct {
	Name param.Opt[string] `query:"name,omitzero" json:"-"`

	BeforeID param.Opt[string] `query:"before_id,omitzero" json:"-"`
	AfterID  param.Opt[string] `query:"after_id,omitzero" json:"-"`

	// Whether to include archived vaults in the results.
	IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
	// Maximum number of vaults to return per page. Defaults to 20, maximum 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Opaque pagination token from a previous `list_vaults` response.
	Page param.Opt[string] `query:"page,omitzero" json:"-"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VaultListParams) URLQuery

func (r VaultListParams) URLQuery() (v url.Values, err error)

URLQuery serializes VaultListParams's query parameters as `url.Values`.

type VaultNewParams

type VaultNewParams struct {
	// Human-readable name for the vault. 1-255 characters.
	DisplayName string `json:"display_name" api:"required"`
	// Arbitrary key-value metadata to attach to the vault. Maximum 16 pairs, keys up
	// to 64 chars, values up to 512 chars.
	Metadata map[string]string `json:"metadata,omitzero"`
	// Optional header to specify the beta version(s) you want to use.
	Betas []QoderBeta `header:"x-qoder-beta,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VaultNewParams) MarshalJSON

func (r VaultNewParams) MarshalJSON() (data []byte, err error)

func (*VaultNewParams) UnmarshalJSON

func (r *VaultNewParams) UnmarshalJSON(data []byte) error

type VaultService

type VaultService struct {
	Options     []option.RequestOption
	Credentials VaultCredentialService
}

VaultService contains methods and other services that help with interacting with the Qoder Cloud Agents API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultService method instead.

func NewVaultService

func NewVaultService(opts ...option.RequestOption) (r VaultService)

NewVaultService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*VaultService) Archive

func (r *VaultService) Archive(ctx context.Context, vaultID string, body VaultArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsVault, err error)

Archive Vault

func (*VaultService) Delete

func (r *VaultService) Delete(ctx context.Context, vaultID string, body VaultDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedVault, err error)

Delete Vault

func (*VaultService) Get

func (r *VaultService) Get(ctx context.Context, vaultID string, query VaultGetParams, opts ...option.RequestOption) (res *ManagedAgentsVault, err error)

Get Vault

func (*VaultService) List

List Vaults

func (*VaultService) ListAutoPaging

List Vaults

func (*VaultService) New

func (r *VaultService) New(ctx context.Context, params VaultNewParams, opts ...option.RequestOption) (res *ManagedAgentsVault, err error)

Create Vault

type WebFetchBlockParam

type WebFetchBlockParam struct {
	Content RequestDocumentBlockParam `json:"content,omitzero" api:"required"`
	// Fetched content URL
	URL string `json:"url" api:"required"`
	// ISO 8601 timestamp when the content was retrieved
	RetrievedAt param.Opt[string] `json:"retrieved_at,omitzero"`
	// This field can be elided, and will marshal its zero value as "web_fetch_result".
	Type constant.WebFetchResult `json:"type" default:"web_fetch_result"`
	// contains filtered or unexported fields
}

The properties Content, Type, URL are required.

func (WebFetchBlockParam) MarshalJSON

func (r WebFetchBlockParam) MarshalJSON() (data []byte, err error)

func (*WebFetchBlockParam) UnmarshalJSON

func (r *WebFetchBlockParam) UnmarshalJSON(data []byte) error

type WebFetchToolResultBlockParam

type WebFetchToolResultBlockParam struct {
	Content   WebFetchToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                   `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// Tool invocation directly from the model.
	Caller WebFetchToolResultBlockParamCallerUnion `json:"caller,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "web_fetch_tool_result".
	Type constant.WebFetchToolResult `json:"type" default:"web_fetch_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (WebFetchToolResultBlockParam) MarshalJSON

func (r WebFetchToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*WebFetchToolResultBlockParam) UnmarshalJSON

func (r *WebFetchToolResultBlockParam) UnmarshalJSON(data []byte) error

type WebFetchToolResultBlockParamCallerUnion

type WebFetchToolResultBlockParamCallerUnion struct {
	OfDirect                *DirectCallerParam             `json:",omitzero,inline"`
	OfCodeExecution20250825 *ServerToolCallerParam         `json:",omitzero,inline"`
	OfCodeExecution20260120 *ServerToolCaller20260120Param `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (WebFetchToolResultBlockParamCallerUnion) GetToolID

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamCallerUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamCallerUnion) MarshalJSON

func (u WebFetchToolResultBlockParamCallerUnion) MarshalJSON() ([]byte, error)

func (*WebFetchToolResultBlockParamCallerUnion) UnmarshalJSON

func (u *WebFetchToolResultBlockParamCallerUnion) UnmarshalJSON(data []byte) error

type WebFetchToolResultBlockParamContentUnion

type WebFetchToolResultBlockParamContentUnion struct {
	OfRequestWebFetchToolResultError *WebFetchToolResultErrorBlockParam `json:",omitzero,inline"`
	OfRequestWebFetchResultBlock     *WebFetchBlockParam                `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (WebFetchToolResultBlockParamContentUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamContentUnion) GetErrorCode

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamContentUnion) GetRetrievedAt

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamContentUnion) GetURL

Returns a pointer to the underlying variant's property, if present.

func (WebFetchToolResultBlockParamContentUnion) MarshalJSON

func (*WebFetchToolResultBlockParamContentUnion) UnmarshalJSON

func (u *WebFetchToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type WebFetchToolResultErrorBlockParam

type WebFetchToolResultErrorBlockParam struct {
	// Any of "invalid_tool_input", "url_too_long", "url_not_allowed",
	// "url_not_in_prior_context", "url_not_accessible", "unsupported_content_type",
	// "too_many_requests", "max_uses_exceeded", "unavailable".
	ErrorCode WebFetchToolResultErrorCode `json:"error_code,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "web_fetch_tool_result_error".
	Type constant.WebFetchToolResultError `json:"type" default:"web_fetch_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (WebFetchToolResultErrorBlockParam) MarshalJSON

func (r WebFetchToolResultErrorBlockParam) MarshalJSON() (data []byte, err error)

func (*WebFetchToolResultErrorBlockParam) UnmarshalJSON

func (r *WebFetchToolResultErrorBlockParam) UnmarshalJSON(data []byte) error

type WebFetchToolResultErrorCode

type WebFetchToolResultErrorCode string

type WebSearchResultBlockParam

type WebSearchResultBlockParam struct {
	EncryptedContent string            `json:"encrypted_content" api:"required"`
	Title            string            `json:"title" api:"required"`
	URL              string            `json:"url" api:"required"`
	PageAge          param.Opt[string] `json:"page_age,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "web_search_result".
	Type constant.WebSearchResult `json:"type" default:"web_search_result"`
	// contains filtered or unexported fields
}

The properties EncryptedContent, Title, Type, URL are required.

func (WebSearchResultBlockParam) MarshalJSON

func (r WebSearchResultBlockParam) MarshalJSON() (data []byte, err error)

func (*WebSearchResultBlockParam) UnmarshalJSON

func (r *WebSearchResultBlockParam) UnmarshalJSON(data []byte) error

type WebSearchToolRequestErrorParam

type WebSearchToolRequestErrorParam struct {
	// Any of "invalid_tool_input", "unavailable", "max_uses_exceeded",
	// "too_many_requests", "query_too_long", "request_too_large".
	ErrorCode WebSearchToolResultErrorCode `json:"error_code,omitzero" api:"required"`
	// This field can be elided, and will marshal its zero value as
	// "web_search_tool_result_error".
	Type constant.WebSearchToolResultError `json:"type" default:"web_search_tool_result_error"`
	// contains filtered or unexported fields
}

The properties ErrorCode, Type are required.

func (WebSearchToolRequestErrorParam) MarshalJSON

func (r WebSearchToolRequestErrorParam) MarshalJSON() (data []byte, err error)

func (*WebSearchToolRequestErrorParam) UnmarshalJSON

func (r *WebSearchToolRequestErrorParam) UnmarshalJSON(data []byte) error

type WebSearchToolResultBlockParam

type WebSearchToolResultBlockParam struct {
	Content   WebSearchToolResultBlockParamContentUnion `json:"content,omitzero" api:"required"`
	ToolUseID string                                    `json:"tool_use_id" api:"required"`
	// Create a cache control breakpoint at this content block.
	CacheControl CacheControlEphemeralParam `json:"cache_control,omitzero"`
	// Tool invocation directly from the model.
	Caller WebSearchToolResultBlockParamCallerUnion `json:"caller,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "web_search_tool_result".
	Type constant.WebSearchToolResult `json:"type" default:"web_search_tool_result"`
	// contains filtered or unexported fields
}

The properties Content, ToolUseID, Type are required.

func (WebSearchToolResultBlockParam) MarshalJSON

func (r WebSearchToolResultBlockParam) MarshalJSON() (data []byte, err error)

func (*WebSearchToolResultBlockParam) UnmarshalJSON

func (r *WebSearchToolResultBlockParam) UnmarshalJSON(data []byte) error

type WebSearchToolResultBlockParamCallerUnion

type WebSearchToolResultBlockParamCallerUnion struct {
	OfDirect                *DirectCallerParam             `json:",omitzero,inline"`
	OfCodeExecution20250825 *ServerToolCallerParam         `json:",omitzero,inline"`
	OfCodeExecution20260120 *ServerToolCaller20260120Param `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (WebSearchToolResultBlockParamCallerUnion) GetToolID

Returns a pointer to the underlying variant's property, if present.

func (WebSearchToolResultBlockParamCallerUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (WebSearchToolResultBlockParamCallerUnion) MarshalJSON

func (*WebSearchToolResultBlockParamCallerUnion) UnmarshalJSON

func (u *WebSearchToolResultBlockParamCallerUnion) UnmarshalJSON(data []byte) error

type WebSearchToolResultBlockParamContentUnion

type WebSearchToolResultBlockParamContentUnion struct {
	OfResultBlock []WebSearchResultBlockParam     `json:",omitzero,inline"`
	OfError       *WebSearchToolRequestErrorParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (WebSearchToolResultBlockParamContentUnion) MarshalJSON

func (*WebSearchToolResultBlockParamContentUnion) UnmarshalJSON

func (u *WebSearchToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error

type WebSearchToolResultErrorCode

type WebSearchToolResultErrorCode string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL