{"modulePath":"github.com/QoderAI/qoder-cloud-agents-sdk-go","version":"v0.15.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package managed\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nPackage managed implements the Qoder Cloud Agents managed API. Service methods and entity fields follow the managed API contract.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\nQoder managed API definitions.\n\n## Constants\n\n```go\nconst DefaultBaseURL = \"https://api.qoder.com/api/v1/cloud/\"\n```\n\n## Functions\n\n```go\nfunc Bool(v bool) param.Opt[bool]\n```\n\n```go\nfunc Float(v float64) param.Opt[float64]\n```\n\n```go\nfunc Int(v int64) param.Opt[int64]\n```\n\n```go\nfunc String(v string) param.Opt[string]\n```\n\n## Types\n\n```go\ntype AdvisorRedactedResultBlockParam struct {\n\t// Opaque blob produced by a prior response; must be round-tripped verbatim.\n\tEncryptedContent string            `json:\"encrypted_content\" api:\"required\"`\n\tStopReason       param.Opt[string] `json:\"stop_reason,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"advisor_redacted_result\".\n\tType constant.AdvisorRedactedResult `json:\"type\" default:\"advisor_redacted_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties EncryptedContent, Type are required.\n\n```go\nfunc (r AdvisorRedactedResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *AdvisorRedactedResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AdvisorResultBlockParam struct {\n\tText       string            `json:\"text\" api:\"required\"`\n\tStopReason param.Opt[string] `json:\"stop_reason,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"advisor_result\".\n\tType constant.AdvisorResult `json:\"type\" default:\"advisor_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Text, Type are required.\n\n```go\nfunc (r AdvisorResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *AdvisorResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AdvisorToolResultBlockParam struct {\n\tContent   AdvisorToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                  `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"advisor_tool_result\".\n\tType constant.AdvisorToolResult `json:\"type\" default:\"advisor_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r AdvisorToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *AdvisorToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AdvisorToolResultBlockParamContentUnion struct {\n\tOfRequestAdvisorToolResultError     *AdvisorToolResultErrorParam     `json:\",omitzero,inline\"`\n\tOfRequestAdvisorResultBlock         *AdvisorResultBlockParam         `json:\",omitzero,inline\"`\n\tOfRequestAdvisorRedactedResultBlock *AdvisorRedactedResultBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u AdvisorToolResultBlockParamContentUnion) GetEncryptedContent() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AdvisorToolResultBlockParamContentUnion) GetErrorCode() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AdvisorToolResultBlockParamContentUnion) GetStopReason() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AdvisorToolResultBlockParamContentUnion) GetText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AdvisorToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AdvisorToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *AdvisorToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AdvisorToolResultErrorParam struct {\n\t// Any of \"max_uses_exceeded\", \"prompt_too_long\", \"too_many_requests\",\n\t// \"overloaded\", \"unavailable\", \"execution_time_exceeded\", \"model_not_found\".\n\tErrorCode AdvisorToolResultErrorParamErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"advisor_tool_result_error\".\n\tType constant.AdvisorToolResultError `json:\"type\" default:\"advisor_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r AdvisorToolResultErrorParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *AdvisorToolResultErrorParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AdvisorToolResultErrorParamErrorCode string\n```\n\n```go\ntype AgentArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype AgentGetParams struct {\n\t// Agent version. Omit for the most recent version. Must be at least 1 if\n\t// specified.\n\tVersion param.Opt[int64] `query:\"version,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r AgentGetParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [AgentGetParams](#AgentGetParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype AgentListParams struct {\n\t// Return agents created at or after this time (inclusive).\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return agents created at or before this time (inclusive).\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Include archived agents in results. Defaults to false.\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum results per page. Default 20, maximum 100.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor from a previous response.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r AgentListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [AgentListParams](#AgentListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype AgentNewParams struct {\n\t// Model identifier. Accepts the\n\t// [model string](https://docs.qoder.com/cloud-agents/api/models/list) or a\n\t// `model_config` object for additional configuration control\n\tModel ManagedAgentsModelConfigParams `json:\"model,omitzero\" api:\"required\"`\n\t// Human-readable name for the agent.\n\tName string `json:\"name\" api:\"required\"`\n\t// Description of what the agent does.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// System prompt for the agent.\n\tSystem param.Opt[string] `json:\"system,omitzero\"`\n\t// MCP servers this agent connects to. Maximum 20. Names must be unique within the\n\t// array. Every server must be referenced by an `mcp_toolset` in `tools`;\n\t// unreferenced servers are rejected. See the\n\t// [MCP connector guide](https://docs.qoder.com/cloud-agents/api/agents/schemas).\n\tMCPServers []ManagedAgentsURLMCPServerParams `json:\"mcp_servers,omitzero\"`\n\t// Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up\n\t// to 512 chars.\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// A coordinator topology: the session's primary thread orchestrates work by\n\t// spawning session threads, each running an agent drawn from the `agents` roster.\n\tMultiagent ManagedAgentsMultiagentParams `json:\"multiagent,omitzero\"`\n\t// Skills available to the agent.\n\tSkills []ManagedAgentsSkillParamsUnion `json:\"skills,omitzero\"`\n\t// Tool configurations available to the agent. Maximum of 128 tools across all\n\t// toolsets allowed.\n\tTools []AgentNewParamsToolUnion `json:\"tools,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r AgentNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *AgentNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AgentNewParamsToolUnion struct {\n\tOfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:\",omitzero,inline\"`\n\tOfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:\",omitzero,inline\"`\n\tOfCustom               *ManagedAgentsCustomToolParams           `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u AgentNewParamsToolUnion) GetConfigs() (res agentNewParamsToolUnionConfigs)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u AgentNewParamsToolUnion) GetDefaultConfig() (res agentNewParamsToolUnionDefaultConfig)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u AgentNewParamsToolUnion) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentNewParamsToolUnion) GetInputSchema() *ManagedAgentsCustomToolInputSchemaParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentNewParamsToolUnion) GetMCPServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentNewParamsToolUnion) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentNewParamsToolUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentNewParamsToolUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *AgentNewParamsToolUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AgentSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Include archived resources; defaults to false.\n\tIncludeArchived param.Opt[bool] `json:\"include_archived,omitzero\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtGte param.Opt[time.Time] `json:\"created_at[gte],omitzero\" format:\"date-time\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtLte param.Opt[time.Time] `json:\"created_at[lte],omitzero\" format:\"date-time\"`\n\tWorkspaceID  param.Opt[string]    `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nAgentSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r AgentSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *AgentSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AgentService struct {\n\tOptions  []option.RequestOption\n\tVersions AgentVersionService\n}\n```\nAgentService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewAgentService](#NewAgentService) method instead.\n\n```go\nfunc NewAgentService(opts ...option.RequestOption) (r AgentService)\n```\nNewAgentService 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.\n\n```go\nfunc (r *AgentService) Archive(ctx context.Context, agentID string, body AgentArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)\n```\nArchive Agent\n\n```go\nfunc (r *AgentService) Get(ctx context.Context, agentID string, params AgentGetParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)\n```\nGet Agent\n\n```go\nfunc (r *AgentService) List(ctx context.Context, params AgentListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsAgent], err error)\n```\nList Agents\n\n```go\nfunc (r *AgentService) ListAutoPaging(ctx context.Context, params AgentListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsAgent]\n```\nList Agents\n\n```go\nfunc (r *AgentService) New(ctx context.Context, params AgentNewParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)\n```\nCreate Agent\n\n```go\nfunc (r *AgentService) Search(ctx context.Context, params AgentSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[ManagedAgentsAgent], error)\n```\nSearch agents by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *AgentService) SearchAutoPaging(ctx context.Context, params AgentSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsAgent]\n```\nSearchAutoPaging iterates all matching agents using opaque body cursors.\n\n```go\nfunc (r *AgentService) Update(ctx context.Context, agentID string, params AgentUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsAgent, err error)\n```\nUpdate Agent\n\n```go\ntype AgentUpdateParams struct {\n\t// Description. Omit to preserve; send empty string or null to clear.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// System prompt. Omit to preserve; send empty string or null to clear.\n\tSystem param.Opt[string] `json:\"system,omitzero\"`\n\t// Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// The agent's current version, used to prevent concurrent overwrites. Obtain this\n\t// value from a create or retrieve response. Must be at least 1 if specified. When\n\t// supplied, the request fails if it does not match the server's current version;\n\t// omit to apply the update unconditionally.\n\tVersion param.Opt[int64] `json:\"version,omitzero\"`\n\t// MCP servers. Full replacement. Omit to preserve; send empty array or `null` to\n\t// clear. Names must be unique. Maximum 20. Every server must be referenced by an\n\t// `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are\n\t// rejected. See the\n\t// [MCP connector guide](https://docs.qoder.com/cloud-agents/api/agents/schemas).\n\tMCPServers []ManagedAgentsURLMCPServerParams `json:\"mcp_servers,omitzero\"`\n\t// Metadata patch. Set a key to a string to upsert it, or to null to delete it.\n\t// Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars\n\t// each) with values up to 512 chars.\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\t// Skills. Full replacement. Omit to preserve; send empty array or null to clear.\n\tSkills []ManagedAgentsSkillParamsUnion `json:\"skills,omitzero\"`\n\t// Tool configurations available to the agent. Full replacement. Omit to preserve;\n\t// send empty array or null to clear. Maximum of 128 tools across all toolsets\n\t// allowed.\n\tTools []AgentUpdateParamsToolUnion `json:\"tools,omitzero\"`\n\t// Model identifier. Accepts the\n\t// [model string](https://docs.qoder.com/cloud-agents/api/models/list) or a\n\t// `model_config` object for additional configuration control. Omit to preserve.\n\t// Cannot be cleared.\n\tModel ManagedAgentsModelConfigParams `json:\"model,omitzero\"`\n\t// A coordinator topology: the session's primary thread orchestrates work by\n\t// spawning session threads, each running an agent drawn from the `agents` roster.\n\tMultiagent ManagedAgentsMultiagentParams `json:\"multiagent,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r AgentUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *AgentUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AgentUpdateParamsToolUnion struct {\n\tOfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:\",omitzero,inline\"`\n\tOfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:\",omitzero,inline\"`\n\tOfCustom               *ManagedAgentsCustomToolParams           `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetConfigs() (res agentUpdateParamsToolUnionConfigs)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetDefaultConfig() (res agentUpdateParamsToolUnionDefaultConfig)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetInputSchema() *ManagedAgentsCustomToolInputSchemaParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetMCPServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentUpdateParamsToolUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u AgentUpdateParamsToolUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *AgentUpdateParamsToolUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype AgentVersionListParams struct {\n\t// Maximum results per page. Default 20, maximum 100.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r AgentVersionListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [AgentVersionListParams](#AgentVersionListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype AgentVersionService struct {\n\tOptions []option.RequestOption\n}\n```\nAgentVersionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewAgentVersionService](#NewAgentVersionService) method instead.\n\n```go\nfunc NewAgentVersionService(opts ...option.RequestOption) (r AgentVersionService)\n```\nNewAgentVersionService 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.\n\n```go\nfunc (r *AgentVersionService) List(ctx context.Context, agentID string, params AgentVersionListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsAgent], err error)\n```\nList Agent Versions\n\n```go\nfunc (r *AgentVersionService) ListAutoPaging(ctx context.Context, agentID string, params AgentVersionListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsAgent]\n```\nList Agent Versions\n\n```go\ntype Base64ImageSourceMediaType string\n```\n\n```go\ntype Base64ImageSourceParam struct {\n\tData string `json:\"data\" api:\"required\" format:\"byte\"`\n\t// Any of \"image/jpeg\", \"image/png\", \"image/gif\", \"image/webp\".\n\tMediaType Base64ImageSourceMediaType `json:\"media_type,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"base64\".\n\tType constant.Base64 `json:\"type\" default:\"base64\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Data, MediaType, Type are required.\n\n```go\nfunc (r Base64ImageSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *Base64ImageSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Base64PDFSourceParam struct {\n\tData string `json:\"data\" api:\"required\" format:\"byte\"`\n\t// This field can be elided, and will marshal its zero value as \"application/pdf\".\n\tMediaType constant.ApplicationPDF `json:\"media_type\" default:\"application/pdf\"`\n\t// This field can be elided, and will marshal its zero value as \"base64\".\n\tType constant.Base64 `json:\"type\" default:\"base64\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Data, MediaType, Type are required.\n\n```go\nfunc (r Base64PDFSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *Base64PDFSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BashCodeExecutionOutputBlockParam struct {\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"bash_code_execution_output\".\n\tType constant.BashCodeExecutionOutput `json:\"type\" default:\"bash_code_execution_output\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties FileID, Type are required.\n\n```go\nfunc (r BashCodeExecutionOutputBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BashCodeExecutionOutputBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BashCodeExecutionResultBlockParam struct {\n\tContent    []BashCodeExecutionOutputBlockParam `json:\"content,omitzero\" api:\"required\"`\n\tReturnCode int64                               `json:\"return_code\" api:\"required\"`\n\tStderr     string                              `json:\"stderr\" api:\"required\"`\n\tStdout     string                              `json:\"stdout\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"bash_code_execution_result\".\n\tType constant.BashCodeExecutionResult `json:\"type\" default:\"bash_code_execution_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ReturnCode, Stderr, Stdout, Type are required.\n\n```go\nfunc (r BashCodeExecutionResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BashCodeExecutionResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BashCodeExecutionToolResultBlockParam struct {\n\tContent   BashCodeExecutionToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                            `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"bash_code_execution_tool_result\".\n\tType constant.BashCodeExecutionToolResult `json:\"type\" default:\"bash_code_execution_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r BashCodeExecutionToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BashCodeExecutionToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BashCodeExecutionToolResultBlockParamContentUnion struct {\n\tOfRequestBashCodeExecutionToolResultError *BashCodeExecutionToolResultErrorParam `json:\",omitzero,inline\"`\n\tOfRequestBashCodeExecutionResultBlock     *BashCodeExecutionResultBlockParam     `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) GetContent() []BashCodeExecutionOutputBlockParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) GetErrorCode() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) GetReturnCode() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) GetStderr() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) GetStdout() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BashCodeExecutionToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *BashCodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BashCodeExecutionToolResultErrorParam struct {\n\t// Any of \"invalid_tool_input\", \"unavailable\", \"too_many_requests\",\n\t// \"execution_time_exceeded\", \"output_file_too_large\".\n\tErrorCode BashCodeExecutionToolResultErrorParamErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"bash_code_execution_tool_result_error\".\n\tType constant.BashCodeExecutionToolResultError `json:\"type\" default:\"bash_code_execution_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r BashCodeExecutionToolResultErrorParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BashCodeExecutionToolResultErrorParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BashCodeExecutionToolResultErrorParamErrorCode string\n```\n\n```go\ntype BrowserStateBlockParam struct {\n\t// All tabs open in the browser after this call — the full inventory, not a delta.\n\t// May be empty. Whenever non-empty, exactly one entry carries `active: true`.\n\tTabs []BrowserStateTabEntryParam `json:\"tabs,omitzero\" api:\"required\"`\n\t// Tabs opened and download state changes during this call. \"Nothing to report\" is\n\t// expressed by omitting the field, never by an empty list.\n\tStateChanges []BrowserStateChangeUnionParam `json:\"state_changes,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"browser_state\".\n\tType constant.BrowserState `json:\"type\" default:\"browser_state\"`\n\t// contains filtered or unexported fields\n}\n```\nThe 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.\n\nAt 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.\n\nThe properties Tabs, Type are required.\n\n```go\nfunc (r BrowserStateBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserStateBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserStateChangeDownloadCompletedParam struct {\n\t// The caller-assigned identifier for this download, stable across the state\n\t// changes reporting it.\n\tDownloadID string `json:\"download_id\" api:\"required\"`\n\t// The final post-redirect URL the download was served from.\n\tURL string `json:\"url\" api:\"required\"`\n\t// Where the executor saved the file, on the executor's filesystem. Only included\n\t// when another tool in the same environment can read the file at that path.\n\tPath param.Opt[string] `json:\"path,omitzero\"`\n\t// The completed download's size.\n\tSizeBytes param.Opt[int64] `json:\"size_bytes,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"download_completed\".\n\tType constant.DownloadCompleted `json:\"type\" default:\"download_completed\"`\n\t// contains filtered or unexported fields\n}\n```\nA 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).\n\nThe properties DownloadID, Type, URL are required.\n\n```go\nfunc (r BrowserStateChangeDownloadCompletedParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserStateChangeDownloadCompletedParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserStateChangeDownloadFailedParam struct {\n\t// The caller-assigned identifier for this download, stable across the state\n\t// changes reporting it.\n\tDownloadID string `json:\"download_id\" api:\"required\"`\n\t// The final post-redirect URL the download was served from.\n\tURL string `json:\"url\" api:\"required\"`\n\t// The failure or cancellation detail, when known.\n\tError param.Opt[string] `json:\"error,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"download_failed\".\n\tType constant.DownloadFailed `json:\"type\" default:\"download_failed\"`\n\t// contains filtered or unexported fields\n}\n```\nA file download that failed — or was cancelled — during this call.\n\nThe properties DownloadID, Type, URL are required.\n\n```go\nfunc (r BrowserStateChangeDownloadFailedParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserStateChangeDownloadFailedParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserStateChangeDownloadStartedParam struct {\n\t// The caller-assigned identifier for this download, stable across the state\n\t// changes reporting it.\n\tDownloadID string `json:\"download_id\" api:\"required\"`\n\t// The final post-redirect URL the download was served from.\n\tURL string `json:\"url\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"download_started\".\n\tType constant.DownloadStarted `json:\"type\" default:\"download_started\"`\n\t// contains filtered or unexported fields\n}\n```\nA file download that started during this call.\n\nThe properties DownloadID, Type, URL are required.\n\n```go\nfunc (r BrowserStateChangeDownloadStartedParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserStateChangeDownloadStartedParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserStateChangeTabOpenedParam struct {\n\t// The `tab_id` of the opened tab, present in `tabs`.\n\tTabID string `json:\"tab_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"tab_opened\".\n\tType constant.TabOpened `json:\"type\" default:\"tab_opened\"`\n\t// contains filtered or unexported fields\n}\n```\nA tab this call's execution opened that remains open at its end — the creation delta of the \\`tabs\\` inventory, not an event log.\n\nCarries 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.\n\nThe properties TabID, Type are required.\n\n```go\nfunc (r BrowserStateChangeTabOpenedParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserStateChangeTabOpenedParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserStateChangeUnionParam struct {\n\tOfTabOpened         *BrowserStateChangeTabOpenedParam         `json:\",omitzero,inline\"`\n\tOfDownloadStarted   *BrowserStateChangeDownloadStartedParam   `json:\",omitzero,inline\"`\n\tOfDownloadCompleted *BrowserStateChangeDownloadCompletedParam `json:\",omitzero,inline\"`\n\tOfDownloadFailed    *BrowserStateChangeDownloadFailedParam    `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetDownloadID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetError() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetPath() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetSizeBytes() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetTabID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u BrowserStateChangeUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *BrowserStateChangeUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BrowserStateTabEntryParam struct {\n\t// The caller-assigned identifier for this tab, unique within the inventory.\n\tTabID string `json:\"tab_id\" api:\"required\"`\n\t// The title of the page the tab is showing. May be empty.\n\tTitle string `json:\"title\" api:\"required\"`\n\t// The URL of the page the tab is showing. May be empty.\n\tURL string `json:\"url\" api:\"required\"`\n\t// Whether this tab is the active tab after this call. Whenever `tabs` is\n\t// non-empty, exactly one entry is marked `active: true`.\n\tActive param.Opt[bool] `json:\"active,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nOne open browser tab reported in a \\`browser\\_state\\` block's \\`tabs\\` inventory.\n\n\\`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.\n\nThe properties TabID, Title, URL are required.\n\n```go\nfunc (r BrowserStateTabEntryParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *BrowserStateTabEntryParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BucketStorage struct {\n\tBuckets []OSSBucket `json:\"buckets\"`\n\tJSON    struct {\n\t\tBuckets     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r BucketStorage) RawJSON() string\n```\n\n```go\nfunc (r *BucketStorage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype BucketStorageParam struct {\n\tBuckets []OSSBucketParam `json:\"buckets\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nBucketStorageParam declares up to eight OSS bucket mounts in a cloud Environment.\n\n```go\nfunc (r BucketStorageParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *BucketStorageParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CacheControlEphemeralParam struct {\n\t// The time-to-live for the cache control breakpoint.\n\t//\n\t// This may be one the following values:\n\t//\n\t// - `5m`: 5 minutes\n\t// - `1h`: 1 hour\n\t//\n\t// Defaults to `5m`.\n\t//\n\t// Any of \"5m\", \"1h\".\n\tTTL  CacheControlEphemeralTTL `json:\"ttl,omitzero\"`\n\tType constant.Ephemeral       `json:\"type\" default:\"ephemeral\"`\n\t// contains filtered or unexported fields\n}\n```\nThis struct has a constant value, construct it with \\[NewCacheControlEphemeralParam].\n\n```go\nfunc (r CacheControlEphemeralParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CacheControlEphemeralParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CacheControlEphemeralTTL string\n```\nThe time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n\n\\- \\`5m\\`: 5 minutes - \\`1h\\`: 1 hour\n\nDefaults to \\`5m\\`.\n\n```go\ntype CapabilitySupport struct {\n\t// Whether this capability is supported by the model.\n\tSupported bool `json:\"supported\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSupported   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates whether a capability is supported.\n\n```go\nfunc (r CapabilitySupport) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *CapabilitySupport) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CitationCharLocationParam struct {\n\tDocumentTitle  param.Opt[string] `json:\"document_title,omitzero\" api:\"required\"`\n\tCitedText      string            `json:\"cited_text\" api:\"required\"`\n\tDocumentIndex  int64             `json:\"document_index\" api:\"required\"`\n\tEndCharIndex   int64             `json:\"end_char_index\" api:\"required\"`\n\tStartCharIndex int64             `json:\"start_char_index\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"char_location\".\n\tType constant.CharLocation `json:\"type\" default:\"char_location\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties CitedText, DocumentIndex, DocumentTitle, EndCharIndex, StartCharIndex, Type are required.\n\n```go\nfunc (r CitationCharLocationParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CitationCharLocationParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CitationContentBlockLocationParam struct {\n\tDocumentTitle param.Opt[string] `json:\"document_title,omitzero\" api:\"required\"`\n\t// The full text of the cited block range, concatenated.\n\t//\n\t// Always equals the contents of `content[start_block_index:end_block_index]`\n\t// joined together. The text block is the minimal citable unit; this field is never\n\t// a substring of a single block. Not counted toward output tokens, and not counted\n\t// toward input tokens when sent back in subsequent turns.\n\tCitedText     string `json:\"cited_text\" api:\"required\"`\n\tDocumentIndex int64  `json:\"document_index\" api:\"required\"`\n\t// Exclusive 0-based end index of the cited block range in the source's `content`\n\t// array.\n\t//\n\t// Always greater than `start_block_index`; a single-block citation has\n\t// `end_block_index = start_block_index + 1`.\n\tEndBlockIndex int64 `json:\"end_block_index\" api:\"required\"`\n\t// 0-based index of the first cited block in the source's `content` array.\n\tStartBlockIndex int64 `json:\"start_block_index\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"content_block_location\".\n\tType constant.ContentBlockLocation `json:\"type\" default:\"content_block_location\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties CitedText, DocumentIndex, DocumentTitle, EndBlockIndex, StartBlockIndex, Type are required.\n\n```go\nfunc (r CitationContentBlockLocationParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CitationContentBlockLocationParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CitationPageLocationParam struct {\n\tDocumentTitle   param.Opt[string] `json:\"document_title,omitzero\" api:\"required\"`\n\tCitedText       string            `json:\"cited_text\" api:\"required\"`\n\tDocumentIndex   int64             `json:\"document_index\" api:\"required\"`\n\tEndPageNumber   int64             `json:\"end_page_number\" api:\"required\"`\n\tStartPageNumber int64             `json:\"start_page_number\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"page_location\".\n\tType constant.PageLocation `json:\"type\" default:\"page_location\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties CitedText, DocumentIndex, DocumentTitle, EndPageNumber, StartPageNumber, Type are required.\n\n```go\nfunc (r CitationPageLocationParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CitationPageLocationParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CitationSearchResultLocationParam struct {\n\tTitle param.Opt[string] `json:\"title,omitzero\" api:\"required\"`\n\t// The full text of the cited block range, concatenated.\n\t//\n\t// Always equals the contents of `content[start_block_index:end_block_index]`\n\t// joined together. The text block is the minimal citable unit; this field is never\n\t// a substring of a single block. Not counted toward output tokens, and not counted\n\t// toward input tokens when sent back in subsequent turns.\n\tCitedText string `json:\"cited_text\" api:\"required\"`\n\t// Exclusive 0-based end index of the cited block range in the source's `content`\n\t// array.\n\t//\n\t// Always greater than `start_block_index`; a single-block citation has\n\t// `end_block_index = start_block_index + 1`.\n\tEndBlockIndex int64 `json:\"end_block_index\" api:\"required\"`\n\t// 0-based index of the cited search result among all `search_result` content\n\t// blocks in the request, in the order they appear across messages and tool\n\t// results.\n\t//\n\t// Counted separately from `document_index`; server-side web search results are not\n\t// included in this count.\n\tSearchResultIndex int64  `json:\"search_result_index\" api:\"required\"`\n\tSource            string `json:\"source\" api:\"required\"`\n\t// 0-based index of the first cited block in the source's `content` array.\n\tStartBlockIndex int64 `json:\"start_block_index\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"search_result_location\".\n\tType constant.SearchResultLocation `json:\"type\" default:\"search_result_location\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties CitedText, EndBlockIndex, SearchResultIndex, Source, StartBlockIndex, Title, Type are required.\n\n```go\nfunc (r CitationSearchResultLocationParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CitationSearchResultLocationParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CitationWebSearchResultLocationParam struct {\n\tTitle          param.Opt[string] `json:\"title,omitzero\" api:\"required\"`\n\tCitedText      string            `json:\"cited_text\" api:\"required\"`\n\tEncryptedIndex string            `json:\"encrypted_index\" api:\"required\"`\n\tURL            string            `json:\"url\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"web_search_result_location\".\n\tType constant.WebSearchResultLocation `json:\"type\" default:\"web_search_result_location\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties CitedText, EncryptedIndex, Title, Type, URL are required.\n\n```go\nfunc (r CitationWebSearchResultLocationParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CitationWebSearchResultLocationParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CitationsConfigParam struct {\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r CitationsConfigParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CitationsConfigParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Client struct {\n\tOAuth          OAuthService\n\tOptions        []option.RequestOption\n\tAgents         AgentService\n\tSessions       SessionService\n\tDeployments    DeploymentService\n\tDeploymentRuns DeploymentRunService\n\tDreams         DreamService\n\tEnvironments   EnvironmentService\n\tSkills         SkillService\n\tVaults         VaultService\n\tFiles          FileService\n\tMemoryStores   MemoryStoreService\n\tModels         ModelService\n}\n```\nClient exposes concrete services; nested services follow the upstream hierarchy. A client can be shared between goroutines. Configure options before first use.\n\n```go\nfunc NewClient(opts ...option.RequestOption) Client\n```\nNewClient uses common authentication defaults and QODER\\_BASE\\_URL. Explicit options win.\n\n```go\ntype CloudConfig struct {\n\t// Set Betas to include \"oss-bucket-2026-09-23\" when buckets remain configured.\n\tStorage BucketStorage `json:\"storage\"`\n\t// Runs on sandbox start/resume; self-hosted execution depends on the worker.\n\tStartupScript string `json:\"startup_script\"`\n\tSetupScript   string `json:\"setup_script\"`\n\t// Network configuration policy.\n\tNetworking CloudConfigNetworkingUnion `json:\"networking\" api:\"required\"`\n\t// Package manager configuration.\n\tPackages Packages `json:\"packages\" api:\"required\"`\n\t// Environment type\n\tType constant.Cloud `json:\"type\" default:\"cloud\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tStorage       respjson.Field\n\t\tStartupScript respjson.Field\n\t\tSetupScript   respjson.Field\n\t\tNetworking    respjson.Field\n\t\tPackages      respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\\`cloud\\` environment configuration.\n\n```go\nfunc (r CloudConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *CloudConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CloudConfigNetworkingUnion struct {\n\t// Any of \"unrestricted\", \"limited\".\n\tType string `json:\"type\"`\n\t// This field is from variant [LimitedNetwork].\n\tAllowMCPServers bool `json:\"allow_mcp_servers\"`\n\t// This field is from variant [LimitedNetwork].\n\tAllowPackageManagers bool `json:\"allow_package_managers\"`\n\t// This field is from variant [LimitedNetwork].\n\tAllowedHosts []string `json:\"allowed_hosts\"`\n\tJSON         struct {\n\t\tType                 respjson.Field\n\t\tAllowMCPServers      respjson.Field\n\t\tAllowPackageManagers respjson.Field\n\t\tAllowedHosts         respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCloudConfigNetworkingUnion contains all possible properties and values from [UnrestrictedNetwork](#UnrestrictedNetwork), [LimitedNetwork](#LimitedNetwork).\n\nUse the [CloudConfigNetworkingUnion.AsAny](#CloudConfigNetworkingUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u CloudConfigNetworkingUnion) AsAny() anyCloudConfigNetworking\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := CloudConfigNetworkingUnion.AsAny().(type) {\n\tcase qoder.UnrestrictedNetwork:\n\tcase qoder.LimitedNetwork:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u CloudConfigNetworkingUnion) AsLimited() (v LimitedNetwork)\n```\n\n```go\nfunc (u CloudConfigNetworkingUnion) AsUnrestricted() (v UnrestrictedNetwork)\n```\n\n```go\nfunc (u CloudConfigNetworkingUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *CloudConfigNetworkingUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CloudConfigParams struct {\n\t// Set Betas to include \"oss-bucket-2026-09-23\" when buckets remain configured.\n\tStorage BucketStorageParam `json:\"storage,omitzero\"`\n\t// Runs on sandbox start/resume; self-hosted execution depends on the worker.\n\tStartupScript param.Opt[string] `json:\"startup_script,omitzero\"`\n\tSetupScript   param.Opt[string] `json:\"setup_script,omitzero\"`\n\t// Network configuration policy. Omit on update to preserve the existing value.\n\tNetworking CloudConfigParamsNetworkingUnion `json:\"networking,omitzero\"`\n\t// Specify packages (and optionally their versions) available in this environment.\n\t//\n\t// When versioning, use the version semantics relevant for the package manager,\n\t// e.g. for `pip` use `package==1.0.0`. You are responsible for validating the\n\t// package and version exist. Unversioned installs the latest.\n\t//\n\t// Under `limited` networking, requires `networking.allow_package_managers` to be\n\t// `true`.\n\tPackages PackagesParams `json:\"packages,omitzero\"`\n\t// Environment type\n\t//\n\t// This field can be elided, and will marshal its zero value as \"cloud\".\n\tType constant.Cloud `json:\"type\" default:\"cloud\"`\n\t// contains filtered or unexported fields\n}\n```\nRequest params for \\`cloud\\` environment configuration.\n\nFields default to null; on update, omitted fields preserve the existing value.\n\nThe property Type is required.\n\n```go\nfunc (r CloudConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CloudConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CloudConfigParamsNetworkingUnion struct {\n\tOfUnrestricted *UnrestrictedNetworkParam `json:\",omitzero,inline\"`\n\tOfLimited      *LimitedNetworkParams     `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u CloudConfigParamsNetworkingUnion) GetAllowMCPServers() *bool\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CloudConfigParamsNetworkingUnion) GetAllowPackageManagers() *bool\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CloudConfigParamsNetworkingUnion) GetAllowedHosts() []string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CloudConfigParamsNetworkingUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CloudConfigParamsNetworkingUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *CloudConfigParamsNetworkingUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CodeExecutionOutputBlockParam struct {\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"code_execution_output\".\n\tType constant.CodeExecutionOutput `json:\"type\" default:\"code_execution_output\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties FileID, Type are required.\n\n```go\nfunc (r CodeExecutionOutputBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CodeExecutionOutputBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CodeExecutionResultBlockParam struct {\n\tContent    []CodeExecutionOutputBlockParam `json:\"content,omitzero\" api:\"required\"`\n\tReturnCode int64                           `json:\"return_code\" api:\"required\"`\n\tStderr     string                          `json:\"stderr\" api:\"required\"`\n\tStdout     string                          `json:\"stdout\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"code_execution_result\".\n\tType constant.CodeExecutionResult `json:\"type\" default:\"code_execution_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ReturnCode, Stderr, Stdout, Type are required.\n\n```go\nfunc (r CodeExecutionResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CodeExecutionResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CodeExecutionToolResultBlockParam struct {\n\t// Code execution result with encrypted stdout for PFC + web_search results.\n\tContent   CodeExecutionToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                        `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"code_execution_tool_result\".\n\tType constant.CodeExecutionToolResult `json:\"type\" default:\"code_execution_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r CodeExecutionToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CodeExecutionToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CodeExecutionToolResultBlockParamContentUnion struct {\n\tOfError                                    *CodeExecutionToolResultErrorParam      `json:\",omitzero,inline\"`\n\tOfResultBlock                              *CodeExecutionResultBlockParam          `json:\",omitzero,inline\"`\n\tOfRequestEncryptedCodeExecutionResultBlock *EncryptedCodeExecutionResultBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetContent() []CodeExecutionOutputBlockParam\n```\nReturns a pointer to the underlying variant's Content property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetEncryptedStdout() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetErrorCode() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetReturnCode() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetStderr() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetStdout() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u CodeExecutionToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *CodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CodeExecutionToolResultErrorCode string\n```\n\n```go\ntype CodeExecutionToolResultErrorParam struct {\n\t// Any of \"invalid_tool_input\", \"unavailable\", \"too_many_requests\",\n\t// \"execution_time_exceeded\".\n\tErrorCode CodeExecutionToolResultErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"code_execution_tool_result_error\".\n\tType constant.CodeExecutionToolResultError `json:\"type\" default:\"code_execution_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r CodeExecutionToolResultErrorParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CodeExecutionToolResultErrorParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype CompactionBlockParam struct {\n\t// Summary of previously compacted content, or null if compaction failed\n\tContent param.Opt[string] `json:\"content,omitzero\"`\n\t// Opaque metadata from prior compaction, to be round-tripped verbatim\n\tEncryptedContent param.Opt[string] `json:\"encrypted_content,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"compaction\".\n\tType constant.Compaction `json:\"type\" default:\"compaction\"`\n\t// contains filtered or unexported fields\n}\n```\nA compaction block containing summary of previous context.\n\nUsers should round-trip these blocks from responses to subsequent requests to maintain context across compaction boundaries.\n\nWhen content is None, the block represents a failed compaction. The server treats these as no-ops. Empty string content is not allowed.\n\nThe property Type is required.\n\n```go\nfunc (r CompactionBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *CompactionBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ContainerUploadBlockParam struct {\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"container_upload\".\n\tType constant.ContainerUpload `json:\"type\" default:\"container_upload\"`\n\t// contains filtered or unexported fields\n}\n```\nA 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.\n\nThe properties FileID, Type are required.\n\n```go\nfunc (r ContainerUploadBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ContainerUploadBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ContentBlockParamUnion struct {\n\tOfText                              *TextBlockParam                              `json:\",omitzero,inline\"`\n\tOfImage                             *ImageBlockParam                             `json:\",omitzero,inline\"`\n\tOfDocument                          *RequestDocumentBlockParam                   `json:\",omitzero,inline\"`\n\tOfSearchResult                      *SearchResultBlockParam                      `json:\",omitzero,inline\"`\n\tOfThinking                          *ThinkingBlockParam                          `json:\",omitzero,inline\"`\n\tOfRedactedThinking                  *RedactedThinkingBlockParam                  `json:\",omitzero,inline\"`\n\tOfToolUse                           *ToolUseBlockParam                           `json:\",omitzero,inline\"`\n\tOfToolResult                        *ToolResultBlockParam                        `json:\",omitzero,inline\"`\n\tOfServerToolUse                     *ServerToolUseBlockParam                     `json:\",omitzero,inline\"`\n\tOfWebSearchToolResult               *WebSearchToolResultBlockParam               `json:\",omitzero,inline\"`\n\tOfWebFetchToolResult                *WebFetchToolResultBlockParam                `json:\",omitzero,inline\"`\n\tOfAdvisorToolResult                 *AdvisorToolResultBlockParam                 `json:\",omitzero,inline\"`\n\tOfCodeExecutionToolResult           *CodeExecutionToolResultBlockParam           `json:\",omitzero,inline\"`\n\tOfBashCodeExecutionToolResult       *BashCodeExecutionToolResultBlockParam       `json:\",omitzero,inline\"`\n\tOfTextEditorCodeExecutionToolResult *TextEditorCodeExecutionToolResultBlockParam `json:\",omitzero,inline\"`\n\tOfToolSearchToolResult              *ToolSearchToolResultBlockParam              `json:\",omitzero,inline\"`\n\tOfMCPToolUse                        *MCPToolUseBlockParam                        `json:\",omitzero,inline\"`\n\tOfMCPToolResult                     *RequestMCPToolResultBlockParam              `json:\",omitzero,inline\"`\n\tOfContainerUpload                   *ContainerUploadBlockParam                   `json:\",omitzero,inline\"`\n\tOfCompaction                        *CompactionBlockParam                        `json:\",omitzero,inline\"`\n\tOfToolAddition                      *RequestToolAdditionBlockParam               `json:\",omitzero,inline\"`\n\tOfToolRemoval                       *RequestToolRemovalBlockParam                `json:\",omitzero,inline\"`\n\tOfFallback                          *FallbackBlockParam                          `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ContentBlockParamUnion) GetCacheControl() *CacheControlEphemeralParam\n```\nReturns a pointer to the underlying variant's CacheControl property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetCaller() (res contentBlockParamUnionCaller)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ContentBlockParamUnion) GetCitations() (res contentBlockParamUnionCitations)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ContentBlockParamUnion) GetContent() (res contentBlockParamUnionContent)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ContentBlockParamUnion) GetContext() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetData() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetEncryptedContent() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetFrom() *FallbackInfoParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetInput() *any\n```\nReturns a pointer to the underlying variant's Input property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetIsError() *bool\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetSignature() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetSource() (res contentBlockParamUnionSource)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ContentBlockParamUnion) GetText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetThinking() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetTo() *FallbackInfoParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetTool() (res contentBlockParamUnionTool)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ContentBlockParamUnion) GetToolUseID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetToolsetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetTransformations() *ImageTransformationsParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetTrigger() *any\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ContentBlockParamUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ContentBlockParamUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ContentBlockSourceContentUnionParam struct {\n\tOfString                    param.Opt[string]                     `json:\",omitzero,inline\"`\n\tOfContentBlockSourceContent []ContentBlockSourceContentUnionParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ContentBlockSourceContentUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ContentBlockSourceContentUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ContentBlockSourceParam struct {\n\tContent ContentBlockSourceContentUnionParam `json:\"content,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"content\".\n\tType constant.Content `json:\"type\" default:\"content\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, Type are required.\n\n```go\nfunc (r ContentBlockSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ContentBlockSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ContextManagementCapability struct {\n\t// Indicates whether a capability is supported.\n\tClearThinking20251015 CapabilitySupport `json:\"clear_thinking_20251015\" api:\"required\"`\n\t// Indicates whether a capability is supported.\n\tClearToolUses20250919 CapabilitySupport `json:\"clear_tool_uses_20250919\" api:\"required\"`\n\t// Indicates whether a capability is supported.\n\tCompact20260112 CapabilitySupport `json:\"compact_20260112\" api:\"required\"`\n\t// Whether this capability is supported by the model.\n\tSupported bool `json:\"supported\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tClearThinking20251015 respjson.Field\n\t\tClearToolUses20250919 respjson.Field\n\t\tCompact20260112       respjson.Field\n\t\tSupported             respjson.Field\n\t\tExtraFields           map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nContext management capability details.\n\n```go\nfunc (r ContextManagementCapability) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ContextManagementCapability) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Currency string\n```\n\n```go\nconst CurrencyUSD Currency = \"USD\"\n```\n\n```go\ntype DeletedFile struct {\n\t// ID of the deleted file.\n\tID string `json:\"id\" api:\"required\"`\n\t// Deleted object type.\n\t//\n\t// For file deletion, this is always `\"file_deleted\"`.\n\t//\n\t// Any of \"file_deleted\".\n\tType DeletedFileType `json:\"type\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r DeletedFile) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *DeletedFile) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeletedFileType string\n```\nDeleted object type.\n\nFor file deletion, this is always \\`\"file\\_deleted\"\\`.\n\n```go\nconst (\n\tDeletedFileTypeFileDeleted DeletedFileType = \"file_deleted\"\n)\n```\n\n```go\ntype DeletedSkill struct {\n\t// Unique identifier for the skill.\n\t//\n\t// The format and length of IDs may change over time.\n\tID string `json:\"id\" api:\"required\"`\n\t// Deleted object type.\n\t//\n\t// For Skills, this is always `\"skill_deleted\"`.\n\tType constant.SkillDeleted `json:\"type\" default:\"skill_deleted\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r DeletedSkill) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *DeletedSkill) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeletedSkillVersion struct {\n\t// Unique identifier for this Skill Version. The id addresses the version in paths\n\t// and pins it in references.\n\tID string `json:\"id\" api:\"required\"`\n\t// Deleted object type.\n\t//\n\t// For Skill Versions, this is always `\"skill_version_deleted\"`.\n\tType constant.SkillVersionDeleted `json:\"type\" default:\"skill_version_deleted\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r DeletedSkillVersion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *DeletedSkillVersion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeploymentGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeploymentListParams struct {\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Filter by agent ID.\n\tAgentID param.Opt[string] `query:\"agent_id,omitzero\" json:\"-\"`\n\t// Return deployments created at or after this time (inclusive).\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return deployments created at or before this time (inclusive).\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// When true, includes archived deployments. Default: false (exclude archived).\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum results per page. Default 20, maximum 100.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Filter by status: `active` or `paused`. Omit for both. To include archived\n\t// deployments, use `include_archived` instead; the two cannot be combined.\n\t//\n\t// Any of \"active\", \"paused\".\n\tStatus ManagedAgentsDeploymentStatus `query:\"status,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DeploymentListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [DeploymentListParams](#DeploymentListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype DeploymentNewParams struct {\n\tEnvironmentVariables param.Opt[string] `json:\"environment_variables,omitzero\"`\n\n\t// Agent to deploy. Accepts the `agent` ID string, which pins the latest version,\n\t// or an `agent` object with both id and version specified. The agent must exist\n\t// and not be archived.\n\tAgent DeploymentNewParamsAgentUnion `json:\"agent,omitzero\" api:\"required\"`\n\t// ID of the `environment` defining the container configuration for sessions\n\t// created from this deployment.\n\tEnvironmentID string `json:\"environment_id\" api:\"required\"`\n\t// BYOC tunnel for MCP requests from sessions created by this deployment.\n\tTunnelID param.Opt[string] `json:\"tunnel_id,omitzero\"`\n\t// Events to send to each session immediately after creation. At least 1,\n\t// maximum 50.\n\tInitialEvents []ManagedAgentsDeploymentInitialEventParamsUnion `json:\"initial_events,omitzero\" api:\"required\"`\n\t// Human-readable name for the deployment.\n\tName string `json:\"name\" api:\"required\"`\n\t// Description of what the deployment does.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimitParam `json:\"budget,omitzero\"`\n\t// Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up\n\t// to 512 chars.\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Resources (e.g. repositories, files) to mount into each session's container.\n\t// Maximum 500.\n\tResources []DeploymentNewParamsResourceUnion `json:\"resources,omitzero\"`\n\t// 5-field POSIX cron schedule. Literal wall-clock matching in the configured\n\t// timezone.\n\tSchedule ManagedAgentsScheduleParams `json:\"schedule,omitzero\"`\n\t// Vault IDs for stored credentials the agent can use during sessions created from\n\t// this deployment. Maximum 50.\n\tVaultIDs []string `json:\"vault_ids,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DeploymentNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *DeploymentNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentNewParamsAgentUnion struct {\n\tOfString              param.Opt[string]         `json:\",omitzero,inline\"`\n\tOfManagedAgentsAgents *ManagedAgentsAgentParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u DeploymentNewParamsAgentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *DeploymentNewParamsAgentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentNewParamsResourceUnion struct {\n\tOfGitRepository    *ManagedAgentsGitRepositoryResourceParams    `json:\",omitzero,inline\"`\n\tOfGitHubRepository *ManagedAgentsGitHubRepositoryResourceParams `json:\",omitzero,inline\"`\n\tOfFile             *ManagedAgentsFileResourceParams             `json:\",omitzero,inline\"`\n\tOfMemoryStore      *ManagedAgentsMemoryStoreResourceParam       `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetAccess() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetAuthorizationToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetCheckout() *ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetInstructions() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetMemoryStoreID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetMountPath() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetPassword() *string\n```\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentNewParamsResourceUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *DeploymentNewParamsResourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentPauseParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeploymentRunGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeploymentRunListParams struct {\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Return runs created strictly after this time (exclusive).\n\tCreatedAtGt param.Opt[time.Time] `query:\"created_at[gt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return runs created at or after this time (inclusive).\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return runs created strictly before this time (exclusive).\n\tCreatedAtLt param.Opt[time.Time] `query:\"created_at[lt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return runs created at or before this time (inclusive).\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Filter to a specific deployment. Omit to list across all deployments in the\n\t// workspace. Filtering by a non-existent `deployment_id` returns 200 with empty\n\t// data.\n\tDeploymentID param.Opt[string] `query:\"deployment_id,omitzero\" json:\"-\"`\n\t// Filter: true for runs with non-null `error`, false for runs with non-null\n\t// `session_id`. Omit for all.\n\tHasError param.Opt[bool] `query:\"has_error,omitzero\" json:\"-\"`\n\t// Maximum results per page. Default 20, maximum 1000.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor. Pass `next_page` from the previous response. Invalid\n\t// or expired cursors return 400.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Filter runs by what triggered them. Omit to return all runs.\n\t//\n\t// Any of \"schedule\", \"manual\".\n\tTriggerType ManagedAgentsTriggerType `query:\"trigger_type,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DeploymentRunListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [DeploymentRunListParams](#DeploymentRunListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype DeploymentRunParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeploymentRunService struct {\n\tOptions []option.RequestOption\n}\n```\nDeploymentRunService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewDeploymentRunService](#NewDeploymentRunService) method instead.\n\n```go\nfunc NewDeploymentRunService(opts ...option.RequestOption) (r DeploymentRunService)\n```\nNewDeploymentRunService 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.\n\n```go\nfunc (r *DeploymentRunService) Get(ctx context.Context, deploymentRunID string, query DeploymentRunGetParams, opts ...option.RequestOption) (res *ManagedAgentsDeploymentRun, err error)\n```\nGet Deployment Run\n\n```go\nfunc (r *DeploymentRunService) List(ctx context.Context, params DeploymentRunListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsDeploymentRun], err error)\n```\nList Deployment Runs\n\n```go\nfunc (r *DeploymentRunService) ListAutoPaging(ctx context.Context, params DeploymentRunListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsDeploymentRun]\n```\nList Deployment Runs\n\n```go\ntype DeploymentScopedRunGetParams struct {\n\tWorkspaceID param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\tBetas       []QoderBeta       `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r *DeploymentScopedRunGetParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentScopedRunListParams struct {\n\tLimit           param.Opt[int64]  `query:\"limit,omitzero\" json:\"-\"`\n\tPage            param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\tAfterID         param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\tBeforeID        param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tTriggeredAfter  param.Opt[string] `query:\"triggered_after,omitzero\" json:\"-\"`\n\tTriggeredBefore param.Opt[string] `query:\"triggered_before,omitzero\" json:\"-\"`\n\tWorkspaceID     param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\tBetas           []QoderBeta       `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DeploymentScopedRunListParams) URLQuery() (url.Values, error)\n```\n\n```go\nfunc (r *DeploymentScopedRunListParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentScopedRunService struct{ Options []option.RequestOption }\n```\n\n```go\nfunc NewDeploymentScopedRunService(opts ...option.RequestOption) DeploymentScopedRunService\n```\n\n```go\nfunc (r *DeploymentScopedRunService) Get(ctx context.Context, deploymentID string, runID string, params DeploymentScopedRunGetParams, opts ...option.RequestOption) (res *ManagedAgentsDeploymentRun, err error)\n```\nGet DeploymentScopedRun.\n\n```go\nfunc (r *DeploymentScopedRunService) List(ctx context.Context, deploymentID string, params DeploymentScopedRunListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsDeploymentRun], err error)\n```\nList DeploymentScopedRun.\n\n```go\nfunc (r *DeploymentScopedRunService) ListAutoPaging(ctx context.Context, deploymentID string, params DeploymentScopedRunListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsDeploymentRun]\n```\n\n```go\ntype DeploymentSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Deployment status: active or paused.\n\tStatus param.Opt[string] `json:\"status,omitzero\"`\n\t// Include archived resources; defaults to false.\n\tIncludeArchived param.Opt[bool] `json:\"include_archived,omitzero\"`\n\t// Filter by agent id.\n\tAgentID param.Opt[string] `json:\"agent_id,omitzero\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtGte param.Opt[time.Time] `json:\"created_at[gte],omitzero\" format:\"date-time\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtLte param.Opt[time.Time] `json:\"created_at[lte],omitzero\" format:\"date-time\"`\n\tWorkspaceID  param.Opt[string]    `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nDeploymentSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r DeploymentSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *DeploymentSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentService struct {\n\tOptions []option.RequestOption\n\tRuns    DeploymentScopedRunService\n}\n```\nDeploymentService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewDeploymentService](#NewDeploymentService) method instead.\n\n```go\nfunc NewDeploymentService(opts ...option.RequestOption) (r DeploymentService)\n```\nNewDeploymentService 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.\n\n```go\nfunc (r *DeploymentService) Archive(ctx context.Context, deploymentID string, body DeploymentArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)\n```\nArchive Deployment\n\n```go\nfunc (r *DeploymentService) Get(ctx context.Context, deploymentID string, query DeploymentGetParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)\n```\nGet Deployment\n\n```go\nfunc (r *DeploymentService) List(ctx context.Context, params DeploymentListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsDeployment], err error)\n```\nList Deployments\n\n```go\nfunc (r *DeploymentService) ListAutoPaging(ctx context.Context, params DeploymentListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsDeployment]\n```\nList Deployments\n\n```go\nfunc (r *DeploymentService) New(ctx context.Context, params DeploymentNewParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)\n```\nCreate Deployment\n\n```go\nfunc (r *DeploymentService) Pause(ctx context.Context, deploymentID string, body DeploymentPauseParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)\n```\nPause Deployment\n\n```go\nfunc (r *DeploymentService) Run(ctx context.Context, deploymentID string, body DeploymentRunParams, opts ...option.RequestOption) (res *ManagedAgentsDeploymentRun, err error)\n```\nRun Deployment Now\n\n```go\nfunc (r *DeploymentService) Search(ctx context.Context, params DeploymentSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[ManagedAgentsDeployment], error)\n```\nSearch deployments by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *DeploymentService) SearchAutoPaging(ctx context.Context, params DeploymentSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsDeployment]\n```\nSearchAutoPaging iterates all matching deployments using opaque body cursors.\n\n```go\nfunc (r *DeploymentService) Unpause(ctx context.Context, deploymentID string, body DeploymentUnpauseParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)\n```\nUnpause Deployment\n\n```go\nfunc (r *DeploymentService) Update(ctx context.Context, deploymentID string, params DeploymentUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsDeployment, err error)\n```\nUpdate Deployment\n\n```go\ntype DeploymentUnpauseParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DeploymentUpdateParams struct {\n\tEnvironmentVariables param.Opt[string] `json:\"environment_variables,omitzero\"`\n\n\t// Description. Omit to preserve; send empty string or null to clear.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// ID of the `environment` where sessions run. Omit to preserve. Cannot be cleared.\n\tEnvironmentID param.Opt[string] `json:\"environment_id,omitzero\"`\n\t// Omit to preserve the tunnel binding, set an ID to replace it, or pass null to clear it.\n\tTunnelID param.Opt[string] `json:\"tunnel_id,omitzero\" api:\"nullable\"`\n\t// Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Metadata patch. Set a key to a string to upsert it, or to null to delete it.\n\t// Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars\n\t// each) with values up to 512 chars.\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\t// Session resources. Full replacement. Omit to preserve; send empty array or null\n\t// to clear. Maximum 500.\n\tResources []DeploymentUpdateParamsResourceUnion `json:\"resources,omitzero\"`\n\t// Vault IDs. Full replacement. Omit to preserve; send empty array or null to\n\t// clear. Maximum 50.\n\tVaultIDs []string `json:\"vault_ids,omitzero\"`\n\t// Agent to deploy. Accepts the `agent` ID string, which re-pins to the latest\n\t// version, or an `agent` object with both id and version specified. Omit to\n\t// preserve. Cannot be cleared.\n\tAgent DeploymentUpdateParamsAgentUnion `json:\"agent,omitzero\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimitParam `json:\"budget,omitzero\"`\n\t// Initial events. Full replacement. Omit to preserve. Cannot be cleared. At least\n\t// 1, maximum 50.\n\tInitialEvents []ManagedAgentsDeploymentInitialEventParamsUnion `json:\"initial_events,omitzero\"`\n\t// 5-field POSIX cron schedule. Literal wall-clock matching in the configured\n\t// timezone.\n\tSchedule ManagedAgentsScheduleParams `json:\"schedule,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DeploymentUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *DeploymentUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentUpdateParamsAgentUnion struct {\n\tOfString              param.Opt[string]         `json:\",omitzero,inline\"`\n\tOfManagedAgentsAgents *ManagedAgentsAgentParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u DeploymentUpdateParamsAgentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *DeploymentUpdateParamsAgentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DeploymentUpdateParamsResourceUnion struct {\n\tOfGitRepository    *ManagedAgentsGitRepositoryResourceParams    `json:\",omitzero,inline\"`\n\tOfGitHubRepository *ManagedAgentsGitHubRepositoryResourceParams `json:\",omitzero,inline\"`\n\tOfFile             *ManagedAgentsFileResourceParams             `json:\",omitzero,inline\"`\n\tOfMemoryStore      *ManagedAgentsMemoryStoreResourceParam       `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetAccess() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetAuthorizationToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetCheckout() *ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetInstructions() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetMemoryStoreID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetMountPath() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetPassword() *string\n```\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DeploymentUpdateParamsResourceUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *DeploymentUpdateParamsResourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DirectCallerParam struct {\n\tType constant.Direct `json:\"type\" default:\"direct\"`\n\t// contains filtered or unexported fields\n}\n```\nTool invocation directly from the model.\n\nThis struct has a constant value, construct it with \\[NewDirectCallerParam].\n\n```go\nfunc (r DirectCallerParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *DirectCallerParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Dream struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tEndedAt time.Time `json:\"ended_at\" api:\"required\" format:\"date-time\"`\n\t// Failure detail for a Dream whose `status` is `failed`.\n\tError        DreamError        `json:\"error\" api:\"required\"`\n\tInputs       []DreamInputUnion `json:\"inputs\" api:\"required\"`\n\tInstructions string            `json:\"instructions\" api:\"required\"`\n\t// Model identifier and configuration applied to every pipeline stage. Same wire\n\t// shape as the Agents API ModelConfig.\n\tModel DreamModelConfig `json:\"model\" api:\"required\"`\n\t// The default destination: the job creates a new output memory store as a clone of\n\t// the memory_store input and writes the consolidated memories into it. The input\n\t// store is never mutated.\n\tOutputBehavior OutputBehaviorUnion `json:\"output_behavior\" api:\"required\"`\n\tOutputs        []DreamOutput       `json:\"outputs\" api:\"required\"`\n\tSessionID      string              `json:\"session_id\" api:\"required\"`\n\t// Lifecycle status of a Dream.\n\t//\n\t// Any of \"pending\", \"running\", \"completed\", \"failed\", \"canceled\".\n\tStatus DreamStatus `json:\"status\" api:\"required\"`\n\t// Any of \"dream\".\n\tType DreamType `json:\"type\" api:\"required\"`\n\t// Cumulative token usage for the dream across every pipeline stage.\n\tUsage DreamUsage `json:\"usage\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID             respjson.Field\n\t\tArchivedAt     respjson.Field\n\t\tCreatedAt      respjson.Field\n\t\tEndedAt        respjson.Field\n\t\tError          respjson.Field\n\t\tInputs         respjson.Field\n\t\tInstructions   respjson.Field\n\t\tModel          respjson.Field\n\t\tOutputBehavior respjson.Field\n\t\tOutputs        respjson.Field\n\t\tSessionID      respjson.Field\n\t\tStatus         respjson.Field\n\t\tType           respjson.Field\n\t\tUsage          respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn 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.\n\n```go\nfunc (r Dream) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *Dream) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DreamCancelParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DreamError struct {\n\tMessage string `json:\"message\" api:\"required\"`\n\tType    string `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nFailure detail for a Dream whose \\`status\\` is \\`failed\\`.\n\n```go\nfunc (r DreamError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *DreamError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype DreamInputUnion struct {\n\t// This field is from variant [DreamMemoryStoreInput].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\t// Any of \"memory_store\", \"sessions\".\n\tType string `json:\"type\"`\n\t// This field is from variant [DreamSessionsInput].\n\tSessionIDs []string `json:\"session_ids\"`\n\tJSON       struct {\n\t\tMemoryStoreID respjson.Field\n\t\tType          respjson.Field\n\t\tSessionIDs    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nDreamInputUnion contains all possible properties and values from [DreamMemoryStoreInput](#DreamMemoryStoreInput), [DreamSessionsInput](#DreamSessionsInput).\n\nUse the [DreamInputUnion.AsAny](#DreamInputUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u DreamInputUnion) AsAny() anyDreamInput\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := DreamInputUnion.AsAny().(type) {\n\tcase qoder.DreamMemoryStoreInput:\n\tcase qoder.DreamSessionsInput:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u DreamInputUnion) AsMemoryStore() (v DreamMemoryStoreInput)\n```\n\n```go\nfunc (u DreamInputUnion) AsSessions() (v DreamSessionsInput)\n```\n\n```go\nfunc (u DreamInputUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r DreamInputUnion) ToParam() DreamInputUnionParam\n```\nToParam converts this DreamInputUnion to a DreamInputUnionParam.\n\nWarning: 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()\n\n```go\nfunc (r *DreamInputUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamInputUnionParam struct {\n\tOfMemoryStore *DreamMemoryStoreInputParam `json:\",omitzero,inline\"`\n\tOfSessions    *DreamSessionsInputParam    `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc DreamInputParamOfMemoryStore(memoryStoreID string) DreamInputUnionParam\n```\n\n```go\nfunc DreamInputParamOfSessions(sessionIDs []string) DreamInputUnionParam\n```\n\n```go\nfunc (u DreamInputUnionParam) GetMemoryStoreID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DreamInputUnionParam) GetSessionIDs() []string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DreamInputUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u DreamInputUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *DreamInputUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamListParams struct {\n\t// Return dreams with `created_at` strictly after this timestamp (exclusive lower\n\t// bound, RFC 3339). Unset applies no lower bound.\n\tCreatedAtGt param.Opt[time.Time] `query:\"created_at[gt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return dreams with `created_at` strictly before this timestamp (exclusive upper\n\t// bound, RFC 3339). Unset applies no upper bound.\n\tCreatedAtLt param.Opt[time.Time] `query:\"created_at[lt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Query parameter for include_archived\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Query parameter for limit\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Query parameter for page\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Filter by lifecycle status. Repeat the parameter to match any of multiple\n\t// statuses. Empty applies no status filter.\n\tStatuses []DreamStatus `query:\"statuses,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DreamListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [DreamListParams](#DreamListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype DreamMemoryStoreInput struct {\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType DreamMemoryStoreInputType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMemoryStoreID respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn 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.\n\n```go\nfunc (r DreamMemoryStoreInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r DreamMemoryStoreInput) ToParam() DreamMemoryStoreInputParam\n```\nToParam converts this DreamMemoryStoreInput to a DreamMemoryStoreInputParam.\n\nWarning: 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()\n\n```go\nfunc (r *DreamMemoryStoreInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamMemoryStoreInputParam struct {\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType DreamMemoryStoreInputType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nAn 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.\n\nThe properties MemoryStoreID, Type are required.\n\n```go\nfunc (r DreamMemoryStoreInputParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *DreamMemoryStoreInputParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamMemoryStoreInputType string\n```\n\n```go\nconst (\n\tDreamMemoryStoreInputTypeMemoryStore DreamMemoryStoreInputType = \"memory_store\"\n)\n```\n\n```go\ntype DreamModelConfig struct {\n\tID            string `json:\"id\"`\n\tEffort        string `json:\"effort\"`\n\tContextWindow int64  `json:\"context_window\"`\n\tJSON          struct {\n\t\tID            respjson.Field\n\t\tEffort        respjson.Field\n\t\tContextWindow respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nModel identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig.\n\n```go\nfunc (r DreamModelConfig) RawJSON() string\n```\n\n```go\nfunc (r *DreamModelConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamModelConfigParam struct {\n\tID            string            `json:\"id\" api:\"required\"`\n\tEffort        param.Opt[string] `json:\"effort,omitzero\"`\n\tContextWindow param.Opt[int64]  `json:\"context_window,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nDreamModelConfigParam selects an available model and optional reasoning settings.\n\n```go\nfunc (r DreamModelConfigParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *DreamModelConfigParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamNewParams struct {\n\tInputs []DreamInputUnionParam `json:\"inputs,omitzero\" api:\"required\"`\n\t// Model identifier and configuration applied to every pipeline stage.\n\tModel        DreamNewParamsModelUnion `json:\"model,omitzero\"`\n\tInstructions param.Opt[string]        `json:\"instructions,omitzero\"`\n\t// The default destination: the job creates a new output memory store as a clone of\n\t// the memory_store input and writes the consolidated memories into it. The input\n\t// store is never mutated.\n\tOutputBehavior OutputBehaviorUnionParam `json:\"output_behavior,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r DreamNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *DreamNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamNewParamsModelUnion struct {\n\tOfString           param.Opt[string]      `json:\",omitzero,inline\"`\n\tOfDreamModelConfig *DreamModelConfigParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u DreamNewParamsModelUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *DreamNewParamsModelUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamOutput struct {\n\t// Paths of memory files created, modified or deleted.\n\tFilesTouched  []string `json:\"files_touched\"`\n\tMemoryStoreID string   `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType DreamOutputType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFilesTouched  respjson.Field\n\t\tMemoryStoreID respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn output memory store the dream writes consolidated memories into.\n\n```go\nfunc (r DreamOutput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *DreamOutput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamOutputType string\n```\n\n```go\nconst (\n\tDreamOutputTypeMemoryStore DreamOutputType = \"memory_store\"\n)\n```\n\n```go\ntype DreamService struct {\n\tOptions []option.RequestOption\n}\n```\nDreamService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewDreamService](#NewDreamService) method instead.\n\n```go\nfunc NewDreamService(opts ...option.RequestOption) (r DreamService)\n```\nNewDreamService 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.\n\n```go\nfunc (r *DreamService) Archive(ctx context.Context, dreamID string, body DreamArchiveParams, opts ...option.RequestOption) (res *Dream, err error)\n```\nArchive a Dream\n\n```go\nfunc (r *DreamService) Cancel(ctx context.Context, dreamID string, body DreamCancelParams, opts ...option.RequestOption) (res *Dream, err error)\n```\nCancel a Dream\n\n```go\nfunc (r *DreamService) Get(ctx context.Context, dreamID string, query DreamGetParams, opts ...option.RequestOption) (res *Dream, err error)\n```\nGet a Dream\n\n```go\nfunc (r *DreamService) List(ctx context.Context, params DreamListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Dream], err error)\n```\nList Dreams\n\n```go\nfunc (r *DreamService) ListAutoPaging(ctx context.Context, params DreamListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Dream]\n```\nList Dreams\n\n```go\nfunc (r *DreamService) New(ctx context.Context, params DreamNewParams, opts ...option.RequestOption) (res *Dream, err error)\n```\nCreate a Dream\n\n```go\ntype DreamSessionsInput struct {\n\tSessionIDs []string `json:\"session_ids\" api:\"required\"`\n\t// Any of \"sessions\".\n\tType DreamSessionsInputType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSessionIDs  respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput session transcripts the dream reads.\n\n```go\nfunc (r DreamSessionsInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r DreamSessionsInput) ToParam() DreamSessionsInputParam\n```\nToParam converts this DreamSessionsInput to a DreamSessionsInputParam.\n\nWarning: 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()\n\n```go\nfunc (r *DreamSessionsInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamSessionsInputParam struct {\n\tSessionIDs []string `json:\"session_ids,omitzero\" api:\"required\"`\n\t// Any of \"sessions\".\n\tType DreamSessionsInputType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nInput session transcripts the dream reads.\n\nThe properties SessionIDs, Type are required.\n\n```go\nfunc (r DreamSessionsInputParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *DreamSessionsInputParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype DreamSessionsInputType string\n```\n\n```go\nconst (\n\tDreamSessionsInputTypeSessions DreamSessionsInputType = \"sessions\"\n)\n```\n\n```go\ntype DreamStatus string\n```\nLifecycle status of a Dream.\n\n```go\nconst (\n\tDreamStatusPending   DreamStatus = \"pending\"\n\tDreamStatusRunning   DreamStatus = \"running\"\n\tDreamStatusCompleted DreamStatus = \"completed\"\n\tDreamStatusFailed    DreamStatus = \"failed\"\n\tDreamStatusCanceled  DreamStatus = \"canceled\"\n)\n```\n\n```go\ntype DreamType string\n```\n\n```go\nconst (\n\tDreamTypeDream DreamType = \"dream\"\n)\n```\n\n```go\ntype DreamUsage struct {\n\t// Total tokens used to create prompt-cache entries (sum of all TTL tiers).\n\tCacheCreationInputTokens int64 `json:\"cache_creation_input_tokens\" api:\"required\"`\n\t// Total tokens read from prompt cache.\n\tCacheReadInputTokens int64 `json:\"cache_read_input_tokens\" api:\"required\"`\n\t// Total uncached input tokens consumed across every pipeline stage.\n\tInputTokens int64 `json:\"input_tokens\" api:\"required\"`\n\t// Total output tokens generated across every pipeline stage.\n\tOutputTokens int64 `json:\"output_tokens\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCacheCreationInputTokens respjson.Field\n\t\tCacheReadInputTokens     respjson.Field\n\t\tInputTokens              respjson.Field\n\t\tOutputTokens             respjson.Field\n\t\tExtraFields              map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCumulative token usage for the dream across every pipeline stage.\n\n```go\nfunc (r DreamUsage) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *DreamUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EffortCapability struct {\n\t// Whether the model supports high effort level.\n\tHigh CapabilitySupport `json:\"high\" api:\"required\"`\n\t// Whether the model supports low effort level.\n\tLow CapabilitySupport `json:\"low\" api:\"required\"`\n\t// Whether the model supports max effort level.\n\tMax CapabilitySupport `json:\"max\" api:\"required\"`\n\t// Whether the model supports medium effort level.\n\tMedium CapabilitySupport `json:\"medium\" api:\"required\"`\n\t// Whether this capability is supported by the model.\n\tSupported bool `json:\"supported\" api:\"required\"`\n\t// Indicates whether a capability is supported.\n\tXhigh CapabilitySupport `json:\"xhigh\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tHigh        respjson.Field\n\t\tLow         respjson.Field\n\t\tMax         respjson.Field\n\t\tMedium      respjson.Field\n\t\tSupported   respjson.Field\n\t\tXhigh       respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEffort (reasoning\\_effort) capability details.\n\n```go\nfunc (r EffortCapability) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *EffortCapability) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EncryptedCodeExecutionResultBlockParam struct {\n\tContent         []CodeExecutionOutputBlockParam `json:\"content,omitzero\" api:\"required\"`\n\tEncryptedStdout string                          `json:\"encrypted_stdout\" api:\"required\"`\n\tReturnCode      int64                           `json:\"return_code\" api:\"required\"`\n\tStderr          string                          `json:\"stderr\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"encrypted_code_execution_result\".\n\tType constant.EncryptedCodeExecutionResult `json:\"type\" default:\"encrypted_code_execution_result\"`\n\t// contains filtered or unexported fields\n}\n```\nCode execution result with encrypted stdout for PFC + web\\_search results.\n\nThe properties Content, EncryptedStdout, ReturnCode, Stderr, Type are required.\n\n```go\nfunc (r EncryptedCodeExecutionResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *EncryptedCodeExecutionResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Environment struct {\n\t// Environment identifier (e.g., 'env\\_...')\n\tID string `json:\"id\" api:\"required\"`\n\t// RFC 3339 timestamp when environment was archived, or null if not archived\n\tArchivedAt string `json:\"archived_at\" api:\"required\"`\n\t// Environment configuration (either Qoder Cloud or self-hosted)\n\tConfig EnvironmentConfigUnion `json:\"config\" api:\"required\"`\n\t// RFC 3339 timestamp when environment was created\n\tCreatedAt string `json:\"created_at\" api:\"required\"`\n\t// User-provided description for the environment; null when unset\n\tDescription string `json:\"description\" api:\"required\"`\n\t// User-provided metadata key-value pairs\n\tMetadata map[string]string `json:\"metadata\" api:\"required\"`\n\t// Human-readable name for the environment\n\tName string `json:\"name\" api:\"required\"`\n\t// The type of object (always 'environment')\n\tType constant.Environment `json:\"type\" default:\"environment\"`\n\t// RFC 3339 timestamp when environment was last updated\n\tUpdatedAt string `json:\"updated_at\" api:\"required\"`\n\t// The visibility scope for this environment. 'organization' means visible to all\n\t// accounts. 'account' means visible only to the owning account.\n\t//\n\t// Any of \"organization\", \"account\".\n\tScope EnvironmentScope `json:\"scope\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tArchivedAt  respjson.Field\n\t\tConfig      respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tDescription respjson.Field\n\t\tMetadata    respjson.Field\n\t\tName        respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tScope       respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nUnified Environment resource for both cloud and self-hosted environments.\n\n```go\nfunc (r Environment) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *Environment) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype EnvironmentConfigUnion struct {\n\t// Set Betas to include \"oss-bucket-2026-09-23\" when buckets remain configured.\n\tStorage BucketStorage `json:\"storage\"`\n\t// Runs on sandbox start/resume; self-hosted execution depends on the worker.\n\tStartupScript string `json:\"startup_script\"`\n\tSetupScript   string `json:\"setup_script\"`\n\t// This field is from variant [CloudConfig].\n\tNetworking CloudConfigNetworkingUnion `json:\"networking\"`\n\t// This field is from variant [CloudConfig].\n\tPackages Packages `json:\"packages\"`\n\t// Any of \"cloud\", \"self_hosted\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tStorage       respjson.Field\n\t\tStartupScript respjson.Field\n\t\tSetupScript   respjson.Field\n\t\tNetworking    respjson.Field\n\t\tPackages      respjson.Field\n\t\tType          respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEnvironmentConfigUnion contains all possible properties and values from [CloudConfig](#CloudConfig), [SelfHostedConfig](#SelfHostedConfig).\n\nUse the [EnvironmentConfigUnion.AsAny](#EnvironmentConfigUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u EnvironmentConfigUnion) AsAny() anyEnvironmentConfig\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := EnvironmentConfigUnion.AsAny().(type) {\n\tcase qoder.CloudConfig:\n\tcase qoder.SelfHostedConfig:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u EnvironmentConfigUnion) AsCloud() (v CloudConfig)\n```\n\n```go\nfunc (u EnvironmentConfigUnion) AsSelfHosted() (v SelfHostedConfig)\n```\n\n```go\nfunc (u EnvironmentConfigUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *EnvironmentConfigUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentDeleteParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype EnvironmentDeleteResponse struct {\n\t// Environment identifier\n\tID string `json:\"id\" api:\"required\"`\n\t// The type of response\n\t//\n\t// Any of \"environment_deleted\".\n\tType EnvironmentDeleteResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResponse after deleting an environment.\n\n```go\nfunc (r EnvironmentDeleteResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *EnvironmentDeleteResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentDeleteResponseType string\n```\nThe type of response\n\n```go\nconst (\n\tEnvironmentDeleteResponseTypeEnvironmentDeleted EnvironmentDeleteResponseType = \"environment_deleted\"\n)\n```\n\n```go\ntype EnvironmentGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype EnvironmentListParams struct {\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\n\t// Opaque cursor from previous response for pagination. Pass the `next_page` value\n\t// from the previous response.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Include archived environments in the response\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum number of environments to return\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [EnvironmentListParams](#EnvironmentListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype EnvironmentNewParams struct {\n\t// Human-readable name for the environment\n\tName string `json:\"name\" api:\"required\"`\n\t// Optional description of the environment\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// Environment configuration\n\tConfig EnvironmentNewParamsConfigUnion `json:\"config,omitzero\"`\n\t// The visibility scope for this environment. 'organization' makes the environment\n\t// visible to all accounts. 'account' restricts visibility to the owning account\n\t// only. Only applicable for self-hosted environments. If not specified, defaults\n\t// based on organization type.\n\t//\n\t// Any of \"organization\", \"account\".\n\tScope EnvironmentNewParamsScope `json:\"scope,omitzero\"`\n\t// User-provided metadata key-value pairs\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *EnvironmentNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentNewParamsConfigUnion struct {\n\tOfCloud      *CloudConfigParams      `json:\",omitzero,inline\"`\n\tOfSelfHosted *SelfHostedConfigParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u EnvironmentNewParamsConfigUnion) GetNetworking() *CloudConfigParamsNetworkingUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u EnvironmentNewParamsConfigUnion) GetPackages() *PackagesParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u EnvironmentNewParamsConfigUnion) GetSetupScript() *string\n```\nReturns the setup script from the selected configuration, if present.\n\n```go\nfunc (u EnvironmentNewParamsConfigUnion) GetStartupScript() *string\n```\n\n```go\nfunc (u EnvironmentNewParamsConfigUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u EnvironmentNewParamsConfigUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *EnvironmentNewParamsConfigUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentNewParamsScope string\n```\nThe 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.\n\n```go\nconst (\n\tEnvironmentNewParamsScopeOrganization EnvironmentNewParamsScope = \"organization\"\n\tEnvironmentNewParamsScopeAccount      EnvironmentNewParamsScope = \"account\"\n)\n```\n\n```go\ntype EnvironmentScope string\n```\nThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.\n\n```go\nconst (\n\tEnvironmentScopeOrganization EnvironmentScope = \"organization\"\n\tEnvironmentScopeAccount      EnvironmentScope = \"account\"\n)\n```\n\n```go\ntype EnvironmentSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Include archived resources; defaults to false.\n\tIncludeArchived param.Opt[bool] `json:\"include_archived,omitzero\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtGte param.Opt[time.Time] `json:\"created_at[gte],omitzero\" format:\"date-time\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtLte param.Opt[time.Time] `json:\"created_at[lte],omitzero\" format:\"date-time\"`\n\tWorkspaceID  param.Opt[string]    `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nEnvironmentSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r EnvironmentSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *EnvironmentSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentService struct {\n\tOptions []option.RequestOption\n\tWork    EnvironmentWorkService\n}\n```\nEnvironmentService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewEnvironmentService](#NewEnvironmentService) method instead.\n\n```go\nfunc NewEnvironmentService(opts ...option.RequestOption) (r EnvironmentService)\n```\nNewEnvironmentService 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.\n\n```go\nfunc (r *EnvironmentService) Archive(ctx context.Context, environmentID string, body EnvironmentArchiveParams, opts ...option.RequestOption) (res *Environment, err error)\n```\nArchive an environment by ID. Archived environments cannot be used to create new sessions.\n\n```go\nfunc (r *EnvironmentService) Delete(ctx context.Context, environmentID string, body EnvironmentDeleteParams, opts ...option.RequestOption) (res *EnvironmentDeleteResponse, err error)\n```\nDelete an environment by ID. Returns a confirmation of the deletion.\n\n```go\nfunc (r *EnvironmentService) Get(ctx context.Context, environmentID string, query EnvironmentGetParams, opts ...option.RequestOption) (res *Environment, err error)\n```\nRetrieve a specific environment by ID.\n\n```go\nfunc (r *EnvironmentService) List(ctx context.Context, params EnvironmentListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Environment], err error)\n```\nList environments with pagination support.\n\n```go\nfunc (r *EnvironmentService) ListAutoPaging(ctx context.Context, params EnvironmentListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Environment]\n```\nList environments with pagination support.\n\n```go\nfunc (r *EnvironmentService) New(ctx context.Context, params EnvironmentNewParams, opts ...option.RequestOption) (res *Environment, err error)\n```\nCreate a new environment with the specified configuration.\n\n```go\nfunc (r *EnvironmentService) Search(ctx context.Context, params EnvironmentSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Environment], error)\n```\nSearch environments by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *EnvironmentService) SearchAutoPaging(ctx context.Context, params EnvironmentSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Environment]\n```\nSearchAutoPaging iterates all matching environments using opaque body cursors.\n\n```go\nfunc (r *EnvironmentService) Update(ctx context.Context, environmentID string, params EnvironmentUpdateParams, opts ...option.RequestOption) (res *Environment, err error)\n```\nUpdate an existing environment's configuration.\n\n```go\ntype EnvironmentUpdateParams struct {\n\t// Updated description of the environment. Omit to preserve; null clears to null;\n\t// an empty string is stored as an empty string.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// Updated name for the environment\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Updated environment configuration\n\tConfig EnvironmentUpdateParamsConfigUnion `json:\"config,omitzero\"`\n\t// The visibility scope for this environment. 'organization' makes the environment\n\t// visible to all accounts. 'account' restricts visibility to the owning account\n\t// only.\n\t//\n\t// Any of \"organization\", \"account\".\n\tScope EnvironmentUpdateParamsScope `json:\"scope,omitzero\"`\n\t// User-provided metadata key-value pairs. Set a value to null or empty string to\n\t// delete the key.\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *EnvironmentUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentUpdateParamsConfigUnion struct {\n\tOfCloud      *CloudConfigParams      `json:\",omitzero,inline\"`\n\tOfSelfHosted *SelfHostedConfigParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u EnvironmentUpdateParamsConfigUnion) GetNetworking() *CloudConfigParamsNetworkingUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u EnvironmentUpdateParamsConfigUnion) GetPackages() *PackagesParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u EnvironmentUpdateParamsConfigUnion) GetSetupScript() *string\n```\nReturns the setup script from the selected configuration, if present.\n\n```go\nfunc (u EnvironmentUpdateParamsConfigUnion) GetStartupScript() *string\n```\n\n```go\nfunc (u EnvironmentUpdateParamsConfigUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u EnvironmentUpdateParamsConfigUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *EnvironmentUpdateParamsConfigUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentUpdateParamsScope string\n```\nThe visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only.\n\n```go\nconst (\n\tEnvironmentUpdateParamsScopeOrganization EnvironmentUpdateParamsScope = \"organization\"\n\tEnvironmentUpdateParamsScopeAccount      EnvironmentUpdateParamsScope = \"account\"\n)\n```\n\n```go\ntype EnvironmentWorkAckParams struct {\n\tEnvironmentID string `path:\"environment_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype EnvironmentWorkGetParams struct {\n\tEnvironmentID string `path:\"environment_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype EnvironmentWorkHeartbeatParams struct {\n\tEnvironmentID string `path:\"environment_id\" api:\"required\" json:\"-\"`\n\t// Desired TTL in seconds\n\tDesiredTTLSeconds param.Opt[int64] `query:\"desired_ttl_seconds,omitzero\" json:\"-\"`\n\t// Expected last_heartbeat for conditional update (optimistic concurrency). Use\n\t// literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For\n\t// subsequent heartbeats, echo the server's previous last_heartbeat value exactly.\n\t// Returns 412 Precondition Failed if the actual value doesn't match.\n\tExpectedLastHeartbeat param.Opt[string] `query:\"expected_last_heartbeat,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentWorkHeartbeatParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [EnvironmentWorkHeartbeatParams](#EnvironmentWorkHeartbeatParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype EnvironmentWorkListParams struct {\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Opaque cursor from previous response for pagination\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Maximum number of work items to return\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentWorkListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [EnvironmentWorkListParams](#EnvironmentWorkListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype EnvironmentWorkPollParams struct {\n\t// How long to wait for work to arrive before returning. Must be 1-999 in\n\t// milliseconds. Defaults to non-blocking (returns immediately if no work is\n\t// available).\n\tBlockMs param.Opt[int64] `query:\"block_ms,omitzero\" json:\"-\"`\n\t// Reclaim unacknowledged work items older than this many milliseconds. If omitted,\n\t// uses the default (5000ms).\n\tReclaimOlderThanMs param.Opt[int64] `query:\"reclaim_older_than_ms,omitzero\" json:\"-\"`\n\t// Unique identifier for the specific worker polling, used to track aggregated\n\t// environment-level work metrics in Console\n\tQoderWorkerID param.Opt[string] `header:\"Worker-ID,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentWorkPollParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [EnvironmentWorkPollParams](#EnvironmentWorkPollParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype EnvironmentWorkService struct {\n\tOptions []option.RequestOption\n}\n```\nEnvironmentWorkService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewEnvironmentWorkService](#NewEnvironmentWorkService) method instead.\n\n```go\nfunc NewEnvironmentWorkService(opts ...option.RequestOption) (r EnvironmentWorkService)\n```\nNewEnvironmentWorkService 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.\n\n```go\nfunc (r *EnvironmentWorkService) Ack(ctx context.Context, workID string, params EnvironmentWorkAckParams, opts ...option.RequestOption) (res *SelfHostedWork, err error)\n```\nNote: 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.\n\nAcknowledge receipt of a work item, transitioning it from 'queued' to 'starting' and removing it from the queue.\n\n```go\nfunc (r *EnvironmentWorkService) Get(ctx context.Context, workID string, params EnvironmentWorkGetParams, opts ...option.RequestOption) (res *SelfHostedWork, err error)\n```\nNote: 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.\n\nRetrieve detailed information about a specific work item.\n\n```go\nfunc (r *EnvironmentWorkService) Heartbeat(ctx context.Context, workID string, params EnvironmentWorkHeartbeatParams, opts ...option.RequestOption) (res *SelfHostedWorkHeartbeatResponse, err error)\n```\nNote: 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.\n\nRecord a heartbeat for a work item to maintain the lease.\n\n```go\nfunc (r *EnvironmentWorkService) List(ctx context.Context, environmentID string, params EnvironmentWorkListParams, opts ...option.RequestOption) (res *pagination.PageCursor[SelfHostedWork], err error)\n```\nNote: 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.\n\nList work items in an environment.\n\n```go\nfunc (r *EnvironmentWorkService) ListAutoPaging(ctx context.Context, environmentID string, params EnvironmentWorkListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[SelfHostedWork]\n```\nNote: 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.\n\nList work items in an environment.\n\n```go\nfunc (r *EnvironmentWorkService) Poll(ctx context.Context, environmentID string, params EnvironmentWorkPollParams, opts ...option.RequestOption) (res *SelfHostedWork, err error)\n```\nNote: 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.\n\nLong poll for work items in the queue.\n\n```go\nfunc (r *EnvironmentWorkService) Stats(ctx context.Context, environmentID string, query EnvironmentWorkStatsParams, opts ...option.RequestOption) (res *SelfHostedWorkQueueStats, err error)\n```\nGet statistics about the work queue for an environment.\n\n```go\nfunc (r *EnvironmentWorkService) Stop(ctx context.Context, workID string, params EnvironmentWorkStopParams, opts ...option.RequestOption) (res *SelfHostedWork, err error)\n```\nNote: 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.\n\nStop a work item, initiating graceful or forced shutdown.\n\n```go\nfunc (r *EnvironmentWorkService) Update(ctx context.Context, workID string, params EnvironmentWorkUpdateParams, opts ...option.RequestOption) (res *SelfHostedWork, err error)\n```\nNote: 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.\n\nUpdate work item metadata with merge semantics.\n\n```go\ntype EnvironmentWorkStatsParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype EnvironmentWorkStopParams struct {\n\tEnvironmentID string `path:\"environment_id\" api:\"required\" json:\"-\"`\n\t// Request to stop a work item.\n\tSelfHostedWorkStopRequest SelfHostedWorkStopRequestParam\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentWorkStopParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *EnvironmentWorkStopParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype EnvironmentWorkUpdateParams struct {\n\tEnvironmentID string `path:\"environment_id\" api:\"required\" json:\"-\"`\n\t// Request to update work item metadata.\n\tSelfHostedWorkUpdateRequest SelfHostedWorkUpdateRequestParam\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r EnvironmentWorkUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *EnvironmentWorkUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Error = convention.Error\n```\nError is the standard Qoder HTTP error.\n\n```go\ntype FallbackBlockParam struct {\n\t// Identifies one hop of a fallback transition.\n\tFrom FallbackInfoParam `json:\"from,omitzero\" api:\"required\"`\n\t// Identifies one hop of a fallback transition.\n\tTo FallbackInfoParam `json:\"to,omitzero\" api:\"required\"`\n\t// The response block's `trigger`, echoed verbatim. Accepted and ignored by the\n\t// server; any object or `null` is allowed.\n\tTrigger any `json:\"trigger,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"fallback\".\n\tType constant.Fallback `json:\"type\" default:\"fallback\"`\n\t// contains filtered or unexported fields\n}\n```\nA \\`fallback\\` block echoed back from a prior response.\n\nAccepted in \\`messages\\[].content\\` and not rendered into the prompt; not validated against the request's \\`fallbacks\\` chain or top-level \\`model\\`.\n\nEcho 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.\n\nThe properties From, To, Type are required.\n\n```go\nfunc (r FallbackBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *FallbackBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FallbackInfoParam struct {\n\t// The model that will complete your prompt.\n\t//\n\t// See [models](https://docs.qoder.com/cloud-agents/api/models/list) for additional\n\t// details and options.\n\tModel Model `json:\"model,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nIdentifies one hop of a fallback transition.\n\nThe property Model is required.\n\n```go\nfunc (r FallbackInfoParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *FallbackInfoParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FileDeleteParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype FileDocumentSourceParam struct {\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"file\".\n\tType constant.File `json:\"type\" default:\"file\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties FileID, Type are required.\n\n```go\nfunc (r FileDocumentSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *FileDocumentSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FileDownloadParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype FileGetMetadataParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype FileImageSourceParam struct {\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"file\".\n\tType constant.File `json:\"type\" default:\"file\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties FileID, Type are required.\n\n```go\nfunc (r FileImageSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *FileImageSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FileListParams struct {\n\tName param.Opt[string] `query:\"name,omitzero\" json:\"-\"`\n\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Opaque page cursor returned in a prior list response's `next_page`. Prefixed\n\t// `page_`.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Number of items to return per page.\n\t//\n\t// Defaults to `20`. Ranges from `1` to `1000`.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Filter by scope ID. Only returns files associated with the specified scope\n\t// (e.g., a session ID).\n\tScopeID param.Opt[string] `query:\"scope_id,omitzero\" json:\"-\"`\n\t// Restrict the result set to Files whose `id` is in this list. At most 100 entries\n\t// (after de-duplication). Mutually exclusive with `page` and `limit`. When\n\t// supplied, the response is always a single page (`next_page` is null). IDs that\n\t// do not resolve to a visible File — including deleted Files — are silently\n\t// omitted.\n\tIDs []string `query:\"ids,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r FileListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [FileListParams](#FileListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype FileMetadata struct {\n\tMetadata map[string]string `json:\"metadata\"`\n\tStatus   string            `json:\"status\"`\n\n\t// Unique object identifier.\n\t//\n\t// The format and length of IDs may change over time.\n\tID string `json:\"id\" api:\"required\"`\n\t// RFC 3339 datetime string representing when the file was created.\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Original filename of the uploaded file.\n\tFilename string `json:\"filename\" api:\"required\"`\n\t// MIME type of the file.\n\tMimeType string `json:\"mime_type\" api:\"required\"`\n\t// Size of the file in bytes.\n\tSizeBytes int64 `json:\"size_bytes\" api:\"required\"`\n\t// Object type.\n\t//\n\t// For files, this is always `\"file\"`.\n\tType constant.File `json:\"type\" default:\"file\"`\n\t// Whether the file can be downloaded.\n\tDownloadable bool `json:\"downloadable\"`\n\t// RFC 3339 datetime string representing when the file will expire and become\n\t// unavailable for download. Null if the file does not expire. For files uploaded\n\t// with `expires_in_seconds`, this is the upload time plus that value.\n\tExpiresAt time.Time `json:\"expires_at\" api:\"nullable\" format:\"date-time\"`\n\t// The scope of this file, indicating the context in which it was created (e.g., a\n\t// session).\n\tScope FileScope `json:\"scope\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMetadata respjson.Field\n\t\tStatus   respjson.Field\n\n\t\tID           respjson.Field\n\t\tCreatedAt    respjson.Field\n\t\tFilename     respjson.Field\n\t\tMimeType     respjson.Field\n\t\tSizeBytes    respjson.Field\n\t\tType         respjson.Field\n\t\tDownloadable respjson.Field\n\t\tExpiresAt    respjson.Field\n\t\tScope        respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r FileMetadata) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *FileMetadata) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FileScope struct {\n\t// The ID of the scoping resource (e.g., the session ID).\n\tID string `json:\"id\" api:\"required\"`\n\t// The type of scope (e.g., `\"session\"`).\n\tType constant.Session `json:\"type\" default:\"session\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r FileScope) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *FileScope) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FileSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Resource scope ID, currently a Session ID.\n\tScopeID     param.Opt[string] `json:\"scope_id,omitzero\"`\n\tWorkspaceID param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nFileSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r FileSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *FileSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype FileService struct {\n\tOptions []option.RequestOption\n}\n```\nFileService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewFileService](#NewFileService) method instead.\n\n```go\nfunc NewFileService(opts ...option.RequestOption) (r FileService)\n```\nNewFileService 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.\n\n```go\nfunc (r *FileService) Delete(ctx context.Context, fileID string, body FileDeleteParams, opts ...option.RequestOption) (res *DeletedFile, err error)\n```\nDelete File\n\n```go\nfunc (r *FileService) Download(ctx context.Context, fileID string, query FileDownloadParams, opts ...option.RequestOption) (res *http.Response, err error)\n```\nDownload File\n\n```go\nfunc (r *FileService) GetMetadata(ctx context.Context, fileID string, query FileGetMetadataParams, opts ...option.RequestOption) (res *FileMetadata, err error)\n```\nGet File Metadata\n\n```go\nfunc (r *FileService) List(ctx context.Context, params FileListParams, opts ...option.RequestOption) (res *pagination.PageCursor[FileMetadata], err error)\n```\nList Files\n\n```go\nfunc (r *FileService) ListAutoPaging(ctx context.Context, params FileListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[FileMetadata]\n```\nList Files\n\n```go\nfunc (r *FileService) Search(ctx context.Context, params FileSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[FileMetadata], error)\n```\nSearch files by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *FileService) SearchAutoPaging(ctx context.Context, params FileSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[FileMetadata]\n```\nSearchAutoPaging iterates all matching files using opaque body cursors.\n\n```go\nfunc (r *FileService) Upload(ctx context.Context, params FileUploadParams, opts ...option.RequestOption) (res *FileMetadata, err error)\n```\nUpload File\n\n```go\ntype FileUploadParams struct {\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\n\tMetadata map[string]string `json:\"metadata,omitzero\" api:\"metadata\"`\n\n\t// The file to upload. Only the final path component of the part's `filename` is\n\t// kept; an absent or empty `filename` is replaced with `unnamed` plus the\n\t// extension for the file's stored `mime_type`, when known.\n\tFile io.Reader `json:\"file,omitzero\" api:\"required\" format:\"binary\"`\n\t// Seconds from upload until the file expires and its bytes become permanently\n\t// unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).\n\tExpiresInSeconds param.Opt[int64] `json:\"expires_in_seconds,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r FileUploadParams) MarshalMultipart() (data []byte, contentType string, err error)\n```\n\n```go\ntype HealthCheckWorkData struct {\n\t// Health check identifier\n\tID string `json:\"id\" api:\"required\"`\n\t// Type of work data\n\t//\n\t// Any of \"healthcheck\".\n\tType HealthCheckWorkDataType `json:\"type\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nWork data for environment health checks.\n\nThis 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.\n\n```go\nfunc (r HealthCheckWorkData) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *HealthCheckWorkData) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype HealthCheckWorkDataType string\n```\nType of work data\n\n```go\nconst (\n\tHealthCheckWorkDataTypeHealthcheck HealthCheckWorkDataType = \"healthcheck\"\n)\n```\n\n```go\ntype ImageBlockParam struct {\n\tSource ImageBlockParamSourceUnion `json:\"source,omitzero\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// Configures the transformations the server applies to this image before the model\n\t// observes it. Each key names a condition the server transforms images for; its\n\t// value selects the transformation applied. Omitted keys keep their default\n\t// behavior, and an empty object is equivalent to omitting the field.\n\tTransformations ImageTransformationsParam `json:\"transformations,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"image\".\n\tType constant.Image `json:\"type\" default:\"image\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Source, Type are required.\n\n```go\nfunc (r ImageBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ImageBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ImageBlockParamSourceUnion struct {\n\tOfBase64 *Base64ImageSourceParam `json:\",omitzero,inline\"`\n\tOfURL    *URLImageSourceParam    `json:\",omitzero,inline\"`\n\tOfFile   *FileImageSourceParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ImageBlockParamSourceUnion) GetData() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ImageBlockParamSourceUnion) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ImageBlockParamSourceUnion) GetMediaType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ImageBlockParamSourceUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ImageBlockParamSourceUnion) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ImageBlockParamSourceUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ImageBlockParamSourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ImageTransformationsParam struct {\n\t// What the server does when this image exceeds the model's maximum image size.\n\t// `\"downsize\"` (the default) scales the image down to fit, which changes the\n\t// dimensions the model observes without telling you. `\"error\"` instead rejects the\n\t// request with a 400 error naming the image's dimensions and the largest\n\t// dimensions that fit, so you can scale the image deliberately — your image is\n\t// never silently scaled down.\n\t//\n\t// Any of \"downsize\", \"error\".\n\tOversizedImage ImageTransformationsParamOversizedImage `json:\"oversized_image,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nConfigures 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.\n\n```go\nfunc (r ImageTransformationsParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ImageTransformationsParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ImageTransformationsParamOversizedImage string\n```\nWhat 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.\n\n```go\ntype LimitedNetwork struct {\n\t// Permits outbound access to MCP server endpoints configured on the agent, beyond\n\t// those listed in the `allowed_hosts` array.\n\tAllowMCPServers bool `json:\"allow_mcp_servers\" api:\"required\"`\n\t// Permits outbound access to public package registries (PyPI, npm, etc.) beyond\n\t// those listed in the `allowed_hosts` array.\n\tAllowPackageManagers bool `json:\"allow_package_managers\" api:\"required\"`\n\t// Specifies domains the container can reach.\n\tAllowedHosts []string `json:\"allowed_hosts\" api:\"required\"`\n\t// Network policy type\n\tType constant.Limited `json:\"type\" default:\"limited\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAllowMCPServers      respjson.Field\n\t\tAllowPackageManagers respjson.Field\n\t\tAllowedHosts         respjson.Field\n\t\tType                 respjson.Field\n\t\tExtraFields          map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nLimited network access.\n\n```go\nfunc (r LimitedNetwork) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *LimitedNetwork) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype LimitedNetworkParams struct {\n\t// Permits outbound access to MCP server endpoints configured on the agent, beyond\n\t// those listed in the `allowed_hosts` array. Defaults to `false`.\n\tAllowMCPServers param.Opt[bool] `json:\"allow_mcp_servers,omitzero\"`\n\t// Permits outbound access to public package registries (PyPI, npm, etc.) beyond\n\t// those listed in the `allowed_hosts` array. Defaults to `false` on creation. Must\n\t// be `true` when `packages` are specified.\n\tAllowPackageManagers param.Opt[bool] `json:\"allow_package_managers,omitzero\"`\n\t// Specifies domains the container can reach.\n\tAllowedHosts []string `json:\"allowed_hosts,omitzero\"`\n\t// Network policy type\n\t//\n\t// This field can be elided, and will marshal its zero value as \"limited\".\n\tType constant.Limited `json:\"type\" default:\"limited\"`\n\t// contains filtered or unexported fields\n}\n```\nLimited network request params.\n\nFields default to null; on update, omitted fields preserve the existing value.\n\nThe property Type is required.\n\n```go\nfunc (r LimitedNetworkParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *LimitedNetworkParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MCPToolUseBlockParam struct {\n\tID    string `json:\"id\" api:\"required\"`\n\tInput any    `json:\"input,omitzero\" api:\"required\"`\n\tName  string `json:\"name\" api:\"required\"`\n\t// The name of the MCP server\n\tServerName string `json:\"server_name\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"mcp_tool_use\".\n\tType constant.MCPToolUse `json:\"type\" default:\"mcp_tool_use\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ID, Input, Name, ServerName, Type are required.\n\n```go\nfunc (r MCPToolUseBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *MCPToolUseBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAPIActor struct {\n\t// ID of the API key that performed the write. This identifies the key, not the\n\t// secret.\n\tAPIKeyID string `json:\"api_key_id\" api:\"required\"`\n\t// Any of \"api_actor\".\n\tType ManagedAgentsAPIActorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAPIKeyID    respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAttribution for a write made directly via the public API (outside of any session).\n\n```go\nfunc (r ManagedAgentsAPIActor) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAPIActor) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAPIActorType string\n```\n\n```go\nconst (\n\tManagedAgentsAPIActorTypeAPIActor ManagedAgentsAPIActorType = \"api_actor\"\n)\n```\n\n```go\ntype ManagedAgentsActorUnion struct {\n\t// This field is from variant [ManagedAgentsSessionActor].\n\tSessionID string `json:\"session_id\"`\n\t// Any of \"session_actor\", \"api_actor\", \"user_actor\", \"service_account_actor\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsAPIActor].\n\tAPIKeyID string `json:\"api_key_id\"`\n\t// This field is from variant [ManagedAgentsUserActor].\n\tUserID string `json:\"user_id\"`\n\t// This field is from variant [ManagedAgentsServiceAccountActor].\n\tServiceAccountID string `json:\"service_account_id\"`\n\tJSON             struct {\n\t\tSessionID        respjson.Field\n\t\tType             respjson.Field\n\t\tAPIKeyID         respjson.Field\n\t\tUserID           respjson.Field\n\t\tServiceAccountID respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsActorUnion contains all possible properties and values from [ManagedAgentsSessionActor](#ManagedAgentsSessionActor), [ManagedAgentsAPIActor](#ManagedAgentsAPIActor), [ManagedAgentsUserActor](#ManagedAgentsUserActor), [ManagedAgentsServiceAccountActor](#ManagedAgentsServiceAccountActor).\n\nUse the [ManagedAgentsActorUnion.AsAny](#ManagedAgentsActorUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsActorUnion) AsAPIActor() (v ManagedAgentsAPIActor)\n```\n\n```go\nfunc (u ManagedAgentsActorUnion) AsAny() anyManagedAgentsActor\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsActorUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsSessionActor:\n\tcase qoder.ManagedAgentsAPIActor:\n\tcase qoder.ManagedAgentsUserActor:\n\tcase qoder.ManagedAgentsServiceAccountActor:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsActorUnion) AsServiceAccountActor() (v ManagedAgentsServiceAccountActor)\n```\n\n```go\nfunc (u ManagedAgentsActorUnion) AsSessionActor() (v ManagedAgentsSessionActor)\n```\n\n```go\nfunc (u ManagedAgentsActorUnion) AsUserActor() (v ManagedAgentsUserActor)\n```\n\n```go\nfunc (u ManagedAgentsActorUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsActorUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAdvisor struct {\n\t// The advisor model id.\n\tModel string `json:\"model\" api:\"required\"`\n\t// Any of \"advisor\".\n\tType ManagedAgentsAdvisorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tModel       respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPlatform advisor roster entry: a model the session's primary thread may consult mid-turn.\n\n```go\nfunc (r ManagedAgentsAdvisor) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAdvisor) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAdvisorParams struct {\n\t// A model id. The model must be permitted as an advisor for this agent's model\n\t// — see the sessions/threads/advisor spec.\n\tModel string `json:\"model\" api:\"required\"`\n\t// Any of \"advisor\".\n\tType ManagedAgentsAdvisorParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nPlatform 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\\`.\n\nThe properties Model, Type are required.\n\n```go\nfunc (r ManagedAgentsAdvisorParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAdvisorParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAdvisorParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsAdvisorParamsTypeAdvisor ManagedAgentsAdvisorParamsType = \"advisor\"\n)\n```\n\n```go\ntype ManagedAgentsAdvisorType string\n```\n\n```go\nconst (\n\tManagedAgentsAdvisorTypeAdvisor ManagedAgentsAdvisorType = \"advisor\"\n)\n```\n\n```go\ntype ManagedAgentsAgent struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt   time.Time                             `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\tDescription string                                `json:\"description\" api:\"required\"`\n\tMCPServers  []ManagedAgentsMCPServerURLDefinition `json:\"mcp_servers\" api:\"required\"`\n\tMetadata    map[string]string                     `json:\"metadata\" api:\"required\"`\n\t// Model identifier and configuration.\n\tModel ManagedAgentsModelConfig `json:\"model\" api:\"required\"`\n\t// Resolved coordinator topology with a concrete agent roster.\n\tMultiagent ManagedAgentsMultiagent        `json:\"multiagent\" api:\"required\"`\n\tName       string                         `json:\"name\" api:\"required\"`\n\tSkills     []ManagedAgentsAgentSkillUnion `json:\"skills\" api:\"required\"`\n\tSystem     string                         `json:\"system\" api:\"required\"`\n\tTools      []ManagedAgentsAgentToolUnion  `json:\"tools\" api:\"required\"`\n\t// Any of \"agent\".\n\tType ManagedAgentsAgentType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// The agent's current version. Starts at 1 and increments when the agent is\n\t// modified.\n\tVersion int64 `json:\"version\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tArchivedAt  respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tDescription respjson.Field\n\t\tMCPServers  respjson.Field\n\t\tMetadata    respjson.Field\n\t\tModel       respjson.Field\n\t\tMultiagent  respjson.Field\n\t\tName        respjson.Field\n\t\tSkills      respjson.Field\n\t\tSystem      respjson.Field\n\t\tTools       respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tVersion     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA Managed Agents \\`agent\\`.\n\n```go\nfunc (r ManagedAgentsAgent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentArchivedDeploymentPausedReasonError struct {\n\t// Any of \"agent_archived_error\".\n\tType ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's agent was archived.\n\n```go\nfunc (r ManagedAgentsAgentArchivedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentArchivedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentArchivedDeploymentPausedReasonErrorTypeAgentArchivedError ManagedAgentsAgentArchivedDeploymentPausedReasonErrorType = \"agent_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsAgentArchivedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"agent_archived_error\".\n\tType ManagedAgentsAgentArchivedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's agent was archived.\n\n```go\nfunc (r ManagedAgentsAgentArchivedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentArchivedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentArchivedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentArchivedRunErrorTypeAgentArchivedError ManagedAgentsAgentArchivedRunErrorType = \"agent_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsAgentArtifactDeliveredEvent struct {\n\tID               string                                       `json:\"id\" api:\"required\"`\n\tType             ManagedAgentsAgentArtifactDeliveredEventType `json:\"type\" api:\"required\"`\n\tFileID           string                                       `json:\"file_id\" api:\"required\"`\n\tOriginalFilename string                                       `json:\"original_filename\" api:\"required\"`\n\tSize             int64                                        `json:\"size\" api:\"required\"`\n\tContentType      string                                       `json:\"content_type\" api:\"required\"`\n\tProcessedAt      time.Time                                    `json:\"processed_at\" format:\"date-time\"`\n\tJSON             struct {\n\t\tID               respjson.Field\n\t\tType             respjson.Field\n\t\tFileID           respjson.Field\n\t\tOriginalFilename respjson.Field\n\t\tSize             respjson.Field\n\t\tContentType      respjson.Field\n\t\tProcessedAt      respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsAgentArtifactDeliveredEvent) RawJSON() string\n```\n\n```go\nfunc (r *ManagedAgentsAgentArtifactDeliveredEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentArtifactDeliveredEventType string\n```\n\n```go\nconst ManagedAgentsAgentArtifactDeliveredEventTypeAgentArtifactDelivered ManagedAgentsAgentArtifactDeliveredEventType = \"agent.artifact_delivered\"\n```\n\n```go\ntype ManagedAgentsAgentCustomToolUseEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Input parameters for the tool call.\n\tInput map[string]any `json:\"input\" api:\"required\"`\n\t// Name of the custom tool being called.\n\tName string `json:\"name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.custom_tool_use\".\n\tType ManagedAgentsAgentCustomToolUseEventType `json:\"type\" api:\"required\"`\n\t// When set, this event was cross-posted from a subagent's thread to surface its\n\t// custom tool use on the primary thread's stream. Empty on the thread's own\n\t// events. Echo this on a `user.custom_tool_result` event to route the result back.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tInput           respjson.Field\n\t\tName            respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tType            respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent 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.\n\n```go\nfunc (r ManagedAgentsAgentCustomToolUseEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentCustomToolUseEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentCustomToolUseEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentCustomToolUseEventTypeAgentCustomToolUse ManagedAgentsAgentCustomToolUseEventType = \"agent.custom_tool_use\"\n)\n```\n\n```go\ntype ManagedAgentsAgentMCPToolResultEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// The id of the `agent.mcp_tool_use` event this result corresponds to.\n\tMCPToolUseID string `json:\"mcp_tool_use_id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.mcp_tool_result\".\n\tType ManagedAgentsAgentMCPToolResultEventType `json:\"type\" api:\"required\"`\n\t// The result content returned by the tool.\n\tContent []ManagedAgentsAgentMCPToolResultEventContentUnion `json:\"content\"`\n\t// Whether the tool execution resulted in an error.\n\tIsError bool `json:\"is_error\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID           respjson.Field\n\t\tMCPToolUseID respjson.Field\n\t\tProcessedAt  respjson.Field\n\t\tType         respjson.Field\n\t\tContent      respjson.Field\n\t\tIsError      respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent representing the result of an MCP tool execution.\n\n```go\nfunc (r ManagedAgentsAgentMCPToolResultEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentMCPToolResultEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMCPToolResultEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"search_result\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion], [string]\n\tSource ManagedAgentsAgentMCPToolResultEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\tTitle   string `json:\"title\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tCitations ManagedAgentsSearchResultCitations `json:\"citations\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tContent []ManagedAgentsSearchResultContent `json:\"content\"`\n\tJSON    struct {\n\t\tText      respjson.Field\n\t\tType      respjson.Field\n\t\tSource    respjson.Field\n\t\tContext   respjson.Field\n\t\tTitle     respjson.Field\n\t\tCitations respjson.Field\n\t\tContent   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentMCPToolResultEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsSearchResultBlock](#ManagedAgentsSearchResultBlock).\n\nUse the [ManagedAgentsAgentMCPToolResultEventContentUnion.AsAny](#ManagedAgentsAgentMCPToolResultEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentMCPToolResultEventContentUnion) AsAny() anyManagedAgentsAgentMCPToolResultEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentMCPToolResultEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsSearchResultBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentMCPToolResultEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentMCPToolResultEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentMCPToolResultEventContentUnion) AsSearchResult() (v ManagedAgentsSearchResultBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentMCPToolResultEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentMCPToolResultEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentMCPToolResultEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMCPToolResultEventContentUnionSource struct {\n\t// This field will be present if the value is a [string] instead of an object.\n\tOfString  string `json:\",inline\"`\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tOfString  respjson.Field\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentMCPToolResultEventContentUnionSource is an implicit subunion of [ManagedAgentsAgentMCPToolResultEventContentUnion](#ManagedAgentsAgentMCPToolResultEventContentUnion). ManagedAgentsAgentMCPToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentMCPToolResultEventContentUnion](#ManagedAgentsAgentMCPToolResultEventContentUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfString]\n\n```go\nfunc (r *ManagedAgentsAgentMCPToolResultEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMCPToolResultEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentMCPToolResultEventTypeAgentMCPToolResult ManagedAgentsAgentMCPToolResultEventType = \"agent.mcp_tool_result\"\n)\n```\n\n```go\ntype ManagedAgentsAgentMCPToolUseEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Input parameters for the tool call.\n\tInput map[string]any `json:\"input\" api:\"required\"`\n\t// Name of the MCP server providing the tool.\n\tMCPServerName string `json:\"mcp_server_name\" api:\"required\"`\n\t// Name of the MCP tool being used.\n\tName string `json:\"name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.mcp_tool_use\".\n\tType ManagedAgentsAgentMCPToolUseEventType `json:\"type\" api:\"required\"`\n\t// AgentEvaluatedPermission enum\n\t//\n\t// Any of \"allow\", \"ask\", \"deny\".\n\tEvaluatedPermission ManagedAgentsAgentMCPToolUseEventEvaluatedPermission `json:\"evaluated_permission\"`\n\t// When set, this event was cross-posted from a subagent's thread to surface its\n\t// permission request on the primary thread's stream. Empty on the thread's own\n\t// events. Echo this on a `user.tool_confirmation` event to route the approval\n\t// back.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                  respjson.Field\n\t\tInput               respjson.Field\n\t\tMCPServerName       respjson.Field\n\t\tName                respjson.Field\n\t\tProcessedAt         respjson.Field\n\t\tType                respjson.Field\n\t\tEvaluatedPermission respjson.Field\n\t\tSessionThreadID     respjson.Field\n\t\tExtraFields         map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent emitted when the agent invokes a tool provided by an MCP server.\n\n```go\nfunc (r ManagedAgentsAgentMCPToolUseEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentMCPToolUseEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMCPToolUseEventEvaluatedPermission string\n```\nAgentEvaluatedPermission enum\n\n```go\nconst (\n\tManagedAgentsAgentMCPToolUseEventEvaluatedPermissionAllow ManagedAgentsAgentMCPToolUseEventEvaluatedPermission = \"allow\"\n\tManagedAgentsAgentMCPToolUseEventEvaluatedPermissionAsk   ManagedAgentsAgentMCPToolUseEventEvaluatedPermission = \"ask\"\n\tManagedAgentsAgentMCPToolUseEventEvaluatedPermissionDeny  ManagedAgentsAgentMCPToolUseEventEvaluatedPermission = \"deny\"\n)\n```\n\n```go\ntype ManagedAgentsAgentMCPToolUseEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentMCPToolUseEventTypeAgentMCPToolUse ManagedAgentsAgentMCPToolUseEventType = \"agent.mcp_tool_use\"\n)\n```\n\n```go\ntype ManagedAgentsAgentMessageEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Array of text blocks comprising the agent response.\n\tContent []ManagedAgentsAgentMessageEventContentUnion `json:\"content\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.message\".\n\tType ManagedAgentsAgentMessageEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tContent     respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn agent response event in the session conversation.\n\n```go\nfunc (r ManagedAgentsAgentMessageEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentMessageEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMessageEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"redacted\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tText respjson.Field\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentMessageEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsRedactedBlock](#ManagedAgentsRedactedBlock).\n\nUse the [ManagedAgentsAgentMessageEventContentUnion.AsAny](#ManagedAgentsAgentMessageEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentMessageEventContentUnion) AsAny() anyManagedAgentsAgentMessageEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentMessageEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsRedactedBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentMessageEventContentUnion) AsRedacted() (v ManagedAgentsRedactedBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentMessageEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentMessageEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentMessageEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMessageEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentMessageEventTypeAgentMessage ManagedAgentsAgentMessageEventType = \"agent.message\"\n)\n```\n\n```go\ntype ManagedAgentsAgentMessagePreview struct {\n\t// The id the buffered agent.message will carry if it is emitted. Matches the\n\t// event_id on this preview's event_delta events.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"agent.message\".\n\tType ManagedAgentsAgentMessagePreviewType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsAgentMessagePreview) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentMessagePreview) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentMessagePreviewType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentMessagePreviewTypeAgentMessage ManagedAgentsAgentMessagePreviewType = \"agent.message\"\n)\n```\n\n```go\ntype ManagedAgentsAgentParams struct {\n\t// The `agent` ID.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"agent\".\n\tType ManagedAgentsAgentParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// The specific `agent` version to use. Omit to use the latest version. Must be at\n\t// least 1 if specified.\n\tVersion param.Opt[int64] `json:\"version,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nSpecification for an Agent. Provide a specific \\`version\\` or use the short-form \\`agent=\"agent\\_id\"\\` for the most recent version\n\nThe properties ID, Type are required.\n\n```go\nfunc (r ManagedAgentsAgentParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAgentParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentParamsTypeAgent ManagedAgentsAgentParamsType = \"agent\"\n)\n```\n\n```go\ntype ManagedAgentsAgentReference struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"agent\".\n\tType    ManagedAgentsAgentReferenceType `json:\"type\" api:\"required\"`\n\tVersion int64                           `json:\"version\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA resolved agent reference with a concrete version.\n\n```go\nfunc (r ManagedAgentsAgentReference) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentReference) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentReferenceType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentReferenceTypeAgent ManagedAgentsAgentReferenceType = \"agent\"\n)\n```\n\n```go\ntype ManagedAgentsAgentSkillUnion struct {\n\tSkillID string `json:\"skill_id\"`\n\t// Any of \"qoder\", \"custom\".\n\tType    string `json:\"type\"`\n\tVersion string `json:\"version\"`\n\tJSON    struct {\n\t\tSkillID respjson.Field\n\t\tType    respjson.Field\n\t\tVersion respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentSkillUnion contains all possible properties and values from [ManagedAgentsQoderSkill](#ManagedAgentsQoderSkill), [ManagedAgentsCustomSkill](#ManagedAgentsCustomSkill).\n\nUse the [ManagedAgentsAgentSkillUnion.AsAny](#ManagedAgentsAgentSkillUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentSkillUnion) AsAny() anyManagedAgentsAgentSkill\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentSkillUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsQoderSkill:\n\tcase qoder.ManagedAgentsCustomSkill:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentSkillUnion) AsCustom() (v ManagedAgentsCustomSkill)\n```\n\n```go\nfunc (u ManagedAgentsAgentSkillUnion) AsQoder() (v ManagedAgentsQoderSkill)\n```\n\n```go\nfunc (u ManagedAgentsAgentSkillUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentSkillUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThinkingEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.thinking\".\n\tType ManagedAgentsAgentThinkingEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates the agent is making forward progress via extended thinking. A progress signal, not a content carrier.\n\n```go\nfunc (r ManagedAgentsAgentThinkingEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThinkingEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThinkingEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentThinkingEventTypeAgentThinking ManagedAgentsAgentThinkingEventType = \"agent.thinking\"\n)\n```\n\n```go\ntype ManagedAgentsAgentThinkingPreview struct {\n\t// The id the buffered agent.thinking will carry if it is emitted. Start-only — no\n\t// event_delta events follow.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"agent.thinking\".\n\tType ManagedAgentsAgentThinkingPreviewType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsAgentThinkingPreview) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThinkingPreview) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThinkingPreviewType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentThinkingPreviewTypeAgentThinking ManagedAgentsAgentThinkingPreviewType = \"agent.thinking\"\n)\n```\n\n```go\ntype ManagedAgentsAgentThreadContextCompactedEvent struct {\n\t// Credits for this compaction call, already included in Session totals.\n\tUsage ManagedAgentsSpanModelUsage `json:\"usage\"`\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.thread_context_compacted\".\n\tType ManagedAgentsAgentThreadContextCompactedEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tUsage       respjson.Field\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates that context compaction (summarization) occurred during the session.\n\n```go\nfunc (r ManagedAgentsAgentThreadContextCompactedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThreadContextCompactedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadContextCompactedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentThreadContextCompactedEventTypeAgentThreadContextCompacted ManagedAgentsAgentThreadContextCompactedEventType = \"agent.thread_context_compacted\"\n)\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageReceivedEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Message content blocks.\n\tContent []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:\"content\" api:\"required\"`\n\t// Public `sthr_` ID of the thread that sent the message.\n\tFromSessionThreadID string `json:\"from_session_thread_id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.thread_message_received\".\n\tType ManagedAgentsAgentThreadMessageReceivedEventType `json:\"type\" api:\"required\"`\n\t// Name of the callable agent this message came from. Absent when received from the\n\t// primary agent.\n\tFromAgentName string `json:\"from_agent_name\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                  respjson.Field\n\t\tContent             respjson.Field\n\t\tFromSessionThreadID respjson.Field\n\t\tProcessedAt         respjson.Field\n\t\tType                respjson.Field\n\t\tFromAgentName       respjson.Field\n\t\tExtraFields         map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nDelivery event written to the target thread's input stream when an agent-to-agent message arrives.\n\n```go\nfunc (r ManagedAgentsAgentThreadMessageReceivedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThreadMessageReceivedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageReceivedEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"redacted\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion]\n\tSource ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tTitle string `json:\"title\"`\n\tJSON  struct {\n\t\tText    respjson.Field\n\t\tType    respjson.Field\n\t\tSource  respjson.Field\n\t\tContext respjson.Field\n\t\tTitle   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentThreadMessageReceivedEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsRedactedBlock](#ManagedAgentsRedactedBlock).\n\nUse the [ManagedAgentsAgentThreadMessageReceivedEventContentUnion.AsAny](#ManagedAgentsAgentThreadMessageReceivedEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsAny() anyManagedAgentsAgentThreadMessageReceivedEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentThreadMessageReceivedEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsRedactedBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsRedacted() (v ManagedAgentsRedactedBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageReceivedEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThreadMessageReceivedEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource struct {\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentThreadMessageReceivedEventContentUnionSource is an implicit subunion of [ManagedAgentsAgentThreadMessageReceivedEventContentUnion](#ManagedAgentsAgentThreadMessageReceivedEventContentUnion). ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentThreadMessageReceivedEventContentUnion](#ManagedAgentsAgentThreadMessageReceivedEventContentUnion).\n\n```go\nfunc (r *ManagedAgentsAgentThreadMessageReceivedEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageReceivedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentThreadMessageReceivedEventTypeAgentThreadMessageReceived ManagedAgentsAgentThreadMessageReceivedEventType = \"agent.thread_message_received\"\n)\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageSentEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Message content blocks.\n\tContent []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:\"content\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Public `sthr_` ID of the thread the message was sent to.\n\tToSessionThreadID string `json:\"to_session_thread_id\" api:\"required\"`\n\t// Any of \"agent.thread_message_sent\".\n\tType ManagedAgentsAgentThreadMessageSentEventType `json:\"type\" api:\"required\"`\n\t// Name of the callable agent this message was sent to. Absent when sent to the\n\t// primary agent.\n\tToAgentName string `json:\"to_agent_name\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                respjson.Field\n\t\tContent           respjson.Field\n\t\tProcessedAt       respjson.Field\n\t\tToSessionThreadID respjson.Field\n\t\tType              respjson.Field\n\t\tToAgentName       respjson.Field\n\t\tExtraFields       map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nObservability event emitted to the sender's output stream when an agent-to-agent message is sent.\n\n```go\nfunc (r ManagedAgentsAgentThreadMessageSentEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThreadMessageSentEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageSentEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"redacted\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion]\n\tSource ManagedAgentsAgentThreadMessageSentEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tTitle string `json:\"title\"`\n\tJSON  struct {\n\t\tText    respjson.Field\n\t\tType    respjson.Field\n\t\tSource  respjson.Field\n\t\tContext respjson.Field\n\t\tTitle   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentThreadMessageSentEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsRedactedBlock](#ManagedAgentsRedactedBlock).\n\nUse the [ManagedAgentsAgentThreadMessageSentEventContentUnion.AsAny](#ManagedAgentsAgentThreadMessageSentEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageSentEventContentUnion) AsAny() anyManagedAgentsAgentThreadMessageSentEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentThreadMessageSentEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsRedactedBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageSentEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageSentEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageSentEventContentUnion) AsRedacted() (v ManagedAgentsRedactedBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageSentEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentThreadMessageSentEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentThreadMessageSentEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageSentEventContentUnionSource struct {\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentThreadMessageSentEventContentUnionSource is an implicit subunion of [ManagedAgentsAgentThreadMessageSentEventContentUnion](#ManagedAgentsAgentThreadMessageSentEventContentUnion). ManagedAgentsAgentThreadMessageSentEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentThreadMessageSentEventContentUnion](#ManagedAgentsAgentThreadMessageSentEventContentUnion).\n\n```go\nfunc (r *ManagedAgentsAgentThreadMessageSentEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentThreadMessageSentEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentThreadMessageSentEventTypeAgentThreadMessageSent ManagedAgentsAgentThreadMessageSentEventType = \"agent.thread_message_sent\"\n)\n```\n\n```go\ntype ManagedAgentsAgentToolConfigParamsUnion struct {\n\tOfBash      *ManagedAgentsBashToolConfigParams      `json:\",omitzero,inline\"`\n\tOfEdit      *ManagedAgentsEditToolConfigParams      `json:\",omitzero,inline\"`\n\tOfRead      *ManagedAgentsReadToolConfigParams      `json:\",omitzero,inline\"`\n\tOfWrite     *ManagedAgentsWriteToolConfigParams     `json:\",omitzero,inline\"`\n\tOfGlob      *ManagedAgentsGlobToolConfigParams      `json:\",omitzero,inline\"`\n\tOfGrep      *ManagedAgentsGrepToolConfigParams      `json:\",omitzero,inline\"`\n\tOfWebFetch  *ManagedAgentsWebFetchToolConfigParams  `json:\",omitzero,inline\"`\n\tOfWebSearch *ManagedAgentsWebSearchToolConfigParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetAllowedDomains() []string\n```\nReturns a pointer to the underlying variant's AllowedDomains property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetBlockedDomains() []string\n```\nReturns a pointer to the underlying variant's BlockedDomains property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetEnabled() *bool\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetMaxContentTokens() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetPermissionPolicy() (res managedAgentsAgentToolConfigParamsUnionPermissionPolicy)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) GetUserLocation() *ManagedAgentsUserLocationParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigParamsUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsAgentToolConfigParamsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolConfigUnion struct {\n\tEnabled bool   `json:\"enabled\"`\n\tName    string `json:\"name\"`\n\t// This field is a union of [ManagedAgentsBashToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsEditToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsReadToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsWriteToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsGlobToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsGrepToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsWebFetchToolConfigPermissionPolicyUnion],\n\t// [ManagedAgentsWebSearchToolConfigPermissionPolicyUnion]\n\tPermissionPolicy ManagedAgentsAgentToolConfigUnionPermissionPolicy `json:\"permission_policy\"`\n\t// Any of \"bash\", \"edit\", \"read\", \"write\", \"glob\", \"grep\", \"web_fetch\",\n\t// \"web_search\".\n\tType           string   `json:\"type\"`\n\tAllowedDomains []string `json:\"allowed_domains\"`\n\tBlockedDomains []string `json:\"blocked_domains\"`\n\t// This field is from variant [ManagedAgentsWebFetchToolConfig].\n\tMaxContentTokens int64 `json:\"max_content_tokens\"`\n\t// This field is from variant [ManagedAgentsWebSearchToolConfig].\n\tUserLocation ManagedAgentsUserLocation `json:\"user_location\"`\n\tJSON         struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tAllowedDomains   respjson.Field\n\t\tBlockedDomains   respjson.Field\n\t\tMaxContentTokens respjson.Field\n\t\tUserLocation     respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolConfigUnion contains all possible properties and values from [ManagedAgentsBashToolConfig](#ManagedAgentsBashToolConfig), [ManagedAgentsEditToolConfig](#ManagedAgentsEditToolConfig), [ManagedAgentsReadToolConfig](#ManagedAgentsReadToolConfig), [ManagedAgentsWriteToolConfig](#ManagedAgentsWriteToolConfig), [ManagedAgentsGlobToolConfig](#ManagedAgentsGlobToolConfig), [ManagedAgentsGrepToolConfig](#ManagedAgentsGrepToolConfig), [ManagedAgentsWebFetchToolConfig](#ManagedAgentsWebFetchToolConfig), [ManagedAgentsWebSearchToolConfig](#ManagedAgentsWebSearchToolConfig).\n\nUse the [ManagedAgentsAgentToolConfigUnion.AsAny](#ManagedAgentsAgentToolConfigUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsAny() anyManagedAgentsAgentToolConfig\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentToolConfigUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsBashToolConfig:\n\tcase qoder.ManagedAgentsEditToolConfig:\n\tcase qoder.ManagedAgentsReadToolConfig:\n\tcase qoder.ManagedAgentsWriteToolConfig:\n\tcase qoder.ManagedAgentsGlobToolConfig:\n\tcase qoder.ManagedAgentsGrepToolConfig:\n\tcase qoder.ManagedAgentsWebFetchToolConfig:\n\tcase qoder.ManagedAgentsWebSearchToolConfig:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsBash() (v ManagedAgentsBashToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsEdit() (v ManagedAgentsEditToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsGlob() (v ManagedAgentsGlobToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsGrep() (v ManagedAgentsGrepToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsRead() (v ManagedAgentsReadToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsWebFetch() (v ManagedAgentsWebFetchToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsWebSearch() (v ManagedAgentsWebSearchToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) AsWrite() (v ManagedAgentsWriteToolConfig)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolConfigUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolConfigUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolConfigUnionPermissionPolicy struct {\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolConfigUnionPermissionPolicy is an implicit subunion of [ManagedAgentsAgentToolConfigUnion](#ManagedAgentsAgentToolConfigUnion). ManagedAgentsAgentToolConfigUnionPermissionPolicy provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentToolConfigUnion](#ManagedAgentsAgentToolConfigUnion).\n\n```go\nfunc (r *ManagedAgentsAgentToolConfigUnionPermissionPolicy) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolResultEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// The id of the `agent.tool_use` event this result corresponds to.\n\tToolUseID string `json:\"tool_use_id\" api:\"required\"`\n\t// Any of \"agent.tool_result\".\n\tType ManagedAgentsAgentToolResultEventType `json:\"type\" api:\"required\"`\n\t// The result content returned by the tool.\n\tContent []ManagedAgentsAgentToolResultEventContentUnion `json:\"content\"`\n\t// Whether the tool execution resulted in an error.\n\tIsError bool `json:\"is_error\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tToolUseID   respjson.Field\n\t\tType        respjson.Field\n\t\tContent     respjson.Field\n\t\tIsError     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent representing the result of an agent tool execution.\n\n```go\nfunc (r ManagedAgentsAgentToolResultEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolResultEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolResultEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"search_result\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion], [string]\n\tSource ManagedAgentsAgentToolResultEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\tTitle   string `json:\"title\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tCitations ManagedAgentsSearchResultCitations `json:\"citations\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tContent []ManagedAgentsSearchResultContent `json:\"content\"`\n\tJSON    struct {\n\t\tText      respjson.Field\n\t\tType      respjson.Field\n\t\tSource    respjson.Field\n\t\tContext   respjson.Field\n\t\tTitle     respjson.Field\n\t\tCitations respjson.Field\n\t\tContent   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolResultEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsSearchResultBlock](#ManagedAgentsSearchResultBlock).\n\nUse the [ManagedAgentsAgentToolResultEventContentUnion.AsAny](#ManagedAgentsAgentToolResultEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentToolResultEventContentUnion) AsAny() anyManagedAgentsAgentToolResultEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentToolResultEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsSearchResultBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentToolResultEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolResultEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolResultEventContentUnion) AsSearchResult() (v ManagedAgentsSearchResultBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolResultEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolResultEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolResultEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolResultEventContentUnionSource struct {\n\t// This field will be present if the value is a [string] instead of an object.\n\tOfString  string `json:\",inline\"`\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tOfString  respjson.Field\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolResultEventContentUnionSource is an implicit subunion of [ManagedAgentsAgentToolResultEventContentUnion](#ManagedAgentsAgentToolResultEventContentUnion). ManagedAgentsAgentToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentToolResultEventContentUnion](#ManagedAgentsAgentToolResultEventContentUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfString]\n\n```go\nfunc (r *ManagedAgentsAgentToolResultEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolResultEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentToolResultEventTypeAgentToolResult ManagedAgentsAgentToolResultEventType = \"agent.tool_result\"\n)\n```\n\n```go\ntype ManagedAgentsAgentToolUnion struct {\n\tEnabledTools    []string `json:\"enabled_tools\"`\n\tDisallowedTools []string `json:\"disallowed_tools\"`\n\t// This field is a union of [[]ManagedAgentsAgentToolConfigUnion],\n\t// [[]ManagedAgentsMCPToolConfig]\n\tConfigs ManagedAgentsAgentToolUnionConfigs `json:\"configs\"`\n\t// This field is a union of [ManagedAgentsAgentToolsetDefaultConfig],\n\t// [ManagedAgentsMCPToolsetDefaultConfig]\n\tDefaultConfig ManagedAgentsAgentToolUnionDefaultConfig `json:\"default_config\"`\n\t// Any of \"agent_toolset_20260401\", \"mcp_toolset\", \"custom\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsMCPToolset].\n\tMCPServerName string `json:\"mcp_server_name\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tInputSchema ManagedAgentsCustomToolInputSchema `json:\"input_schema\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tName string `json:\"name\"`\n\tJSON struct {\n\t\tEnabledTools    respjson.Field\n\t\tDisallowedTools respjson.Field\n\t\tConfigs         respjson.Field\n\t\tDefaultConfig   respjson.Field\n\t\tType            respjson.Field\n\t\tMCPServerName   respjson.Field\n\t\tDescription     respjson.Field\n\t\tInputSchema     respjson.Field\n\t\tName            respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolUnion contains all possible properties and values from [ManagedAgentsAgentToolset20260401](#ManagedAgentsAgentToolset20260401), [ManagedAgentsMCPToolset](#ManagedAgentsMCPToolset), [ManagedAgentsCustomTool](#ManagedAgentsCustomTool).\n\nUse the [ManagedAgentsAgentToolUnion.AsAny](#ManagedAgentsAgentToolUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentToolUnion) AsAgentToolset20260401() (v ManagedAgentsAgentToolset20260401)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolUnion) AsAny() anyManagedAgentsAgentTool\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentToolUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAgentToolset20260401:\n\tcase qoder.ManagedAgentsMCPToolset:\n\tcase qoder.ManagedAgentsCustomTool:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentToolUnion) AsCustom() (v ManagedAgentsCustomTool)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolUnion) AsMCPToolset() (v ManagedAgentsMCPToolset)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolUnionConfigs struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentToolConfigUnion] instead of an object.\n\tOfManagedAgentsAgentToolConfigArray []ManagedAgentsAgentToolConfigUnion `json:\",inline\"`\n\t// This field will be present if the value is a [[]ManagedAgentsMCPToolConfig]\n\t// instead of an object.\n\tOfManagedAgentsMCPToolConfigArray []ManagedAgentsMCPToolConfig `json:\",inline\"`\n\tJSON                              struct {\n\t\tOfManagedAgentsAgentToolConfigArray respjson.Field\n\t\tOfManagedAgentsMCPToolConfigArray   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolUnionConfigs is an implicit subunion of [ManagedAgentsAgentToolUnion](#ManagedAgentsAgentToolUnion). ManagedAgentsAgentToolUnionConfigs provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentToolUnion](#ManagedAgentsAgentToolUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsAgentToolConfigArray OfManagedAgentsMCPToolConfigArray]\n\n```go\nfunc (r *ManagedAgentsAgentToolUnionConfigs) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolUnionDefaultConfig struct {\n\tEnabled bool `json:\"enabled\"`\n\t// This field is a union of\n\t// [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion],\n\t// [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion]\n\tPermissionPolicy ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy `json:\"permission_policy\"`\n\tJSON             struct {\n\t\tEnabled          respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolUnionDefaultConfig is an implicit subunion of [ManagedAgentsAgentToolUnion](#ManagedAgentsAgentToolUnion). ManagedAgentsAgentToolUnionDefaultConfig provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentToolUnion](#ManagedAgentsAgentToolUnion).\n\n```go\nfunc (r *ManagedAgentsAgentToolUnionDefaultConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy struct {\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy is an implicit subunion of [ManagedAgentsAgentToolUnion](#ManagedAgentsAgentToolUnion). ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsAgentToolUnion](#ManagedAgentsAgentToolUnion).\n\n```go\nfunc (r *ManagedAgentsAgentToolUnionDefaultConfigPermissionPolicy) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolUseEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Input parameters for the tool call.\n\tInput map[string]any `json:\"input\" api:\"required\"`\n\t// Name of the agent tool being used.\n\tName string `json:\"name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"agent.tool_use\".\n\tType ManagedAgentsAgentToolUseEventType `json:\"type\" api:\"required\"`\n\t// AgentEvaluatedPermission enum\n\t//\n\t// Any of \"allow\", \"ask\", \"deny\".\n\tEvaluatedPermission ManagedAgentsAgentToolUseEventEvaluatedPermission `json:\"evaluated_permission\"`\n\t// When set, this event was cross-posted from a subagent's thread to surface its\n\t// permission request on the primary thread's stream. Empty on the thread's own\n\t// events. Echo this on a `user.tool_confirmation` event to route the approval\n\t// back.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                  respjson.Field\n\t\tInput               respjson.Field\n\t\tName                respjson.Field\n\t\tProcessedAt         respjson.Field\n\t\tType                respjson.Field\n\t\tEvaluatedPermission respjson.Field\n\t\tSessionThreadID     respjson.Field\n\t\tExtraFields         map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent emitted when the agent invokes a built-in agent tool.\n\n```go\nfunc (r ManagedAgentsAgentToolUseEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolUseEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolUseEventEvaluatedPermission string\n```\nAgentEvaluatedPermission enum\n\n```go\nconst (\n\tManagedAgentsAgentToolUseEventEvaluatedPermissionAllow ManagedAgentsAgentToolUseEventEvaluatedPermission = \"allow\"\n\tManagedAgentsAgentToolUseEventEvaluatedPermissionAsk   ManagedAgentsAgentToolUseEventEvaluatedPermission = \"ask\"\n\tManagedAgentsAgentToolUseEventEvaluatedPermissionDeny  ManagedAgentsAgentToolUseEventEvaluatedPermission = \"deny\"\n)\n```\n\n```go\ntype ManagedAgentsAgentToolUseEventType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentToolUseEventTypeAgentToolUse ManagedAgentsAgentToolUseEventType = \"agent.tool_use\"\n)\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401 struct {\n\tEnabledTools    []string                            `json:\"enabled_tools\"`\n\tDisallowedTools []string                            `json:\"disallowed_tools\"`\n\tConfigs         []ManagedAgentsAgentToolConfigUnion `json:\"configs\" api:\"required\"`\n\t// Resolved default configuration for agent tools.\n\tDefaultConfig ManagedAgentsAgentToolsetDefaultConfig `json:\"default_config\" api:\"required\"`\n\t// Any of \"agent_toolset_20260401\".\n\tType ManagedAgentsAgentToolset20260401Type `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabledTools    respjson.Field\n\t\tDisallowedTools respjson.Field\n\t\tConfigs         respjson.Field\n\t\tDefaultConfig   respjson.Field\n\t\tType            respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401BashInput struct {\n\t// Shell command to execute. Omit only when `restart` is true.\n\tCommand string `json:\"command\"`\n\t// When true, restart the persistent bash session instead of running a command.\n\t// Subsequent calls without `restart` will run against the fresh session.\n\tRestart bool `json:\"restart\"`\n\t// Per-call timeout in milliseconds. Defaults to the runner-wide tool timeout when\n\t// omitted or zero.\n\tTimeoutMs int64 `json:\"timeout_ms\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCommand     respjson.Field\n\t\tRestart     respjson.Field\n\t\tTimeoutMs   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput 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.\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401BashInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401BashInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401EditInput struct {\n\t// Path of the file to edit.\n\tFilePath string `json:\"file_path\" api:\"required\"`\n\t// Replacement text.\n\tNewString string `json:\"new_string\" api:\"required\"`\n\t// Substring to find and replace.\n\tOldString string `json:\"old_string\" api:\"required\"`\n\t// When true, replace every occurrence of `old_string` instead of requiring a\n\t// unique match.\n\tReplaceAll bool `json:\"replace_all\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFilePath    respjson.Field\n\t\tNewString   respjson.Field\n\t\tOldString   respjson.Field\n\t\tReplaceAll  respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput payload for the \\`edit\\` tool. Performs a string replacement in the named file; by default \\`old\\_string\\` must occur exactly once.\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401EditInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401EditInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401GlobInput struct {\n\t// Doublestar glob pattern (e.g. `**/*.go`). Absolute patterns are only permitted\n\t// when the runner is configured to allow them.\n\tPattern string `json:\"pattern\" api:\"required\"`\n\t// Optional directory root to search under. Defaults to the runner's working\n\t// directory.\n\tPath string `json:\"path\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tPattern     respjson.Field\n\t\tPath        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput payload for the \\`glob\\` tool. Returns paths matching a doublestar glob pattern, newest first.\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401GlobInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401GlobInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401GrepInput struct {\n\t// Regular expression to search for.\n\tPattern string `json:\"pattern\" api:\"required\"`\n\t// Optional directory root to search under. Defaults to the runner's working\n\t// directory.\n\tPath string `json:\"path\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tPattern     respjson.Field\n\t\tPath        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput payload for the \\`grep\\` tool. Searches file contents for a regular expression, returning matching lines.\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401GrepInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401GrepInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401Params struct {\n\tDisallowedTools []string `json:\"disallowed_tools,omitzero\"`\n\tEnabledTools    []string `json:\"enabled_tools,omitzero\"`\n\t// Any of \"agent_toolset_20260401\".\n\tType ManagedAgentsAgentToolset20260401ParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Per-tool configuration overrides.\n\tConfigs []ManagedAgentsAgentToolConfigParamsUnion `json:\"configs,omitzero\"`\n\t// Default configuration for all tools in a toolset.\n\tDefaultConfig ManagedAgentsAgentToolsetDefaultConfigParams `json:\"default_config,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration for built-in agent tools. Use this to enable or disable groups of tools available to the agent.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401Params) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401Params) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401ParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401 ManagedAgentsAgentToolset20260401ParamsType = \"agent_toolset_20260401\"\n)\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401ReadInput struct {\n\t// Path of the file to read.\n\tFilePath string `json:\"file_path\" api:\"required\"`\n\t// Optional `[start_line, end_line]` 1-indexed inclusive range. When omitted the\n\t// entire file is returned. `end_line` of 0 or negative means \"to end of file\".\n\tViewRange []int64 `json:\"view_range\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFilePath    respjson.Field\n\t\tViewRange   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput payload for the \\`read\\` tool. Reads file contents relative to the runner's working directory (or absolute when the runner permits).\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401ReadInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401ReadInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401Type string\n```\n\n```go\nconst (\n\tManagedAgentsAgentToolset20260401TypeAgentToolset20260401 ManagedAgentsAgentToolset20260401Type = \"agent_toolset_20260401\"\n)\n```\n\n```go\ntype ManagedAgentsAgentToolset20260401WriteInput struct {\n\t// Full file contents to write.\n\tContent string `json:\"content\" api:\"required\"`\n\t// Path of the file to write.\n\tFilePath string `json:\"file_path\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tContent     respjson.Field\n\t\tFilePath    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nInput payload for the \\`write\\` tool. Writes (overwriting) the entire file contents.\n\n```go\nfunc (r ManagedAgentsAgentToolset20260401WriteInput) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolset20260401WriteInput) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolsetDefaultConfig struct {\n\tEnabled bool `json:\"enabled\" api:\"required\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved default configuration for agent tools.\n\n```go\nfunc (r ManagedAgentsAgentToolsetDefaultConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolsetDefaultConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolsetDefaultConfigParams struct {\n\t// Whether tools are enabled and available to the model by default. Defaults to\n\t// true if not specified.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nDefault configuration for all tools in a toolset.\n\n```go\nfunc (r ManagedAgentsAgentToolsetDefaultConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAgentToolsetDefaultConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsAgentToolsetDefaultConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion.AsAny](#ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) AsAny() anyManagedAgentsAgentToolsetDefaultConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentTypeAgent ManagedAgentsAgentType = \"agent\"\n)\n```\n\n```go\ntype ManagedAgentsAgentWithOverridesParams struct {\n\t// The `agent` ID.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"agent_with_overrides\".\n\tType ManagedAgentsAgentWithOverridesParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Replacement system prompt. Up to 100,000 characters. Set to null to clear the\n\t// agent's system prompt; omit to preserve it.\n\tSystem param.Opt[string] `json:\"system,omitzero\"`\n\t// The specific `agent` version to use. Omit to use the latest version.\n\tVersion param.Opt[int64] `json:\"version,omitzero\"`\n\t// Replacement MCP server list. Full replacement: the provided array becomes the\n\t// MCP servers. Send an empty array to clear; omit to preserve the agent's servers.\n\tMCPServers []ManagedAgentsURLMCPServerParams `json:\"mcp_servers,omitzero\"`\n\t// Replacement model. Accepts the model string or a `model_config` object. Omit to\n\t// use the agent's model.\n\tModel ManagedAgentsModelConfigParams `json:\"model,omitzero\"`\n\t// Replacement skill list. Full replacement: the provided array becomes the skills.\n\t// Send an empty array to clear; omit to preserve the agent's skills.\n\tSkills []ManagedAgentsSkillParamsUnion `json:\"skills,omitzero\"`\n\t// Replacement tool list. Full replacement: the provided array becomes the tool\n\t// configuration. Send an empty array to clear; omit to preserve the agent's tools.\n\tTools []ManagedAgentsAgentWithOverridesParamsToolUnion `json:\"tools,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nReference 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.\n\nThe properties ID, Type are required.\n\n```go\nfunc (r ManagedAgentsAgentWithOverridesParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAgentWithOverridesParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentWithOverridesParamsToolUnion struct {\n\tOfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:\",omitzero,inline\"`\n\tOfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:\",omitzero,inline\"`\n\tOfCustom               *ManagedAgentsCustomToolParams           `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetConfigs() (res managedAgentsAgentWithOverridesParamsToolUnionConfigs)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetDefaultConfig() (res managedAgentsAgentWithOverridesParamsToolUnionDefaultConfig)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetInputSchema() *ManagedAgentsCustomToolInputSchemaParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetMCPServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsAgentWithOverridesParamsToolUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsAgentWithOverridesParamsToolUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAgentWithOverridesParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsAgentWithOverridesParamsTypeAgentWithOverrides ManagedAgentsAgentWithOverridesParamsType = \"agent_with_overrides\"\n)\n```\n\n```go\ntype ManagedAgentsAlwaysAllowPolicy struct {\n\t// Any of \"always_allow\".\n\tType ManagedAgentsAlwaysAllowPolicyType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nTool calls are automatically approved without user confirmation.\n\n```go\nfunc (r ManagedAgentsAlwaysAllowPolicy) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsAlwaysAllowPolicy) ToParam() ManagedAgentsAlwaysAllowPolicyParam\n```\nToParam converts this ManagedAgentsAlwaysAllowPolicy to a ManagedAgentsAlwaysAllowPolicyParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsAlwaysAllowPolicy) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAlwaysAllowPolicyParam struct {\n\t// Any of \"always_allow\".\n\tType ManagedAgentsAlwaysAllowPolicyType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nTool calls are automatically approved without user confirmation.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsAlwaysAllowPolicyParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAlwaysAllowPolicyParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAlwaysAllowPolicyType string\n```\n\n```go\nconst (\n\tManagedAgentsAlwaysAllowPolicyTypeAlwaysAllow ManagedAgentsAlwaysAllowPolicyType = \"always_allow\"\n)\n```\n\n```go\ntype ManagedAgentsAlwaysAskPolicy struct {\n\t// Any of \"always_ask\".\n\tType ManagedAgentsAlwaysAskPolicyType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nTool calls require user confirmation before execution.\n\n```go\nfunc (r ManagedAgentsAlwaysAskPolicy) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsAlwaysAskPolicy) ToParam() ManagedAgentsAlwaysAskPolicyParam\n```\nToParam converts this ManagedAgentsAlwaysAskPolicy to a ManagedAgentsAlwaysAskPolicyParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsAlwaysAskPolicy) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAlwaysAskPolicyParam struct {\n\t// Any of \"always_ask\".\n\tType ManagedAgentsAlwaysAskPolicyType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nTool calls require user confirmation before execution.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsAlwaysAskPolicyParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsAlwaysAskPolicyParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsAlwaysAskPolicyType string\n```\n\n```go\nconst (\n\tManagedAgentsAlwaysAskPolicyTypeAlwaysAsk ManagedAgentsAlwaysAskPolicyType = \"always_ask\"\n)\n```\n\n```go\ntype ManagedAgentsBase64DocumentSource struct {\n\t// Base64-encoded document data.\n\tData string `json:\"data\" api:\"required\"`\n\t// MIME type of the document (e.g., \"application/pdf\").\n\tMediaType string `json:\"media_type\" api:\"required\"`\n\t// Any of \"base64\".\n\tType ManagedAgentsBase64DocumentSourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tData        respjson.Field\n\t\tMediaType   respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nBase64-encoded document data.\n\n```go\nfunc (r ManagedAgentsBase64DocumentSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsBase64DocumentSource) ToParam() ManagedAgentsBase64DocumentSourceParam\n```\nToParam converts this ManagedAgentsBase64DocumentSource to a ManagedAgentsBase64DocumentSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsBase64DocumentSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBase64DocumentSourceParam struct {\n\t// Base64-encoded document data.\n\tData string `json:\"data\" api:\"required\"`\n\t// MIME type of the document (e.g., \"application/pdf\").\n\tMediaType string `json:\"media_type\" api:\"required\"`\n\t// Any of \"base64\".\n\tType ManagedAgentsBase64DocumentSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nBase64-encoded document data.\n\nThe properties Data, MediaType, Type are required.\n\n```go\nfunc (r ManagedAgentsBase64DocumentSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsBase64DocumentSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBase64DocumentSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsBase64DocumentSourceTypeBase64 ManagedAgentsBase64DocumentSourceType = \"base64\"\n)\n```\n\n```go\ntype ManagedAgentsBase64ImageSource struct {\n\t// Base64-encoded image data.\n\tData string `json:\"data\" api:\"required\"`\n\t// MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\",\n\t// \"image/webp\").\n\tMediaType string `json:\"media_type\" api:\"required\"`\n\t// Any of \"base64\".\n\tType ManagedAgentsBase64ImageSourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tData        respjson.Field\n\t\tMediaType   respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nBase64-encoded image data.\n\n```go\nfunc (r ManagedAgentsBase64ImageSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsBase64ImageSource) ToParam() ManagedAgentsBase64ImageSourceParam\n```\nToParam converts this ManagedAgentsBase64ImageSource to a ManagedAgentsBase64ImageSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsBase64ImageSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBase64ImageSourceParam struct {\n\t// Base64-encoded image data.\n\tData string `json:\"data\" api:\"required\"`\n\t// MIME type of the image (e.g., \"image/png\", \"image/jpeg\", \"image/gif\",\n\t// \"image/webp\").\n\tMediaType string `json:\"media_type\" api:\"required\"`\n\t// Any of \"base64\".\n\tType ManagedAgentsBase64ImageSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nBase64-encoded image data.\n\nThe properties Data, MediaType, Type are required.\n\n```go\nfunc (r ManagedAgentsBase64ImageSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsBase64ImageSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBase64ImageSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsBase64ImageSourceTypeBase64 ManagedAgentsBase64ImageSourceType = \"base64\"\n)\n```\n\n```go\ntype ManagedAgentsBashToolConfig struct {\n\tEnabled bool          `json:\"enabled\" api:\"required\"`\n\tName    constant.Bash `json:\"name\" default:\"bash\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsBashToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.Bash                                    `json:\"type\" default:\"bash\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the bash tool.\n\n```go\nfunc (r ManagedAgentsBashToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsBashToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBashToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsBashToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Any of \"bash\".\n\tType ManagedAgentsBashToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"bash\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"bash\".\n\tName constant.Bash `json:\"name\" default:\"bash\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the bash tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsBashToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsBashToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBashToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsBashToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsBashToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsBashToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBashToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsBashToolConfigParamsTypeBash ManagedAgentsBashToolConfigParamsType = \"bash\"\n)\n```\n\n```go\ntype ManagedAgentsBashToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsBashToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsBashToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsBashToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsBashToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsBashToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsBashToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsBashToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsBashToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBillingError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsBillingErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"billing_error\".\n\tType ManagedAgentsBillingErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe 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.\n\n```go\nfunc (r ManagedAgentsBillingError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsBillingError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBillingErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsBillingErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsBillingErrorRetryStatusUnion.AsAny](#ManagedAgentsBillingErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsBillingErrorRetryStatusUnion) AsAny() anyManagedAgentsBillingErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsBillingErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsBillingErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsBillingErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsBillingErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsBillingErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsBillingErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBillingErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsBillingErrorTypeBillingError ManagedAgentsBillingErrorType = \"billing_error\"\n)\n```\n\n```go\ntype ManagedAgentsBranchCheckout struct {\n\t// Branch name to check out.\n\tName string `json:\"name\" api:\"required\"`\n\t// Any of \"branch\".\n\tType ManagedAgentsBranchCheckoutType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tName        respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsBranchCheckout) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsBranchCheckout) ToParam() ManagedAgentsBranchCheckoutParam\n```\nToParam converts this ManagedAgentsBranchCheckout to a ManagedAgentsBranchCheckoutParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsBranchCheckout) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBranchCheckoutParam struct {\n\t// Branch name to check out.\n\tName string `json:\"name\" api:\"required\"`\n\t// Any of \"branch\".\n\tType ManagedAgentsBranchCheckoutType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Name, Type are required.\n\n```go\nfunc (r ManagedAgentsBranchCheckoutParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsBranchCheckoutParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBranchCheckoutType string\n```\n\n```go\nconst (\n\tManagedAgentsBranchCheckoutTypeBranch ManagedAgentsBranchCheckoutType = \"branch\"\n)\n```\n\n```go\ntype ManagedAgentsBudgetLimit struct {\n\t// Positive decimal Credits, with at most 12 integer and 2 fractional digits.\n\tMaxCreditCost string `json:\"max_credit_cost\" api:\"required\"`\n\t// Any of \"limit\".\n\tType ManagedAgentsBudgetLimitType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMaxCreditCost respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA total model and sandbox credit limit. Once reached, new user messages are rejected; an already running turn continues to completion.\n\n```go\nfunc (r ManagedAgentsBudgetLimit) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsBudgetLimit) ToParam() ManagedAgentsBudgetLimitParam\n```\nToParam converts this ManagedAgentsBudgetLimit to a ManagedAgentsBudgetLimitParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsBudgetLimit) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBudgetLimitParam struct {\n\t// Positive decimal Credits, with at most 12 integer and 2 fractional digits.\n\tMaxCreditCost string `json:\"max_credit_cost\" api:\"required\"`\n\t// Any of \"limit\".\n\tType ManagedAgentsBudgetLimitType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nA total model and sandbox credit limit. Once reached, new user messages are rejected; an already running turn continues to completion.\n\nThe properties MaxCreditCost, Type are required.\n\n```go\nfunc (r ManagedAgentsBudgetLimitParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsBudgetLimitParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsBudgetLimitType string\n```\n\n```go\nconst (\n\tManagedAgentsBudgetLimitTypeLimit ManagedAgentsBudgetLimitType = \"limit\"\n)\n```\n\n```go\ntype ManagedAgentsCacheCreationUsage struct {\n\t// Tokens used to create 1-hour ephemeral cache entries.\n\tEphemeral1hInputTokens int64 `json:\"ephemeral_1h_input_tokens\"`\n\t// Tokens used to create 5-minute ephemeral cache entries.\n\tEphemeral5mInputTokens int64 `json:\"ephemeral_5m_input_tokens\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEphemeral1hInputTokens respjson.Field\n\t\tEphemeral5mInputTokens respjson.Field\n\t\tExtraFields            map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPrompt-cache creation token usage broken down by cache lifetime.\n\n```go\nfunc (r ManagedAgentsCacheCreationUsage) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCacheCreationUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCommitCheckout struct {\n\t// Full commit SHA to check out.\n\tSha string `json:\"sha\" api:\"required\"`\n\t// Any of \"commit\".\n\tType ManagedAgentsCommitCheckoutType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSha         respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsCommitCheckout) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsCommitCheckout) ToParam() ManagedAgentsCommitCheckoutParam\n```\nToParam converts this ManagedAgentsCommitCheckout to a ManagedAgentsCommitCheckoutParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsCommitCheckout) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCommitCheckoutParam struct {\n\t// Full commit SHA to check out.\n\tSha string `json:\"sha\" api:\"required\"`\n\t// Any of \"commit\".\n\tType ManagedAgentsCommitCheckoutType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Sha, Type are required.\n\n```go\nfunc (r ManagedAgentsCommitCheckoutParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsCommitCheckoutParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCommitCheckoutType string\n```\n\n```go\nconst (\n\tManagedAgentsCommitCheckoutTypeCommit ManagedAgentsCommitCheckoutType = \"commit\"\n)\n```\n\n```go\ntype ManagedAgentsCredential struct {\n\t// Unique identifier for the credential.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// Authentication details for a credential.\n\tAuth ManagedAgentsCredentialAuthUnion `json:\"auth\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Arbitrary key-value metadata attached to the credential.\n\tMetadata map[string]string `json:\"metadata\" api:\"required\"`\n\t// Any of \"vault_credential\".\n\tType ManagedAgentsCredentialType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// Identifier of the vault this credential belongs to.\n\tVaultID string `json:\"vault_id\" api:\"required\"`\n\t// Human-readable name for the credential.\n\tDisplayName string `json:\"display_name\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tArchivedAt  respjson.Field\n\t\tAuth        respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tMetadata    respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tVaultID     respjson.Field\n\t\tDisplayName respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA credential stored in a vault. Sensitive fields are never returned in responses.\n\n```go\nfunc (r ManagedAgentsCredential) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCredential) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCredentialAuthUnion struct {\n\tMCPServerURL string `json:\"mcp_server_url\"`\n\t// Any of \"mcp_oauth\", \"static_bearer\", \"environment_variable\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsMCPOAuthAuthResponse].\n\tExpiresAt time.Time `json:\"expires_at\"`\n\t// This field is from variant [ManagedAgentsMCPOAuthAuthResponse].\n\tRefresh ManagedAgentsMCPOAuthRefreshResponse `json:\"refresh\"`\n\t// This field is from variant [ManagedAgentsEnvironmentVariableAuthResponse].\n\tInjectionLocation ManagedAgentsInjectionLocationResponse `json:\"injection_location\"`\n\t// This field is from variant [ManagedAgentsEnvironmentVariableAuthResponse].\n\tNetworking ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion `json:\"networking\"`\n\t// This field is from variant [ManagedAgentsEnvironmentVariableAuthResponse].\n\tSecretName string `json:\"secret_name\"`\n\tJSON       struct {\n\t\tMCPServerURL      respjson.Field\n\t\tType              respjson.Field\n\t\tExpiresAt         respjson.Field\n\t\tRefresh           respjson.Field\n\t\tInjectionLocation respjson.Field\n\t\tNetworking        respjson.Field\n\t\tSecretName        respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsCredentialAuthUnion contains all possible properties and values from [ManagedAgentsMCPOAuthAuthResponse](#ManagedAgentsMCPOAuthAuthResponse), [ManagedAgentsStaticBearerAuthResponse](#ManagedAgentsStaticBearerAuthResponse), [ManagedAgentsEnvironmentVariableAuthResponse](#ManagedAgentsEnvironmentVariableAuthResponse).\n\nUse the [ManagedAgentsCredentialAuthUnion.AsAny](#ManagedAgentsCredentialAuthUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsCredentialAuthUnion) AsAny() anyManagedAgentsCredentialAuth\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsCredentialAuthUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsMCPOAuthAuthResponse:\n\tcase qoder.ManagedAgentsStaticBearerAuthResponse:\n\tcase qoder.ManagedAgentsEnvironmentVariableAuthResponse:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsCredentialAuthUnion) AsEnvironmentVariable() (v ManagedAgentsEnvironmentVariableAuthResponse)\n```\n\n```go\nfunc (u ManagedAgentsCredentialAuthUnion) AsMCPOAuth() (v ManagedAgentsMCPOAuthAuthResponse)\n```\n\n```go\nfunc (u ManagedAgentsCredentialAuthUnion) AsStaticBearer() (v ManagedAgentsStaticBearerAuthResponse)\n```\n\n```go\nfunc (u ManagedAgentsCredentialAuthUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCredentialAuthUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCredentialHostUnreachableError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// ID of the affected credential.\n\tCredentialID string `json:\"credential_id\" api:\"required\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"credential_host_unreachable_error\".\n\tType ManagedAgentsCredentialHostUnreachableErrorType `json:\"type\" api:\"required\"`\n\t// ID of the vault containing the affected credential.\n\tVaultID string `json:\"vault_id\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tCredentialID   respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tVaultID        respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn \\`environment\\_variable\\` credential's \\`auth.networking.allowed\\_hosts\\` includes a host the environment's network policy does not permit.\n\n```go\nfunc (r ManagedAgentsCredentialHostUnreachableError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCredentialHostUnreachableError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion.AsAny](#ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsAny() anyManagedAgentsCredentialHostUnreachableErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCredentialHostUnreachableErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsCredentialHostUnreachableErrorTypeCredentialHostUnreachableError ManagedAgentsCredentialHostUnreachableErrorType = \"credential_host_unreachable_error\"\n)\n```\n\n```go\ntype ManagedAgentsCredentialNetworkingParamsUnion struct {\n\tOfUnrestricted *ManagedAgentsUnrestrictedCredentialNetworkingParams `json:\",omitzero,inline\"`\n\tOfLimited      *ManagedAgentsLimitedCredentialNetworkingParams      `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc ManagedAgentsCredentialNetworkingParamsOfLimited(allowedHosts []string) ManagedAgentsCredentialNetworkingParamsUnion\n```\n\n```go\nfunc ManagedAgentsCredentialNetworkingParamsOfUnrestricted(type_ ManagedAgentsUnrestrictedCredentialNetworkingParamsType) ManagedAgentsCredentialNetworkingParamsUnion\n```\n\n```go\nfunc (u ManagedAgentsCredentialNetworkingParamsUnion) GetAllowedHosts() []string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsCredentialNetworkingParamsUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsCredentialNetworkingParamsUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsCredentialNetworkingParamsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCredentialType string\n```\n\n```go\nconst (\n\tManagedAgentsCredentialTypeVaultCredential ManagedAgentsCredentialType = \"vault_credential\"\n)\n```\n\n```go\ntype ManagedAgentsCredentialValidation struct {\n\t// Unique identifier of the credential that was validated.\n\tCredentialID string `json:\"credential_id\" api:\"required\"`\n\t// Whether the credential has a refresh token configured.\n\tHasRefreshToken bool `json:\"has_refresh_token\" api:\"required\"`\n\t// The failing step of an MCP validation probe.\n\tMCPProbe ManagedAgentsMCPProbe `json:\"mcp_probe\" api:\"required\"`\n\t// Outcome of a refresh-token exchange attempted during credential validation.\n\tRefresh ManagedAgentsRefreshObject `json:\"refresh\" api:\"required\"`\n\t// Overall verdict of a credential validation probe.\n\t//\n\t// Any of \"valid\", \"invalid\", \"unknown\".\n\tStatus ManagedAgentsCredentialValidationStatus `json:\"status\" api:\"required\"`\n\t// Any of \"vault_credential_validation\".\n\tType ManagedAgentsCredentialValidationType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tValidatedAt time.Time `json:\"validated_at\" api:\"required\" format:\"date-time\"`\n\t// Identifier of the vault containing the credential.\n\tVaultID string `json:\"vault_id\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCredentialID    respjson.Field\n\t\tHasRefreshToken respjson.Field\n\t\tMCPProbe        respjson.Field\n\t\tRefresh         respjson.Field\n\t\tStatus          respjson.Field\n\t\tType            respjson.Field\n\t\tValidatedAt     respjson.Field\n\t\tVaultID         respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResult of live-probing a credential against its configured MCP server.\n\n```go\nfunc (r ManagedAgentsCredentialValidation) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCredentialValidation) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCredentialValidationStatus string\n```\nOverall verdict of a credential validation probe.\n\n```go\nconst (\n\tManagedAgentsCredentialValidationStatusValid   ManagedAgentsCredentialValidationStatus = \"valid\"\n\tManagedAgentsCredentialValidationStatusInvalid ManagedAgentsCredentialValidationStatus = \"invalid\"\n\tManagedAgentsCredentialValidationStatusUnknown ManagedAgentsCredentialValidationStatus = \"unknown\"\n)\n```\n\n```go\ntype ManagedAgentsCredentialValidationType string\n```\n\n```go\nconst (\n\tManagedAgentsCredentialValidationTypeVaultCredentialValidation ManagedAgentsCredentialValidationType = \"vault_credential_validation\"\n)\n```\n\n```go\ntype ManagedAgentsCustomSkill struct {\n\tSkillID string `json:\"skill_id\" api:\"required\"`\n\t// Any of \"custom\".\n\tType    ManagedAgentsCustomSkillType `json:\"type\" api:\"required\"`\n\tVersion string                       `json:\"version\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSkillID     respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA resolved user-created custom skill.\n\n```go\nfunc (r ManagedAgentsCustomSkill) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCustomSkill) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCustomSkillParams struct {\n\t// Tagged ID of the custom skill (e.g., \"skill_01XJ5...\").\n\tSkillID string `json:\"skill_id\" api:\"required\"`\n\t// Any of \"custom\".\n\tType ManagedAgentsCustomSkillParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Version to pin. Defaults to latest if omitted.\n\tVersion param.Opt[string] `json:\"version,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nA user-created custom skill.\n\nThe properties SkillID, Type are required.\n\n```go\nfunc (r ManagedAgentsCustomSkillParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsCustomSkillParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCustomSkillParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsCustomSkillParamsTypeCustom ManagedAgentsCustomSkillParamsType = \"custom\"\n)\n```\n\n```go\ntype ManagedAgentsCustomSkillType string\n```\n\n```go\nconst (\n\tManagedAgentsCustomSkillTypeCustom ManagedAgentsCustomSkillType = \"custom\"\n)\n```\n\n```go\ntype ManagedAgentsCustomTool struct {\n\tDescription string `json:\"description\" api:\"required\"`\n\t// JSON Schema for custom tool input parameters.\n\tInputSchema ManagedAgentsCustomToolInputSchema `json:\"input_schema\" api:\"required\"`\n\tName        string                             `json:\"name\" api:\"required\"`\n\t// Any of \"custom\".\n\tType ManagedAgentsCustomToolType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tDescription respjson.Field\n\t\tInputSchema respjson.Field\n\t\tName        respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA custom tool as returned in API responses.\n\n```go\nfunc (r ManagedAgentsCustomTool) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsCustomTool) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCustomToolInputSchema struct {\n\tType        constant.Object `json:\"type\" default:\"object\"`\n\tProperties  map[string]any  `json:\"properties\" api:\"nullable\"`\n\tRequired    []string        `json:\"required\" api:\"nullable\"`\n\tExtraFields map[string]any  `json:\"\" api:\"extrafields\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tProperties  respjson.Field\n\t\tRequired    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nJSON Schema for custom tool input parameters.\n\n```go\nfunc (r ManagedAgentsCustomToolInputSchema) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsCustomToolInputSchema) ToParam() ManagedAgentsCustomToolInputSchemaParam\n```\nToParam converts this ManagedAgentsCustomToolInputSchema to a ManagedAgentsCustomToolInputSchemaParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsCustomToolInputSchema) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCustomToolInputSchemaParam struct {\n\tProperties map[string]any `json:\"properties,omitzero\"`\n\tRequired   []string       `json:\"required,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"object\".\n\tType        constant.Object `json:\"type\" default:\"object\"`\n\tExtraFields map[string]any  `json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nJSON Schema for custom tool input parameters.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsCustomToolInputSchemaParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsCustomToolInputSchemaParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCustomToolParams struct {\n\t// Description of what the tool does, shown to the agent to help it decide when to\n\t// use the tool.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// JSON Schema for custom tool input parameters.\n\tInputSchema ManagedAgentsCustomToolInputSchemaParam `json:\"input_schema,omitzero\" api:\"required\"`\n\t// Unique name for the tool. 1-128 characters; letters, digits, underscores, and\n\t// hyphens.\n\tName string `json:\"name\" api:\"required\"`\n\t// Any of \"custom\".\n\tType ManagedAgentsCustomToolParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nA 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.\n\nThe properties Description, InputSchema, Name, Type are required.\n\n```go\nfunc (r ManagedAgentsCustomToolParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsCustomToolParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsCustomToolParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsCustomToolParamsTypeCustom ManagedAgentsCustomToolParamsType = \"custom\"\n)\n```\n\n```go\ntype ManagedAgentsCustomToolType string\n```\n\n```go\nconst (\n\tManagedAgentsCustomToolTypeCustom ManagedAgentsCustomToolType = \"custom\"\n)\n```\n\n```go\ntype ManagedAgentsDeleteSessionResource struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"session_resource_deleted\".\n\tType ManagedAgentsDeleteSessionResourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfirmation of resource deletion.\n\n```go\nfunc (r ManagedAgentsDeleteSessionResource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeleteSessionResource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeleteSessionResourceType string\n```\n\n```go\nconst (\n\tManagedAgentsDeleteSessionResourceTypeSessionResourceDeleted ManagedAgentsDeleteSessionResourceType = \"session_resource_deleted\"\n)\n```\n\n```go\ntype ManagedAgentsDeletedCredential struct {\n\t// Unique identifier of the deleted credential.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"vault_credential_deleted\".\n\tType ManagedAgentsDeletedCredentialType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfirmation of a deleted credential.\n\n```go\nfunc (r ManagedAgentsDeletedCredential) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeletedCredential) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeletedCredentialType string\n```\n\n```go\nconst (\n\tManagedAgentsDeletedCredentialTypeVaultCredentialDeleted ManagedAgentsDeletedCredentialType = \"vault_credential_deleted\"\n)\n```\n\n```go\ntype ManagedAgentsDeletedMemory struct {\n\t// ID of the deleted memory (a `mem_...` value).\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"memory_deleted\".\n\tType ManagedAgentsDeletedMemoryType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nTombstone 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).\n\n```go\nfunc (r ManagedAgentsDeletedMemory) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeletedMemory) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeletedMemoryStore struct {\n\t// ID of the deleted memory store (a `memstore_...` identifier). The store and all\n\t// its memories and versions are no longer retrievable.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"memory_store_deleted\".\n\tType ManagedAgentsDeletedMemoryStoreType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfirmation that a \\`memory\\_store\\` was deleted.\n\n```go\nfunc (r ManagedAgentsDeletedMemoryStore) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeletedMemoryStore) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeletedMemoryStoreType string\n```\n\n```go\nconst (\n\tManagedAgentsDeletedMemoryStoreTypeMemoryStoreDeleted ManagedAgentsDeletedMemoryStoreType = \"memory_store_deleted\"\n)\n```\n\n```go\ntype ManagedAgentsDeletedMemoryType string\n```\n\n```go\nconst (\n\tManagedAgentsDeletedMemoryTypeMemoryDeleted ManagedAgentsDeletedMemoryType = \"memory_deleted\"\n)\n```\n\n```go\ntype ManagedAgentsDeletedSession struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"session_deleted\".\n\tType ManagedAgentsDeletedSessionType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfirmation that a \\`session\\` has been permanently deleted.\n\n```go\nfunc (r ManagedAgentsDeletedSession) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeletedSession) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeletedSessionType string\n```\n\n```go\nconst (\n\tManagedAgentsDeletedSessionTypeSessionDeleted ManagedAgentsDeletedSessionType = \"session_deleted\"\n)\n```\n\n```go\ntype ManagedAgentsDeletedVault struct {\n\t// Unique identifier of the deleted vault.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"vault_deleted\".\n\tType ManagedAgentsDeletedVaultType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfirmation of a deleted vault.\n\n```go\nfunc (r ManagedAgentsDeletedVault) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeletedVault) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeletedVaultType string\n```\n\n```go\nconst (\n\tManagedAgentsDeletedVaultTypeVaultDeleted ManagedAgentsDeletedVaultType = \"vault_deleted\"\n)\n```\n\n```go\ntype ManagedAgentsDeltaContent struct {\n\t// Regular text content.\n\tContent ManagedAgentsTextBlock `json:\"content\" api:\"required\"`\n\t// Any of \"content_delta\".\n\tType ManagedAgentsDeltaContentType `json:\"type\" api:\"required\"`\n\t// Which entry in the previewed event's content array this fragment lands in.\n\t// Insert content as that entry when the index is new; append to the existing entry\n\t// otherwise.\n\tIndex int64 `json:\"index\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tContent     respjson.Field\n\t\tType        respjson.Field\n\t\tIndex       respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsDeltaContent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeltaContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeltaContentType string\n```\n\n```go\nconst (\n\tManagedAgentsDeltaContentTypeContentDelta ManagedAgentsDeltaContentType = \"content_delta\"\n)\n```\n\n```go\ntype ManagedAgentsDeltaEvent struct {\n\t// One fragment of the previewed event. The delta type is named for the previewed\n\t// event's field it streams into: agent.message events stream content_delta\n\t// fragments, each a partial element of the content array.\n\tDelta ManagedAgentsDeltaContent `json:\"delta\" api:\"required\"`\n\t// The id of the event being previewed. Matches event.id on the corresponding\n\t// event_start and the buffered event that reconciles the preview.\n\tEventID string `json:\"event_id\" api:\"required\"`\n\t// Any of \"event_delta\".\n\tType ManagedAgentsDeltaEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tDelta       respjson.Field\n\t\tEventID     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn 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.\n\n```go\nfunc (r ManagedAgentsDeltaEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeltaEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeltaEventType string\n```\n\n```go\nconst (\n\tManagedAgentsDeltaEventTypeEventDelta ManagedAgentsDeltaEventType = \"event_delta\"\n)\n```\n\n```go\ntype ManagedAgentsDeltaType string\n```\nEventDeltaType enum\n\n```go\nconst (\n\tManagedAgentsDeltaTypeAgentMessage  ManagedAgentsDeltaType = \"agent.message\"\n\tManagedAgentsDeltaTypeAgentThinking ManagedAgentsDeltaType = \"agent.thinking\"\n)\n```\n\n```go\ntype ManagedAgentsDeployment struct {\n\tEnvironmentVariables string `json:\"environment_variables\"`\n\n\t// Unique identifier for this deployment.\n\tID string `json:\"id\" api:\"required\"`\n\t// A resolved agent reference with a concrete version.\n\tAgent ManagedAgentsAgentReference `json:\"agent\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Description of what the deployment does.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// ID of the `environment` where sessions run.\n\tEnvironmentID string `json:\"environment_id\" api:\"required\"`\n\t// BYOC tunnel bound to this deployment, when configured.\n\tTunnelID string `json:\"tunnel_id\"`\n\t// Events sent to each session immediately after creation.\n\tInitialEvents []ManagedAgentsDeploymentInitialEventUnion `json:\"initial_events\" api:\"required\"`\n\t// Arbitrary key-value metadata. Maximum 16 pairs.\n\tMetadata map[string]string `json:\"metadata\" api:\"required\"`\n\t// Human-readable name.\n\tName string `json:\"name\" api:\"required\"`\n\t// Why a deployment is paused. Non-null exactly when `status` is `paused`.\n\tPausedReason ManagedAgentsDeploymentPausedReasonUnion `json:\"paused_reason\" api:\"required\"`\n\t// Resources attached to sessions created from this deployment. Echoes the input\n\t// minus write-only credentials.\n\tResources []ManagedAgentsSessionResourceConfigUnion `json:\"resources\" api:\"required\"`\n\t// 5-field POSIX cron schedule with computed runtime timestamps.\n\tSchedule ManagedAgentsSchedule `json:\"schedule\" api:\"required\"`\n\t// Lifecycle status of a deployment.\n\t//\n\t// Any of \"active\", \"paused\".\n\tStatus ManagedAgentsDeploymentStatus `json:\"status\" api:\"required\"`\n\t// Any of \"deployment\".\n\tType ManagedAgentsDeploymentType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// Vault IDs supplying stored credentials for sessions created from this\n\t// deployment.\n\tVaultIDs []string `json:\"vault_ids\" api:\"required\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnvironmentVariables respjson.Field\n\n\t\tID            respjson.Field\n\t\tAgent         respjson.Field\n\t\tArchivedAt    respjson.Field\n\t\tCreatedAt     respjson.Field\n\t\tDescription   respjson.Field\n\t\tEnvironmentID respjson.Field\n\t\tTunnelID      respjson.Field\n\t\tInitialEvents respjson.Field\n\t\tMetadata      respjson.Field\n\t\tName          respjson.Field\n\t\tPausedReason  respjson.Field\n\t\tResources     respjson.Field\n\t\tSchedule      respjson.Field\n\t\tStatus        respjson.Field\n\t\tType          respjson.Field\n\t\tUpdatedAt     respjson.Field\n\t\tVaultIDs      respjson.Field\n\t\tBudget        respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA 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.\n\n```go\nfunc (r ManagedAgentsDeployment) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeployment) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentInitialEventParamsUnion struct {\n\tOfUserMessage       *ManagedAgentsUserMessageEventParams       `json:\",omitzero,inline\"`\n\tOfUserDefineOutcome *ManagedAgentsUserDefineOutcomeEventParams `json:\",omitzero,inline\"`\n\tOfSystemMessage     *ManagedAgentsSystemMessageEventParams     `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc ManagedAgentsDeploymentInitialEventParamsOfSystemMessage(content []ManagedAgentsSystemContentBlockParam) ManagedAgentsDeploymentInitialEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsDeploymentInitialEventParamsOfUserDefineOutcome[\n\tT ManagedAgentsFileRubricParams | ManagedAgentsTextRubricParams,\n](description string, rubric T, type_ ManagedAgentsUserDefineOutcomeEventParamsType) ManagedAgentsDeploymentInitialEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsDeploymentInitialEventParamsOfUserMessage(content []ManagedAgentsUserMessageEventParamsContentUnion) ManagedAgentsDeploymentInitialEventParamsUnion\n```\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventParamsUnion) GetContent() (res managedAgentsDeploymentInitialEventParamsUnionContent)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventParamsUnion) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventParamsUnion) GetMaxIterations() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventParamsUnion) GetRubric() *ManagedAgentsUserDefineOutcomeEventParamsRubricUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventParamsUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventParamsUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsDeploymentInitialEventParamsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentInitialEventUnion struct {\n\t// This field is a union of\n\t// [[]ManagedAgentsDeploymentUserMessageEventContentUnion],\n\t// [[]ManagedAgentsSystemContentBlock]\n\tContent ManagedAgentsDeploymentInitialEventUnionContent `json:\"content\"`\n\t// Any of \"user.message\", \"user.define_outcome\", \"system.message\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsDeploymentUserDefineOutcomeEvent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsDeploymentUserDefineOutcomeEvent].\n\tRubric ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion `json:\"rubric\"`\n\t// This field is from variant [ManagedAgentsDeploymentUserDefineOutcomeEvent].\n\tMaxIterations int64 `json:\"max_iterations\"`\n\tJSON          struct {\n\t\tContent       respjson.Field\n\t\tType          respjson.Field\n\t\tDescription   respjson.Field\n\t\tRubric        respjson.Field\n\t\tMaxIterations respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentInitialEventUnion contains all possible properties and values from [ManagedAgentsDeploymentUserMessageEvent](#ManagedAgentsDeploymentUserMessageEvent), [ManagedAgentsDeploymentUserDefineOutcomeEvent](#ManagedAgentsDeploymentUserDefineOutcomeEvent), [ManagedAgentsDeploymentSystemMessageEvent](#ManagedAgentsDeploymentSystemMessageEvent).\n\nUse the [ManagedAgentsDeploymentInitialEventUnion.AsAny](#ManagedAgentsDeploymentInitialEventUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventUnion) AsAny() anyManagedAgentsDeploymentInitialEvent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDeploymentInitialEventUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsDeploymentUserMessageEvent:\n\tcase qoder.ManagedAgentsDeploymentUserDefineOutcomeEvent:\n\tcase qoder.ManagedAgentsDeploymentSystemMessageEvent:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventUnion) AsSystemMessage() (v ManagedAgentsDeploymentSystemMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventUnion) AsUserDefineOutcome() (v ManagedAgentsDeploymentUserDefineOutcomeEvent)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventUnion) AsUserMessage() (v ManagedAgentsDeploymentUserMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentInitialEventUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentInitialEventUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentInitialEventUnionContent struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsDeploymentUserMessageEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsDeploymentUserMessageEventContentArray []ManagedAgentsDeploymentUserMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsSystemContentBlock] instead of an object.\n\tOfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:\",inline\"`\n\tJSON                                   struct {\n\t\tOfManagedAgentsDeploymentUserMessageEventContentArray respjson.Field\n\t\tOfManagedAgentsSystemContentBlockArray                respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentInitialEventUnionContent is an implicit subunion of [ManagedAgentsDeploymentInitialEventUnion](#ManagedAgentsDeploymentInitialEventUnion). ManagedAgentsDeploymentInitialEventUnionContent provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsDeploymentInitialEventUnion](#ManagedAgentsDeploymentInitialEventUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsDeploymentUserMessageEventContentArray OfManagedAgentsSystemContentBlockArray]\n\n```go\nfunc (r *ManagedAgentsDeploymentInitialEventUnionContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentPausedReasonErrorUnion struct {\n\t// Any of \"environment_archived_error\", \"agent_archived_error\",\n\t// \"environment_not_found_error\", \"vault_not_found_error\", \"file_not_found_error\",\n\t// \"session_resource_not_found_error\", \"workspace_archived_error\",\n\t// \"organization_disabled_error\", \"memory_store_archived_error\",\n\t// \"skill_not_found_error\", \"vault_archived_error\", \"unknown_error\",\n\t// \"self_hosted_resources_unsupported_error\", \"mcp_egress_blocked_error\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentPausedReasonErrorUnion contains all possible properties and values from [ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError](#ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError), [ManagedAgentsAgentArchivedDeploymentPausedReasonError](#ManagedAgentsAgentArchivedDeploymentPausedReasonError), [ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError](#ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError), [ManagedAgentsVaultNotFoundDeploymentPausedReasonError](#ManagedAgentsVaultNotFoundDeploymentPausedReasonError), [ManagedAgentsFileNotFoundDeploymentPausedReasonError](#ManagedAgentsFileNotFoundDeploymentPausedReasonError), [ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError](#ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError), [ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError](#ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError), [ManagedAgentsOrganizationDisabledDeploymentPausedReasonError](#ManagedAgentsOrganizationDisabledDeploymentPausedReasonError), [ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError](#ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError), [ManagedAgentsSkillNotFoundDeploymentPausedReasonError](#ManagedAgentsSkillNotFoundDeploymentPausedReasonError), [ManagedAgentsVaultArchivedDeploymentPausedReasonError](#ManagedAgentsVaultArchivedDeploymentPausedReasonError), [ManagedAgentsUnknownDeploymentPausedReasonError](#ManagedAgentsUnknownDeploymentPausedReasonError), [ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError](#ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError), [ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError](#ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError).\n\nUse the [ManagedAgentsDeploymentPausedReasonErrorUnion.AsAny](#ManagedAgentsDeploymentPausedReasonErrorUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsAgentArchivedError() (v ManagedAgentsAgentArchivedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsAny() anyManagedAgentsDeploymentPausedReasonError\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDeploymentPausedReasonErrorUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsAgentArchivedDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsVaultNotFoundDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsFileNotFoundDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsOrganizationDisabledDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsSkillNotFoundDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsVaultArchivedDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsUnknownDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError:\n\tcase qoder.ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsEnvironmentArchivedError() (v ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsEnvironmentNotFoundError() (v ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsFileNotFoundError() (v ManagedAgentsFileNotFoundDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsMCPEgressBlockedError() (v ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsMemoryStoreArchivedError() (v ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsOrganizationDisabledError() (v ManagedAgentsOrganizationDisabledDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsSelfHostedResourcesUnsupportedError() (v ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsSessionResourceNotFoundError() (v ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsSkillNotFoundError() (v ManagedAgentsSkillNotFoundDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsUnknownError() (v ManagedAgentsUnknownDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsVaultArchivedError() (v ManagedAgentsVaultArchivedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsVaultNotFoundError() (v ManagedAgentsVaultNotFoundDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) AsWorkspaceArchivedError() (v ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonErrorUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentPausedReasonErrorUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentPausedReasonUnion struct {\n\t// Any of \"manual\", \"error\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsErrorDeploymentPausedReason].\n\tError ManagedAgentsDeploymentPausedReasonErrorUnion `json:\"error\"`\n\tJSON  struct {\n\t\tType  respjson.Field\n\t\tError respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentPausedReasonUnion contains all possible properties and values from [ManagedAgentsManualDeploymentPausedReason](#ManagedAgentsManualDeploymentPausedReason), [ManagedAgentsErrorDeploymentPausedReason](#ManagedAgentsErrorDeploymentPausedReason).\n\nUse the [ManagedAgentsDeploymentPausedReasonUnion.AsAny](#ManagedAgentsDeploymentPausedReasonUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonUnion) AsAny() anyManagedAgentsDeploymentPausedReason\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDeploymentPausedReasonUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsManualDeploymentPausedReason:\n\tcase qoder.ManagedAgentsErrorDeploymentPausedReason:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonUnion) AsError() (v ManagedAgentsErrorDeploymentPausedReason)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonUnion) AsManual() (v ManagedAgentsManualDeploymentPausedReason)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentPausedReasonUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentPausedReasonUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentRun struct {\n\t// Unique identifier for this run (`drun_...`).\n\tID string `json:\"id\" api:\"required\"`\n\t// A resolved agent reference with a concrete version.\n\tAgent ManagedAgentsAgentReference `json:\"agent\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// ID of the deployment that produced this run.\n\tDeploymentID string `json:\"deployment_id\" api:\"required\"`\n\t// Why the run failed to create a session. The type identifies the failure; message\n\t// is human-readable detail.\n\tError ManagedAgentsDeploymentRunErrorUnion `json:\"error\" api:\"required\"`\n\t// Populated on success. Null on creation failure. Exactly one of `session_id` or\n\t// `error` is non-null.\n\tSessionID string `json:\"session_id\" api:\"required\"`\n\t// Describes what triggered a deployment run, with trigger-specific metadata.\n\tTriggerContext ManagedAgentsTriggerContextUnion `json:\"trigger_context\" api:\"required\"`\n\t// Any of \"deployment_run\".\n\tType ManagedAgentsDeploymentRunType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID             respjson.Field\n\t\tAgent          respjson.Field\n\t\tCreatedAt      respjson.Field\n\t\tDeploymentID   respjson.Field\n\t\tError          respjson.Field\n\t\tSessionID      respjson.Field\n\t\tTriggerContext respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA persistent, append-only record of a single deployment execution. Records session creation success or failure — no session lifecycle tracking.\n\n```go\nfunc (r ManagedAgentsDeploymentRun) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentRun) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentRunErrorUnion struct {\n\tMessage string `json:\"message\"`\n\t// Any of \"environment_archived_error\", \"agent_archived_error\",\n\t// \"environment_not_found_error\", \"vault_not_found_error\", \"vault_archived_error\",\n\t// \"file_not_found_error\", \"memory_store_archived_error\", \"skill_not_found_error\",\n\t// \"session_resource_not_found_error\", \"workspace_archived_error\",\n\t// \"organization_disabled_error\", \"session_rate_limited_error\",\n\t// \"session_creation_rejected_error\", \"unknown_error\",\n\t// \"self_hosted_resources_unsupported_error\", \"mcp_egress_blocked_error\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tMessage respjson.Field\n\t\tType    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentRunErrorUnion contains all possible properties and values from [ManagedAgentsEnvironmentArchivedRunError](#ManagedAgentsEnvironmentArchivedRunError), [ManagedAgentsAgentArchivedRunError](#ManagedAgentsAgentArchivedRunError), [ManagedAgentsEnvironmentNotFoundRunError](#ManagedAgentsEnvironmentNotFoundRunError), [ManagedAgentsVaultNotFoundRunError](#ManagedAgentsVaultNotFoundRunError), [ManagedAgentsVaultArchivedRunError](#ManagedAgentsVaultArchivedRunError), [ManagedAgentsFileNotFoundRunError](#ManagedAgentsFileNotFoundRunError), [ManagedAgentsMemoryStoreArchivedRunError](#ManagedAgentsMemoryStoreArchivedRunError), [ManagedAgentsSkillNotFoundRunError](#ManagedAgentsSkillNotFoundRunError), [ManagedAgentsSessionResourceNotFoundRunError](#ManagedAgentsSessionResourceNotFoundRunError), [ManagedAgentsWorkspaceArchivedRunError](#ManagedAgentsWorkspaceArchivedRunError), [ManagedAgentsOrganizationDisabledRunError](#ManagedAgentsOrganizationDisabledRunError), [ManagedAgentsSessionRateLimitedRunError](#ManagedAgentsSessionRateLimitedRunError), [ManagedAgentsSessionCreationRejectedRunError](#ManagedAgentsSessionCreationRejectedRunError), [ManagedAgentsUnknownRunError](#ManagedAgentsUnknownRunError), [ManagedAgentsSelfHostedResourcesUnsupportedRunError](#ManagedAgentsSelfHostedResourcesUnsupportedRunError), [ManagedAgentsMCPEgressBlockedRunError](#ManagedAgentsMCPEgressBlockedRunError).\n\nUse the [ManagedAgentsDeploymentRunErrorUnion.AsAny](#ManagedAgentsDeploymentRunErrorUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsAgentArchivedError() (v ManagedAgentsAgentArchivedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsAny() anyManagedAgentsDeploymentRunError\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDeploymentRunErrorUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsEnvironmentArchivedRunError:\n\tcase qoder.ManagedAgentsAgentArchivedRunError:\n\tcase qoder.ManagedAgentsEnvironmentNotFoundRunError:\n\tcase qoder.ManagedAgentsVaultNotFoundRunError:\n\tcase qoder.ManagedAgentsVaultArchivedRunError:\n\tcase qoder.ManagedAgentsFileNotFoundRunError:\n\tcase qoder.ManagedAgentsMemoryStoreArchivedRunError:\n\tcase qoder.ManagedAgentsSkillNotFoundRunError:\n\tcase qoder.ManagedAgentsSessionResourceNotFoundRunError:\n\tcase qoder.ManagedAgentsWorkspaceArchivedRunError:\n\tcase qoder.ManagedAgentsOrganizationDisabledRunError:\n\tcase qoder.ManagedAgentsSessionRateLimitedRunError:\n\tcase qoder.ManagedAgentsSessionCreationRejectedRunError:\n\tcase qoder.ManagedAgentsUnknownRunError:\n\tcase qoder.ManagedAgentsSelfHostedResourcesUnsupportedRunError:\n\tcase qoder.ManagedAgentsMCPEgressBlockedRunError:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsEnvironmentArchivedError() (v ManagedAgentsEnvironmentArchivedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsEnvironmentNotFoundError() (v ManagedAgentsEnvironmentNotFoundRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsFileNotFoundError() (v ManagedAgentsFileNotFoundRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsMCPEgressBlockedError() (v ManagedAgentsMCPEgressBlockedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsMemoryStoreArchivedError() (v ManagedAgentsMemoryStoreArchivedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsOrganizationDisabledError() (v ManagedAgentsOrganizationDisabledRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsSelfHostedResourcesUnsupportedError() (v ManagedAgentsSelfHostedResourcesUnsupportedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsSessionCreationRejectedError() (v ManagedAgentsSessionCreationRejectedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsSessionRateLimitedError() (v ManagedAgentsSessionRateLimitedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsSessionResourceNotFoundError() (v ManagedAgentsSessionResourceNotFoundRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsSkillNotFoundError() (v ManagedAgentsSkillNotFoundRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsUnknownError() (v ManagedAgentsUnknownRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsVaultArchivedError() (v ManagedAgentsVaultArchivedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsVaultNotFoundError() (v ManagedAgentsVaultNotFoundRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) AsWorkspaceArchivedError() (v ManagedAgentsWorkspaceArchivedRunError)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentRunErrorUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentRunErrorUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentRunType string\n```\n\n```go\nconst (\n\tManagedAgentsDeploymentRunTypeDeploymentRun ManagedAgentsDeploymentRunType = \"deployment_run\"\n)\n```\n\n```go\ntype ManagedAgentsDeploymentStatus string\n```\nLifecycle status of a deployment.\n\n```go\nconst (\n\tManagedAgentsDeploymentStatusActive ManagedAgentsDeploymentStatus = \"active\"\n\tManagedAgentsDeploymentStatusPaused ManagedAgentsDeploymentStatus = \"paused\"\n)\n```\n\n```go\ntype ManagedAgentsDeploymentSystemMessageEvent struct {\n\t// System content blocks to append. Text-only.\n\tContent []ManagedAgentsSystemContentBlock `json:\"content\" api:\"required\"`\n\t// Any of \"system.message\".\n\tType ManagedAgentsDeploymentSystemMessageEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tContent     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPrivileged 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.\n\n```go\nfunc (r ManagedAgentsDeploymentSystemMessageEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentSystemMessageEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentSystemMessageEventType string\n```\n\n```go\nconst (\n\tManagedAgentsDeploymentSystemMessageEventTypeSystemMessage ManagedAgentsDeploymentSystemMessageEventType = \"system.message\"\n)\n```\n\n```go\ntype ManagedAgentsDeploymentType string\n```\n\n```go\nconst (\n\tManagedAgentsDeploymentTypeDeployment ManagedAgentsDeploymentType = \"deployment\"\n)\n```\n\n```go\ntype ManagedAgentsDeploymentUserDefineOutcomeEvent struct {\n\t// What the agent should produce. This is the task specification.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// Rubric for grading the quality of an outcome.\n\tRubric ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion `json:\"rubric\" api:\"required\"`\n\t// Any of \"user.define_outcome\".\n\tType ManagedAgentsDeploymentUserDefineOutcomeEventType `json:\"type\" api:\"required\"`\n\t// Eval→revision cycles before giving up. Default 3, max 20.\n\tMaxIterations int64 `json:\"max_iterations\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tDescription   respjson.Field\n\t\tRubric        respjson.Field\n\t\tType          respjson.Field\n\t\tMaxIterations respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn outcome the agent should work toward. The agent begins work on receipt.\n\n```go\nfunc (r ManagedAgentsDeploymentUserDefineOutcomeEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentUserDefineOutcomeEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion struct {\n\t// This field is from variant [ManagedAgentsFileRubric].\n\tFileID string `json:\"file_id\"`\n\t// Any of \"file\", \"text\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsTextRubric].\n\tContent string `json:\"content\"`\n\tJSON    struct {\n\t\tFileID  respjson.Field\n\t\tType    respjson.Field\n\t\tContent respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion contains all possible properties and values from [ManagedAgentsFileRubric](#ManagedAgentsFileRubric), [ManagedAgentsTextRubric](#ManagedAgentsTextRubric).\n\nUse the [ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion.AsAny](#ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsAny() anyManagedAgentsDeploymentUserDefineOutcomeEventRubric\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsFileRubric:\n\tcase qoder.ManagedAgentsTextRubric:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsFile() (v ManagedAgentsFileRubric)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) AsText() (v ManagedAgentsTextRubric)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentUserDefineOutcomeEventRubricUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentUserDefineOutcomeEventType string\n```\n\n```go\nconst (\n\tManagedAgentsDeploymentUserDefineOutcomeEventTypeUserDefineOutcome ManagedAgentsDeploymentUserDefineOutcomeEventType = \"user.define_outcome\"\n)\n```\n\n```go\ntype ManagedAgentsDeploymentUserMessageEvent struct {\n\t// Array of content blocks for the user message.\n\tContent []ManagedAgentsDeploymentUserMessageEventContentUnion `json:\"content\" api:\"required\"`\n\t// Any of \"user.message\".\n\tType ManagedAgentsDeploymentUserMessageEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tContent     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA user message sent to the session.\n\n```go\nfunc (r ManagedAgentsDeploymentUserMessageEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentUserMessageEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentUserMessageEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"redacted\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion]\n\tSource ManagedAgentsDeploymentUserMessageEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tTitle string `json:\"title\"`\n\tJSON  struct {\n\t\tText    respjson.Field\n\t\tType    respjson.Field\n\t\tSource  respjson.Field\n\t\tContext respjson.Field\n\t\tTitle   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentUserMessageEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsRedactedBlock](#ManagedAgentsRedactedBlock).\n\nUse the [ManagedAgentsDeploymentUserMessageEventContentUnion.AsAny](#ManagedAgentsDeploymentUserMessageEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDeploymentUserMessageEventContentUnion) AsAny() anyManagedAgentsDeploymentUserMessageEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDeploymentUserMessageEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsRedactedBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDeploymentUserMessageEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentUserMessageEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentUserMessageEventContentUnion) AsRedacted() (v ManagedAgentsRedactedBlock)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentUserMessageEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsDeploymentUserMessageEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDeploymentUserMessageEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentUserMessageEventContentUnionSource struct {\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDeploymentUserMessageEventContentUnionSource is an implicit subunion of [ManagedAgentsDeploymentUserMessageEventContentUnion](#ManagedAgentsDeploymentUserMessageEventContentUnion). ManagedAgentsDeploymentUserMessageEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsDeploymentUserMessageEventContentUnion](#ManagedAgentsDeploymentUserMessageEventContentUnion).\n\n```go\nfunc (r *ManagedAgentsDeploymentUserMessageEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDeploymentUserMessageEventType string\n```\n\n```go\nconst (\n\tManagedAgentsDeploymentUserMessageEventTypeUserMessage ManagedAgentsDeploymentUserMessageEventType = \"user.message\"\n)\n```\n\n```go\ntype ManagedAgentsDocumentBlock struct {\n\t// Union type for document source variants.\n\tSource ManagedAgentsDocumentBlockSourceUnion `json:\"source\" api:\"required\"`\n\t// Any of \"document\".\n\tType ManagedAgentsDocumentBlockType `json:\"type\" api:\"required\"`\n\t// Additional context about the document for the model.\n\tContext string `json:\"context\" api:\"nullable\"`\n\t// The title of the document.\n\tTitle string `json:\"title\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSource      respjson.Field\n\t\tType        respjson.Field\n\t\tContext     respjson.Field\n\t\tTitle       respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nDocument content, either specified directly as base64 data, as text, or as a reference via a URL.\n\n```go\nfunc (r ManagedAgentsDocumentBlock) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsDocumentBlock) ToParam() ManagedAgentsDocumentBlockParam\n```\nToParam converts this ManagedAgentsDocumentBlock to a ManagedAgentsDocumentBlockParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsDocumentBlock) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDocumentBlockParam struct {\n\t// Union type for document source variants.\n\tSource ManagedAgentsDocumentBlockSourceUnionParam `json:\"source,omitzero\" api:\"required\"`\n\t// Any of \"document\".\n\tType ManagedAgentsDocumentBlockType `json:\"type,omitzero\" api:\"required\"`\n\t// Additional context about the document for the model.\n\tContext param.Opt[string] `json:\"context,omitzero\"`\n\t// The title of the document.\n\tTitle param.Opt[string] `json:\"title,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nDocument content, either specified directly as base64 data, as text, or as a reference via a URL.\n\nThe properties Source, Type are required.\n\n```go\nfunc (r ManagedAgentsDocumentBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsDocumentBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDocumentBlockSourceUnion struct {\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\t// Any of \"base64\", \"text\", \"url\", \"file\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsURLDocumentSource].\n\tURL string `json:\"url\"`\n\t// This field is from variant [ManagedAgentsFileDocumentSource].\n\tFileID string `json:\"file_id\"`\n\tJSON   struct {\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsDocumentBlockSourceUnion contains all possible properties and values from [ManagedAgentsBase64DocumentSource](#ManagedAgentsBase64DocumentSource), [ManagedAgentsPlainTextDocumentSource](#ManagedAgentsPlainTextDocumentSource), [ManagedAgentsURLDocumentSource](#ManagedAgentsURLDocumentSource), [ManagedAgentsFileDocumentSource](#ManagedAgentsFileDocumentSource).\n\nUse the [ManagedAgentsDocumentBlockSourceUnion.AsAny](#ManagedAgentsDocumentBlockSourceUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnion) AsAny() anyManagedAgentsDocumentBlockSource\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsDocumentBlockSourceUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsBase64DocumentSource:\n\tcase qoder.ManagedAgentsPlainTextDocumentSource:\n\tcase qoder.ManagedAgentsURLDocumentSource:\n\tcase qoder.ManagedAgentsFileDocumentSource:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnion) AsBase64() (v ManagedAgentsBase64DocumentSource)\n```\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnion) AsFile() (v ManagedAgentsFileDocumentSource)\n```\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnion) AsText() (v ManagedAgentsPlainTextDocumentSource)\n```\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnion) AsURL() (v ManagedAgentsURLDocumentSource)\n```\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsDocumentBlockSourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDocumentBlockSourceUnionParam struct {\n\tOfBase64 *ManagedAgentsBase64DocumentSourceParam    `json:\",omitzero,inline\"`\n\tOfText   *ManagedAgentsPlainTextDocumentSourceParam `json:\",omitzero,inline\"`\n\tOfURL    *ManagedAgentsURLDocumentSourceParam       `json:\",omitzero,inline\"`\n\tOfFile   *ManagedAgentsFileDocumentSourceParam      `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnionParam) GetData() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnionParam) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnionParam) GetMediaType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnionParam) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsDocumentBlockSourceUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsDocumentBlockSourceUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsDocumentBlockType string\n```\n\n```go\nconst (\n\tManagedAgentsDocumentBlockTypeDocument ManagedAgentsDocumentBlockType = \"document\"\n)\n```\n\n```go\ntype ManagedAgentsEditToolConfig struct {\n\tEnabled bool          `json:\"enabled\" api:\"required\"`\n\tName    constant.Edit `json:\"name\" default:\"edit\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsEditToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.Edit                                    `json:\"type\" default:\"edit\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the edit tool.\n\n```go\nfunc (r ManagedAgentsEditToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEditToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEditToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsEditToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Any of \"edit\".\n\tType ManagedAgentsEditToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"edit\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"edit\".\n\tName constant.Edit `json:\"name\" default:\"edit\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the edit tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsEditToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEditToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEditToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsEditToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEditToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsEditToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEditToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsEditToolConfigParamsTypeEdit ManagedAgentsEditToolConfigParamsType = \"edit\"\n)\n```\n\n```go\ntype ManagedAgentsEditToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsEditToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsEditToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsEditToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsEditToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsEditToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsEditToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsEditToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEditToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortHigh struct {\n\t// Any of \"high\".\n\tType ManagedAgentsEffortHighType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nHigh effort. Favors reasoning depth.\n\n```go\nfunc (r ManagedAgentsEffortHigh) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsEffortHigh) ToParam() ManagedAgentsEffortHighParam\n```\nToParam converts this ManagedAgentsEffortHigh to a ManagedAgentsEffortHighParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsEffortHigh) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortHighParam struct {\n\t// Any of \"high\".\n\tType ManagedAgentsEffortHighType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nHigh effort. Favors reasoning depth.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsEffortHighParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEffortHighParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortHighType string\n```\n\n```go\nconst (\n\tManagedAgentsEffortHighTypeHigh ManagedAgentsEffortHighType = \"high\"\n)\n```\n\n```go\ntype ManagedAgentsEffortLow struct {\n\t// Any of \"low\".\n\tType ManagedAgentsEffortLowType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nLow effort. Favors latency over reasoning depth.\n\n```go\nfunc (r ManagedAgentsEffortLow) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsEffortLow) ToParam() ManagedAgentsEffortLowParam\n```\nToParam converts this ManagedAgentsEffortLow to a ManagedAgentsEffortLowParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsEffortLow) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortLowParam struct {\n\t// Any of \"low\".\n\tType ManagedAgentsEffortLowType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nLow effort. Favors latency over reasoning depth.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsEffortLowParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEffortLowParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortLowType string\n```\n\n```go\nconst (\n\tManagedAgentsEffortLowTypeLow ManagedAgentsEffortLowType = \"low\"\n)\n```\n\n```go\ntype ManagedAgentsEffortMax struct {\n\t// Any of \"max\".\n\tType ManagedAgentsEffortMaxType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nMaximum effort. Favors reasoning depth over latency.\n\n```go\nfunc (r ManagedAgentsEffortMax) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsEffortMax) ToParam() ManagedAgentsEffortMaxParam\n```\nToParam converts this ManagedAgentsEffortMax to a ManagedAgentsEffortMaxParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsEffortMax) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortMaxParam struct {\n\t// Any of \"max\".\n\tType ManagedAgentsEffortMaxType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nMaximum effort. Favors reasoning depth over latency.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsEffortMaxParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEffortMaxParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortMaxType string\n```\n\n```go\nconst (\n\tManagedAgentsEffortMaxTypeMax ManagedAgentsEffortMaxType = \"max\"\n)\n```\n\n```go\ntype ManagedAgentsEffortMedium struct {\n\t// Any of \"medium\".\n\tType ManagedAgentsEffortMediumType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nMedium effort. Balances latency and reasoning depth.\n\n```go\nfunc (r ManagedAgentsEffortMedium) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsEffortMedium) ToParam() ManagedAgentsEffortMediumParam\n```\nToParam converts this ManagedAgentsEffortMedium to a ManagedAgentsEffortMediumParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsEffortMedium) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortMediumParam struct {\n\t// Any of \"medium\".\n\tType ManagedAgentsEffortMediumType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nMedium effort. Balances latency and reasoning depth.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsEffortMediumParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEffortMediumParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortMediumType string\n```\n\n```go\nconst (\n\tManagedAgentsEffortMediumTypeMedium ManagedAgentsEffortMediumType = \"medium\"\n)\n```\n\n```go\ntype ManagedAgentsEffortXhigh struct {\n\t// Any of \"xhigh\".\n\tType ManagedAgentsEffortXhighType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nExtra-high effort. Not all models accept this level.\n\n```go\nfunc (r ManagedAgentsEffortXhigh) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsEffortXhigh) ToParam() ManagedAgentsEffortXhighParam\n```\nToParam converts this ManagedAgentsEffortXhigh to a ManagedAgentsEffortXhighParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsEffortXhigh) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortXhighParam struct {\n\t// Any of \"xhigh\".\n\tType ManagedAgentsEffortXhighType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nExtra-high effort. Not all models accept this level.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsEffortXhighParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEffortXhighParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEffortXhighType string\n```\n\n```go\nconst (\n\tManagedAgentsEffortXhighTypeXhigh ManagedAgentsEffortXhighType = \"xhigh\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError struct {\n\t// Any of \"environment_archived_error\".\n\tType ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's environment was archived.\n\n```go\nfunc (r ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEnvironmentArchivedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorTypeEnvironmentArchivedError ManagedAgentsEnvironmentArchivedDeploymentPausedReasonErrorType = \"environment_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentArchivedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"environment_archived_error\".\n\tType ManagedAgentsEnvironmentArchivedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's environment was archived.\n\n```go\nfunc (r ManagedAgentsEnvironmentArchivedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEnvironmentArchivedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentArchivedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentArchivedRunErrorTypeEnvironmentArchivedError ManagedAgentsEnvironmentArchivedRunErrorType = \"environment_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError struct {\n\t// Any of \"environment_not_found_error\".\n\tType ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's environment no longer exists.\n\n```go\nfunc (r ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorTypeEnvironmentNotFoundError ManagedAgentsEnvironmentNotFoundDeploymentPausedReasonErrorType = \"environment_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentNotFoundRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"environment_not_found_error\".\n\tType ManagedAgentsEnvironmentNotFoundRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's environment no longer exists.\n\n```go\nfunc (r ManagedAgentsEnvironmentNotFoundRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEnvironmentNotFoundRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentNotFoundRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentNotFoundRunErrorTypeEnvironmentNotFoundError ManagedAgentsEnvironmentNotFoundRunErrorType = \"environment_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableAuthResponse struct {\n\t// Where in the outbound request the secret value is substituted.\n\tInjectionLocation ManagedAgentsInjectionLocationResponse `json:\"injection_location\" api:\"required\"`\n\t// Outbound hosts the secret value is substituted on.\n\tNetworking ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion `json:\"networking\" api:\"required\"`\n\t// Name of the environment variable.\n\tSecretName string `json:\"secret_name\" api:\"required\"`\n\t// Any of \"environment_variable\".\n\tType ManagedAgentsEnvironmentVariableAuthResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tInjectionLocation respjson.Field\n\t\tNetworking        respjson.Field\n\t\tSecretName        respjson.Field\n\t\tType              respjson.Field\n\t\tExtraFields       map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEnvironment variable credential details. The secret value is never returned.\n\n```go\nfunc (r ManagedAgentsEnvironmentVariableAuthResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEnvironmentVariableAuthResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion struct {\n\t// Any of \"unrestricted\", \"limited\".\n\tType string `json:\"type\"`\n\t// This field is from variant\n\t// [ManagedAgentsLimitedCredentialNetworkingResponse].\n\tAllowedHosts []string `json:\"allowed_hosts\"`\n\tJSON         struct {\n\t\tType         respjson.Field\n\t\tAllowedHosts respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion contains all possible properties and values from [ManagedAgentsUnrestrictedCredentialNetworkingResponse](#ManagedAgentsUnrestrictedCredentialNetworkingResponse), [ManagedAgentsLimitedCredentialNetworkingResponse](#ManagedAgentsLimitedCredentialNetworkingResponse).\n\nUse the [ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion.AsAny](#ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsAny() anyManagedAgentsEnvironmentVariableAuthResponseNetworking\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsUnrestrictedCredentialNetworkingResponse:\n\tcase qoder.ManagedAgentsLimitedCredentialNetworkingResponse:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsLimited() (v ManagedAgentsLimitedCredentialNetworkingResponse)\n```\n\n```go\nfunc (u ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) AsUnrestricted() (v ManagedAgentsUnrestrictedCredentialNetworkingResponse)\n```\n\n```go\nfunc (u ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsEnvironmentVariableAuthResponseNetworkingUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableAuthResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentVariableAuthResponseTypeEnvironmentVariable ManagedAgentsEnvironmentVariableAuthResponseType = \"environment_variable\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableCreateParams struct {\n\t// Outbound hosts the secret value is substituted on.\n\tNetworking ManagedAgentsCredentialNetworkingParamsUnion `json:\"networking,omitzero\" api:\"required\"`\n\t// Name of the environment variable. Immutable after create.\n\tSecretName string `json:\"secret_name\" api:\"required\"`\n\t// Secret value. Write-only; never returned in responses.\n\tSecretValue string `json:\"secret_value\" api:\"required\"`\n\t// Any of \"environment_variable\".\n\tType ManagedAgentsEnvironmentVariableCreateParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Where in the outbound request the secret value may be substituted.\n\tInjectionLocation ManagedAgentsInjectionLocationParams `json:\"injection_location,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for creating an environment variable credential.\n\nThe properties Networking, SecretName, SecretValue, Type are required.\n\n```go\nfunc (r ManagedAgentsEnvironmentVariableCreateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEnvironmentVariableCreateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableCreateParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentVariableCreateParamsTypeEnvironmentVariable ManagedAgentsEnvironmentVariableCreateParamsType = \"environment_variable\"\n)\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableUpdateParams struct {\n\t// Any of \"environment_variable\".\n\tType ManagedAgentsEnvironmentVariableUpdateParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Updated secret value.\n\tSecretValue param.Opt[string] `json:\"secret_value,omitzero\"`\n\t// Updated injection location.\n\tInjectionLocation ManagedAgentsInjectionLocationUpdateParams `json:\"injection_location,omitzero\"`\n\t// Updated networking scope. Full replacement.\n\tNetworking ManagedAgentsCredentialNetworkingParamsUnion `json:\"networking,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for updating an environment variable credential. \\`secret\\_name\\` is immutable.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsEnvironmentVariableUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsEnvironmentVariableUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsEnvironmentVariableUpdateParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsEnvironmentVariableUpdateParamsTypeEnvironmentVariable ManagedAgentsEnvironmentVariableUpdateParamsType = \"environment_variable\"\n)\n```\n\n```go\ntype ManagedAgentsErrorDeploymentPausedReason struct {\n\t// The error that triggered an auto-pause. Matches the failed run's `error.type`.\n\tError ManagedAgentsDeploymentPausedReasonErrorUnion `json:\"error\" api:\"required\"`\n\t// Any of \"error\".\n\tType ManagedAgentsErrorDeploymentPausedReasonType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tError       respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA scheduled fire recorded a failed run whose error auto-pauses the deployment.\n\n```go\nfunc (r ManagedAgentsErrorDeploymentPausedReason) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsErrorDeploymentPausedReason) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsErrorDeploymentPausedReasonType string\n```\n\n```go\nconst (\n\tManagedAgentsErrorDeploymentPausedReasonTypeError ManagedAgentsErrorDeploymentPausedReasonType = \"error\"\n)\n```\n\n```go\ntype ManagedAgentsEventParamsUnion struct {\n\tOfUserMessage          *ManagedAgentsUserMessageEventParams          `json:\",omitzero,inline\"`\n\tOfUserInterrupt        *ManagedAgentsUserInterruptEventParams        `json:\",omitzero,inline\"`\n\tOfUserToolConfirmation *ManagedAgentsUserToolConfirmationEventParams `json:\",omitzero,inline\"`\n\tOfUserCustomToolResult *ManagedAgentsUserCustomToolResultEventParams `json:\",omitzero,inline\"`\n\tOfUserDefineOutcome    *ManagedAgentsUserDefineOutcomeEventParams    `json:\",omitzero,inline\"`\n\tOfUserToolResult       *ManagedAgentsUserToolResultEventParams       `json:\",omitzero,inline\"`\n\tOfSystemMessage        *ManagedAgentsSystemMessageEventParams        `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc ManagedAgentsEventParamsOfSystemMessage(content []ManagedAgentsSystemContentBlockParam) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsEventParamsOfUserCustomToolResult(customToolUseID string) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsEventParamsOfUserDefineOutcome[\n\tT ManagedAgentsFileRubricParams | ManagedAgentsTextRubricParams,\n](description string, rubric T, type_ ManagedAgentsUserDefineOutcomeEventParamsType) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsEventParamsOfUserInterrupt(type_ ManagedAgentsUserInterruptEventParamsType) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsEventParamsOfUserMessage(content []ManagedAgentsUserMessageEventParamsContentUnion) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsEventParamsOfUserToolConfirmation(result ManagedAgentsUserToolConfirmationEventParamsResult, toolUseID string, type_ ManagedAgentsUserToolConfirmationEventParamsType) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc ManagedAgentsEventParamsOfUserToolResult(toolUseID string) ManagedAgentsEventParamsUnion\n```\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetContent() (res managedAgentsEventParamsUnionContent)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetCustomToolUseID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetDenyMessage() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetIsError() *bool\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetMaxIterations() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetResult() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetRubric() *ManagedAgentsUserDefineOutcomeEventParamsRubricUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetSessionThreadID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetToolUseID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsEventParamsUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsEventParamsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileDocumentSource struct {\n\t// ID of a previously uploaded file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileDocumentSourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFileID      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nDocument referenced by file ID.\n\n```go\nfunc (r ManagedAgentsFileDocumentSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsFileDocumentSource) ToParam() ManagedAgentsFileDocumentSourceParam\n```\nToParam converts this ManagedAgentsFileDocumentSource to a ManagedAgentsFileDocumentSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsFileDocumentSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileDocumentSourceParam struct {\n\t// ID of a previously uploaded file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileDocumentSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nDocument referenced by file ID.\n\nThe properties FileID, Type are required.\n\n```go\nfunc (r ManagedAgentsFileDocumentSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsFileDocumentSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileDocumentSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsFileDocumentSourceTypeFile ManagedAgentsFileDocumentSourceType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsFileImageSource struct {\n\t// ID of a previously uploaded file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileImageSourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFileID      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nImage referenced by file ID.\n\n```go\nfunc (r ManagedAgentsFileImageSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsFileImageSource) ToParam() ManagedAgentsFileImageSourceParam\n```\nToParam converts this ManagedAgentsFileImageSource to a ManagedAgentsFileImageSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsFileImageSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileImageSourceParam struct {\n\t// ID of a previously uploaded file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileImageSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nImage referenced by file ID.\n\nThe properties FileID, Type are required.\n\n```go\nfunc (r ManagedAgentsFileImageSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsFileImageSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileImageSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsFileImageSourceTypeFile ManagedAgentsFileImageSourceType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsFileNotFoundDeploymentPausedReasonError struct {\n\t// Any of \"file_not_found_error\".\n\tType ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA file resource referenced by the deployment no longer exists.\n\n```go\nfunc (r ManagedAgentsFileNotFoundDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsFileNotFoundDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsFileNotFoundDeploymentPausedReasonErrorTypeFileNotFoundError ManagedAgentsFileNotFoundDeploymentPausedReasonErrorType = \"file_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsFileNotFoundRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"file_not_found_error\".\n\tType ManagedAgentsFileNotFoundRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA file resource referenced by the deployment no longer exists.\n\n```go\nfunc (r ManagedAgentsFileNotFoundRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsFileNotFoundRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileNotFoundRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsFileNotFoundRunErrorTypeFileNotFoundError ManagedAgentsFileNotFoundRunErrorType = \"file_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsFileResource struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\tFileID    string    `json:\"file_id\" api:\"required\"`\n\tMountPath string    `json:\"mount_path\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileResourceType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tFileID      respjson.Field\n\t\tMountPath   respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsFileResource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsFileResource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileResourceConfig struct {\n\t// ID of a previously uploaded file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileResourceConfigType `json:\"type\" api:\"required\"`\n\t// Mount path in the container. Defaults to `/mnt/session/uploads/\u003cfile_id\u003e`.\n\tMountPath string `json:\"mount_path\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFileID      respjson.Field\n\t\tType        respjson.Field\n\t\tMountPath   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA file mounted into each session's container.\n\n```go\nfunc (r ManagedAgentsFileResourceConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsFileResourceConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileResourceConfigType string\n```\n\n```go\nconst (\n\tManagedAgentsFileResourceConfigTypeFile ManagedAgentsFileResourceConfigType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsFileResourceParams struct {\n\t// ID of a previously uploaded file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileResourceParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Mount path in the container. Defaults to `/mnt/session/uploads/\u003cfile_id\u003e`.\n\tMountPath param.Opt[string] `json:\"mount_path,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nMount a file uploaded via the Files API into the session.\n\nThe properties FileID, Type are required.\n\n```go\nfunc (r ManagedAgentsFileResourceParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsFileResourceParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileResourceParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsFileResourceParamsTypeFile ManagedAgentsFileResourceParamsType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsFileResourceType string\n```\n\n```go\nconst (\n\tManagedAgentsFileResourceTypeFile ManagedAgentsFileResourceType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsFileRubric struct {\n\t// ID of the rubric file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileRubricType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tFileID      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nRubric referenced by a file uploaded via the Files API.\n\n```go\nfunc (r ManagedAgentsFileRubric) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsFileRubric) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileRubricParams struct {\n\t// ID of the rubric file.\n\tFileID string `json:\"file_id\" api:\"required\"`\n\t// Any of \"file\".\n\tType ManagedAgentsFileRubricParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nRubric referenced by a file uploaded via the Files API.\n\nThe properties FileID, Type are required.\n\n```go\nfunc (r ManagedAgentsFileRubricParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsFileRubricParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsFileRubricParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsFileRubricParamsTypeFile ManagedAgentsFileRubricParamsType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsFileRubricType string\n```\n\n```go\nconst (\n\tManagedAgentsFileRubricTypeFile ManagedAgentsFileRubricType = \"file\"\n)\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResource struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\tMountPath string    `json:\"mount_path\" api:\"required\"`\n\t// Any of \"github_repository\".\n\tType ManagedAgentsGitHubRepositoryResourceType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time                                          `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\tURL       string                                             `json:\"url\" api:\"required\"`\n\tCheckout  ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:\"checkout\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tMountPath   respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tURL         respjson.Field\n\t\tCheckout    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsGitHubRepositoryResource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGitHubRepositoryResource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceCheckoutUnion struct {\n\t// This field is from variant [ManagedAgentsBranchCheckout].\n\tName string `json:\"name\"`\n\t// Any of \"branch\", \"commit\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsCommitCheckout].\n\tSha  string `json:\"sha\"`\n\tJSON struct {\n\t\tName respjson.Field\n\t\tType respjson.Field\n\t\tSha  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsGitHubRepositoryResourceCheckoutUnion contains all possible properties and values from [ManagedAgentsBranchCheckout](#ManagedAgentsBranchCheckout), [ManagedAgentsCommitCheckout](#ManagedAgentsCommitCheckout).\n\nUse the [ManagedAgentsGitHubRepositoryResourceCheckoutUnion.AsAny](#ManagedAgentsGitHubRepositoryResourceCheckoutUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsAny() anyManagedAgentsGitHubRepositoryResourceCheckout\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsGitHubRepositoryResourceCheckoutUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsBranchCheckout:\n\tcase qoder.ManagedAgentsCommitCheckout:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsBranch() (v ManagedAgentsBranchCheckout)\n```\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceCheckoutUnion) AsCommit() (v ManagedAgentsCommitCheckout)\n```\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceCheckoutUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGitHubRepositoryResourceCheckoutUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceConfig struct {\n\t// Any of \"github_repository\".\n\tType ManagedAgentsGitHubRepositoryResourceConfigType `json:\"type\" api:\"required\"`\n\t// Github URL of the repository\n\tURL string `json:\"url\" api:\"required\"`\n\t// Branch or commit to check out. Defaults to the repository's default branch.\n\tCheckout ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion `json:\"checkout\" api:\"nullable\"`\n\t// Mount path in the container. Defaults to `/workspace/\u003crepo-name\u003e`.\n\tMountPath string `json:\"mount_path\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tURL         respjson.Field\n\t\tCheckout    respjson.Field\n\t\tMountPath   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA GitHub repository mounted into each session's container. The authorization token is write-only and never returned.\n\n```go\nfunc (r ManagedAgentsGitHubRepositoryResourceConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGitHubRepositoryResourceConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion struct {\n\t// This field is from variant [ManagedAgentsBranchCheckout].\n\tName string `json:\"name\"`\n\t// Any of \"branch\", \"commit\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsCommitCheckout].\n\tSha  string `json:\"sha\"`\n\tJSON struct {\n\t\tName respjson.Field\n\t\tType respjson.Field\n\t\tSha  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion contains all possible properties and values from [ManagedAgentsBranchCheckout](#ManagedAgentsBranchCheckout), [ManagedAgentsCommitCheckout](#ManagedAgentsCommitCheckout).\n\nUse the [ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion.AsAny](#ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsAny() anyManagedAgentsGitHubRepositoryResourceConfigCheckout\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsBranchCheckout:\n\tcase qoder.ManagedAgentsCommitCheckout:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsBranch() (v ManagedAgentsBranchCheckout)\n```\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) AsCommit() (v ManagedAgentsCommitCheckout)\n```\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceConfigType string\n```\n\n```go\nconst (\n\tManagedAgentsGitHubRepositoryResourceConfigTypeGitHubRepository ManagedAgentsGitHubRepositoryResourceConfigType = \"github_repository\"\n)\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceParams struct {\n\t// GitHub authorization token used to clone the repository.\n\tAuthorizationToken string `json:\"authorization_token,omitzero\"`\n\t// Any of \"github_repository\".\n\tType ManagedAgentsGitHubRepositoryResourceParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Github URL of the repository\n\tURL string `json:\"url\" api:\"required\"`\n\t// Mount path in the container. Defaults to `/workspace/\u003crepo-name\u003e`.\n\tMountPath param.Opt[string] `json:\"mount_path,omitzero\"`\n\t// Branch or commit to check out. Defaults to the repository's default branch.\n\tCheckout ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion `json:\"checkout,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nMount a GitHub repository into the session's container.\n\nThe properties Type and URL are required.\n\n```go\nfunc (r ManagedAgentsGitHubRepositoryResourceParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsGitHubRepositoryResourceParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion struct {\n\tOfBranch *ManagedAgentsBranchCheckoutParam `json:\",omitzero,inline\"`\n\tOfCommit *ManagedAgentsCommitCheckoutParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) GetSha() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsGitHubRepositoryResourceParamsTypeGitHubRepository ManagedAgentsGitHubRepositoryResourceParamsType = \"github_repository\"\n)\n```\n\n```go\ntype ManagedAgentsGitHubRepositoryResourceType string\n```\n\n```go\nconst (\n\tManagedAgentsGitHubRepositoryResourceTypeGitHubRepository ManagedAgentsGitHubRepositoryResourceType = \"github_repository\"\n)\n```\n\n```go\ntype ManagedAgentsGitRepositoryResource struct {\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\tMountPath string    `json:\"mount_path\" api:\"required\"`\n\t// Any of \"git_repository\".\n\tType ManagedAgentsGitRepositoryResourceType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time                                       `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\tURL       string                                          `json:\"url\" api:\"required\"`\n\tCheckout  ManagedAgentsGitRepositoryResourceCheckoutUnion `json:\"checkout\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tMountPath   respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tURL         respjson.Field\n\t\tCheckout    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsGitRepositoryResource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGitRepositoryResource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceCheckoutUnion = ManagedAgentsGitHubRepositoryResourceCheckoutUnion\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceConfig struct {\n\t// Any of \"git_repository\".\n\tType ManagedAgentsGitRepositoryResourceConfigType `json:\"type\" api:\"required\"`\n\t// HTTP(S) URL of the repository\n\tURL string `json:\"url\" api:\"required\"`\n\t// Branch or commit to check out. Defaults to the repository's default branch.\n\tCheckout ManagedAgentsGitRepositoryResourceConfigCheckoutUnion `json:\"checkout\" api:\"nullable\"`\n\t// Mount path in the container. Derived from the repository name when omitted.\n\tMountPath string `json:\"mount_path\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tURL         respjson.Field\n\t\tCheckout    respjson.Field\n\t\tMountPath   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsGitRepositoryResourceConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGitRepositoryResourceConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceConfigCheckoutUnion = ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceConfigType string\n```\n\n```go\nconst (\n\tManagedAgentsGitRepositoryResourceConfigTypeGitRepository ManagedAgentsGitRepositoryResourceConfigType = \"git_repository\"\n)\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceParams struct {\n\tType      ManagedAgentsGitRepositoryResourceParamsType          `json:\"type,omitzero\" api:\"required\"`\n\tURL       string                                                `json:\"url\" api:\"required\"`\n\tPassword  param.Opt[string]                                     `json:\"password,omitzero\"`\n\tMountPath param.Opt[string]                                     `json:\"mount_path,omitzero\"`\n\tCheckout  ManagedAgentsGitRepositoryResourceParamsCheckoutUnion `json:\"checkout,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nMount an HTTP(S) Git repository. For authenticated access, put the username in the URL and supply a password or access token; credentials are never returned.\n\n```go\nfunc (r ManagedAgentsGitRepositoryResourceParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *ManagedAgentsGitRepositoryResourceParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceParamsCheckoutUnion = ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceParamsType string\n```\n\n```go\nconst ManagedAgentsGitRepositoryResourceParamsTypeGitRepository ManagedAgentsGitRepositoryResourceParamsType = \"git_repository\"\n```\n\n```go\ntype ManagedAgentsGitRepositoryResourceType string\n```\n\n```go\nconst (\n\tManagedAgentsGitRepositoryResourceTypeGitRepository ManagedAgentsGitRepositoryResourceType = \"git_repository\"\n)\n```\n\n```go\ntype ManagedAgentsGlobToolConfig struct {\n\tEnabled bool          `json:\"enabled\" api:\"required\"`\n\tName    constant.Glob `json:\"name\" default:\"glob\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsGlobToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.Glob                                    `json:\"type\" default:\"glob\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the glob tool.\n\n```go\nfunc (r ManagedAgentsGlobToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGlobToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGlobToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Any of \"glob\".\n\tType ManagedAgentsGlobToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"glob\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"glob\".\n\tName constant.Glob `json:\"name\" default:\"glob\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the glob tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsGlobToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsGlobToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsGlobToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGlobToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsGlobToolConfigParamsTypeGlob ManagedAgentsGlobToolConfigParamsType = \"glob\"\n)\n```\n\n```go\ntype ManagedAgentsGlobToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsGlobToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsGlobToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsGlobToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsGlobToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsGlobToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsGlobToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsGlobToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGlobToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGrepToolConfig struct {\n\tEnabled bool          `json:\"enabled\" api:\"required\"`\n\tName    constant.Grep `json:\"name\" default:\"grep\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsGrepToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.Grep                                    `json:\"type\" default:\"grep\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the grep tool.\n\n```go\nfunc (r ManagedAgentsGrepToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGrepToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGrepToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Any of \"grep\".\n\tType ManagedAgentsGrepToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"grep\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"grep\".\n\tName constant.Grep `json:\"name\" default:\"grep\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the grep tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsGrepToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsGrepToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsGrepToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsGrepToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsGrepToolConfigParamsTypeGrep ManagedAgentsGrepToolConfigParamsType = \"grep\"\n)\n```\n\n```go\ntype ManagedAgentsGrepToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsGrepToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsGrepToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsGrepToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsGrepToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsGrepToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsGrepToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsGrepToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsGrepToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsImageBlock struct {\n\t// Union type for image source variants.\n\tSource ManagedAgentsImageBlockSourceUnion `json:\"source\" api:\"required\"`\n\t// Any of \"image\".\n\tType ManagedAgentsImageBlockType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSource      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nImage content specified directly as base64 data or as a reference via a URL.\n\n```go\nfunc (r ManagedAgentsImageBlock) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsImageBlock) ToParam() ManagedAgentsImageBlockParam\n```\nToParam converts this ManagedAgentsImageBlock to a ManagedAgentsImageBlockParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsImageBlock) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsImageBlockParam struct {\n\t// Union type for image source variants.\n\tSource ManagedAgentsImageBlockSourceUnionParam `json:\"source,omitzero\" api:\"required\"`\n\t// Any of \"image\".\n\tType ManagedAgentsImageBlockType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nImage content specified directly as base64 data or as a reference via a URL.\n\nThe properties Source, Type are required.\n\n```go\nfunc (r ManagedAgentsImageBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsImageBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsImageBlockSourceUnion struct {\n\t// This field is from variant [ManagedAgentsBase64ImageSource].\n\tData string `json:\"data\"`\n\t// This field is from variant [ManagedAgentsBase64ImageSource].\n\tMediaType string `json:\"media_type\"`\n\t// Any of \"base64\", \"url\", \"file\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsURLImageSource].\n\tURL string `json:\"url\"`\n\t// This field is from variant [ManagedAgentsFileImageSource].\n\tFileID string `json:\"file_id\"`\n\tJSON   struct {\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsImageBlockSourceUnion contains all possible properties and values from [ManagedAgentsBase64ImageSource](#ManagedAgentsBase64ImageSource), [ManagedAgentsURLImageSource](#ManagedAgentsURLImageSource), [ManagedAgentsFileImageSource](#ManagedAgentsFileImageSource).\n\nUse the [ManagedAgentsImageBlockSourceUnion.AsAny](#ManagedAgentsImageBlockSourceUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnion) AsAny() anyManagedAgentsImageBlockSource\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsImageBlockSourceUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsBase64ImageSource:\n\tcase qoder.ManagedAgentsURLImageSource:\n\tcase qoder.ManagedAgentsFileImageSource:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnion) AsBase64() (v ManagedAgentsBase64ImageSource)\n```\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnion) AsFile() (v ManagedAgentsFileImageSource)\n```\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnion) AsURL() (v ManagedAgentsURLImageSource)\n```\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsImageBlockSourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsImageBlockSourceUnionParam struct {\n\tOfBase64 *ManagedAgentsBase64ImageSourceParam `json:\",omitzero,inline\"`\n\tOfURL    *ManagedAgentsURLImageSourceParam    `json:\",omitzero,inline\"`\n\tOfFile   *ManagedAgentsFileImageSourceParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnionParam) GetData() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnionParam) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnionParam) GetMediaType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnionParam) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsImageBlockSourceUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsImageBlockSourceUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsImageBlockType string\n```\n\n```go\nconst (\n\tManagedAgentsImageBlockTypeImage ManagedAgentsImageBlockType = \"image\"\n)\n```\n\n```go\ntype ManagedAgentsInjectionLocationParams struct {\n\t// Substitute when the placeholder appears in the request body.\n\tBody param.Opt[bool] `json:\"body,omitzero\"`\n\t// Substitute when the placeholder appears in a request header value.\n\tHeader param.Opt[bool] `json:\"header,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nWhere in the outbound request the secret value may be substituted.\n\n```go\nfunc (r ManagedAgentsInjectionLocationParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsInjectionLocationParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsInjectionLocationResponse struct {\n\t// Whether the placeholder is substituted in the request body.\n\tBody bool `json:\"body\" api:\"required\"`\n\t// Whether the placeholder is substituted in request header values.\n\tHeader bool `json:\"header\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tBody        respjson.Field\n\t\tHeader      respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nWhere in the outbound request the secret value is substituted.\n\n```go\nfunc (r ManagedAgentsInjectionLocationResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsInjectionLocationResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsInjectionLocationUpdateParams struct {\n\t// Substitute when the placeholder appears in the request body.\n\tBody param.Opt[bool] `json:\"body,omitzero\"`\n\t// Substitute when the placeholder appears in a request header value.\n\tHeader param.Opt[bool] `json:\"header,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nUpdated injection location.\n\n```go\nfunc (r ManagedAgentsInjectionLocationUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsInjectionLocationUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsLimitedCredentialNetworkingParams struct {\n\t// Hostnames on which the secret will be substituted. Each entry is a bare hostname\n\t// (`api.example.com`), an IPv4 address (`192.0.2.1`), or a `*.`-prefixed wildcard\n\t// (`*.example.com`). URLs, ports, paths, and IPv6 addresses are not accepted. At\n\t// most 16 entries.\n\tAllowedHosts []string `json:\"allowed_hosts,omitzero\" api:\"required\"`\n\t// Any of \"limited\".\n\tType ManagedAgentsLimitedCredentialNetworkingParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nSubstitute the secret only on requests to the listed hosts.\n\nThe properties AllowedHosts, Type are required.\n\n```go\nfunc (r ManagedAgentsLimitedCredentialNetworkingParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsLimitedCredentialNetworkingParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsLimitedCredentialNetworkingParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsLimitedCredentialNetworkingParamsTypeLimited ManagedAgentsLimitedCredentialNetworkingParamsType = \"limited\"\n)\n```\n\n```go\ntype ManagedAgentsLimitedCredentialNetworkingResponse struct {\n\t// Hostnames on which the secret will be substituted. An entry matches the request\n\t// host exactly; a `*.`-prefixed entry matches any subdomain of the named domain\n\t// but not the domain itself.\n\tAllowedHosts []string `json:\"allowed_hosts\" api:\"required\"`\n\t// Any of \"limited\".\n\tType ManagedAgentsLimitedCredentialNetworkingResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAllowedHosts respjson.Field\n\t\tType         respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe secret is substituted only on requests to the listed hosts.\n\n```go\nfunc (r ManagedAgentsLimitedCredentialNetworkingResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsLimitedCredentialNetworkingResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsLimitedCredentialNetworkingResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsLimitedCredentialNetworkingResponseTypeLimited ManagedAgentsLimitedCredentialNetworkingResponseType = \"limited\"\n)\n```\n\n```go\ntype ManagedAgentsMCPAuthenticationFailedError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Name of the MCP server that failed authentication.\n\tMCPServerName string `json:\"mcp_server_name\" api:\"required\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"mcp_authentication_failed_error\".\n\tType ManagedAgentsMCPAuthenticationFailedErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMCPServerName  respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAuthentication to an MCP server failed.\n\n```go\nfunc (r ManagedAgentsMCPAuthenticationFailedError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPAuthenticationFailedError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion.AsAny](#ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsAny() anyManagedAgentsMCPAuthenticationFailedErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPAuthenticationFailedErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPAuthenticationFailedErrorTypeMCPAuthenticationFailedError ManagedAgentsMCPAuthenticationFailedErrorType = \"mcp_authentication_failed_error\"\n)\n```\n\n```go\ntype ManagedAgentsMCPConnectionFailedError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Name of the MCP server that failed to connect.\n\tMCPServerName string `json:\"mcp_server_name\" api:\"required\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"mcp_connection_failed_error\".\n\tType ManagedAgentsMCPConnectionFailedErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMCPServerName  respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nFailed to connect to an MCP server.\n\n```go\nfunc (r ManagedAgentsMCPConnectionFailedError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPConnectionFailedError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMCPConnectionFailedErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion.AsAny](#ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsAny() anyManagedAgentsMCPConnectionFailedErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPConnectionFailedErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPConnectionFailedErrorTypeMCPConnectionFailedError ManagedAgentsMCPConnectionFailedErrorType = \"mcp_connection_failed_error\"\n)\n```\n\n```go\ntype ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError struct {\n\t// Any of \"mcp_egress_blocked_error\".\n\tType ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn MCP server host used by the deployment's agent is blocked by the environment's network policy.\n\n```go\nfunc (r ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPEgressBlockedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorTypeMCPEgressBlockedError ManagedAgentsMCPEgressBlockedDeploymentPausedReasonErrorType = \"mcp_egress_blocked_error\"\n)\n```\n\n```go\ntype ManagedAgentsMCPEgressBlockedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"mcp_egress_blocked_error\".\n\tType ManagedAgentsMCPEgressBlockedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn MCP server host used by the deployment's agent is blocked by the environment's network policy.\n\n```go\nfunc (r ManagedAgentsMCPEgressBlockedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPEgressBlockedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPEgressBlockedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPEgressBlockedRunErrorTypeMCPEgressBlockedError ManagedAgentsMCPEgressBlockedRunErrorType = \"mcp_egress_blocked_error\"\n)\n```\n\n```go\ntype ManagedAgentsMCPOAuthAuthResponse struct {\n\t// URL of the MCP server this credential authenticates against.\n\tMCPServerURL string `json:\"mcp_server_url\" api:\"required\"`\n\t// Any of \"mcp_oauth\".\n\tType ManagedAgentsMCPOAuthAuthResponseType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tExpiresAt time.Time `json:\"expires_at\" api:\"nullable\" format:\"date-time\"`\n\t// OAuth refresh token configuration returned in credential responses.\n\tRefresh ManagedAgentsMCPOAuthRefreshResponse `json:\"refresh\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMCPServerURL respjson.Field\n\t\tType         respjson.Field\n\t\tExpiresAt    respjson.Field\n\t\tRefresh      respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nOAuth credential details for an MCP server.\n\n```go\nfunc (r ManagedAgentsMCPOAuthAuthResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPOAuthAuthResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthAuthResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPOAuthAuthResponseTypeMCPOAuth ManagedAgentsMCPOAuthAuthResponseType = \"mcp_oauth\"\n)\n```\n\n```go\ntype ManagedAgentsMCPOAuthCreateParams struct {\n\t// OAuth access token.\n\tAccessToken string `json:\"access_token\" api:\"required\"`\n\t// URL of the MCP server this credential authenticates against.\n\tMCPServerURL string `json:\"mcp_server_url\" api:\"required\"`\n\t// Any of \"mcp_oauth\".\n\tType ManagedAgentsMCPOAuthCreateParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tExpiresAt param.Opt[time.Time] `json:\"expires_at,omitzero\" format:\"date-time\"`\n\t// OAuth refresh token parameters for creating a credential with refresh support.\n\tRefresh ManagedAgentsMCPOAuthRefreshParams `json:\"refresh,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for creating an MCP OAuth credential.\n\nThe properties AccessToken, MCPServerURL, Type are required.\n\n```go\nfunc (r ManagedAgentsMCPOAuthCreateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPOAuthCreateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthCreateParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPOAuthCreateParamsTypeMCPOAuth ManagedAgentsMCPOAuthCreateParamsType = \"mcp_oauth\"\n)\n```\n\n```go\ntype ManagedAgentsMCPOAuthRefreshParams struct {\n\t// OAuth client ID.\n\tClientID string `json:\"client_id\" api:\"required\"`\n\t// OAuth refresh token.\n\tRefreshToken string `json:\"refresh_token\" api:\"required\"`\n\t// Token endpoint URL used to refresh the access token.\n\tTokenEndpoint string `json:\"token_endpoint\" api:\"required\"`\n\t// Token endpoint requires no client authentication.\n\tTokenEndpointAuth ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion `json:\"token_endpoint_auth,omitzero\" api:\"required\"`\n\t// OAuth resource indicator.\n\tResource param.Opt[string] `json:\"resource,omitzero\"`\n\t// OAuth scope for the refresh request.\n\tScope param.Opt[string] `json:\"scope,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nOAuth refresh token parameters for creating a credential with refresh support.\n\nThe properties ClientID, RefreshToken, TokenEndpoint, TokenEndpointAuth are required.\n\n```go\nfunc (r ManagedAgentsMCPOAuthRefreshParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPOAuthRefreshParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion struct {\n\tOfNone              *ManagedAgentsTokenEndpointAuthNoneParam  `json:\",omitzero,inline\"`\n\tOfClientSecretBasic *ManagedAgentsTokenEndpointAuthBasicParam `json:\",omitzero,inline\"`\n\tOfClientSecretPost  *ManagedAgentsTokenEndpointAuthPostParam  `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) GetClientSecret() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsMCPOAuthRefreshParamsTokenEndpointAuthUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthRefreshResponse struct {\n\t// OAuth client ID.\n\tClientID string `json:\"client_id\" api:\"required\"`\n\t// Token endpoint URL used to refresh the access token.\n\tTokenEndpoint string `json:\"token_endpoint\" api:\"required\"`\n\t// Token endpoint requires no client authentication.\n\tTokenEndpointAuth ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion `json:\"token_endpoint_auth\" api:\"required\"`\n\t// OAuth resource indicator.\n\tResource string `json:\"resource\" api:\"nullable\"`\n\t// OAuth scope for the refresh request.\n\tScope string `json:\"scope\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tClientID          respjson.Field\n\t\tTokenEndpoint     respjson.Field\n\t\tTokenEndpointAuth respjson.Field\n\t\tResource          respjson.Field\n\t\tScope             respjson.Field\n\t\tExtraFields       map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nOAuth refresh token configuration returned in credential responses.\n\n```go\nfunc (r ManagedAgentsMCPOAuthRefreshResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPOAuthRefreshResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion struct {\n\t// Any of \"none\", \"client_secret_basic\", \"client_secret_post\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion contains all possible properties and values from [ManagedAgentsTokenEndpointAuthNoneResponse](#ManagedAgentsTokenEndpointAuthNoneResponse), [ManagedAgentsTokenEndpointAuthBasicResponse](#ManagedAgentsTokenEndpointAuthBasicResponse), [ManagedAgentsTokenEndpointAuthPostResponse](#ManagedAgentsTokenEndpointAuthPostResponse).\n\nUse the [ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion.AsAny](#ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsAny() anyManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuth\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTokenEndpointAuthNoneResponse:\n\tcase qoder.ManagedAgentsTokenEndpointAuthBasicResponse:\n\tcase qoder.ManagedAgentsTokenEndpointAuthPostResponse:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsClientSecretBasic() (v ManagedAgentsTokenEndpointAuthBasicResponse)\n```\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsClientSecretPost() (v ManagedAgentsTokenEndpointAuthPostResponse)\n```\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) AsNone() (v ManagedAgentsTokenEndpointAuthNoneResponse)\n```\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPOAuthRefreshResponseTokenEndpointAuthUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthRefreshUpdateParams struct {\n\t// Updated OAuth refresh token.\n\tRefreshToken param.Opt[string] `json:\"refresh_token,omitzero\"`\n\t// Updated OAuth scope for the refresh request.\n\tScope param.Opt[string] `json:\"scope,omitzero\"`\n\t// Updated HTTP Basic authentication parameters for the token endpoint.\n\tTokenEndpointAuth ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion `json:\"token_endpoint_auth,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for updating OAuth refresh token configuration.\n\n```go\nfunc (r ManagedAgentsMCPOAuthRefreshUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPOAuthRefreshUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion struct {\n\tOfClientSecretBasic *ManagedAgentsTokenEndpointAuthBasicUpdateParam `json:\",omitzero,inline\"`\n\tOfClientSecretPost  *ManagedAgentsTokenEndpointAuthPostUpdateParam  `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) GetClientSecret() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsMCPOAuthRefreshUpdateParamsTokenEndpointAuthUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthUpdateParams struct {\n\t// Any of \"mcp_oauth\".\n\tType ManagedAgentsMCPOAuthUpdateParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Updated OAuth access token.\n\tAccessToken param.Opt[string] `json:\"access_token,omitzero\"`\n\t// A timestamp in RFC 3339 format\n\tExpiresAt param.Opt[time.Time] `json:\"expires_at,omitzero\" format:\"date-time\"`\n\t// Parameters for updating OAuth refresh token configuration.\n\tRefresh ManagedAgentsMCPOAuthRefreshUpdateParams `json:\"refresh,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for updating an MCP OAuth credential. The \\`mcp\\_server\\_url\\` is immutable.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsMCPOAuthUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPOAuthUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPOAuthUpdateParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPOAuthUpdateParamsTypeMCPOAuth ManagedAgentsMCPOAuthUpdateParamsType = \"mcp_oauth\"\n)\n```\n\n```go\ntype ManagedAgentsMCPProbe struct {\n\t// An HTTP response captured during a credential validation probe.\n\tHTTPResponse ManagedAgentsRefreshHTTPResponse `json:\"http_response\" api:\"required\"`\n\t// The MCP method that failed (for example `initialize` or `tools/list`).\n\tMethod string `json:\"method\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tHTTPResponse respjson.Field\n\t\tMethod       respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe failing step of an MCP validation probe.\n\n```go\nfunc (r ManagedAgentsMCPProbe) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPProbe) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPServerURLDefinition struct {\n\tName string `json:\"name\" api:\"required\"`\n\t// Any of \"url\".\n\tType ManagedAgentsMCPServerURLDefinitionType `json:\"type\" api:\"required\"`\n\tURL  string                                  `json:\"url\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tName        respjson.Field\n\t\tType        respjson.Field\n\t\tURL         respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nURL-based MCP server connection as returned in API responses.\n\n```go\nfunc (r ManagedAgentsMCPServerURLDefinition) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPServerURLDefinition) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPServerURLDefinitionType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPServerURLDefinitionTypeURL ManagedAgentsMCPServerURLDefinitionType = \"url\"\n)\n```\n\n```go\ntype ManagedAgentsMCPToolConfig struct {\n\tEnabled bool   `json:\"enabled\" api:\"required\"`\n\tName    string `json:\"name\" api:\"required\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsMCPToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved configuration for a specific MCP tool.\n\n```go\nfunc (r ManagedAgentsMCPToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolConfigParams struct {\n\t// Name of the MCP tool to configure. 1-128 characters.\n\tName string `json:\"name\" api:\"required\"`\n\t// Whether this tool is enabled. Overrides the `default_config` setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for a specific MCP tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsMCPToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsMCPToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMCPToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsMCPToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsMCPToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsMCPToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsMCPToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMCPToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMCPToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolset struct {\n\tConfigs []ManagedAgentsMCPToolConfig `json:\"configs\" api:\"required\"`\n\t// Resolved default configuration for all tools from an MCP server.\n\tDefaultConfig ManagedAgentsMCPToolsetDefaultConfig `json:\"default_config\" api:\"required\"`\n\tMCPServerName string                               `json:\"mcp_server_name\" api:\"required\"`\n\t// Any of \"mcp_toolset\".\n\tType ManagedAgentsMCPToolsetType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tConfigs       respjson.Field\n\t\tDefaultConfig respjson.Field\n\t\tMCPServerName respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ManagedAgentsMCPToolset) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPToolset) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolsetDefaultConfig struct {\n\tEnabled bool `json:\"enabled\" api:\"required\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved default configuration for all tools from an MCP server.\n\n```go\nfunc (r ManagedAgentsMCPToolsetDefaultConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPToolsetDefaultConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolsetDefaultConfigParams struct {\n\t// Whether tools are enabled by default. Defaults to true if not specified.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nDefault configuration for all tools from an MCP server.\n\n```go\nfunc (r ManagedAgentsMCPToolsetDefaultConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPToolsetDefaultConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsMCPToolsetDefaultConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion.AsAny](#ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) AsAny() anyManagedAgentsMCPToolsetDefaultConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolsetParams struct {\n\t// Name of the MCP server. Must match a server name from the mcp_servers array.\n\t// 1-255 characters.\n\tMCPServerName string `json:\"mcp_server_name\" api:\"required\"`\n\t// Any of \"mcp_toolset\".\n\tType ManagedAgentsMCPToolsetParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Per-tool configuration overrides.\n\tConfigs []ManagedAgentsMCPToolConfigParams `json:\"configs,omitzero\"`\n\t// Default configuration for all tools from an MCP server.\n\tDefaultConfig ManagedAgentsMCPToolsetDefaultConfigParams `json:\"default_config,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration for tools from an MCP server defined in \\`mcp\\_servers\\`.\n\nThe properties MCPServerName, Type are required.\n\n```go\nfunc (r ManagedAgentsMCPToolsetParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMCPToolsetParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMCPToolsetParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPToolsetParamsTypeMCPToolset ManagedAgentsMCPToolsetParamsType = \"mcp_toolset\"\n)\n```\n\n```go\ntype ManagedAgentsMCPToolsetType string\n```\n\n```go\nconst (\n\tManagedAgentsMCPToolsetTypeMCPToolset ManagedAgentsMCPToolsetType = \"mcp_toolset\"\n)\n```\n\n```go\ntype ManagedAgentsManualDeploymentPausedReason struct {\n\t// Any of \"manual\".\n\tType ManagedAgentsManualDeploymentPausedReasonType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe caller invoked the pause endpoint on the deployment.\n\n```go\nfunc (r ManagedAgentsManualDeploymentPausedReason) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsManualDeploymentPausedReason) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsManualDeploymentPausedReasonType string\n```\n\n```go\nconst (\n\tManagedAgentsManualDeploymentPausedReasonTypeManual ManagedAgentsManualDeploymentPausedReasonType = \"manual\"\n)\n```\n\n```go\ntype ManagedAgentsManualTriggerContext struct {\n\t// Any of \"manual\".\n\tType ManagedAgentsManualTriggerContextType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe run was started manually by creating a session directly against the deployment.\n\n```go\nfunc (r ManagedAgentsManualTriggerContext) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsManualTriggerContext) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsManualTriggerContextType string\n```\n\n```go\nconst (\n\tManagedAgentsManualTriggerContextTypeManual ManagedAgentsManualTriggerContextType = \"manual\"\n)\n```\n\n```go\ntype ManagedAgentsMemory struct {\n\t// Current memory version, starting at 1. Absent on prefix entries.\n\tVersion  int64             `json:\"version\"`\n\tMetadata map[string]string `json:\"metadata\"`\n\n\t// Unique identifier for this memory (a `mem_...` value). Stable across renames;\n\t// use this ID, not the path, to read, update, or delete the memory.\n\tID string `json:\"id\" api:\"required\"`\n\t// Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The\n\t// server applies no normalization, so clients can compute the same hash locally\n\t// for staleness checks and as the value for a `content_sha256` precondition on\n\t// update. Always populated, regardless of `view`.\n\tContentSha256 string `json:\"content_sha256\" api:\"required\"`\n\t// Size of `content` in bytes (the UTF-8 plaintext length). Always populated,\n\t// regardless of `view`.\n\tContentSizeBytes int64 `json:\"content_size_bytes\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// ID of the memory store this memory belongs to (a `memstore_...` value).\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// ID of the `memory_version` representing this memory's current content (a\n\t// `memver_...` value). This is the authoritative head pointer; `memory_version`\n\t// objects do not carry an `is_latest` flag, so compare against this field instead.\n\t// Enumerate the history via\n\t// [List memory versions](/en/api/beta/memory_stores/memory_versions/list).\n\tMemoryVersionID string `json:\"memory_version_id\" api:\"required\"`\n\t// Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`.\n\t// Always starts with `/`. Paths are case-sensitive and unique within a store.\n\t// Maximum 1,024 bytes.\n\tPath string `json:\"path\" api:\"required\"`\n\t// Any of \"memory\".\n\tType ManagedAgentsMemoryType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// The memory's UTF-8 text content. Populated when `view=full`; `null` when\n\t// `view=basic`. Maximum 100 kB (102,400 bytes).\n\tContent string `json:\"content\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tVersion  respjson.Field\n\t\tMetadata respjson.Field\n\n\t\tID               respjson.Field\n\t\tContentSha256    respjson.Field\n\t\tContentSizeBytes respjson.Field\n\t\tCreatedAt        respjson.Field\n\t\tMemoryStoreID    respjson.Field\n\t\tMemoryVersionID  respjson.Field\n\t\tPath             respjson.Field\n\t\tType             respjson.Field\n\t\tUpdatedAt        respjson.Field\n\t\tContent          respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA \\`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.\n\n```go\nfunc (r ManagedAgentsMemory) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemory) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryListItemUnion struct {\n\tMetadata map[string]string `json:\"metadata\"`\n\t// Current memory version, starting at 1. Absent on prefix entries.\n\tVersion int64 `json:\"version\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tID string `json:\"id\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tContentSha256 string `json:\"content_sha256\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tContentSizeBytes int64 `json:\"content_size_bytes\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tCreatedAt time.Time `json:\"created_at\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tMemoryVersionID string `json:\"memory_version_id\"`\n\tPath            string `json:\"path\"`\n\t// Any of \"memory\", \"memory_prefix\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\t// This field is from variant [ManagedAgentsMemory].\n\tContent string `json:\"content\"`\n\tJSON    struct {\n\t\tMetadata         respjson.Field\n\t\tVersion          respjson.Field\n\t\tID               respjson.Field\n\t\tContentSha256    respjson.Field\n\t\tContentSizeBytes respjson.Field\n\t\tCreatedAt        respjson.Field\n\t\tMemoryStoreID    respjson.Field\n\t\tMemoryVersionID  respjson.Field\n\t\tPath             respjson.Field\n\t\tType             respjson.Field\n\t\tUpdatedAt        respjson.Field\n\t\tContent          respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMemoryListItemUnion contains all possible properties and values from [ManagedAgentsMemory](#ManagedAgentsMemory), [ManagedAgentsMemoryPrefix](#ManagedAgentsMemoryPrefix).\n\nUse the [ManagedAgentsMemoryListItemUnion.AsAny](#ManagedAgentsMemoryListItemUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMemoryListItemUnion) AsAny() anyManagedAgentsMemoryListItem\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMemoryListItemUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsMemory:\n\tcase qoder.ManagedAgentsMemoryPrefix:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMemoryListItemUnion) AsMemory() (v ManagedAgentsMemory)\n```\n\n```go\nfunc (u ManagedAgentsMemoryListItemUnion) AsMemoryPrefix() (v ManagedAgentsMemoryPrefix)\n```\n\n```go\nfunc (u ManagedAgentsMemoryListItemUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryListItemUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryPrefix struct {\n\t// The rolled-up path prefix, including a trailing `/` (e.g. `/projects/foo/`).\n\t// Pass this value as `path_prefix` on a subsequent list call to drill into the\n\t// directory.\n\tPath string `json:\"path\" api:\"required\"`\n\t// Any of \"memory_prefix\".\n\tType ManagedAgentsMemoryPrefixType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tPath        respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA 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.\n\n```go\nfunc (r ManagedAgentsMemoryPrefix) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryPrefix) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryPrefixType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryPrefixTypeMemoryPrefix ManagedAgentsMemoryPrefixType = \"memory_prefix\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStore struct {\n\t// active or archived.\n\tStatus     string `json:\"status\"`\n\tEntryCount int64  `json:\"entry_count\"`\n\tTotalSize  int64  `json:\"total_size\"`\n\t// Unique identifier for the memory store (a `memstore_...` tagged ID). Use this\n\t// when attaching the store to a session, or in the `{memory_store_id}` path\n\t// parameter of subsequent calls.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Human-readable name for the store. 1–255 characters. The store's mount-path slug\n\t// under `/mnt/memory/` is derived from this name.\n\tName string `json:\"name\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType ManagedAgentsMemoryStoreType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"nullable\" format:\"date-time\"`\n\t// Free-text description of what the store contains, up to 1024 characters.\n\t// Included in the agent's system prompt when the store is attached, so word it to\n\t// be useful to the agent. Empty string when unset.\n\tDescription string `json:\"description\"`\n\t// Arbitrary key-value tags for your own bookkeeping (such as the end user a store\n\t// belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.\n\t// Returned on retrieve/list but not filterable.\n\tMetadata map[string]string `json:\"metadata\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tStatus      respjson.Field\n\t\tEntryCount  respjson.Field\n\t\tTotalSize   respjson.Field\n\t\tID          respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tName        respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tArchivedAt  respjson.Field\n\t\tDescription respjson.Field\n\t\tMetadata    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA \\`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.\n\n```go\nfunc (r ManagedAgentsMemoryStore) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryStore) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError struct {\n\t// Any of \"memory_store_archived_error\".\n\tType ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA memory store referenced by the deployment is archived.\n\n```go\nfunc (r ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorTypeMemoryStoreArchivedError ManagedAgentsMemoryStoreArchivedDeploymentPausedReasonErrorType = \"memory_store_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreArchivedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"memory_store_archived_error\".\n\tType ManagedAgentsMemoryStoreArchivedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA memory store referenced by the deployment is archived.\n\n```go\nfunc (r ManagedAgentsMemoryStoreArchivedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryStoreArchivedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryStoreArchivedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryStoreArchivedRunErrorTypeMemoryStoreArchivedError ManagedAgentsMemoryStoreArchivedRunErrorType = \"memory_store_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreResource struct {\n\t// The memory store ID (memstore\\_...). Must belong to the caller's organization\n\t// and workspace.\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType ManagedAgentsMemoryStoreResourceType `json:\"type\" api:\"required\"`\n\t// Access mode for an attached memory store.\n\t//\n\t// Any of \"read_write\", \"read_only\".\n\tAccess ManagedAgentsMemoryStoreResourceAccess `json:\"access\" api:\"nullable\"`\n\t// Description of the memory store, snapshotted at attach time. Rendered into the\n\t// agent's system prompt. Empty string when the store has no description.\n\tDescription string `json:\"description\"`\n\t// Per-attachment guidance for the agent on how to use this store. Rendered into\n\t// the memory section of the system prompt. Max 4096 chars.\n\tInstructions string `json:\"instructions\" api:\"nullable\"`\n\t// Filesystem path where the store is mounted in the session container, e.g.\n\t// /mnt/memory/user-preferences. Derived from the store's name. Output-only.\n\tMountPath string `json:\"mount_path\" api:\"nullable\"`\n\t// Display name of the memory store, snapshotted at attach time. Later edits to the\n\t// store's name do not propagate to this resource.\n\tName string `json:\"name\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMemoryStoreID respjson.Field\n\t\tType          respjson.Field\n\t\tAccess        respjson.Field\n\t\tDescription   respjson.Field\n\t\tInstructions  respjson.Field\n\t\tMountPath     respjson.Field\n\t\tName          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA memory store attached to an agent session.\n\n```go\nfunc (r ManagedAgentsMemoryStoreResource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryStoreResource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceAccess string\n```\nAccess mode for an attached memory store.\n\n```go\nconst (\n\tManagedAgentsMemoryStoreResourceAccessReadWrite ManagedAgentsMemoryStoreResourceAccess = \"read_write\"\n\tManagedAgentsMemoryStoreResourceAccessReadOnly  ManagedAgentsMemoryStoreResourceAccess = \"read_only\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceConfig struct {\n\t// The memory store ID (memstore\\_...). Must belong to the caller's organization\n\t// and workspace.\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType ManagedAgentsMemoryStoreResourceConfigType `json:\"type\" api:\"required\"`\n\t// Access mode for an attached memory store.\n\t//\n\t// Any of \"read_write\", \"read_only\".\n\tAccess ManagedAgentsMemoryStoreResourceConfigAccess `json:\"access\" api:\"nullable\"`\n\t// Per-attachment guidance for the agent on how to use this store. Rendered into\n\t// the memory section of the system prompt. Max 4096 chars.\n\tInstructions string `json:\"instructions\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMemoryStoreID respjson.Field\n\t\tType          respjson.Field\n\t\tAccess        respjson.Field\n\t\tInstructions  respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA memory store attached to each session created from this deployment.\n\n```go\nfunc (r ManagedAgentsMemoryStoreResourceConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryStoreResourceConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceConfigAccess string\n```\nAccess mode for an attached memory store.\n\n```go\nconst (\n\tManagedAgentsMemoryStoreResourceConfigAccessReadWrite ManagedAgentsMemoryStoreResourceConfigAccess = \"read_write\"\n\tManagedAgentsMemoryStoreResourceConfigAccessReadOnly  ManagedAgentsMemoryStoreResourceConfigAccess = \"read_only\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceConfigType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryStoreResourceConfigTypeMemoryStore ManagedAgentsMemoryStoreResourceConfigType = \"memory_store\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceParam struct {\n\t// The memory store ID (memstore\\_...). Must belong to the caller's organization\n\t// and workspace.\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"memory_store\".\n\tType ManagedAgentsMemoryStoreResourceParamType `json:\"type,omitzero\" api:\"required\"`\n\t// Per-attachment guidance for the agent on how to use this store. Rendered into\n\t// the memory section of the system prompt. Max 4096 chars.\n\tInstructions param.Opt[string] `json:\"instructions,omitzero\"`\n\t// Access mode for an attached memory store.\n\t//\n\t// Any of \"read_write\", \"read_only\".\n\tAccess ManagedAgentsMemoryStoreResourceParamAccess `json:\"access,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for attaching a memory store to an agent session.\n\nThe properties MemoryStoreID, Type are required.\n\n```go\nfunc (r ManagedAgentsMemoryStoreResourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMemoryStoreResourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceParamAccess string\n```\nAccess mode for an attached memory store.\n\n```go\nconst (\n\tManagedAgentsMemoryStoreResourceParamAccessReadWrite ManagedAgentsMemoryStoreResourceParamAccess = \"read_write\"\n\tManagedAgentsMemoryStoreResourceParamAccessReadOnly  ManagedAgentsMemoryStoreResourceParamAccess = \"read_only\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceParamType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryStoreResourceParamTypeMemoryStore ManagedAgentsMemoryStoreResourceParamType = \"memory_store\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreResourceType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryStoreResourceTypeMemoryStore ManagedAgentsMemoryStoreResourceType = \"memory_store\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryStoreType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryStoreTypeMemoryStore ManagedAgentsMemoryStoreType = \"memory_store\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryTypeMemory ManagedAgentsMemoryType = \"memory\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryVersion struct {\n\tRedacted bool `json:\"redacted\"`\n\t// Unique identifier for this version (a `memver_...` value).\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// ID of the memory this version snapshots (a `mem_...` value). Remains valid after\n\t// the memory is deleted; pass it as `memory_id` to\n\t// [List memory versions](/en/api/beta/memory_stores/memory_versions/list) to\n\t// retrieve the memory's retained versions, including the `deleted` row while the\n\t// lineage is retained.\n\tMemoryID string `json:\"memory_id\" api:\"required\"`\n\t// ID of the memory store this version belongs to (a `memstore_...` value).\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// The kind of mutation a `memory_version` records. Every non-no-op mutation to a\n\t// memory appends exactly one version row with one of these values.\n\t//\n\t// Any of \"created\", \"updated\", \"deleted\".\n\tOperation ManagedAgentsMemoryVersionOperation `json:\"operation\" api:\"required\"`\n\t// Any of \"memory_version\".\n\tType ManagedAgentsMemoryVersionType `json:\"type\" api:\"required\"`\n\t// The memory's UTF-8 text content as of this version. `null` when `view=basic`,\n\t// when `operation` is `deleted`, or when `redacted_at` is set.\n\tContent string `json:\"content\" api:\"nullable\"`\n\t// Lowercase hex SHA-256 digest of `content` as of this version (64 characters).\n\t// `null` when `redacted_at` is set or `operation` is `deleted`. Populated\n\t// regardless of `view` otherwise.\n\tContentSha256 string `json:\"content_sha256\" api:\"nullable\"`\n\t// Size of `content` in bytes as of this version. `null` when `redacted_at` is set\n\t// or `operation` is `deleted`. Populated regardless of `view` otherwise.\n\tContentSizeBytes int64 `json:\"content_size_bytes\" api:\"nullable\"`\n\t// Identifies who performed a write or redact operation. Captured at write time on\n\t// the `memory_version` row. The API key that created a session is not recorded on\n\t// agent writes; attribution answers who made the write, not who is ultimately\n\t// responsible. Look up session provenance separately via the\n\t// [Sessions API](/en/api/beta/sessions/retrieve).\n\tCreatedBy ManagedAgentsActorUnion `json:\"created_by\"`\n\t// The memory's path at the time of this write. `null` if and only if `redacted_at`\n\t// is set.\n\tPath string `json:\"path\" api:\"nullable\"`\n\t// A timestamp in RFC 3339 format\n\tRedactedAt time.Time `json:\"redacted_at\" api:\"nullable\" format:\"date-time\"`\n\t// Identifies who performed a write or redact operation. Captured at write time on\n\t// the `memory_version` row. The API key that created a session is not recorded on\n\t// agent writes; attribution answers who made the write, not who is ultimately\n\t// responsible. Look up session provenance separately via the\n\t// [Sessions API](/en/api/beta/sessions/retrieve).\n\tRedactedBy ManagedAgentsActorUnion `json:\"redacted_by\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tRedacted         respjson.Field\n\t\tID               respjson.Field\n\t\tCreatedAt        respjson.Field\n\t\tMemoryID         respjson.Field\n\t\tMemoryStoreID    respjson.Field\n\t\tOperation        respjson.Field\n\t\tType             respjson.Field\n\t\tContent          respjson.Field\n\t\tContentSha256    respjson.Field\n\t\tContentSizeBytes respjson.Field\n\t\tCreatedBy        respjson.Field\n\t\tPath             respjson.Field\n\t\tRedactedAt       respjson.Field\n\t\tRedactedBy       respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA \\`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.\n\n```go\nfunc (r ManagedAgentsMemoryVersion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMemoryVersion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMemoryVersionOperation string\n```\nThe 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.\n\n```go\nconst (\n\tManagedAgentsMemoryVersionOperationCreated ManagedAgentsMemoryVersionOperation = \"created\"\n\tManagedAgentsMemoryVersionOperationUpdated ManagedAgentsMemoryVersionOperation = \"updated\"\n\t// Deprecated: current API responses use Updated. Retained for legacy payloads.\n\tManagedAgentsMemoryVersionOperationModified ManagedAgentsMemoryVersionOperation = \"modified\"\n\tManagedAgentsMemoryVersionOperationDeleted  ManagedAgentsMemoryVersionOperation = \"deleted\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryVersionType string\n```\n\n```go\nconst (\n\tManagedAgentsMemoryVersionTypeMemoryVersion ManagedAgentsMemoryVersionType = \"memory_version\"\n)\n```\n\n```go\ntype ManagedAgentsMemoryView string\n```\nSelects 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.\n\n```go\nconst (\n\tManagedAgentsMemoryViewBasic ManagedAgentsMemoryView = \"basic\"\n\tManagedAgentsMemoryViewFull  ManagedAgentsMemoryView = \"full\"\n)\n```\n\n```go\ntype ManagedAgentsModel = string\n```\nThe model that will power your agent.\n\nSee \\[models]([https://docs.qoder.com/cloud-agents/api/models/list](https://docs.qoder.com/cloud-agents/api/models/list)) for additional details and options.\n\n```go\ntype ManagedAgentsModelConfig struct {\n\tInferenceGeo           string `json:\"inference_geo\"`\n\tID                     string `json:\"id\" api:\"required\"`\n\tEffort                 string `json:\"effort\"`\n\tContextWindow          int64  `json:\"context_window\"`\n\tEffectiveContextWindow int64  `json:\"effective_context_window\"`\n\tJSON                   struct {\n\t\tInferenceGeo           respjson.Field\n\t\tID                     respjson.Field\n\t\tEffort                 respjson.Field\n\t\tContextWindow          respjson.Field\n\t\tEffectiveContextWindow respjson.Field\n\t\tExtraFields            map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nModel identifier and configuration.\n\n```go\nfunc (r ManagedAgentsModelConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelConfigEffortUnion struct {\n\t// Any of \"low\", \"medium\", \"high\", \"xhigh\", \"max\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsModelConfigEffortUnion contains all possible properties and values from [ManagedAgentsEffortLow](#ManagedAgentsEffortLow), [ManagedAgentsEffortMedium](#ManagedAgentsEffortMedium), [ManagedAgentsEffortHigh](#ManagedAgentsEffortHigh), [ManagedAgentsEffortXhigh](#ManagedAgentsEffortXhigh), [ManagedAgentsEffortMax](#ManagedAgentsEffortMax).\n\nUse the [ManagedAgentsModelConfigEffortUnion.AsAny](#ManagedAgentsModelConfigEffortUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) AsAny() anyManagedAgentsModelConfigEffort\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsModelConfigEffortUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsEffortLow:\n\tcase qoder.ManagedAgentsEffortMedium:\n\tcase qoder.ManagedAgentsEffortHigh:\n\tcase qoder.ManagedAgentsEffortXhigh:\n\tcase qoder.ManagedAgentsEffortMax:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) AsHigh() (v ManagedAgentsEffortHigh)\n```\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) AsLow() (v ManagedAgentsEffortLow)\n```\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) AsMax() (v ManagedAgentsEffortMax)\n```\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) AsMedium() (v ManagedAgentsEffortMedium)\n```\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) AsXhigh() (v ManagedAgentsEffortXhigh)\n```\n\n```go\nfunc (u ManagedAgentsModelConfigEffortUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelConfigEffortUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelConfigParams struct {\n\tInferenceGeo  param.Opt[string] `json:\"inference_geo,omitzero\"`\n\tID            string            `json:\"id\" api:\"required\"`\n\tEffort        param.Opt[string] `json:\"effort,omitzero\"`\n\tContextWindow param.Opt[int64]  `json:\"context_window,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nAn object that defines additional configuration control over model use\n\nThe property ID is required.\n\n```go\nfunc (r ManagedAgentsModelConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsModelConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel string\n```\nHow 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.\n\n```go\nconst (\n\tManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelLow    ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = \"low\"\n\tManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelMedium ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = \"medium\"\n\tManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelHigh   ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = \"high\"\n\tManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelXhigh  ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = \"xhigh\"\n\tManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevelMax    ManagedAgentsModelConfigParamsEffortManagedAgentsEffortLevel = \"max\"\n)\n```\n\n```go\ntype ManagedAgentsModelConfigParamsEffortUnion struct {\n\t// Check if union is this variant with\n\t// !param.IsOmitted(union.OfManagedAgentsModelConfigsEffortManagedAgentsEffortLevel)\n\tOfManagedAgentsModelConfigsEffortManagedAgentsEffortLevel param.Opt[string]               `json:\",omitzero,inline\"`\n\tOfManagedAgentsEffortLow                                  *ManagedAgentsEffortLowParam    `json:\",omitzero,inline\"`\n\tOfManagedAgentsEffortMedium                               *ManagedAgentsEffortMediumParam `json:\",omitzero,inline\"`\n\tOfManagedAgentsEffortHigh                                 *ManagedAgentsEffortHighParam   `json:\",omitzero,inline\"`\n\tOfManagedAgentsEffortXhigh                                *ManagedAgentsEffortXhighParam  `json:\",omitzero,inline\"`\n\tOfManagedAgentsEffortMax                                  *ManagedAgentsEffortMaxParam    `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsModelConfigParamsEffortUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsModelConfigParamsEffortUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsModelConfigParamsEffortUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelConfigParamsSpeed string\n```\nInference speed mode. \\`fast\\` provides significantly faster output token generation at premium pricing. Not all models support \\`fast\\`; invalid combinations are rejected at create time.\n\n```go\nconst (\n\tManagedAgentsModelConfigParamsSpeedStandard ManagedAgentsModelConfigParamsSpeed = \"standard\"\n\tManagedAgentsModelConfigParamsSpeedFast     ManagedAgentsModelConfigParamsSpeed = \"fast\"\n)\n```\n\n```go\ntype ManagedAgentsModelConfigSpeed string\n```\nInference speed mode. \\`fast\\` provides significantly faster output token generation at premium pricing. Not all models support \\`fast\\`; invalid combinations are rejected at create time.\n\n```go\nconst (\n\tManagedAgentsModelConfigSpeedStandard ManagedAgentsModelConfigSpeed = \"standard\"\n\tManagedAgentsModelConfigSpeedFast     ManagedAgentsModelConfigSpeed = \"fast\"\n)\n```\n\n```go\ntype ManagedAgentsModelOverloadedError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsModelOverloadedErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"model_overloaded_error\".\n\tType ManagedAgentsModelOverloadedErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe model is currently overloaded. Emitted after automatic retries are exhausted.\n\n```go\nfunc (r ManagedAgentsModelOverloadedError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelOverloadedError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelOverloadedErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsModelOverloadedErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsModelOverloadedErrorRetryStatusUnion.AsAny](#ManagedAgentsModelOverloadedErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsAny() anyManagedAgentsModelOverloadedErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsModelOverloadedErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsModelOverloadedErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsModelOverloadedErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelOverloadedErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelOverloadedErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsModelOverloadedErrorTypeModelOverloadedError ManagedAgentsModelOverloadedErrorType = \"model_overloaded_error\"\n)\n```\n\n```go\ntype ManagedAgentsModelRateLimitedError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsModelRateLimitedErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"model_rate_limited_error\".\n\tType ManagedAgentsModelRateLimitedErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe model request was rate-limited.\n\n```go\nfunc (r ManagedAgentsModelRateLimitedError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelRateLimitedError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelRateLimitedErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsModelRateLimitedErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsModelRateLimitedErrorRetryStatusUnion.AsAny](#ManagedAgentsModelRateLimitedErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsAny() anyManagedAgentsModelRateLimitedErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsModelRateLimitedErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsModelRateLimitedErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsModelRateLimitedErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelRateLimitedErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelRateLimitedErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsModelRateLimitedErrorTypeModelRateLimitedError ManagedAgentsModelRateLimitedErrorType = \"model_rate_limited_error\"\n)\n```\n\n```go\ntype ManagedAgentsModelRequestFailedError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsModelRequestFailedErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"model_request_failed_error\".\n\tType ManagedAgentsModelRequestFailedErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA model request failed for a reason other than overload or rate-limiting.\n\n```go\nfunc (r ManagedAgentsModelRequestFailedError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelRequestFailedError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelRequestFailedErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsModelRequestFailedErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsModelRequestFailedErrorRetryStatusUnion.AsAny](#ManagedAgentsModelRequestFailedErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsAny() anyManagedAgentsModelRequestFailedErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsModelRequestFailedErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsModelRequestFailedErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsModelRequestFailedErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsModelRequestFailedErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsModelRequestFailedErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsModelRequestFailedErrorTypeModelRequestFailedError ManagedAgentsModelRequestFailedErrorType = \"model_request_failed_error\"\n)\n```\n\n```go\ntype ManagedAgentsMultiagent struct {\n\t// Agents the coordinator may spawn as session threads, each resolved to a specific\n\t// version.\n\tAgents []ManagedAgentsMultiagentAgentUnion `json:\"agents\" api:\"required\"`\n\t// Any of \"coordinator\".\n\tType ManagedAgentsMultiagentType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAgents      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved coordinator topology with a concrete agent roster.\n\n```go\nfunc (r ManagedAgentsMultiagent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMultiagent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMultiagentAgentUnion struct {\n\t// This field is from variant [ManagedAgentsAgentReference].\n\tID string `json:\"id\"`\n\t// Any of \"agent\", \"advisor\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsAgentReference].\n\tVersion int64 `json:\"version\"`\n\t// This field is from variant [ManagedAgentsAdvisor].\n\tModel string `json:\"model\"`\n\tJSON  struct {\n\t\tID      respjson.Field\n\t\tType    respjson.Field\n\t\tVersion respjson.Field\n\t\tModel   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsMultiagentAgentUnion contains all possible properties and values from [ManagedAgentsAgentReference](#ManagedAgentsAgentReference), [ManagedAgentsAdvisor](#ManagedAgentsAdvisor).\n\nUse the [ManagedAgentsMultiagentAgentUnion.AsAny](#ManagedAgentsMultiagentAgentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsMultiagentAgentUnion) AsAdvisor() (v ManagedAgentsAdvisor)\n```\n\n```go\nfunc (u ManagedAgentsMultiagentAgentUnion) AsAgent() (v ManagedAgentsAgentReference)\n```\n\n```go\nfunc (u ManagedAgentsMultiagentAgentUnion) AsAny() anyManagedAgentsMultiagentAgent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsMultiagentAgentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAgentReference:\n\tcase qoder.ManagedAgentsAdvisor:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsMultiagentAgentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsMultiagentAgentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMultiagentParams struct {\n\t// Agents the coordinator may spawn as session threads. 1–20 entries. Each entry is\n\t// an agent ID string, a versioned `{\"type\":\"agent\",\"id\",\"version\"}` reference, or\n\t// `{\"type\":\"self\"}` to allow recursive self-invocation. Entries must reference\n\t// distinct agents (after resolving `self` and string forms); at most one `self`.\n\t// Referenced agents must exist, must not be archived, and must not themselves have\n\t// `multiagent` set (depth limit 1).\n\tAgents []ManagedAgentsMultiagentRosterEntryParamsUnion `json:\"agents,omitzero\" api:\"required\"`\n\t// Any of \"coordinator\".\n\tType ManagedAgentsMultiagentParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nA coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the \\`agents\\` roster.\n\nThe properties Agents, Type are required.\n\n```go\nfunc (r ManagedAgentsMultiagentParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMultiagentParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMultiagentParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsMultiagentParamsTypeCoordinator ManagedAgentsMultiagentParamsType = \"coordinator\"\n)\n```\n\n```go\ntype ManagedAgentsMultiagentRosterEntryParamsUnion struct {\n\tOfString                       param.Opt[string]                  `json:\",omitzero,inline\"`\n\tOfManagedAgentsAgents          *ManagedAgentsAgentParams          `json:\",omitzero,inline\"`\n\tOfManagedAgentsMultiagentSelfs *ManagedAgentsMultiagentSelfParams `json:\",omitzero,inline\"`\n\tOfManagedAgentsAdvisors        *ManagedAgentsAdvisorParams        `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc ManagedAgentsMultiagentRosterEntryParamsOfManagedAgentsAdvisors(model string, type_ ManagedAgentsAdvisorParamsType) ManagedAgentsMultiagentRosterEntryParamsUnion\n```\n\n```go\nfunc ManagedAgentsMultiagentRosterEntryParamsOfManagedAgentsAgents(id string, type_ ManagedAgentsAgentParamsType) ManagedAgentsMultiagentRosterEntryParamsUnion\n```\n\n```go\nfunc ManagedAgentsMultiagentRosterEntryParamsOfManagedAgentsMultiagentSelfs(type_ ManagedAgentsMultiagentSelfParamsType) ManagedAgentsMultiagentRosterEntryParamsUnion\n```\n\n```go\nfunc (u ManagedAgentsMultiagentRosterEntryParamsUnion) GetID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMultiagentRosterEntryParamsUnion) GetModel() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMultiagentRosterEntryParamsUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMultiagentRosterEntryParamsUnion) GetVersion() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsMultiagentRosterEntryParamsUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsMultiagentRosterEntryParamsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMultiagentSelfParams struct {\n\t// Any of \"self\".\n\tType ManagedAgentsMultiagentSelfParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nSentinel roster entry meaning \"the agent that owns this configuration\". Resolved server-side to a concrete agent reference.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsMultiagentSelfParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsMultiagentSelfParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsMultiagentSelfParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsMultiagentSelfParamsTypeSelf ManagedAgentsMultiagentSelfParamsType = \"self\"\n)\n```\n\n```go\ntype ManagedAgentsMultiagentType string\n```\n\n```go\nconst (\n\tManagedAgentsMultiagentTypeCoordinator ManagedAgentsMultiagentType = \"coordinator\"\n)\n```\n\n```go\ntype ManagedAgentsOrganizationDisabledDeploymentPausedReasonError struct {\n\t// Any of \"organization_disabled_error\".\n\tType ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's organization is disabled.\n\n```go\nfunc (r ManagedAgentsOrganizationDisabledDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsOrganizationDisabledDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorTypeOrganizationDisabledError ManagedAgentsOrganizationDisabledDeploymentPausedReasonErrorType = \"organization_disabled_error\"\n)\n```\n\n```go\ntype ManagedAgentsOrganizationDisabledRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"organization_disabled_error\".\n\tType ManagedAgentsOrganizationDisabledRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's organization is disabled.\n\n```go\nfunc (r ManagedAgentsOrganizationDisabledRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsOrganizationDisabledRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsOrganizationDisabledRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsOrganizationDisabledRunErrorTypeOrganizationDisabledError ManagedAgentsOrganizationDisabledRunErrorType = \"organization_disabled_error\"\n)\n```\n\n```go\ntype ManagedAgentsOutcomeEvaluationResource struct {\n\t// A timestamp in RFC 3339 format\n\tCompletedAt time.Time `json:\"completed_at\" api:\"required\" format:\"date-time\"`\n\t// What the agent should produce.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// Grader's verdict text from the most recent evaluation. For `satisfied`, explains\n\t// why criteria are met; for `needs_revision` (intermediate), what's missing; for\n\t// `failed`, why unrecoverable.\n\tExplanation string `json:\"explanation\" api:\"required\"`\n\t// 0-indexed revision cycle the outcome is currently on.\n\tIteration int64 `json:\"iteration\" api:\"required\"`\n\t// Server-generated outc\\_ ID for this outcome.\n\tOutcomeID string `json:\"outcome_id\" api:\"required\"`\n\t// Current evaluation state. `pending` before the agent begins work; `running`\n\t// while producing or revising; `evaluating` while the grader scores;\n\t// `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.\n\tResult string `json:\"result\" api:\"required\"`\n\t// Any of \"outcome_evaluation\".\n\tType ManagedAgentsOutcomeEvaluationResourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCompletedAt respjson.Field\n\t\tDescription respjson.Field\n\t\tExplanation respjson.Field\n\t\tIteration   respjson.Field\n\t\tOutcomeID   respjson.Field\n\t\tResult      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvaluation state for a single outcome defined via a \\`define\\_outcome\\` event.\n\n```go\nfunc (r ManagedAgentsOutcomeEvaluationResource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsOutcomeEvaluationResource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsOutcomeEvaluationResourceType string\n```\n\n```go\nconst (\n\tManagedAgentsOutcomeEvaluationResourceTypeOutcomeEvaluation ManagedAgentsOutcomeEvaluationResourceType = \"outcome_evaluation\"\n)\n```\n\n```go\ntype ManagedAgentsPlainTextDocumentSource struct {\n\t// The plain text content.\n\tData string `json:\"data\" api:\"required\"`\n\t// MIME type of the text content. Must be \"text/plain\".\n\t//\n\t// Any of \"text/plain\".\n\tMediaType ManagedAgentsPlainTextDocumentSourceMediaType `json:\"media_type\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsPlainTextDocumentSourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tData        respjson.Field\n\t\tMediaType   respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPlain text document content.\n\n```go\nfunc (r ManagedAgentsPlainTextDocumentSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsPlainTextDocumentSource) ToParam() ManagedAgentsPlainTextDocumentSourceParam\n```\nToParam converts this ManagedAgentsPlainTextDocumentSource to a ManagedAgentsPlainTextDocumentSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsPlainTextDocumentSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsPlainTextDocumentSourceMediaType string\n```\nMIME type of the text content. Must be \"text/plain\".\n\n```go\nconst (\n\tManagedAgentsPlainTextDocumentSourceMediaTypeTextPlain ManagedAgentsPlainTextDocumentSourceMediaType = \"text/plain\"\n)\n```\n\n```go\ntype ManagedAgentsPlainTextDocumentSourceParam struct {\n\t// The plain text content.\n\tData string `json:\"data\" api:\"required\"`\n\t// MIME type of the text content. Must be \"text/plain\".\n\t//\n\t// Any of \"text/plain\".\n\tMediaType ManagedAgentsPlainTextDocumentSourceMediaType `json:\"media_type,omitzero\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsPlainTextDocumentSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nPlain text document content.\n\nThe properties Data, MediaType, Type are required.\n\n```go\nfunc (r ManagedAgentsPlainTextDocumentSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsPlainTextDocumentSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsPlainTextDocumentSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsPlainTextDocumentSourceTypeText ManagedAgentsPlainTextDocumentSourceType = \"text\"\n)\n```\n\n```go\ntype ManagedAgentsPreconditionParam struct {\n\t// Any of \"content_sha256\".\n\tType ManagedAgentsPreconditionType `json:\"type,omitzero\" api:\"required\"`\n\t// Expected `content_sha256` of the stored memory (64 lowercase hexadecimal\n\t// characters). Typically the `content_sha256` returned by a prior read or list\n\t// call. Because the server applies no content normalization, clients can also\n\t// compute this locally as the SHA-256 of the UTF-8 content bytes.\n\tContentSha256 param.Opt[string] `json:\"content_sha256,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nOptimistic-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.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsPreconditionParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsPreconditionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsPreconditionType string\n```\n\n```go\nconst (\n\tManagedAgentsPreconditionTypeContentSha256 ManagedAgentsPreconditionType = \"content_sha256\"\n)\n```\n\n```go\ntype ManagedAgentsQoderSkill struct {\n\tSkillID string `json:\"skill_id\" api:\"required\"`\n\t// Any of \"qoder\".\n\tType    ManagedAgentsQoderSkillType `json:\"type\" api:\"required\"`\n\tVersion string                      `json:\"version\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSkillID     respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA resolved Qoder-managed skill.\n\n```go\nfunc (r ManagedAgentsQoderSkill) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsQoderSkill) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsQoderSkillParams struct {\n\t// Identifier of the Qoder skill (e.g., \"xlsx\").\n\tSkillID string `json:\"skill_id\" api:\"required\"`\n\t// Any of \"qoder\".\n\tType ManagedAgentsQoderSkillParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Version to pin. Defaults to latest if omitted.\n\tVersion param.Opt[string] `json:\"version,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nAn Qoder-managed skill.\n\nThe properties SkillID, Type are required.\n\n```go\nfunc (r ManagedAgentsQoderSkillParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsQoderSkillParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsQoderSkillParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsQoderSkillParamsTypeQoder ManagedAgentsQoderSkillParamsType = \"qoder\"\n)\n```\n\n```go\ntype ManagedAgentsQoderSkillType string\n```\n\n```go\nconst (\n\tManagedAgentsQoderSkillTypeQoder ManagedAgentsQoderSkillType = \"qoder\"\n)\n```\n\n```go\ntype ManagedAgentsReadToolConfig struct {\n\tEnabled bool          `json:\"enabled\" api:\"required\"`\n\tName    constant.Read `json:\"name\" default:\"read\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsReadToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.Read                                    `json:\"type\" default:\"read\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the read tool.\n\n```go\nfunc (r ManagedAgentsReadToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsReadToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsReadToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsReadToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Any of \"read\".\n\tType ManagedAgentsReadToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"read\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"read\".\n\tName constant.Read `json:\"name\" default:\"read\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the read tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsReadToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsReadToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsReadToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsReadToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsReadToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsReadToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsReadToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsReadToolConfigParamsTypeRead ManagedAgentsReadToolConfigParamsType = \"read\"\n)\n```\n\n```go\ntype ManagedAgentsReadToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsReadToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsReadToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsReadToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsReadToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsReadToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsReadToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsReadToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsReadToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRedactedBlock struct {\n\t// Any of \"redacted\".\n\tType ManagedAgentsRedactedBlockType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPlaceholder for content withheld by Qoder model policy.\n\n```go\nfunc (r ManagedAgentsRedactedBlock) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsRedactedBlock) ToParam() ManagedAgentsRedactedBlockParam\n```\nToParam converts this ManagedAgentsRedactedBlock to a ManagedAgentsRedactedBlockParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsRedactedBlock) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRedactedBlockParam struct {\n\t// Any of \"redacted\".\n\tType ManagedAgentsRedactedBlockType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nPlaceholder for content withheld by Qoder model policy.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsRedactedBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsRedactedBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRedactedBlockType string\n```\n\n```go\nconst (\n\tManagedAgentsRedactedBlockTypeRedacted ManagedAgentsRedactedBlockType = \"redacted\"\n)\n```\n\n```go\ntype ManagedAgentsRefreshHTTPResponse struct {\n\t// Response body. May be truncated and has sensitive values scrubbed.\n\tBody string `json:\"body\" api:\"required\"`\n\t// Whether `body` was truncated.\n\tBodyTruncated bool `json:\"body_truncated\" api:\"required\"`\n\t// Value of the `Content-Type` response header.\n\tContentType string `json:\"content_type\" api:\"required\"`\n\t// HTTP status code.\n\tStatusCode int64 `json:\"status_code\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tBody          respjson.Field\n\t\tBodyTruncated respjson.Field\n\t\tContentType   respjson.Field\n\t\tStatusCode    respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn HTTP response captured during a credential validation probe.\n\n```go\nfunc (r ManagedAgentsRefreshHTTPResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsRefreshHTTPResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRefreshObject struct {\n\t// An HTTP response captured during a credential validation probe.\n\tHTTPResponse ManagedAgentsRefreshHTTPResponse `json:\"http_response\" api:\"required\"`\n\t// Outcome of a refresh-token exchange attempted during credential validation.\n\t//\n\t// Any of \"succeeded\", \"failed\", \"connect_error\", \"no_refresh_token\".\n\tStatus ManagedAgentsRefreshObjectStatus `json:\"status\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tHTTPResponse respjson.Field\n\t\tStatus       respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nOutcome of a refresh-token exchange attempted during credential validation.\n\n```go\nfunc (r ManagedAgentsRefreshObject) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsRefreshObject) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRefreshObjectStatus string\n```\nOutcome of a refresh-token exchange attempted during credential validation.\n\n```go\nconst (\n\tManagedAgentsRefreshObjectStatusSucceeded      ManagedAgentsRefreshObjectStatus = \"succeeded\"\n\tManagedAgentsRefreshObjectStatusFailed         ManagedAgentsRefreshObjectStatus = \"failed\"\n\tManagedAgentsRefreshObjectStatusConnectError   ManagedAgentsRefreshObjectStatus = \"connect_error\"\n\tManagedAgentsRefreshObjectStatusNoRefreshToken ManagedAgentsRefreshObjectStatus = \"no_refresh_token\"\n)\n```\n\n```go\ntype ManagedAgentsRetryStatusExhausted struct {\n\t// Any of \"exhausted\".\n\tType ManagedAgentsRetryStatusExhaustedType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThis turn is dead; queued inputs are flushed and the session returns to idle. Client may send a new prompt.\n\n```go\nfunc (r ManagedAgentsRetryStatusExhausted) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsRetryStatusExhausted) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRetryStatusExhaustedType string\n```\n\n```go\nconst (\n\tManagedAgentsRetryStatusExhaustedTypeExhausted ManagedAgentsRetryStatusExhaustedType = \"exhausted\"\n)\n```\n\n```go\ntype ManagedAgentsRetryStatusRetrying struct {\n\t// Any of \"retrying\".\n\tType ManagedAgentsRetryStatusRetryingType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe 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.\n\n```go\nfunc (r ManagedAgentsRetryStatusRetrying) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsRetryStatusRetrying) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRetryStatusRetryingType string\n```\n\n```go\nconst (\n\tManagedAgentsRetryStatusRetryingTypeRetrying ManagedAgentsRetryStatusRetryingType = \"retrying\"\n)\n```\n\n```go\ntype ManagedAgentsRetryStatusTerminal struct {\n\t// Any of \"terminal\".\n\tType ManagedAgentsRetryStatusTerminalType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe session encountered a terminal error and will transition to \\`terminated\\` state.\n\n```go\nfunc (r ManagedAgentsRetryStatusTerminal) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsRetryStatusTerminal) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsRetryStatusTerminalType string\n```\n\n```go\nconst (\n\tManagedAgentsRetryStatusTerminalTypeTerminal ManagedAgentsRetryStatusTerminalType = \"terminal\"\n)\n```\n\n```go\ntype ManagedAgentsSchedule struct {\n\t// 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,\n\t// \"0 9 \\* \\* 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean\n\t// Sunday. Extended cron syntax - seconds or year fields, and the special\n\t// characters L, W, #, and ? - is not supported, nor are predefined shortcuts\n\t// (@daily).\n\tExpression string `json:\"expression\" api:\"required\"`\n\t// IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").\n\tTimezone string `json:\"timezone\" api:\"required\"`\n\t// Any of \"cron\".\n\tType ManagedAgentsScheduleType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tLastRunAt time.Time `json:\"last_run_at\" api:\"nullable\" format:\"date-time\"`\n\t// Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused\n\t// deployments (reflects what the schedule would do if unpaused); empty once the\n\t// deployment is archived (`archived_at` set). Each fire is offset by a small\n\t// per-schedule jitter, so a run will actually start at or shortly after its listed\n\t// time.\n\tUpcomingRunsAt []time.Time `json:\"upcoming_runs_at\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tExpression     respjson.Field\n\t\tTimezone       respjson.Field\n\t\tType           respjson.Field\n\t\tLastRunAt      respjson.Field\n\t\tUpcomingRunsAt respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n5-field POSIX cron schedule with computed runtime timestamps.\n\n```go\nfunc (r ManagedAgentsSchedule) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSchedule) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsScheduleParams struct {\n\t// 5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g.,\n\t// \"0 9 \\* \\* 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean\n\t// Sunday. Extended cron syntax - seconds or year fields, and the special\n\t// characters L, W, #, and ? - is not supported, nor are predefined shortcuts\n\t// (@daily).\n\tExpression string `json:\"expression\" api:\"required\"`\n\t// Required. IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").\n\t// Validated against the IANA timezone database.\n\tTimezone string `json:\"timezone\" api:\"required\"`\n\t// Any of \"cron\".\n\tType ManagedAgentsScheduleParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\n5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.\n\nThe properties Expression, Timezone, Type are required.\n\n```go\nfunc (r ManagedAgentsScheduleParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsScheduleParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsScheduleParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsScheduleParamsTypeCron ManagedAgentsScheduleParamsType = \"cron\"\n)\n```\n\n```go\ntype ManagedAgentsScheduleTriggerContext struct {\n\t// A timestamp in RFC 3339 format\n\tScheduledAt time.Time `json:\"scheduled_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"schedule\".\n\tType ManagedAgentsScheduleTriggerContextType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tScheduledAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe run was fired by the deployment's cron schedule.\n\n```go\nfunc (r ManagedAgentsScheduleTriggerContext) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsScheduleTriggerContext) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsScheduleTriggerContextType string\n```\n\n```go\nconst (\n\tManagedAgentsScheduleTriggerContextTypeSchedule ManagedAgentsScheduleTriggerContextType = \"schedule\"\n)\n```\n\n```go\ntype ManagedAgentsScheduleType string\n```\n\n```go\nconst (\n\tManagedAgentsScheduleTypeCron ManagedAgentsScheduleType = \"cron\"\n)\n```\n\n```go\ntype ManagedAgentsSearchResultBlock struct {\n\t// Citation settings for a search result.\n\tCitations ManagedAgentsSearchResultCitations `json:\"citations\" api:\"required\"`\n\t// Array of text content blocks from the search result.\n\tContent []ManagedAgentsSearchResultContent `json:\"content\" api:\"required\"`\n\t// The URL source of the search result.\n\tSource string `json:\"source\" api:\"required\"`\n\t// The title of the search result.\n\tTitle string `json:\"title\" api:\"required\"`\n\t// Any of \"search_result\".\n\tType ManagedAgentsSearchResultBlockType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCitations   respjson.Field\n\t\tContent     respjson.Field\n\t\tSource      respjson.Field\n\t\tTitle       respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA block containing a web search result.\n\n```go\nfunc (r ManagedAgentsSearchResultBlock) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsSearchResultBlock) ToParam() ManagedAgentsSearchResultBlockParam\n```\nToParam converts this ManagedAgentsSearchResultBlock to a ManagedAgentsSearchResultBlockParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsSearchResultBlock) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSearchResultBlockParam struct {\n\t// Citation settings for a search result.\n\tCitations ManagedAgentsSearchResultCitationsParam `json:\"citations,omitzero\" api:\"required\"`\n\t// Array of text content blocks from the search result.\n\tContent []ManagedAgentsSearchResultContentParam `json:\"content,omitzero\" api:\"required\"`\n\t// The URL source of the search result.\n\tSource string `json:\"source\" api:\"required\"`\n\t// The title of the search result.\n\tTitle string `json:\"title\" api:\"required\"`\n\t// Any of \"search_result\".\n\tType ManagedAgentsSearchResultBlockType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nA block containing a web search result.\n\nThe properties Citations, Content, Source, Title, Type are required.\n\n```go\nfunc (r ManagedAgentsSearchResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsSearchResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSearchResultBlockType string\n```\n\n```go\nconst (\n\tManagedAgentsSearchResultBlockTypeSearchResult ManagedAgentsSearchResultBlockType = \"search_result\"\n)\n```\n\n```go\ntype ManagedAgentsSearchResultCitations struct {\n\t// Whether citations are enabled for this search result.\n\tEnabled bool `json:\"enabled\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCitation settings for a search result.\n\n```go\nfunc (r ManagedAgentsSearchResultCitations) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsSearchResultCitations) ToParam() ManagedAgentsSearchResultCitationsParam\n```\nToParam converts this ManagedAgentsSearchResultCitations to a ManagedAgentsSearchResultCitationsParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsSearchResultCitations) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSearchResultCitationsParam struct {\n\t// Whether citations are enabled for this search result.\n\tEnabled bool `json:\"enabled\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nCitation settings for a search result.\n\nThe property Enabled is required.\n\n```go\nfunc (r ManagedAgentsSearchResultCitationsParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsSearchResultCitationsParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSearchResultContent struct {\n\t// The text content.\n\tText string `json:\"text\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsSearchResultContentType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tText        respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nText content within a search result.\n\n```go\nfunc (r ManagedAgentsSearchResultContent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsSearchResultContent) ToParam() ManagedAgentsSearchResultContentParam\n```\nToParam converts this ManagedAgentsSearchResultContent to a ManagedAgentsSearchResultContentParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsSearchResultContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSearchResultContentParam struct {\n\t// The text content.\n\tText string `json:\"text\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsSearchResultContentType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nText content within a search result.\n\nThe properties Text, Type are required.\n\n```go\nfunc (r ManagedAgentsSearchResultContentParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsSearchResultContentParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSearchResultContentType string\n```\n\n```go\nconst (\n\tManagedAgentsSearchResultContentTypeText ManagedAgentsSearchResultContentType = \"text\"\n)\n```\n\n```go\ntype ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError struct {\n\t// Any of \"self_hosted_resources_unsupported_error\".\n\tType ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment configures resources, but its environment is self-hosted and cannot mount them.\n\n```go\nfunc (r ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorTypeSelfHostedResourcesUnsupportedError ManagedAgentsSelfHostedResourcesUnsupportedDeploymentPausedReasonErrorType = \"self_hosted_resources_unsupported_error\"\n)\n```\n\n```go\ntype ManagedAgentsSelfHostedResourcesUnsupportedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"self_hosted_resources_unsupported_error\".\n\tType ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment configures resources, but its environment is self-hosted and cannot mount them.\n\n```go\nfunc (r ManagedAgentsSelfHostedResourcesUnsupportedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSelfHostedResourcesUnsupportedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSelfHostedResourcesUnsupportedRunErrorTypeSelfHostedResourcesUnsupportedError ManagedAgentsSelfHostedResourcesUnsupportedRunErrorType = \"self_hosted_resources_unsupported_error\"\n)\n```\n\n```go\ntype ManagedAgentsSendSessionEvents struct {\n\t// Sent events\n\tData []ManagedAgentsSendSessionEventsDataUnion `json:\"data\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tData        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvents that were successfully sent to the session.\n\n```go\nfunc (r ManagedAgentsSendSessionEvents) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSendSessionEvents) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSendSessionEventsDataUnion struct {\n\tID string `json:\"id\"`\n\t// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion],\n\t// [[]ManagedAgentsUserToolResultEventContentUnion],\n\t// [[]ManagedAgentsSystemContentBlock]\n\tContent ManagedAgentsSendSessionEventsDataUnionContent `json:\"content\"`\n\t// Any of \"user.message\", \"user.interrupt\", \"user.tool_confirmation\",\n\t// \"user.custom_tool_result\", \"user.define_outcome\", \"user.tool_result\",\n\t// \"system.message\".\n\tType            string    `json:\"type\"`\n\tProcessedAt     time.Time `json:\"processed_at\"`\n\tSessionThreadID string    `json:\"session_thread_id\"`\n\t// This field is from variant [ManagedAgentsUserToolConfirmationEvent].\n\tResult    ManagedAgentsUserToolConfirmationEventResult `json:\"result\"`\n\tToolUseID string                                       `json:\"tool_use_id\"`\n\t// This field is from variant [ManagedAgentsUserToolConfirmationEvent].\n\tDenyMessage string `json:\"deny_message\"`\n\t// This field is from variant [ManagedAgentsUserCustomToolResultEvent].\n\tCustomToolUseID string `json:\"custom_tool_use_id\"`\n\tIsError         bool   `json:\"is_error\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tMaxIterations int64 `json:\"max_iterations\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tOutcomeID string `json:\"outcome_id\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tRubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:\"rubric\"`\n\tJSON   struct {\n\t\tID              respjson.Field\n\t\tContent         respjson.Field\n\t\tType            respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tResult          respjson.Field\n\t\tToolUseID       respjson.Field\n\t\tDenyMessage     respjson.Field\n\t\tCustomToolUseID respjson.Field\n\t\tIsError         respjson.Field\n\t\tDescription     respjson.Field\n\t\tMaxIterations   respjson.Field\n\t\tOutcomeID       respjson.Field\n\t\tRubric          respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSendSessionEventsDataUnion contains all possible properties and values from [ManagedAgentsUserMessageEvent](#ManagedAgentsUserMessageEvent), [ManagedAgentsUserInterruptEvent](#ManagedAgentsUserInterruptEvent), [ManagedAgentsUserToolConfirmationEvent](#ManagedAgentsUserToolConfirmationEvent), [ManagedAgentsUserCustomToolResultEvent](#ManagedAgentsUserCustomToolResultEvent), [ManagedAgentsUserDefineOutcomeEvent](#ManagedAgentsUserDefineOutcomeEvent), [ManagedAgentsUserToolResultEvent](#ManagedAgentsUserToolResultEvent), [ManagedAgentsSystemMessageEvent](#ManagedAgentsSystemMessageEvent).\n\nUse the [ManagedAgentsSendSessionEventsDataUnion.AsAny](#ManagedAgentsSendSessionEventsDataUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsAny() anyManagedAgentsSendSessionEventsData\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSendSessionEventsDataUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsUserMessageEvent:\n\tcase qoder.ManagedAgentsUserInterruptEvent:\n\tcase qoder.ManagedAgentsUserToolConfirmationEvent:\n\tcase qoder.ManagedAgentsUserCustomToolResultEvent:\n\tcase qoder.ManagedAgentsUserDefineOutcomeEvent:\n\tcase qoder.ManagedAgentsUserToolResultEvent:\n\tcase qoder.ManagedAgentsSystemMessageEvent:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsSystemMessage() (v ManagedAgentsSystemMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsUserCustomToolResult() (v ManagedAgentsUserCustomToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsUserDefineOutcome() (v ManagedAgentsUserDefineOutcomeEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsUserInterrupt() (v ManagedAgentsUserInterruptEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsUserMessage() (v ManagedAgentsUserMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsUserToolConfirmation() (v ManagedAgentsUserToolConfirmationEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) AsUserToolResult() (v ManagedAgentsUserToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsSendSessionEventsDataUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSendSessionEventsDataUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSendSessionEventsDataUnionContent struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsSystemContentBlock] instead of an object.\n\tOfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:\",inline\"`\n\tJSON                                   struct {\n\t\tOfManagedAgentsUserMessageEventContentArray          respjson.Field\n\t\tOfManagedAgentsUserCustomToolResultEventContentArray respjson.Field\n\t\tOfManagedAgentsUserToolResultEventContentArray       respjson.Field\n\t\tOfManagedAgentsSystemContentBlockArray               respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSendSessionEventsDataUnionContent is an implicit subunion of [ManagedAgentsSendSessionEventsDataUnion](#ManagedAgentsSendSessionEventsDataUnion). ManagedAgentsSendSessionEventsDataUnionContent provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSendSessionEventsDataUnion](#ManagedAgentsSendSessionEventsDataUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsUserMessageEventContentArray OfManagedAgentsUserCustomToolResultEventContentArray OfManagedAgentsUserToolResultEventContentArray OfManagedAgentsSystemContentBlockArray]\n\n```go\nfunc (r *ManagedAgentsSendSessionEventsDataUnionContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsServerToolUsage struct {\n\t// Number of server-executed web fetch requests.\n\tWebFetchRequests int64 `json:\"web_fetch_requests\"`\n\t// Number of server-executed web search requests.\n\tWebSearchRequests int64 `json:\"web_search_requests\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tWebFetchRequests  respjson.Field\n\t\tWebSearchRequests respjson.Field\n\t\tExtraFields       map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCumulative count of server-executed tool invocations, broken down by tool.\n\n```go\nfunc (r ManagedAgentsServerToolUsage) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsServerToolUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsServiceAccountActor struct {\n\t// ID of the service account that performed the write (a `svac_...` value).\n\tServiceAccountID string                       `json:\"service_account_id\" api:\"required\"`\n\tType             constant.ServiceAccountActor `json:\"type\" default:\"service_account_actor\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tServiceAccountID respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAttribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation.\n\n```go\nfunc (r ManagedAgentsServiceAccountActor) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsServiceAccountActor) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSession struct {\n\tEnvironmentVariables map[string]string `json:\"environment_variables\"`\n\n\tID string `json:\"id\" api:\"required\"`\n\t// Resolved `agent` definition for a `session`. Snapshot of the `agent` at\n\t// `session` creation time.\n\tAgent ManagedAgentsSessionAgent `json:\"agent\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\" api:\"nullable\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt     time.Time         `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\tEnvironmentID string            `json:\"environment_id\" api:\"required\"`\n\tMetadata      map[string]string `json:\"metadata\" api:\"required\"`\n\t// Per-outcome evaluation state. One entry per `define_outcome` event sent to the\n\t// session.\n\tOutcomeEvaluations []ManagedAgentsOutcomeEvaluationResource `json:\"outcome_evaluations\" api:\"required\"`\n\tResources          []ManagedAgentsSessionResourceUnion      `json:\"resources\" api:\"required\"`\n\t// Timing statistics for a session.\n\tStats ManagedAgentsSessionStats `json:\"stats\" api:\"required\"`\n\t// SessionStatus enum\n\t//\n\t// Any of \"rescheduling\", \"running\", \"idle\", \"terminated\".\n\tStatus ManagedAgentsSessionStatus `json:\"status\" api:\"required\"`\n\tTitle  string                     `json:\"title\" api:\"required\"`\n\t// Any of \"session\".\n\tType ManagedAgentsSessionType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// Cumulative Credits snapshot. Replace previous values; do not sum snapshots.\n\t// Legacy token and list-cost fields remain available for older responses.\n\tUsage ManagedAgentsSessionUsage `json:\"usage\"`\n\t// Vault IDs attached to the session at creation. Empty when no vaults were\n\t// supplied.\n\tVaultIDs []string `json:\"vault_ids\" api:\"required\"`\n\t// Deployment ID when the session was created from a deployment reference. Null\n\t// otherwise.\n\tDeploymentID string `json:\"deployment_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnvironmentVariables respjson.Field\n\n\t\tID                 respjson.Field\n\t\tAgent              respjson.Field\n\t\tArchivedAt         respjson.Field\n\t\tBudget             respjson.Field\n\t\tCreatedAt          respjson.Field\n\t\tEnvironmentID      respjson.Field\n\t\tMetadata           respjson.Field\n\t\tOutcomeEvaluations respjson.Field\n\t\tResources          respjson.Field\n\t\tStats              respjson.Field\n\t\tStatus             respjson.Field\n\t\tTitle              respjson.Field\n\t\tType               respjson.Field\n\t\tUpdatedAt          respjson.Field\n\t\tUsage              respjson.Field\n\t\tVaultIDs           respjson.Field\n\t\tDeploymentID       respjson.Field\n\t\tExtraFields        map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA Managed Agents \\`session\\`.\n\n```go\nfunc (r ManagedAgentsSession) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSession) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionActor struct {\n\t// ID of the session that performed the write (a `sesn_...` value). Look up the\n\t// session via [Retrieve a session](/en/api/beta/sessions/retrieve) for further\n\t// provenance.\n\tSessionID string `json:\"session_id\" api:\"required\"`\n\t// Any of \"session_actor\".\n\tType ManagedAgentsSessionActorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSessionID   respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAttribution for a write made by an agent during a session, through the mounted filesystem at \\`/mnt/memory/\\`.\n\n```go\nfunc (r ManagedAgentsSessionActor) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionActor) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionActorType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionActorTypeSessionActor ManagedAgentsSessionActorType = \"session_actor\"\n)\n```\n\n```go\ntype ManagedAgentsSessionAgent struct {\n\tID          string                                `json:\"id\" api:\"required\"`\n\tDescription string                                `json:\"description\" api:\"required\"`\n\tMCPServers  []ManagedAgentsMCPServerURLDefinition `json:\"mcp_servers\" api:\"required\"`\n\t// Model identifier and configuration.\n\tModel ManagedAgentsModelConfig `json:\"model\" api:\"required\"`\n\t// Resolved coordinator topology with full agent definitions for each roster\n\t// member.\n\tMultiagent ManagedAgentsSessionMultiagentCoordinator `json:\"multiagent\" api:\"required\"`\n\tName       string                                    `json:\"name\" api:\"required\"`\n\tSkills     []ManagedAgentsSessionAgentSkillUnion     `json:\"skills\" api:\"required\"`\n\tSystem     string                                    `json:\"system\" api:\"required\"`\n\tTools      []ManagedAgentsSessionAgentToolUnion      `json:\"tools\" api:\"required\"`\n\t// Any of \"agent\".\n\tType    ManagedAgentsSessionAgentType `json:\"type\" api:\"required\"`\n\tVersion int64                         `json:\"version\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tDescription respjson.Field\n\t\tMCPServers  respjson.Field\n\t\tModel       respjson.Field\n\t\tMultiagent  respjson.Field\n\t\tName        respjson.Field\n\t\tSkills      respjson.Field\n\t\tSystem      respjson.Field\n\t\tTools       respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved \\`agent\\` definition for a \\`session\\`. Snapshot of the \\`agent\\` at \\`session\\` creation time.\n\n```go\nfunc (r ManagedAgentsSessionAgent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionAgent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentSkillUnion struct {\n\tSkillID string `json:\"skill_id\"`\n\t// Any of \"qoder\", \"custom\".\n\tType    string `json:\"type\"`\n\tVersion string `json:\"version\"`\n\tJSON    struct {\n\t\tSkillID respjson.Field\n\t\tType    respjson.Field\n\t\tVersion respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionAgentSkillUnion contains all possible properties and values from [ManagedAgentsQoderSkill](#ManagedAgentsQoderSkill), [ManagedAgentsCustomSkill](#ManagedAgentsCustomSkill).\n\nUse the [ManagedAgentsSessionAgentSkillUnion.AsAny](#ManagedAgentsSessionAgentSkillUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionAgentSkillUnion) AsAny() anyManagedAgentsSessionAgentSkill\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionAgentSkillUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsQoderSkill:\n\tcase qoder.ManagedAgentsCustomSkill:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionAgentSkillUnion) AsCustom() (v ManagedAgentsCustomSkill)\n```\n\n```go\nfunc (u ManagedAgentsSessionAgentSkillUnion) AsQoder() (v ManagedAgentsQoderSkill)\n```\n\n```go\nfunc (u ManagedAgentsSessionAgentSkillUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionAgentSkillUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentToolUnion struct {\n\tEnabledTools    []string `json:\"enabled_tools\"`\n\tDisallowedTools []string `json:\"disallowed_tools\"`\n\t// This field is a union of [[]ManagedAgentsAgentToolConfigUnion],\n\t// [[]ManagedAgentsMCPToolConfig]\n\tConfigs ManagedAgentsSessionAgentToolUnionConfigs `json:\"configs\"`\n\t// This field is a union of [ManagedAgentsAgentToolsetDefaultConfig],\n\t// [ManagedAgentsMCPToolsetDefaultConfig]\n\tDefaultConfig ManagedAgentsSessionAgentToolUnionDefaultConfig `json:\"default_config\"`\n\t// Any of \"agent_toolset_20260401\", \"mcp_toolset\", \"custom\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsMCPToolset].\n\tMCPServerName string `json:\"mcp_server_name\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tInputSchema ManagedAgentsCustomToolInputSchema `json:\"input_schema\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tName string `json:\"name\"`\n\tJSON struct {\n\t\tEnabledTools    respjson.Field\n\t\tDisallowedTools respjson.Field\n\t\tConfigs         respjson.Field\n\t\tDefaultConfig   respjson.Field\n\t\tType            respjson.Field\n\t\tMCPServerName   respjson.Field\n\t\tDescription     respjson.Field\n\t\tInputSchema     respjson.Field\n\t\tName            respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionAgentToolUnion contains all possible properties and values from [ManagedAgentsAgentToolset20260401](#ManagedAgentsAgentToolset20260401), [ManagedAgentsMCPToolset](#ManagedAgentsMCPToolset), [ManagedAgentsCustomTool](#ManagedAgentsCustomTool).\n\nUse the [ManagedAgentsSessionAgentToolUnion.AsAny](#ManagedAgentsSessionAgentToolUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionAgentToolUnion) AsAgentToolset20260401() (v ManagedAgentsAgentToolset20260401)\n```\n\n```go\nfunc (u ManagedAgentsSessionAgentToolUnion) AsAny() anyManagedAgentsSessionAgentTool\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionAgentToolUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAgentToolset20260401:\n\tcase qoder.ManagedAgentsMCPToolset:\n\tcase qoder.ManagedAgentsCustomTool:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionAgentToolUnion) AsCustom() (v ManagedAgentsCustomTool)\n```\n\n```go\nfunc (u ManagedAgentsSessionAgentToolUnion) AsMCPToolset() (v ManagedAgentsMCPToolset)\n```\n\n```go\nfunc (u ManagedAgentsSessionAgentToolUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionAgentToolUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentToolUnionConfigs struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentToolConfigUnion] instead of an object.\n\tOfManagedAgentsAgentToolConfigArray []ManagedAgentsAgentToolConfigUnion `json:\",inline\"`\n\t// This field will be present if the value is a [[]ManagedAgentsMCPToolConfig]\n\t// instead of an object.\n\tOfManagedAgentsMCPToolConfigArray []ManagedAgentsMCPToolConfig `json:\",inline\"`\n\tJSON                              struct {\n\t\tOfManagedAgentsAgentToolConfigArray respjson.Field\n\t\tOfManagedAgentsMCPToolConfigArray   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionAgentToolUnionConfigs is an implicit subunion of [ManagedAgentsSessionAgentToolUnion](#ManagedAgentsSessionAgentToolUnion). ManagedAgentsSessionAgentToolUnionConfigs provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionAgentToolUnion](#ManagedAgentsSessionAgentToolUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsAgentToolConfigArray OfManagedAgentsMCPToolConfigArray]\n\n```go\nfunc (r *ManagedAgentsSessionAgentToolUnionConfigs) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentToolUnionDefaultConfig struct {\n\tEnabled bool `json:\"enabled\"`\n\t// This field is a union of\n\t// [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion],\n\t// [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion]\n\tPermissionPolicy ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy `json:\"permission_policy\"`\n\tJSON             struct {\n\t\tEnabled          respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionAgentToolUnionDefaultConfig is an implicit subunion of [ManagedAgentsSessionAgentToolUnion](#ManagedAgentsSessionAgentToolUnion). ManagedAgentsSessionAgentToolUnionDefaultConfig provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionAgentToolUnion](#ManagedAgentsSessionAgentToolUnion).\n\n```go\nfunc (r *ManagedAgentsSessionAgentToolUnionDefaultConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy struct {\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy is an implicit subunion of [ManagedAgentsSessionAgentToolUnion](#ManagedAgentsSessionAgentToolUnion). ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionAgentToolUnion](#ManagedAgentsSessionAgentToolUnion).\n\n```go\nfunc (r *ManagedAgentsSessionAgentToolUnionDefaultConfigPermissionPolicy) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionAgentTypeAgent ManagedAgentsSessionAgentType = \"agent\"\n)\n```\n\n```go\ntype ManagedAgentsSessionAgentUpdateParam struct {\n\tModel  ManagedAgentsModelConfigParams  `json:\"model,omitzero\"`\n\tSystem param.Opt[string]               `json:\"system,omitzero\"`\n\tSkills []ManagedAgentsSkillParamsUnion `json:\"skills,omitzero\"`\n\n\t// Replacement MCP server list. Full replacement: the provided array becomes the\n\t// new value. Send an empty array to clear; omit to preserve.\n\tMCPServers []ManagedAgentsURLMCPServerParams `json:\"mcp_servers,omitzero\"`\n\t// Replacement tool list. Full replacement: the provided array becomes the new\n\t// value. Send an empty array to clear; omit to preserve.\n\tTools []ManagedAgentsSessionAgentUpdateToolUnionParam `json:\"tools,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nMid-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.\n\n```go\nfunc (r ManagedAgentsSessionAgentUpdateParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsSessionAgentUpdateParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionAgentUpdateToolUnionParam struct {\n\tOfAgentToolset20260401 *ManagedAgentsAgentToolset20260401Params `json:\",omitzero,inline\"`\n\tOfMCPToolset           *ManagedAgentsMCPToolsetParams           `json:\",omitzero,inline\"`\n\tOfCustom               *ManagedAgentsCustomToolParams           `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetConfigs() (res managedAgentsSessionAgentUpdateToolUnionParamConfigs)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetDefaultConfig() (res managedAgentsSessionAgentUpdateToolUnionParamDefaultConfig)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetInputSchema() *ManagedAgentsCustomToolInputSchemaParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetMCPServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSessionAgentUpdateToolUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsSessionAgentUpdateToolUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionBudgetReached struct {\n\t// Any of \"budget_reached\".\n\tType ManagedAgentsSessionBudgetReachedType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe 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.\n\n```go\nfunc (r ManagedAgentsSessionBudgetReached) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionBudgetReached) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionBudgetReachedType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionBudgetReachedTypeBudgetReached ManagedAgentsSessionBudgetReachedType = \"budget_reached\"\n)\n```\n\n```go\ntype ManagedAgentsSessionCreationRejectedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"session_creation_rejected_error\".\n\tType ManagedAgentsSessionCreationRejectedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe session create request was rejected with a non-retryable validation error.\n\n```go\nfunc (r ManagedAgentsSessionCreationRejectedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionCreationRejectedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionCreationRejectedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionCreationRejectedRunErrorTypeSessionCreationRejectedError ManagedAgentsSessionCreationRejectedRunErrorType = \"session_creation_rejected_error\"\n)\n```\n\n```go\ntype ManagedAgentsSessionDeletedEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.deleted\".\n\tType ManagedAgentsSessionDeletedEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted when a session has been deleted. Terminates any active event stream — no further events will be emitted for this session.\n\n```go\nfunc (r ManagedAgentsSessionDeletedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionDeletedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionDeletedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionDeletedEventTypeSessionDeleted ManagedAgentsSessionDeletedEventType = \"session.deleted\"\n)\n```\n\n```go\ntype ManagedAgentsSessionEndTurn struct {\n\t// Any of \"end_turn\".\n\tType ManagedAgentsSessionEndTurnType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe agent completed its turn naturally and is ready for the next user message.\n\n```go\nfunc (r ManagedAgentsSessionEndTurn) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionEndTurn) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionEndTurnType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionEndTurnTypeEndTurn ManagedAgentsSessionEndTurnType = \"end_turn\"\n)\n```\n\n```go\ntype ManagedAgentsSessionErrorEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// An unknown or unexpected error occurred during session execution. A fallback\n\t// variant; clients that don't recognize a new error code can match on\n\t// `retry_status` and `message` alone.\n\tError ManagedAgentsSessionErrorEventErrorUnion `json:\"error\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.error\".\n\tType ManagedAgentsSessionErrorEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tError       respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn error event indicating a problem occurred during session execution.\n\n```go\nfunc (r ManagedAgentsSessionErrorEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionErrorEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionErrorEventErrorUnion struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\tMessage        string `json:\"message\"`\n\t// This field is a union of [ManagedAgentsUnknownErrorRetryStatusUnion],\n\t// [ManagedAgentsModelOverloadedErrorRetryStatusUnion],\n\t// [ManagedAgentsModelRateLimitedErrorRetryStatusUnion],\n\t// [ManagedAgentsModelRequestFailedErrorRetryStatusUnion],\n\t// [ManagedAgentsMCPConnectionFailedErrorRetryStatusUnion],\n\t// [ManagedAgentsMCPAuthenticationFailedErrorRetryStatusUnion],\n\t// [ManagedAgentsBillingErrorRetryStatusUnion],\n\t// [ManagedAgentsCredentialHostUnreachableErrorRetryStatusUnion]\n\tRetryStatus ManagedAgentsSessionErrorEventErrorUnionRetryStatus `json:\"retry_status\"`\n\t// Any of \"unknown_error\", \"model_overloaded_error\", \"model_rate_limited_error\",\n\t// \"model_request_failed_error\", \"mcp_connection_failed_error\",\n\t// \"mcp_authentication_failed_error\", \"billing_error\",\n\t// \"credential_host_unreachable_error\".\n\tType          string `json:\"type\"`\n\tMCPServerName string `json:\"mcp_server_name\"`\n\t// This field is from variant [ManagedAgentsCredentialHostUnreachableError].\n\tCredentialID string `json:\"credential_id\"`\n\t// This field is from variant [ManagedAgentsCredentialHostUnreachableError].\n\tVaultID string `json:\"vault_id\"`\n\tJSON    struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tMCPServerName  respjson.Field\n\t\tCredentialID   respjson.Field\n\t\tVaultID        respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionErrorEventErrorUnion contains all possible properties and values from [ManagedAgentsUnknownError](#ManagedAgentsUnknownError), [ManagedAgentsModelOverloadedError](#ManagedAgentsModelOverloadedError), [ManagedAgentsModelRateLimitedError](#ManagedAgentsModelRateLimitedError), [ManagedAgentsModelRequestFailedError](#ManagedAgentsModelRequestFailedError), [ManagedAgentsMCPConnectionFailedError](#ManagedAgentsMCPConnectionFailedError), [ManagedAgentsMCPAuthenticationFailedError](#ManagedAgentsMCPAuthenticationFailedError), [ManagedAgentsBillingError](#ManagedAgentsBillingError), [ManagedAgentsCredentialHostUnreachableError](#ManagedAgentsCredentialHostUnreachableError).\n\nUse the [ManagedAgentsSessionErrorEventErrorUnion.AsAny](#ManagedAgentsSessionErrorEventErrorUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsAny() anyManagedAgentsSessionErrorEventError\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionErrorEventErrorUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsUnknownError:\n\tcase qoder.ManagedAgentsModelOverloadedError:\n\tcase qoder.ManagedAgentsModelRateLimitedError:\n\tcase qoder.ManagedAgentsModelRequestFailedError:\n\tcase qoder.ManagedAgentsMCPConnectionFailedError:\n\tcase qoder.ManagedAgentsMCPAuthenticationFailedError:\n\tcase qoder.ManagedAgentsBillingError:\n\tcase qoder.ManagedAgentsCredentialHostUnreachableError:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsBillingError() (v ManagedAgentsBillingError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsCredentialHostUnreachableError() (v ManagedAgentsCredentialHostUnreachableError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsMCPAuthenticationFailedError() (v ManagedAgentsMCPAuthenticationFailedError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsMCPConnectionFailedError() (v ManagedAgentsMCPConnectionFailedError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsModelOverloadedError() (v ManagedAgentsModelOverloadedError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsModelRateLimitedError() (v ManagedAgentsModelRateLimitedError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsModelRequestFailedError() (v ManagedAgentsModelRequestFailedError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) AsUnknownError() (v ManagedAgentsUnknownError)\n```\n\n```go\nfunc (u ManagedAgentsSessionErrorEventErrorUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionErrorEventErrorUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionErrorEventErrorUnionRetryStatus struct {\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionErrorEventErrorUnionRetryStatus is an implicit subunion of [ManagedAgentsSessionErrorEventErrorUnion](#ManagedAgentsSessionErrorEventErrorUnion). ManagedAgentsSessionErrorEventErrorUnionRetryStatus provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionErrorEventErrorUnion](#ManagedAgentsSessionErrorEventErrorUnion).\n\n```go\nfunc (r *ManagedAgentsSessionErrorEventErrorUnionRetryStatus) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionErrorEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionErrorEventTypeSessionError ManagedAgentsSessionErrorEventType = \"session.error\"\n)\n```\n\n```go\ntype ManagedAgentsSessionEventUnion struct {\n\tFileID                string  `json:\"file_id\"`\n\tOriginalFilename      string  `json:\"original_filename\"`\n\tSize                  int64   `json:\"size\"`\n\tContentType           string  `json:\"content_type\"`\n\tModelCredits          float64 `json:\"model_credits\"`\n\tSandboxRuntimeCredits float64 `json:\"sandbox_runtime_credits\"`\n\tTotalCredits          float64 `json:\"total_credits\"`\n\tID                    string  `json:\"id\"`\n\t// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentMessageEventContentUnion],\n\t// [[]ManagedAgentsAgentMCPToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion],\n\t// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion],\n\t// [[]ManagedAgentsUserToolResultEventContentUnion],\n\t// [[]ManagedAgentsSystemContentBlock]\n\tContent ManagedAgentsSessionEventUnionContent `json:\"content\"`\n\t// Any of \"user.message\", \"user.interrupt\", \"user.tool_confirmation\",\n\t// \"user.custom_tool_result\", \"agent.custom_tool_use\", \"agent.message\",\n\t// \"agent.thinking\", \"agent.mcp_tool_use\", \"agent.mcp_tool_result\",\n\t// \"agent.tool_use\", \"agent.tool_result\", \"agent.thread_message_received\",\n\t// \"agent.thread_message_sent\", \"agent.thread_context_compacted\", \"session.error\",\n\t// \"session.status_rescheduled\", \"session.status_running\", \"session.status_idle\",\n\t// \"session.status_terminated\", \"session.thread_created\",\n\t// \"span.outcome_evaluation_start\", \"span.outcome_evaluation_end\",\n\t// \"span.model_request_start\", \"span.model_request_end\",\n\t// \"span.outcome_evaluation_ongoing\", \"user.define_outcome\", \"session.deleted\",\n\t// \"session.thread_status_running\", \"session.thread_status_idle\",\n\t// \"session.thread_status_terminated\", \"user.tool_result\",\n\t// \"session.thread_status_rescheduled\", \"session.updated\", \"system.message\",\n\t// \"session.usage\".\n\tType            string    `json:\"type\"`\n\tProcessedAt     time.Time `json:\"processed_at\"`\n\tSessionThreadID string    `json:\"session_thread_id\"`\n\tResult          string    `json:\"result\"`\n\tToolUseID       string    `json:\"tool_use_id\"`\n\t// This field is from variant [ManagedAgentsUserToolConfirmationEvent].\n\tDenyMessage string `json:\"deny_message\"`\n\t// This field is from variant [ManagedAgentsUserCustomToolResultEvent].\n\tCustomToolUseID string `json:\"custom_tool_use_id\"`\n\tIsError         bool   `json:\"is_error\"`\n\tInput           any    `json:\"input\"`\n\tName            string `json:\"name\"`\n\t// This field is from variant [ManagedAgentsAgentMCPToolUseEvent].\n\tMCPServerName       string `json:\"mcp_server_name\"`\n\tEvaluatedPermission string `json:\"evaluated_permission\"`\n\t// This field is from variant [ManagedAgentsAgentMCPToolResultEvent].\n\tMCPToolUseID string `json:\"mcp_tool_use_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].\n\tFromSessionThreadID string `json:\"from_session_thread_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].\n\tFromAgentName string `json:\"from_agent_name\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].\n\tToSessionThreadID string `json:\"to_session_thread_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].\n\tToAgentName string `json:\"to_agent_name\"`\n\t// This field is from variant [ManagedAgentsSessionErrorEvent].\n\tError ManagedAgentsSessionErrorEventErrorUnion `json:\"error\"`\n\t// This field is a union of\n\t// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],\n\t// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion]\n\tStopReason ManagedAgentsSessionEventUnionStopReason `json:\"stop_reason\"`\n\tAgentName  string                                   `json:\"agent_name\"`\n\tIteration  int64                                    `json:\"iteration\"`\n\tOutcomeID  string                                   `json:\"outcome_id\"`\n\t// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].\n\tExplanation string `json:\"explanation\"`\n\t// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].\n\tOutcomeEvaluationStartID string `json:\"outcome_evaluation_start_id\"`\n\t// This field is a union of [ManagedAgentsSpanModelUsage],\n\t// [ManagedAgentsSessionUsageSnapshot]\n\tUsage ManagedAgentsSessionEventUnionUsage `json:\"usage\"`\n\t// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].\n\tModelRequestStartID string `json:\"model_request_start_id\"`\n\t// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].\n\tModelUsage ManagedAgentsSpanModelUsage `json:\"model_usage\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tMaxIterations int64 `json:\"max_iterations\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tRubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:\"rubric\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tAgent ManagedAgentsSessionAgent `json:\"agent\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tMetadata map[string]string `json:\"metadata\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tTitle string `json:\"title\"`\n\tJSON  struct {\n\t\tFileID                   respjson.Field\n\t\tOriginalFilename         respjson.Field\n\t\tSize                     respjson.Field\n\t\tContentType              respjson.Field\n\t\tModelCredits             respjson.Field\n\t\tSandboxRuntimeCredits    respjson.Field\n\t\tTotalCredits             respjson.Field\n\t\tID                       respjson.Field\n\t\tContent                  respjson.Field\n\t\tType                     respjson.Field\n\t\tProcessedAt              respjson.Field\n\t\tSessionThreadID          respjson.Field\n\t\tResult                   respjson.Field\n\t\tToolUseID                respjson.Field\n\t\tDenyMessage              respjson.Field\n\t\tCustomToolUseID          respjson.Field\n\t\tIsError                  respjson.Field\n\t\tInput                    respjson.Field\n\t\tName                     respjson.Field\n\t\tMCPServerName            respjson.Field\n\t\tEvaluatedPermission      respjson.Field\n\t\tMCPToolUseID             respjson.Field\n\t\tFromSessionThreadID      respjson.Field\n\t\tFromAgentName            respjson.Field\n\t\tToSessionThreadID        respjson.Field\n\t\tToAgentName              respjson.Field\n\t\tError                    respjson.Field\n\t\tStopReason               respjson.Field\n\t\tAgentName                respjson.Field\n\t\tIteration                respjson.Field\n\t\tOutcomeID                respjson.Field\n\t\tExplanation              respjson.Field\n\t\tOutcomeEvaluationStartID respjson.Field\n\t\tUsage                    respjson.Field\n\t\tModelRequestStartID      respjson.Field\n\t\tModelUsage               respjson.Field\n\t\tDescription              respjson.Field\n\t\tMaxIterations            respjson.Field\n\t\tRubric                   respjson.Field\n\t\tAgent                    respjson.Field\n\t\tBudget                   respjson.Field\n\t\tMetadata                 respjson.Field\n\t\tTitle                    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionEventUnion contains all possible properties and values from [ManagedAgentsUserMessageEvent](#ManagedAgentsUserMessageEvent), [ManagedAgentsUserInterruptEvent](#ManagedAgentsUserInterruptEvent), [ManagedAgentsUserToolConfirmationEvent](#ManagedAgentsUserToolConfirmationEvent), [ManagedAgentsUserCustomToolResultEvent](#ManagedAgentsUserCustomToolResultEvent), [ManagedAgentsAgentCustomToolUseEvent](#ManagedAgentsAgentCustomToolUseEvent), [ManagedAgentsAgentMessageEvent](#ManagedAgentsAgentMessageEvent), [ManagedAgentsAgentThinkingEvent](#ManagedAgentsAgentThinkingEvent), [ManagedAgentsAgentMCPToolUseEvent](#ManagedAgentsAgentMCPToolUseEvent), [ManagedAgentsAgentMCPToolResultEvent](#ManagedAgentsAgentMCPToolResultEvent), [ManagedAgentsAgentToolUseEvent](#ManagedAgentsAgentToolUseEvent), [ManagedAgentsAgentToolResultEvent](#ManagedAgentsAgentToolResultEvent), [ManagedAgentsAgentThreadMessageReceivedEvent](#ManagedAgentsAgentThreadMessageReceivedEvent), [ManagedAgentsAgentThreadMessageSentEvent](#ManagedAgentsAgentThreadMessageSentEvent), [ManagedAgentsAgentThreadContextCompactedEvent](#ManagedAgentsAgentThreadContextCompactedEvent), [ManagedAgentsSessionErrorEvent](#ManagedAgentsSessionErrorEvent), [ManagedAgentsSessionStatusRescheduledEvent](#ManagedAgentsSessionStatusRescheduledEvent), [ManagedAgentsSessionStatusRunningEvent](#ManagedAgentsSessionStatusRunningEvent), [ManagedAgentsSessionStatusIdleEvent](#ManagedAgentsSessionStatusIdleEvent), [ManagedAgentsSessionStatusTerminatedEvent](#ManagedAgentsSessionStatusTerminatedEvent), [ManagedAgentsSessionThreadCreatedEvent](#ManagedAgentsSessionThreadCreatedEvent), [ManagedAgentsSpanOutcomeEvaluationStartEvent](#ManagedAgentsSpanOutcomeEvaluationStartEvent), [ManagedAgentsSpanOutcomeEvaluationEndEvent](#ManagedAgentsSpanOutcomeEvaluationEndEvent), [ManagedAgentsSpanModelRequestStartEvent](#ManagedAgentsSpanModelRequestStartEvent), [ManagedAgentsSpanModelRequestEndEvent](#ManagedAgentsSpanModelRequestEndEvent), [ManagedAgentsSpanOutcomeEvaluationOngoingEvent](#ManagedAgentsSpanOutcomeEvaluationOngoingEvent), [ManagedAgentsUserDefineOutcomeEvent](#ManagedAgentsUserDefineOutcomeEvent), [ManagedAgentsSessionDeletedEvent](#ManagedAgentsSessionDeletedEvent), [ManagedAgentsSessionThreadStatusRunningEvent](#ManagedAgentsSessionThreadStatusRunningEvent), [ManagedAgentsSessionThreadStatusIdleEvent](#ManagedAgentsSessionThreadStatusIdleEvent), [ManagedAgentsSessionThreadStatusTerminatedEvent](#ManagedAgentsSessionThreadStatusTerminatedEvent), [ManagedAgentsUserToolResultEvent](#ManagedAgentsUserToolResultEvent), [ManagedAgentsSessionThreadStatusRescheduledEvent](#ManagedAgentsSessionThreadStatusRescheduledEvent), [ManagedAgentsSessionUpdatedEvent](#ManagedAgentsSessionUpdatedEvent), [ManagedAgentsSystemMessageEvent](#ManagedAgentsSystemMessageEvent), [ManagedAgentsSessionUsageEvent](#ManagedAgentsSessionUsageEvent).\n\nUse the [ManagedAgentsSessionEventUnion.AsAny](#ManagedAgentsSessionEventUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentArtifactDelivered() (v ManagedAgentsAgentArtifactDeliveredEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentCustomToolUse() (v ManagedAgentsAgentCustomToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentMCPToolResult() (v ManagedAgentsAgentMCPToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentMCPToolUse() (v ManagedAgentsAgentMCPToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentMessage() (v ManagedAgentsAgentMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentThinking() (v ManagedAgentsAgentThinkingEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentThreadContextCompacted() (v ManagedAgentsAgentThreadContextCompactedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentThreadMessageReceived() (v ManagedAgentsAgentThreadMessageReceivedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentThreadMessageSent() (v ManagedAgentsAgentThreadMessageSentEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentToolResult() (v ManagedAgentsAgentToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAgentToolUse() (v ManagedAgentsAgentToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsAny() anyManagedAgentsSessionEvent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionEventUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsUserMessageEvent:\n\tcase qoder.ManagedAgentsUserInterruptEvent:\n\tcase qoder.ManagedAgentsUserToolConfirmationEvent:\n\tcase qoder.ManagedAgentsUserCustomToolResultEvent:\n\tcase qoder.ManagedAgentsAgentCustomToolUseEvent:\n\tcase qoder.ManagedAgentsAgentMessageEvent:\n\tcase qoder.ManagedAgentsAgentThinkingEvent:\n\tcase qoder.ManagedAgentsAgentMCPToolUseEvent:\n\tcase qoder.ManagedAgentsAgentMCPToolResultEvent:\n\tcase qoder.ManagedAgentsAgentToolUseEvent:\n\tcase qoder.ManagedAgentsAgentToolResultEvent:\n\tcase qoder.ManagedAgentsAgentThreadMessageReceivedEvent:\n\tcase qoder.ManagedAgentsAgentThreadMessageSentEvent:\n\tcase qoder.ManagedAgentsAgentThreadContextCompactedEvent:\n\tcase qoder.ManagedAgentsSessionErrorEvent:\n\tcase qoder.ManagedAgentsSessionStatusRescheduledEvent:\n\tcase qoder.ManagedAgentsSessionStatusRunningEvent:\n\tcase qoder.ManagedAgentsSessionStatusIdleEvent:\n\tcase qoder.ManagedAgentsSessionStatusTerminatedEvent:\n\tcase qoder.ManagedAgentsSessionThreadCreatedEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationStartEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationEndEvent:\n\tcase qoder.ManagedAgentsSpanModelRequestStartEvent:\n\tcase qoder.ManagedAgentsSpanModelRequestEndEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationOngoingEvent:\n\tcase qoder.ManagedAgentsUserDefineOutcomeEvent:\n\tcase qoder.ManagedAgentsSessionDeletedEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusRunningEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusIdleEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusTerminatedEvent:\n\tcase qoder.ManagedAgentsUserToolResultEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusRescheduledEvent:\n\tcase qoder.ManagedAgentsSessionUpdatedEvent:\n\tcase qoder.ManagedAgentsSystemMessageEvent:\n\tcase qoder.ManagedAgentsSessionUsageEvent:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionDeleted() (v ManagedAgentsSessionDeletedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionError() (v ManagedAgentsSessionErrorEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionStatusIdle() (v ManagedAgentsSessionStatusIdleEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionStatusRescheduled() (v ManagedAgentsSessionStatusRescheduledEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionStatusRunning() (v ManagedAgentsSessionStatusRunningEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionStatusTerminated() (v ManagedAgentsSessionStatusTerminatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionThreadCreated() (v ManagedAgentsSessionThreadCreatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionThreadStatusIdle() (v ManagedAgentsSessionThreadStatusIdleEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionThreadStatusRescheduled() (v ManagedAgentsSessionThreadStatusRescheduledEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionThreadStatusRunning() (v ManagedAgentsSessionThreadStatusRunningEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionThreadStatusTerminated() (v ManagedAgentsSessionThreadStatusTerminatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionUpdated() (v ManagedAgentsSessionUpdatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSessionUsage() (v ManagedAgentsSessionUsageEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSpanModelRequestEnd() (v ManagedAgentsSpanModelRequestEndEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSpanModelRequestStart() (v ManagedAgentsSpanModelRequestStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSpanOutcomeEvaluationEnd() (v ManagedAgentsSpanOutcomeEvaluationEndEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSpanOutcomeEvaluationOngoing() (v ManagedAgentsSpanOutcomeEvaluationOngoingEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSpanOutcomeEvaluationStart() (v ManagedAgentsSpanOutcomeEvaluationStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsSystemMessage() (v ManagedAgentsSystemMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsUserCustomToolResult() (v ManagedAgentsUserCustomToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsUserDefineOutcome() (v ManagedAgentsUserDefineOutcomeEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsUserInterrupt() (v ManagedAgentsUserInterruptEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsUserMessage() (v ManagedAgentsUserMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsUserToolConfirmation() (v ManagedAgentsUserToolConfirmationEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) AsUserToolResult() (v ManagedAgentsUserToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsSessionEventUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionEventUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionEventUnionContent struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentMessageEventContentArray []ManagedAgentsAgentMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentMCPToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentMCPToolResultEventContentArray []ManagedAgentsAgentMCPToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentToolResultEventContentArray []ManagedAgentsAgentToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsAgentThreadMessageReceivedEventContentArray []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsAgentThreadMessageSentEventContentArray []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsSystemContentBlock] instead of an object.\n\tOfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:\",inline\"`\n\tJSON                                   struct {\n\t\tOfManagedAgentsUserMessageEventContentArray                respjson.Field\n\t\tOfManagedAgentsUserCustomToolResultEventContentArray       respjson.Field\n\t\tOfManagedAgentsAgentMessageEventContentArray               respjson.Field\n\t\tOfManagedAgentsAgentMCPToolResultEventContentArray         respjson.Field\n\t\tOfManagedAgentsAgentToolResultEventContentArray            respjson.Field\n\t\tOfManagedAgentsAgentThreadMessageReceivedEventContentArray respjson.Field\n\t\tOfManagedAgentsAgentThreadMessageSentEventContentArray     respjson.Field\n\t\tOfManagedAgentsUserToolResultEventContentArray             respjson.Field\n\t\tOfManagedAgentsSystemContentBlockArray                     respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionEventUnionContent is an implicit subunion of [ManagedAgentsSessionEventUnion](#ManagedAgentsSessionEventUnion). ManagedAgentsSessionEventUnionContent provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionEventUnion](#ManagedAgentsSessionEventUnion).\n\nIf 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]\n\n```go\nfunc (r *ManagedAgentsSessionEventUnionContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionEventUnionStopReason struct {\n\tType string `json:\"type\"`\n\t// This field is from variant\n\t// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],\n\t// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion].\n\tEventIDs []string `json:\"event_ids\"`\n\tJSON     struct {\n\t\tType     respjson.Field\n\t\tEventIDs respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionEventUnionStopReason is an implicit subunion of [ManagedAgentsSessionEventUnion](#ManagedAgentsSessionEventUnion). ManagedAgentsSessionEventUnionStopReason provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionEventUnion](#ManagedAgentsSessionEventUnion).\n\n```go\nfunc (r *ManagedAgentsSessionEventUnionStopReason) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionEventUnionUsage struct {\n\tCredits float64 `json:\"credits\"`\n\t// This field is from variant [ManagedAgentsSpanModelUsage].\n\tCacheCreationInputTokens int64 `json:\"cache_creation_input_tokens\"`\n\tCacheReadInputTokens     int64 `json:\"cache_read_input_tokens\"`\n\tInputTokens              int64 `json:\"input_tokens\"`\n\tOutputTokens             int64 `json:\"output_tokens\"`\n\t// This field is from variant [ManagedAgentsSpanModelUsage].\n\tSpeed ManagedAgentsSpanModelUsageSpeed `json:\"speed\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tCacheCreation ManagedAgentsCacheCreationUsage `json:\"cache_creation\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tListCost MonetaryAmount `json:\"list_cost\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tServerToolUse ManagedAgentsServerToolUsage `json:\"server_tool_use\"`\n\tJSON          struct {\n\t\tCredits                  respjson.Field\n\t\tCacheCreationInputTokens respjson.Field\n\t\tCacheReadInputTokens     respjson.Field\n\t\tInputTokens              respjson.Field\n\t\tOutputTokens             respjson.Field\n\t\tSpeed                    respjson.Field\n\t\tActiveSeconds            respjson.Field\n\t\tCacheCreation            respjson.Field\n\t\tListCost                 respjson.Field\n\t\tServerToolUse            respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionEventUnionUsage is an implicit subunion of [ManagedAgentsSessionEventUnion](#ManagedAgentsSessionEventUnion). ManagedAgentsSessionEventUnionUsage provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionEventUnion](#ManagedAgentsSessionEventUnion).\n\n```go\nfunc (r *ManagedAgentsSessionEventUnionUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionMultiagentCoordinator struct {\n\t// Full `agent` definitions the coordinator may spawn as session threads.\n\tAgents []ManagedAgentsSessionMultiagentCoordinatorAgentUnion `json:\"agents\" api:\"required\"`\n\t// Any of \"coordinator\".\n\tType ManagedAgentsSessionMultiagentCoordinatorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAgents      respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved coordinator topology with full agent definitions for each roster member.\n\n```go\nfunc (r ManagedAgentsSessionMultiagentCoordinator) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionMultiagentCoordinator) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionMultiagentCoordinatorAgentUnion struct {\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tID string `json:\"id\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tMCPServers []ManagedAgentsMCPServerURLDefinition `json:\"mcp_servers\"`\n\t// This field is a union of [ManagedAgentsModelConfig], [string]\n\tModel ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel `json:\"model\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tName string `json:\"name\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tSkills []ManagedAgentsSessionThreadAgentSkillUnion `json:\"skills\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tSystem string `json:\"system\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tTools []ManagedAgentsSessionThreadAgentToolUnion `json:\"tools\"`\n\t// Any of \"agent\", \"advisor\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tVersion int64 `json:\"version\"`\n\tJSON    struct {\n\t\tID          respjson.Field\n\t\tDescription respjson.Field\n\t\tMCPServers  respjson.Field\n\t\tModel       respjson.Field\n\t\tName        respjson.Field\n\t\tSkills      respjson.Field\n\t\tSystem      respjson.Field\n\t\tTools       respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionMultiagentCoordinatorAgentUnion contains all possible properties and values from [ManagedAgentsSessionThreadAgent](#ManagedAgentsSessionThreadAgent), [ManagedAgentsAdvisor](#ManagedAgentsAdvisor).\n\nUse the [ManagedAgentsSessionMultiagentCoordinatorAgentUnion.AsAny](#ManagedAgentsSessionMultiagentCoordinatorAgentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAdvisor() (v ManagedAgentsAdvisor)\n```\n\n```go\nfunc (u ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAgent() (v ManagedAgentsSessionThreadAgent)\n```\n\n```go\nfunc (u ManagedAgentsSessionMultiagentCoordinatorAgentUnion) AsAny() anyManagedAgentsSessionMultiagentCoordinatorAgent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionMultiagentCoordinatorAgentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsSessionThreadAgent:\n\tcase qoder.ManagedAgentsAdvisor:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionMultiagentCoordinatorAgentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionMultiagentCoordinatorAgentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel struct {\n\tEffectiveContextWindow int64 `json:\"effective_context_window\"`\n\tContextWindow          int64 `json:\"context_window\"`\n\t// This field will be present if the value is a [string] instead of an object.\n\tOfString string `json:\",inline\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\tID ManagedAgentsModel `json:\"id\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\tEffort string `json:\"effort\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\tInferenceGeo string `json:\"inference_geo\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\t// Deprecated: speed is no longer part of Managed model configuration.\n\tSpeed ManagedAgentsModelConfigSpeed `json:\"speed\"`\n\tJSON  struct {\n\t\tEffectiveContextWindow respjson.Field\n\t\tContextWindow          respjson.Field\n\t\tOfString               respjson.Field\n\t\tID                     respjson.Field\n\t\tEffort                 respjson.Field\n\t\tInferenceGeo           respjson.Field\n\t\tSpeed                  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionMultiagentCoordinatorAgentUnionModel is an implicit subunion of [ManagedAgentsSessionMultiagentCoordinatorAgentUnion](#ManagedAgentsSessionMultiagentCoordinatorAgentUnion). ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionMultiagentCoordinatorAgentUnion](#ManagedAgentsSessionMultiagentCoordinatorAgentUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfString]\n\n```go\nfunc (r *ManagedAgentsSessionMultiagentCoordinatorAgentUnionModel) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionMultiagentCoordinatorType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionMultiagentCoordinatorTypeCoordinator ManagedAgentsSessionMultiagentCoordinatorType = \"coordinator\"\n)\n```\n\n```go\ntype ManagedAgentsSessionRateLimitedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"session_rate_limited_error\".\n\tType ManagedAgentsSessionRateLimitedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nSession creation was rejected due to rate limiting. The schedule keeps firing; subsequent runs may succeed.\n\n```go\nfunc (r ManagedAgentsSessionRateLimitedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionRateLimitedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionRateLimitedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionRateLimitedRunErrorTypeSessionRateLimitedError ManagedAgentsSessionRateLimitedRunErrorType = \"session_rate_limited_error\"\n)\n```\n\n```go\ntype ManagedAgentsSessionRequiresAction struct {\n\t// The ids of events the agent is blocked on. Resolving fewer than all re-emits\n\t// `session.status_idle` with the remainder.\n\tEventIDs []string `json:\"event_ids\" api:\"required\"`\n\t// Any of \"requires_action\".\n\tType ManagedAgentsSessionRequiresActionType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEventIDs    respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe 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.\n\n```go\nfunc (r ManagedAgentsSessionRequiresAction) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionRequiresAction) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionRequiresActionType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionRequiresActionTypeRequiresAction ManagedAgentsSessionRequiresActionType = \"requires_action\"\n)\n```\n\n```go\ntype ManagedAgentsSessionResourceConfigUnion struct {\n\t// Any of \"github_repository\", \"file\", \"memory_store\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResourceConfig].\n\tURL string `json:\"url\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResourceConfig].\n\tCheckout  ManagedAgentsGitHubRepositoryResourceConfigCheckoutUnion `json:\"checkout\"`\n\tMountPath string                                                   `json:\"mount_path\"`\n\t// This field is from variant [ManagedAgentsFileResourceConfig].\n\tFileID string `json:\"file_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResourceConfig].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResourceConfig].\n\tAccess ManagedAgentsMemoryStoreResourceConfigAccess `json:\"access\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResourceConfig].\n\tInstructions string `json:\"instructions\"`\n\tJSON         struct {\n\t\tType          respjson.Field\n\t\tURL           respjson.Field\n\t\tCheckout      respjson.Field\n\t\tMountPath     respjson.Field\n\t\tFileID        respjson.Field\n\t\tMemoryStoreID respjson.Field\n\t\tAccess        respjson.Field\n\t\tInstructions  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionResourceConfigUnion contains all possible properties and values from [ManagedAgentsGitHubRepositoryResourceConfig](#ManagedAgentsGitHubRepositoryResourceConfig), [ManagedAgentsFileResourceConfig](#ManagedAgentsFileResourceConfig), [ManagedAgentsMemoryStoreResourceConfig](#ManagedAgentsMemoryStoreResourceConfig).\n\nUse the [ManagedAgentsSessionResourceConfigUnion.AsAny](#ManagedAgentsSessionResourceConfigUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionResourceConfigUnion) AsAny() anyManagedAgentsSessionResourceConfig\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionResourceConfigUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsGitHubRepositoryResourceConfig:\n\tcase qoder.ManagedAgentsFileResourceConfig:\n\tcase qoder.ManagedAgentsMemoryStoreResourceConfig:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionResourceConfigUnion) AsFile() (v ManagedAgentsFileResourceConfig)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceConfigUnion) AsGitHubRepository() (v ManagedAgentsGitHubRepositoryResourceConfig)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceConfigUnion) AsGitRepository() (v ManagedAgentsGitRepositoryResourceConfig)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceConfigUnion) AsMemoryStore() (v ManagedAgentsMemoryStoreResourceConfig)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceConfigUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionResourceConfigUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError struct {\n\t// Any of \"session_resource_not_found_error\".\n\tType ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA referenced resource no longer exists and its kind was not reported.\n\n```go\nfunc (r ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorTypeSessionResourceNotFoundError ManagedAgentsSessionResourceNotFoundDeploymentPausedReasonErrorType = \"session_resource_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsSessionResourceNotFoundRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"session_resource_not_found_error\".\n\tType ManagedAgentsSessionResourceNotFoundRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA referenced resource no longer exists and its kind was not reported.\n\n```go\nfunc (r ManagedAgentsSessionResourceNotFoundRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionResourceNotFoundRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionResourceNotFoundRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionResourceNotFoundRunErrorTypeSessionResourceNotFoundError ManagedAgentsSessionResourceNotFoundRunErrorType = \"session_resource_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsSessionResourceUnion struct {\n\tID        string    `json:\"id\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tMountPath string    `json:\"mount_path\"`\n\t// Any of \"github_repository\", \"file\", \"memory_store\".\n\tType      string    `json:\"type\"`\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResource].\n\tURL string `json:\"url\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResource].\n\tCheckout ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:\"checkout\"`\n\t// This field is from variant [ManagedAgentsFileResource].\n\tFileID string `json:\"file_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tAccess ManagedAgentsMemoryStoreResourceAccess `json:\"access\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tInstructions string `json:\"instructions\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tName string `json:\"name\"`\n\tJSON struct {\n\t\tID            respjson.Field\n\t\tCreatedAt     respjson.Field\n\t\tMountPath     respjson.Field\n\t\tType          respjson.Field\n\t\tUpdatedAt     respjson.Field\n\t\tURL           respjson.Field\n\t\tCheckout      respjson.Field\n\t\tFileID        respjson.Field\n\t\tMemoryStoreID respjson.Field\n\t\tAccess        respjson.Field\n\t\tDescription   respjson.Field\n\t\tInstructions  respjson.Field\n\t\tName          respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionResourceUnion includes [ManagedAgentsGitRepositoryResource](#ManagedAgentsGitRepositoryResource) and contains all possible properties and values from [ManagedAgentsGitHubRepositoryResource](#ManagedAgentsGitHubRepositoryResource), [ManagedAgentsFileResource](#ManagedAgentsFileResource), [ManagedAgentsMemoryStoreResource](#ManagedAgentsMemoryStoreResource).\n\nUse the [ManagedAgentsSessionResourceUnion.AsAny](#ManagedAgentsSessionResourceUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionResourceUnion) AsAny() anyManagedAgentsSessionResource\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionResourceUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsGitHubRepositoryResource:\n\tcase qoder.ManagedAgentsFileResource:\n\tcase qoder.ManagedAgentsMemoryStoreResource:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionResourceUnion) AsFile() (v ManagedAgentsFileResource)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceUnion) AsGitHubRepository() (v ManagedAgentsGitHubRepositoryResource)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceUnion) AsGitRepository() (v ManagedAgentsGitRepositoryResource)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceUnion) AsMemoryStore() (v ManagedAgentsMemoryStoreResource)\n```\n\n```go\nfunc (u ManagedAgentsSessionResourceUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionResourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionRetriesExhausted struct {\n\t// Any of \"retries_exhausted\".\n\tType ManagedAgentsSessionRetriesExhaustedType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe turn ended because repeated errors exhausted the retry budget or an error escalated to \\`retry\\_status: 'exhausted'\\`.\n\n```go\nfunc (r ManagedAgentsSessionRetriesExhausted) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionRetriesExhausted) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionRetriesExhaustedType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionRetriesExhaustedTypeRetriesExhausted ManagedAgentsSessionRetriesExhaustedType = \"retries_exhausted\"\n)\n```\n\n```go\ntype ManagedAgentsSessionStats struct {\n\t// Cumulative time in seconds the session spent in `running` status. Excludes idle\n\t// time.\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// Elapsed time since session creation in seconds. For terminated sessions, frozen\n\t// at the final update.\n\tDurationSeconds float64 `json:\"duration_seconds\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tActiveSeconds   respjson.Field\n\t\tDurationSeconds respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nTiming statistics for a session.\n\n```go\nfunc (r ManagedAgentsSessionStats) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionStats) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionStatus string\n```\nSessionStatus enum\n\n```go\nconst (\n\tManagedAgentsSessionStatusRescheduling ManagedAgentsSessionStatus = \"rescheduling\"\n\tManagedAgentsSessionStatusRunning      ManagedAgentsSessionStatus = \"running\"\n\tManagedAgentsSessionStatusIdle         ManagedAgentsSessionStatus = \"idle\"\n\tManagedAgentsSessionStatusTerminated   ManagedAgentsSessionStatus = \"terminated\"\n)\n```\n\n```go\ntype ManagedAgentsSessionStatusIdleEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// The agent completed its turn naturally and is ready for the next user message.\n\tStopReason ManagedAgentsSessionStatusIdleEventStopReasonUnion `json:\"stop_reason\" api:\"required\"`\n\t// Any of \"session.status_idle\".\n\tType ManagedAgentsSessionStatusIdleEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tStopReason  respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates the agent has paused and is awaiting user input.\n\n```go\nfunc (r ManagedAgentsSessionStatusIdleEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionStatusIdleEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionStatusIdleEventStopReasonUnion struct {\n\t// Any of \"end_turn\", \"requires_action\", \"retries_exhausted\", \"budget_reached\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsSessionRequiresAction].\n\tEventIDs []string `json:\"event_ids\"`\n\tJSON     struct {\n\t\tType     respjson.Field\n\t\tEventIDs respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionStatusIdleEventStopReasonUnion contains all possible properties and values from [ManagedAgentsSessionEndTurn](#ManagedAgentsSessionEndTurn), [ManagedAgentsSessionRequiresAction](#ManagedAgentsSessionRequiresAction), [ManagedAgentsSessionRetriesExhausted](#ManagedAgentsSessionRetriesExhausted), [ManagedAgentsSessionBudgetReached](#ManagedAgentsSessionBudgetReached).\n\nUse the [ManagedAgentsSessionStatusIdleEventStopReasonUnion.AsAny](#ManagedAgentsSessionStatusIdleEventStopReasonUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsAny() anyManagedAgentsSessionStatusIdleEventStopReason\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionStatusIdleEventStopReasonUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsSessionEndTurn:\n\tcase qoder.ManagedAgentsSessionRequiresAction:\n\tcase qoder.ManagedAgentsSessionRetriesExhausted:\n\tcase qoder.ManagedAgentsSessionBudgetReached:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsBudgetReached() (v ManagedAgentsSessionBudgetReached)\n```\n\n```go\nfunc (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsEndTurn() (v ManagedAgentsSessionEndTurn)\n```\n\n```go\nfunc (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsRequiresAction() (v ManagedAgentsSessionRequiresAction)\n```\n\n```go\nfunc (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) AsRetriesExhausted() (v ManagedAgentsSessionRetriesExhausted)\n```\n\n```go\nfunc (u ManagedAgentsSessionStatusIdleEventStopReasonUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionStatusIdleEventStopReasonUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionStatusIdleEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionStatusIdleEventTypeSessionStatusIdle ManagedAgentsSessionStatusIdleEventType = \"session.status_idle\"\n)\n```\n\n```go\ntype ManagedAgentsSessionStatusRescheduledEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.status_rescheduled\".\n\tType ManagedAgentsSessionStatusRescheduledEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates the session is recovering from an error state and is rescheduled for execution.\n\n```go\nfunc (r ManagedAgentsSessionStatusRescheduledEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionStatusRescheduledEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionStatusRescheduledEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionStatusRescheduledEventTypeSessionStatusRescheduled ManagedAgentsSessionStatusRescheduledEventType = \"session.status_rescheduled\"\n)\n```\n\n```go\ntype ManagedAgentsSessionStatusRunningEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.status_running\".\n\tType ManagedAgentsSessionStatusRunningEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates the session is actively running and the agent is working.\n\n```go\nfunc (r ManagedAgentsSessionStatusRunningEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionStatusRunningEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionStatusRunningEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionStatusRunningEventTypeSessionStatusRunning ManagedAgentsSessionStatusRunningEventType = \"session.status_running\"\n)\n```\n\n```go\ntype ManagedAgentsSessionStatusTerminatedEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.status_terminated\".\n\tType ManagedAgentsSessionStatusTerminatedEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nIndicates the session has terminated, either due to an error or completion.\n\n```go\nfunc (r ManagedAgentsSessionStatusTerminatedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionStatusTerminatedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionStatusTerminatedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionStatusTerminatedEventTypeSessionStatusTerminated ManagedAgentsSessionStatusTerminatedEventType = \"session.status_terminated\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThread struct {\n\t// Unique identifier for this thread.\n\tID string `json:\"id\" api:\"required\"`\n\t// The resolved agent a session thread runs: a saved-agent snapshot, the platform\n\t// advisor entry, or an inline-defined (ephemeral) agent snapshot.\n\tAgent ManagedAgentsSessionThreadAgentUnion `json:\"agent\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Parent thread that spawned this thread. Null for the primary thread.\n\tParentThreadID string `json:\"parent_thread_id\" api:\"required\"`\n\t// The session this thread belongs to.\n\tSessionID string `json:\"session_id\" api:\"required\"`\n\t// Timing statistics for a session thread.\n\tStats ManagedAgentsSessionThreadStats `json:\"stats\" api:\"required\"`\n\t// SessionThreadStatus enum\n\t//\n\t// Any of \"running\", \"idle\", \"rescheduling\", \"terminated\".\n\tStatus ManagedAgentsSessionThreadStatus `json:\"status\" api:\"required\"`\n\t// Any of \"session_thread\".\n\tType ManagedAgentsSessionThreadType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// Deprecated: current Thread responses do not include usage. Read Session Credits instead.\n\tUsage ManagedAgentsSessionThreadUsage `json:\"usage\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID             respjson.Field\n\t\tAgent          respjson.Field\n\t\tArchivedAt     respjson.Field\n\t\tCreatedAt      respjson.Field\n\t\tParentThreadID respjson.Field\n\t\tSessionID      respjson.Field\n\t\tStats          respjson.Field\n\t\tStatus         respjson.Field\n\t\tType           respjson.Field\n\t\tUpdatedAt      respjson.Field\n\t\tUsage          respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn execution thread within a \\`session\\`. Each session has one primary thread plus zero or more child threads spawned by the coordinator.\n\n```go\nfunc (r ManagedAgentsSessionThread) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThread) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgent struct {\n\tID          string                                `json:\"id\" api:\"required\"`\n\tDescription string                                `json:\"description\" api:\"required\"`\n\tMCPServers  []ManagedAgentsMCPServerURLDefinition `json:\"mcp_servers\" api:\"required\"`\n\t// Model identifier and configuration.\n\tModel  ManagedAgentsModelConfig                    `json:\"model\" api:\"required\"`\n\tName   string                                      `json:\"name\" api:\"required\"`\n\tSkills []ManagedAgentsSessionThreadAgentSkillUnion `json:\"skills\" api:\"required\"`\n\tSystem string                                      `json:\"system\" api:\"required\"`\n\tTools  []ManagedAgentsSessionThreadAgentToolUnion  `json:\"tools\" api:\"required\"`\n\t// Any of \"agent\".\n\tType    ManagedAgentsSessionThreadAgentType `json:\"type\" api:\"required\"`\n\tVersion int64                               `json:\"version\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tDescription respjson.Field\n\t\tMCPServers  respjson.Field\n\t\tModel       respjson.Field\n\t\tName        respjson.Field\n\t\tSkills      respjson.Field\n\t\tSystem      respjson.Field\n\t\tTools       respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResolved \\`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\\`.\n\n```go\nfunc (r ManagedAgentsSessionThreadAgent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentSkillUnion struct {\n\tSkillID string `json:\"skill_id\"`\n\t// Any of \"qoder\", \"custom\".\n\tType    string `json:\"type\"`\n\tVersion string `json:\"version\"`\n\tJSON    struct {\n\t\tSkillID respjson.Field\n\t\tType    respjson.Field\n\t\tVersion respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentSkillUnion contains all possible properties and values from [ManagedAgentsQoderSkill](#ManagedAgentsQoderSkill), [ManagedAgentsCustomSkill](#ManagedAgentsCustomSkill).\n\nUse the [ManagedAgentsSessionThreadAgentSkillUnion.AsAny](#ManagedAgentsSessionThreadAgentSkillUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentSkillUnion) AsAny() anyManagedAgentsSessionThreadAgentSkill\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionThreadAgentSkillUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsQoderSkill:\n\tcase qoder.ManagedAgentsCustomSkill:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentSkillUnion) AsCustom() (v ManagedAgentsCustomSkill)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentSkillUnion) AsQoder() (v ManagedAgentsQoderSkill)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentSkillUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentSkillUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentToolUnion struct {\n\tEnabledTools    []string `json:\"enabled_tools\"`\n\tDisallowedTools []string `json:\"disallowed_tools\"`\n\t// This field is a union of [[]ManagedAgentsAgentToolConfigUnion],\n\t// [[]ManagedAgentsMCPToolConfig]\n\tConfigs ManagedAgentsSessionThreadAgentToolUnionConfigs `json:\"configs\"`\n\t// This field is a union of [ManagedAgentsAgentToolsetDefaultConfig],\n\t// [ManagedAgentsMCPToolsetDefaultConfig]\n\tDefaultConfig ManagedAgentsSessionThreadAgentToolUnionDefaultConfig `json:\"default_config\"`\n\t// Any of \"agent_toolset_20260401\", \"mcp_toolset\", \"custom\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsMCPToolset].\n\tMCPServerName string `json:\"mcp_server_name\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tInputSchema ManagedAgentsCustomToolInputSchema `json:\"input_schema\"`\n\t// This field is from variant [ManagedAgentsCustomTool].\n\tName string `json:\"name\"`\n\tJSON struct {\n\t\tEnabledTools    respjson.Field\n\t\tDisallowedTools respjson.Field\n\t\tConfigs         respjson.Field\n\t\tDefaultConfig   respjson.Field\n\t\tType            respjson.Field\n\t\tMCPServerName   respjson.Field\n\t\tDescription     respjson.Field\n\t\tInputSchema     respjson.Field\n\t\tName            respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentToolUnion contains all possible properties and values from [ManagedAgentsAgentToolset20260401](#ManagedAgentsAgentToolset20260401), [ManagedAgentsMCPToolset](#ManagedAgentsMCPToolset), [ManagedAgentsCustomTool](#ManagedAgentsCustomTool).\n\nUse the [ManagedAgentsSessionThreadAgentToolUnion.AsAny](#ManagedAgentsSessionThreadAgentToolUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentToolUnion) AsAgentToolset20260401() (v ManagedAgentsAgentToolset20260401)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentToolUnion) AsAny() anyManagedAgentsSessionThreadAgentTool\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionThreadAgentToolUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAgentToolset20260401:\n\tcase qoder.ManagedAgentsMCPToolset:\n\tcase qoder.ManagedAgentsCustomTool:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentToolUnion) AsCustom() (v ManagedAgentsCustomTool)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentToolUnion) AsMCPToolset() (v ManagedAgentsMCPToolset)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentToolUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentToolUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentToolUnionConfigs struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentToolConfigUnion] instead of an object.\n\tOfManagedAgentsAgentToolConfigArray []ManagedAgentsAgentToolConfigUnion `json:\",inline\"`\n\t// This field will be present if the value is a [[]ManagedAgentsMCPToolConfig]\n\t// instead of an object.\n\tOfManagedAgentsMCPToolConfigArray []ManagedAgentsMCPToolConfig `json:\",inline\"`\n\tJSON                              struct {\n\t\tOfManagedAgentsAgentToolConfigArray respjson.Field\n\t\tOfManagedAgentsMCPToolConfigArray   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentToolUnionConfigs is an implicit subunion of [ManagedAgentsSessionThreadAgentToolUnion](#ManagedAgentsSessionThreadAgentToolUnion). ManagedAgentsSessionThreadAgentToolUnionConfigs provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionThreadAgentToolUnion](#ManagedAgentsSessionThreadAgentToolUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfManagedAgentsAgentToolConfigArray OfManagedAgentsMCPToolConfigArray]\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentToolUnionConfigs) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentToolUnionDefaultConfig struct {\n\tEnabled bool `json:\"enabled\"`\n\t// This field is a union of\n\t// [ManagedAgentsAgentToolsetDefaultConfigPermissionPolicyUnion],\n\t// [ManagedAgentsMCPToolsetDefaultConfigPermissionPolicyUnion]\n\tPermissionPolicy ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy `json:\"permission_policy\"`\n\tJSON             struct {\n\t\tEnabled          respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentToolUnionDefaultConfig is an implicit subunion of [ManagedAgentsSessionThreadAgentToolUnion](#ManagedAgentsSessionThreadAgentToolUnion). ManagedAgentsSessionThreadAgentToolUnionDefaultConfig provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionThreadAgentToolUnion](#ManagedAgentsSessionThreadAgentToolUnion).\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentToolUnionDefaultConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy struct {\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy is an implicit subunion of [ManagedAgentsSessionThreadAgentToolUnion](#ManagedAgentsSessionThreadAgentToolUnion). ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionThreadAgentToolUnion](#ManagedAgentsSessionThreadAgentToolUnion).\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentToolUnionDefaultConfigPermissionPolicy) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadAgentTypeAgent ManagedAgentsSessionThreadAgentType = \"agent\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentUnion struct {\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tID string `json:\"id\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tMCPServers []ManagedAgentsMCPServerURLDefinition `json:\"mcp_servers\"`\n\t// This field is a union of [ManagedAgentsModelConfig], [string]\n\tModel ManagedAgentsSessionThreadAgentUnionModel `json:\"model\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tName string `json:\"name\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tSkills []ManagedAgentsSessionThreadAgentSkillUnion `json:\"skills\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tSystem string `json:\"system\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tTools []ManagedAgentsSessionThreadAgentToolUnion `json:\"tools\"`\n\t// Any of \"agent\", \"advisor\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsSessionThreadAgent].\n\tVersion int64 `json:\"version\"`\n\tJSON    struct {\n\t\tID          respjson.Field\n\t\tDescription respjson.Field\n\t\tMCPServers  respjson.Field\n\t\tModel       respjson.Field\n\t\tName        respjson.Field\n\t\tSkills      respjson.Field\n\t\tSystem      respjson.Field\n\t\tTools       respjson.Field\n\t\tType        respjson.Field\n\t\tVersion     respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentUnion contains all possible properties and values from [ManagedAgentsSessionThreadAgent](#ManagedAgentsSessionThreadAgent), [ManagedAgentsAdvisor](#ManagedAgentsAdvisor).\n\nUse the [ManagedAgentsSessionThreadAgentUnion.AsAny](#ManagedAgentsSessionThreadAgentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentUnion) AsAdvisor() (v ManagedAgentsAdvisor)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentUnion) AsAgent() (v ManagedAgentsSessionThreadAgent)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentUnion) AsAny() anyManagedAgentsSessionThreadAgent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionThreadAgentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsSessionThreadAgent:\n\tcase qoder.ManagedAgentsAdvisor:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionThreadAgentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadAgentUnionModel struct {\n\tEffectiveContextWindow int64 `json:\"effective_context_window\"`\n\tContextWindow          int64 `json:\"context_window\"`\n\t// This field will be present if the value is a [string] instead of an object.\n\tOfString string `json:\",inline\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\tID ManagedAgentsModel `json:\"id\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\tEffort string `json:\"effort\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\tInferenceGeo string `json:\"inference_geo\"`\n\t// This field is from variant [ManagedAgentsModelConfig].\n\t// Deprecated: speed is no longer part of Managed model configuration.\n\tSpeed ManagedAgentsModelConfigSpeed `json:\"speed\"`\n\tJSON  struct {\n\t\tEffectiveContextWindow respjson.Field\n\t\tContextWindow          respjson.Field\n\t\tOfString               respjson.Field\n\t\tID                     respjson.Field\n\t\tEffort                 respjson.Field\n\t\tInferenceGeo           respjson.Field\n\t\tSpeed                  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadAgentUnionModel is an implicit subunion of [ManagedAgentsSessionThreadAgentUnion](#ManagedAgentsSessionThreadAgentUnion). ManagedAgentsSessionThreadAgentUnionModel provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsSessionThreadAgentUnion](#ManagedAgentsSessionThreadAgentUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfString]\n\n```go\nfunc (r *ManagedAgentsSessionThreadAgentUnionModel) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadCreatedEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Name of the callable agent the thread runs.\n\tAgentName string `json:\"agent_name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Public `sthr_` ID of the newly created thread.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"required\"`\n\t// Any of \"session.thread_created\".\n\tType ManagedAgentsSessionThreadCreatedEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tAgentName       respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tType            respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted 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.\n\n```go\nfunc (r ManagedAgentsSessionThreadCreatedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadCreatedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadCreatedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadCreatedEventTypeSessionThreadCreated ManagedAgentsSessionThreadCreatedEventType = \"session.thread_created\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadStats struct {\n\t// Cumulative time in seconds the thread spent actively running. Excludes idle\n\t// time.\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// Elapsed time since thread creation in seconds. For archived threads, frozen at\n\t// the final update.\n\tDurationSeconds float64 `json:\"duration_seconds\"`\n\t// Time in seconds for the thread to begin running. Zero for child threads, which\n\t// start immediately.\n\tStartupSeconds float64 `json:\"startup_seconds\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tActiveSeconds   respjson.Field\n\t\tDurationSeconds respjson.Field\n\t\tStartupSeconds  respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nTiming statistics for a session thread.\n\n```go\nfunc (r ManagedAgentsSessionThreadStats) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadStats) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadStatus string\n```\nSessionThreadStatus enum\n\n```go\nconst (\n\tManagedAgentsSessionThreadStatusRunning      ManagedAgentsSessionThreadStatus = \"running\"\n\tManagedAgentsSessionThreadStatusIdle         ManagedAgentsSessionThreadStatus = \"idle\"\n\tManagedAgentsSessionThreadStatusRescheduling ManagedAgentsSessionThreadStatus = \"rescheduling\"\n\tManagedAgentsSessionThreadStatusTerminated   ManagedAgentsSessionThreadStatus = \"terminated\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusIdleEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Name of the agent the thread runs.\n\tAgentName string `json:\"agent_name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Public sthr\\_ ID of the thread that went idle.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"required\"`\n\t// The agent completed its turn naturally and is ready for the next user message.\n\tStopReason ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion `json:\"stop_reason\" api:\"required\"`\n\t// Any of \"session.thread_status_idle\".\n\tType ManagedAgentsSessionThreadStatusIdleEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tAgentName       respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tStopReason      respjson.Field\n\t\tType            respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA 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.\n\n```go\nfunc (r ManagedAgentsSessionThreadStatusIdleEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadStatusIdleEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion struct {\n\t// Any of \"end_turn\", \"requires_action\", \"retries_exhausted\", \"budget_reached\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsSessionRequiresAction].\n\tEventIDs []string `json:\"event_ids\"`\n\tJSON     struct {\n\t\tType     respjson.Field\n\t\tEventIDs respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsSessionThreadStatusIdleEventStopReasonUnion contains all possible properties and values from [ManagedAgentsSessionEndTurn](#ManagedAgentsSessionEndTurn), [ManagedAgentsSessionRequiresAction](#ManagedAgentsSessionRequiresAction), [ManagedAgentsSessionRetriesExhausted](#ManagedAgentsSessionRetriesExhausted), [ManagedAgentsSessionBudgetReached](#ManagedAgentsSessionBudgetReached).\n\nUse the [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion.AsAny](#ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsAny() anyManagedAgentsSessionThreadStatusIdleEventStopReason\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsSessionEndTurn:\n\tcase qoder.ManagedAgentsSessionRequiresAction:\n\tcase qoder.ManagedAgentsSessionRetriesExhausted:\n\tcase qoder.ManagedAgentsSessionBudgetReached:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsBudgetReached() (v ManagedAgentsSessionBudgetReached)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsEndTurn() (v ManagedAgentsSessionEndTurn)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsRequiresAction() (v ManagedAgentsSessionRequiresAction)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) AsRetriesExhausted() (v ManagedAgentsSessionRetriesExhausted)\n```\n\n```go\nfunc (u ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusIdleEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadStatusIdleEventTypeSessionThreadStatusIdle ManagedAgentsSessionThreadStatusIdleEventType = \"session.thread_status_idle\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusRescheduledEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Name of the agent the thread runs.\n\tAgentName string `json:\"agent_name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Public sthr\\_ ID of the thread that is retrying.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"required\"`\n\t// Any of \"session.thread_status_rescheduled\".\n\tType ManagedAgentsSessionThreadStatusRescheduledEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tAgentName       respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tType            respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA 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.\n\n```go\nfunc (r ManagedAgentsSessionThreadStatusRescheduledEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadStatusRescheduledEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusRescheduledEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadStatusRescheduledEventTypeSessionThreadStatusRescheduled ManagedAgentsSessionThreadStatusRescheduledEventType = \"session.thread_status_rescheduled\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusRunningEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Name of the agent the thread runs.\n\tAgentName string `json:\"agent_name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Public sthr\\_ ID of the thread that started running.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"required\"`\n\t// Any of \"session.thread_status_running\".\n\tType ManagedAgentsSessionThreadStatusRunningEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tAgentName       respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tType            respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA session thread has begun executing. Emitted on the thread's own stream and cross-posted to the primary stream for child threads.\n\n```go\nfunc (r ManagedAgentsSessionThreadStatusRunningEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadStatusRunningEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusRunningEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadStatusRunningEventTypeSessionThreadStatusRunning ManagedAgentsSessionThreadStatusRunningEventType = \"session.thread_status_running\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusTerminatedEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Name of the agent the thread runs.\n\tAgentName string `json:\"agent_name\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Public sthr\\_ ID of the thread that terminated.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"required\"`\n\t// Any of \"session.thread_status_terminated\".\n\tType ManagedAgentsSessionThreadStatusTerminatedEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tAgentName       respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tType            respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA 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.\n\n```go\nfunc (r ManagedAgentsSessionThreadStatusTerminatedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadStatusTerminatedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionThreadStatusTerminatedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadStatusTerminatedEventTypeSessionThreadStatusTerminated ManagedAgentsSessionThreadStatusTerminatedEventType = \"session.thread_status_terminated\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionThreadTypeSessionThread ManagedAgentsSessionThreadType = \"session_thread\"\n)\n```\n\n```go\ntype ManagedAgentsSessionThreadUsage struct {\n\t// Cumulative time in seconds this thread spent in running status. Equal to\n\t// `stats.active_seconds`; surfaced here so a thread's usage carries every quantity\n\t// its cost is priced on.\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// Prompt-cache creation token usage broken down by cache lifetime.\n\tCacheCreation ManagedAgentsCacheCreationUsage `json:\"cache_creation\"`\n\t// Total tokens read from prompt cache.\n\tCacheReadInputTokens int64 `json:\"cache_read_input_tokens\"`\n\t// Total input tokens consumed across all turns.\n\tInputTokens int64 `json:\"input_tokens\"`\n\t// A monetary amount in a specific currency.\n\tListCost MonetaryAmount `json:\"list_cost\" api:\"nullable\"`\n\t// Total output tokens generated across all turns.\n\tOutputTokens int64 `json:\"output_tokens\"`\n\t// Cumulative count of server-executed tool invocations, broken down by tool.\n\tServerToolUse ManagedAgentsServerToolUsage `json:\"server_tool_use\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tActiveSeconds        respjson.Field\n\t\tCacheCreation        respjson.Field\n\t\tCacheReadInputTokens respjson.Field\n\t\tInputTokens          respjson.Field\n\t\tListCost             respjson.Field\n\t\tOutputTokens         respjson.Field\n\t\tServerToolUse        respjson.Field\n\t\tExtraFields          map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nDeprecated: current Thread responses do not include usage. Read Session Credits instead.\n\n```go\nfunc (r ManagedAgentsSessionThreadUsage) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionThreadUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionTypeSession ManagedAgentsSessionType = \"session\"\n)\n```\n\n```go\ntype ManagedAgentsSessionUpdatedEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.updated\".\n\tType ManagedAgentsSessionUpdatedEventType `json:\"type\" api:\"required\"`\n\t// Resolved `agent` definition for a `session`. Snapshot of the `agent` at\n\t// `session` creation time.\n\tAgent ManagedAgentsSessionAgent `json:\"agent\" api:\"nullable\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\" api:\"nullable\"`\n\t// The session's full metadata bag after the update. Present when the update set\n\t// non-empty metadata; absent when metadata was unchanged or cleared to empty.\n\tMetadata map[string]string `json:\"metadata\"`\n\t// The session's new title. Present only when the update changed it.\n\tTitle string `json:\"title\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tAgent       respjson.Field\n\t\tBudget      respjson.Field\n\t\tMetadata    respjson.Field\n\t\tTitle       respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted 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.\n\n```go\nfunc (r ManagedAgentsSessionUpdatedEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionUpdatedEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionUpdatedEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionUpdatedEventTypeSessionUpdated ManagedAgentsSessionUpdatedEventType = \"session.updated\"\n)\n```\n\n```go\ntype ManagedAgentsSessionUsage struct {\n\tModelCredits          float64 `json:\"model_credits\"`\n\tSandboxRuntimeCredits float64 `json:\"sandbox_runtime_credits\"`\n\tTotalCredits          float64 `json:\"total_credits\"`\n\t// Cumulative time in seconds during which the session had at least one thread in\n\t// running status. Overlapping activity from concurrent threads is counted once,\n\t// unlike `stats.active_seconds`, which sums each thread's own active time. This is\n\t// the duration the session's runtime cost is priced on.\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// Prompt-cache creation token usage broken down by cache lifetime.\n\tCacheCreation ManagedAgentsCacheCreationUsage `json:\"cache_creation\"`\n\t// Total tokens read from prompt cache.\n\tCacheReadInputTokens int64 `json:\"cache_read_input_tokens\"`\n\t// Total input tokens consumed across all turns.\n\tInputTokens int64 `json:\"input_tokens\"`\n\t// A monetary amount in a specific currency.\n\tListCost MonetaryAmount `json:\"list_cost\" api:\"nullable\"`\n\t// Total output tokens generated across all turns.\n\tOutputTokens int64 `json:\"output_tokens\"`\n\t// Cumulative count of server-executed tool invocations, broken down by tool.\n\tServerToolUse ManagedAgentsServerToolUsage `json:\"server_tool_use\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tModelCredits          respjson.Field\n\t\tSandboxRuntimeCredits respjson.Field\n\t\tTotalCredits          respjson.Field\n\t\tActiveSeconds         respjson.Field\n\t\tCacheCreation         respjson.Field\n\t\tCacheReadInputTokens  respjson.Field\n\t\tInputTokens           respjson.Field\n\t\tListCost              respjson.Field\n\t\tOutputTokens          respjson.Field\n\t\tServerToolUse         respjson.Field\n\t\tExtraFields           map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCumulative Credits snapshot. Replace previous values; do not sum snapshots. Legacy token and list-cost fields remain available for older responses.\n\n```go\nfunc (r ManagedAgentsSessionUsage) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionUsageEvent struct {\n\tModelCredits          float64 `json:\"model_credits\"`\n\tSandboxRuntimeCredits float64 `json:\"sandbox_runtime_credits\"`\n\tTotalCredits          float64 `json:\"total_credits\"`\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"session.usage\".\n\tType ManagedAgentsSessionUsageEventType `json:\"type\" api:\"required\"`\n\t// Point-in-time snapshot of a session's cumulative usage.\n\tUsage ManagedAgentsSessionUsageSnapshot `json:\"usage\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tModelCredits          respjson.Field\n\t\tSandboxRuntimeCredits respjson.Field\n\t\tTotalCredits          respjson.Field\n\t\tID                    respjson.Field\n\t\tProcessedAt           respjson.Field\n\t\tType                  respjson.Field\n\t\tUsage                 respjson.Field\n\t\tBudget                respjson.Field\n\t\tExtraFields           map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCumulative Credits emitted before session.status\\_idle when usage is available. Credits are top-level fields; Usage and Budget are legacy response fields.\n\n```go\nfunc (r ManagedAgentsSessionUsageEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionUsageEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSessionUsageEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSessionUsageEventTypeSessionUsage ManagedAgentsSessionUsageEventType = \"session.usage\"\n)\n```\n\n```go\ntype ManagedAgentsSessionUsageSnapshot struct {\n\t// Cumulative time in seconds during which the session had at least one thread in\n\t// running status. Overlapping activity from concurrent threads is counted once.\n\t// This is the duration the session's runtime cost is priced on.\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// Prompt-cache creation token usage broken down by cache lifetime.\n\tCacheCreation ManagedAgentsCacheCreationUsage `json:\"cache_creation\"`\n\t// Total tokens read from prompt cache.\n\tCacheReadInputTokens int64 `json:\"cache_read_input_tokens\"`\n\t// Total input tokens consumed across all turns.\n\tInputTokens int64 `json:\"input_tokens\"`\n\t// A monetary amount in a specific currency.\n\tListCost MonetaryAmount `json:\"list_cost\"`\n\t// Total output tokens generated across all turns.\n\tOutputTokens int64 `json:\"output_tokens\"`\n\t// Cumulative count of server-executed tool invocations, broken down by tool.\n\tServerToolUse ManagedAgentsServerToolUsage `json:\"server_tool_use\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tActiveSeconds        respjson.Field\n\t\tCacheCreation        respjson.Field\n\t\tCacheReadInputTokens respjson.Field\n\t\tInputTokens          respjson.Field\n\t\tListCost             respjson.Field\n\t\tOutputTokens         respjson.Field\n\t\tServerToolUse        respjson.Field\n\t\tExtraFields          map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPoint-in-time snapshot of a session's cumulative usage.\n\n```go\nfunc (r ManagedAgentsSessionUsageSnapshot) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSessionUsageSnapshot) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSkillNotFoundDeploymentPausedReasonError struct {\n\t// Any of \"skill_not_found_error\".\n\tType ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA skill referenced by the deployment's agent no longer exists.\n\n```go\nfunc (r ManagedAgentsSkillNotFoundDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSkillNotFoundDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSkillNotFoundDeploymentPausedReasonErrorTypeSkillNotFoundError ManagedAgentsSkillNotFoundDeploymentPausedReasonErrorType = \"skill_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsSkillNotFoundRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"skill_not_found_error\".\n\tType ManagedAgentsSkillNotFoundRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA skill referenced by the deployment's agent no longer exists.\n\n```go\nfunc (r ManagedAgentsSkillNotFoundRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSkillNotFoundRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSkillNotFoundRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsSkillNotFoundRunErrorTypeSkillNotFoundError ManagedAgentsSkillNotFoundRunErrorType = \"skill_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsSkillParamsUnion struct {\n\tOfQoder  *ManagedAgentsQoderSkillParams  `json:\",omitzero,inline\"`\n\tOfCustom *ManagedAgentsCustomSkillParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc ManagedAgentsSkillParamsOfCustom(skillID string) ManagedAgentsSkillParamsUnion\n```\n\n```go\nfunc ManagedAgentsSkillParamsOfQoder(skillID string) ManagedAgentsSkillParamsUnion\n```\n\n```go\nfunc (u ManagedAgentsSkillParamsUnion) GetSkillID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSkillParamsUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSkillParamsUnion) GetVersion() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsSkillParamsUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsSkillParamsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanModelRequestEndEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Whether the model request resulted in an error.\n\tIsError bool `json:\"is_error\" api:\"required\"`\n\t// The id of the corresponding `span.model_request_start` event.\n\tModelRequestStartID string `json:\"model_request_start_id\" api:\"required\"`\n\t// Credits for a single model request; legacy token fields may appear in older responses.\n\tModelUsage ManagedAgentsSpanModelUsage `json:\"model_usage\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"span.model_request_end\".\n\tType ManagedAgentsSpanModelRequestEndEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                  respjson.Field\n\t\tIsError             respjson.Field\n\t\tModelRequestStartID respjson.Field\n\t\tModelUsage          respjson.Field\n\t\tProcessedAt         respjson.Field\n\t\tType                respjson.Field\n\t\tExtraFields         map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted when a model request completes.\n\n```go\nfunc (r ManagedAgentsSpanModelRequestEndEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSpanModelRequestEndEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanModelRequestEndEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSpanModelRequestEndEventTypeSpanModelRequestEnd ManagedAgentsSpanModelRequestEndEventType = \"span.model_request_end\"\n)\n```\n\n```go\ntype ManagedAgentsSpanModelRequestStartEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"span.model_request_start\".\n\tType ManagedAgentsSpanModelRequestStartEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted when a model request is initiated by the agent.\n\n```go\nfunc (r ManagedAgentsSpanModelRequestStartEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSpanModelRequestStartEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanModelRequestStartEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSpanModelRequestStartEventTypeSpanModelRequestStart ManagedAgentsSpanModelRequestStartEventType = \"span.model_request_start\"\n)\n```\n\n```go\ntype ManagedAgentsSpanModelUsage struct {\n\tCredits float64 `json:\"credits\"`\n\t// Tokens used to create prompt cache in this request.\n\tCacheCreationInputTokens int64 `json:\"cache_creation_input_tokens\"`\n\t// Tokens read from prompt cache in this request.\n\tCacheReadInputTokens int64 `json:\"cache_read_input_tokens\"`\n\t// Input tokens consumed by this request.\n\tInputTokens int64 `json:\"input_tokens\"`\n\t// Output tokens generated by this request.\n\tOutputTokens int64 `json:\"output_tokens\"`\n\t// Inference speed mode. `fast` provides significantly faster output token\n\t// generation at premium pricing. Not all models support `fast`; invalid\n\t// combinations are rejected at create time.\n\t//\n\t// Any of \"standard\", \"fast\".\n\tSpeed ManagedAgentsSpanModelUsageSpeed `json:\"speed\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCredits                  respjson.Field\n\t\tCacheCreationInputTokens respjson.Field\n\t\tCacheReadInputTokens     respjson.Field\n\t\tInputTokens              respjson.Field\n\t\tOutputTokens             respjson.Field\n\t\tSpeed                    respjson.Field\n\t\tExtraFields              map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nCredits for a single model request; legacy token fields may appear in older responses.\n\n```go\nfunc (r ManagedAgentsSpanModelUsage) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSpanModelUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanModelUsageSpeed string\n```\nInference speed mode. \\`fast\\` provides significantly faster output token generation at premium pricing. Not all models support \\`fast\\`; invalid combinations are rejected at create time.\n\n```go\nconst (\n\tManagedAgentsSpanModelUsageSpeedStandard ManagedAgentsSpanModelUsageSpeed = \"standard\"\n\tManagedAgentsSpanModelUsageSpeedFast     ManagedAgentsSpanModelUsageSpeed = \"fast\"\n)\n```\n\n```go\ntype ManagedAgentsSpanOutcomeEvaluationEndEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Human-readable explanation of the verdict. For `needs_revision`, describes which\n\t// criteria failed and why.\n\tExplanation string `json:\"explanation\" api:\"required\"`\n\t// 0-indexed revision cycle, matching the corresponding\n\t// `span.outcome_evaluation_start`.\n\tIteration int64 `json:\"iteration\" api:\"required\"`\n\t// The id of the corresponding `span.outcome_evaluation_start` event.\n\tOutcomeEvaluationStartID string `json:\"outcome_evaluation_start_id\" api:\"required\"`\n\t// The `outc_` ID of the outcome being evaluated.\n\tOutcomeID string `json:\"outcome_id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Evaluation verdict. 'satisfied': criteria met, session goes idle.\n\t// 'needs_revision': criteria not met, another revision cycle follows.\n\t// 'max_iterations_reached': evaluation budget exhausted with criteria still unmet\n\t// — one final acknowledgment turn follows before the session goes idle, but no\n\t// further evaluation runs. 'failed': grader determined the rubric does not apply\n\t// to the deliverables. 'interrupted': user sent an interrupt while evaluation was\n\t// in progress.\n\tResult string `json:\"result\" api:\"required\"`\n\t// Any of \"span.outcome_evaluation_end\".\n\tType ManagedAgentsSpanOutcomeEvaluationEndEventType `json:\"type\" api:\"required\"`\n\t// Credits for a single model request; legacy token fields may appear in older responses.\n\tUsage ManagedAgentsSpanModelUsage `json:\"usage\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                       respjson.Field\n\t\tExplanation              respjson.Field\n\t\tIteration                respjson.Field\n\t\tOutcomeEvaluationStartID respjson.Field\n\t\tOutcomeID                respjson.Field\n\t\tProcessedAt              respjson.Field\n\t\tResult                   respjson.Field\n\t\tType                     respjson.Field\n\t\tUsage                    respjson.Field\n\t\tExtraFields              map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted 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.\n\n```go\nfunc (r ManagedAgentsSpanOutcomeEvaluationEndEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSpanOutcomeEvaluationEndEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanOutcomeEvaluationEndEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSpanOutcomeEvaluationEndEventTypeSpanOutcomeEvaluationEnd ManagedAgentsSpanOutcomeEvaluationEndEventType = \"span.outcome_evaluation_end\"\n)\n```\n\n```go\ntype ManagedAgentsSpanOutcomeEvaluationOngoingEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// 0-indexed revision cycle, matching the corresponding\n\t// `span.outcome_evaluation_start`.\n\tIteration int64 `json:\"iteration\" api:\"required\"`\n\t// The `outc_` ID of the outcome being evaluated.\n\tOutcomeID string `json:\"outcome_id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"span.outcome_evaluation_ongoing\".\n\tType ManagedAgentsSpanOutcomeEvaluationOngoingEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tIteration   respjson.Field\n\t\tOutcomeID   respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPeriodic 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.\n\n```go\nfunc (r ManagedAgentsSpanOutcomeEvaluationOngoingEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSpanOutcomeEvaluationOngoingEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanOutcomeEvaluationOngoingEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSpanOutcomeEvaluationOngoingEventTypeSpanOutcomeEvaluationOngoing ManagedAgentsSpanOutcomeEvaluationOngoingEventType = \"span.outcome_evaluation_ongoing\"\n)\n```\n\n```go\ntype ManagedAgentsSpanOutcomeEvaluationStartEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// 0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation\n\t// after the first revision; etc.\n\tIteration int64 `json:\"iteration\" api:\"required\"`\n\t// The `outc_` ID of the outcome being evaluated.\n\tOutcomeID string `json:\"outcome_id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Any of \"span.outcome_evaluation_start\".\n\tType ManagedAgentsSpanOutcomeEvaluationStartEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tIteration   respjson.Field\n\t\tOutcomeID   respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEmitted when an outcome evaluation cycle begins.\n\n```go\nfunc (r ManagedAgentsSpanOutcomeEvaluationStartEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSpanOutcomeEvaluationStartEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSpanOutcomeEvaluationStartEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSpanOutcomeEvaluationStartEventTypeSpanOutcomeEvaluationStart ManagedAgentsSpanOutcomeEvaluationStartEventType = \"span.outcome_evaluation_start\"\n)\n```\n\n```go\ntype ManagedAgentsStartEvent struct {\n\t// The previewed event's type and id. The event type determines which delta types\n\t// the preview's event_delta events carry: agent.message events stream\n\t// content_delta fragments; agent.thinking previews are start-only — no deltas\n\t// follow, and the buffered agent.thinking with the same id concludes them.\n\tEvent ManagedAgentsStartEventPreviewUnion `json:\"event\" api:\"required\"`\n\t// Any of \"event_start\".\n\tType ManagedAgentsStartEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEvent       respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nOpens 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.\n\n```go\nfunc (r ManagedAgentsStartEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsStartEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStartEventPreviewUnion struct {\n\tID string `json:\"id\"`\n\t// Any of \"agent.message\", \"agent.thinking\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tID   respjson.Field\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStartEventPreviewUnion contains all possible properties and values from [ManagedAgentsAgentMessagePreview](#ManagedAgentsAgentMessagePreview), [ManagedAgentsAgentThinkingPreview](#ManagedAgentsAgentThinkingPreview).\n\nUse the [ManagedAgentsStartEventPreviewUnion.AsAny](#ManagedAgentsStartEventPreviewUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsStartEventPreviewUnion) AsAgentMessage() (v ManagedAgentsAgentMessagePreview)\n```\n\n```go\nfunc (u ManagedAgentsStartEventPreviewUnion) AsAgentThinking() (v ManagedAgentsAgentThinkingPreview)\n```\n\n```go\nfunc (u ManagedAgentsStartEventPreviewUnion) AsAny() anyManagedAgentsStartEventPreview\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsStartEventPreviewUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAgentMessagePreview:\n\tcase qoder.ManagedAgentsAgentThinkingPreview:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsStartEventPreviewUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsStartEventPreviewUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStartEventType string\n```\n\n```go\nconst (\n\tManagedAgentsStartEventTypeEventStart ManagedAgentsStartEventType = \"event_start\"\n)\n```\n\n```go\ntype ManagedAgentsStaticBearerAuthResponse struct {\n\t// URL of the MCP server this credential authenticates against.\n\tMCPServerURL string `json:\"mcp_server_url\" api:\"required\"`\n\t// Any of \"static_bearer\".\n\tType ManagedAgentsStaticBearerAuthResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMCPServerURL respjson.Field\n\t\tType         respjson.Field\n\t\tExtraFields  map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nStatic bearer token credential details for an MCP server.\n\n```go\nfunc (r ManagedAgentsStaticBearerAuthResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsStaticBearerAuthResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStaticBearerAuthResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsStaticBearerAuthResponseTypeStaticBearer ManagedAgentsStaticBearerAuthResponseType = \"static_bearer\"\n)\n```\n\n```go\ntype ManagedAgentsStaticBearerCreateParams struct {\n\t// Static bearer token value.\n\tToken string `json:\"token\" api:\"required\"`\n\t// URL of the MCP server this credential authenticates against.\n\tMCPServerURL string `json:\"mcp_server_url\" api:\"required\"`\n\t// Any of \"static_bearer\".\n\tType ManagedAgentsStaticBearerCreateParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for creating a static bearer token credential.\n\nThe properties Token, MCPServerURL, Type are required.\n\n```go\nfunc (r ManagedAgentsStaticBearerCreateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsStaticBearerCreateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStaticBearerCreateParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsStaticBearerCreateParamsTypeStaticBearer ManagedAgentsStaticBearerCreateParamsType = \"static_bearer\"\n)\n```\n\n```go\ntype ManagedAgentsStaticBearerUpdateParams struct {\n\t// Any of \"static_bearer\".\n\tType ManagedAgentsStaticBearerUpdateParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Updated static bearer token value.\n\tToken param.Opt[string] `json:\"token,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for updating a static bearer token credential. The \\`mcp\\_server\\_url\\` is immutable.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsStaticBearerUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsStaticBearerUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStaticBearerUpdateParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsStaticBearerUpdateParamsTypeStaticBearer ManagedAgentsStaticBearerUpdateParamsType = \"static_bearer\"\n)\n```\n\n```go\ntype ManagedAgentsStreamSessionEventsUnion struct {\n\tFileID                string  `json:\"file_id\"`\n\tOriginalFilename      string  `json:\"original_filename\"`\n\tSize                  int64   `json:\"size\"`\n\tContentType           string  `json:\"content_type\"`\n\tModelCredits          float64 `json:\"model_credits\"`\n\tSandboxRuntimeCredits float64 `json:\"sandbox_runtime_credits\"`\n\tTotalCredits          float64 `json:\"total_credits\"`\n\tID                    string  `json:\"id\"`\n\t// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentMessageEventContentUnion],\n\t// [[]ManagedAgentsAgentMCPToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion],\n\t// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion],\n\t// [[]ManagedAgentsUserToolResultEventContentUnion],\n\t// [[]ManagedAgentsSystemContentBlock]\n\tContent ManagedAgentsStreamSessionEventsUnionContent `json:\"content\"`\n\t// Any of \"user.message\", \"user.interrupt\", \"user.tool_confirmation\",\n\t// \"user.custom_tool_result\", \"agent.custom_tool_use\", \"agent.message\",\n\t// \"agent.thinking\", \"agent.mcp_tool_use\", \"agent.mcp_tool_result\",\n\t// \"agent.tool_use\", \"agent.tool_result\", \"agent.thread_message_received\",\n\t// \"agent.thread_message_sent\", \"agent.thread_context_compacted\", \"session.error\",\n\t// \"session.status_rescheduled\", \"session.status_running\", \"session.status_idle\",\n\t// \"session.status_terminated\", \"session.thread_created\",\n\t// \"span.outcome_evaluation_start\", \"span.outcome_evaluation_end\",\n\t// \"span.model_request_start\", \"span.model_request_end\",\n\t// \"span.outcome_evaluation_ongoing\", \"user.define_outcome\", \"session.deleted\",\n\t// \"session.thread_status_running\", \"session.thread_status_idle\",\n\t// \"session.thread_status_terminated\", \"user.tool_result\",\n\t// \"session.thread_status_rescheduled\", \"session.updated\", \"event_start\",\n\t// \"event_delta\", \"system.message\", \"session.usage\".\n\tType            string    `json:\"type\"`\n\tProcessedAt     time.Time `json:\"processed_at\"`\n\tSessionThreadID string    `json:\"session_thread_id\"`\n\tResult          string    `json:\"result\"`\n\tToolUseID       string    `json:\"tool_use_id\"`\n\t// This field is from variant [ManagedAgentsUserToolConfirmationEvent].\n\tDenyMessage string `json:\"deny_message\"`\n\t// This field is from variant [ManagedAgentsUserCustomToolResultEvent].\n\tCustomToolUseID string `json:\"custom_tool_use_id\"`\n\tIsError         bool   `json:\"is_error\"`\n\tInput           any    `json:\"input\"`\n\tName            string `json:\"name\"`\n\t// This field is from variant [ManagedAgentsAgentMCPToolUseEvent].\n\tMCPServerName       string `json:\"mcp_server_name\"`\n\tEvaluatedPermission string `json:\"evaluated_permission\"`\n\t// This field is from variant [ManagedAgentsAgentMCPToolResultEvent].\n\tMCPToolUseID string `json:\"mcp_tool_use_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].\n\tFromSessionThreadID string `json:\"from_session_thread_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].\n\tFromAgentName string `json:\"from_agent_name\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].\n\tToSessionThreadID string `json:\"to_session_thread_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].\n\tToAgentName string `json:\"to_agent_name\"`\n\t// This field is from variant [ManagedAgentsSessionErrorEvent].\n\tError ManagedAgentsSessionErrorEventErrorUnion `json:\"error\"`\n\t// This field is a union of\n\t// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],\n\t// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion]\n\tStopReason ManagedAgentsStreamSessionEventsUnionStopReason `json:\"stop_reason\"`\n\tAgentName  string                                          `json:\"agent_name\"`\n\tIteration  int64                                           `json:\"iteration\"`\n\tOutcomeID  string                                          `json:\"outcome_id\"`\n\t// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].\n\tExplanation string `json:\"explanation\"`\n\t// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].\n\tOutcomeEvaluationStartID string `json:\"outcome_evaluation_start_id\"`\n\t// This field is a union of [ManagedAgentsSpanModelUsage],\n\t// [ManagedAgentsSessionUsageSnapshot]\n\tUsage ManagedAgentsStreamSessionEventsUnionUsage `json:\"usage\"`\n\t// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].\n\tModelRequestStartID string `json:\"model_request_start_id\"`\n\t// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].\n\tModelUsage ManagedAgentsSpanModelUsage `json:\"model_usage\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tMaxIterations int64 `json:\"max_iterations\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tRubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:\"rubric\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tAgent ManagedAgentsSessionAgent `json:\"agent\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tMetadata map[string]string `json:\"metadata\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tTitle string `json:\"title\"`\n\t// This field is from variant [ManagedAgentsStartEvent].\n\tEvent ManagedAgentsStartEventPreviewUnion `json:\"event\"`\n\t// This field is from variant [ManagedAgentsDeltaEvent].\n\tDelta ManagedAgentsDeltaContent `json:\"delta\"`\n\t// This field is from variant [ManagedAgentsDeltaEvent].\n\tEventID string `json:\"event_id\"`\n\tJSON    struct {\n\t\tFileID                   respjson.Field\n\t\tOriginalFilename         respjson.Field\n\t\tSize                     respjson.Field\n\t\tContentType              respjson.Field\n\t\tModelCredits             respjson.Field\n\t\tSandboxRuntimeCredits    respjson.Field\n\t\tTotalCredits             respjson.Field\n\t\tID                       respjson.Field\n\t\tContent                  respjson.Field\n\t\tType                     respjson.Field\n\t\tProcessedAt              respjson.Field\n\t\tSessionThreadID          respjson.Field\n\t\tResult                   respjson.Field\n\t\tToolUseID                respjson.Field\n\t\tDenyMessage              respjson.Field\n\t\tCustomToolUseID          respjson.Field\n\t\tIsError                  respjson.Field\n\t\tInput                    respjson.Field\n\t\tName                     respjson.Field\n\t\tMCPServerName            respjson.Field\n\t\tEvaluatedPermission      respjson.Field\n\t\tMCPToolUseID             respjson.Field\n\t\tFromSessionThreadID      respjson.Field\n\t\tFromAgentName            respjson.Field\n\t\tToSessionThreadID        respjson.Field\n\t\tToAgentName              respjson.Field\n\t\tError                    respjson.Field\n\t\tStopReason               respjson.Field\n\t\tAgentName                respjson.Field\n\t\tIteration                respjson.Field\n\t\tOutcomeID                respjson.Field\n\t\tExplanation              respjson.Field\n\t\tOutcomeEvaluationStartID respjson.Field\n\t\tUsage                    respjson.Field\n\t\tModelRequestStartID      respjson.Field\n\t\tModelUsage               respjson.Field\n\t\tDescription              respjson.Field\n\t\tMaxIterations            respjson.Field\n\t\tRubric                   respjson.Field\n\t\tAgent                    respjson.Field\n\t\tBudget                   respjson.Field\n\t\tMetadata                 respjson.Field\n\t\tTitle                    respjson.Field\n\t\tEvent                    respjson.Field\n\t\tDelta                    respjson.Field\n\t\tEventID                  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionEventsUnion contains all possible properties and values from [ManagedAgentsUserMessageEvent](#ManagedAgentsUserMessageEvent), [ManagedAgentsUserInterruptEvent](#ManagedAgentsUserInterruptEvent), [ManagedAgentsUserToolConfirmationEvent](#ManagedAgentsUserToolConfirmationEvent), [ManagedAgentsUserCustomToolResultEvent](#ManagedAgentsUserCustomToolResultEvent), [ManagedAgentsAgentCustomToolUseEvent](#ManagedAgentsAgentCustomToolUseEvent), [ManagedAgentsAgentMessageEvent](#ManagedAgentsAgentMessageEvent), [ManagedAgentsAgentThinkingEvent](#ManagedAgentsAgentThinkingEvent), [ManagedAgentsAgentMCPToolUseEvent](#ManagedAgentsAgentMCPToolUseEvent), [ManagedAgentsAgentMCPToolResultEvent](#ManagedAgentsAgentMCPToolResultEvent), [ManagedAgentsAgentToolUseEvent](#ManagedAgentsAgentToolUseEvent), [ManagedAgentsAgentToolResultEvent](#ManagedAgentsAgentToolResultEvent), [ManagedAgentsAgentThreadMessageReceivedEvent](#ManagedAgentsAgentThreadMessageReceivedEvent), [ManagedAgentsAgentThreadMessageSentEvent](#ManagedAgentsAgentThreadMessageSentEvent), [ManagedAgentsAgentThreadContextCompactedEvent](#ManagedAgentsAgentThreadContextCompactedEvent), [ManagedAgentsSessionErrorEvent](#ManagedAgentsSessionErrorEvent), [ManagedAgentsSessionStatusRescheduledEvent](#ManagedAgentsSessionStatusRescheduledEvent), [ManagedAgentsSessionStatusRunningEvent](#ManagedAgentsSessionStatusRunningEvent), [ManagedAgentsSessionStatusIdleEvent](#ManagedAgentsSessionStatusIdleEvent), [ManagedAgentsSessionStatusTerminatedEvent](#ManagedAgentsSessionStatusTerminatedEvent), [ManagedAgentsSessionThreadCreatedEvent](#ManagedAgentsSessionThreadCreatedEvent), [ManagedAgentsSpanOutcomeEvaluationStartEvent](#ManagedAgentsSpanOutcomeEvaluationStartEvent), [ManagedAgentsSpanOutcomeEvaluationEndEvent](#ManagedAgentsSpanOutcomeEvaluationEndEvent), [ManagedAgentsSpanModelRequestStartEvent](#ManagedAgentsSpanModelRequestStartEvent), [ManagedAgentsSpanModelRequestEndEvent](#ManagedAgentsSpanModelRequestEndEvent), [ManagedAgentsSpanOutcomeEvaluationOngoingEvent](#ManagedAgentsSpanOutcomeEvaluationOngoingEvent), [ManagedAgentsUserDefineOutcomeEvent](#ManagedAgentsUserDefineOutcomeEvent), [ManagedAgentsSessionDeletedEvent](#ManagedAgentsSessionDeletedEvent), [ManagedAgentsSessionThreadStatusRunningEvent](#ManagedAgentsSessionThreadStatusRunningEvent), [ManagedAgentsSessionThreadStatusIdleEvent](#ManagedAgentsSessionThreadStatusIdleEvent), [ManagedAgentsSessionThreadStatusTerminatedEvent](#ManagedAgentsSessionThreadStatusTerminatedEvent), [ManagedAgentsUserToolResultEvent](#ManagedAgentsUserToolResultEvent), [ManagedAgentsSessionThreadStatusRescheduledEvent](#ManagedAgentsSessionThreadStatusRescheduledEvent), [ManagedAgentsSessionUpdatedEvent](#ManagedAgentsSessionUpdatedEvent), [ManagedAgentsStartEvent](#ManagedAgentsStartEvent), [ManagedAgentsDeltaEvent](#ManagedAgentsDeltaEvent), [ManagedAgentsSystemMessageEvent](#ManagedAgentsSystemMessageEvent), [ManagedAgentsSessionUsageEvent](#ManagedAgentsSessionUsageEvent).\n\nUse the [ManagedAgentsStreamSessionEventsUnion.AsAny](#ManagedAgentsStreamSessionEventsUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentArtifactDelivered() (v ManagedAgentsAgentArtifactDeliveredEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentCustomToolUse() (v ManagedAgentsAgentCustomToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentMCPToolResult() (v ManagedAgentsAgentMCPToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentMCPToolUse() (v ManagedAgentsAgentMCPToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentMessage() (v ManagedAgentsAgentMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentThinking() (v ManagedAgentsAgentThinkingEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentThreadContextCompacted() (v ManagedAgentsAgentThreadContextCompactedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentThreadMessageReceived() (v ManagedAgentsAgentThreadMessageReceivedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentThreadMessageSent() (v ManagedAgentsAgentThreadMessageSentEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentToolResult() (v ManagedAgentsAgentToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAgentToolUse() (v ManagedAgentsAgentToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsAny() anyManagedAgentsStreamSessionEvents\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsStreamSessionEventsUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsUserMessageEvent:\n\tcase qoder.ManagedAgentsUserInterruptEvent:\n\tcase qoder.ManagedAgentsUserToolConfirmationEvent:\n\tcase qoder.ManagedAgentsUserCustomToolResultEvent:\n\tcase qoder.ManagedAgentsAgentCustomToolUseEvent:\n\tcase qoder.ManagedAgentsAgentMessageEvent:\n\tcase qoder.ManagedAgentsAgentThinkingEvent:\n\tcase qoder.ManagedAgentsAgentMCPToolUseEvent:\n\tcase qoder.ManagedAgentsAgentMCPToolResultEvent:\n\tcase qoder.ManagedAgentsAgentToolUseEvent:\n\tcase qoder.ManagedAgentsAgentToolResultEvent:\n\tcase qoder.ManagedAgentsAgentThreadMessageReceivedEvent:\n\tcase qoder.ManagedAgentsAgentThreadMessageSentEvent:\n\tcase qoder.ManagedAgentsAgentThreadContextCompactedEvent:\n\tcase qoder.ManagedAgentsSessionErrorEvent:\n\tcase qoder.ManagedAgentsSessionStatusRescheduledEvent:\n\tcase qoder.ManagedAgentsSessionStatusRunningEvent:\n\tcase qoder.ManagedAgentsSessionStatusIdleEvent:\n\tcase qoder.ManagedAgentsSessionStatusTerminatedEvent:\n\tcase qoder.ManagedAgentsSessionThreadCreatedEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationStartEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationEndEvent:\n\tcase qoder.ManagedAgentsSpanModelRequestStartEvent:\n\tcase qoder.ManagedAgentsSpanModelRequestEndEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationOngoingEvent:\n\tcase qoder.ManagedAgentsUserDefineOutcomeEvent:\n\tcase qoder.ManagedAgentsSessionDeletedEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusRunningEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusIdleEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusTerminatedEvent:\n\tcase qoder.ManagedAgentsUserToolResultEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusRescheduledEvent:\n\tcase qoder.ManagedAgentsSessionUpdatedEvent:\n\tcase qoder.ManagedAgentsStartEvent:\n\tcase qoder.ManagedAgentsDeltaEvent:\n\tcase qoder.ManagedAgentsSystemMessageEvent:\n\tcase qoder.ManagedAgentsSessionUsageEvent:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsEventDelta() (v ManagedAgentsDeltaEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsEventStart() (v ManagedAgentsStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionDeleted() (v ManagedAgentsSessionDeletedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionError() (v ManagedAgentsSessionErrorEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionStatusIdle() (v ManagedAgentsSessionStatusIdleEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionStatusRescheduled() (v ManagedAgentsSessionStatusRescheduledEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionStatusRunning() (v ManagedAgentsSessionStatusRunningEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionStatusTerminated() (v ManagedAgentsSessionStatusTerminatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionThreadCreated() (v ManagedAgentsSessionThreadCreatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusIdle() (v ManagedAgentsSessionThreadStatusIdleEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusRescheduled() (v ManagedAgentsSessionThreadStatusRescheduledEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusRunning() (v ManagedAgentsSessionThreadStatusRunningEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionThreadStatusTerminated() (v ManagedAgentsSessionThreadStatusTerminatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionUpdated() (v ManagedAgentsSessionUpdatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSessionUsage() (v ManagedAgentsSessionUsageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSpanModelRequestEnd() (v ManagedAgentsSpanModelRequestEndEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSpanModelRequestStart() (v ManagedAgentsSpanModelRequestStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSpanOutcomeEvaluationEnd() (v ManagedAgentsSpanOutcomeEvaluationEndEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSpanOutcomeEvaluationOngoing() (v ManagedAgentsSpanOutcomeEvaluationOngoingEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSpanOutcomeEvaluationStart() (v ManagedAgentsSpanOutcomeEvaluationStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsSystemMessage() (v ManagedAgentsSystemMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsUserCustomToolResult() (v ManagedAgentsUserCustomToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsUserDefineOutcome() (v ManagedAgentsUserDefineOutcomeEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsUserInterrupt() (v ManagedAgentsUserInterruptEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsUserMessage() (v ManagedAgentsUserMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsUserToolConfirmation() (v ManagedAgentsUserToolConfirmationEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) AsUserToolResult() (v ManagedAgentsUserToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionEventsUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsStreamSessionEventsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionEventsUnionContent struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentMessageEventContentArray []ManagedAgentsAgentMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentMCPToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentMCPToolResultEventContentArray []ManagedAgentsAgentMCPToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentToolResultEventContentArray []ManagedAgentsAgentToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsAgentThreadMessageReceivedEventContentArray []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsAgentThreadMessageSentEventContentArray []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsSystemContentBlock] instead of an object.\n\tOfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:\",inline\"`\n\tJSON                                   struct {\n\t\tOfManagedAgentsUserMessageEventContentArray                respjson.Field\n\t\tOfManagedAgentsUserCustomToolResultEventContentArray       respjson.Field\n\t\tOfManagedAgentsAgentMessageEventContentArray               respjson.Field\n\t\tOfManagedAgentsAgentMCPToolResultEventContentArray         respjson.Field\n\t\tOfManagedAgentsAgentToolResultEventContentArray            respjson.Field\n\t\tOfManagedAgentsAgentThreadMessageReceivedEventContentArray respjson.Field\n\t\tOfManagedAgentsAgentThreadMessageSentEventContentArray     respjson.Field\n\t\tOfManagedAgentsUserToolResultEventContentArray             respjson.Field\n\t\tOfManagedAgentsSystemContentBlockArray                     respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionEventsUnionContent is an implicit subunion of [ManagedAgentsStreamSessionEventsUnion](#ManagedAgentsStreamSessionEventsUnion). ManagedAgentsStreamSessionEventsUnionContent provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsStreamSessionEventsUnion](#ManagedAgentsStreamSessionEventsUnion).\n\nIf 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]\n\n```go\nfunc (r *ManagedAgentsStreamSessionEventsUnionContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionEventsUnionStopReason struct {\n\tType string `json:\"type\"`\n\t// This field is from variant\n\t// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],\n\t// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion].\n\tEventIDs []string `json:\"event_ids\"`\n\tJSON     struct {\n\t\tType     respjson.Field\n\t\tEventIDs respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionEventsUnionStopReason is an implicit subunion of [ManagedAgentsStreamSessionEventsUnion](#ManagedAgentsStreamSessionEventsUnion). ManagedAgentsStreamSessionEventsUnionStopReason provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsStreamSessionEventsUnion](#ManagedAgentsStreamSessionEventsUnion).\n\n```go\nfunc (r *ManagedAgentsStreamSessionEventsUnionStopReason) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionEventsUnionUsage struct {\n\tCredits float64 `json:\"credits\"`\n\t// This field is from variant [ManagedAgentsSpanModelUsage].\n\tCacheCreationInputTokens int64 `json:\"cache_creation_input_tokens\"`\n\tCacheReadInputTokens     int64 `json:\"cache_read_input_tokens\"`\n\tInputTokens              int64 `json:\"input_tokens\"`\n\tOutputTokens             int64 `json:\"output_tokens\"`\n\t// This field is from variant [ManagedAgentsSpanModelUsage].\n\tSpeed ManagedAgentsSpanModelUsageSpeed `json:\"speed\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tCacheCreation ManagedAgentsCacheCreationUsage `json:\"cache_creation\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tListCost MonetaryAmount `json:\"list_cost\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tServerToolUse ManagedAgentsServerToolUsage `json:\"server_tool_use\"`\n\tJSON          struct {\n\t\tCredits                  respjson.Field\n\t\tCacheCreationInputTokens respjson.Field\n\t\tCacheReadInputTokens     respjson.Field\n\t\tInputTokens              respjson.Field\n\t\tOutputTokens             respjson.Field\n\t\tSpeed                    respjson.Field\n\t\tActiveSeconds            respjson.Field\n\t\tCacheCreation            respjson.Field\n\t\tListCost                 respjson.Field\n\t\tServerToolUse            respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionEventsUnionUsage is an implicit subunion of [ManagedAgentsStreamSessionEventsUnion](#ManagedAgentsStreamSessionEventsUnion). ManagedAgentsStreamSessionEventsUnionUsage provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsStreamSessionEventsUnion](#ManagedAgentsStreamSessionEventsUnion).\n\n```go\nfunc (r *ManagedAgentsStreamSessionEventsUnionUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionThreadEventsUnion struct {\n\tFileID                string  `json:\"file_id\"`\n\tOriginalFilename      string  `json:\"original_filename\"`\n\tSize                  int64   `json:\"size\"`\n\tContentType           string  `json:\"content_type\"`\n\tModelCredits          float64 `json:\"model_credits\"`\n\tSandboxRuntimeCredits float64 `json:\"sandbox_runtime_credits\"`\n\tTotalCredits          float64 `json:\"total_credits\"`\n\tID                    string  `json:\"id\"`\n\t// This field is a union of [[]ManagedAgentsUserMessageEventContentUnion],\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentMessageEventContentUnion],\n\t// [[]ManagedAgentsAgentMCPToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentToolResultEventContentUnion],\n\t// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion],\n\t// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion],\n\t// [[]ManagedAgentsUserToolResultEventContentUnion],\n\t// [[]ManagedAgentsSystemContentBlock]\n\tContent ManagedAgentsStreamSessionThreadEventsUnionContent `json:\"content\"`\n\t// Any of \"user.message\", \"user.interrupt\", \"user.tool_confirmation\",\n\t// \"user.custom_tool_result\", \"agent.custom_tool_use\", \"agent.message\",\n\t// \"agent.thinking\", \"agent.mcp_tool_use\", \"agent.mcp_tool_result\",\n\t// \"agent.tool_use\", \"agent.tool_result\", \"agent.thread_message_received\",\n\t// \"agent.thread_message_sent\", \"agent.thread_context_compacted\", \"session.error\",\n\t// \"session.status_rescheduled\", \"session.status_running\", \"session.status_idle\",\n\t// \"session.status_terminated\", \"session.thread_created\",\n\t// \"span.outcome_evaluation_start\", \"span.outcome_evaluation_end\",\n\t// \"span.model_request_start\", \"span.model_request_end\",\n\t// \"span.outcome_evaluation_ongoing\", \"user.define_outcome\", \"session.deleted\",\n\t// \"session.thread_status_running\", \"session.thread_status_idle\",\n\t// \"session.thread_status_terminated\", \"user.tool_result\",\n\t// \"session.thread_status_rescheduled\", \"session.updated\", \"event_start\",\n\t// \"event_delta\", \"system.message\", \"session.usage\".\n\tType            string    `json:\"type\"`\n\tProcessedAt     time.Time `json:\"processed_at\"`\n\tSessionThreadID string    `json:\"session_thread_id\"`\n\tResult          string    `json:\"result\"`\n\tToolUseID       string    `json:\"tool_use_id\"`\n\t// This field is from variant [ManagedAgentsUserToolConfirmationEvent].\n\tDenyMessage string `json:\"deny_message\"`\n\t// This field is from variant [ManagedAgentsUserCustomToolResultEvent].\n\tCustomToolUseID string `json:\"custom_tool_use_id\"`\n\tIsError         bool   `json:\"is_error\"`\n\tInput           any    `json:\"input\"`\n\tName            string `json:\"name\"`\n\t// This field is from variant [ManagedAgentsAgentMCPToolUseEvent].\n\tMCPServerName       string `json:\"mcp_server_name\"`\n\tEvaluatedPermission string `json:\"evaluated_permission\"`\n\t// This field is from variant [ManagedAgentsAgentMCPToolResultEvent].\n\tMCPToolUseID string `json:\"mcp_tool_use_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].\n\tFromSessionThreadID string `json:\"from_session_thread_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageReceivedEvent].\n\tFromAgentName string `json:\"from_agent_name\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].\n\tToSessionThreadID string `json:\"to_session_thread_id\"`\n\t// This field is from variant [ManagedAgentsAgentThreadMessageSentEvent].\n\tToAgentName string `json:\"to_agent_name\"`\n\t// This field is from variant [ManagedAgentsSessionErrorEvent].\n\tError ManagedAgentsSessionErrorEventErrorUnion `json:\"error\"`\n\t// This field is a union of\n\t// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],\n\t// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion]\n\tStopReason ManagedAgentsStreamSessionThreadEventsUnionStopReason `json:\"stop_reason\"`\n\tAgentName  string                                                `json:\"agent_name\"`\n\tIteration  int64                                                 `json:\"iteration\"`\n\tOutcomeID  string                                                `json:\"outcome_id\"`\n\t// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].\n\tExplanation string `json:\"explanation\"`\n\t// This field is from variant [ManagedAgentsSpanOutcomeEvaluationEndEvent].\n\tOutcomeEvaluationStartID string `json:\"outcome_evaluation_start_id\"`\n\t// This field is a union of [ManagedAgentsSpanModelUsage],\n\t// [ManagedAgentsSessionUsageSnapshot]\n\tUsage ManagedAgentsStreamSessionThreadEventsUnionUsage `json:\"usage\"`\n\t// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].\n\tModelRequestStartID string `json:\"model_request_start_id\"`\n\t// This field is from variant [ManagedAgentsSpanModelRequestEndEvent].\n\tModelUsage ManagedAgentsSpanModelUsage `json:\"model_usage\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tMaxIterations int64 `json:\"max_iterations\"`\n\t// This field is from variant [ManagedAgentsUserDefineOutcomeEvent].\n\tRubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:\"rubric\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tAgent ManagedAgentsSessionAgent `json:\"agent\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tBudget ManagedAgentsBudgetLimit `json:\"budget\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tMetadata map[string]string `json:\"metadata\"`\n\t// This field is from variant [ManagedAgentsSessionUpdatedEvent].\n\tTitle string `json:\"title\"`\n\t// This field is from variant [ManagedAgentsStartEvent].\n\tEvent ManagedAgentsStartEventPreviewUnion `json:\"event\"`\n\t// This field is from variant [ManagedAgentsDeltaEvent].\n\tDelta ManagedAgentsDeltaContent `json:\"delta\"`\n\t// This field is from variant [ManagedAgentsDeltaEvent].\n\tEventID string `json:\"event_id\"`\n\tJSON    struct {\n\t\tFileID                   respjson.Field\n\t\tOriginalFilename         respjson.Field\n\t\tSize                     respjson.Field\n\t\tContentType              respjson.Field\n\t\tModelCredits             respjson.Field\n\t\tSandboxRuntimeCredits    respjson.Field\n\t\tTotalCredits             respjson.Field\n\t\tID                       respjson.Field\n\t\tContent                  respjson.Field\n\t\tType                     respjson.Field\n\t\tProcessedAt              respjson.Field\n\t\tSessionThreadID          respjson.Field\n\t\tResult                   respjson.Field\n\t\tToolUseID                respjson.Field\n\t\tDenyMessage              respjson.Field\n\t\tCustomToolUseID          respjson.Field\n\t\tIsError                  respjson.Field\n\t\tInput                    respjson.Field\n\t\tName                     respjson.Field\n\t\tMCPServerName            respjson.Field\n\t\tEvaluatedPermission      respjson.Field\n\t\tMCPToolUseID             respjson.Field\n\t\tFromSessionThreadID      respjson.Field\n\t\tFromAgentName            respjson.Field\n\t\tToSessionThreadID        respjson.Field\n\t\tToAgentName              respjson.Field\n\t\tError                    respjson.Field\n\t\tStopReason               respjson.Field\n\t\tAgentName                respjson.Field\n\t\tIteration                respjson.Field\n\t\tOutcomeID                respjson.Field\n\t\tExplanation              respjson.Field\n\t\tOutcomeEvaluationStartID respjson.Field\n\t\tUsage                    respjson.Field\n\t\tModelRequestStartID      respjson.Field\n\t\tModelUsage               respjson.Field\n\t\tDescription              respjson.Field\n\t\tMaxIterations            respjson.Field\n\t\tRubric                   respjson.Field\n\t\tAgent                    respjson.Field\n\t\tBudget                   respjson.Field\n\t\tMetadata                 respjson.Field\n\t\tTitle                    respjson.Field\n\t\tEvent                    respjson.Field\n\t\tDelta                    respjson.Field\n\t\tEventID                  respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionThreadEventsUnion contains all possible properties and values from [ManagedAgentsUserMessageEvent](#ManagedAgentsUserMessageEvent), [ManagedAgentsUserInterruptEvent](#ManagedAgentsUserInterruptEvent), [ManagedAgentsUserToolConfirmationEvent](#ManagedAgentsUserToolConfirmationEvent), [ManagedAgentsUserCustomToolResultEvent](#ManagedAgentsUserCustomToolResultEvent), [ManagedAgentsAgentCustomToolUseEvent](#ManagedAgentsAgentCustomToolUseEvent), [ManagedAgentsAgentMessageEvent](#ManagedAgentsAgentMessageEvent), [ManagedAgentsAgentThinkingEvent](#ManagedAgentsAgentThinkingEvent), [ManagedAgentsAgentMCPToolUseEvent](#ManagedAgentsAgentMCPToolUseEvent), [ManagedAgentsAgentMCPToolResultEvent](#ManagedAgentsAgentMCPToolResultEvent), [ManagedAgentsAgentToolUseEvent](#ManagedAgentsAgentToolUseEvent), [ManagedAgentsAgentToolResultEvent](#ManagedAgentsAgentToolResultEvent), [ManagedAgentsAgentThreadMessageReceivedEvent](#ManagedAgentsAgentThreadMessageReceivedEvent), [ManagedAgentsAgentThreadMessageSentEvent](#ManagedAgentsAgentThreadMessageSentEvent), [ManagedAgentsAgentThreadContextCompactedEvent](#ManagedAgentsAgentThreadContextCompactedEvent), [ManagedAgentsSessionErrorEvent](#ManagedAgentsSessionErrorEvent), [ManagedAgentsSessionStatusRescheduledEvent](#ManagedAgentsSessionStatusRescheduledEvent), [ManagedAgentsSessionStatusRunningEvent](#ManagedAgentsSessionStatusRunningEvent), [ManagedAgentsSessionStatusIdleEvent](#ManagedAgentsSessionStatusIdleEvent), [ManagedAgentsSessionStatusTerminatedEvent](#ManagedAgentsSessionStatusTerminatedEvent), [ManagedAgentsSessionThreadCreatedEvent](#ManagedAgentsSessionThreadCreatedEvent), [ManagedAgentsSpanOutcomeEvaluationStartEvent](#ManagedAgentsSpanOutcomeEvaluationStartEvent), [ManagedAgentsSpanOutcomeEvaluationEndEvent](#ManagedAgentsSpanOutcomeEvaluationEndEvent), [ManagedAgentsSpanModelRequestStartEvent](#ManagedAgentsSpanModelRequestStartEvent), [ManagedAgentsSpanModelRequestEndEvent](#ManagedAgentsSpanModelRequestEndEvent), [ManagedAgentsSpanOutcomeEvaluationOngoingEvent](#ManagedAgentsSpanOutcomeEvaluationOngoingEvent), [ManagedAgentsUserDefineOutcomeEvent](#ManagedAgentsUserDefineOutcomeEvent), [ManagedAgentsSessionDeletedEvent](#ManagedAgentsSessionDeletedEvent), [ManagedAgentsSessionThreadStatusRunningEvent](#ManagedAgentsSessionThreadStatusRunningEvent), [ManagedAgentsSessionThreadStatusIdleEvent](#ManagedAgentsSessionThreadStatusIdleEvent), [ManagedAgentsSessionThreadStatusTerminatedEvent](#ManagedAgentsSessionThreadStatusTerminatedEvent), [ManagedAgentsUserToolResultEvent](#ManagedAgentsUserToolResultEvent), [ManagedAgentsSessionThreadStatusRescheduledEvent](#ManagedAgentsSessionThreadStatusRescheduledEvent), [ManagedAgentsSessionUpdatedEvent](#ManagedAgentsSessionUpdatedEvent), [ManagedAgentsStartEvent](#ManagedAgentsStartEvent), [ManagedAgentsDeltaEvent](#ManagedAgentsDeltaEvent), [ManagedAgentsSystemMessageEvent](#ManagedAgentsSystemMessageEvent), [ManagedAgentsSessionUsageEvent](#ManagedAgentsSessionUsageEvent).\n\nUse the [ManagedAgentsStreamSessionThreadEventsUnion.AsAny](#ManagedAgentsStreamSessionThreadEventsUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentArtifactDelivered() (v ManagedAgentsAgentArtifactDeliveredEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentCustomToolUse() (v ManagedAgentsAgentCustomToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentMCPToolResult() (v ManagedAgentsAgentMCPToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentMCPToolUse() (v ManagedAgentsAgentMCPToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentMessage() (v ManagedAgentsAgentMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThinking() (v ManagedAgentsAgentThinkingEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThreadContextCompacted() (v ManagedAgentsAgentThreadContextCompactedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThreadMessageReceived() (v ManagedAgentsAgentThreadMessageReceivedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentThreadMessageSent() (v ManagedAgentsAgentThreadMessageSentEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentToolResult() (v ManagedAgentsAgentToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAgentToolUse() (v ManagedAgentsAgentToolUseEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsAny() anyManagedAgentsStreamSessionThreadEvents\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsStreamSessionThreadEventsUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsUserMessageEvent:\n\tcase qoder.ManagedAgentsUserInterruptEvent:\n\tcase qoder.ManagedAgentsUserToolConfirmationEvent:\n\tcase qoder.ManagedAgentsUserCustomToolResultEvent:\n\tcase qoder.ManagedAgentsAgentCustomToolUseEvent:\n\tcase qoder.ManagedAgentsAgentMessageEvent:\n\tcase qoder.ManagedAgentsAgentThinkingEvent:\n\tcase qoder.ManagedAgentsAgentMCPToolUseEvent:\n\tcase qoder.ManagedAgentsAgentMCPToolResultEvent:\n\tcase qoder.ManagedAgentsAgentToolUseEvent:\n\tcase qoder.ManagedAgentsAgentToolResultEvent:\n\tcase qoder.ManagedAgentsAgentThreadMessageReceivedEvent:\n\tcase qoder.ManagedAgentsAgentThreadMessageSentEvent:\n\tcase qoder.ManagedAgentsAgentThreadContextCompactedEvent:\n\tcase qoder.ManagedAgentsSessionErrorEvent:\n\tcase qoder.ManagedAgentsSessionStatusRescheduledEvent:\n\tcase qoder.ManagedAgentsSessionStatusRunningEvent:\n\tcase qoder.ManagedAgentsSessionStatusIdleEvent:\n\tcase qoder.ManagedAgentsSessionStatusTerminatedEvent:\n\tcase qoder.ManagedAgentsSessionThreadCreatedEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationStartEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationEndEvent:\n\tcase qoder.ManagedAgentsSpanModelRequestStartEvent:\n\tcase qoder.ManagedAgentsSpanModelRequestEndEvent:\n\tcase qoder.ManagedAgentsSpanOutcomeEvaluationOngoingEvent:\n\tcase qoder.ManagedAgentsUserDefineOutcomeEvent:\n\tcase qoder.ManagedAgentsSessionDeletedEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusRunningEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusIdleEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusTerminatedEvent:\n\tcase qoder.ManagedAgentsUserToolResultEvent:\n\tcase qoder.ManagedAgentsSessionThreadStatusRescheduledEvent:\n\tcase qoder.ManagedAgentsSessionUpdatedEvent:\n\tcase qoder.ManagedAgentsStartEvent:\n\tcase qoder.ManagedAgentsDeltaEvent:\n\tcase qoder.ManagedAgentsSystemMessageEvent:\n\tcase qoder.ManagedAgentsSessionUsageEvent:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsEventDelta() (v ManagedAgentsDeltaEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsEventStart() (v ManagedAgentsStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionDeleted() (v ManagedAgentsSessionDeletedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionError() (v ManagedAgentsSessionErrorEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusIdle() (v ManagedAgentsSessionStatusIdleEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusRescheduled() (v ManagedAgentsSessionStatusRescheduledEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusRunning() (v ManagedAgentsSessionStatusRunningEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionStatusTerminated() (v ManagedAgentsSessionStatusTerminatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadCreated() (v ManagedAgentsSessionThreadCreatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusIdle() (v ManagedAgentsSessionThreadStatusIdleEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusRescheduled() (v ManagedAgentsSessionThreadStatusRescheduledEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusRunning() (v ManagedAgentsSessionThreadStatusRunningEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionThreadStatusTerminated() (v ManagedAgentsSessionThreadStatusTerminatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionUpdated() (v ManagedAgentsSessionUpdatedEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSessionUsage() (v ManagedAgentsSessionUsageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSpanModelRequestEnd() (v ManagedAgentsSpanModelRequestEndEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSpanModelRequestStart() (v ManagedAgentsSpanModelRequestStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSpanOutcomeEvaluationEnd() (v ManagedAgentsSpanOutcomeEvaluationEndEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSpanOutcomeEvaluationOngoing() (v ManagedAgentsSpanOutcomeEvaluationOngoingEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSpanOutcomeEvaluationStart() (v ManagedAgentsSpanOutcomeEvaluationStartEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsSystemMessage() (v ManagedAgentsSystemMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsUserCustomToolResult() (v ManagedAgentsUserCustomToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsUserDefineOutcome() (v ManagedAgentsUserDefineOutcomeEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsUserInterrupt() (v ManagedAgentsUserInterruptEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsUserMessage() (v ManagedAgentsUserMessageEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsUserToolConfirmation() (v ManagedAgentsUserToolConfirmationEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) AsUserToolResult() (v ManagedAgentsUserToolResultEvent)\n```\n\n```go\nfunc (u ManagedAgentsStreamSessionThreadEventsUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsStreamSessionThreadEventsUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionThreadEventsUnionContent struct {\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsUserMessageEventContentArray []ManagedAgentsUserMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserCustomToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserCustomToolResultEventContentArray []ManagedAgentsUserCustomToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentMessageEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentMessageEventContentArray []ManagedAgentsAgentMessageEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentMCPToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentMCPToolResultEventContentArray []ManagedAgentsAgentMCPToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsAgentToolResultEventContentArray []ManagedAgentsAgentToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentThreadMessageReceivedEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsAgentThreadMessageReceivedEventContentArray []ManagedAgentsAgentThreadMessageReceivedEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsAgentThreadMessageSentEventContentUnion] instead of an\n\t// object.\n\tOfManagedAgentsAgentThreadMessageSentEventContentArray []ManagedAgentsAgentThreadMessageSentEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsUserToolResultEventContentUnion] instead of an object.\n\tOfManagedAgentsUserToolResultEventContentArray []ManagedAgentsUserToolResultEventContentUnion `json:\",inline\"`\n\t// This field will be present if the value is a\n\t// [[]ManagedAgentsSystemContentBlock] instead of an object.\n\tOfManagedAgentsSystemContentBlockArray []ManagedAgentsSystemContentBlock `json:\",inline\"`\n\tJSON                                   struct {\n\t\tOfManagedAgentsUserMessageEventContentArray                respjson.Field\n\t\tOfManagedAgentsUserCustomToolResultEventContentArray       respjson.Field\n\t\tOfManagedAgentsAgentMessageEventContentArray               respjson.Field\n\t\tOfManagedAgentsAgentMCPToolResultEventContentArray         respjson.Field\n\t\tOfManagedAgentsAgentToolResultEventContentArray            respjson.Field\n\t\tOfManagedAgentsAgentThreadMessageReceivedEventContentArray respjson.Field\n\t\tOfManagedAgentsAgentThreadMessageSentEventContentArray     respjson.Field\n\t\tOfManagedAgentsUserToolResultEventContentArray             respjson.Field\n\t\tOfManagedAgentsSystemContentBlockArray                     respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionThreadEventsUnionContent is an implicit subunion of [ManagedAgentsStreamSessionThreadEventsUnion](#ManagedAgentsStreamSessionThreadEventsUnion). ManagedAgentsStreamSessionThreadEventsUnionContent provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsStreamSessionThreadEventsUnion](#ManagedAgentsStreamSessionThreadEventsUnion).\n\nIf 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]\n\n```go\nfunc (r *ManagedAgentsStreamSessionThreadEventsUnionContent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionThreadEventsUnionStopReason struct {\n\tType string `json:\"type\"`\n\t// This field is from variant\n\t// [ManagedAgentsSessionStatusIdleEventStopReasonUnion],\n\t// [ManagedAgentsSessionThreadStatusIdleEventStopReasonUnion].\n\tEventIDs []string `json:\"event_ids\"`\n\tJSON     struct {\n\t\tType     respjson.Field\n\t\tEventIDs respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionThreadEventsUnionStopReason is an implicit subunion of [ManagedAgentsStreamSessionThreadEventsUnion](#ManagedAgentsStreamSessionThreadEventsUnion). ManagedAgentsStreamSessionThreadEventsUnionStopReason provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsStreamSessionThreadEventsUnion](#ManagedAgentsStreamSessionThreadEventsUnion).\n\n```go\nfunc (r *ManagedAgentsStreamSessionThreadEventsUnionStopReason) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsStreamSessionThreadEventsUnionUsage struct {\n\tCredits float64 `json:\"credits\"`\n\t// This field is from variant [ManagedAgentsSpanModelUsage].\n\tCacheCreationInputTokens int64 `json:\"cache_creation_input_tokens\"`\n\tCacheReadInputTokens     int64 `json:\"cache_read_input_tokens\"`\n\tInputTokens              int64 `json:\"input_tokens\"`\n\tOutputTokens             int64 `json:\"output_tokens\"`\n\t// This field is from variant [ManagedAgentsSpanModelUsage].\n\tSpeed ManagedAgentsSpanModelUsageSpeed `json:\"speed\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tActiveSeconds float64 `json:\"active_seconds\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tCacheCreation ManagedAgentsCacheCreationUsage `json:\"cache_creation\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tListCost MonetaryAmount `json:\"list_cost\"`\n\t// This field is from variant [ManagedAgentsSessionUsageSnapshot].\n\tServerToolUse ManagedAgentsServerToolUsage `json:\"server_tool_use\"`\n\tJSON          struct {\n\t\tCredits                  respjson.Field\n\t\tCacheCreationInputTokens respjson.Field\n\t\tCacheReadInputTokens     respjson.Field\n\t\tInputTokens              respjson.Field\n\t\tOutputTokens             respjson.Field\n\t\tSpeed                    respjson.Field\n\t\tActiveSeconds            respjson.Field\n\t\tCacheCreation            respjson.Field\n\t\tListCost                 respjson.Field\n\t\tServerToolUse            respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsStreamSessionThreadEventsUnionUsage is an implicit subunion of [ManagedAgentsStreamSessionThreadEventsUnion](#ManagedAgentsStreamSessionThreadEventsUnion). ManagedAgentsStreamSessionThreadEventsUnionUsage provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsStreamSessionThreadEventsUnion](#ManagedAgentsStreamSessionThreadEventsUnion).\n\n```go\nfunc (r *ManagedAgentsStreamSessionThreadEventsUnionUsage) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSystemContentBlock struct {\n\t// The text content.\n\tText string `json:\"text\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsSystemContentBlockType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tText        respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nRegular text content.\n\n```go\nfunc (r ManagedAgentsSystemContentBlock) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsSystemContentBlock) ToParam() ManagedAgentsSystemContentBlockParam\n```\nToParam converts this ManagedAgentsSystemContentBlock to a ManagedAgentsSystemContentBlockParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsSystemContentBlock) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSystemContentBlockParam struct {\n\t// The text content.\n\tText string `json:\"text\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsSystemContentBlockType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nRegular text content.\n\nThe properties Text, Type are required.\n\n```go\nfunc (r ManagedAgentsSystemContentBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsSystemContentBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSystemContentBlockType string\n```\n\n```go\nconst (\n\tManagedAgentsSystemContentBlockTypeText ManagedAgentsSystemContentBlockType = \"text\"\n)\n```\n\n```go\ntype ManagedAgentsSystemMessageEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// System content blocks. Text-only.\n\tContent []ManagedAgentsSystemContentBlock `json:\"content\" api:\"required\"`\n\t// Any of \"system.message\".\n\tType ManagedAgentsSystemMessageEventType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"nullable\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tContent     respjson.Field\n\t\tType        respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA mid-conversation system message event. Carries system-role content that is appended to the session as a \\`role: \"system\"\\` turn.\n\n```go\nfunc (r ManagedAgentsSystemMessageEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsSystemMessageEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSystemMessageEventParams struct {\n\t// System content blocks to append. Text-only.\n\tContent []ManagedAgentsSystemContentBlockParam `json:\"content,omitzero\" api:\"required\"`\n\t// Any of \"system.message\".\n\tType ManagedAgentsSystemMessageEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nPrivileged 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.\n\nThe properties Content, Type are required.\n\n```go\nfunc (r ManagedAgentsSystemMessageEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsSystemMessageEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsSystemMessageEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsSystemMessageEventParamsTypeSystemMessage ManagedAgentsSystemMessageEventParamsType = \"system.message\"\n)\n```\n\n```go\ntype ManagedAgentsSystemMessageEventType string\n```\n\n```go\nconst (\n\tManagedAgentsSystemMessageEventTypeSystemMessage ManagedAgentsSystemMessageEventType = \"system.message\"\n)\n```\n\n```go\ntype ManagedAgentsTextBlock struct {\n\t// The text content.\n\tText string `json:\"text\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsTextBlockType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tText        respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nRegular text content.\n\n```go\nfunc (r ManagedAgentsTextBlock) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsTextBlock) ToParam() ManagedAgentsTextBlockParam\n```\nToParam converts this ManagedAgentsTextBlock to a ManagedAgentsTextBlockParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsTextBlock) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTextBlockParam struct {\n\t// The text content.\n\tText string `json:\"text\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsTextBlockType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nRegular text content.\n\nThe properties Text, Type are required.\n\n```go\nfunc (r ManagedAgentsTextBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTextBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTextBlockType string\n```\n\n```go\nconst (\n\tManagedAgentsTextBlockTypeText ManagedAgentsTextBlockType = \"text\"\n)\n```\n\n```go\ntype ManagedAgentsTextRubric struct {\n\t// Rubric content. Plain text or markdown — the grader treats it as freeform text.\n\tContent string `json:\"content\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsTextRubricType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tContent     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nRubric content provided inline as text.\n\n```go\nfunc (r ManagedAgentsTextRubric) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsTextRubric) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTextRubricParams struct {\n\t// Rubric content. Plain text or markdown — the grader treats it as freeform text.\n\t// Maximum 262144 characters.\n\tContent string `json:\"content\" api:\"required\"`\n\t// Any of \"text\".\n\tType ManagedAgentsTextRubricParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nRubric content provided inline as text.\n\nThe properties Content, Type are required.\n\n```go\nfunc (r ManagedAgentsTextRubricParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTextRubricParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTextRubricParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsTextRubricParamsTypeText ManagedAgentsTextRubricParamsType = \"text\"\n)\n```\n\n```go\ntype ManagedAgentsTextRubricType string\n```\n\n```go\nconst (\n\tManagedAgentsTextRubricTypeText ManagedAgentsTextRubricType = \"text\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthBasicParam struct {\n\t// OAuth client secret.\n\tClientSecret string `json:\"client_secret\" api:\"required\"`\n\t// Any of \"client_secret_basic\".\n\tType ManagedAgentsTokenEndpointAuthBasicParamType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nToken endpoint uses HTTP Basic authentication with client credentials.\n\nThe properties ClientSecret, Type are required.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthBasicParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthBasicParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthBasicParamType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthBasicParamTypeClientSecretBasic ManagedAgentsTokenEndpointAuthBasicParamType = \"client_secret_basic\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthBasicResponse struct {\n\t// Any of \"client_secret_basic\".\n\tType ManagedAgentsTokenEndpointAuthBasicResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nToken endpoint uses HTTP Basic authentication with client credentials.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthBasicResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthBasicResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthBasicResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthBasicResponseTypeClientSecretBasic ManagedAgentsTokenEndpointAuthBasicResponseType = \"client_secret_basic\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthBasicUpdateParam struct {\n\t// Any of \"client_secret_basic\".\n\tType ManagedAgentsTokenEndpointAuthBasicUpdateParamType `json:\"type,omitzero\" api:\"required\"`\n\t// Updated OAuth client secret.\n\tClientSecret param.Opt[string] `json:\"client_secret,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nUpdated HTTP Basic authentication parameters for the token endpoint.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthBasicUpdateParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthBasicUpdateParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthBasicUpdateParamType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthBasicUpdateParamTypeClientSecretBasic ManagedAgentsTokenEndpointAuthBasicUpdateParamType = \"client_secret_basic\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthNoneParam struct {\n\t// Any of \"none\".\n\tType ManagedAgentsTokenEndpointAuthNoneParamType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nToken endpoint requires no client authentication.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthNoneParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthNoneParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthNoneParamType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthNoneParamTypeNone ManagedAgentsTokenEndpointAuthNoneParamType = \"none\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthNoneResponse struct {\n\t// Any of \"none\".\n\tType ManagedAgentsTokenEndpointAuthNoneResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nToken endpoint requires no client authentication.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthNoneResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthNoneResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthNoneResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthNoneResponseTypeNone ManagedAgentsTokenEndpointAuthNoneResponseType = \"none\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthPostParam struct {\n\t// OAuth client secret.\n\tClientSecret string `json:\"client_secret\" api:\"required\"`\n\t// Any of \"client_secret_post\".\n\tType ManagedAgentsTokenEndpointAuthPostParamType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nToken endpoint uses POST body authentication with client credentials.\n\nThe properties ClientSecret, Type are required.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthPostParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthPostParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthPostParamType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthPostParamTypeClientSecretPost ManagedAgentsTokenEndpointAuthPostParamType = \"client_secret_post\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthPostResponse struct {\n\t// Any of \"client_secret_post\".\n\tType ManagedAgentsTokenEndpointAuthPostResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nToken endpoint uses POST body authentication with client credentials.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthPostResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthPostResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthPostResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthPostResponseTypeClientSecretPost ManagedAgentsTokenEndpointAuthPostResponseType = \"client_secret_post\"\n)\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthPostUpdateParam struct {\n\t// Any of \"client_secret_post\".\n\tType ManagedAgentsTokenEndpointAuthPostUpdateParamType `json:\"type,omitzero\" api:\"required\"`\n\t// Updated OAuth client secret.\n\tClientSecret param.Opt[string] `json:\"client_secret,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nUpdated POST body authentication parameters for the token endpoint.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsTokenEndpointAuthPostUpdateParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsTokenEndpointAuthPostUpdateParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTokenEndpointAuthPostUpdateParamType string\n```\n\n```go\nconst (\n\tManagedAgentsTokenEndpointAuthPostUpdateParamTypeClientSecretPost ManagedAgentsTokenEndpointAuthPostUpdateParamType = \"client_secret_post\"\n)\n```\n\n```go\ntype ManagedAgentsTriggerContextUnion struct {\n\t// This field is from variant [ManagedAgentsScheduleTriggerContext].\n\tScheduledAt time.Time `json:\"scheduled_at\"`\n\t// Any of \"schedule\", \"manual\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tScheduledAt respjson.Field\n\t\tType        respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsTriggerContextUnion contains all possible properties and values from [ManagedAgentsScheduleTriggerContext](#ManagedAgentsScheduleTriggerContext), [ManagedAgentsManualTriggerContext](#ManagedAgentsManualTriggerContext).\n\nUse the [ManagedAgentsTriggerContextUnion.AsAny](#ManagedAgentsTriggerContextUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsTriggerContextUnion) AsAny() anyManagedAgentsTriggerContext\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsTriggerContextUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsScheduleTriggerContext:\n\tcase qoder.ManagedAgentsManualTriggerContext:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsTriggerContextUnion) AsManual() (v ManagedAgentsManualTriggerContext)\n```\n\n```go\nfunc (u ManagedAgentsTriggerContextUnion) AsSchedule() (v ManagedAgentsScheduleTriggerContext)\n```\n\n```go\nfunc (u ManagedAgentsTriggerContextUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsTriggerContextUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsTriggerType string\n```\nWhat triggered a deployment run.\n\n```go\nconst (\n\tManagedAgentsTriggerTypeSchedule ManagedAgentsTriggerType = \"schedule\"\n\tManagedAgentsTriggerTypeManual   ManagedAgentsTriggerType = \"manual\"\n)\n```\n\n```go\ntype ManagedAgentsURLDocumentSource struct {\n\t// Any of \"url\".\n\tType ManagedAgentsURLDocumentSourceType `json:\"type\" api:\"required\"`\n\t// URL of the document to fetch.\n\tURL string `json:\"url\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tURL         respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nDocument referenced by URL.\n\n```go\nfunc (r ManagedAgentsURLDocumentSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsURLDocumentSource) ToParam() ManagedAgentsURLDocumentSourceParam\n```\nToParam converts this ManagedAgentsURLDocumentSource to a ManagedAgentsURLDocumentSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsURLDocumentSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsURLDocumentSourceParam struct {\n\t// Any of \"url\".\n\tType ManagedAgentsURLDocumentSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// URL of the document to fetch.\n\tURL string `json:\"url\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nDocument referenced by URL.\n\nThe properties Type, URL are required.\n\n```go\nfunc (r ManagedAgentsURLDocumentSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsURLDocumentSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsURLDocumentSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsURLDocumentSourceTypeURL ManagedAgentsURLDocumentSourceType = \"url\"\n)\n```\n\n```go\ntype ManagedAgentsURLImageSource struct {\n\t// Any of \"url\".\n\tType ManagedAgentsURLImageSourceType `json:\"type\" api:\"required\"`\n\t// URL of the image to fetch.\n\tURL string `json:\"url\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tURL         respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nImage referenced by URL.\n\n```go\nfunc (r ManagedAgentsURLImageSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsURLImageSource) ToParam() ManagedAgentsURLImageSourceParam\n```\nToParam converts this ManagedAgentsURLImageSource to a ManagedAgentsURLImageSourceParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsURLImageSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsURLImageSourceParam struct {\n\t// Any of \"url\".\n\tType ManagedAgentsURLImageSourceType `json:\"type,omitzero\" api:\"required\"`\n\t// URL of the image to fetch.\n\tURL string `json:\"url\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nImage referenced by URL.\n\nThe properties Type, URL are required.\n\n```go\nfunc (r ManagedAgentsURLImageSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsURLImageSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsURLImageSourceType string\n```\n\n```go\nconst (\n\tManagedAgentsURLImageSourceTypeURL ManagedAgentsURLImageSourceType = \"url\"\n)\n```\n\n```go\ntype ManagedAgentsURLMCPServerParams struct {\n\t// Unique name for this server, referenced by mcp_toolset configurations. 1-255\n\t// characters.\n\tName string `json:\"name\" api:\"required\"`\n\t// Any of \"url\".\n\tType ManagedAgentsURLMCPServerParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Endpoint URL for the MCP server.\n\tURL string `json:\"url\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nURL-based MCP server connection.\n\nThe properties Name, Type, URL are required.\n\n```go\nfunc (r ManagedAgentsURLMCPServerParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsURLMCPServerParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsURLMCPServerParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsURLMCPServerParamsTypeURL ManagedAgentsURLMCPServerParamsType = \"url\"\n)\n```\n\n```go\ntype ManagedAgentsUnknownDeploymentPausedReasonError struct {\n\t// Any of \"unknown_error\".\n\tType ManagedAgentsUnknownDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn unrecognized error auto-paused the deployment. A fallback variant; matches a run whose \\`error.type\\` is \\`unknown\\_error\\`.\n\n```go\nfunc (r ManagedAgentsUnknownDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUnknownDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUnknownDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsUnknownDeploymentPausedReasonErrorTypeUnknownError ManagedAgentsUnknownDeploymentPausedReasonErrorType = \"unknown_error\"\n)\n```\n\n```go\ntype ManagedAgentsUnknownError struct {\n\t// Diagnostic only; use retry_status to determine retry behavior.\n\tQoderErrorCode string `json:\"qoder_error_code\"`\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// What the client should do next in response to this error.\n\tRetryStatus ManagedAgentsUnknownErrorRetryStatusUnion `json:\"retry_status\" api:\"required\"`\n\t// Any of \"unknown_error\".\n\tType ManagedAgentsUnknownErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tQoderErrorCode respjson.Field\n\t\tMessage        respjson.Field\n\t\tRetryStatus    respjson.Field\n\t\tType           respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn 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.\n\n```go\nfunc (r ManagedAgentsUnknownError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUnknownError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUnknownErrorRetryStatusUnion struct {\n\t// Any of \"retrying\", \"exhausted\", \"terminal\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUnknownErrorRetryStatusUnion contains all possible properties and values from [ManagedAgentsRetryStatusRetrying](#ManagedAgentsRetryStatusRetrying), [ManagedAgentsRetryStatusExhausted](#ManagedAgentsRetryStatusExhausted), [ManagedAgentsRetryStatusTerminal](#ManagedAgentsRetryStatusTerminal).\n\nUse the [ManagedAgentsUnknownErrorRetryStatusUnion.AsAny](#ManagedAgentsUnknownErrorRetryStatusUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsUnknownErrorRetryStatusUnion) AsAny() anyManagedAgentsUnknownErrorRetryStatus\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsUnknownErrorRetryStatusUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsRetryStatusRetrying:\n\tcase qoder.ManagedAgentsRetryStatusExhausted:\n\tcase qoder.ManagedAgentsRetryStatusTerminal:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsUnknownErrorRetryStatusUnion) AsExhausted() (v ManagedAgentsRetryStatusExhausted)\n```\n\n```go\nfunc (u ManagedAgentsUnknownErrorRetryStatusUnion) AsRetrying() (v ManagedAgentsRetryStatusRetrying)\n```\n\n```go\nfunc (u ManagedAgentsUnknownErrorRetryStatusUnion) AsTerminal() (v ManagedAgentsRetryStatusTerminal)\n```\n\n```go\nfunc (u ManagedAgentsUnknownErrorRetryStatusUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUnknownErrorRetryStatusUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUnknownErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsUnknownErrorTypeUnknownError ManagedAgentsUnknownErrorType = \"unknown_error\"\n)\n```\n\n```go\ntype ManagedAgentsUnknownRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"unknown_error\".\n\tType ManagedAgentsUnknownRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn 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.\n\n```go\nfunc (r ManagedAgentsUnknownRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUnknownRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUnknownRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsUnknownRunErrorTypeUnknownError ManagedAgentsUnknownRunErrorType = \"unknown_error\"\n)\n```\n\n```go\ntype ManagedAgentsUnrestrictedCredentialNetworkingParams struct {\n\t// Any of \"unrestricted\".\n\tType ManagedAgentsUnrestrictedCredentialNetworkingParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nSubstitute 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.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsUnrestrictedCredentialNetworkingParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUnrestrictedCredentialNetworkingParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUnrestrictedCredentialNetworkingParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUnrestrictedCredentialNetworkingParamsTypeUnrestricted ManagedAgentsUnrestrictedCredentialNetworkingParamsType = \"unrestricted\"\n)\n```\n\n```go\ntype ManagedAgentsUnrestrictedCredentialNetworkingResponse struct {\n\t// Any of \"unrestricted\".\n\tType ManagedAgentsUnrestrictedCredentialNetworkingResponseType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe secret is substituted on any host the session's Environment network policy permits egress to.\n\n```go\nfunc (r ManagedAgentsUnrestrictedCredentialNetworkingResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUnrestrictedCredentialNetworkingResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUnrestrictedCredentialNetworkingResponseType string\n```\n\n```go\nconst (\n\tManagedAgentsUnrestrictedCredentialNetworkingResponseTypeUnrestricted ManagedAgentsUnrestrictedCredentialNetworkingResponseType = \"unrestricted\"\n)\n```\n\n```go\ntype ManagedAgentsUserActor struct {\n\t// Any of \"user_actor\".\n\tType ManagedAgentsUserActorType `json:\"type\" api:\"required\"`\n\t// ID of the user who performed the write (a `user_...` value).\n\tUserID string `json:\"user_id\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tUserID      respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAttribution for a write made by a human user through the Qoder Console.\n\n```go\nfunc (r ManagedAgentsUserActor) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserActor) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserActorType string\n```\n\n```go\nconst (\n\tManagedAgentsUserActorTypeUserActor ManagedAgentsUserActorType = \"user_actor\"\n)\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// The id of the `agent.custom_tool_use` event this result corresponds to, which\n\t// can be found in the last `session.status_idle`\n\t// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)\n\t// `stop_reason.event_ids` field.\n\tCustomToolUseID string `json:\"custom_tool_use_id\" api:\"required\"`\n\t// Any of \"user.custom_tool_result\".\n\tType ManagedAgentsUserCustomToolResultEventType `json:\"type\" api:\"required\"`\n\t// The result content returned by the tool.\n\tContent []ManagedAgentsUserCustomToolResultEventContentUnion `json:\"content\"`\n\t// Whether the tool execution resulted in an error.\n\tIsError bool `json:\"is_error\" api:\"nullable\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"nullable\" format:\"date-time\"`\n\t// Routes this result to a subagent thread. Copy from the `agent.custom_tool_use`\n\t// event's `session_thread_id`.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tCustomToolUseID respjson.Field\n\t\tType            respjson.Field\n\t\tContent         respjson.Field\n\t\tIsError         respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent sent by the client providing the result of a custom tool execution.\n\n```go\nfunc (r ManagedAgentsUserCustomToolResultEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserCustomToolResultEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"search_result\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion], [string]\n\tSource ManagedAgentsUserCustomToolResultEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\tTitle   string `json:\"title\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tCitations ManagedAgentsSearchResultCitations `json:\"citations\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tContent []ManagedAgentsSearchResultContent `json:\"content\"`\n\tJSON    struct {\n\t\tText      respjson.Field\n\t\tType      respjson.Field\n\t\tSource    respjson.Field\n\t\tContext   respjson.Field\n\t\tTitle     respjson.Field\n\t\tCitations respjson.Field\n\t\tContent   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserCustomToolResultEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsSearchResultBlock](#ManagedAgentsSearchResultBlock).\n\nUse the [ManagedAgentsUserCustomToolResultEventContentUnion.AsAny](#ManagedAgentsUserCustomToolResultEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventContentUnion) AsAny() anyManagedAgentsUserCustomToolResultEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsUserCustomToolResultEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsSearchResultBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventContentUnion) AsSearchResult() (v ManagedAgentsSearchResultBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserCustomToolResultEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEventContentUnionSource struct {\n\t// This field will be present if the value is a [string] instead of an object.\n\tOfString  string `json:\",inline\"`\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tOfString  respjson.Field\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserCustomToolResultEventContentUnionSource is an implicit subunion of [ManagedAgentsUserCustomToolResultEventContentUnion](#ManagedAgentsUserCustomToolResultEventContentUnion). ManagedAgentsUserCustomToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsUserCustomToolResultEventContentUnion](#ManagedAgentsUserCustomToolResultEventContentUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfString]\n\n```go\nfunc (r *ManagedAgentsUserCustomToolResultEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEventParams struct {\n\t// The id of the `agent.custom_tool_use` event this result corresponds to, which\n\t// can be found in the last `session.status_idle`\n\t// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)\n\t// `stop_reason.event_ids` field.\n\tCustomToolUseID string `json:\"custom_tool_use_id\" api:\"required\"`\n\t// Any of \"user.custom_tool_result\".\n\tType ManagedAgentsUserCustomToolResultEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Whether the tool execution resulted in an error.\n\tIsError param.Opt[bool] `json:\"is_error,omitzero\"`\n\t// The result content returned by the tool.\n\tContent []ManagedAgentsUserCustomToolResultEventParamsContentUnion `json:\"content,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for providing the result of a custom tool execution.\n\nThe properties CustomToolUseID, Type are required.\n\n```go\nfunc (r ManagedAgentsUserCustomToolResultEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserCustomToolResultEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEventParamsContentUnion struct {\n\tOfText         *ManagedAgentsTextBlockParam         `json:\",omitzero,inline\"`\n\tOfImage        *ManagedAgentsImageBlockParam        `json:\",omitzero,inline\"`\n\tOfDocument     *ManagedAgentsDocumentBlockParam     `json:\",omitzero,inline\"`\n\tOfSearchResult *ManagedAgentsSearchResultBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetCitations() *ManagedAgentsSearchResultCitationsParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetContent() []ManagedAgentsSearchResultContentParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetContext() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetSource() (res managedAgentsUserCustomToolResultEventParamsContentUnionSource)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserCustomToolResultEventParamsContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsUserCustomToolResultEventParamsContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUserCustomToolResultEventParamsTypeUserCustomToolResult ManagedAgentsUserCustomToolResultEventParamsType = \"user.custom_tool_result\"\n)\n```\n\n```go\ntype ManagedAgentsUserCustomToolResultEventType string\n```\n\n```go\nconst (\n\tManagedAgentsUserCustomToolResultEventTypeUserCustomToolResult ManagedAgentsUserCustomToolResultEventType = \"user.custom_tool_result\"\n)\n```\n\n```go\ntype ManagedAgentsUserDefineOutcomeEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// What the agent should produce. Copied from the input event.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// Evaluate-then-revise cycles before giving up. Default 3, max 20.\n\tMaxIterations int64 `json:\"max_iterations\" api:\"required\"`\n\t// Server-generated `outc_` ID for this outcome. Referenced by\n\t// `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.\n\tOutcomeID string `json:\"outcome_id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"required\" format:\"date-time\"`\n\t// Rubric for grading the quality of an outcome.\n\tRubric ManagedAgentsUserDefineOutcomeEventRubricUnion `json:\"rubric\" api:\"required\"`\n\t// Any of \"user.define_outcome\".\n\tType ManagedAgentsUserDefineOutcomeEventType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID            respjson.Field\n\t\tDescription   respjson.Field\n\t\tMaxIterations respjson.Field\n\t\tOutcomeID     respjson.Field\n\t\tProcessedAt   respjson.Field\n\t\tRubric        respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEcho of a \\`user.define\\_outcome\\` input event. Carries the server-generated \\`outcome\\_id\\` that subsequent \\`span.outcome\\_evaluation\\_\\*\\` events reference.\n\n```go\nfunc (r ManagedAgentsUserDefineOutcomeEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserDefineOutcomeEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserDefineOutcomeEventParams struct {\n\t// What the agent should produce. This is the task specification.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// Rubric for grading the quality of an outcome.\n\tRubric ManagedAgentsUserDefineOutcomeEventParamsRubricUnion `json:\"rubric,omitzero\" api:\"required\"`\n\t// Any of \"user.define_outcome\".\n\tType ManagedAgentsUserDefineOutcomeEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Eval→revision cycles before giving up. Default 3, max 20.\n\tMaxIterations param.Opt[int64] `json:\"max_iterations,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for defining an outcome the agent should work toward. The agent begins work on receipt.\n\nThe properties Description, Rubric, Type are required.\n\n```go\nfunc (r ManagedAgentsUserDefineOutcomeEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserDefineOutcomeEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserDefineOutcomeEventParamsRubricUnion struct {\n\tOfFile *ManagedAgentsFileRubricParams `json:\",omitzero,inline\"`\n\tOfText *ManagedAgentsTextRubricParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) GetContent() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsUserDefineOutcomeEventParamsRubricUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserDefineOutcomeEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUserDefineOutcomeEventParamsTypeUserDefineOutcome ManagedAgentsUserDefineOutcomeEventParamsType = \"user.define_outcome\"\n)\n```\n\n```go\ntype ManagedAgentsUserDefineOutcomeEventRubricUnion struct {\n\t// This field is from variant [ManagedAgentsFileRubric].\n\tFileID string `json:\"file_id\"`\n\t// Any of \"file\", \"text\".\n\tType string `json:\"type\"`\n\t// This field is from variant [ManagedAgentsTextRubric].\n\tContent string `json:\"content\"`\n\tJSON    struct {\n\t\tFileID  respjson.Field\n\t\tType    respjson.Field\n\t\tContent respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserDefineOutcomeEventRubricUnion contains all possible properties and values from [ManagedAgentsFileRubric](#ManagedAgentsFileRubric), [ManagedAgentsTextRubric](#ManagedAgentsTextRubric).\n\nUse the [ManagedAgentsUserDefineOutcomeEventRubricUnion.AsAny](#ManagedAgentsUserDefineOutcomeEventRubricUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventRubricUnion) AsAny() anyManagedAgentsUserDefineOutcomeEventRubric\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsUserDefineOutcomeEventRubricUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsFileRubric:\n\tcase qoder.ManagedAgentsTextRubric:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventRubricUnion) AsFile() (v ManagedAgentsFileRubric)\n```\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventRubricUnion) AsText() (v ManagedAgentsTextRubric)\n```\n\n```go\nfunc (u ManagedAgentsUserDefineOutcomeEventRubricUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserDefineOutcomeEventRubricUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserDefineOutcomeEventType string\n```\n\n```go\nconst (\n\tManagedAgentsUserDefineOutcomeEventTypeUserDefineOutcome ManagedAgentsUserDefineOutcomeEventType = \"user.define_outcome\"\n)\n```\n\n```go\ntype ManagedAgentsUserInterruptEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Any of \"user.interrupt\".\n\tType ManagedAgentsUserInterruptEventType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"nullable\" format:\"date-time\"`\n\t// If absent, interrupts every non-archived thread in a multiagent session (or the\n\t// primary alone in a single-agent session). If present, interrupts only the named\n\t// thread.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tType            respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nAn interrupt event that pauses agent execution and returns control to the user.\n\n```go\nfunc (r ManagedAgentsUserInterruptEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserInterruptEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserInterruptEventParams struct {\n\t// Any of \"user.interrupt\".\n\tType ManagedAgentsUserInterruptEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// If absent, interrupts every non-archived thread in a multiagent session (or the\n\t// primary alone in a single-agent session). If present, interrupts only the named\n\t// thread.\n\tSessionThreadID param.Opt[string] `json:\"session_thread_id,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for sending an interrupt to pause the agent.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsUserInterruptEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserInterruptEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserInterruptEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUserInterruptEventParamsTypeUserInterrupt ManagedAgentsUserInterruptEventParamsType = \"user.interrupt\"\n)\n```\n\n```go\ntype ManagedAgentsUserInterruptEventType string\n```\n\n```go\nconst (\n\tManagedAgentsUserInterruptEventTypeUserInterrupt ManagedAgentsUserInterruptEventType = \"user.interrupt\"\n)\n```\n\n```go\ntype ManagedAgentsUserLocation struct {\n\t// Location precision. Only \"approximate\" is supported.\n\tType constant.Approximate `json:\"type\" default:\"approximate\"`\n\t// City name.\n\tCity string `json:\"city\" api:\"nullable\"`\n\t// Two-letter ISO 3166-1 country code, uppercase.\n\tCountry string `json:\"country\" api:\"nullable\"`\n\t// Region or state name.\n\tRegion string `json:\"region\" api:\"nullable\"`\n\t// IANA timezone identifier, e.g. \"America/Los_Angeles\".\n\tTimezone string `json:\"timezone\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tCity        respjson.Field\n\t\tCountry     respjson.Field\n\t\tRegion      respjson.Field\n\t\tTimezone    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nApproximate user location for search result localization.\n\n```go\nfunc (r ManagedAgentsUserLocation) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r ManagedAgentsUserLocation) ToParam() ManagedAgentsUserLocationParam\n```\nToParam converts this ManagedAgentsUserLocation to a ManagedAgentsUserLocationParam.\n\nWarning: 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()\n\n```go\nfunc (r *ManagedAgentsUserLocation) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserLocationParam struct {\n\t// City name.\n\tCity param.Opt[string] `json:\"city,omitzero\"`\n\t// Two-letter ISO 3166-1 country code, uppercase.\n\tCountry param.Opt[string] `json:\"country,omitzero\"`\n\t// Region or state name.\n\tRegion param.Opt[string] `json:\"region,omitzero\"`\n\t// IANA timezone identifier, e.g. \"America/Los_Angeles\".\n\tTimezone param.Opt[string] `json:\"timezone,omitzero\"`\n\t// Location precision. Only \"approximate\" is supported.\n\t//\n\t// This field can be elided, and will marshal its zero value as \"approximate\".\n\tType constant.Approximate `json:\"type\" default:\"approximate\"`\n\t// contains filtered or unexported fields\n}\n```\nApproximate user location for search result localization.\n\nThe property Type is required.\n\n```go\nfunc (r ManagedAgentsUserLocationParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserLocationParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserMessageEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// Array of content blocks comprising the user message.\n\tContent []ManagedAgentsUserMessageEventContentUnion `json:\"content\" api:\"required\"`\n\t// Any of \"user.message\".\n\tType ManagedAgentsUserMessageEventType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"nullable\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tContent     respjson.Field\n\t\tType        respjson.Field\n\t\tProcessedAt respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA user message event in the session conversation.\n\n```go\nfunc (r ManagedAgentsUserMessageEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserMessageEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserMessageEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"redacted\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion]\n\tSource ManagedAgentsUserMessageEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tTitle string `json:\"title\"`\n\tJSON  struct {\n\t\tText    respjson.Field\n\t\tType    respjson.Field\n\t\tSource  respjson.Field\n\t\tContext respjson.Field\n\t\tTitle   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserMessageEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsRedactedBlock](#ManagedAgentsRedactedBlock).\n\nUse the [ManagedAgentsUserMessageEventContentUnion.AsAny](#ManagedAgentsUserMessageEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsUserMessageEventContentUnion) AsAny() anyManagedAgentsUserMessageEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsUserMessageEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsRedactedBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsUserMessageEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserMessageEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserMessageEventContentUnion) AsRedacted() (v ManagedAgentsRedactedBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserMessageEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserMessageEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserMessageEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserMessageEventContentUnionSource struct {\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserMessageEventContentUnionSource is an implicit subunion of [ManagedAgentsUserMessageEventContentUnion](#ManagedAgentsUserMessageEventContentUnion). ManagedAgentsUserMessageEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsUserMessageEventContentUnion](#ManagedAgentsUserMessageEventContentUnion).\n\n```go\nfunc (r *ManagedAgentsUserMessageEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserMessageEventParams struct {\n\t// Array of content blocks for the user message.\n\tContent []ManagedAgentsUserMessageEventParamsContentUnion `json:\"content,omitzero\" api:\"required\"`\n\t// Any of \"user.message\".\n\tType ManagedAgentsUserMessageEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for sending a user message to the session.\n\nThe properties Content, Type are required.\n\n```go\nfunc (r ManagedAgentsUserMessageEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserMessageEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserMessageEventParamsContentUnion struct {\n\tOfText     *ManagedAgentsTextBlockParam     `json:\",omitzero,inline\"`\n\tOfImage    *ManagedAgentsImageBlockParam    `json:\",omitzero,inline\"`\n\tOfDocument *ManagedAgentsDocumentBlockParam `json:\",omitzero,inline\"`\n\tOfRedacted *ManagedAgentsRedactedBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsUserMessageEventParamsContentUnion) GetContext() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserMessageEventParamsContentUnion) GetSource() (res managedAgentsUserMessageEventParamsContentUnionSource)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsUserMessageEventParamsContentUnion) GetText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserMessageEventParamsContentUnion) GetTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserMessageEventParamsContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserMessageEventParamsContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsUserMessageEventParamsContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserMessageEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUserMessageEventParamsTypeUserMessage ManagedAgentsUserMessageEventParamsType = \"user.message\"\n)\n```\n\n```go\ntype ManagedAgentsUserMessageEventType string\n```\n\n```go\nconst (\n\tManagedAgentsUserMessageEventTypeUserMessage ManagedAgentsUserMessageEventType = \"user.message\"\n)\n```\n\n```go\ntype ManagedAgentsUserToolConfirmationEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// UserToolConfirmationResult enum\n\t//\n\t// Any of \"allow\", \"deny\".\n\tResult ManagedAgentsUserToolConfirmationEventResult `json:\"result\" api:\"required\"`\n\t// The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result\n\t// corresponds to, which can be found in the last `session.status_idle`\n\t// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)\n\t// `stop_reason.event_ids` field.\n\tToolUseID string `json:\"tool_use_id\" api:\"required\"`\n\t// Any of \"user.tool_confirmation\".\n\tType ManagedAgentsUserToolConfirmationEventType `json:\"type\" api:\"required\"`\n\t// Optional message providing context for a 'deny' decision. Only allowed when\n\t// result is 'deny'.\n\tDenyMessage string `json:\"deny_message\" api:\"nullable\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"nullable\" format:\"date-time\"`\n\t// When set, the confirmation routes to this subagent's thread rather than the\n\t// primary. Echo this from the `session_thread_id` on the `agent.tool_use` or\n\t// `agent.mcp_tool_use` event that prompted the approval.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tResult          respjson.Field\n\t\tToolUseID       respjson.Field\n\t\tType            respjson.Field\n\t\tDenyMessage     respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA tool confirmation event that approves or denies a pending tool execution.\n\n```go\nfunc (r ManagedAgentsUserToolConfirmationEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserToolConfirmationEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolConfirmationEventParams struct {\n\t// UserToolConfirmationResult enum\n\t//\n\t// Any of \"allow\", \"deny\".\n\tResult ManagedAgentsUserToolConfirmationEventParamsResult `json:\"result,omitzero\" api:\"required\"`\n\t// The id of the `agent.tool_use` or `agent.mcp_tool_use` event this result\n\t// corresponds to, which can be found in the last `session.status_idle`\n\t// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)\n\t// `stop_reason.event_ids` field.\n\tToolUseID string `json:\"tool_use_id\" api:\"required\"`\n\t// Any of \"user.tool_confirmation\".\n\tType ManagedAgentsUserToolConfirmationEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Optional message providing context for a 'deny' decision. Only allowed when\n\t// result is 'deny'.\n\tDenyMessage param.Opt[string] `json:\"deny_message,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters for confirming or denying a tool execution request.\n\nThe properties Result, ToolUseID, Type are required.\n\n```go\nfunc (r ManagedAgentsUserToolConfirmationEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserToolConfirmationEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolConfirmationEventParamsResult string\n```\nUserToolConfirmationResult enum\n\n```go\nconst (\n\tManagedAgentsUserToolConfirmationEventParamsResultAllow ManagedAgentsUserToolConfirmationEventParamsResult = \"allow\"\n\tManagedAgentsUserToolConfirmationEventParamsResultDeny  ManagedAgentsUserToolConfirmationEventParamsResult = \"deny\"\n)\n```\n\n```go\ntype ManagedAgentsUserToolConfirmationEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUserToolConfirmationEventParamsTypeUserToolConfirmation ManagedAgentsUserToolConfirmationEventParamsType = \"user.tool_confirmation\"\n)\n```\n\n```go\ntype ManagedAgentsUserToolConfirmationEventResult string\n```\nUserToolConfirmationResult enum\n\n```go\nconst (\n\tManagedAgentsUserToolConfirmationEventResultAllow ManagedAgentsUserToolConfirmationEventResult = \"allow\"\n\tManagedAgentsUserToolConfirmationEventResultDeny  ManagedAgentsUserToolConfirmationEventResult = \"deny\"\n)\n```\n\n```go\ntype ManagedAgentsUserToolConfirmationEventType string\n```\n\n```go\nconst (\n\tManagedAgentsUserToolConfirmationEventTypeUserToolConfirmation ManagedAgentsUserToolConfirmationEventType = \"user.tool_confirmation\"\n)\n```\n\n```go\ntype ManagedAgentsUserToolResultEvent struct {\n\t// Unique identifier for this event.\n\tID string `json:\"id\" api:\"required\"`\n\t// The id of the `agent.tool_use` event this result corresponds to, which can be\n\t// found in the last `session.status_idle`\n\t// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)\n\t// `stop_reason.event_ids` field.\n\tToolUseID string `json:\"tool_use_id\" api:\"required\"`\n\t// Any of \"user.tool_result\".\n\tType ManagedAgentsUserToolResultEventType `json:\"type\" api:\"required\"`\n\t// The result content returned by the tool.\n\tContent []ManagedAgentsUserToolResultEventContentUnion `json:\"content\"`\n\t// Whether the tool execution resulted in an error.\n\tIsError bool `json:\"is_error\" api:\"nullable\"`\n\t// A timestamp in RFC 3339 format\n\tProcessedAt time.Time `json:\"processed_at\" api:\"nullable\" format:\"date-time\"`\n\t// Routes this result to a subagent thread. Copy from the `agent.tool_use` event's\n\t// `session_thread_id`.\n\tSessionThreadID string `json:\"session_thread_id\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID              respjson.Field\n\t\tToolUseID       respjson.Field\n\t\tType            respjson.Field\n\t\tContent         respjson.Field\n\t\tIsError         respjson.Field\n\t\tProcessedAt     respjson.Field\n\t\tSessionThreadID respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nEvent 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.\n\n```go\nfunc (r ManagedAgentsUserToolResultEvent) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserToolResultEvent) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolResultEventContentUnion struct {\n\t// This field is from variant [ManagedAgentsTextBlock].\n\tText string `json:\"text\"`\n\t// Any of \"text\", \"image\", \"document\", \"search_result\".\n\tType string `json:\"type\"`\n\t// This field is a union of [ManagedAgentsImageBlockSourceUnion],\n\t// [ManagedAgentsDocumentBlockSourceUnion], [string]\n\tSource ManagedAgentsUserToolResultEventContentUnionSource `json:\"source\"`\n\t// This field is from variant [ManagedAgentsDocumentBlock].\n\tContext string `json:\"context\"`\n\tTitle   string `json:\"title\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tCitations ManagedAgentsSearchResultCitations `json:\"citations\"`\n\t// This field is from variant [ManagedAgentsSearchResultBlock].\n\tContent []ManagedAgentsSearchResultContent `json:\"content\"`\n\tJSON    struct {\n\t\tText      respjson.Field\n\t\tType      respjson.Field\n\t\tSource    respjson.Field\n\t\tContext   respjson.Field\n\t\tTitle     respjson.Field\n\t\tCitations respjson.Field\n\t\tContent   respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserToolResultEventContentUnion contains all possible properties and values from [ManagedAgentsTextBlock](#ManagedAgentsTextBlock), [ManagedAgentsImageBlock](#ManagedAgentsImageBlock), [ManagedAgentsDocumentBlock](#ManagedAgentsDocumentBlock), [ManagedAgentsSearchResultBlock](#ManagedAgentsSearchResultBlock).\n\nUse the [ManagedAgentsUserToolResultEventContentUnion.AsAny](#ManagedAgentsUserToolResultEventContentUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventContentUnion) AsAny() anyManagedAgentsUserToolResultEventContent\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsUserToolResultEventContentUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsTextBlock:\n\tcase qoder.ManagedAgentsImageBlock:\n\tcase qoder.ManagedAgentsDocumentBlock:\n\tcase qoder.ManagedAgentsSearchResultBlock:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsUserToolResultEventContentUnion) AsDocument() (v ManagedAgentsDocumentBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserToolResultEventContentUnion) AsImage() (v ManagedAgentsImageBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserToolResultEventContentUnion) AsSearchResult() (v ManagedAgentsSearchResultBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserToolResultEventContentUnion) AsText() (v ManagedAgentsTextBlock)\n```\n\n```go\nfunc (u ManagedAgentsUserToolResultEventContentUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsUserToolResultEventContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolResultEventContentUnionSource struct {\n\t// This field will be present if the value is a [string] instead of an object.\n\tOfString  string `json:\",inline\"`\n\tData      string `json:\"data\"`\n\tMediaType string `json:\"media_type\"`\n\tType      string `json:\"type\"`\n\tURL       string `json:\"url\"`\n\tFileID    string `json:\"file_id\"`\n\tJSON      struct {\n\t\tOfString  respjson.Field\n\t\tData      respjson.Field\n\t\tMediaType respjson.Field\n\t\tType      respjson.Field\n\t\tURL       respjson.Field\n\t\tFileID    respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsUserToolResultEventContentUnionSource is an implicit subunion of [ManagedAgentsUserToolResultEventContentUnion](#ManagedAgentsUserToolResultEventContentUnion). ManagedAgentsUserToolResultEventContentUnionSource provides convenient access to the sub-properties of the union.\n\nFor type safety it is recommended to directly use a variant of the [ManagedAgentsUserToolResultEventContentUnion](#ManagedAgentsUserToolResultEventContentUnion).\n\nIf the underlying value is not a json object, one of the following properties will be valid: OfString]\n\n```go\nfunc (r *ManagedAgentsUserToolResultEventContentUnionSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolResultEventParams struct {\n\t// The id of the `agent.tool_use` event this result corresponds to, which can be\n\t// found in the last `session.status_idle`\n\t// [event's](https://docs.qoder.com/cloud-agents/api/sessions/schemas)\n\t// `stop_reason.event_ids` field.\n\tToolUseID string `json:\"tool_use_id\" api:\"required\"`\n\t// Any of \"user.tool_result\".\n\tType ManagedAgentsUserToolResultEventParamsType `json:\"type,omitzero\" api:\"required\"`\n\t// Whether the tool execution resulted in an error.\n\tIsError param.Opt[bool] `json:\"is_error,omitzero\"`\n\t// The result content returned by the tool.\n\tContent []ManagedAgentsUserToolResultEventParamsContentUnion `json:\"content,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nParameters 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.\n\nThe properties ToolUseID, Type are required.\n\n```go\nfunc (r ManagedAgentsUserToolResultEventParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsUserToolResultEventParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolResultEventParamsContentUnion struct {\n\tOfText         *ManagedAgentsTextBlockParam         `json:\",omitzero,inline\"`\n\tOfImage        *ManagedAgentsImageBlockParam        `json:\",omitzero,inline\"`\n\tOfDocument     *ManagedAgentsDocumentBlockParam     `json:\",omitzero,inline\"`\n\tOfSearchResult *ManagedAgentsSearchResultBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetCitations() *ManagedAgentsSearchResultCitationsParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetContent() []ManagedAgentsSearchResultContentParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetContext() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetSource() (res managedAgentsUserToolResultEventParamsContentUnionSource)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsUserToolResultEventParamsContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsUserToolResultEventParamsContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsUserToolResultEventParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsUserToolResultEventParamsTypeUserToolResult ManagedAgentsUserToolResultEventParamsType = \"user.tool_result\"\n)\n```\n\n```go\ntype ManagedAgentsUserToolResultEventType string\n```\n\n```go\nconst (\n\tManagedAgentsUserToolResultEventTypeUserToolResult ManagedAgentsUserToolResultEventType = \"user.tool_result\"\n)\n```\n\n```go\ntype ManagedAgentsVault struct {\n\t// Empty on creation; add credentials using the separate Credential API.\n\tCredentials []ManagedAgentsCredential `json:\"credentials\"`\n\t// Unique identifier for the vault.\n\tID string `json:\"id\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tArchivedAt time.Time `json:\"archived_at\" api:\"required\" format:\"date-time\"`\n\t// A timestamp in RFC 3339 format\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Human-readable name for the vault.\n\tDisplayName string `json:\"display_name\" api:\"required\"`\n\t// Arbitrary key-value metadata attached to the vault.\n\tMetadata map[string]string `json:\"metadata\" api:\"required\"`\n\t// Any of \"vault\".\n\tType ManagedAgentsVaultType `json:\"type\" api:\"required\"`\n\t// A timestamp in RFC 3339 format\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tCredentials respjson.Field\n\t\tID          respjson.Field\n\t\tArchivedAt  respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tDisplayName respjson.Field\n\t\tMetadata    respjson.Field\n\t\tType        respjson.Field\n\t\tUpdatedAt   respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA vault that stores credentials for use by agents during sessions.\n\n```go\nfunc (r ManagedAgentsVault) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsVault) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsVaultArchivedDeploymentPausedReasonError struct {\n\t// Any of \"vault_archived_error\".\n\tType ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA vault referenced by the deployment is archived.\n\n```go\nfunc (r ManagedAgentsVaultArchivedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsVaultArchivedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsVaultArchivedDeploymentPausedReasonErrorTypeVaultArchivedError ManagedAgentsVaultArchivedDeploymentPausedReasonErrorType = \"vault_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsVaultArchivedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"vault_archived_error\".\n\tType ManagedAgentsVaultArchivedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA vault referenced by the deployment is archived.\n\n```go\nfunc (r ManagedAgentsVaultArchivedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsVaultArchivedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsVaultArchivedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsVaultArchivedRunErrorTypeVaultArchivedError ManagedAgentsVaultArchivedRunErrorType = \"vault_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsVaultNotFoundDeploymentPausedReasonError struct {\n\t// Any of \"vault_not_found_error\".\n\tType ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA vault referenced by the deployment no longer exists.\n\n```go\nfunc (r ManagedAgentsVaultNotFoundDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsVaultNotFoundDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsVaultNotFoundDeploymentPausedReasonErrorTypeVaultNotFoundError ManagedAgentsVaultNotFoundDeploymentPausedReasonErrorType = \"vault_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsVaultNotFoundRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"vault_not_found_error\".\n\tType ManagedAgentsVaultNotFoundRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA vault referenced by the deployment no longer exists.\n\n```go\nfunc (r ManagedAgentsVaultNotFoundRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsVaultNotFoundRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsVaultNotFoundRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsVaultNotFoundRunErrorTypeVaultNotFoundError ManagedAgentsVaultNotFoundRunErrorType = \"vault_not_found_error\"\n)\n```\n\n```go\ntype ManagedAgentsVaultType string\n```\n\n```go\nconst (\n\tManagedAgentsVaultTypeVault ManagedAgentsVaultType = \"vault\"\n)\n```\n\n```go\ntype ManagedAgentsWebFetchToolConfig struct {\n\tEnabled bool              `json:\"enabled\" api:\"required\"`\n\tName    constant.WebFetch `json:\"name\" default:\"web_fetch\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsWebFetchToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.WebFetch                                    `json:\"type\" default:\"web_fetch\"`\n\tAllowedDomains   []string                                             `json:\"allowed_domains\"`\n\tBlockedDomains   []string                                             `json:\"blocked_domains\"`\n\tMaxContentTokens int64                                                `json:\"max_content_tokens\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tAllowedDomains   respjson.Field\n\t\tBlockedDomains   respjson.Field\n\t\tMaxContentTokens respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the web\\_fetch tool.\n\n```go\nfunc (r ManagedAgentsWebFetchToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWebFetchToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebFetchToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Maximum number of tokens of fetched text content to include in context per call.\n\t// Does not apply to binary content such as PDFs.\n\tMaxContentTokens param.Opt[int64] `json:\"max_content_tokens,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Only fetch URLs whose host is one of these domains or a subdomain of one. Each\n\t// entry is a plain hostname like \"docs.example.com\" (no scheme, port, or path). At\n\t// most 64 entries; an empty list is rejected (omit the field instead). Cannot be\n\t// combined with blocked_domains.\n\tAllowedDomains []string `json:\"allowed_domains,omitzero\"`\n\t// Never fetch URLs whose host is one of these domains or a subdomain of one. Each\n\t// entry is a plain hostname like \"ads.example.com\" (no scheme, port, or path). At\n\t// most 64 entries; an empty list is rejected (omit the field instead). Cannot be\n\t// combined with allowed_domains.\n\tBlockedDomains []string `json:\"blocked_domains,omitzero\"`\n\t// Any of \"web_fetch\".\n\tType ManagedAgentsWebFetchToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"web_fetch\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"web_fetch\".\n\tName constant.WebFetch `json:\"name\" default:\"web_fetch\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the web\\_fetch tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsWebFetchToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsWebFetchToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsWebFetchToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebFetchToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsWebFetchToolConfigParamsTypeWebFetch ManagedAgentsWebFetchToolConfigParamsType = \"web_fetch\"\n)\n```\n\n```go\ntype ManagedAgentsWebFetchToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsWebFetchToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsWebFetchToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsWebFetchToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsWebFetchToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsWebFetchToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWebFetchToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebSearchToolConfig struct {\n\tEnabled bool               `json:\"enabled\" api:\"required\"`\n\tName    constant.WebSearch `json:\"name\" default:\"web_search\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsWebSearchToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.WebSearch                                    `json:\"type\" default:\"web_search\"`\n\tAllowedDomains   []string                                              `json:\"allowed_domains\"`\n\tBlockedDomains   []string                                              `json:\"blocked_domains\"`\n\t// Approximate user location for search result localization.\n\tUserLocation ManagedAgentsUserLocation `json:\"user_location\" api:\"nullable\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tAllowedDomains   respjson.Field\n\t\tBlockedDomains   respjson.Field\n\t\tUserLocation     respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the web\\_search tool.\n\n```go\nfunc (r ManagedAgentsWebSearchToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWebSearchToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebSearchToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Only return search results whose host is one of these domains or a subdomain of\n\t// one. Each entry is a plain hostname like \"docs.example.com\" (no scheme or port;\n\t// an optional path suffix is accepted). At most 64 entries; an empty list is\n\t// rejected (omit the field instead). Cannot be combined with blocked_domains.\n\tAllowedDomains []string `json:\"allowed_domains,omitzero\"`\n\t// Never return search results whose host is one of these domains or a subdomain of\n\t// one. Each entry is a plain hostname like \"ads.example.com\" (no scheme or port;\n\t// an optional path suffix is accepted). At most 64 entries; an empty list is\n\t// rejected (omit the field instead). Cannot be combined with allowed_domains.\n\tBlockedDomains []string `json:\"blocked_domains,omitzero\"`\n\t// Any of \"web_search\".\n\tType ManagedAgentsWebSearchToolConfigParamsType `json:\"type,omitzero\"`\n\t// Approximate user location for search result localization.\n\tUserLocation ManagedAgentsUserLocationParam `json:\"user_location,omitzero\"`\n\t// Must be \"web_search\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"web_search\".\n\tName constant.WebSearch `json:\"name\" default:\"web_search\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the web\\_search tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsWebSearchToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsWebSearchToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsWebSearchToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWebSearchToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsWebSearchToolConfigParamsTypeWebSearch ManagedAgentsWebSearchToolConfigParamsType = \"web_search\"\n)\n```\n\n```go\ntype ManagedAgentsWebSearchToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsWebSearchToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsWebSearchToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsWebSearchToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsWebSearchToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsWebSearchToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWebSearchToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError struct {\n\t// Any of \"workspace_archived_error\".\n\tType ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's workspace was archived.\n\n```go\nfunc (r ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWorkspaceArchivedDeploymentPausedReasonError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorTypeWorkspaceArchivedError ManagedAgentsWorkspaceArchivedDeploymentPausedReasonErrorType = \"workspace_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsWorkspaceArchivedRunError struct {\n\t// Human-readable error description.\n\tMessage string `json:\"message\" api:\"required\"`\n\t// Any of \"workspace_archived_error\".\n\tType ManagedAgentsWorkspaceArchivedRunErrorType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMessage     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe deployment's workspace was archived.\n\n```go\nfunc (r ManagedAgentsWorkspaceArchivedRunError) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWorkspaceArchivedRunError) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWorkspaceArchivedRunErrorType string\n```\n\n```go\nconst (\n\tManagedAgentsWorkspaceArchivedRunErrorTypeWorkspaceArchivedError ManagedAgentsWorkspaceArchivedRunErrorType = \"workspace_archived_error\"\n)\n```\n\n```go\ntype ManagedAgentsWriteToolConfig struct {\n\tEnabled bool           `json:\"enabled\" api:\"required\"`\n\tName    constant.Write `json:\"name\" default:\"write\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsWriteToolConfigPermissionPolicyUnion `json:\"permission_policy\" api:\"required\"`\n\tType             constant.Write                                    `json:\"type\" default:\"write\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tEnabled          respjson.Field\n\t\tName             respjson.Field\n\t\tPermissionPolicy respjson.Field\n\t\tType             respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for the write tool.\n\n```go\nfunc (r ManagedAgentsWriteToolConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWriteToolConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWriteToolConfigParams struct {\n\t// Whether this tool is enabled and available to the model. Overrides the\n\t// default_config setting.\n\tEnabled param.Opt[bool] `json:\"enabled,omitzero\"`\n\t// Permission policy for tool execution.\n\tPermissionPolicy ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion `json:\"permission_policy,omitzero\"`\n\t// Any of \"write\".\n\tType ManagedAgentsWriteToolConfigParamsType `json:\"type,omitzero\"`\n\t// Must be \"write\".\n\t//\n\t// This field can be elided, and will marshal its zero value as \"write\".\n\tName constant.Write `json:\"name\" default:\"write\"`\n\t// contains filtered or unexported fields\n}\n```\nConfiguration override for the write tool.\n\nThe property Name is required.\n\n```go\nfunc (r ManagedAgentsWriteToolConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ManagedAgentsWriteToolConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion struct {\n\tOfAlwaysAllow *ManagedAgentsAlwaysAllowPolicyParam `json:\",omitzero,inline\"`\n\tOfAlwaysAsk   *ManagedAgentsAlwaysAskPolicyParam   `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ManagedAgentsWriteToolConfigParamsPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ManagedAgentsWriteToolConfigParamsType string\n```\n\n```go\nconst (\n\tManagedAgentsWriteToolConfigParamsTypeWrite ManagedAgentsWriteToolConfigParamsType = \"write\"\n)\n```\n\n```go\ntype ManagedAgentsWriteToolConfigPermissionPolicyUnion struct {\n\t// Any of \"always_allow\", \"always_ask\".\n\tType string `json:\"type\"`\n\tJSON struct {\n\t\tType respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nManagedAgentsWriteToolConfigPermissionPolicyUnion contains all possible properties and values from [ManagedAgentsAlwaysAllowPolicy](#ManagedAgentsAlwaysAllowPolicy), [ManagedAgentsAlwaysAskPolicy](#ManagedAgentsAlwaysAskPolicy).\n\nUse the [ManagedAgentsWriteToolConfigPermissionPolicyUnion.AsAny](#ManagedAgentsWriteToolConfigPermissionPolicyUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAlwaysAllow() (v ManagedAgentsAlwaysAllowPolicy)\n```\n\n```go\nfunc (u ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAlwaysAsk() (v ManagedAgentsAlwaysAskPolicy)\n```\n\n```go\nfunc (u ManagedAgentsWriteToolConfigPermissionPolicyUnion) AsAny() anyManagedAgentsWriteToolConfigPermissionPolicy\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := ManagedAgentsWriteToolConfigPermissionPolicyUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsAlwaysAllowPolicy:\n\tcase qoder.ManagedAgentsAlwaysAskPolicy:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u ManagedAgentsWriteToolConfigPermissionPolicyUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ManagedAgentsWriteToolConfigPermissionPolicyUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MemoryStoreArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype MemoryStoreDeleteParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype MemoryStoreGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype MemoryStoreListParams struct {\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tName     param.Opt[string] `query:\"name,omitzero\" json:\"-\"`\n\n\t// Return only stores whose `created_at` is at or after this time (inclusive). Sent\n\t// on the wire as `created_at[gte]`.\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return only stores whose `created_at` is at or before this time (inclusive).\n\t// Sent on the wire as `created_at[lte]`.\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// When `true`, archived stores are included in the results. Defaults to `false`\n\t// (archived stores are excluded).\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum number of stores to return per page. Must be between 1 and 100. Defaults\n\t// to 20 when omitted.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a\n\t// previous response to fetch the next page; omit for the first page.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreListParams](#MemoryStoreListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype MemoryStoreMemoryDeleteParams struct {\n\tMemoryStoreID string `path:\"memory_store_id\" api:\"required\" json:\"-\"`\n\t// Query parameter for expected_content_sha256\n\tExpectedContentSha256 param.Opt[string] `query:\"expected_content_sha256,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryDeleteParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryDeleteParams](#MemoryStoreMemoryDeleteParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype MemoryStoreMemoryGetParams struct {\n\tMemoryStoreID string `path:\"memory_store_id\" api:\"required\" json:\"-\"`\n\t// Query parameter for view\n\t//\n\t// Any of \"basic\", \"full\".\n\tView ManagedAgentsMemoryView `query:\"view,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryGetParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryGetParams](#MemoryStoreMemoryGetParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype MemoryStoreMemoryListParams struct {\n\t// `0` (or omitted) returns all descendants below `path_prefix` (recursive). `1`\n\t// returns immediate children only; deeper entries roll up as `memory_prefix`\n\t// items. `depth=1` behaves like `ls`; omitting `depth` behaves like `find`.\n\tDepth param.Opt[int64] `query:\"depth,omitzero\" json:\"-\"`\n\t// Maximum number of items to return per page. Must be between 1 and 100. Defaults\n\t// to 20 when omitted. Capped at 20 when `view=full`. Both `memory` and\n\t// `memory_prefix` items count toward the limit.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a\n\t// previous response to fetch the next page; omit for the first page.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional path prefix filter. Must end with `/` (segment-aligned), e.g.,\n\t// `/notes/`. This value appears in request URLs. Do not include secrets or\n\t// personally identifiable information.\n\tPathPrefix param.Opt[string] `query:\"path_prefix,omitzero\" json:\"-\"`\n\t// Which projection of each `memory` to return. Defaults to `basic` (content\n\t// omitted). `full` populates `content` on each item and caps `limit` at 20; use\n\t// this as the bulk-read path for export and sync.\n\t//\n\t// Any of \"basic\", \"full\".\n\tView ManagedAgentsMemoryView `query:\"view,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryListParams](#MemoryStoreMemoryListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype MemoryStoreMemoryNewParams struct {\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\n\t// UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required;\n\t// pass `\"\"` explicitly to create an empty memory.\n\tContent param.Opt[string] `json:\"content,omitzero\" api:\"required\"`\n\t// Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start\n\t// with `/`, contain at least one non-empty segment, and be at most 1,024 bytes.\n\t// Must not contain empty segments, `.` or `..` segments, control or format\n\t// characters, or the Unicode line and paragraph separators (U+2028, U+2029), and\n\t// must be NFC-normalized. Paths are case-sensitive.\n\tPath string `json:\"path\" api:\"required\"`\n\t// Query parameter for view\n\t//\n\t// Any of \"basic\", \"full\".\n\tView ManagedAgentsMemoryView `query:\"view,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r MemoryStoreMemoryNewParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryNewParams](#MemoryStoreMemoryNewParams)'s query parameters as \\`url.Values\\`.\n\n```go\nfunc (r *MemoryStoreMemoryNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MemoryStoreMemoryService struct {\n\tOptions []option.RequestOption\n}\n```\nMemoryStoreMemoryService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewMemoryStoreMemoryService](#NewMemoryStoreMemoryService) method instead.\n\n```go\nfunc NewMemoryStoreMemoryService(opts ...option.RequestOption) (r MemoryStoreMemoryService)\n```\nNewMemoryStoreMemoryService 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.\n\n```go\nfunc (r *MemoryStoreMemoryService) Delete(ctx context.Context, memoryID string, params MemoryStoreMemoryDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedMemory, err error)\n```\nDelete a memory\n\n```go\nfunc (r *MemoryStoreMemoryService) Get(ctx context.Context, memoryID string, params MemoryStoreMemoryGetParams, opts ...option.RequestOption) (res *ManagedAgentsMemory, err error)\n```\nRetrieve a memory\n\n```go\nfunc (r *MemoryStoreMemoryService) List(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsMemoryListItemUnion], err error)\n```\nList memories\n\n```go\nfunc (r *MemoryStoreMemoryService) ListAutoPaging(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsMemoryListItemUnion]\n```\nList memories\n\n```go\nfunc (r *MemoryStoreMemoryService) New(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryNewParams, opts ...option.RequestOption) (res *ManagedAgentsMemory, err error)\n```\nCreate a memory\n\n```go\nfunc (r *MemoryStoreMemoryService) Update(ctx context.Context, memoryID string, params MemoryStoreMemoryUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsMemory, err error)\n```\nUpdate a memory\n\n```go\ntype MemoryStoreMemoryUpdateParams struct {\n\tContentSha256 param.Opt[string] `json:\"content_sha256,omitzero\"`\n\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\n\tMemoryStoreID string `path:\"memory_store_id\" api:\"required\" json:\"-\"`\n\t// New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to\n\t// leave the content unchanged (e.g., for a rename-only update).\n\tContent param.Opt[string] `json:\"content,omitzero\"`\n\t// New path for the memory (a rename). Must start with `/`, contain at least one\n\t// non-empty segment, and be at most 1,024 bytes. Must not contain empty segments,\n\t// `.` or `..` segments, control or format characters, or the Unicode line and\n\t// paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are\n\t// case-sensitive. The memory's `id` is preserved across renames. Omit to leave the\n\t// path unchanged.\n\tPath param.Opt[string] `json:\"path,omitzero\"`\n\t// Query parameter for view\n\t//\n\t// Any of \"basic\", \"full\".\n\tView ManagedAgentsMemoryView `query:\"view,omitzero\" json:\"-\"`\n\t// Optimistic-concurrency precondition: the update applies only if the memory's\n\t// stored `content_sha256` equals the supplied value. On mismatch, the request\n\t// returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and\n\t// retry against the fresh state. If the precondition fails but the stored state\n\t// already exactly matches the requested `content` and `path`, the server returns\n\t// 200 instead of 409.\n\tPrecondition ManagedAgentsPreconditionParam `json:\"precondition,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r MemoryStoreMemoryUpdateParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryUpdateParams](#MemoryStoreMemoryUpdateParams)'s query parameters as \\`url.Values\\`.\n\n```go\nfunc (r *MemoryStoreMemoryUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MemoryStoreMemoryVersionGetParams struct {\n\tMemoryStoreID string `path:\"memory_store_id\" api:\"required\" json:\"-\"`\n\t// Query parameter for view\n\t//\n\t// Any of \"basic\", \"full\".\n\tView ManagedAgentsMemoryView `query:\"view,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryVersionGetParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryVersionGetParams](#MemoryStoreMemoryVersionGetParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype MemoryStoreMemoryVersionListParams struct {\n\t// Query parameter for api_key_id\n\tAPIKeyID param.Opt[string] `query:\"api_key_id,omitzero\" json:\"-\"`\n\t// Return versions created at or after this time (inclusive).\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return versions created at or before this time (inclusive).\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Query parameter for limit\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Query parameter for memory_id\n\tMemoryID param.Opt[string] `query:\"memory_id,omitzero\" json:\"-\"`\n\t// Query parameter for page\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Query parameter for service_account_id\n\tServiceAccountID param.Opt[string] `query:\"service_account_id,omitzero\" json:\"-\"`\n\t// Query parameter for session_id\n\tSessionID param.Opt[string] `query:\"session_id,omitzero\" json:\"-\"`\n\t// Query parameter for operation\n\t//\n\t// Any of \"created\", \"updated\", \"deleted\".\n\tOperation ManagedAgentsMemoryVersionOperation `query:\"operation,omitzero\" json:\"-\"`\n\t// Query parameter for view\n\t//\n\t// Any of \"basic\", \"full\".\n\tView ManagedAgentsMemoryView `query:\"view,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreMemoryVersionListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [MemoryStoreMemoryVersionListParams](#MemoryStoreMemoryVersionListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype MemoryStoreMemoryVersionRedactParams struct {\n\tMemoryStoreID string `path:\"memory_store_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype MemoryStoreMemoryVersionService struct {\n\tOptions []option.RequestOption\n}\n```\nMemoryStoreMemoryVersionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewMemoryStoreMemoryVersionService](#NewMemoryStoreMemoryVersionService) method instead.\n\n```go\nfunc NewMemoryStoreMemoryVersionService(opts ...option.RequestOption) (r MemoryStoreMemoryVersionService)\n```\nNewMemoryStoreMemoryVersionService 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.\n\n```go\nfunc (r *MemoryStoreMemoryVersionService) Get(ctx context.Context, memoryVersionID string, params MemoryStoreMemoryVersionGetParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryVersion, err error)\n```\nRetrieve a memory version\n\n```go\nfunc (r *MemoryStoreMemoryVersionService) List(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryVersionListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsMemoryVersion], err error)\n```\nList memory versions\n\n```go\nfunc (r *MemoryStoreMemoryVersionService) ListAutoPaging(ctx context.Context, memoryStoreID string, params MemoryStoreMemoryVersionListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsMemoryVersion]\n```\nList memory versions\n\n```go\nfunc (r *MemoryStoreMemoryVersionService) Redact(ctx context.Context, memoryVersionID string, params MemoryStoreMemoryVersionRedactParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryVersion, err error)\n```\nRedact a memory version\n\n```go\ntype MemoryStoreNewParams struct {\n\t// Human-readable name for the store. Required; 1–255 characters; no control\n\t// characters. The mount-path slug under `/mnt/memory/` is derived from this name\n\t// (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be\n\t// unique within a workspace.\n\tName string `json:\"name\" api:\"required\"`\n\t// Free-text description of what the store contains, up to 1024 characters.\n\t// Included in the agent's system prompt when the store is attached, so word it to\n\t// be useful to the agent.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// Arbitrary key-value tags for your own bookkeeping (such as the end user a store\n\t// belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters.\n\t// Not visible to the agent.\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *MemoryStoreNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MemoryStoreSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Include archived resources; defaults to false.\n\tIncludeArchived param.Opt[bool] `json:\"include_archived,omitzero\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtGte param.Opt[time.Time] `json:\"created_at[gte],omitzero\" format:\"date-time\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtLte param.Opt[time.Time] `json:\"created_at[lte],omitzero\" format:\"date-time\"`\n\tWorkspaceID  param.Opt[string]    `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nMemoryStoreSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r MemoryStoreSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *MemoryStoreSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MemoryStoreService struct {\n\tOptions        []option.RequestOption\n\tMemories       MemoryStoreMemoryService\n\tMemoryVersions MemoryStoreMemoryVersionService\n}\n```\nMemoryStoreService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewMemoryStoreService](#NewMemoryStoreService) method instead.\n\n```go\nfunc NewMemoryStoreService(opts ...option.RequestOption) (r MemoryStoreService)\n```\nNewMemoryStoreService 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.\n\n```go\nfunc (r *MemoryStoreService) Archive(ctx context.Context, memoryStoreID string, body MemoryStoreArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)\n```\nArchive a memory store\n\n```go\nfunc (r *MemoryStoreService) Delete(ctx context.Context, memoryStoreID string, body MemoryStoreDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedMemoryStore, err error)\n```\nDelete a memory store\n\n```go\nfunc (r *MemoryStoreService) Get(ctx context.Context, memoryStoreID string, query MemoryStoreGetParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)\n```\nRetrieve a memory store\n\n```go\nfunc (r *MemoryStoreService) List(ctx context.Context, params MemoryStoreListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsMemoryStore], err error)\n```\nList memory stores\n\n```go\nfunc (r *MemoryStoreService) ListAutoPaging(ctx context.Context, params MemoryStoreListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsMemoryStore]\n```\nList memory stores\n\n```go\nfunc (r *MemoryStoreService) New(ctx context.Context, params MemoryStoreNewParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)\n```\nCreate a memory store\n\n```go\nfunc (r *MemoryStoreService) Search(ctx context.Context, params MemoryStoreSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[ManagedAgentsMemoryStore], error)\n```\nSearch memory stores by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *MemoryStoreService) SearchAutoPaging(ctx context.Context, params MemoryStoreSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsMemoryStore]\n```\nSearchAutoPaging iterates all matching memory stores using opaque body cursors.\n\n```go\nfunc (r *MemoryStoreService) Update(ctx context.Context, memoryStoreID string, params MemoryStoreUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsMemoryStore, err error)\n```\nUpdate a memory store\n\n```go\ntype MemoryStoreUpdateParams struct {\n\t// New description for the store, up to 1024 characters. Pass an empty string to\n\t// clear it.\n\tDescription param.Opt[string] `json:\"description,omitzero\"`\n\t// New human-readable name for the store. 1–255 characters; no control characters.\n\t// Renaming changes the slug used for the store's `mount_path` in sessions created\n\t// after the update.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Metadata patch. Set a key to a string to upsert it, or to null to delete it.\n\t// Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars\n\t// each) with values up to 512 chars.\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r MemoryStoreUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *MemoryStoreUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Model = string\n```\nModel identifies a model available to the API.\n\n```go\ntype ModelCapabilities struct {\n\t// Whether the model supports the Batch API.\n\tBatch CapabilitySupport `json:\"batch\" api:\"required\"`\n\t// Whether the model supports citation generation.\n\tCitations CapabilitySupport `json:\"citations\" api:\"required\"`\n\t// Whether the model supports code execution tools.\n\tCodeExecution CapabilitySupport `json:\"code_execution\" api:\"required\"`\n\t// Context management support and available strategies.\n\tContextManagement ContextManagementCapability `json:\"context_management\" api:\"required\"`\n\t// Effort (reasoning_effort) support and available levels.\n\tEffort EffortCapability `json:\"effort\" api:\"required\"`\n\t// Whether the model accepts image content blocks.\n\tImageInput CapabilitySupport `json:\"image_input\" api:\"required\"`\n\t// Whether the model accepts PDF content blocks.\n\tPDFInput CapabilitySupport `json:\"pdf_input\" api:\"required\"`\n\t// Whether the model supports structured output / JSON mode / strict tool schemas.\n\tStructuredOutputs CapabilitySupport `json:\"structured_outputs\" api:\"required\"`\n\t// Thinking capability and supported type configurations.\n\tThinking ThinkingCapability `json:\"thinking\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tBatch             respjson.Field\n\t\tCitations         respjson.Field\n\t\tCodeExecution     respjson.Field\n\t\tContextManagement respjson.Field\n\t\tEffort            respjson.Field\n\t\tImageInput        respjson.Field\n\t\tPDFInput          respjson.Field\n\t\tStructuredOutputs respjson.Field\n\t\tThinking          respjson.Field\n\t\tExtraFields       map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nModel capability information.\n\n```go\nfunc (r ModelCapabilities) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ModelCapabilities) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ModelInfo struct {\n\tSource                  string   `json:\"source\"`\n\tIsEnabled               bool     `json:\"is_enabled\"`\n\tIsNew                   bool     `json:\"is_new\"`\n\tPriceFactor             float64  `json:\"price_factor\"`\n\tEfforts                 []string `json:\"efforts\"`\n\tDefaultEffort           string   `json:\"default_effort\"`\n\tDefaultContextWindow    int64    `json:\"default_context_window\"`\n\tAvailableContextWindows []int64  `json:\"available_context_windows\"`\n\n\t// Unique model identifier.\n\tID string `json:\"id\" api:\"required\"`\n\t// Model IDs this model accepts as `fallbacks[i].model` on the Messages API. An\n\t// empty list means the `fallbacks` parameter is not supported for this model as\n\t// primary.\n\tAllowedFallbackModels []string `json:\"allowed_fallback_models\" api:\"required\"`\n\t// Model capability information.\n\tCapabilities ModelCapabilities `json:\"capabilities\" api:\"required\"`\n\t// RFC 3339 datetime string representing the time at which the model was released.\n\t// May be set to an epoch value if the release date is unknown.\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// A human-readable name for the model.\n\tDisplayName string `json:\"display_name\" api:\"required\"`\n\t// Maximum input context window size in tokens for this model.\n\tMaxInputTokens int64 `json:\"max_input_tokens\" api:\"required\"`\n\t// Maximum value for the `max_tokens` parameter when using this model.\n\tMaxTokens int64 `json:\"max_tokens\" api:\"required\"`\n\t// Object type.\n\t//\n\t// For Models, this is always `\"model\"`.\n\tType constant.Model `json:\"type\" default:\"model\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSource                  respjson.Field\n\t\tIsEnabled               respjson.Field\n\t\tIsNew                   respjson.Field\n\t\tPriceFactor             respjson.Field\n\t\tEfforts                 respjson.Field\n\t\tDefaultEffort           respjson.Field\n\t\tDefaultContextWindow    respjson.Field\n\t\tAvailableContextWindows respjson.Field\n\n\t\tID                    respjson.Field\n\t\tAllowedFallbackModels respjson.Field\n\t\tCapabilities          respjson.Field\n\t\tCreatedAt             respjson.Field\n\t\tDisplayName           respjson.Field\n\t\tMaxInputTokens        respjson.Field\n\t\tMaxTokens             respjson.Field\n\t\tType                  respjson.Field\n\t\tExtraFields           map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r ModelInfo) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ModelInfo) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ModelListParams struct {\n\t// ID of the object to use as a cursor for pagination. When provided, returns the\n\t// page of results immediately after this object.\n\tAfterID param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\t// ID of the object to use as a cursor for pagination. When provided, returns the\n\t// page of results immediately before this object.\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\t// Number of items to return per page.\n\t//\n\t// Defaults to `20`. Ranges from `1` to `1000`.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r ModelListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [ModelListParams](#ModelListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype ModelService struct {\n\tOptions []option.RequestOption\n}\n```\nModelService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewModelService](#NewModelService) method instead.\n\n```go\nfunc NewModelService(opts ...option.RequestOption) (r ModelService)\n```\nNewModelService 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.\n\n```go\nfunc (r *ModelService) List(ctx context.Context, params ModelListParams, opts ...option.RequestOption) (res *pagination.Page[ModelInfo], err error)\n```\nList available models.\n\nThe Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.\n\n```go\nfunc (r *ModelService) ListAutoPaging(ctx context.Context, params ModelListParams, opts ...option.RequestOption) *pagination.PageAutoPager[ModelInfo]\n```\nList available models.\n\nThe Models API response can be used to determine which models are available for use in the API. More recently released models are listed first.\n\n```go\ntype MonetaryAmount struct {\n\t// Amount in minor units of the currency, as an integer decimal string with no\n\t// leading zeros: \"2500\" is $25.00 and \"50\" is fifty cents. A string rather than a\n\t// number so no float rounding is ever applied.\n\tAmount string `json:\"amount\" api:\"required\"`\n\t// Uppercase ISO-4217 currency code. `USD` is the only currency currently\n\t// supported; the accepted set is closed and grows only when a new currency is\n\t// priced.\n\t//\n\t// Any of \"USD\".\n\tCurrency Currency `json:\"currency\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAmount      respjson.Field\n\t\tCurrency    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nA monetary amount in a specific currency.\n\n```go\nfunc (r MonetaryAmount) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r MonetaryAmount) ToParam() MonetaryAmountParam\n```\nToParam converts this MonetaryAmount to a MonetaryAmountParam.\n\nWarning: 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()\n\n```go\nfunc (r *MonetaryAmount) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype MonetaryAmountParam struct {\n\t// Amount in minor units of the currency, as an integer decimal string with no\n\t// leading zeros: \"2500\" is $25.00 and \"50\" is fifty cents. A string rather than a\n\t// number so no float rounding is ever applied.\n\tAmount string `json:\"amount\" api:\"required\"`\n\t// Uppercase ISO-4217 currency code. `USD` is the only currency currently\n\t// supported; the accepted set is closed and grows only when a new currency is\n\t// priced.\n\t//\n\t// Any of \"USD\".\n\tCurrency Currency `json:\"currency,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nA monetary amount in a specific currency.\n\nThe properties Amount, Currency are required.\n\n```go\nfunc (r MonetaryAmountParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *MonetaryAmountParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OAuthService struct{ Options []option.RequestOption }\n```\n\n```go\nfunc NewOAuthService(opts ...option.RequestOption) OAuthService\n```\n\n```go\nfunc (r *OAuthService) Start(ctx context.Context, params OAuthStartParams, opts ...option.RequestOption) (res *OAuthStartResponse, err error)\n```\nStart returns an authorization URL; the user completes authorization in their browser.\n\n```go\ntype OAuthStartParams struct {\n\tWorkspaceID param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\n\tVaultID      string            `json:\"vault_id\"`\n\tMCPServerURL string            `json:\"mcp_server_url\"`\n\tClientID     param.Opt[string] `json:\"client_id,omitzero\"`\n\tClientSecret param.Opt[string] `json:\"client_secret,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r OAuthStartParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *OAuthStartParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OAuthStartResponse struct {\n\tAuthorizationURL string `json:\"authorization_url\"`\n\tState            string `json:\"state\"`\n\tCallbackOrigin   string `json:\"callback_origin\"`\n\tJSON             struct {\n\t\tAuthorizationURL respjson.Field\n\t\tState            respjson.Field\n\t\tCallbackOrigin   respjson.Field\n\t\tExtraFields      map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r OAuthStartResponse) RawJSON() string\n```\n\n```go\nfunc (r *OAuthStartResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OSSBucket struct {\n\tName                string              `json:\"name\"`\n\tProvider            string              `json:\"provider\"`\n\tRegion              string              `json:\"region\"`\n\tBucket              string              `json:\"bucket\"`\n\tPrefix              string              `json:\"prefix\"`\n\tAccess              string              `json:\"access\"`\n\tAcceleratorEndpoint string              `json:\"accelerator_endpoint\"`\n\tCredential          OSSBucketCredential `json:\"credential\"`\n\tJSON                struct {\n\t\tName                respjson.Field\n\t\tProvider            respjson.Field\n\t\tRegion              respjson.Field\n\t\tBucket              respjson.Field\n\t\tPrefix              respjson.Field\n\t\tAccess              respjson.Field\n\t\tAcceleratorEndpoint respjson.Field\n\t\tCredential          respjson.Field\n\t\tExtraFields         map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r OSSBucket) RawJSON() string\n```\n\n```go\nfunc (r *OSSBucket) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OSSBucketCredential struct {\n\tType        string `json:\"type\"`\n\tAccessKeyID string `json:\"access_key_id\"`\n\tJSON        struct {\n\t\tType        respjson.Field\n\t\tAccessKeyID respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nOSSBucketCredential is the API read view. It contains no role ARN or secret.\n\n```go\nfunc (r OSSBucketCredential) RawJSON() string\n```\n\n```go\nfunc (r *OSSBucketCredential) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OSSBucketCredentialParam struct {\n\tType            string            `json:\"type\" api:\"required\"`\n\tRoleArn         param.Opt[string] `json:\"role_arn,omitzero\"`\n\tAccessKeyID     param.Opt[string] `json:\"access_key_id,omitzero\"`\n\tAccessKeySecret param.Opt[string] `json:\"access_key_secret,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nOSSBucketCredentialParam accepts ram\\_role with RoleArn, or access\\_key with ID and secret. A read-view credential without secrets may be echoed to retain it on update.\n\n```go\nfunc (r OSSBucketCredentialParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *OSSBucketCredentialParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OSSBucketParam struct {\n\tName                string                   `json:\"name\" api:\"required\"`\n\tProvider            string                   `json:\"provider\" api:\"required\"`\n\tRegion              string                   `json:\"region\" api:\"required\"`\n\tBucket              string                   `json:\"bucket\" api:\"required\"`\n\tPrefix              param.Opt[string]        `json:\"prefix,omitzero\"`\n\tAccess              param.Opt[string]        `json:\"access,omitzero\"`\n\tAcceleratorEndpoint param.Opt[string]        `json:\"accelerator_endpoint,omitzero\"`\n\tCredential          OSSBucketCredentialParam `json:\"credential,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nOSSBucketParam requires credentials for new buckets. Omit Credential on update to retain it.\n\n```go\nfunc (r OSSBucketParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *OSSBucketParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorCreateNew struct {\n\t// Any of \"create_new\".\n\tType OutputBehaviorCreateNewType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe 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.\n\n```go\nfunc (r OutputBehaviorCreateNew) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r OutputBehaviorCreateNew) ToParam() OutputBehaviorCreateNewParam\n```\nToParam converts this OutputBehaviorCreateNew to a OutputBehaviorCreateNewParam.\n\nWarning: 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()\n\n```go\nfunc (r *OutputBehaviorCreateNew) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorCreateNewParam struct {\n\t// Any of \"create_new\".\n\tType OutputBehaviorCreateNewType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nThe 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.\n\nThe property Type is required.\n\n```go\nfunc (r OutputBehaviorCreateNewParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *OutputBehaviorCreateNewParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorCreateNewType string\n```\n\n```go\nconst (\n\tOutputBehaviorCreateNewTypeCreateNew OutputBehaviorCreateNewType = \"create_new\"\n)\n```\n\n```go\ntype OutputBehaviorUnion struct {\n\t// Any of \"create_new\", \"update_existing\".\n\tType string `json:\"type\"`\n\t// This field is from variant [OutputBehaviorUpdateExisting].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\tJSON          struct {\n\t\tType          respjson.Field\n\t\tMemoryStoreID respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nOutputBehaviorUnion contains all possible properties and values from [OutputBehaviorCreateNew](#OutputBehaviorCreateNew), [OutputBehaviorUpdateExisting](#OutputBehaviorUpdateExisting).\n\nUse the [OutputBehaviorUnion.AsAny](#OutputBehaviorUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u OutputBehaviorUnion) AsAny() anyOutputBehavior\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := OutputBehaviorUnion.AsAny().(type) {\n\tcase qoder.OutputBehaviorCreateNew:\n\tcase qoder.OutputBehaviorUpdateExisting:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u OutputBehaviorUnion) AsCreateNew() (v OutputBehaviorCreateNew)\n```\n\n```go\nfunc (u OutputBehaviorUnion) AsUpdateExisting() (v OutputBehaviorUpdateExisting)\n```\n\n```go\nfunc (u OutputBehaviorUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r OutputBehaviorUnion) ToParam() OutputBehaviorUnionParam\n```\nToParam converts this OutputBehaviorUnion to a OutputBehaviorUnionParam.\n\nWarning: 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()\n\n```go\nfunc (r *OutputBehaviorUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorUnionParam struct {\n\tOfCreateNew      *OutputBehaviorCreateNewParam      `json:\",omitzero,inline\"`\n\tOfUpdateExisting *OutputBehaviorUpdateExistingParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc OutputBehaviorParamOfCreateNew(type_ OutputBehaviorCreateNewType) OutputBehaviorUnionParam\n```\n\n```go\nfunc OutputBehaviorParamOfUpdateExisting(memoryStoreID string) OutputBehaviorUnionParam\n```\n\n```go\nfunc (u OutputBehaviorUnionParam) GetMemoryStoreID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u OutputBehaviorUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u OutputBehaviorUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *OutputBehaviorUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorUpdateExisting struct {\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"update_existing\".\n\tType OutputBehaviorUpdateExistingType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMemoryStoreID respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThe 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.\n\n```go\nfunc (r OutputBehaviorUpdateExisting) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r OutputBehaviorUpdateExisting) ToParam() OutputBehaviorUpdateExistingParam\n```\nToParam converts this OutputBehaviorUpdateExisting to a OutputBehaviorUpdateExistingParam.\n\nWarning: 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()\n\n```go\nfunc (r *OutputBehaviorUpdateExisting) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorUpdateExistingParam struct {\n\tMemoryStoreID string `json:\"memory_store_id\" api:\"required\"`\n\t// Any of \"update_existing\".\n\tType OutputBehaviorUpdateExistingType `json:\"type,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nThe 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.\n\nThe properties MemoryStoreID, Type are required.\n\n```go\nfunc (r OutputBehaviorUpdateExistingParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *OutputBehaviorUpdateExistingParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype OutputBehaviorUpdateExistingType string\n```\n\n```go\nconst (\n\tOutputBehaviorUpdateExistingTypeUpdateExisting OutputBehaviorUpdateExistingType = \"update_existing\"\n)\n```\n\n```go\ntype Packages struct {\n\t// Ubuntu/Debian packages to install\n\tApt []string `json:\"apt\" api:\"required\"`\n\t// Rust packages to install\n\tCargo []string `json:\"cargo\" api:\"required\"`\n\t// Ruby packages to install\n\tGem []string `json:\"gem\" api:\"required\"`\n\t// Go packages to install\n\tGo []string `json:\"go\" api:\"required\"`\n\t// Node.js packages to install\n\tNpm []string `json:\"npm\" api:\"required\"`\n\t// Python packages to install\n\tPip []string `json:\"pip\" api:\"required\"`\n\t// Package configuration type\n\t//\n\t// Any of \"packages\".\n\tType PackagesType `json:\"type\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tApt         respjson.Field\n\t\tCargo       respjson.Field\n\t\tGem         respjson.Field\n\t\tGo          respjson.Field\n\t\tNpm         respjson.Field\n\t\tPip         respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nPackages (and their versions) available in this environment.\n\n```go\nfunc (r Packages) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *Packages) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype PackagesParams struct {\n\t// Ubuntu/Debian packages to install\n\tApt []string `json:\"apt,omitzero\"`\n\t// Rust packages to install\n\tCargo []string `json:\"cargo,omitzero\"`\n\t// Ruby packages to install\n\tGem []string `json:\"gem,omitzero\"`\n\t// Go packages to install\n\tGo []string `json:\"go,omitzero\"`\n\t// Node.js packages to install\n\tNpm []string `json:\"npm,omitzero\"`\n\t// Python packages to install\n\tPip []string `json:\"pip,omitzero\"`\n\t// Package configuration type\n\t//\n\t// Any of \"packages\".\n\tType PackagesParamsType `json:\"type,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nSpecify packages (and optionally their versions) available in this environment.\n\nWhen 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.\n\nUnder \\`limited\\` networking, requires \\`networking.allow\\_package\\_managers\\` to be \\`true\\`.\n\n```go\nfunc (r PackagesParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *PackagesParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype PackagesParamsType string\n```\nPackage configuration type\n\n```go\nconst (\n\tPackagesParamsTypePackages PackagesParamsType = \"packages\"\n)\n```\n\n```go\ntype PackagesType string\n```\nPackage configuration type\n\n```go\nconst (\n\tPackagesTypePackages PackagesType = \"packages\"\n)\n```\n\n```go\ntype PlainTextSourceParam struct {\n\tData string `json:\"data\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"text/plain\".\n\tMediaType constant.TextPlain `json:\"media_type\" default:\"text/plain\"`\n\t// This field can be elided, and will marshal its zero value as \"text\".\n\tType constant.Text `json:\"type\" default:\"text\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Data, MediaType, Type are required.\n\n```go\nfunc (r PlainTextSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *PlainTextSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype QoderBeta = string\n```\n\n```go\ntype RedactedThinkingBlockParam struct {\n\t// The `data` value of this redacted thinking block, exactly as returned by the API\n\t// in a previous response. Opaque and encrypted; pass it back unchanged.\n\tData string `json:\"data\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"redacted_thinking\".\n\tType constant.RedactedThinking `json:\"type\" default:\"redacted_thinking\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Data, Type are required.\n\n```go\nfunc (r RedactedThinkingBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *RedactedThinkingBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestDocumentBlockParam struct {\n\tSource  RequestDocumentBlockSourceUnionParam `json:\"source,omitzero\" api:\"required\"`\n\tContext param.Opt[string]                    `json:\"context,omitzero\"`\n\tTitle   param.Opt[string]                    `json:\"title,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\tCitations    CitationsConfigParam       `json:\"citations,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"document\".\n\tType constant.Document `json:\"type\" default:\"document\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Source, Type are required.\n\n```go\nfunc (r RequestDocumentBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *RequestDocumentBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestDocumentBlockSourceUnionParam struct {\n\tOfBase64  *Base64PDFSourceParam    `json:\",omitzero,inline\"`\n\tOfText    *PlainTextSourceParam    `json:\",omitzero,inline\"`\n\tOfContent *ContentBlockSourceParam `json:\",omitzero,inline\"`\n\tOfURL     *URLPDFSourceParam       `json:\",omitzero,inline\"`\n\tOfFile    *FileDocumentSourceParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) GetContent() *ContentBlockSourceContentUnionParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) GetData() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) GetMediaType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestDocumentBlockSourceUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *RequestDocumentBlockSourceUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestMCPToolResultBlockParam struct {\n\tToolUseID string          `json:\"tool_use_id\" api:\"required\"`\n\tIsError   param.Opt[bool] `json:\"is_error,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam                 `json:\"cache_control,omitzero\"`\n\tContent      RequestMCPToolResultBlockParamContentUnion `json:\"content,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"mcp_tool_result\".\n\tType constant.MCPToolResult `json:\"type\" default:\"mcp_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ToolUseID, Type are required.\n\n```go\nfunc (r RequestMCPToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *RequestMCPToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestMCPToolResultBlockParamContentUnion struct {\n\tOfString                    param.Opt[string] `json:\",omitzero,inline\"`\n\tOfMCPToolResultBlockContent []TextBlockParam  `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u RequestMCPToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *RequestMCPToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestToolAdditionBlockParam struct {\n\t// Reference to a single tool the caller declared directly in `tools[]`. Does not\n\t// accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n\t// tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n\tTool RequestToolAdditionBlockToolUnionParam `json:\"tool,omitzero\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"tool_addition\".\n\tType constant.ToolAddition `json:\"type\" default:\"tool_addition\"`\n\t// contains filtered or unexported fields\n}\n```\nMid-conversation directive to surface a declared tool.\n\n\\`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.\n\nThe properties Tool, Type are required.\n\n```go\nfunc (r RequestToolAdditionBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *RequestToolAdditionBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestToolAdditionBlockToolUnionParam struct {\n\tOfToolReference       *ToolChangeToolReferenceParam       `json:\",omitzero,inline\"`\n\tOfMCPToolReference    *ToolChangeMCPToolReferenceParam    `json:\",omitzero,inline\"`\n\tOfMCPToolsetReference *ToolChangeMCPToolsetReferenceParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u RequestToolAdditionBlockToolUnionParam) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestToolAdditionBlockToolUnionParam) GetServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestToolAdditionBlockToolUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestToolAdditionBlockToolUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *RequestToolAdditionBlockToolUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestToolRemovalBlockParam struct {\n\t// Reference to a single tool the caller declared directly in `tools[]`. Does not\n\t// accept the composed `{server}_{name}` form the server assigns to MCP-resolved\n\t// tools — use `mcp_tool_reference` or `mcp_toolset_reference` for those.\n\tTool RequestToolRemovalBlockToolUnionParam `json:\"tool,omitzero\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"tool_removal\".\n\tType constant.ToolRemoval `json:\"type\" default:\"tool_removal\"`\n\t// contains filtered or unexported fields\n}\n```\nMid-conversation directive to withdraw a tool.\n\n\\`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.\n\nThe properties Tool, Type are required.\n\n```go\nfunc (r RequestToolRemovalBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *RequestToolRemovalBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype RequestToolRemovalBlockToolUnionParam struct {\n\tOfToolReference       *ToolChangeToolReferenceParam       `json:\",omitzero,inline\"`\n\tOfMCPToolReference    *ToolChangeMCPToolReferenceParam    `json:\",omitzero,inline\"`\n\tOfMCPToolsetReference *ToolChangeMCPToolsetReferenceParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u RequestToolRemovalBlockToolUnionParam) GetName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestToolRemovalBlockToolUnionParam) GetServerName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestToolRemovalBlockToolUnionParam) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u RequestToolRemovalBlockToolUnionParam) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *RequestToolRemovalBlockToolUnionParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ResumableSessionEventStream struct {\n\t// contains filtered or unexported fields\n}\n```\nResumableSessionEventStream is a Session Event stream that reconnects after retryable HTTP, transport, read, and unexpected EOF failures.\n\n```go\nfunc (s *ResumableSessionEventStream) Close() error\n```\n\n```go\nfunc (s *ResumableSessionEventStream) Current() ManagedAgentsStreamSessionEventsUnion\n```\n\n```go\nfunc (s *ResumableSessionEventStream) Err() error\n```\n\n```go\nfunc (s *ResumableSessionEventStream) LastEventID() string\n```\n\n```go\nfunc (s *ResumableSessionEventStream) Next() bool\n```\n\n```go\ntype ResumableSessionThreadEventStream struct {\n\t// contains filtered or unexported fields\n}\n```\nResumableSessionThreadEventStream reconnects a single thread's event stream. A thread/session termination or session deletion event ends the stream normally.\n\n```go\nfunc (s *ResumableSessionThreadEventStream) Close() error\n```\n\n```go\nfunc (s *ResumableSessionThreadEventStream) Current() ManagedAgentsStreamSessionThreadEventsUnion\n```\n\n```go\nfunc (s *ResumableSessionThreadEventStream) Err() error\n```\n\n```go\nfunc (s *ResumableSessionThreadEventStream) LastEventID() string\n```\n\n```go\nfunc (s *ResumableSessionThreadEventStream) Next() bool\n```\n\n```go\ntype SearchResultBlockParam struct {\n\tContent []TextBlockParam `json:\"content,omitzero\" api:\"required\"`\n\tSource  string           `json:\"source\" api:\"required\"`\n\tTitle   string           `json:\"title\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\tCitations    CitationsConfigParam       `json:\"citations,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"search_result\".\n\tType constant.SearchResult `json:\"type\" default:\"search_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, Source, Title, Type are required.\n\n```go\nfunc (r SearchResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SearchResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedConfig struct {\n\t// Runs on sandbox start/resume; self-hosted execution depends on the worker.\n\tStartupScript string `json:\"startup_script\"`\n\tSetupScript   string `json:\"setup_script\"`\n\t// Environment type\n\tType constant.SelfHosted `json:\"type\" default:\"self_hosted\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tStartupScript respjson.Field\n\t\tSetupScript   respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nConfiguration for self-hosted environments.\n\n```go\nfunc (r SelfHostedConfig) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SelfHostedConfig) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedConfigParams struct {\n\t// Runs on sandbox start/resume; self-hosted execution depends on the worker.\n\tStartupScript param.Opt[string] `json:\"startup_script,omitzero\"`\n\tSetupScript   param.Opt[string] `json:\"setup_script,omitzero\"`\n\t// Environment type\n\tType constant.SelfHosted `json:\"type\" default:\"self_hosted\"`\n\t// contains filtered or unexported fields\n}\n```\nRequest params for \\`self\\_hosted\\` environment configuration.\n\nThis struct has a constant value, construct it with [NewSelfHostedConfigParams](#NewSelfHostedConfigParams).\n\n```go\nfunc NewSelfHostedConfigParams() SelfHostedConfigParams\n```\n\n```go\nfunc (r SelfHostedConfigParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SelfHostedConfigParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedWork struct {\n\t// Work identifier (e.g., 'work\\_...')\n\tID string `json:\"id\" api:\"required\"`\n\t// RFC 3339 timestamp when work was acknowledged by Environment Manager\n\tAcknowledgedAt string `json:\"acknowledged_at\" api:\"required\"`\n\t// RFC 3339 timestamp when work was created\n\tCreatedAt string `json:\"created_at\" api:\"required\"`\n\t// The actual work to be performed\n\tData SessionWorkData `json:\"data\" api:\"required\"`\n\t// Environment identifier this work belongs to (e.g., `env_...`)\n\tEnvironmentID string `json:\"environment_id\" api:\"required\"`\n\t// RFC 3339 timestamp of the most recent heartbeat\n\tLatestHeartbeatAt string `json:\"latest_heartbeat_at\" api:\"required\"`\n\t// User-provided metadata key-value pairs associated with this work item\n\tMetadata map[string]string `json:\"metadata\" api:\"required\"`\n\t// Credential payload used by the environment worker to execute this work item. May\n\t// be populated when polling for work; null on all other retrieval paths.\n\tSecret string `json:\"secret\" api:\"required\"`\n\t// RFC 3339 timestamp when work execution started\n\tStartedAt string `json:\"started_at\" api:\"required\"`\n\t// Current state of the work item\n\t//\n\t// Any of \"queued\", \"starting\", \"active\", \"stopping\", \"stopped\".\n\tState SelfHostedWorkState `json:\"state\" api:\"required\"`\n\t// RFC 3339 timestamp when stop was requested\n\tStopRequestedAt string `json:\"stop_requested_at\" api:\"required\"`\n\t// RFC 3339 timestamp when work execution stopped\n\tStoppedAt string `json:\"stopped_at\" api:\"required\"`\n\t// The type of object (always 'work')\n\tType constant.Work `json:\"type\" default:\"work\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID                respjson.Field\n\t\tAcknowledgedAt    respjson.Field\n\t\tCreatedAt         respjson.Field\n\t\tData              respjson.Field\n\t\tEnvironmentID     respjson.Field\n\t\tLatestHeartbeatAt respjson.Field\n\t\tMetadata          respjson.Field\n\t\tSecret            respjson.Field\n\t\tStartedAt         respjson.Field\n\t\tState             respjson.Field\n\t\tStopRequestedAt   respjson.Field\n\t\tStoppedAt         respjson.Field\n\t\tType              respjson.Field\n\t\tExtraFields       map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nWork resource representing a unit of work in a self-hosted environment.\n\nWork 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.\n\n```go\nfunc (r SelfHostedWork) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SelfHostedWork) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedWorkHeartbeatResponse struct {\n\t// RFC 3339 timestamp of the actual heartbeat from DB\n\tLastHeartbeat string `json:\"last_heartbeat\" api:\"required\"`\n\t// Whether the heartbeat succeeded in extending the lease\n\tLeaseExtended bool `json:\"lease_extended\" api:\"required\"`\n\t// Current state of the work item (active/stopping/stopped)\n\t//\n\t// Any of \"queued\", \"starting\", \"active\", \"stopping\", \"stopped\".\n\tState SelfHostedWorkHeartbeatResponseState `json:\"state\" api:\"required\"`\n\t// Effective TTL applied to the lease\n\tTTLSeconds int64 `json:\"ttl_seconds\" api:\"required\"`\n\t// The type of response\n\tType constant.WorkHeartbeat `json:\"type\" default:\"work_heartbeat\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tLastHeartbeat respjson.Field\n\t\tLeaseExtended respjson.Field\n\t\tState         respjson.Field\n\t\tTTLSeconds    respjson.Field\n\t\tType          respjson.Field\n\t\tExtraFields   map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResponse after recording a heartbeat for a work item.\n\n```go\nfunc (r SelfHostedWorkHeartbeatResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SelfHostedWorkHeartbeatResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedWorkHeartbeatResponseState string\n```\nCurrent state of the work item (active/stopping/stopped)\n\n```go\nconst (\n\tSelfHostedWorkHeartbeatResponseStateQueued   SelfHostedWorkHeartbeatResponseState = \"queued\"\n\tSelfHostedWorkHeartbeatResponseStateStarting SelfHostedWorkHeartbeatResponseState = \"starting\"\n\tSelfHostedWorkHeartbeatResponseStateActive   SelfHostedWorkHeartbeatResponseState = \"active\"\n\tSelfHostedWorkHeartbeatResponseStateStopping SelfHostedWorkHeartbeatResponseState = \"stopping\"\n\tSelfHostedWorkHeartbeatResponseStateStopped  SelfHostedWorkHeartbeatResponseState = \"stopped\"\n)\n```\n\n```go\ntype SelfHostedWorkListResponse struct {\n\t// List of work items\n\tData []SelfHostedWork `json:\"data\" api:\"required\"`\n\t// Opaque cursor for fetching the next page of results\n\tNextPage string `json:\"next_page\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tData        respjson.Field\n\t\tNextPage    respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nResponse when listing work items with cursor-based pagination.\n\n```go\nfunc (r SelfHostedWorkListResponse) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SelfHostedWorkListResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedWorkQueueStats struct {\n\t// Number of work items waiting to be picked up (lag from consumer group)\n\tDepth int64 `json:\"depth\" api:\"required\"`\n\t// RFC 3339 timestamp of oldest item in the work stream (includes both queued and\n\t// pending items), null if stream empty\n\tOldestQueuedAt string `json:\"oldest_queued_at\" api:\"required\"`\n\t// Number of work items being processed (polled but not acknowledged)\n\tPending int64 `json:\"pending\" api:\"required\"`\n\t// The type of object\n\tType constant.WorkQueueStats `json:\"type\" default:\"work_queue_stats\"`\n\t// Number of workers that have polled for work in the last 30 seconds. Requires\n\t// worker_id to be sent with poll requests.\n\tWorkersPolling int64 `json:\"workers_polling\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tDepth          respjson.Field\n\t\tOldestQueuedAt respjson.Field\n\t\tPending        respjson.Field\n\t\tType           respjson.Field\n\t\tWorkersPolling respjson.Field\n\t\tExtraFields    map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nStatistics about the work queue for an environment.\n\nUses Redis Stream consumer group metrics for O(1) queries.\n\n```go\nfunc (r SelfHostedWorkQueueStats) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SelfHostedWorkQueueStats) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedWorkState string\n```\nCurrent state of the work item\n\n```go\nconst (\n\tSelfHostedWorkStateQueued   SelfHostedWorkState = \"queued\"\n\tSelfHostedWorkStateStarting SelfHostedWorkState = \"starting\"\n\tSelfHostedWorkStateActive   SelfHostedWorkState = \"active\"\n\tSelfHostedWorkStateStopping SelfHostedWorkState = \"stopping\"\n\tSelfHostedWorkStateStopped  SelfHostedWorkState = \"stopped\"\n)\n```\n\n```go\ntype SelfHostedWorkStopRequestParam struct {\n\t// If true, immediately stop work without graceful shutdown\n\tForce param.Opt[bool] `json:\"force,omitzero\"`\n\t// contains filtered or unexported fields\n}\n```\nRequest to stop a work item.\n\n```go\nfunc (r SelfHostedWorkStopRequestParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SelfHostedWorkStopRequestParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SelfHostedWorkUpdateRequestParam struct {\n\t// Metadata patch. Set a key to a string to upsert it, or to null to delete it.\n\t// Omit the field to preserve existing metadata.\n\tMetadata map[string]any `json:\"metadata,omitzero\" api:\"required\"`\n\t// contains filtered or unexported fields\n}\n```\nRequest to update work item metadata.\n\nThe property Metadata is required.\n\n```go\nfunc (r SelfHostedWorkUpdateRequestParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SelfHostedWorkUpdateRequestParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServerToolCaller20260120Param struct {\n\tToolID string `json:\"tool_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"code_execution_20260120\".\n\tType constant.CodeExecution20260120 `json:\"type\" default:\"code_execution_20260120\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ToolID, Type are required.\n\n```go\nfunc (r ServerToolCaller20260120Param) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ServerToolCaller20260120Param) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServerToolCallerParam struct {\n\tToolID string `json:\"tool_id\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"code_execution_20250825\".\n\tType constant.CodeExecution20250825 `json:\"type\" default:\"code_execution_20250825\"`\n\t// contains filtered or unexported fields\n}\n```\nTool invocation generated by a server-side tool.\n\nThe properties ToolID, Type are required.\n\n```go\nfunc (r ServerToolCallerParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ServerToolCallerParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServerToolUseBlockParam struct {\n\tID    string `json:\"id\" api:\"required\"`\n\tInput any    `json:\"input,omitzero\" api:\"required\"`\n\t// Any of \"advisor\", \"web_search\", \"web_fetch\", \"code_execution\",\n\t// \"bash_code_execution\", \"text_editor_code_execution\", \"tool_search_tool_regex\",\n\t// \"tool_search_tool_bm25\".\n\tName ServerToolUseBlockParamName `json:\"name,omitzero\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// Tool invocation directly from the model.\n\tCaller ServerToolUseBlockParamCallerUnion `json:\"caller,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"server_tool_use\".\n\tType constant.ServerToolUse `json:\"type\" default:\"server_tool_use\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ID, Input, Name, Type are required.\n\n```go\nfunc (r ServerToolUseBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ServerToolUseBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServerToolUseBlockParamCallerUnion struct {\n\tOfDirect                *DirectCallerParam             `json:\",omitzero,inline\"`\n\tOfCodeExecution20250825 *ServerToolCallerParam         `json:\",omitzero,inline\"`\n\tOfCodeExecution20260120 *ServerToolCaller20260120Param `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ServerToolUseBlockParamCallerUnion) GetToolID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ServerToolUseBlockParamCallerUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ServerToolUseBlockParamCallerUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ServerToolUseBlockParamCallerUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ServerToolUseBlockParamName string\n```\n\n```go\ntype SessionArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionCancelParams struct {\n\tWorkspaceID param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\tBetas       []QoderBeta       `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r *SessionCancelParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionCancelResponse struct {\n\tID     string `json:\"id\"`\n\tType   string `json:\"type\"`\n\tStatus string `json:\"status\"`\n\tJSON   struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tStatus      respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r SessionCancelResponse) RawJSON() string\n```\n\n```go\nfunc (r *SessionCancelResponse) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionDeleteParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionEventListParams struct {\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Return events created after this time (exclusive). Compared against the event's\n\t// `processed_at` value.\n\tCreatedAtGt param.Opt[time.Time] `query:\"created_at[gt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return events created at or after this time (inclusive). Compared against the\n\t// event's `processed_at` value.\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return events created before this time (exclusive). Compared against the event's\n\t// `processed_at` value.\n\tCreatedAtLt param.Opt[time.Time] `query:\"created_at[lt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return events created at or before this time (inclusive). Compared against the\n\t// event's `processed_at` value.\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Query parameter for limit\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor from a previous response's `next_page`.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Sort direction for results, ordered by the event's `processed_at`. Defaults to\n\t// `asc` (chronological).\n\t//\n\t// Any of \"asc\", \"desc\".\n\tOrder SessionEventListParamsOrder `query:\"order,omitzero\" json:\"-\"`\n\t// Filter by event type. Values match the `type` field on returned events (for\n\t// example, `user.message` or `agent.tool_use`). Omit to return all event types.\n\tTypes []string `query:\"types,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionEventListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionEventListParams](#SessionEventListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionEventListParamsOrder string\n```\nSort direction for results, ordered by the event's \\`processed\\_at\\`. Defaults to \\`asc\\` (chronological).\n\n```go\nconst (\n\tSessionEventListParamsOrderAsc  SessionEventListParamsOrder = \"asc\"\n\tSessionEventListParamsOrderDesc SessionEventListParamsOrder = \"desc\"\n)\n```\n\n```go\ntype SessionEventSendParams struct {\n\t// Events to send to the `session`.\n\tEvents []ManagedAgentsEventParamsUnion `json:\"events,omitzero\" api:\"required\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionEventSendParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SessionEventSendParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionEventService struct {\n\tOptions []option.RequestOption\n}\n```\nSessionEventService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSessionEventService](#NewSessionEventService) method instead.\n\n```go\nfunc NewSessionEventService(opts ...option.RequestOption) (r SessionEventService)\n```\nNewSessionEventService 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.\n\n```go\nfunc (r *SessionEventService) List(ctx context.Context, sessionID string, params SessionEventListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsSessionEventUnion], err error)\n```\nList Events\n\n```go\nfunc (r *SessionEventService) ListAutoPaging(ctx context.Context, sessionID string, params SessionEventListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsSessionEventUnion]\n```\nList Events\n\n```go\nfunc (r *SessionEventService) NewResumableStream(ctx context.Context, sessionID string, params SessionEventStreamParams, opts ...option.RequestOption) *ResumableSessionEventStream\n```\nNewResumableStream subscribes to Session Events and reconnects retryable failures with the latest yielded Last-Event-ID cursor.\n\n```go\nfunc (r *SessionEventService) Send(ctx context.Context, sessionID string, params SessionEventSendParams, opts ...option.RequestOption) (res *ManagedAgentsSendSessionEvents, err error)\n```\nSend Events\n\n```go\nfunc (r *SessionEventService) StreamEvents(ctx context.Context, sessionID string, params SessionEventStreamParams, opts ...option.RequestOption) (stream *ssestream.Stream[ManagedAgentsStreamSessionEventsUnion])\n```\nStream Events\n\n```go\ntype SessionEventStreamParams struct {\n\t// When set, this connection also receives streaming deltas (`event_start`,\n\t// `event_delta`) while an event is being produced, before the event itself\n\t// arrives. Deltas are best-effort; when the final event is produced it carries the\n\t// complete content. A model request that ends early (an error or interrupt)\n\t// produces no final event — its terminal `span.model_request_end` closes the\n\t// preview. Accepts one or more event types to preview and may be repeated:\n\t// `agent.message` streams `content_delta` fragments; `agent.thinking` is\n\t// start-only — a signal that the agent has begun extended thinking, concluded by\n\t// the `agent.thinking` event itself. Only previews of the requested event types\n\t// are sent.\n\tEventDeltas []ManagedAgentsDeltaType `query:\"event_deltas,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// Resume the subscription after this Event ID.\n\tLastEventID param.Opt[string] `header:\"Last-Event-ID,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionEventStreamParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionEventStreamParams](#SessionEventStreamParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionListParams struct {\n\t// Filter sessions created with this agent ID.\n\tAgentID param.Opt[string] `query:\"agent_id,omitzero\" json:\"-\"`\n\t// Filter by agent version. Only applies when `agent_id` is also set.\n\tAgentVersion param.Opt[int64] `query:\"agent_version,omitzero\" json:\"-\"`\n\t// Return sessions created after this time (exclusive).\n\tCreatedAtGt param.Opt[time.Time] `query:\"created_at[gt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return sessions created at or after this time (inclusive).\n\tCreatedAtGte param.Opt[time.Time] `query:\"created_at[gte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return sessions created before this time (exclusive).\n\tCreatedAtLt param.Opt[time.Time] `query:\"created_at[lt],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Return sessions created at or before this time (inclusive).\n\tCreatedAtLte param.Opt[time.Time] `query:\"created_at[lte],omitzero\" format:\"date-time\" json:\"-\"`\n\t// Filter sessions created by this deployment ID.\n\tDeploymentID param.Opt[string] `query:\"deployment_id,omitzero\" json:\"-\"`\n\t// When true, includes archived sessions. Default: false (exclude archived).\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum number of results to return.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Filter sessions whose resources contain a `memory_store` with this memory store\n\t// ID.\n\tMemoryStoreID param.Opt[string] `query:\"memory_store_id,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor from a previous response.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Sort direction for results, ordered by `created_at`. Defaults to `desc` (newest\n\t// first).\n\t//\n\t// Any of \"asc\", \"desc\".\n\tOrder SessionListParamsOrder `query:\"order,omitzero\" json:\"-\"`\n\t// Filter by session status. Repeat the parameter to match any of multiple\n\t// statuses.\n\t//\n\t// Any of \"rescheduling\", \"running\", \"idle\", \"terminated\".\n\tStatuses []string `query:\"statuses,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionListParams](#SessionListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionListParamsOrder string\n```\nSort direction for results, ordered by \\`created\\_at\\`. Defaults to \\`desc\\` (newest first).\n\n```go\nconst (\n\tSessionListParamsOrderAsc  SessionListParamsOrder = \"asc\"\n\tSessionListParamsOrderDesc SessionListParamsOrder = \"desc\"\n)\n```\n\n```go\ntype SessionNewParams struct {\n\tEnvironmentVariables map[string]string `json:\"environment_variables,omitzero\"`\n\n\t// Agent identifier. Accepts the `agent` ID string, which pins the latest version\n\t// for the session, or an `agent` object with both id and version specified.\n\tAgent SessionNewParamsAgentUnion `json:\"agent,omitzero\" api:\"required\"`\n\t// ID of the `environment` defining the container configuration for this session.\n\tEnvironmentID string `json:\"environment_id\" api:\"required\"`\n\t// BYOC tunnel used for MCP requests from this session.\n\tTunnelID param.Opt[string] `json:\"tunnel_id,omitzero\"`\n\t// Human-readable session title.\n\tTitle param.Opt[string] `json:\"title,omitzero\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimitParam `json:\"budget,omitzero\"`\n\t// Initial events to send to the `session` at creation, processed in order.\n\t// Supports `user.message` and `user.define_outcome` events. Maximum 50 events.\n\tInitialEvents []SessionNewParamsInitialEventUnion `json:\"initial_events,omitzero\"`\n\t// Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up\n\t// to 64 chars, values up to 512 chars.\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Resources (e.g. repositories, files) to mount into the session's container.\n\tResources []SessionNewParamsResourceUnion `json:\"resources,omitzero\"`\n\t// Vault IDs for stored credentials the agent can use during the session.\n\tVaultIDs []string `json:\"vault_ids,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SessionNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionNewParamsAgentUnion struct {\n\tOfString                           param.Opt[string]                      `json:\",omitzero,inline\"`\n\tOfManagedAgentsAgents              *ManagedAgentsAgentParams              `json:\",omitzero,inline\"`\n\tOfManagedAgentsAgentWithOverridess *ManagedAgentsAgentWithOverridesParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetMCPServers() []ManagedAgentsURLMCPServerParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetModel() *ManagedAgentsModelConfigParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetSkills() []ManagedAgentsSkillParamsUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetSystem() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetTools() []ManagedAgentsAgentWithOverridesParamsToolUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) GetVersion() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsAgentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *SessionNewParamsAgentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionNewParamsInitialEventUnion struct {\n\tOfUserMessage       *ManagedAgentsUserMessageEventParams       `json:\",omitzero,inline\"`\n\tOfUserDefineOutcome *ManagedAgentsUserDefineOutcomeEventParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u SessionNewParamsInitialEventUnion) GetContent() []ManagedAgentsUserMessageEventParamsContentUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsInitialEventUnion) GetDescription() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsInitialEventUnion) GetMaxIterations() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsInitialEventUnion) GetRubric() *ManagedAgentsUserDefineOutcomeEventParamsRubricUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsInitialEventUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsInitialEventUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *SessionNewParamsInitialEventUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionNewParamsResourceUnion struct {\n\tOfGitRepository    *ManagedAgentsGitRepositoryResourceParams    `json:\",omitzero,inline\"`\n\tOfGitHubRepository *ManagedAgentsGitHubRepositoryResourceParams `json:\",omitzero,inline\"`\n\tOfFile             *ManagedAgentsFileResourceParams             `json:\",omitzero,inline\"`\n\tOfMemoryStore      *ManagedAgentsMemoryStoreResourceParam       `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetAccess() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetAuthorizationToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetCheckout() *ManagedAgentsGitHubRepositoryResourceParamsCheckoutUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetFileID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetInstructions() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetMemoryStoreID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetMountPath() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetPassword() *string\n```\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u SessionNewParamsResourceUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *SessionNewParamsResourceUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionResourceAddParams struct {\n\t// Mount a file uploaded via the Files API into the session.\n\tManagedAgentsFileResourceParams ManagedAgentsFileResourceParams\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionResourceAddParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SessionResourceAddParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionResourceDeleteParams struct {\n\tSessionID string `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionResourceGetParams struct {\n\tSessionID string `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionResourceGetResponseUnion struct {\n\tID        string    `json:\"id\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tMountPath string    `json:\"mount_path\"`\n\t// Any of \"github_repository\", \"file\", \"memory_store\".\n\tType      string    `json:\"type\"`\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResource].\n\tURL string `json:\"url\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResource].\n\tCheckout ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:\"checkout\"`\n\t// This field is from variant [ManagedAgentsFileResource].\n\tFileID string `json:\"file_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tAccess ManagedAgentsMemoryStoreResourceAccess `json:\"access\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tInstructions string `json:\"instructions\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tName string `json:\"name\"`\n\tJSON struct {\n\t\tID            respjson.Field\n\t\tCreatedAt     respjson.Field\n\t\tMountPath     respjson.Field\n\t\tType          respjson.Field\n\t\tUpdatedAt     respjson.Field\n\t\tURL           respjson.Field\n\t\tCheckout      respjson.Field\n\t\tFileID        respjson.Field\n\t\tMemoryStoreID respjson.Field\n\t\tAccess        respjson.Field\n\t\tDescription   respjson.Field\n\t\tInstructions  respjson.Field\n\t\tName          respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nSessionResourceGetResponseUnion includes [ManagedAgentsGitRepositoryResource](#ManagedAgentsGitRepositoryResource) and contains all possible properties and values from [ManagedAgentsGitHubRepositoryResource](#ManagedAgentsGitHubRepositoryResource), [ManagedAgentsFileResource](#ManagedAgentsFileResource), [ManagedAgentsMemoryStoreResource](#ManagedAgentsMemoryStoreResource).\n\nUse the [SessionResourceGetResponseUnion.AsAny](#SessionResourceGetResponseUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u SessionResourceGetResponseUnion) AsAny() anySessionResourceGetResponse\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := SessionResourceGetResponseUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsGitHubRepositoryResource:\n\tcase qoder.ManagedAgentsFileResource:\n\tcase qoder.ManagedAgentsMemoryStoreResource:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u SessionResourceGetResponseUnion) AsFile() (v ManagedAgentsFileResource)\n```\n\n```go\nfunc (u SessionResourceGetResponseUnion) AsGitHubRepository() (v ManagedAgentsGitHubRepositoryResource)\n```\n\n```go\nfunc (u SessionResourceGetResponseUnion) AsGitRepository() (v ManagedAgentsGitRepositoryResource)\n```\n\n```go\nfunc (u SessionResourceGetResponseUnion) AsMemoryStore() (v ManagedAgentsMemoryStoreResource)\n```\n\n```go\nfunc (u SessionResourceGetResponseUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SessionResourceGetResponseUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionResourceListParams struct {\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Maximum number of resources to return per page (max 1000). If omitted, returns\n\t// all resources.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque cursor from a previous response's `next_page` field.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionResourceListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionResourceListParams](#SessionResourceListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionResourceService struct {\n\tOptions []option.RequestOption\n}\n```\nSessionResourceService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSessionResourceService](#NewSessionResourceService) method instead.\n\n```go\nfunc NewSessionResourceService(opts ...option.RequestOption) (r SessionResourceService)\n```\nNewSessionResourceService 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.\n\n```go\nfunc (r *SessionResourceService) Add(ctx context.Context, sessionID string, params SessionResourceAddParams, opts ...option.RequestOption) (res *ManagedAgentsFileResource, err error)\n```\nAdd Session Resource\n\n```go\nfunc (r *SessionResourceService) Delete(ctx context.Context, resourceID string, params SessionResourceDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeleteSessionResource, err error)\n```\nDelete Session Resource\n\n```go\nfunc (r *SessionResourceService) Get(ctx context.Context, resourceID string, params SessionResourceGetParams, opts ...option.RequestOption) (res *SessionResourceGetResponseUnion, err error)\n```\nGet Session Resource\n\n```go\nfunc (r *SessionResourceService) List(ctx context.Context, sessionID string, params SessionResourceListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsSessionResourceUnion], err error)\n```\nList Session Resources\n\n```go\nfunc (r *SessionResourceService) ListAutoPaging(ctx context.Context, sessionID string, params SessionResourceListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsSessionResourceUnion]\n```\nList Session Resources\n\n```go\nfunc (r *SessionResourceService) Update(ctx context.Context, resourceID string, params SessionResourceUpdateParams, opts ...option.RequestOption) (res *SessionResourceUpdateResponseUnion, err error)\n```\nUpdate Session Resource\n\n```go\ntype SessionResourceUpdateParams struct {\n\tPassword param.Opt[string] `json:\"password,omitzero\"`\n\n\tSessionID string `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// GitHub access token; also accepted for legacy generic Git clients.\n\t// For generic Git, prefer Password and do not send conflicting credentials.\n\tAuthorizationToken string `json:\"authorization_token,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionResourceUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SessionResourceUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionResourceUpdateResponseUnion struct {\n\tID        string    `json:\"id\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tMountPath string    `json:\"mount_path\"`\n\t// Any of \"github_repository\", \"file\", \"memory_store\".\n\tType      string    `json:\"type\"`\n\tUpdatedAt time.Time `json:\"updated_at\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResource].\n\tURL string `json:\"url\"`\n\t// This field is from variant [ManagedAgentsGitHubRepositoryResource].\n\tCheckout ManagedAgentsGitHubRepositoryResourceCheckoutUnion `json:\"checkout\"`\n\t// This field is from variant [ManagedAgentsFileResource].\n\tFileID string `json:\"file_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tMemoryStoreID string `json:\"memory_store_id\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tAccess ManagedAgentsMemoryStoreResourceAccess `json:\"access\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tDescription string `json:\"description\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tInstructions string `json:\"instructions\"`\n\t// This field is from variant [ManagedAgentsMemoryStoreResource].\n\tName string `json:\"name\"`\n\tJSON struct {\n\t\tID            respjson.Field\n\t\tCreatedAt     respjson.Field\n\t\tMountPath     respjson.Field\n\t\tType          respjson.Field\n\t\tUpdatedAt     respjson.Field\n\t\tURL           respjson.Field\n\t\tCheckout      respjson.Field\n\t\tFileID        respjson.Field\n\t\tMemoryStoreID respjson.Field\n\t\tAccess        respjson.Field\n\t\tDescription   respjson.Field\n\t\tInstructions  respjson.Field\n\t\tName          respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nSessionResourceUpdateResponseUnion includes [ManagedAgentsGitRepositoryResource](#ManagedAgentsGitRepositoryResource) and contains all possible properties and values from [ManagedAgentsGitHubRepositoryResource](#ManagedAgentsGitHubRepositoryResource), [ManagedAgentsFileResource](#ManagedAgentsFileResource), [ManagedAgentsMemoryStoreResource](#ManagedAgentsMemoryStoreResource).\n\nUse the [SessionResourceUpdateResponseUnion.AsAny](#SessionResourceUpdateResponseUnion.AsAny) method to switch on the variant.\n\nUse the methods beginning with 'As' to cast the union to one of its variants.\n\n```go\nfunc (u SessionResourceUpdateResponseUnion) AsAny() anySessionResourceUpdateResponse\n```\nUse the following switch statement to find the correct variant\n\n\tswitch variant := SessionResourceUpdateResponseUnion.AsAny().(type) {\n\tcase qoder.ManagedAgentsGitHubRepositoryResource:\n\tcase qoder.ManagedAgentsFileResource:\n\tcase qoder.ManagedAgentsMemoryStoreResource:\n\tdefault:\n\t  fmt.Errorf(\"no variant present\")\n\t}\n\n```go\nfunc (u SessionResourceUpdateResponseUnion) AsFile() (v ManagedAgentsFileResource)\n```\n\n```go\nfunc (u SessionResourceUpdateResponseUnion) AsGitHubRepository() (v ManagedAgentsGitHubRepositoryResource)\n```\n\n```go\nfunc (u SessionResourceUpdateResponseUnion) AsGitRepository() (v ManagedAgentsGitRepositoryResource)\n```\n\n```go\nfunc (u SessionResourceUpdateResponseUnion) AsMemoryStore() (v ManagedAgentsMemoryStoreResource)\n```\n\n```go\nfunc (u SessionResourceUpdateResponseUnion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SessionResourceUpdateResponseUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName param.Opt[string] `json:\"name,omitzero\"`\n\t// Sort order: desc (default) or asc.\n\tOrder param.Opt[string] `json:\"order,omitzero\"`\n\t// Include archived resources; defaults to false.\n\tIncludeArchived param.Opt[bool] `json:\"include_archived,omitzero\"`\n\t// Match any of running, idle, rescheduling, or terminated.\n\tStatuses []string `json:\"statuses,omitzero\"`\n\t// Filter by agent id.\n\tAgentID param.Opt[string] `json:\"agent_id,omitzero\"`\n\t// Filter by agent version.\n\tAgentVersion param.Opt[int64] `json:\"agent_version,omitzero\"`\n\t// Filter by deployment id.\n\tDeploymentID param.Opt[string] `json:\"deployment_id,omitzero\"`\n\t// Filter by memory store id.\n\tMemoryStoreID param.Opt[string] `json:\"memory_store_id,omitzero\"`\n\t// Exclusive creation-time bound (RFC 3339).\n\tCreatedAtGt param.Opt[time.Time] `json:\"created_at[gt],omitzero\" format:\"date-time\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtGte param.Opt[time.Time] `json:\"created_at[gte],omitzero\" format:\"date-time\"`\n\t// Exclusive creation-time bound (RFC 3339).\n\tCreatedAtLt param.Opt[time.Time] `json:\"created_at[lt],omitzero\" format:\"date-time\"`\n\t// Inclusive creation-time bound (RFC 3339).\n\tCreatedAtLte param.Opt[time.Time] `json:\"created_at[lte],omitzero\" format:\"date-time\"`\n\tWorkspaceID  param.Opt[string]    `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nSessionSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r SessionSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *SessionSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionService struct {\n\tOptions   []option.RequestOption\n\tEvents    SessionEventService\n\tResources SessionResourceService\n\tThreads   SessionThreadService\n}\n```\nSessionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSessionService](#NewSessionService) method instead.\n\n```go\nfunc NewSessionService(opts ...option.RequestOption) (r SessionService)\n```\nNewSessionService 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.\n\n```go\nfunc (r *SessionService) Archive(ctx context.Context, sessionID string, body SessionArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)\n```\nArchive Session\n\n```go\nfunc (r *SessionService) Cancel(ctx context.Context, sessionID string, params SessionCancelParams, opts ...option.RequestOption) (res *SessionCancelResponse, err error)\n```\nCancel requests cancellation of the current turn (202); an idle session is a safe no-op (200).\n\n```go\nfunc (r *SessionService) Delete(ctx context.Context, sessionID string, body SessionDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedSession, err error)\n```\nDelete Session\n\n```go\nfunc (r *SessionService) Get(ctx context.Context, sessionID string, query SessionGetParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)\n```\nGet Session\n\n```go\nfunc (r *SessionService) List(ctx context.Context, params SessionListParams, opts ...option.RequestOption) (res *pagination.BidirectionalPageCursor[ManagedAgentsSession], err error)\n```\nList Sessions\n\n```go\nfunc (r *SessionService) ListAutoPaging(ctx context.Context, params SessionListParams, opts ...option.RequestOption) *pagination.BidirectionalPageCursorAutoPager[ManagedAgentsSession]\n```\nList Sessions\n\n```go\nfunc (r *SessionService) New(ctx context.Context, params SessionNewParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)\n```\nCreate Session. Adds \\_\\_qca\\_sdk\\_ metadata; conflicting reserved values fail before sending.\n\n```go\nfunc (r *SessionService) Search(ctx context.Context, params SessionSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[ManagedAgentsSession], error)\n```\nSearch sessions by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *SessionService) SearchAutoPaging(ctx context.Context, params SessionSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsSession]\n```\nSearchAutoPaging iterates all matching sessions using opaque body cursors.\n\n```go\nfunc (r *SessionService) Update(ctx context.Context, sessionID string, params SessionUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsSession, err error)\n```\nUpdate Session\n\n```go\ntype SessionThreadArchiveParams struct {\n\tSessionID string `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionThreadEventListParams struct {\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\tSessionID string `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// Query parameter for limit\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Query parameter for page\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionThreadEventListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionThreadEventListParams](#SessionThreadEventListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionThreadEventService struct {\n\tOptions []option.RequestOption\n}\n```\nSessionThreadEventService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSessionThreadEventService](#NewSessionThreadEventService) method instead.\n\n```go\nfunc NewSessionThreadEventService(opts ...option.RequestOption) (r SessionThreadEventService)\n```\nNewSessionThreadEventService 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.\n\n```go\nfunc (r *SessionThreadEventService) List(ctx context.Context, threadID string, params SessionThreadEventListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsSessionEventUnion], err error)\n```\nList Session Thread Events\n\n```go\nfunc (r *SessionThreadEventService) ListAutoPaging(ctx context.Context, threadID string, params SessionThreadEventListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsSessionEventUnion]\n```\nList Session Thread Events\n\n```go\nfunc (r *SessionThreadEventService) NewResumableStream(ctx context.Context, threadID string, params SessionThreadEventStreamParams, opts ...option.RequestOption) *ResumableSessionThreadEventStream\n```\nNewResumableStream subscribes to Thread Events and reconnects retryable failures with the latest yielded Last-Event-ID cursor. Thread idle events do not stop it.\n\n```go\nfunc (r *SessionThreadEventService) StreamEvents(ctx context.Context, threadID string, params SessionThreadEventStreamParams, opts ...option.RequestOption) (stream *ssestream.Stream[ManagedAgentsStreamSessionThreadEventsUnion])\n```\nStream Session Thread Events\n\n```go\ntype SessionThreadEventStreamParams struct {\n\t// Resume after this public event in the thread.\n\tLastEventID param.Opt[string] `header:\"Last-Event-ID,omitzero\" json:\"-\"`\n\tSessionID   string            `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// When set, this connection also receives streaming deltas (`event_start`,\n\t// `event_delta`) while an event is being produced, before the event itself\n\t// arrives. Deltas are best-effort; when the final event is produced it carries the\n\t// complete content. A model request that ends early (an error or interrupt)\n\t// produces no final event — its terminal `span.model_request_end` closes the\n\t// preview. Accepts one or more event types to preview and may be repeated:\n\t// `agent.message` streams `content_delta` fragments; `agent.thinking` is\n\t// start-only — a signal that the agent has begun extended thinking, concluded by\n\t// the `agent.thinking` event itself. Only previews of the requested event types\n\t// are sent.\n\tEventDeltas []ManagedAgentsDeltaType `query:\"event_deltas,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionThreadEventStreamParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionThreadEventStreamParams](#SessionThreadEventStreamParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionThreadGetParams struct {\n\tSessionID string `path:\"session_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SessionThreadListParams struct {\n\t// Maximum results per page. Defaults to 1000.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination cursor from a previous response's `next_page`. Forward-only.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionThreadListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SessionThreadListParams](#SessionThreadListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SessionThreadService struct {\n\tOptions []option.RequestOption\n\tEvents  SessionThreadEventService\n}\n```\nSessionThreadService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSessionThreadService](#NewSessionThreadService) method instead.\n\n```go\nfunc NewSessionThreadService(opts ...option.RequestOption) (r SessionThreadService)\n```\nNewSessionThreadService 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.\n\n```go\nfunc (r *SessionThreadService) Archive(ctx context.Context, threadID string, params SessionThreadArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsSessionThread, err error)\n```\nArchive Session Thread\n\n```go\nfunc (r *SessionThreadService) Get(ctx context.Context, threadID string, params SessionThreadGetParams, opts ...option.RequestOption) (res *ManagedAgentsSessionThread, err error)\n```\nGet Session Thread\n\n```go\nfunc (r *SessionThreadService) List(ctx context.Context, sessionID string, params SessionThreadListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsSessionThread], err error)\n```\nList Session Threads\n\n```go\nfunc (r *SessionThreadService) ListAutoPaging(ctx context.Context, sessionID string, params SessionThreadListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsSessionThread]\n```\nList Session Threads\n\n```go\ntype SessionUpdateParams struct {\n\tEnvironmentVariables map[string]string `json:\"environment_variables,omitzero\"`\n\n\t// Human-readable session title.\n\tTitle param.Opt[string] `json:\"title,omitzero\"`\n\t// Metadata patch. Set a key to a string to upsert it, or to null to delete it.\n\t// Omit the field to preserve.\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\t// Mid-session agent configuration update. Only `tools` and `mcp_servers` are\n\t// updatable. Full replacement: the provided array becomes the new value. To\n\t// preserve existing entries, GET the session, modify the array, and POST it back.\n\tAgent ManagedAgentsSessionAgentUpdateParam `json:\"agent,omitzero\"`\n\t// A total model and sandbox credit limit. Once reached, new user messages are\n\t// rejected; an already running turn continues to completion.\n\tBudget ManagedAgentsBudgetLimitParam `json:\"budget,omitzero\"`\n\t// Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests\n\t// setting this field are rejected. Reserved for future use.\n\tVaultIDs []string `json:\"vault_ids,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SessionUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *SessionUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SessionWorkData struct {\n\t// Session identifier (e.g., 'session\\_...')\n\tID string `json:\"id\" api:\"required\"`\n\t// Type of work data\n\tType constant.Session `json:\"type\" default:\"session\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tID          respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nWork data for session work items.\n\nThis resource type is used when work represents a session that needs to be executed in a self-hosted environment.\n\n```go\nfunc (r SessionWorkData) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SessionWorkData) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype Skill struct {\n\tMetadata map[string]string `json:\"metadata\"`\n\n\t// Unique identifier for the skill.\n\t//\n\t// The format and length of IDs may change over time.\n\tID string `json:\"id\" api:\"required\"`\n\t// ISO 8601 timestamp of when the skill was created.\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Human-readable, single-line label for the Skill. Maximum 255 characters. Always\n\t// set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not\n\t// unique.\n\tDisplayName string `json:\"display_title\" api:\"required\"`\n\t// ID of the newest Skill Version — what `latest` references resolve to. Always\n\t// set: a Skill holds at least one version.\n\tLatestVersionID string `json:\"latest_version\" api:\"required\"`\n\t// Where the Skill comes from.\n\t//\n\t// Possible values:\n\t//\n\t// - `\"custom\"`: authored by the platform user; private to their workspace\n\t// - `\"qoder\"`: published by Qoder; shared and read-only\n\t// - `\"qoder_example\"`: Qoder-published sample Skill\n\t// - `\"plugin\"`: resolved from an installed plugin\n\tSource SkillSource `json:\"source\" api:\"required\"`\n\t// Object type.\n\t//\n\t// For Skills, this is always `\"skill\"`.\n\tType constant.Skill `json:\"type\" default:\"skill\"`\n\t// ISO 8601 timestamp of when the skill was last updated.\n\tUpdatedAt time.Time `json:\"updated_at\" api:\"required\" format:\"date-time\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tMetadata respjson.Field\n\n\t\tID              respjson.Field\n\t\tCreatedAt       respjson.Field\n\t\tDisplayName     respjson.Field\n\t\tLatestVersionID respjson.Field\n\t\tSource          respjson.Field\n\t\tType            respjson.Field\n\t\tUpdatedAt       respjson.Field\n\t\tExtraFields     map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r Skill) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *Skill) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SkillDeleteParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SkillGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SkillListParams struct {\n\tDisplayName param.Opt[string] `query:\"display_title,omitzero\" json:\"-\"`\n\n\tName param.Opt[string] `query:\"name,omitzero\" json:\"-\"`\n\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Pagination token for fetching a specific page of results.\n\t//\n\t// Pass the value from a previous response's `next_page` field to get the next page\n\t// of results.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Filter skills by source.\n\t//\n\t// If provided, only skills from the specified source will be returned:\n\t//\n\t// - `\"custom\"`: only return user-created skills\n\t// - `\"qoder\"`: only return Qoder-created skills\n\tSource param.Opt[string] `query:\"source,omitzero\" json:\"-\"`\n\t// Number of results to return per page.\n\t//\n\t// Ranges from `1` to `1000`. Defaults to `20`.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SkillListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SkillListParams](#SkillListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SkillNewParams struct {\n\tMetadata map[string]string `json:\"metadata,omitzero\" api:\"metadata\"`\n\n\t// Files to upload for the skill.\n\t//\n\t// All files must be in the same top-level directory and must include a SKILL.md\n\t// file at the root of that directory.\n\tFiles []io.Reader `json:\"files,omitzero\" api:\"required\" format:\"binary\"`\n\t// Human-readable, single-line label for the Skill. Maximum 255 characters. Always\n\t// set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not\n\t// unique.\n\tDisplayName param.Opt[string] `json:\"display_title,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SkillNewParams) MarshalMultipart() (data []byte, contentType string, err error)\n```\n\n```go\ntype SkillSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Skill source: custom or qoder.\n\tSource param.Opt[string] `json:\"source,omitzero\"`\n\t// Case-insensitive Skill display-title substring filter.\n\tDisplayTitle param.Opt[string] `json:\"display_title,omitzero\"`\n\t// Deprecated: use DisplayTitle instead.\n\tName        param.Opt[string] `json:\"name,omitzero\"`\n\tWorkspaceID param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nSkillSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r SkillSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *SkillSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SkillService struct {\n\tOptions  []option.RequestOption\n\tVersions SkillVersionService\n}\n```\nSkillService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSkillService](#NewSkillService) method instead.\n\n```go\nfunc NewSkillService(opts ...option.RequestOption) (r SkillService)\n```\nNewSkillService 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.\n\n```go\nfunc (r *SkillService) Delete(ctx context.Context, skillID string, body SkillDeleteParams, opts ...option.RequestOption) (res *DeletedSkill, err error)\n```\nDelete Skill\n\n```go\nfunc (r *SkillService) Get(ctx context.Context, skillID string, query SkillGetParams, opts ...option.RequestOption) (res *Skill, err error)\n```\nGet Skill\n\n```go\nfunc (r *SkillService) List(ctx context.Context, params SkillListParams, opts ...option.RequestOption) (res *pagination.PageCursor[Skill], err error)\n```\nList Skills\n\n```go\nfunc (r *SkillService) ListAutoPaging(ctx context.Context, params SkillListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Skill]\n```\nList Skills\n\n```go\nfunc (r *SkillService) New(ctx context.Context, params SkillNewParams, opts ...option.RequestOption) (res *Skill, err error)\n```\nCreate Skill\n\n```go\nfunc (r *SkillService) Search(ctx context.Context, params SkillSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[Skill], error)\n```\nSearch skills by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *SkillService) SearchAutoPaging(ctx context.Context, params SkillSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[Skill]\n```\nSearchAutoPaging iterates all matching skills using opaque body cursors.\n\n```go\ntype SkillSource struct {\n\t// Where the Skill comes from.\n\t//\n\t// Possible values:\n\t//\n\t// - `\"custom\"`: authored by the platform user; private to their workspace\n\t// - `\"qoder\"`: published by Qoder; shared and read-only\n\t// - `\"qoder_example\"`: Qoder-published sample Skill\n\t// - `\"plugin\"`: resolved from an installed plugin\n\t//\n\t// Any of \"custom\", \"qoder\", \"qoder_example\", \"plugin\".\n\tType SkillSourceType `json:\"type\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r SkillSource) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SkillSource) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SkillSourceType string\n```\nWhere the Skill comes from.\n\nPossible values:\n\n\\- \\`\"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\n\n```go\nconst (\n\tSkillSourceTypeCustom       SkillSourceType = \"custom\"\n\tSkillSourceTypeQoder        SkillSourceType = \"qoder\"\n\tSkillSourceTypeQoderExample SkillSourceType = \"qoder_example\"\n\tSkillSourceTypePlugin       SkillSourceType = \"plugin\"\n)\n```\n\n```go\ntype SkillVersion struct {\n\tVersion   string `json:\"version\"`\n\tDirectory string `json:\"directory\"`\n\n\t// Unique identifier for this Skill Version. The id addresses the version in paths\n\t// and pins it in references.\n\tID string `json:\"id\" api:\"required\"`\n\t// ISO 8601 timestamp of when the skill was created.\n\tCreatedAt time.Time `json:\"created_at\" api:\"required\" format:\"date-time\"`\n\t// Description of the skill version.\n\t//\n\t// This is extracted from the SKILL.md file in the skill upload.\n\tDescription string `json:\"description\" api:\"required\"`\n\t// The Skill's immutable kebab-case slug, set at creation from the first upload's\n\t// SKILL.md frontmatter `name` (or its enclosing directory). Every later upload\n\t// must resolve to the same value. Also the top-level directory of the Skill's\n\t// mounted files and the base name of a downloaded archive.\n\tName string `json:\"name\" api:\"required\"`\n\t// Unique identifier for the skill.\n\t//\n\t// The format and length of IDs may change over time.\n\tSkillID string `json:\"skill_id\" api:\"required\"`\n\t// Object type.\n\t//\n\t// For Skill Versions, this is always `\"skill_version\"`.\n\tType constant.SkillVersion `json:\"type\" default:\"skill_version\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tVersion   respjson.Field\n\t\tDirectory respjson.Field\n\n\t\tID          respjson.Field\n\t\tCreatedAt   respjson.Field\n\t\tDescription respjson.Field\n\t\tName        respjson.Field\n\t\tSkillID     respjson.Field\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\n\n```go\nfunc (r SkillVersion) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *SkillVersion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype SkillVersionDeleteParams struct {\n\t// Unique identifier for the skill.\n\t//\n\t// The format and length of IDs may change over time.\n\tSkillID string `path:\"skill_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SkillVersionDownloadParams struct {\n\t// Unique identifier for the skill.\n\t//\n\t// The format and length of IDs may change over time.\n\tSkillID string `path:\"skill_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SkillVersionGetParams struct {\n\t// Unique identifier for the skill.\n\t//\n\t// The format and length of IDs may change over time.\n\tSkillID string `path:\"skill_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype SkillVersionListParams struct {\n\t// Number of results to return per page.\n\t//\n\t// Ranges from `1` to `1000`. Defaults to `20`.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Optionally set to the `next_page` token from the previous response.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SkillVersionListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [SkillVersionListParams](#SkillVersionListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype SkillVersionNewParams struct {\n\t// Files to upload for the skill.\n\t//\n\t// All files must be in the same top-level directory and must include a SKILL.md\n\t// file at the root of that directory.\n\tFiles []io.Reader `json:\"files,omitzero\" api:\"required\" format:\"binary\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r SkillVersionNewParams) MarshalMultipart() (data []byte, contentType string, err error)\n```\n\n```go\ntype SkillVersionService struct {\n\tOptions []option.RequestOption\n}\n```\nSkillVersionService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewSkillVersionService](#NewSkillVersionService) method instead.\n\n```go\nfunc NewSkillVersionService(opts ...option.RequestOption) (r SkillVersionService)\n```\nNewSkillVersionService 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.\n\n```go\nfunc (r *SkillVersionService) Delete(ctx context.Context, version string, params SkillVersionDeleteParams, opts ...option.RequestOption) (res *DeletedSkillVersion, err error)\n```\nDelete Skill Version\n\n```go\nfunc (r *SkillVersionService) Download(ctx context.Context, version string, params SkillVersionDownloadParams, opts ...option.RequestOption) (res *http.Response, err error)\n```\nDownload a skill version's content as a zip archive.\n\n```go\nfunc (r *SkillVersionService) Get(ctx context.Context, version string, params SkillVersionGetParams, opts ...option.RequestOption) (res *SkillVersion, err error)\n```\nGet Skill Version\n\n```go\nfunc (r *SkillVersionService) List(ctx context.Context, skillID string, params SkillVersionListParams, opts ...option.RequestOption) (res *pagination.PageCursor[SkillVersion], err error)\n```\nList Skill Versions\n\n```go\nfunc (r *SkillVersionService) ListAutoPaging(ctx context.Context, skillID string, params SkillVersionListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[SkillVersion]\n```\nList Skill Versions\n\n```go\nfunc (r *SkillVersionService) New(ctx context.Context, skillID string, params SkillVersionNewParams, opts ...option.RequestOption) (res *SkillVersion, err error)\n```\nCreate Skill Version\n\n```go\ntype TextBlockParam struct {\n\tText      string                   `json:\"text\" api:\"required\"`\n\tCitations []TextCitationParamUnion `json:\"citations,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"text\".\n\tType constant.Text `json:\"type\" default:\"text\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Text, Type are required.\n\n```go\nfunc (r TextBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *TextBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextCitationParamUnion struct {\n\tOfCharLocation            *CitationCharLocationParam            `json:\",omitzero,inline\"`\n\tOfPageLocation            *CitationPageLocationParam            `json:\",omitzero,inline\"`\n\tOfContentBlockLocation    *CitationContentBlockLocationParam    `json:\",omitzero,inline\"`\n\tOfWebSearchResultLocation *CitationWebSearchResultLocationParam `json:\",omitzero,inline\"`\n\tOfSearchResultLocation    *CitationSearchResultLocationParam    `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u TextCitationParamUnion) GetCitedText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetDocumentIndex() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetDocumentTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetEncryptedIndex() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetEndBlockIndex() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetEndCharIndex() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetEndPageNumber() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetSearchResultIndex() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetSource() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetStartBlockIndex() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetStartCharIndex() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetStartPageNumber() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextCitationParamUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *TextCitationParamUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionCreateResultBlockParam struct {\n\tIsFileUpdate bool `json:\"is_file_update\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"text_editor_code_execution_create_result\".\n\tType constant.TextEditorCodeExecutionCreateResult `json:\"type\" default:\"text_editor_code_execution_create_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties IsFileUpdate, Type are required.\n\n```go\nfunc (r TextEditorCodeExecutionCreateResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *TextEditorCodeExecutionCreateResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionStrReplaceResultBlockParam struct {\n\tNewLines param.Opt[int64] `json:\"new_lines,omitzero\"`\n\tNewStart param.Opt[int64] `json:\"new_start,omitzero\"`\n\tOldLines param.Opt[int64] `json:\"old_lines,omitzero\"`\n\tOldStart param.Opt[int64] `json:\"old_start,omitzero\"`\n\tLines    []string         `json:\"lines,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"text_editor_code_execution_str_replace_result\".\n\tType constant.TextEditorCodeExecutionStrReplaceResult `json:\"type\" default:\"text_editor_code_execution_str_replace_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe property Type is required.\n\n```go\nfunc (r TextEditorCodeExecutionStrReplaceResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *TextEditorCodeExecutionStrReplaceResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionToolResultBlockParam struct {\n\tContent   TextEditorCodeExecutionToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                                  `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"text_editor_code_execution_tool_result\".\n\tType constant.TextEditorCodeExecutionToolResult `json:\"type\" default:\"text_editor_code_execution_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r TextEditorCodeExecutionToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *TextEditorCodeExecutionToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionToolResultBlockParamContentUnion struct {\n\tOfRequestTextEditorCodeExecutionToolResultError       *TextEditorCodeExecutionToolResultErrorParam       `json:\",omitzero,inline\"`\n\tOfRequestTextEditorCodeExecutionViewResultBlock       *TextEditorCodeExecutionViewResultBlockParam       `json:\",omitzero,inline\"`\n\tOfRequestTextEditorCodeExecutionCreateResultBlock     *TextEditorCodeExecutionCreateResultBlockParam     `json:\",omitzero,inline\"`\n\tOfRequestTextEditorCodeExecutionStrReplaceResultBlock *TextEditorCodeExecutionStrReplaceResultBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetContent() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetErrorCode() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetErrorMessage() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetFileType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetIsFileUpdate() *bool\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetLines() []string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetNewLines() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetNewStart() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetNumLines() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetOldLines() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetOldStart() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetStartLine() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetTotalLines() *int64\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u TextEditorCodeExecutionToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *TextEditorCodeExecutionToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionToolResultErrorParam struct {\n\t// Any of \"invalid_tool_input\", \"unavailable\", \"too_many_requests\",\n\t// \"execution_time_exceeded\", \"file_not_found\".\n\tErrorCode    TextEditorCodeExecutionToolResultErrorParamErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\tErrorMessage param.Opt[string]                                    `json:\"error_message,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"text_editor_code_execution_tool_result_error\".\n\tType constant.TextEditorCodeExecutionToolResultError `json:\"type\" default:\"text_editor_code_execution_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r TextEditorCodeExecutionToolResultErrorParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *TextEditorCodeExecutionToolResultErrorParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionToolResultErrorParamErrorCode string\n```\n\n```go\ntype TextEditorCodeExecutionViewResultBlockParam struct {\n\tContent string `json:\"content\" api:\"required\"`\n\t// Any of \"text\", \"image\", \"pdf\".\n\tFileType   TextEditorCodeExecutionViewResultBlockParamFileType `json:\"file_type,omitzero\" api:\"required\"`\n\tNumLines   param.Opt[int64]                                    `json:\"num_lines,omitzero\"`\n\tStartLine  param.Opt[int64]                                    `json:\"start_line,omitzero\"`\n\tTotalLines param.Opt[int64]                                    `json:\"total_lines,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"text_editor_code_execution_view_result\".\n\tType constant.TextEditorCodeExecutionViewResult `json:\"type\" default:\"text_editor_code_execution_view_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, FileType, Type are required.\n\n```go\nfunc (r TextEditorCodeExecutionViewResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *TextEditorCodeExecutionViewResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype TextEditorCodeExecutionViewResultBlockParamFileType string\n```\n\n```go\ntype ThinkingBlockParam struct {\n\t// The `signature` value of this thinking block, exactly as returned by the API in\n\t// a previous response. Used to verify that the block was generated by the model.\n\t//\n\t// Thinking blocks must be passed back unmodified and in their original order; a\n\t// modified block results in a 400 `invalid_request_error`.\n\tSignature string `json:\"signature\" api:\"required\"`\n\t// The `thinking` text of this block as returned by the API.\n\tThinking string `json:\"thinking\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"thinking\".\n\tType constant.Thinking `json:\"type\" default:\"thinking\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Signature, Thinking, Type are required.\n\n```go\nfunc (r ThinkingBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ThinkingBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ThinkingCapability struct {\n\t// Whether this capability is supported by the model.\n\tSupported bool `json:\"supported\" api:\"required\"`\n\t// Supported thinking type configurations.\n\tTypes ThinkingTypes `json:\"types\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tSupported   respjson.Field\n\t\tTypes       respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nThinking capability details.\n\n```go\nfunc (r ThinkingCapability) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ThinkingCapability) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ThinkingTypes struct {\n\t// Whether the model supports thinking with type 'adaptive' (auto).\n\tAdaptive CapabilitySupport `json:\"adaptive\" api:\"required\"`\n\t// Whether the model supports thinking with type 'enabled'.\n\tEnabled CapabilitySupport `json:\"enabled\" api:\"required\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tAdaptive    respjson.Field\n\t\tEnabled     respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nSupported thinking type configurations.\n\n```go\nfunc (r ThinkingTypes) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r *ThinkingTypes) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolChangeMCPToolReferenceParam struct {\n\tName       string `json:\"name\" api:\"required\"`\n\tServerName string `json:\"server_name\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"mcp_tool_reference\".\n\tType constant.MCPToolReference `json:\"type\" default:\"mcp_tool_reference\"`\n\t// contains filtered or unexported fields\n}\n```\nReference to a single MCP tool by its server and remote name — the same \\`server\\_name\\`/\\`name\\` pair \\`mcp\\_tool\\_use\\` carries.\n\nThe properties Name, ServerName, Type are required.\n\n```go\nfunc (r ToolChangeMCPToolReferenceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolChangeMCPToolReferenceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolChangeMCPToolsetReferenceParam struct {\n\tServerName string `json:\"server_name\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"mcp_toolset_reference\".\n\tType constant.MCPToolsetReference `json:\"type\" default:\"mcp_toolset_reference\"`\n\t// contains filtered or unexported fields\n}\n```\nReference to every tool in the named MCP server's toolset.\n\nThe properties ServerName, Type are required.\n\n```go\nfunc (r ToolChangeMCPToolsetReferenceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolChangeMCPToolsetReferenceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolChangeToolReferenceParam struct {\n\tName string `json:\"name\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"tool_reference\".\n\tType constant.ToolReference `json:\"type\" default:\"tool_reference\"`\n\t// contains filtered or unexported fields\n}\n```\nReference 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.\n\nThe properties Name, Type are required.\n\n```go\nfunc (r ToolChangeToolReferenceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolChangeToolReferenceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolReferenceBlockParam struct {\n\tToolName string `json:\"tool_name\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"tool_reference\".\n\tType constant.ToolReference `json:\"type\" default:\"tool_reference\"`\n\t// contains filtered or unexported fields\n}\n```\nTool reference block that can be included in tool\\_result content.\n\nThe properties ToolName, Type are required.\n\n```go\nfunc (r ToolReferenceBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolReferenceBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolResultBlockParam struct {\n\tToolUseID string `json:\"tool_use_id\" api:\"required\"`\n\t// For a toolset member tool_result, the toolset family of the paired tool_use.\n\tToolsetName param.Opt[string] `json:\"toolset_name,omitzero\"`\n\tIsError     param.Opt[bool]   `json:\"is_error,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam         `json:\"cache_control,omitzero\"`\n\tContent      []ToolResultBlockParamContentUnion `json:\"content,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"tool_result\".\n\tType constant.ToolResult `json:\"type\" default:\"tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ToolUseID, Type are required.\n\n```go\nfunc (r ToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolResultBlockParamContentUnion struct {\n\tOfText          *TextBlockParam            `json:\",omitzero,inline\"`\n\tOfImage         *ImageBlockParam           `json:\",omitzero,inline\"`\n\tOfSearchResult  *SearchResultBlockParam    `json:\",omitzero,inline\"`\n\tOfDocument      *RequestDocumentBlockParam `json:\",omitzero,inline\"`\n\tOfToolReference *ToolReferenceBlockParam   `json:\",omitzero,inline\"`\n\tOfBrowserState  *BrowserStateBlockParam    `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetCacheControl() *CacheControlEphemeralParam\n```\nReturns a pointer to the underlying variant's CacheControl property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetCitations() (res toolResultBlockParamContentUnionCitations)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetContent() []TextBlockParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetContext() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetSource() (res toolResultBlockParamContentUnionSource)\n```\nReturns a subunion which exports methods to access subproperties\n\nOr use AsAny() to get the underlying value\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetStateChanges() []BrowserStateChangeUnionParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetTabs() []BrowserStateTabEntryParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetText() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetTitle() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetToolName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetTransformations() *ImageTransformationsParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolSearchToolResultBlockParam struct {\n\tContent   ToolSearchToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                     `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"tool_search_tool_result\".\n\tType constant.ToolSearchToolResult `json:\"type\" default:\"tool_search_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r ToolSearchToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolSearchToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolSearchToolResultBlockParamContentUnion struct {\n\tOfRequestToolSearchToolResultError       *ToolSearchToolResultErrorParam       `json:\",omitzero,inline\"`\n\tOfRequestToolSearchToolSearchResultBlock *ToolSearchToolSearchResultBlockParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ToolSearchToolResultBlockParamContentUnion) GetErrorCode() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolSearchToolResultBlockParamContentUnion) GetErrorMessage() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolSearchToolResultBlockParamContentUnion) GetToolReferences() []ToolReferenceBlockParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolSearchToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolSearchToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ToolSearchToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolSearchToolResultErrorParam struct {\n\t// Any of \"invalid_tool_input\", \"unavailable\", \"too_many_requests\",\n\t// \"execution_time_exceeded\".\n\tErrorCode    ToolSearchToolResultErrorParamErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\tErrorMessage param.Opt[string]                       `json:\"error_message,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"tool_search_tool_result_error\".\n\tType constant.ToolSearchToolResultError `json:\"type\" default:\"tool_search_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r ToolSearchToolResultErrorParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolSearchToolResultErrorParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolSearchToolResultErrorParamErrorCode string\n```\n\n```go\ntype ToolSearchToolSearchResultBlockParam struct {\n\tToolReferences []ToolReferenceBlockParam `json:\"tool_references,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"tool_search_tool_search_result\".\n\tType constant.ToolSearchToolSearchResult `json:\"type\" default:\"tool_search_tool_search_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ToolReferences, Type are required.\n\n```go\nfunc (r ToolSearchToolSearchResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolSearchToolSearchResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolUseBlockParam struct {\n\tID    string `json:\"id\" api:\"required\"`\n\tInput any    `json:\"input,omitzero\" api:\"required\"`\n\tName  string `json:\"name\" api:\"required\"`\n\t// For a toolset member tool_use, the toolset family this member belongs to.\n\tToolsetName param.Opt[string] `json:\"toolset_name,omitzero\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// Tool invocation directly from the model.\n\tCaller ToolUseBlockParamCallerUnion `json:\"caller,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"tool_use\".\n\tType constant.ToolUse `json:\"type\" default:\"tool_use\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ID, Input, Name, Type are required.\n\n```go\nfunc (r ToolUseBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *ToolUseBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype ToolUseBlockParamCallerUnion struct {\n\tOfDirect                *DirectCallerParam             `json:\",omitzero,inline\"`\n\tOfCodeExecution20250825 *ServerToolCallerParam         `json:\",omitzero,inline\"`\n\tOfCodeExecution20260120 *ServerToolCaller20260120Param `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u ToolUseBlockParamCallerUnion) GetToolID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolUseBlockParamCallerUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u ToolUseBlockParamCallerUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *ToolUseBlockParamCallerUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype URLImageSourceParam struct {\n\tURL string `json:\"url\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"url\".\n\tType constant.URL `json:\"type\" default:\"url\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Type, URL are required.\n\n```go\nfunc (r URLImageSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *URLImageSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype URLPDFSourceParam struct {\n\tURL string `json:\"url\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as \"url\".\n\tType constant.URL `json:\"type\" default:\"url\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Type, URL are required.\n\n```go\nfunc (r URLPDFSourceParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *URLPDFSourceParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype UnrestrictedNetwork struct {\n\t// Network policy type\n\tType constant.Unrestricted `json:\"type\" default:\"unrestricted\"`\n\t// JSON contains metadata for fields, check presence with [respjson.Field.Valid].\n\tJSON struct {\n\t\tType        respjson.Field\n\t\tExtraFields map[string]respjson.Field\n\t\t// contains filtered or unexported fields\n\t} `json:\"-\"`\n}\n```\nUnrestricted network access.\n\n```go\nfunc (r UnrestrictedNetwork) RawJSON() string\n```\nReturns the unmodified JSON received from the API\n\n```go\nfunc (r UnrestrictedNetwork) ToParam() UnrestrictedNetworkParam\n```\nToParam converts this UnrestrictedNetwork to a UnrestrictedNetworkParam.\n\nWarning: 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()\n\n```go\nfunc (r *UnrestrictedNetwork) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype UnrestrictedNetworkParam struct {\n\t// Network policy type\n\tType constant.Unrestricted `json:\"type\" default:\"unrestricted\"`\n\t// contains filtered or unexported fields\n}\n```\nUnrestricted network access.\n\nThis struct has a constant value, construct it with [NewUnrestrictedNetworkParam](#NewUnrestrictedNetworkParam).\n\n```go\nfunc NewUnrestrictedNetworkParam() UnrestrictedNetworkParam\n```\n\n```go\nfunc (r UnrestrictedNetworkParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *UnrestrictedNetworkParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultArchiveParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultCredentialArchiveParams struct {\n\tVaultID string `path:\"vault_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultCredentialDeleteParams struct {\n\tVaultID string `path:\"vault_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultCredentialGetParams struct {\n\tVaultID string `path:\"vault_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultCredentialListParams struct {\n\tName param.Opt[string] `query:\"name,omitzero\" json:\"-\"`\n\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Whether to include archived credentials in the results.\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum number of credentials to return per page. Defaults to 20, maximum 100.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination token from a previous `list_credentials` response.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r VaultCredentialListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [VaultCredentialListParams](#VaultCredentialListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype VaultCredentialMCPOAuthValidateParams struct {\n\tVaultID string `path:\"vault_id\" api:\"required\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultCredentialNewParams struct {\n\t// Authentication details for creating a credential.\n\tAuth VaultCredentialNewParamsAuthUnion `json:\"auth,omitzero\" api:\"required\"`\n\t// Human-readable name for the credential. Up to 255 characters.\n\tDisplayName param.Opt[string] `json:\"display_name,omitzero\"`\n\t// Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys\n\t// up to 64 chars, values up to 512 chars.\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r VaultCredentialNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *VaultCredentialNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultCredentialNewParamsAuthUnion struct {\n\tOfMCPOAuth            *ManagedAgentsMCPOAuthCreateParams            `json:\",omitzero,inline\"`\n\tOfStaticBearer        *ManagedAgentsStaticBearerCreateParams        `json:\",omitzero,inline\"`\n\tOfEnvironmentVariable *ManagedAgentsEnvironmentVariableCreateParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetAccessToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetExpiresAt() *time.Time\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetInjectionLocation() *ManagedAgentsInjectionLocationParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetMCPServerURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetNetworking() *ManagedAgentsCredentialNetworkingParamsUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetRefresh() *ManagedAgentsMCPOAuthRefreshParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetSecretName() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetSecretValue() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialNewParamsAuthUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *VaultCredentialNewParamsAuthUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultCredentialService struct {\n\tOptions []option.RequestOption\n}\n```\nVaultCredentialService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewVaultCredentialService](#NewVaultCredentialService) method instead.\n\n```go\nfunc NewVaultCredentialService(opts ...option.RequestOption) (r VaultCredentialService)\n```\nNewVaultCredentialService 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.\n\n```go\nfunc (r *VaultCredentialService) Archive(ctx context.Context, credentialID string, params VaultCredentialArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsCredential, err error)\n```\nArchive Credential\n\n```go\nfunc (r *VaultCredentialService) Delete(ctx context.Context, credentialID string, params VaultCredentialDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedCredential, err error)\n```\nDelete Credential\n\n```go\nfunc (r *VaultCredentialService) Get(ctx context.Context, credentialID string, params VaultCredentialGetParams, opts ...option.RequestOption) (res *ManagedAgentsCredential, err error)\n```\nGet Credential\n\n```go\nfunc (r *VaultCredentialService) List(ctx context.Context, vaultID string, params VaultCredentialListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsCredential], err error)\n```\nList Credentials\n\n```go\nfunc (r *VaultCredentialService) ListAutoPaging(ctx context.Context, vaultID string, params VaultCredentialListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsCredential]\n```\nList Credentials\n\n```go\nfunc (r *VaultCredentialService) MCPOAuthValidate(ctx context.Context, credentialID string, params VaultCredentialMCPOAuthValidateParams, opts ...option.RequestOption) (res *ManagedAgentsCredentialValidation, err error)\n```\nValidate Credential\n\n```go\nfunc (r *VaultCredentialService) New(ctx context.Context, vaultID string, params VaultCredentialNewParams, opts ...option.RequestOption) (res *ManagedAgentsCredential, err error)\n```\nCreate Credential\n\n```go\nfunc (r *VaultCredentialService) Update(ctx context.Context, credentialID string, params VaultCredentialUpdateParams, opts ...option.RequestOption) (res *ManagedAgentsCredential, err error)\n```\nUpdate Credential\n\n```go\ntype VaultCredentialUpdateParams struct {\n\tVaultID string `path:\"vault_id\" api:\"required\" json:\"-\"`\n\t// Deprecated: Qoder does not support updating credential display names.\n\t// Leave this field omitted; setting it returns an error before sending a request.\n\tDisplayName param.Opt[string] `json:\"display_name,omitzero\"`\n\t// Metadata patch. Set a key to a string to upsert it, or to null to delete it.\n\t// Omitted keys are preserved.\n\tMetadata map[string]any `json:\"metadata,omitzero\"`\n\t// Updated authentication details for a credential.\n\tAuth VaultCredentialUpdateParamsAuthUnion `json:\"auth,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r VaultCredentialUpdateParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *VaultCredentialUpdateParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultCredentialUpdateParamsAuthUnion struct {\n\tOfMCPOAuth            *ManagedAgentsMCPOAuthUpdateParams            `json:\",omitzero,inline\"`\n\tOfStaticBearer        *ManagedAgentsStaticBearerUpdateParams        `json:\",omitzero,inline\"`\n\tOfEnvironmentVariable *ManagedAgentsEnvironmentVariableUpdateParams `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetAccessToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetExpiresAt() *time.Time\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetInjectionLocation() *ManagedAgentsInjectionLocationUpdateParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetNetworking() *ManagedAgentsCredentialNetworkingParamsUnion\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetRefresh() *ManagedAgentsMCPOAuthRefreshUpdateParams\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetSecretValue() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetToken() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u VaultCredentialUpdateParamsAuthUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *VaultCredentialUpdateParamsAuthUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultDeleteParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultGetParams struct {\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype VaultListParams struct {\n\tName param.Opt[string] `query:\"name,omitzero\" json:\"-\"`\n\n\tBeforeID param.Opt[string] `query:\"before_id,omitzero\" json:\"-\"`\n\tAfterID  param.Opt[string] `query:\"after_id,omitzero\" json:\"-\"`\n\n\t// Whether to include archived vaults in the results.\n\tIncludeArchived param.Opt[bool] `query:\"include_archived,omitzero\" json:\"-\"`\n\t// Maximum number of vaults to return per page. Defaults to 20, maximum 100.\n\tLimit param.Opt[int64] `query:\"limit,omitzero\" json:\"-\"`\n\t// Opaque pagination token from a previous `list_vaults` response.\n\tPage param.Opt[string] `query:\"page,omitzero\" json:\"-\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r VaultListParams) URLQuery() (v url.Values, err error)\n```\nURLQuery serializes [VaultListParams](#VaultListParams)'s query parameters as \\`url.Values\\`.\n\n```go\ntype VaultNewParams struct {\n\t// Human-readable name for the vault. 1-255 characters.\n\tDisplayName string `json:\"display_name\" api:\"required\"`\n\t// Arbitrary key-value metadata to attach to the vault. Maximum 16 pairs, keys up\n\t// to 64 chars, values up to 512 chars.\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Optional header to specify the beta version(s) you want to use.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (r VaultNewParams) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *VaultNewParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultSearchParams struct {\n\t// Exact string metadata filters combined with AND (at most 16 entries).\n\tMetadata map[string]string `json:\"metadata,omitzero\"`\n\t// Page size; default 20, maximum 100.\n\tLimit param.Opt[int64] `json:\"limit,omitzero\"`\n\t// Opaque next_page cursor returned by the previous search response.\n\tPage param.Opt[string] `json:\"page,omitzero\"`\n\t// Include archived resources; defaults to false.\n\tIncludeArchived param.Opt[bool] `json:\"include_archived,omitzero\"`\n\t// Case-insensitive name substring filter.\n\tName        param.Opt[string] `json:\"name,omitzero\"`\n\tWorkspaceID param.Opt[string] `header:\"qoder-workspace-id,omitzero\" json:\"-\"`\n\t// Additional beta features; search-2026-08-31 is always included.\n\tBetas []QoderBeta `header:\"x-qoder-beta,omitzero\" json:\"-\"`\n\t// contains filtered or unexported fields\n}\n```\nVaultSearchParams contains JSON body filters for Search.\n\n```go\nfunc (r VaultSearchParams) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *VaultSearchParams) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype VaultService struct {\n\tOptions     []option.RequestOption\n\tCredentials VaultCredentialService\n}\n```\nVaultService contains methods and other services that help with interacting with the Qoder Cloud Agents API.\n\nNote, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the [NewVaultService](#NewVaultService) method instead.\n\n```go\nfunc NewVaultService(opts ...option.RequestOption) (r VaultService)\n```\nNewVaultService 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.\n\n```go\nfunc (r *VaultService) Archive(ctx context.Context, vaultID string, body VaultArchiveParams, opts ...option.RequestOption) (res *ManagedAgentsVault, err error)\n```\nArchive Vault\n\n```go\nfunc (r *VaultService) Delete(ctx context.Context, vaultID string, body VaultDeleteParams, opts ...option.RequestOption) (res *ManagedAgentsDeletedVault, err error)\n```\nDelete Vault\n\n```go\nfunc (r *VaultService) Get(ctx context.Context, vaultID string, query VaultGetParams, opts ...option.RequestOption) (res *ManagedAgentsVault, err error)\n```\nGet Vault\n\n```go\nfunc (r *VaultService) List(ctx context.Context, params VaultListParams, opts ...option.RequestOption) (res *pagination.PageCursor[ManagedAgentsVault], err error)\n```\nList Vaults\n\n```go\nfunc (r *VaultService) ListAutoPaging(ctx context.Context, params VaultListParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsVault]\n```\nList Vaults\n\n```go\nfunc (r *VaultService) New(ctx context.Context, params VaultNewParams, opts ...option.RequestOption) (res *ManagedAgentsVault, err error)\n```\nCreate Vault\n\n```go\nfunc (r *VaultService) Search(ctx context.Context, params VaultSearchParams, opts ...option.RequestOption) (*pagination.PageCursor[ManagedAgentsVault], error)\n```\nSearch vaults by metadata and resource filters. Adds the required search Beta header.\n\n```go\nfunc (r *VaultService) SearchAutoPaging(ctx context.Context, params VaultSearchParams, opts ...option.RequestOption) *pagination.PageCursorAutoPager[ManagedAgentsVault]\n```\nSearchAutoPaging iterates all matching vaults using opaque body cursors.\n\n```go\ntype WebFetchBlockParam struct {\n\tContent RequestDocumentBlockParam `json:\"content,omitzero\" api:\"required\"`\n\t// Fetched content URL\n\tURL string `json:\"url\" api:\"required\"`\n\t// ISO 8601 timestamp when the content was retrieved\n\tRetrievedAt param.Opt[string] `json:\"retrieved_at,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as \"web_fetch_result\".\n\tType constant.WebFetchResult `json:\"type\" default:\"web_fetch_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, Type, URL are required.\n\n```go\nfunc (r WebFetchBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *WebFetchBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebFetchToolResultBlockParam struct {\n\tContent   WebFetchToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                   `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// Tool invocation directly from the model.\n\tCaller WebFetchToolResultBlockParamCallerUnion `json:\"caller,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"web_fetch_tool_result\".\n\tType constant.WebFetchToolResult `json:\"type\" default:\"web_fetch_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r WebFetchToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *WebFetchToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebFetchToolResultBlockParamCallerUnion struct {\n\tOfDirect                *DirectCallerParam             `json:\",omitzero,inline\"`\n\tOfCodeExecution20250825 *ServerToolCallerParam         `json:\",omitzero,inline\"`\n\tOfCodeExecution20260120 *ServerToolCaller20260120Param `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u WebFetchToolResultBlockParamCallerUnion) GetToolID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamCallerUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamCallerUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *WebFetchToolResultBlockParamCallerUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebFetchToolResultBlockParamContentUnion struct {\n\tOfRequestWebFetchToolResultError *WebFetchToolResultErrorBlockParam `json:\",omitzero,inline\"`\n\tOfRequestWebFetchResultBlock     *WebFetchBlockParam                `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u WebFetchToolResultBlockParamContentUnion) GetContent() *RequestDocumentBlockParam\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamContentUnion) GetErrorCode() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamContentUnion) GetRetrievedAt() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamContentUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamContentUnion) GetURL() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebFetchToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *WebFetchToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebFetchToolResultErrorBlockParam struct {\n\t// Any of \"invalid_tool_input\", \"url_too_long\", \"url_not_allowed\",\n\t// \"url_not_in_prior_context\", \"url_not_accessible\", \"unsupported_content_type\",\n\t// \"too_many_requests\", \"max_uses_exceeded\", \"unavailable\".\n\tErrorCode WebFetchToolResultErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"web_fetch_tool_result_error\".\n\tType constant.WebFetchToolResultError `json:\"type\" default:\"web_fetch_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r WebFetchToolResultErrorBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *WebFetchToolResultErrorBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebFetchToolResultErrorCode string\n```\n\n```go\ntype WebSearchResultBlockParam struct {\n\tEncryptedContent string            `json:\"encrypted_content\" api:\"required\"`\n\tTitle            string            `json:\"title\" api:\"required\"`\n\tURL              string            `json:\"url\" api:\"required\"`\n\tPageAge          param.Opt[string] `json:\"page_age,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"web_search_result\".\n\tType constant.WebSearchResult `json:\"type\" default:\"web_search_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties EncryptedContent, Title, Type, URL are required.\n\n```go\nfunc (r WebSearchResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *WebSearchResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebSearchToolRequestErrorParam struct {\n\t// Any of \"invalid_tool_input\", \"unavailable\", \"max_uses_exceeded\",\n\t// \"too_many_requests\", \"query_too_long\", \"request_too_large\".\n\tErrorCode WebSearchToolResultErrorCode `json:\"error_code,omitzero\" api:\"required\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"web_search_tool_result_error\".\n\tType constant.WebSearchToolResultError `json:\"type\" default:\"web_search_tool_result_error\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties ErrorCode, Type are required.\n\n```go\nfunc (r WebSearchToolRequestErrorParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *WebSearchToolRequestErrorParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebSearchToolResultBlockParam struct {\n\tContent   WebSearchToolResultBlockParamContentUnion `json:\"content,omitzero\" api:\"required\"`\n\tToolUseID string                                    `json:\"tool_use_id\" api:\"required\"`\n\t// Create a cache control breakpoint at this content block.\n\tCacheControl CacheControlEphemeralParam `json:\"cache_control,omitzero\"`\n\t// Tool invocation directly from the model.\n\tCaller WebSearchToolResultBlockParamCallerUnion `json:\"caller,omitzero\"`\n\t// This field can be elided, and will marshal its zero value as\n\t// \"web_search_tool_result\".\n\tType constant.WebSearchToolResult `json:\"type\" default:\"web_search_tool_result\"`\n\t// contains filtered or unexported fields\n}\n```\nThe properties Content, ToolUseID, Type are required.\n\n```go\nfunc (r WebSearchToolResultBlockParam) MarshalJSON() (data []byte, err error)\n```\n\n```go\nfunc (r *WebSearchToolResultBlockParam) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebSearchToolResultBlockParamCallerUnion struct {\n\tOfDirect                *DirectCallerParam             `json:\",omitzero,inline\"`\n\tOfCodeExecution20250825 *ServerToolCallerParam         `json:\",omitzero,inline\"`\n\tOfCodeExecution20260120 *ServerToolCaller20260120Param `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u WebSearchToolResultBlockParamCallerUnion) GetToolID() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebSearchToolResultBlockParamCallerUnion) GetType() *string\n```\nReturns a pointer to the underlying variant's property, if present.\n\n```go\nfunc (u WebSearchToolResultBlockParamCallerUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *WebSearchToolResultBlockParamCallerUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebSearchToolResultBlockParamContentUnion struct {\n\tOfResultBlock []WebSearchResultBlockParam     `json:\",omitzero,inline\"`\n\tOfError       *WebSearchToolRequestErrorParam `json:\",omitzero,inline\"`\n\t// contains filtered or unexported fields\n}\n```\nOnly one field can be non-zero.\n\nUse [param.IsOmitted](/github.com/QoderAI/qoder-cloud-agents-sdk-go/convention/param#IsOmitted) to confirm if a field is set.\n\n```go\nfunc (u WebSearchToolResultBlockParamContentUnion) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (u *WebSearchToolResultBlockParamContentUnion) UnmarshalJSON(data []byte) error\n```\n\n```go\ntype WebSearchToolResultErrorCode string\n```\n\n","path":"github.com/QoderAI/qoder-cloud-agents-sdk-go/managed","name":"managed","synopsis":"Qoder managed API definitions.","isRedistributable":true}
