Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

508 KB
Raw Blame
// Package teamhubpublic provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT.
package teamhubpublic

import (
	"encoding/json"
	"errors"
	"fmt"
	"time"

	"github.com/oapi-codegen/runtime"
	openapi_types "github.com/oapi-codegen/runtime/types"
)

const (
	SessionCookieScopes sessionCookieContextKey = "sessionCookie.Scopes"
)

// Defines values for ActorKind.
const (
	ActorKindAgent ActorKind = "agent"
	ActorKindHuman ActorKind = "human"
)

// Valid indicates whether the value is a known member of the ActorKind enum.
func (e ActorKind) Valid() bool {
	switch e {
	case ActorKindAgent:
		return true
	case ActorKindHuman:
		return true
	default:
		return false
	}
}

// Defines values for AgentChangeConfirmationChangeField.
const (
	AgentChangeConfirmationFieldDescription AgentChangeConfirmationChangeField = "description"
	AgentChangeConfirmationFieldName        AgentChangeConfirmationChangeField = "name"
	AgentChangeConfirmationFieldPrompt      AgentChangeConfirmationChangeField = "prompt"
)

// Valid indicates whether the value is a known member of the AgentChangeConfirmationChangeField enum.
func (e AgentChangeConfirmationChangeField) Valid() bool {
	switch e {
	case AgentChangeConfirmationFieldDescription:
		return true
	case AgentChangeConfirmationFieldName:
		return true
	case AgentChangeConfirmationFieldPrompt:
		return true
	default:
		return false
	}
}

// Defines values for AgentChangeDecisionViewAction.
const (
	AgentChangeConfirmationActionCreate AgentChangeDecisionViewAction = "create"
	AgentChangeConfirmationActionUpdate AgentChangeDecisionViewAction = "update"
)

// Valid indicates whether the value is a known member of the AgentChangeDecisionViewAction enum.
func (e AgentChangeDecisionViewAction) Valid() bool {
	switch e {
	case AgentChangeConfirmationActionCreate:
		return true
	case AgentChangeConfirmationActionUpdate:
		return true
	default:
		return false
	}
}

// Defines values for AgentNoticeFieldChangeField.
const (
	AgentNoticeFieldDescription AgentNoticeFieldChangeField = "description"
	AgentNoticeFieldName        AgentNoticeFieldChangeField = "name"
)

// Valid indicates whether the value is a known member of the AgentNoticeFieldChangeField enum.
func (e AgentNoticeFieldChangeField) Valid() bool {
	switch e {
	case AgentNoticeFieldDescription:
		return true
	case AgentNoticeFieldName:
		return true
	default:
		return false
	}
}

// Defines values for AgentReasoningEffort.
const (
	AgentReasoningEffortHigh   AgentReasoningEffort = "high"
	AgentReasoningEffortLow    AgentReasoningEffort = "low"
	AgentReasoningEffortMax    AgentReasoningEffort = "max"
	AgentReasoningEffortMedium AgentReasoningEffort = "medium"
	AgentReasoningEffortNone   AgentReasoningEffort = "none"
	AgentReasoningEffortUltra  AgentReasoningEffort = "ultra"
	AgentReasoningEffortXhigh  AgentReasoningEffort = "xhigh"
)

// Valid indicates whether the value is a known member of the AgentReasoningEffort enum.
func (e AgentReasoningEffort) Valid() bool {
	switch e {
	case AgentReasoningEffortHigh:
		return true
	case AgentReasoningEffortLow:
		return true
	case AgentReasoningEffortMax:
		return true
	case AgentReasoningEffortMedium:
		return true
	case AgentReasoningEffortNone:
		return true
	case AgentReasoningEffortUltra:
		return true
	case AgentReasoningEffortXhigh:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimeActivityContentBlockFormat.
const (
	AgentRuntimeActivityContentBlockFormatCode AgentRuntimeActivityContentBlockFormat = "code"
	AgentRuntimeActivityContentBlockFormatJson AgentRuntimeActivityContentBlockFormat = "json"
	AgentRuntimeActivityContentBlockFormatText AgentRuntimeActivityContentBlockFormat = "text"
)

// Valid indicates whether the value is a known member of the AgentRuntimeActivityContentBlockFormat enum.
func (e AgentRuntimeActivityContentBlockFormat) Valid() bool {
	switch e {
	case AgentRuntimeActivityContentBlockFormatCode:
		return true
	case AgentRuntimeActivityContentBlockFormatJson:
		return true
	case AgentRuntimeActivityContentBlockFormatText:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimeActivityKind.
const (
	AgentRuntimeActivityKindBrowse      AgentRuntimeActivityKind = "browse"
	AgentRuntimeActivityKindCommand     AgentRuntimeActivityKind = "command"
	AgentRuntimeActivityKindDelegation  AgentRuntimeActivityKind = "delegation"
	AgentRuntimeActivityKindFileChange  AgentRuntimeActivityKind = "file_change"
	AgentRuntimeActivityKindImage       AgentRuntimeActivityKind = "image"
	AgentRuntimeActivityKindInteraction AgentRuntimeActivityKind = "interaction"
	AgentRuntimeActivityKindMessage     AgentRuntimeActivityKind = "message"
	AgentRuntimeActivityKindMessageRead AgentRuntimeActivityKind = "message_read"
	AgentRuntimeActivityKindRead        AgentRuntimeActivityKind = "read"
	AgentRuntimeActivityKindRecovery    AgentRuntimeActivityKind = "recovery"
	AgentRuntimeActivityKindResponse    AgentRuntimeActivityKind = "response"
	AgentRuntimeActivityKindReview      AgentRuntimeActivityKind = "review"
	AgentRuntimeActivityKindSearch      AgentRuntimeActivityKind = "search"
	AgentRuntimeActivityKindTool        AgentRuntimeActivityKind = "tool"
)

// Valid indicates whether the value is a known member of the AgentRuntimeActivityKind enum.
func (e AgentRuntimeActivityKind) Valid() bool {
	switch e {
	case AgentRuntimeActivityKindBrowse:
		return true
	case AgentRuntimeActivityKindCommand:
		return true
	case AgentRuntimeActivityKindDelegation:
		return true
	case AgentRuntimeActivityKindFileChange:
		return true
	case AgentRuntimeActivityKindImage:
		return true
	case AgentRuntimeActivityKindInteraction:
		return true
	case AgentRuntimeActivityKindMessage:
		return true
	case AgentRuntimeActivityKindMessageRead:
		return true
	case AgentRuntimeActivityKindRead:
		return true
	case AgentRuntimeActivityKindRecovery:
		return true
	case AgentRuntimeActivityKindResponse:
		return true
	case AgentRuntimeActivityKindReview:
		return true
	case AgentRuntimeActivityKindSearch:
		return true
	case AgentRuntimeActivityKindTool:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimeActivityOutcome.
const (
	AgentRuntimeActivityOutcomeCanceled  AgentRuntimeActivityOutcome = "canceled"
	AgentRuntimeActivityOutcomeDeclined  AgentRuntimeActivityOutcome = "declined"
	AgentRuntimeActivityOutcomeFailed    AgentRuntimeActivityOutcome = "failed"
	AgentRuntimeActivityOutcomeSucceeded AgentRuntimeActivityOutcome = "succeeded"
)

// Valid indicates whether the value is a known member of the AgentRuntimeActivityOutcome enum.
func (e AgentRuntimeActivityOutcome) Valid() bool {
	switch e {
	case AgentRuntimeActivityOutcomeCanceled:
		return true
	case AgentRuntimeActivityOutcomeDeclined:
		return true
	case AgentRuntimeActivityOutcomeFailed:
		return true
	case AgentRuntimeActivityOutcomeSucceeded:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimeExecutionFailureCode.
const (
	AgentRuntimeExecutionFailureCodeAuthenticationRequired  AgentRuntimeExecutionFailureCode = "authentication_required"
	AgentRuntimeExecutionFailureCodeCleanupUnconfirmed      AgentRuntimeExecutionFailureCode = "cleanup_unconfirmed"
	AgentRuntimeExecutionFailureCodeComputerUnavailable     AgentRuntimeExecutionFailureCode = "computer_unavailable"
	AgentRuntimeExecutionFailureCodeContextTooLong          AgentRuntimeExecutionFailureCode = "context_too_long"
	AgentRuntimeExecutionFailureCodeExecutionFailed         AgentRuntimeExecutionFailureCode = "execution_failed"
	AgentRuntimeExecutionFailureCodeExecutionOutcomeUnknown AgentRuntimeExecutionFailureCode = "execution_outcome_unknown"
	AgentRuntimeExecutionFailureCodeInterrupted             AgentRuntimeExecutionFailureCode = "interrupted"
	AgentRuntimeExecutionFailureCodeModelNotOffered         AgentRuntimeExecutionFailureCode = "model_not_offered"
	AgentRuntimeExecutionFailureCodeModelServiceError       AgentRuntimeExecutionFailureCode = "model_service_error"
	AgentRuntimeExecutionFailureCodeModelUnavailable        AgentRuntimeExecutionFailureCode = "model_unavailable"
	AgentRuntimeExecutionFailureCodeNetworkError            AgentRuntimeExecutionFailureCode = "network_error"
	AgentRuntimeExecutionFailureCodeProtocolIncompatible    AgentRuntimeExecutionFailureCode = "protocol_incompatible"
	AgentRuntimeExecutionFailureCodeRateLimited             AgentRuntimeExecutionFailureCode = "rate_limited"
	AgentRuntimeExecutionFailureCodeReplyNotSent            AgentRuntimeExecutionFailureCode = "reply_not_sent"
	AgentRuntimeExecutionFailureCodeReplyUndelivered        AgentRuntimeExecutionFailureCode = "reply_undelivered"
	AgentRuntimeExecutionFailureCodeResponseTooLarge        AgentRuntimeExecutionFailureCode = "response_too_large"
	AgentRuntimeExecutionFailureCodeSessionNotFound         AgentRuntimeExecutionFailureCode = "session_not_found"
	AgentRuntimeExecutionFailureCodeTimeout                 AgentRuntimeExecutionFailureCode = "timeout"
	AgentRuntimeExecutionFailureCodeUnclassified            AgentRuntimeExecutionFailureCode = "unclassified"
)

// Valid indicates whether the value is a known member of the AgentRuntimeExecutionFailureCode enum.
func (e AgentRuntimeExecutionFailureCode) Valid() bool {
	switch e {
	case AgentRuntimeExecutionFailureCodeAuthenticationRequired:
		return true
	case AgentRuntimeExecutionFailureCodeCleanupUnconfirmed:
		return true
	case AgentRuntimeExecutionFailureCodeComputerUnavailable:
		return true
	case AgentRuntimeExecutionFailureCodeContextTooLong:
		return true
	case AgentRuntimeExecutionFailureCodeExecutionFailed:
		return true
	case AgentRuntimeExecutionFailureCodeExecutionOutcomeUnknown:
		return true
	case AgentRuntimeExecutionFailureCodeInterrupted:
		return true
	case AgentRuntimeExecutionFailureCodeModelNotOffered:
		return true
	case AgentRuntimeExecutionFailureCodeModelServiceError:
		return true
	case AgentRuntimeExecutionFailureCodeModelUnavailable:
		return true
	case AgentRuntimeExecutionFailureCodeNetworkError:
		return true
	case AgentRuntimeExecutionFailureCodeProtocolIncompatible:
		return true
	case AgentRuntimeExecutionFailureCodeRateLimited:
		return true
	case AgentRuntimeExecutionFailureCodeReplyNotSent:
		return true
	case AgentRuntimeExecutionFailureCodeReplyUndelivered:
		return true
	case AgentRuntimeExecutionFailureCodeResponseTooLarge:
		return true
	case AgentRuntimeExecutionFailureCodeSessionNotFound:
		return true
	case AgentRuntimeExecutionFailureCodeTimeout:
		return true
	case AgentRuntimeExecutionFailureCodeUnclassified:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimePlacementType.
const (
	Local AgentRuntimePlacementType = "local"
)

// Valid indicates whether the value is a known member of the AgentRuntimePlacementType enum.
func (e AgentRuntimePlacementType) Valid() bool {
	switch e {
	case Local:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimePlanStepStatus.
const (
	AgentRuntimePlanStepStatusCanceled   AgentRuntimePlanStepStatus = "canceled"
	AgentRuntimePlanStepStatusCompleted  AgentRuntimePlanStepStatus = "completed"
	AgentRuntimePlanStepStatusInProgress AgentRuntimePlanStepStatus = "in_progress"
	AgentRuntimePlanStepStatusPending    AgentRuntimePlanStepStatus = "pending"
)

// Valid indicates whether the value is a known member of the AgentRuntimePlanStepStatus enum.
func (e AgentRuntimePlanStepStatus) Valid() bool {
	switch e {
	case AgentRuntimePlanStepStatusCanceled:
		return true
	case AgentRuntimePlanStepStatusCompleted:
		return true
	case AgentRuntimePlanStepStatusInProgress:
		return true
	case AgentRuntimePlanStepStatusPending:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimePresentationOutputCreatedEventOutputKind.
const (
	AgentRuntimePresentationOutputCreatedEventOutputKindCard    AgentRuntimePresentationOutputCreatedEventOutputKind = "card"
	AgentRuntimePresentationOutputCreatedEventOutputKindMessage AgentRuntimePresentationOutputCreatedEventOutputKind = "message"
)

// Valid indicates whether the value is a known member of the AgentRuntimePresentationOutputCreatedEventOutputKind enum.
func (e AgentRuntimePresentationOutputCreatedEventOutputKind) Valid() bool {
	switch e {
	case AgentRuntimePresentationOutputCreatedEventOutputKindCard:
		return true
	case AgentRuntimePresentationOutputCreatedEventOutputKindMessage:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimePresentationOutputCreatedEventSurface.
const (
	RoomTimeline AgentRuntimePresentationOutputCreatedEventSurface = "room_timeline"
	Workspace    AgentRuntimePresentationOutputCreatedEventSurface = "workspace"
)

// Valid indicates whether the value is a known member of the AgentRuntimePresentationOutputCreatedEventSurface enum.
func (e AgentRuntimePresentationOutputCreatedEventSurface) Valid() bool {
	switch e {
	case RoomTimeline:
		return true
	case Workspace:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimeStoppedStatusChangedEventOutcome.
const (
	AgentRuntimeStoppedStatusChangedEventOutcomeCanceled  AgentRuntimeStoppedStatusChangedEventOutcome = "canceled"
	AgentRuntimeStoppedStatusChangedEventOutcomeCompleted AgentRuntimeStoppedStatusChangedEventOutcome = "completed"
	AgentRuntimeStoppedStatusChangedEventOutcomeFailed    AgentRuntimeStoppedStatusChangedEventOutcome = "failed"
)

// Valid indicates whether the value is a known member of the AgentRuntimeStoppedStatusChangedEventOutcome enum.
func (e AgentRuntimeStoppedStatusChangedEventOutcome) Valid() bool {
	switch e {
	case AgentRuntimeStoppedStatusChangedEventOutcomeCanceled:
		return true
	case AgentRuntimeStoppedStatusChangedEventOutcomeCompleted:
		return true
	case AgentRuntimeStoppedStatusChangedEventOutcomeFailed:
		return true
	default:
		return false
	}
}

// Defines values for AgentRuntimeWorkingStatusChangedEventStatus.
const (
	AgentRuntimeWorkingStatusChangedEventStatusQueued   AgentRuntimeWorkingStatusChangedEventStatus = "queued"
	AgentRuntimeWorkingStatusChangedEventStatusThinking AgentRuntimeWorkingStatusChangedEventStatus = "thinking"
	AgentRuntimeWorkingStatusChangedEventStatusWorking  AgentRuntimeWorkingStatusChangedEventStatus = "working"
)

// Valid indicates whether the value is a known member of the AgentRuntimeWorkingStatusChangedEventStatus enum.
func (e AgentRuntimeWorkingStatusChangedEventStatus) Valid() bool {
	switch e {
	case AgentRuntimeWorkingStatusChangedEventStatusQueued:
		return true
	case AgentRuntimeWorkingStatusChangedEventStatusThinking:
		return true
	case AgentRuntimeWorkingStatusChangedEventStatusWorking:
		return true
	default:
		return false
	}
}

// Defines values for AgentTemplateOrigin.
const (
	Builtin   AgentTemplateOrigin = "builtin"
	Published AgentTemplateOrigin = "published"
)

// Valid indicates whether the value is a known member of the AgentTemplateOrigin enum.
func (e AgentTemplateOrigin) Valid() bool {
	switch e {
	case Builtin:
		return true
	case Published:
		return true
	default:
		return false
	}
}

// Defines values for AgentTemplateRoutineCreatedByRole.
const (
	AgentTemplateRoutineCreatedByRoleAgent AgentTemplateRoutineCreatedByRole = "agent"
	AgentTemplateRoutineCreatedByRoleHuman AgentTemplateRoutineCreatedByRole = "human"
)

// Valid indicates whether the value is a known member of the AgentTemplateRoutineCreatedByRole enum.
func (e AgentTemplateRoutineCreatedByRole) Valid() bool {
	switch e {
	case AgentTemplateRoutineCreatedByRoleAgent:
		return true
	case AgentTemplateRoutineCreatedByRoleHuman:
		return true
	default:
		return false
	}
}

// Defines values for AgentTemplateRoutineMentionRole.
const (
	AgentTemplateRoutineMentionRoleAgent AgentTemplateRoutineMentionRole = "agent"
)

// Valid indicates whether the value is a known member of the AgentTemplateRoutineMentionRole enum.
func (e AgentTemplateRoutineMentionRole) Valid() bool {
	switch e {
	case AgentTemplateRoutineMentionRoleAgent:
		return true
	default:
		return false
	}
}

// Defines values for AgentTemplateSkillImportStatus.
const (
	AgentTemplateSkillImportStatusImportable  AgentTemplateSkillImportStatus = "importable"
	AgentTemplateSkillImportStatusImported    AgentTemplateSkillImportStatus = "imported"
	AgentTemplateSkillImportStatusUnavailable AgentTemplateSkillImportStatus = "unavailable"
)

// Valid indicates whether the value is a known member of the AgentTemplateSkillImportStatus enum.
func (e AgentTemplateSkillImportStatus) Valid() bool {
	switch e {
	case AgentTemplateSkillImportStatusImportable:
		return true
	case AgentTemplateSkillImportStatusImported:
		return true
	case AgentTemplateSkillImportStatusUnavailable:
		return true
	default:
		return false
	}
}

// Defines values for AgentType.
const (
	AgentTypeAnotherme AgentType = "anotherme"
	AgentTypeGeneral   AgentType = "general"
)

// Valid indicates whether the value is a known member of the AgentType enum.
func (e AgentType) Valid() bool {
	switch e {
	case AgentTypeAnotherme:
		return true
	case AgentTypeGeneral:
		return true
	default:
		return false
	}
}

// Defines values for AgentVisibilityScope.
const (
	AgentVisibilityScopeSponsor   AgentVisibilityScope = "sponsor"
	AgentVisibilityScopeWorkspace AgentVisibilityScope = "workspace"
)

// Valid indicates whether the value is a known member of the AgentVisibilityScope enum.
func (e AgentVisibilityScope) Valid() bool {
	switch e {
	case AgentVisibilityScopeSponsor:
		return true
	case AgentVisibilityScopeWorkspace:
		return true
	default:
		return false
	}
}

// Defines values for BrowserConnectionStatusBrowser.
const (
	BrowserConnectionBrowserChrome BrowserConnectionStatusBrowser = "chrome"
)

// Valid indicates whether the value is a known member of the BrowserConnectionStatusBrowser enum.
func (e BrowserConnectionStatusBrowser) Valid() bool {
	switch e {
	case BrowserConnectionBrowserChrome:
		return true
	default:
		return false
	}
}

// Defines values for BrowserConnectionStatusMode.
const (
	BrowserConnectionModeIsolated   BrowserConnectionStatusMode = "isolated"
	BrowserConnectionModeUserChrome BrowserConnectionStatusMode = "user_chrome"
)

// Valid indicates whether the value is a known member of the BrowserConnectionStatusMode enum.
func (e BrowserConnectionStatusMode) Valid() bool {
	switch e {
	case BrowserConnectionModeIsolated:
		return true
	case BrowserConnectionModeUserChrome:
		return true
	default:
		return false
	}
}

// Defines values for BrowserConnectionStatusPlatform.
const (
	BrowserConnectionPlatformDarwin  BrowserConnectionStatusPlatform = "darwin"
	BrowserConnectionPlatformLinux   BrowserConnectionStatusPlatform = "linux"
	BrowserConnectionPlatformWindows BrowserConnectionStatusPlatform = "windows"
)

// Valid indicates whether the value is a known member of the BrowserConnectionStatusPlatform enum.
func (e BrowserConnectionStatusPlatform) Valid() bool {
	switch e {
	case BrowserConnectionPlatformDarwin:
		return true
	case BrowserConnectionPlatformLinux:
		return true
	case BrowserConnectionPlatformWindows:
		return true
	default:
		return false
	}
}

// Defines values for BrowserConnectionStatusState.
const (
	BrowserConnectionStateBrowserUnavailable   BrowserConnectionStatusState = "browser_unavailable"
	BrowserConnectionStateConnected            BrowserConnectionStatusState = "connected"
	BrowserConnectionStateExtensionUnavailable BrowserConnectionStatusState = "extension_unavailable"
	BrowserConnectionStateIsolated             BrowserConnectionStatusState = "isolated"
	BrowserConnectionStateNotConnected         BrowserConnectionStatusState = "not_connected"
	BrowserConnectionStateTokenInvalid         BrowserConnectionStatusState = "token_invalid"
	BrowserConnectionStateUnsupported          BrowserConnectionStatusState = "unsupported"
)

// Valid indicates whether the value is a known member of the BrowserConnectionStatusState enum.
func (e BrowserConnectionStatusState) Valid() bool {
	switch e {
	case BrowserConnectionStateBrowserUnavailable:
		return true
	case BrowserConnectionStateConnected:
		return true
	case BrowserConnectionStateExtensionUnavailable:
		return true
	case BrowserConnectionStateIsolated:
		return true
	case BrowserConnectionStateNotConnected:
		return true
	case BrowserConnectionStateTokenInvalid:
		return true
	case BrowserConnectionStateUnsupported:
		return true
	default:
		return false
	}
}

// Defines values for ByokProtocol.
const (
	ByokProtocolAnthropic       ByokProtocol = "anthropic"
	ByokProtocolOpenaiChat      ByokProtocol = "openai-chat"
	ByokProtocolOpenaiResponses ByokProtocol = "openai-responses"
)

// Valid indicates whether the value is a known member of the ByokProtocol enum.
func (e ByokProtocol) Valid() bool {
	switch e {
	case ByokProtocolAnthropic:
		return true
	case ByokProtocolOpenaiChat:
		return true
	case ByokProtocolOpenaiResponses:
		return true
	default:
		return false
	}
}

// Defines values for CaptureSessionChangedPayloadStatus.
const (
	CaptureSessionChangedPayloadStatusFinalized  CaptureSessionChangedPayloadStatus = "finalized"
	CaptureSessionChangedPayloadStatusFinalizing CaptureSessionChangedPayloadStatus = "finalizing"
	CaptureSessionChangedPayloadStatusRecording  CaptureSessionChangedPayloadStatus = "recording"
)

// Valid indicates whether the value is a known member of the CaptureSessionChangedPayloadStatus enum.
func (e CaptureSessionChangedPayloadStatus) Valid() bool {
	switch e {
	case CaptureSessionChangedPayloadStatusFinalized:
		return true
	case CaptureSessionChangedPayloadStatusFinalizing:
		return true
	case CaptureSessionChangedPayloadStatusRecording:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionActionAction.
const (
	ComputerPermissionActionOpenSettings ComputerPermissionActionAction = "open_settings"
	ComputerPermissionActionPrompt       ComputerPermissionActionAction = "prompt"
	ComputerPermissionActionRelaunch     ComputerPermissionActionAction = "relaunch"
)

// Valid indicates whether the value is a known member of the ComputerPermissionActionAction enum.
func (e ComputerPermissionActionAction) Valid() bool {
	switch e {
	case ComputerPermissionActionOpenSettings:
		return true
	case ComputerPermissionActionPrompt:
		return true
	case ComputerPermissionActionRelaunch:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionId.
const (
	ComputerPermissionIdAccessibility   ComputerPermissionId = "accessibility"
	ComputerPermissionIdScreenRecording ComputerPermissionId = "screen_recording"
)

// Valid indicates whether the value is a known member of the ComputerPermissionId enum.
func (e ComputerPermissionId) Valid() bool {
	switch e {
	case ComputerPermissionIdAccessibility:
		return true
	case ComputerPermissionIdScreenRecording:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionPrompt.
const (
	ComputerPermissionPromptAvailable    ComputerPermissionPrompt = "available"
	ComputerPermissionPromptSettingsOnly ComputerPermissionPrompt = "settings_only"
)

// Valid indicates whether the value is a known member of the ComputerPermissionPrompt enum.
func (e ComputerPermissionPrompt) Valid() bool {
	switch e {
	case ComputerPermissionPromptAvailable:
		return true
	case ComputerPermissionPromptSettingsOnly:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionState.
const (
	ComputerPermissionStateDenied        ComputerPermissionState = "denied"
	ComputerPermissionStateGranted       ComputerPermissionState = "granted"
	ComputerPermissionStateNotDetermined ComputerPermissionState = "not_determined"
	ComputerPermissionStateUnknown       ComputerPermissionState = "unknown"
)

// Valid indicates whether the value is a known member of the ComputerPermissionState enum.
func (e ComputerPermissionState) Valid() bool {
	switch e {
	case ComputerPermissionStateDenied:
		return true
	case ComputerPermissionStateGranted:
		return true
	case ComputerPermissionStateNotDetermined:
		return true
	case ComputerPermissionStateUnknown:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionStatusHost.
const (
	ComputerPermissionHostDesktop    ComputerPermissionStatusHost = "desktop"
	ComputerPermissionHostStandalone ComputerPermissionStatusHost = "standalone"
)

// Valid indicates whether the value is a known member of the ComputerPermissionStatusHost enum.
func (e ComputerPermissionStatusHost) Valid() bool {
	switch e {
	case ComputerPermissionHostDesktop:
		return true
	case ComputerPermissionHostStandalone:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionStatusPlatform.
const (
	ComputerPermissionPlatformDarwin  ComputerPermissionStatusPlatform = "darwin"
	ComputerPermissionPlatformLinux   ComputerPermissionStatusPlatform = "linux"
	ComputerPermissionPlatformWindows ComputerPermissionStatusPlatform = "windows"
)

// Valid indicates whether the value is a known member of the ComputerPermissionStatusPlatform enum.
func (e ComputerPermissionStatusPlatform) Valid() bool {
	switch e {
	case ComputerPermissionPlatformDarwin:
		return true
	case ComputerPermissionPlatformLinux:
		return true
	case ComputerPermissionPlatformWindows:
		return true
	default:
		return false
	}
}

// Defines values for ComputerPermissionSubject.
const (
	ComputerPermissionSubjectComputerUse ComputerPermissionSubject = "computer_use"
	ComputerPermissionSubjectLinger      ComputerPermissionSubject = "linger"
)

// Valid indicates whether the value is a known member of the ComputerPermissionSubject enum.
func (e ComputerPermissionSubject) Valid() bool {
	switch e {
	case ComputerPermissionSubjectComputerUse:
		return true
	case ComputerPermissionSubjectLinger:
		return true
	default:
		return false
	}
}

// Defines values for ConnectorConfirmationMessageFormat.
const (
	ConnectorConfirmationFormatHtml     ConnectorConfirmationMessageFormat = "html"
	ConnectorConfirmationFormatMarkdown ConnectorConfirmationMessageFormat = "markdown"
	ConnectorConfirmationFormatMrkdwn   ConnectorConfirmationMessageFormat = "mrkdwn"
	ConnectorConfirmationFormatText     ConnectorConfirmationMessageFormat = "text"
)

// Valid indicates whether the value is a known member of the ConnectorConfirmationMessageFormat enum.
func (e ConnectorConfirmationMessageFormat) Valid() bool {
	switch e {
	case ConnectorConfirmationFormatHtml:
		return true
	case ConnectorConfirmationFormatMarkdown:
		return true
	case ConnectorConfirmationFormatMrkdwn:
		return true
	case ConnectorConfirmationFormatText:
		return true
	default:
		return false
	}
}

// Defines values for ConnectorWriteDecisionViewKind.
const (
	ConnectorConfirmationKindChange  ConnectorWriteDecisionViewKind = "change"
	ConnectorConfirmationKindMessage ConnectorWriteDecisionViewKind = "message"
)

// Valid indicates whether the value is a known member of the ConnectorWriteDecisionViewKind enum.
func (e ConnectorWriteDecisionViewKind) Valid() bool {
	switch e {
	case ConnectorConfirmationKindChange:
		return true
	case ConnectorConfirmationKindMessage:
		return true
	default:
		return false
	}
}

// Defines values for CreatableAgentType.
const (
	CreatableAgentTypeGeneral CreatableAgentType = "general"
)

// Valid indicates whether the value is a known member of the CreatableAgentType enum.
func (e CreatableAgentType) Valid() bool {
	switch e {
	case CreatableAgentTypeGeneral:
		return true
	default:
		return false
	}
}

// Defines values for CurrentIdentityServerCapabilities.
const (
	LocalComputerEnrollmentDaemonId CurrentIdentityServerCapabilities = "local_computer_enrollment_daemon_id"
)

// Valid indicates whether the value is a known member of the CurrentIdentityServerCapabilities enum.
func (e CurrentIdentityServerCapabilities) Valid() bool {
	switch e {
	case LocalComputerEnrollmentDaemonId:
		return true
	default:
		return false
	}
}

// Defines values for DecisionAnswerDecision.
const (
	DecisionAnswerApprove    DecisionAnswerDecision = "approve"
	DecisionAnswerConfigured DecisionAnswerDecision = "configured"
	DecisionAnswerConnected  DecisionAnswerDecision = "connected"
	DecisionAnswerDeny       DecisionAnswerDecision = "deny"
	DecisionAnswerDone       DecisionAnswerDecision = "done"
	DecisionAnswerGranted    DecisionAnswerDecision = "granted"
	DecisionAnswerSkipped    DecisionAnswerDecision = "skipped"
	DecisionAnswerSubmit     DecisionAnswerDecision = "submit"
)

// Valid indicates whether the value is a known member of the DecisionAnswerDecision enum.
func (e DecisionAnswerDecision) Valid() bool {
	switch e {
	case DecisionAnswerApprove:
		return true
	case DecisionAnswerConfigured:
		return true
	case DecisionAnswerConnected:
		return true
	case DecisionAnswerDeny:
		return true
	case DecisionAnswerDone:
		return true
	case DecisionAnswerGranted:
		return true
	case DecisionAnswerSkipped:
		return true
	case DecisionAnswerSubmit:
		return true
	default:
		return false
	}
}

// Defines values for DecisionKind.
const (
	DecisionKindAgentChange         DecisionKind = "agent_change"
	DecisionKindBrowserConnection   DecisionKind = "browser_connection"
	DecisionKindComputerPermission  DecisionKind = "computer_permission"
	DecisionKindConnectionAuth      DecisionKind = "connection_auth"
	DecisionKindConnectorWrite      DecisionKind = "connector_write"
	DecisionKindProfileSetupApps    DecisionKind = "profile_setup_apps"
	DecisionKindProfileSetupSources DecisionKind = "profile_setup_sources"
	DecisionKindProviderKey         DecisionKind = "provider_key"
	DecisionKindQuestion            DecisionKind = "question"
	DecisionKindRoomCreation        DecisionKind = "room_creation"
	DecisionKindRuntimePermission   DecisionKind = "runtime_permission"
	DecisionKindSearchKey           DecisionKind = "search_key"
)

// Valid indicates whether the value is a known member of the DecisionKind enum.
func (e DecisionKind) Valid() bool {
	switch e {
	case DecisionKindAgentChange:
		return true
	case DecisionKindBrowserConnection:
		return true
	case DecisionKindComputerPermission:
		return true
	case DecisionKindConnectionAuth:
		return true
	case DecisionKindConnectorWrite:
		return true
	case DecisionKindProfileSetupApps:
		return true
	case DecisionKindProfileSetupSources:
		return true
	case DecisionKindProviderKey:
		return true
	case DecisionKindQuestion:
		return true
	case DecisionKindRoomCreation:
		return true
	case DecisionKindRuntimePermission:
		return true
	case DecisionKindSearchKey:
		return true
	default:
		return false
	}
}

// Defines values for DecisionQuestionInput.
const (
	Checkbox DecisionQuestionInput = "checkbox"
	Radio    DecisionQuestionInput = "radio"
)

// Valid indicates whether the value is a known member of the DecisionQuestionInput enum.
func (e DecisionQuestionInput) Valid() bool {
	switch e {
	case Checkbox:
		return true
	case Radio:
		return true
	default:
		return false
	}
}

// Defines values for DecisionRequestDecision.
const (
	DecisionRequestApprove   DecisionRequestDecision = "approve"
	DecisionRequestConnected DecisionRequestDecision = "connected"
	DecisionRequestDeny      DecisionRequestDecision = "deny"
	DecisionRequestDone      DecisionRequestDecision = "done"
	DecisionRequestSkipped   DecisionRequestDecision = "skipped"
	DecisionRequestSubmit    DecisionRequestDecision = "submit"
)

// Valid indicates whether the value is a known member of the DecisionRequestDecision enum.
func (e DecisionRequestDecision) Valid() bool {
	switch e {
	case DecisionRequestApprove:
		return true
	case DecisionRequestConnected:
		return true
	case DecisionRequestDeny:
		return true
	case DecisionRequestDone:
		return true
	case DecisionRequestSkipped:
		return true
	case DecisionRequestSubmit:
		return true
	default:
		return false
	}
}

// Defines values for DecisionStatus.
const (
	DecisionStatusAnswered    DecisionStatus = "answered"
	DecisionStatusApproved    DecisionStatus = "approved"
	DecisionStatusAuthorizing DecisionStatus = "authorizing"
	DecisionStatusConsumed    DecisionStatus = "consumed"
	DecisionStatusDenied      DecisionStatus = "denied"
	DecisionStatusExecuting   DecisionStatus = "executing"
	DecisionStatusExpired     DecisionStatus = "expired"
	DecisionStatusFailed      DecisionStatus = "failed"
	DecisionStatusPending     DecisionStatus = "pending"
	DecisionStatusSucceeded   DecisionStatus = "succeeded"
	DecisionStatusUnknown     DecisionStatus = "unknown"
)

// Valid indicates whether the value is a known member of the DecisionStatus enum.
func (e DecisionStatus) Valid() bool {
	switch e {
	case DecisionStatusAnswered:
		return true
	case DecisionStatusApproved:
		return true
	case DecisionStatusAuthorizing:
		return true
	case DecisionStatusConsumed:
		return true
	case DecisionStatusDenied:
		return true
	case DecisionStatusExecuting:
		return true
	case DecisionStatusExpired:
		return true
	case DecisionStatusFailed:
		return true
	case DecisionStatusPending:
		return true
	case DecisionStatusSucceeded:
		return true
	case DecisionStatusUnknown:
		return true
	default:
		return false
	}
}

// Defines values for DiscordChannelKind.
const (
	DiscordChannelKindAnnouncement DiscordChannelKind = "announcement"
	DiscordChannelKindForum        DiscordChannelKind = "forum"
	DiscordChannelKindMedia        DiscordChannelKind = "media"
	DiscordChannelKindText         DiscordChannelKind = "text"
)

// Valid indicates whether the value is a known member of the DiscordChannelKind enum.
func (e DiscordChannelKind) Valid() bool {
	switch e {
	case DiscordChannelKindAnnouncement:
		return true
	case DiscordChannelKindForum:
		return true
	case DiscordChannelKindMedia:
		return true
	case DiscordChannelKindText:
		return true
	default:
		return false
	}
}

// Defines values for DocumentDraftCapability.
const (
	DocumentDraftCapabilityNone  DocumentDraftCapability = "none"
	DocumentDraftCapabilityRead  DocumentDraftCapability = "read"
	DocumentDraftCapabilityWrite DocumentDraftCapability = "write"
)

// Valid indicates whether the value is a known member of the DocumentDraftCapability enum.
func (e DocumentDraftCapability) Valid() bool {
	switch e {
	case DocumentDraftCapabilityNone:
		return true
	case DocumentDraftCapabilityRead:
		return true
	case DocumentDraftCapabilityWrite:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAccessSourceKindV2.
const (
	DocumentAccessSourceKindV2Context DocumentAccessSourceKindV2 = "context"
	DocumentAccessSourceKindV2Direct  DocumentAccessSourceKindV2 = "direct"
	DocumentAccessSourceKindV2Link    DocumentAccessSourceKindV2 = "link"
	DocumentAccessSourceKindV2Owner   DocumentAccessSourceKindV2 = "owner"
)

// Valid indicates whether the value is a known member of the DocumentAccessSourceKindV2 enum.
func (e DocumentAccessSourceKindV2) Valid() bool {
	switch e {
	case DocumentAccessSourceKindV2Context:
		return true
	case DocumentAccessSourceKindV2Direct:
		return true
	case DocumentAccessSourceKindV2Link:
		return true
	case DocumentAccessSourceKindV2Owner:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAccessSourceProvenanceV2BindingKind.
const (
	DocumentAccessSourceProvenanceV2Room       DocumentAccessSourceProvenanceV2BindingKind = "room"
	DocumentAccessSourceProvenanceV2Task       DocumentAccessSourceProvenanceV2BindingKind = "task"
	DocumentAccessSourceProvenanceV2WikiPage   DocumentAccessSourceProvenanceV2BindingKind = "wiki_page"
	DocumentAccessSourceProvenanceV2WikiSource DocumentAccessSourceProvenanceV2BindingKind = "wiki_source"
)

// Valid indicates whether the value is a known member of the DocumentAccessSourceProvenanceV2BindingKind enum.
func (e DocumentAccessSourceProvenanceV2BindingKind) Valid() bool {
	switch e {
	case DocumentAccessSourceProvenanceV2Room:
		return true
	case DocumentAccessSourceProvenanceV2Task:
		return true
	case DocumentAccessSourceProvenanceV2WikiPage:
		return true
	case DocumentAccessSourceProvenanceV2WikiSource:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAccessSourceProvenanceV2Kind.
const (
	DocumentAccessSourceProvenanceV2ContextBinding DocumentAccessSourceProvenanceV2Kind = "context_binding"
	DocumentAccessSourceProvenanceV2DirectGrant    DocumentAccessSourceProvenanceV2Kind = "direct_grant"
	DocumentAccessSourceProvenanceV2LinkPolicy     DocumentAccessSourceProvenanceV2Kind = "link_policy"
	DocumentAccessSourceProvenanceV2Owner          DocumentAccessSourceProvenanceV2Kind = "owner"
)

// Valid indicates whether the value is a known member of the DocumentAccessSourceProvenanceV2Kind enum.
func (e DocumentAccessSourceProvenanceV2Kind) Valid() bool {
	switch e {
	case DocumentAccessSourceProvenanceV2ContextBinding:
		return true
	case DocumentAccessSourceProvenanceV2DirectGrant:
		return true
	case DocumentAccessSourceProvenanceV2LinkPolicy:
		return true
	case DocumentAccessSourceProvenanceV2Owner:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAccessSourceProvenanceV2MembershipMode.
const (
	DynamicActiveMembers DocumentAccessSourceProvenanceV2MembershipMode = "dynamic_active_members"
)

// Valid indicates whether the value is a known member of the DocumentAccessSourceProvenanceV2MembershipMode enum.
func (e DocumentAccessSourceProvenanceV2MembershipMode) Valid() bool {
	switch e {
	case DynamicActiveMembers:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAccessSourceStatusV2.
const (
	DocumentAccessSourceStatusV2Active   DocumentAccessSourceStatusV2 = "active"
	DocumentAccessSourceStatusV2Disabled DocumentAccessSourceStatusV2 = "disabled"
	DocumentAccessSourceStatusV2Revoked  DocumentAccessSourceStatusV2 = "revoked"
)

// Valid indicates whether the value is a known member of the DocumentAccessSourceStatusV2 enum.
func (e DocumentAccessSourceStatusV2) Valid() bool {
	switch e {
	case DocumentAccessSourceStatusV2Active:
		return true
	case DocumentAccessSourceStatusV2Disabled:
		return true
	case DocumentAccessSourceStatusV2Revoked:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAccessTargetV2Kind.
const (
	DocumentAccessTargetV2Agent DocumentAccessTargetV2Kind = "agent"
	DocumentAccessTargetV2Human DocumentAccessTargetV2Kind = "human"
	DocumentAccessTargetV2Room  DocumentAccessTargetV2Kind = "room"
)

// Valid indicates whether the value is a known member of the DocumentAccessTargetV2Kind enum.
func (e DocumentAccessTargetV2Kind) Valid() bool {
	switch e {
	case DocumentAccessTargetV2Agent:
		return true
	case DocumentAccessTargetV2Human:
		return true
	case DocumentAccessTargetV2Room:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAgentMentionRelationshipV1.
const (
	OrdinaryDirect DocumentAgentMentionRelationshipV1 = "ordinary_direct"
	Sponsor        DocumentAgentMentionRelationshipV1 = "sponsor"
)

// Valid indicates whether the value is a known member of the DocumentAgentMentionRelationshipV1 enum.
func (e DocumentAgentMentionRelationshipV1) Valid() bool {
	switch e {
	case OrdinaryDirect:
		return true
	case Sponsor:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAssetStatus.
const (
	DocumentAssetStatusAvailable   DocumentAssetStatus = "available"
	DocumentAssetStatusDeleted     DocumentAssetStatus = "deleted"
	DocumentAssetStatusDeleting    DocumentAssetStatus = "deleting"
	DocumentAssetStatusGcPending   DocumentAssetStatus = "gc_pending"
	DocumentAssetStatusPlanned     DocumentAssetStatus = "planned"
	DocumentAssetStatusQuarantined DocumentAssetStatus = "quarantined"
	DocumentAssetStatusStored      DocumentAssetStatus = "stored"
)

// Valid indicates whether the value is a known member of the DocumentAssetStatus enum.
func (e DocumentAssetStatus) Valid() bool {
	switch e {
	case DocumentAssetStatusAvailable:
		return true
	case DocumentAssetStatusDeleted:
		return true
	case DocumentAssetStatusDeleting:
		return true
	case DocumentAssetStatusGcPending:
		return true
	case DocumentAssetStatusPlanned:
		return true
	case DocumentAssetStatusQuarantined:
		return true
	case DocumentAssetStatusStored:
		return true
	default:
		return false
	}
}

// Defines values for DocumentAuthorizationModeV2.
const (
	DocumentAuthorizationModeV2AgentNative DocumentAuthorizationModeV2 = "agent_native"
	DocumentAuthorizationModeV2HumanNative DocumentAuthorizationModeV2 = "human_native"
)

// Valid indicates whether the value is a known member of the DocumentAuthorizationModeV2 enum.
func (e DocumentAuthorizationModeV2) Valid() bool {
	switch e {
	case DocumentAuthorizationModeV2AgentNative:
		return true
	case DocumentAuthorizationModeV2HumanNative:
		return true
	default:
		return false
	}
}

// Defines values for DocumentCommentAnchorKind.
const (
	DocumentCommentAnchorKindDocumentVersion DocumentCommentAnchorKind = "document_version"
	DocumentCommentAnchorKindSelection       DocumentCommentAnchorKind = "selection"
)

// Valid indicates whether the value is a known member of the DocumentCommentAnchorKind enum.
func (e DocumentCommentAnchorKind) Valid() bool {
	switch e {
	case DocumentCommentAnchorKindDocumentVersion:
		return true
	case DocumentCommentAnchorKindSelection:
		return true
	default:
		return false
	}
}

// Defines values for DocumentCommentAnchorAttachmentResultStatus.
const (
	DocumentCommentAnchorAttachmentResultStatusAlreadyAttached DocumentCommentAnchorAttachmentResultStatus = "already_attached"
	DocumentCommentAnchorAttachmentResultStatusAttached        DocumentCommentAnchorAttachmentResultStatus = "attached"
)

// Valid indicates whether the value is a known member of the DocumentCommentAnchorAttachmentResultStatus enum.
func (e DocumentCommentAnchorAttachmentResultStatus) Valid() bool {
	switch e {
	case DocumentCommentAnchorAttachmentResultStatusAlreadyAttached:
		return true
	case DocumentCommentAnchorAttachmentResultStatusAttached:
		return true
	default:
		return false
	}
}

// Defines values for DocumentCommentAnchorStatus.
const (
	DocumentCommentAnchorStatusAttached DocumentCommentAnchorStatus = "attached"
	DocumentCommentAnchorStatusOrphaned DocumentCommentAnchorStatus = "orphaned"
	DocumentCommentAnchorStatusPending  DocumentCommentAnchorStatus = "pending"
)

// Valid indicates whether the value is a known member of the DocumentCommentAnchorStatus enum.
func (e DocumentCommentAnchorStatus) Valid() bool {
	switch e {
	case DocumentCommentAnchorStatusAttached:
		return true
	case DocumentCommentAnchorStatusOrphaned:
		return true
	case DocumentCommentAnchorStatusPending:
		return true
	default:
		return false
	}
}

// Defines values for DocumentCommentChangedPayloadChangeKind.
const (
	DocumentCommentChangedPayloadChangeKindCommentDeleted    DocumentCommentChangedPayloadChangeKind = "comment_deleted"
	DocumentCommentChangedPayloadChangeKindCommentReplied    DocumentCommentChangedPayloadChangeKind = "comment_replied"
	DocumentCommentChangedPayloadChangeKindCommentUpdated    DocumentCommentChangedPayloadChangeKind = "comment_updated"
	DocumentCommentChangedPayloadChangeKindReactionChanged   DocumentCommentChangedPayloadChangeKind = "reaction_changed"
	DocumentCommentChangedPayloadChangeKindResolutionChanged DocumentCommentChangedPayloadChangeKind = "resolution_changed"
	DocumentCommentChangedPayloadChangeKindThreadCreated     DocumentCommentChangedPayloadChangeKind = "thread_created"
	DocumentCommentChangedPayloadChangeKindThreadReanchored  DocumentCommentChangedPayloadChangeKind = "thread_reanchored"
)

// Valid indicates whether the value is a known member of the DocumentCommentChangedPayloadChangeKind enum.
func (e DocumentCommentChangedPayloadChangeKind) Valid() bool {
	switch e {
	case DocumentCommentChangedPayloadChangeKindCommentDeleted:
		return true
	case DocumentCommentChangedPayloadChangeKindCommentReplied:
		return true
	case DocumentCommentChangedPayloadChangeKindCommentUpdated:
		return true
	case DocumentCommentChangedPayloadChangeKindReactionChanged:
		return true
	case DocumentCommentChangedPayloadChangeKindResolutionChanged:
		return true
	case DocumentCommentChangedPayloadChangeKindThreadCreated:
		return true
	case DocumentCommentChangedPayloadChangeKindThreadReanchored:
		return true
	default:
		return false
	}
}

// Defines values for DocumentContentRoleV2.
const (
	DocumentContentRoleV2Editor  DocumentContentRoleV2 = "editor"
	DocumentContentRoleV2Manager DocumentContentRoleV2 = "manager"
	DocumentContentRoleV2Owner   DocumentContentRoleV2 = "owner"
	DocumentContentRoleV2Viewer  DocumentContentRoleV2 = "viewer"
)

// Valid indicates whether the value is a known member of the DocumentContentRoleV2 enum.
func (e DocumentContentRoleV2) Valid() bool {
	switch e {
	case DocumentContentRoleV2Editor:
		return true
	case DocumentContentRoleV2Manager:
		return true
	case DocumentContentRoleV2Owner:
		return true
	case DocumentContentRoleV2Viewer:
		return true
	default:
		return false
	}
}

// Defines values for DocumentCreateRequestRepresentationFormat.
const (
	Html     DocumentCreateRequestRepresentationFormat = "html"
	Markdown DocumentCreateRequestRepresentationFormat = "markdown"
)

// Valid indicates whether the value is a known member of the DocumentCreateRequestRepresentationFormat enum.
func (e DocumentCreateRequestRepresentationFormat) Valid() bool {
	switch e {
	case Html:
		return true
	case Markdown:
		return true
	default:
		return false
	}
}

// Defines values for DocumentDirectCollaboratorCreateRequestRole.
const (
	DocumentDirectCollaboratorCreateRequestRoleEditor  DocumentDirectCollaboratorCreateRequestRole = "editor"
	DocumentDirectCollaboratorCreateRequestRoleManager DocumentDirectCollaboratorCreateRequestRole = "manager"
	DocumentDirectCollaboratorCreateRequestRoleViewer  DocumentDirectCollaboratorCreateRequestRole = "viewer"
)

// Valid indicates whether the value is a known member of the DocumentDirectCollaboratorCreateRequestRole enum.
func (e DocumentDirectCollaboratorCreateRequestRole) Valid() bool {
	switch e {
	case DocumentDirectCollaboratorCreateRequestRoleEditor:
		return true
	case DocumentDirectCollaboratorCreateRequestRoleManager:
		return true
	case DocumentDirectCollaboratorCreateRequestRoleViewer:
		return true
	default:
		return false
	}
}

// Defines values for DocumentDirectCollaboratorUpdateRequestRole.
const (
	DocumentDirectCollaboratorUpdateRequestRoleEditor  DocumentDirectCollaboratorUpdateRequestRole = "editor"
	DocumentDirectCollaboratorUpdateRequestRoleManager DocumentDirectCollaboratorUpdateRequestRole = "manager"
	DocumentDirectCollaboratorUpdateRequestRoleViewer  DocumentDirectCollaboratorUpdateRequestRole = "viewer"
)

// Valid indicates whether the value is a known member of the DocumentDirectCollaboratorUpdateRequestRole enum.
func (e DocumentDirectCollaboratorUpdateRequestRole) Valid() bool {
	switch e {
	case DocumentDirectCollaboratorUpdateRequestRoleEditor:
		return true
	case DocumentDirectCollaboratorUpdateRequestRoleManager:
		return true
	case DocumentDirectCollaboratorUpdateRequestRoleViewer:
		return true
	default:
		return false
	}
}

// Defines values for DocumentHistoryCheckpointStatus.
const (
	DocumentHistoryCheckpointStatusCompleted DocumentHistoryCheckpointStatus = "completed"
	DocumentHistoryCheckpointStatusFailed    DocumentHistoryCheckpointStatus = "failed"
	DocumentHistoryCheckpointStatusPending   DocumentHistoryCheckpointStatus = "pending"
)

// Valid indicates whether the value is a known member of the DocumentHistoryCheckpointStatus enum.
func (e DocumentHistoryCheckpointStatus) Valid() bool {
	switch e {
	case DocumentHistoryCheckpointStatusCompleted:
		return true
	case DocumentHistoryCheckpointStatusFailed:
		return true
	case DocumentHistoryCheckpointStatusPending:
		return true
	default:
		return false
	}
}

// Defines values for DocumentHistoryRestoreResultStatus.
const (
	AlreadyCurrent DocumentHistoryRestoreResultStatus = "already_current"
	Restored       DocumentHistoryRestoreResultStatus = "restored"
)

// Valid indicates whether the value is a known member of the DocumentHistoryRestoreResultStatus enum.
func (e DocumentHistoryRestoreResultStatus) Valid() bool {
	switch e {
	case AlreadyCurrent:
		return true
	case Restored:
		return true
	default:
		return false
	}
}

// Defines values for DocumentHistoryTrigger.
const (
	DocumentHistoryTriggerAgentEdit DocumentHistoryTrigger = "agent_edit"
	DocumentHistoryTriggerIdle      DocumentHistoryTrigger = "idle"
	DocumentHistoryTriggerManual    DocumentHistoryTrigger = "manual"
	DocumentHistoryTriggerRestore   DocumentHistoryTrigger = "restore"
)

// Valid indicates whether the value is a known member of the DocumentHistoryTrigger enum.
func (e DocumentHistoryTrigger) Valid() bool {
	switch e {
	case DocumentHistoryTriggerAgentEdit:
		return true
	case DocumentHistoryTriggerIdle:
		return true
	case DocumentHistoryTriggerManual:
		return true
	case DocumentHistoryTriggerRestore:
		return true
	default:
		return false
	}
}

// Defines values for DocumentLinkAccessRole.
const (
	DocumentLinkAccessRoleEditor DocumentLinkAccessRole = "editor"
	DocumentLinkAccessRoleViewer DocumentLinkAccessRole = "viewer"
)

// Valid indicates whether the value is a known member of the DocumentLinkAccessRole enum.
func (e DocumentLinkAccessRole) Valid() bool {
	switch e {
	case DocumentLinkAccessRoleEditor:
		return true
	case DocumentLinkAccessRoleViewer:
		return true
	default:
		return false
	}
}

// Defines values for DocumentLinkScopeV2.
const (
	DocumentLinkScopeV2AnyoneWithLink DocumentLinkScopeV2 = "anyone_with_link"
	DocumentLinkScopeV2Restricted     DocumentLinkScopeV2 = "restricted"
	DocumentLinkScopeV2TenantMembers  DocumentLinkScopeV2 = "tenant_members"
)

// Valid indicates whether the value is a known member of the DocumentLinkScopeV2 enum.
func (e DocumentLinkScopeV2) Valid() bool {
	switch e {
	case DocumentLinkScopeV2AnyoneWithLink:
		return true
	case DocumentLinkScopeV2Restricted:
		return true
	case DocumentLinkScopeV2TenantMembers:
		return true
	default:
		return false
	}
}

// Defines values for DocumentLinkShareRole.
const (
	DocumentLinkShareRoleEditor DocumentLinkShareRole = "editor"
	DocumentLinkShareRoleViewer DocumentLinkShareRole = "viewer"
)

// Valid indicates whether the value is a known member of the DocumentLinkShareRole enum.
func (e DocumentLinkShareRole) Valid() bool {
	switch e {
	case DocumentLinkShareRoleEditor:
		return true
	case DocumentLinkShareRoleViewer:
		return true
	default:
		return false
	}
}

// Defines values for DocumentLinkShareStatus.
const (
	DocumentLinkShareStatusActive  DocumentLinkShareStatus = "active"
	DocumentLinkShareStatusRevoked DocumentLinkShareStatus = "revoked"
)

// Valid indicates whether the value is a known member of the DocumentLinkShareStatus enum.
func (e DocumentLinkShareStatus) Valid() bool {
	switch e {
	case DocumentLinkShareStatusActive:
		return true
	case DocumentLinkShareStatusRevoked:
		return true
	default:
		return false
	}
}

// Defines values for DocumentRoomBindingResultV1Role.
const (
	DocumentRoomBindingResultV1RoleEditor  DocumentRoomBindingResultV1Role = "editor"
	DocumentRoomBindingResultV1RoleManager DocumentRoomBindingResultV1Role = "manager"
	DocumentRoomBindingResultV1RoleViewer  DocumentRoomBindingResultV1Role = "viewer"
)

// Valid indicates whether the value is a known member of the DocumentRoomBindingResultV1Role enum.
func (e DocumentRoomBindingResultV1Role) Valid() bool {
	switch e {
	case DocumentRoomBindingResultV1RoleEditor:
		return true
	case DocumentRoomBindingResultV1RoleManager:
		return true
	case DocumentRoomBindingResultV1RoleViewer:
		return true
	default:
		return false
	}
}

// Defines values for DocumentRoomBindingResultV1Status.
const (
	DocumentRoomBindingResultV1StatusActive    DocumentRoomBindingResultV1Status = "active"
	DocumentRoomBindingResultV1StatusSuspended DocumentRoomBindingResultV1Status = "suspended"
)

// Valid indicates whether the value is a known member of the DocumentRoomBindingResultV1Status enum.
func (e DocumentRoomBindingResultV1Status) Valid() bool {
	switch e {
	case DocumentRoomBindingResultV1StatusActive:
		return true
	case DocumentRoomBindingResultV1StatusSuspended:
		return true
	default:
		return false
	}
}

// Defines values for DocumentSearchMatchBodyIndexStatus.
const (
	DocumentSearchMatchBodyIndexStatusFailed      DocumentSearchMatchBodyIndexStatus = "failed"
	DocumentSearchMatchBodyIndexStatusNoText      DocumentSearchMatchBodyIndexStatus = "no_text"
	DocumentSearchMatchBodyIndexStatusPending     DocumentSearchMatchBodyIndexStatus = "pending"
	DocumentSearchMatchBodyIndexStatusReady       DocumentSearchMatchBodyIndexStatus = "ready"
	DocumentSearchMatchBodyIndexStatusTooLarge    DocumentSearchMatchBodyIndexStatus = "too_large"
	DocumentSearchMatchBodyIndexStatusUnsupported DocumentSearchMatchBodyIndexStatus = "unsupported"
)

// Valid indicates whether the value is a known member of the DocumentSearchMatchBodyIndexStatus enum.
func (e DocumentSearchMatchBodyIndexStatus) Valid() bool {
	switch e {
	case DocumentSearchMatchBodyIndexStatusFailed:
		return true
	case DocumentSearchMatchBodyIndexStatusNoText:
		return true
	case DocumentSearchMatchBodyIndexStatusPending:
		return true
	case DocumentSearchMatchBodyIndexStatusReady:
		return true
	case DocumentSearchMatchBodyIndexStatusTooLarge:
		return true
	case DocumentSearchMatchBodyIndexStatusUnsupported:
		return true
	default:
		return false
	}
}

// Defines values for DocumentSegmentPresentation.
const (
	DocumentSegmentPresentationCanvas DocumentSegmentPresentation = "canvas"
	DocumentSegmentPresentationCard   DocumentSegmentPresentation = "card"
	DocumentSegmentPresentationInline DocumentSegmentPresentation = "inline"
)

// Valid indicates whether the value is a known member of the DocumentSegmentPresentation enum.
func (e DocumentSegmentPresentation) Valid() bool {
	switch e {
	case DocumentSegmentPresentationCanvas:
		return true
	case DocumentSegmentPresentationCard:
		return true
	case DocumentSegmentPresentationInline:
		return true
	default:
		return false
	}
}

// Defines values for DocumentShareSourceV2CallerAccessState.
const (
	Inactive  DocumentShareSourceV2CallerAccessState = "inactive"
	NotCaller DocumentShareSourceV2CallerAccessState = "not_caller"
	Remaining DocumentShareSourceV2CallerAccessState = "remaining"
	Winning   DocumentShareSourceV2CallerAccessState = "winning"
)

// Valid indicates whether the value is a known member of the DocumentShareSourceV2CallerAccessState enum.
func (e DocumentShareSourceV2CallerAccessState) Valid() bool {
	switch e {
	case Inactive:
		return true
	case NotCaller:
		return true
	case Remaining:
		return true
	case Winning:
		return true
	default:
		return false
	}
}

// Defines values for DocumentShareSourceV2SourceGroup.
const (
	DocumentShareSourceV2SourceGroupContext DocumentShareSourceV2SourceGroup = "context"
	DocumentShareSourceV2SourceGroupDirect  DocumentShareSourceV2SourceGroup = "direct"
	DocumentShareSourceV2SourceGroupLink    DocumentShareSourceV2SourceGroup = "link"
)

// Valid indicates whether the value is a known member of the DocumentShareSourceV2SourceGroup enum.
func (e DocumentShareSourceV2SourceGroup) Valid() bool {
	switch e {
	case DocumentShareSourceV2SourceGroupContext:
		return true
	case DocumentShareSourceV2SourceGroupDirect:
		return true
	case DocumentShareSourceV2SourceGroupLink:
		return true
	default:
		return false
	}
}

// Defines values for DocumentVersionSource.
const (
	DocumentVersionSourceAgentPublication  DocumentVersionSource = "agent_publication"
	DocumentVersionSourceHumanExport       DocumentVersionSource = "human_export"
	DocumentVersionSourceLegacyMigration   DocumentVersionSource = "legacy_migration"
	DocumentVersionSourceOrdinaryUpload    DocumentVersionSource = "ordinary_upload"
	DocumentVersionSourceReplacementUpload DocumentVersionSource = "replacement_upload"
	DocumentVersionSourceWikiPage          DocumentVersionSource = "wiki_page"
)

// Valid indicates whether the value is a known member of the DocumentVersionSource enum.
func (e DocumentVersionSource) Valid() bool {
	switch e {
	case DocumentVersionSourceAgentPublication:
		return true
	case DocumentVersionSourceHumanExport:
		return true
	case DocumentVersionSourceLegacyMigration:
		return true
	case DocumentVersionSourceOrdinaryUpload:
		return true
	case DocumentVersionSourceReplacementUpload:
		return true
	case DocumentVersionSourceWikiPage:
		return true
	default:
		return false
	}
}

// Defines values for ExternalAppAvailability.
const (
	ExternalAppAvailabilityAvailable   ExternalAppAvailability = "available"
	ExternalAppAvailabilityUnavailable ExternalAppAvailability = "unavailable"
)

// Valid indicates whether the value is a known member of the ExternalAppAvailability enum.
func (e ExternalAppAvailability) Valid() bool {
	switch e {
	case ExternalAppAvailabilityAvailable:
		return true
	case ExternalAppAvailabilityUnavailable:
		return true
	default:
		return false
	}
}

// Defines values for ExternalAppCapability.
const (
	AgentTools         ExternalAppCapability = "agent_tools"
	Connect            ExternalAppCapability = "connect"
	PersonalWikiImport ExternalAppCapability = "personal_wiki_import"
	ProactiveReminders ExternalAppCapability = "proactive_reminders"
)

// Valid indicates whether the value is a known member of the ExternalAppCapability enum.
func (e ExternalAppCapability) Valid() bool {
	switch e {
	case AgentTools:
		return true
	case Connect:
		return true
	case PersonalWikiImport:
		return true
	case ProactiveReminders:
		return true
	default:
		return false
	}
}

// Defines values for ExternalConnectionReauthorizationErrorCode.
const (
	ExternalConnectionReauthorizationErrorCodeCandidateNotActive       ExternalConnectionReauthorizationErrorCode = "candidate_not_active"
	ExternalConnectionReauthorizationErrorCodeConnectLinkExpired       ExternalConnectionReauthorizationErrorCode = "connect_link_expired"
	ExternalConnectionReauthorizationErrorCodeDuplicateRemotePrincipal ExternalConnectionReauthorizationErrorCode = "duplicate_remote_principal"
	ExternalConnectionReauthorizationErrorCodeIdentityMismatch         ExternalConnectionReauthorizationErrorCode = "identity_mismatch"
	ExternalConnectionReauthorizationErrorCodeInternalError            ExternalConnectionReauthorizationErrorCode = "internal_error"
	ExternalConnectionReauthorizationErrorCodeStaleRevision            ExternalConnectionReauthorizationErrorCode = "stale_revision"
)

// Valid indicates whether the value is a known member of the ExternalConnectionReauthorizationErrorCode enum.
func (e ExternalConnectionReauthorizationErrorCode) Valid() bool {
	switch e {
	case ExternalConnectionReauthorizationErrorCodeCandidateNotActive:
		return true
	case ExternalConnectionReauthorizationErrorCodeConnectLinkExpired:
		return true
	case ExternalConnectionReauthorizationErrorCodeDuplicateRemotePrincipal:
		return true
	case ExternalConnectionReauthorizationErrorCodeIdentityMismatch:
		return true
	case ExternalConnectionReauthorizationErrorCodeInternalError:
		return true
	case ExternalConnectionReauthorizationErrorCodeStaleRevision:
		return true
	default:
		return false
	}
}

// Defines values for ExternalConnectionStatus.
const (
	ExternalConnectionStatusActive        ExternalConnectionStatus = "active"
	ExternalConnectionStatusDisconnecting ExternalConnectionStatus = "disconnecting"
	ExternalConnectionStatusExpired       ExternalConnectionStatus = "expired"
	ExternalConnectionStatusFailed        ExternalConnectionStatus = "failed"
	ExternalConnectionStatusPending       ExternalConnectionStatus = "pending"
	ExternalConnectionStatusRevokePending ExternalConnectionStatus = "revoke_pending"
	ExternalConnectionStatusRevoked       ExternalConnectionStatus = "revoked"
)

// Valid indicates whether the value is a known member of the ExternalConnectionStatus enum.
func (e ExternalConnectionStatus) Valid() bool {
	switch e {
	case ExternalConnectionStatusActive:
		return true
	case ExternalConnectionStatusDisconnecting:
		return true
	case ExternalConnectionStatusExpired:
		return true
	case ExternalConnectionStatusFailed:
		return true
	case ExternalConnectionStatusPending:
		return true
	case ExternalConnectionStatusRevokePending:
		return true
	case ExternalConnectionStatusRevoked:
		return true
	default:
		return false
	}
}

// Defines values for ExternalProviderKeyStatusSource.
const (
	ExternalProviderKeyStatusSourceEnvironment ExternalProviderKeyStatusSource = "environment"
	ExternalProviderKeyStatusSourceNone        ExternalProviderKeyStatusSource = "none"
	ExternalProviderKeyStatusSourceStored      ExternalProviderKeyStatusSource = "stored"
)

// Valid indicates whether the value is a known member of the ExternalProviderKeyStatusSource enum.
func (e ExternalProviderKeyStatusSource) Valid() bool {
	switch e {
	case ExternalProviderKeyStatusSourceEnvironment:
		return true
	case ExternalProviderKeyStatusSourceNone:
		return true
	case ExternalProviderKeyStatusSourceStored:
		return true
	default:
		return false
	}
}

// Defines values for GoogleCalendarAccessRole.
const (
	GoogleCalendarAccessRoleOwner  GoogleCalendarAccessRole = "owner"
	GoogleCalendarAccessRoleReader GoogleCalendarAccessRole = "reader"
	GoogleCalendarAccessRoleWriter GoogleCalendarAccessRole = "writer"
)

// Valid indicates whether the value is a known member of the GoogleCalendarAccessRole enum.
func (e GoogleCalendarAccessRole) Valid() bool {
	switch e {
	case GoogleCalendarAccessRoleOwner:
		return true
	case GoogleCalendarAccessRoleReader:
		return true
	case GoogleCalendarAccessRoleWriter:
		return true
	default:
		return false
	}
}

// Defines values for LocalAgentRuntimeStatusComputerStatus.
const (
	LocalAgentRuntimeStatusComputerStatusOffline LocalAgentRuntimeStatusComputerStatus = "offline"
	LocalAgentRuntimeStatusComputerStatusOnline  LocalAgentRuntimeStatusComputerStatus = "online"
	LocalAgentRuntimeStatusComputerStatusUnknown LocalAgentRuntimeStatusComputerStatus = "unknown"
)

// Valid indicates whether the value is a known member of the LocalAgentRuntimeStatusComputerStatus enum.
func (e LocalAgentRuntimeStatusComputerStatus) Valid() bool {
	switch e {
	case LocalAgentRuntimeStatusComputerStatusOffline:
		return true
	case LocalAgentRuntimeStatusComputerStatusOnline:
		return true
	case LocalAgentRuntimeStatusComputerStatusUnknown:
		return true
	default:
		return false
	}
}

// Defines values for LocalAgentRuntimeStatusConnectionStatus.
const (
	LocalAgentRuntimeStatusConnectionStatusConnected    LocalAgentRuntimeStatusConnectionStatus = "connected"
	LocalAgentRuntimeStatusConnectionStatusOffline      LocalAgentRuntimeStatusConnectionStatus = "offline"
	LocalAgentRuntimeStatusConnectionStatusReconnecting LocalAgentRuntimeStatusConnectionStatus = "reconnecting"
	LocalAgentRuntimeStatusConnectionStatusUnknown      LocalAgentRuntimeStatusConnectionStatus = "unknown"
)

// Valid indicates whether the value is a known member of the LocalAgentRuntimeStatusConnectionStatus enum.
func (e LocalAgentRuntimeStatusConnectionStatus) Valid() bool {
	switch e {
	case LocalAgentRuntimeStatusConnectionStatusConnected:
		return true
	case LocalAgentRuntimeStatusConnectionStatusOffline:
		return true
	case LocalAgentRuntimeStatusConnectionStatusReconnecting:
		return true
	case LocalAgentRuntimeStatusConnectionStatusUnknown:
		return true
	default:
		return false
	}
}

// Defines values for LocalComputerPlatform.
const (
	Darwin LocalComputerPlatform = "darwin"
	Linux  LocalComputerPlatform = "linux"
	Win32  LocalComputerPlatform = "win32"
)

// Valid indicates whether the value is a known member of the LocalComputerPlatform enum.
func (e LocalComputerPlatform) Valid() bool {
	switch e {
	case Darwin:
		return true
	case Linux:
		return true
	case Win32:
		return true
	default:
		return false
	}
}

// Defines values for LocalComputerStatus.
const (
	LocalComputerStatusOffline LocalComputerStatus = "offline"
	LocalComputerStatusOnline  LocalComputerStatus = "online"
)

// Valid indicates whether the value is a known member of the LocalComputerStatus enum.
func (e LocalComputerStatus) Valid() bool {
	switch e {
	case LocalComputerStatusOffline:
		return true
	case LocalComputerStatusOnline:
		return true
	default:
		return false
	}
}

// Defines values for LocalComputerWorkspaceGrantMode.
const (
	ReadOnly       LocalComputerWorkspaceGrantMode = "read-only"
	WorkspaceWrite LocalComputerWorkspaceGrantMode = "workspace-write"
)

// Valid indicates whether the value is a known member of the LocalComputerWorkspaceGrantMode enum.
func (e LocalComputerWorkspaceGrantMode) Valid() bool {
	switch e {
	case ReadOnly:
		return true
	case WorkspaceWrite:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelActionAcceptedAction.
const (
	LocalModelActionAcceptedCancel   LocalModelActionAcceptedAction = "cancel"
	LocalModelActionAcceptedDownload LocalModelActionAcceptedAction = "download"
	LocalModelActionAcceptedLoad     LocalModelActionAcceptedAction = "load"
	LocalModelActionAcceptedRemove   LocalModelActionAcceptedAction = "remove"
	LocalModelActionAcceptedUnload   LocalModelActionAcceptedAction = "unload"
)

// Valid indicates whether the value is a known member of the LocalModelActionAcceptedAction enum.
func (e LocalModelActionAcceptedAction) Valid() bool {
	switch e {
	case LocalModelActionAcceptedCancel:
		return true
	case LocalModelActionAcceptedDownload:
		return true
	case LocalModelActionAcceptedLoad:
		return true
	case LocalModelActionAcceptedRemove:
		return true
	case LocalModelActionAcceptedUnload:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelActionRequestAction.
const (
	LocalModelActionRequestCancel   LocalModelActionRequestAction = "cancel"
	LocalModelActionRequestDownload LocalModelActionRequestAction = "download"
	LocalModelActionRequestLoad     LocalModelActionRequestAction = "load"
	LocalModelActionRequestRemove   LocalModelActionRequestAction = "remove"
	LocalModelActionRequestUnload   LocalModelActionRequestAction = "unload"
)

// Valid indicates whether the value is a known member of the LocalModelActionRequestAction enum.
func (e LocalModelActionRequestAction) Valid() bool {
	switch e {
	case LocalModelActionRequestCancel:
		return true
	case LocalModelActionRequestDownload:
		return true
	case LocalModelActionRequestLoad:
		return true
	case LocalModelActionRequestRemove:
		return true
	case LocalModelActionRequestUnload:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelArchitecture.
const (
	LocalModelArchitectureDense LocalModelArchitecture = "dense"
	LocalModelArchitectureMoe   LocalModelArchitecture = "moe"
)

// Valid indicates whether the value is a known member of the LocalModelArchitecture enum.
func (e LocalModelArchitecture) Valid() bool {
	switch e {
	case LocalModelArchitectureDense:
		return true
	case LocalModelArchitectureMoe:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelAvailabilityReasonCode.
const (
	LocalModelAvailabilityDiskInsufficient    LocalModelAvailabilityReasonCode = "DISK_INSUFFICIENT"
	LocalModelAvailabilityMemoryInsufficient  LocalModelAvailabilityReasonCode = "MEMORY_INSUFFICIENT"
	LocalModelAvailabilityPlatformUnsupported LocalModelAvailabilityReasonCode = "PLATFORM_UNSUPPORTED"
)

// Valid indicates whether the value is a known member of the LocalModelAvailabilityReasonCode enum.
func (e LocalModelAvailabilityReasonCode) Valid() bool {
	switch e {
	case LocalModelAvailabilityDiskInsufficient:
		return true
	case LocalModelAvailabilityMemoryInsufficient:
		return true
	case LocalModelAvailabilityPlatformUnsupported:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelCapability.
const (
	LocalModelCapabilityCoding       LocalModelCapability = "coding"
	LocalModelCapabilityMultilingual LocalModelCapability = "multilingual"
	LocalModelCapabilityReasoning    LocalModelCapability = "reasoning"
	LocalModelCapabilityToolUse      LocalModelCapability = "tool_use"
	LocalModelCapabilityVision       LocalModelCapability = "vision"
)

// Valid indicates whether the value is a known member of the LocalModelCapability enum.
func (e LocalModelCapability) Valid() bool {
	switch e {
	case LocalModelCapabilityCoding:
		return true
	case LocalModelCapabilityMultilingual:
		return true
	case LocalModelCapabilityReasoning:
		return true
	case LocalModelCapabilityToolUse:
		return true
	case LocalModelCapabilityVision:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelDownloadProgressStep.
const (
	LocalModelDownloadStepDownload LocalModelDownloadProgressStep = "download"
	LocalModelDownloadStepVerify   LocalModelDownloadProgressStep = "verify"
)

// Valid indicates whether the value is a known member of the LocalModelDownloadProgressStep enum.
func (e LocalModelDownloadProgressStep) Valid() bool {
	switch e {
	case LocalModelDownloadStepDownload:
		return true
	case LocalModelDownloadStepVerify:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelErrorCause.
const (
	LocalModelErrorCauseGatewayHomeNotPrivate LocalModelErrorCause = "GATEWAY_HOME_NOT_PRIVATE"
)

// Valid indicates whether the value is a known member of the LocalModelErrorCause enum.
func (e LocalModelErrorCause) Valid() bool {
	switch e {
	case LocalModelErrorCauseGatewayHomeNotPrivate:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelErrorCode.
const (
	CANCELLED                 LocalModelErrorCode = "CANCELLED"
	CHECKSUMMISMATCH          LocalModelErrorCode = "CHECKSUM_MISMATCH"
	DISKINSUFFICIENT          LocalModelErrorCode = "DISK_INSUFFICIENT"
	DOWNLOADFAILED            LocalModelErrorCode = "DOWNLOAD_FAILED"
	ENGINESTARTFAILED         LocalModelErrorCode = "ENGINE_START_FAILED"
	GATEWAYREGISTRATIONFAILED LocalModelErrorCode = "GATEWAY_REGISTRATION_FAILED"
	HEALTHCHECKFAILED         LocalModelErrorCode = "HEALTH_CHECK_FAILED"
	INVALIDSTATE              LocalModelErrorCode = "INVALID_STATE"
	JOBRUNNING                LocalModelErrorCode = "JOB_RUNNING"
	LOADNOROOM                LocalModelErrorCode = "LOAD_NO_ROOM"
	MEMORYINSUFFICIENT        LocalModelErrorCode = "MEMORY_INSUFFICIENT"
	MODELFILESMISSING         LocalModelErrorCode = "MODEL_FILES_MISSING"
	MODELUNKNOWN              LocalModelErrorCode = "MODEL_UNKNOWN"
	NETWORKUNAVAILABLE        LocalModelErrorCode = "NETWORK_UNAVAILABLE"
	OUTOFMEMORY               LocalModelErrorCode = "OUT_OF_MEMORY"
	PLATFORMUNSUPPORTED       LocalModelErrorCode = "PLATFORM_UNSUPPORTED"
)

// Valid indicates whether the value is a known member of the LocalModelErrorCode enum.
func (e LocalModelErrorCode) Valid() bool {
	switch e {
	case CANCELLED:
		return true
	case CHECKSUMMISMATCH:
		return true
	case DISKINSUFFICIENT:
		return true
	case DOWNLOADFAILED:
		return true
	case ENGINESTARTFAILED:
		return true
	case GATEWAYREGISTRATIONFAILED:
		return true
	case HEALTHCHECKFAILED:
		return true
	case INVALIDSTATE:
		return true
	case JOBRUNNING:
		return true
	case LOADNOROOM:
		return true
	case MEMORYINSUFFICIENT:
		return true
	case MODELFILESMISSING:
		return true
	case MODELUNKNOWN:
		return true
	case NETWORKUNAVAILABLE:
		return true
	case OUTOFMEMORY:
		return true
	case PLATFORMUNSUPPORTED:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelFamily.
const (
	LocalModelFamilyClaude   LocalModelFamily = "claude"
	LocalModelFamilyDeepseek LocalModelFamily = "deepseek"
	LocalModelFamilyGemma    LocalModelFamily = "gemma"
	LocalModelFamilyGlm      LocalModelFamily = "glm"
	LocalModelFamilyGrok     LocalModelFamily = "grok"
	LocalModelFamilyKimi     LocalModelFamily = "kimi"
	LocalModelFamilyLlama    LocalModelFamily = "llama"
	LocalModelFamilyMistral  LocalModelFamily = "mistral"
	LocalModelFamilyOpenai   LocalModelFamily = "openai"
	LocalModelFamilyOther    LocalModelFamily = "other"
	LocalModelFamilyPhi      LocalModelFamily = "phi"
	LocalModelFamilyQwen     LocalModelFamily = "qwen"
)

// Valid indicates whether the value is a known member of the LocalModelFamily enum.
func (e LocalModelFamily) Valid() bool {
	switch e {
	case LocalModelFamilyClaude:
		return true
	case LocalModelFamilyDeepseek:
		return true
	case LocalModelFamilyGemma:
		return true
	case LocalModelFamilyGlm:
		return true
	case LocalModelFamilyGrok:
		return true
	case LocalModelFamilyKimi:
		return true
	case LocalModelFamilyLlama:
		return true
	case LocalModelFamilyMistral:
		return true
	case LocalModelFamilyOpenai:
		return true
	case LocalModelFamilyOther:
		return true
	case LocalModelFamilyPhi:
		return true
	case LocalModelFamilyQwen:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelFit.
const (
	LocalModelFitGpu     LocalModelFit = "gpu"
	LocalModelFitNone    LocalModelFit = "none"
	LocalModelFitSystem  LocalModelFit = "system"
	LocalModelFitUnified LocalModelFit = "unified"
)

// Valid indicates whether the value is a known member of the LocalModelFit enum.
func (e LocalModelFit) Valid() bool {
	switch e {
	case LocalModelFitGpu:
		return true
	case LocalModelFitNone:
		return true
	case LocalModelFitSystem:
		return true
	case LocalModelFitUnified:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelHostArch.
const (
	LocalModelHostArchArm64 LocalModelHostArch = "arm64"
	LocalModelHostArchX8664 LocalModelHostArch = "x86_64"
)

// Valid indicates whether the value is a known member of the LocalModelHostArch enum.
func (e LocalModelHostArch) Valid() bool {
	switch e {
	case LocalModelHostArchArm64:
		return true
	case LocalModelHostArchX8664:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelHostPlatform.
const (
	LocalModelHostPlatformDarwin  LocalModelHostPlatform = "darwin"
	LocalModelHostPlatformLinux   LocalModelHostPlatform = "linux"
	LocalModelHostPlatformWindows LocalModelHostPlatform = "windows"
)

// Valid indicates whether the value is a known member of the LocalModelHostPlatform enum.
func (e LocalModelHostPlatform) Valid() bool {
	switch e {
	case LocalModelHostPlatformDarwin:
		return true
	case LocalModelHostPlatformLinux:
		return true
	case LocalModelHostPlatformWindows:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelNoteCode.
const (
	LocalModelNoteNoRoomToLoad LocalModelNoteCode = "NO_ROOM_TO_LOAD"
)

// Valid indicates whether the value is a known member of the LocalModelNoteCode enum.
func (e LocalModelNoteCode) Valid() bool {
	switch e {
	case LocalModelNoteNoRoomToLoad:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelPoolKind.
const (
	LocalModelPoolKindGpu     LocalModelPoolKind = "gpu"
	LocalModelPoolKindSystem  LocalModelPoolKind = "system"
	LocalModelPoolKindUnified LocalModelPoolKind = "unified"
)

// Valid indicates whether the value is a known member of the LocalModelPoolKind enum.
func (e LocalModelPoolKind) Valid() bool {
	switch e {
	case LocalModelPoolKindGpu:
		return true
	case LocalModelPoolKindSystem:
		return true
	case LocalModelPoolKindUnified:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelPoolHolderKind.
const (
	LocalModelPoolHolderKindComponent LocalModelPoolHolderKind = "component"
	LocalModelPoolHolderKindModel     LocalModelPoolHolderKind = "model"
)

// Valid indicates whether the value is a known member of the LocalModelPoolHolderKind enum.
func (e LocalModelPoolHolderKind) Valid() bool {
	switch e {
	case LocalModelPoolHolderKindComponent:
		return true
	case LocalModelPoolHolderKindModel:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelState.
const (
	LocalModelStateAbsent      LocalModelState = "absent"
	LocalModelStateDownloading LocalModelState = "downloading"
	LocalModelStateFailed      LocalModelState = "failed"
	LocalModelStateIdle        LocalModelState = "idle"
	LocalModelStateLoaded      LocalModelState = "loaded"
	LocalModelStateLoading     LocalModelState = "loading"
)

// Valid indicates whether the value is a known member of the LocalModelState enum.
func (e LocalModelState) Valid() bool {
	switch e {
	case LocalModelStateAbsent:
		return true
	case LocalModelStateDownloading:
		return true
	case LocalModelStateFailed:
		return true
	case LocalModelStateIdle:
		return true
	case LocalModelStateLoaded:
		return true
	case LocalModelStateLoading:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelsComputerStatus.
const (
	LocalModelsComputerOffline LocalModelsComputerStatus = "offline"
	LocalModelsComputerOnline  LocalModelsComputerStatus = "online"
)

// Valid indicates whether the value is a known member of the LocalModelsComputerStatus enum.
func (e LocalModelsComputerStatus) Valid() bool {
	switch e {
	case LocalModelsComputerOffline:
		return true
	case LocalModelsComputerOnline:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelsErrorCode.
const (
	LocalModelsErrorCodeLOCALCOMPUTEROFFLINE          LocalModelsErrorCode = "LOCAL_COMPUTER_OFFLINE"
	LocalModelsErrorCodeLOCALMODELACTIONFAILED        LocalModelsErrorCode = "LOCAL_MODEL_ACTION_FAILED"
	LocalModelsErrorCodeLOCALMODELACTIONFORBIDDEN     LocalModelsErrorCode = "LOCAL_MODEL_ACTION_FORBIDDEN"
	LocalModelsErrorCodeLOCALMODELACTIONUNCONFIRMED   LocalModelsErrorCode = "LOCAL_MODEL_ACTION_UNCONFIRMED"
	LocalModelsErrorCodeLOCALMODELDISKINSUFFICIENT    LocalModelsErrorCode = "LOCAL_MODEL_DISK_INSUFFICIENT"
	LocalModelsErrorCodeLOCALMODELINVALIDSTATE        LocalModelsErrorCode = "LOCAL_MODEL_INVALID_STATE"
	LocalModelsErrorCodeLOCALMODELJOBRUNNING          LocalModelsErrorCode = "LOCAL_MODEL_JOB_RUNNING"
	LocalModelsErrorCodeLOCALMODELMEMORYINSUFFICIENT  LocalModelsErrorCode = "LOCAL_MODEL_MEMORY_INSUFFICIENT"
	LocalModelsErrorCodeLOCALMODELNOROOM              LocalModelsErrorCode = "LOCAL_MODEL_NO_ROOM"
	LocalModelsErrorCodeLOCALMODELPLATFORMUNSUPPORTED LocalModelsErrorCode = "LOCAL_MODEL_PLATFORM_UNSUPPORTED"
	LocalModelsErrorCodeLOCALMODELSSERVICEUNAVAILABLE LocalModelsErrorCode = "LOCAL_MODELS_SERVICE_UNAVAILABLE"
	LocalModelsErrorCodeLOCALMODELSUNAVAILABLE        LocalModelsErrorCode = "LOCAL_MODELS_UNAVAILABLE"
	LocalModelsErrorCodeLOCALMODELUNKNOWN             LocalModelsErrorCode = "LOCAL_MODEL_UNKNOWN"
)

// Valid indicates whether the value is a known member of the LocalModelsErrorCode enum.
func (e LocalModelsErrorCode) Valid() bool {
	switch e {
	case LocalModelsErrorCodeLOCALCOMPUTEROFFLINE:
		return true
	case LocalModelsErrorCodeLOCALMODELACTIONFAILED:
		return true
	case LocalModelsErrorCodeLOCALMODELACTIONFORBIDDEN:
		return true
	case LocalModelsErrorCodeLOCALMODELACTIONUNCONFIRMED:
		return true
	case LocalModelsErrorCodeLOCALMODELDISKINSUFFICIENT:
		return true
	case LocalModelsErrorCodeLOCALMODELINVALIDSTATE:
		return true
	case LocalModelsErrorCodeLOCALMODELJOBRUNNING:
		return true
	case LocalModelsErrorCodeLOCALMODELMEMORYINSUFFICIENT:
		return true
	case LocalModelsErrorCodeLOCALMODELNOROOM:
		return true
	case LocalModelsErrorCodeLOCALMODELPLATFORMUNSUPPORTED:
		return true
	case LocalModelsErrorCodeLOCALMODELSSERVICEUNAVAILABLE:
		return true
	case LocalModelsErrorCodeLOCALMODELSUNAVAILABLE:
		return true
	case LocalModelsErrorCodeLOCALMODELUNKNOWN:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelsRefreshAcceptedAction.
const (
	LocalModelsRefreshAcceptedRefresh LocalModelsRefreshAcceptedAction = "refresh"
)

// Valid indicates whether the value is a known member of the LocalModelsRefreshAcceptedAction enum.
func (e LocalModelsRefreshAcceptedAction) Valid() bool {
	switch e {
	case LocalModelsRefreshAcceptedRefresh:
		return true
	default:
		return false
	}
}

// Defines values for LocalModelsViewUnavailableReasonCode.
const (
	LocalModelsViewNotReported      LocalModelsViewUnavailableReasonCode = "NOT_REPORTED"
	LocalModelsViewToolFailed       LocalModelsViewUnavailableReasonCode = "TOOL_FAILED"
	LocalModelsViewToolNotInstalled LocalModelsViewUnavailableReasonCode = "TOOL_NOT_INSTALLED"
)

// Valid indicates whether the value is a known member of the LocalModelsViewUnavailableReasonCode enum.
func (e LocalModelsViewUnavailableReasonCode) Valid() bool {
	switch e {
	case LocalModelsViewNotReported:
		return true
	case LocalModelsViewToolFailed:
		return true
	case LocalModelsViewToolNotInstalled:
		return true
	default:
		return false
	}
}

// Defines values for LocalRuntimeDiagnosticErrorCode.
const (
	LocalRuntimeDiagnosticErrorCodeLOCALCOMPUTEROFFLINE          LocalRuntimeDiagnosticErrorCode = "LOCAL_COMPUTER_OFFLINE"
	LocalRuntimeDiagnosticErrorCodeRUNTIMEAUTHENTICATIONREQUIRED LocalRuntimeDiagnosticErrorCode = "RUNTIME_AUTHENTICATION_REQUIRED"
	LocalRuntimeDiagnosticErrorCodeRUNTIMEDIAGNOSTICFAILED       LocalRuntimeDiagnosticErrorCode = "RUNTIME_DIAGNOSTIC_FAILED"
	LocalRuntimeDiagnosticErrorCodeRUNTIMEINCOMPATIBLE           LocalRuntimeDiagnosticErrorCode = "RUNTIME_INCOMPATIBLE"
	LocalRuntimeDiagnosticErrorCodeRUNTIMENOTINSTALLED           LocalRuntimeDiagnosticErrorCode = "RUNTIME_NOT_INSTALLED"
)

// Valid indicates whether the value is a known member of the LocalRuntimeDiagnosticErrorCode enum.
func (e LocalRuntimeDiagnosticErrorCode) Valid() bool {
	switch e {
	case LocalRuntimeDiagnosticErrorCodeLOCALCOMPUTEROFFLINE:
		return true
	case LocalRuntimeDiagnosticErrorCodeRUNTIMEAUTHENTICATIONREQUIRED:
		return true
	case LocalRuntimeDiagnosticErrorCodeRUNTIMEDIAGNOSTICFAILED:
		return true
	case LocalRuntimeDiagnosticErrorCodeRUNTIMEINCOMPATIBLE:
		return true
	case LocalRuntimeDiagnosticErrorCodeRUNTIMENOTINSTALLED:
		return true
	default:
		return false
	}
}

// Defines values for LocalRuntimeDiagnosticStatus.
const (
	LocalRuntimeDiagnosticStatusAuthenticationRequired LocalRuntimeDiagnosticStatus = "authentication_required"
	LocalRuntimeDiagnosticStatusError                  LocalRuntimeDiagnosticStatus = "error"
	LocalRuntimeDiagnosticStatusIncompatible           LocalRuntimeDiagnosticStatus = "incompatible"
	LocalRuntimeDiagnosticStatusNotInstalled           LocalRuntimeDiagnosticStatus = "not_installed"
	LocalRuntimeDiagnosticStatusReady                  LocalRuntimeDiagnosticStatus = "ready"
	LocalRuntimeDiagnosticStatusUnknown                LocalRuntimeDiagnosticStatus = "unknown"
)

// Valid indicates whether the value is a known member of the LocalRuntimeDiagnosticStatus enum.
func (e LocalRuntimeDiagnosticStatus) Valid() bool {
	switch e {
	case LocalRuntimeDiagnosticStatusAuthenticationRequired:
		return true
	case LocalRuntimeDiagnosticStatusError:
		return true
	case LocalRuntimeDiagnosticStatusIncompatible:
		return true
	case LocalRuntimeDiagnosticStatusNotInstalled:
		return true
	case LocalRuntimeDiagnosticStatusReady:
		return true
	case LocalRuntimeDiagnosticStatusUnknown:
		return true
	default:
		return false
	}
}

// Defines values for LocalRuntimeType.
const (
	LocalRuntimeTypeAntigravity LocalRuntimeType = "antigravity"
	LocalRuntimeTypeClaude      LocalRuntimeType = "claude"
	LocalRuntimeTypeCodex       LocalRuntimeType = "codex"
	LocalRuntimeTypePi          LocalRuntimeType = "pi"
)

// Valid indicates whether the value is a known member of the LocalRuntimeType enum.
func (e LocalRuntimeType) Valid() bool {
	switch e {
	case LocalRuntimeTypeAntigravity:
		return true
	case LocalRuntimeTypeClaude:
		return true
	case LocalRuntimeTypeCodex:
		return true
	case LocalRuntimeTypePi:
		return true
	default:
		return false
	}
}

// Defines values for LocalSkillCandidateImportability.
const (
	LocalSkillCandidateReady       LocalSkillCandidateImportability = "ready"
	LocalSkillCandidateUnsupported LocalSkillCandidateImportability = "unsupported"
)

// Valid indicates whether the value is a known member of the LocalSkillCandidateImportability enum.
func (e LocalSkillCandidateImportability) Valid() bool {
	switch e {
	case LocalSkillCandidateReady:
		return true
	case LocalSkillCandidateUnsupported:
		return true
	default:
		return false
	}
}

// Defines values for LocalSkillScanRuntimeType.
const (
	LocalSkillScanRuntimeClaude LocalSkillScanRuntimeType = "claude"
	LocalSkillScanRuntimeCodex  LocalSkillScanRuntimeType = "codex"
)

// Valid indicates whether the value is a known member of the LocalSkillScanRuntimeType enum.
func (e LocalSkillScanRuntimeType) Valid() bool {
	switch e {
	case LocalSkillScanRuntimeClaude:
		return true
	case LocalSkillScanRuntimeCodex:
		return true
	default:
		return false
	}
}

// Defines values for LocalSkillScanRequestRuntimeType.
const (
	LocalSkillScanRequestRuntimeClaude LocalSkillScanRequestRuntimeType = "claude"
	LocalSkillScanRequestRuntimeCodex  LocalSkillScanRequestRuntimeType = "codex"
)

// Valid indicates whether the value is a known member of the LocalSkillScanRequestRuntimeType enum.
func (e LocalSkillScanRequestRuntimeType) Valid() bool {
	switch e {
	case LocalSkillScanRequestRuntimeClaude:
		return true
	case LocalSkillScanRequestRuntimeCodex:
		return true
	default:
		return false
	}
}

// Defines values for MailCanvasStateStatus.
const (
	MailCanvasStateStatusDeclined  MailCanvasStateStatus = "declined"
	MailCanvasStateStatusDraft     MailCanvasStateStatus = "draft"
	MailCanvasStateStatusFailed    MailCanvasStateStatus = "failed"
	MailCanvasStateStatusQueued    MailCanvasStateStatus = "queued"
	MailCanvasStateStatusSending   MailCanvasStateStatus = "sending"
	MailCanvasStateStatusSent      MailCanvasStateStatus = "sent"
	MailCanvasStateStatusUnknown   MailCanvasStateStatus = "unknown"
	MailCanvasStateStatusUploading MailCanvasStateStatus = "uploading"
)

// Valid indicates whether the value is a known member of the MailCanvasStateStatus enum.
func (e MailCanvasStateStatus) Valid() bool {
	switch e {
	case MailCanvasStateStatusDeclined:
		return true
	case MailCanvasStateStatusDraft:
		return true
	case MailCanvasStateStatusFailed:
		return true
	case MailCanvasStateStatusQueued:
		return true
	case MailCanvasStateStatusSending:
		return true
	case MailCanvasStateStatusSent:
		return true
	case MailCanvasStateStatusUnknown:
		return true
	case MailCanvasStateStatusUploading:
		return true
	default:
		return false
	}
}

// Defines values for MemoryEntryKind.
const (
	MemoryEntryKindDaily   MemoryEntryKind = "daily"
	MemoryEntryKindMeeting MemoryEntryKind = "meeting"
	MemoryEntryKindWeekly  MemoryEntryKind = "weekly"
)

// Valid indicates whether the value is a known member of the MemoryEntryKind enum.
func (e MemoryEntryKind) Valid() bool {
	switch e {
	case MemoryEntryKindDaily:
		return true
	case MemoryEntryKindMeeting:
		return true
	case MemoryEntryKindWeekly:
		return true
	default:
		return false
	}
}

// Defines values for MessageCardKind.
const (
	MessageCardKindProfile MessageCardKind = "profile"
)

// Valid indicates whether the value is a known member of the MessageCardKind enum.
func (e MessageCardKind) Valid() bool {
	switch e {
	case MessageCardKindProfile:
		return true
	default:
		return false
	}
}

// Defines values for MessageActivityLogStatus.
const (
	MessageActivityLogStatusAvailable   MessageActivityLogStatus = "available"
	MessageActivityLogStatusUnavailable MessageActivityLogStatus = "unavailable"
	MessageActivityLogStatusUnsupported MessageActivityLogStatus = "unsupported"
)

// Valid indicates whether the value is a known member of the MessageActivityLogStatus enum.
func (e MessageActivityLogStatus) Valid() bool {
	switch e {
	case MessageActivityLogStatusAvailable:
		return true
	case MessageActivityLogStatusUnavailable:
		return true
	case MessageActivityLogStatusUnsupported:
		return true
	default:
		return false
	}
}

// Defines values for MessageActivityRecordCategory.
const (
	MessageActivityRecordCategoryCompaction    MessageActivityRecordCategory = "compaction"
	MessageActivityRecordCategoryLifecycle     MessageActivityRecordCategory = "lifecycle"
	MessageActivityRecordCategoryMessage       MessageActivityRecordCategory = "message"
	MessageActivityRecordCategoryProviderEvent MessageActivityRecordCategory = "provider_event"
	MessageActivityRecordCategoryReasoning     MessageActivityRecordCategory = "reasoning"
	MessageActivityRecordCategoryToolCall      MessageActivityRecordCategory = "tool_call"
	MessageActivityRecordCategoryToolResult    MessageActivityRecordCategory = "tool_result"
	MessageActivityRecordCategoryUsage         MessageActivityRecordCategory = "usage"
)

// Valid indicates whether the value is a known member of the MessageActivityRecordCategory enum.
func (e MessageActivityRecordCategory) Valid() bool {
	switch e {
	case MessageActivityRecordCategoryCompaction:
		return true
	case MessageActivityRecordCategoryLifecycle:
		return true
	case MessageActivityRecordCategoryMessage:
		return true
	case MessageActivityRecordCategoryProviderEvent:
		return true
	case MessageActivityRecordCategoryReasoning:
		return true
	case MessageActivityRecordCategoryToolCall:
		return true
	case MessageActivityRecordCategoryToolResult:
		return true
	case MessageActivityRecordCategoryUsage:
		return true
	default:
		return false
	}
}

// Defines values for MessageActivityRedactedFieldReason.
const (
	MessageActivityRedactionReasonEncryptedContent MessageActivityRedactedFieldReason = "encrypted_content"
	MessageActivityRedactionReasonOmittedTooLarge  MessageActivityRedactedFieldReason = "omitted_too_large"
	MessageActivityRedactionReasonPhysicalPath     MessageActivityRedactedFieldReason = "physical_path"
	MessageActivityRedactionReasonReasoningContent MessageActivityRedactedFieldReason = "reasoning_content"
	MessageActivityRedactionReasonSecret           MessageActivityRedactedFieldReason = "secret"
)

// Valid indicates whether the value is a known member of the MessageActivityRedactedFieldReason enum.
func (e MessageActivityRedactedFieldReason) Valid() bool {
	switch e {
	case MessageActivityRedactionReasonEncryptedContent:
		return true
	case MessageActivityRedactionReasonOmittedTooLarge:
		return true
	case MessageActivityRedactionReasonPhysicalPath:
		return true
	case MessageActivityRedactionReasonReasoningContent:
		return true
	case MessageActivityRedactionReasonSecret:
		return true
	default:
		return false
	}
}

// Defines values for MessageForwardTargetKind.
const (
	MessageForwardTargetKindAgent MessageForwardTargetKind = "agent"
	MessageForwardTargetKindRoom  MessageForwardTargetKind = "room"
)

// Valid indicates whether the value is a known member of the MessageForwardTargetKind enum.
func (e MessageForwardTargetKind) Valid() bool {
	switch e {
	case MessageForwardTargetKindAgent:
		return true
	case MessageForwardTargetKindRoom:
		return true
	default:
		return false
	}
}

// Defines values for MessageKind.
const (
	AgentRuntime MessageKind = "agent_runtime"
	Conversation MessageKind = "conversation"
	RoomNotice   MessageKind = "room_notice"
)

// Valid indicates whether the value is a known member of the MessageKind enum.
func (e MessageKind) Valid() bool {
	switch e {
	case AgentRuntime:
		return true
	case Conversation:
		return true
	case RoomNotice:
		return true
	default:
		return false
	}
}

// Defines values for ModelSourceErrorCode.
const (
	ModelSourceErrorCodeAgentHasActiveRuns            ModelSourceErrorCode = "AGENT_HAS_ACTIVE_RUNS"
	ModelSourceErrorCodeByokAuthFailed                ModelSourceErrorCode = "BYOK_AUTH_FAILED"
	ModelSourceErrorCodeByokInvalidConfig             ModelSourceErrorCode = "BYOK_INVALID_CONFIG"
	ModelSourceErrorCodeByokNotFound                  ModelSourceErrorCode = "BYOK_NOT_FOUND"
	ModelSourceErrorCodeByokUnreachable               ModelSourceErrorCode = "BYOK_UNREACHABLE"
	ModelSourceErrorCodeByokUpstreamRejected          ModelSourceErrorCode = "BYOK_UPSTREAM_REJECTED"
	ModelSourceErrorCodeLocalComputerOffline          ModelSourceErrorCode = "LOCAL_COMPUTER_OFFLINE"
	ModelSourceErrorCodeLocalModelNoRoom              ModelSourceErrorCode = "LOCAL_MODEL_NO_ROOM"
	ModelSourceErrorCodeLocalModelUnknown             ModelSourceErrorCode = "LOCAL_MODEL_UNKNOWN"
	ModelSourceErrorCodeModelSourceFailed             ModelSourceErrorCode = "MODEL_SOURCE_FAILED"
	ModelSourceErrorCodeModelSourceForbidden          ModelSourceErrorCode = "MODEL_SOURCE_FORBIDDEN"
	ModelSourceErrorCodeModelSourceServiceUnavailable ModelSourceErrorCode = "MODEL_SOURCE_SERVICE_UNAVAILABLE"
	ModelSourceErrorCodeModelSourceUnavailable        ModelSourceErrorCode = "MODEL_SOURCE_UNAVAILABLE"
	ModelSourceErrorCodeModelSourceUnconfirmed        ModelSourceErrorCode = "MODEL_SOURCE_UNCONFIRMED"
	ModelSourceErrorCodeRuntimeNotEnabled             ModelSourceErrorCode = "RUNTIME_NOT_ENABLED"
)

// Valid indicates whether the value is a known member of the ModelSourceErrorCode enum.
func (e ModelSourceErrorCode) Valid() bool {
	switch e {
	case ModelSourceErrorCodeAgentHasActiveRuns:
		return true
	case ModelSourceErrorCodeByokAuthFailed:
		return true
	case ModelSourceErrorCodeByokInvalidConfig:
		return true
	case ModelSourceErrorCodeByokNotFound:
		return true
	case ModelSourceErrorCodeByokUnreachable:
		return true
	case ModelSourceErrorCodeByokUpstreamRejected:
		return true
	case ModelSourceErrorCodeLocalComputerOffline:
		return true
	case ModelSourceErrorCodeLocalModelNoRoom:
		return true
	case ModelSourceErrorCodeLocalModelUnknown:
		return true
	case ModelSourceErrorCodeModelSourceFailed:
		return true
	case ModelSourceErrorCodeModelSourceForbidden:
		return true
	case ModelSourceErrorCodeModelSourceServiceUnavailable:
		return true
	case ModelSourceErrorCodeModelSourceUnavailable:
		return true
	case ModelSourceErrorCodeModelSourceUnconfirmed:
		return true
	case ModelSourceErrorCodeRuntimeNotEnabled:
		return true
	default:
		return false
	}
}

// Defines values for ModelSourceMode.
const (
	ModelSourceModeByok         ModelSourceMode = "byok"
	ModelSourceModeLocal        ModelSourceMode = "local"
	ModelSourceModeSubscription ModelSourceMode = "subscription"
)

// Valid indicates whether the value is a known member of the ModelSourceMode enum.
func (e ModelSourceMode) Valid() bool {
	switch e {
	case ModelSourceModeByok:
		return true
	case ModelSourceModeLocal:
		return true
	case ModelSourceModeSubscription:
		return true
	default:
		return false
	}
}

// Defines values for ModelSourceRuntime.
const (
	ModelSourceRuntimeClaude ModelSourceRuntime = "claude"
	ModelSourceRuntimeCodex  ModelSourceRuntime = "codex"
	ModelSourceRuntimePi     ModelSourceRuntime = "pi"
)

// Valid indicates whether the value is a known member of the ModelSourceRuntime enum.
func (e ModelSourceRuntime) Valid() bool {
	switch e {
	case ModelSourceRuntimeClaude:
		return true
	case ModelSourceRuntimeCodex:
		return true
	case ModelSourceRuntimePi:
		return true
	default:
		return false
	}
}

// Defines values for NotionResourceKind.
const (
	NotionResourceKindNotionDatabase NotionResourceKind = "notion_database"
	NotionResourceKindNotionPage     NotionResourceKind = "notion_page"
)

// Valid indicates whether the value is a known member of the NotionResourceKind enum.
func (e NotionResourceKind) Valid() bool {
	switch e {
	case NotionResourceKindNotionDatabase:
		return true
	case NotionResourceKindNotionPage:
		return true
	default:
		return false
	}
}

// Defines values for PersonalProfileGenerationDecision.
const (
	PersonalProfileGenerationDecisionConfirmed PersonalProfileGenerationDecision = "confirmed"
	PersonalProfileGenerationDecisionPending   PersonalProfileGenerationDecision = "pending"
)

// Valid indicates whether the value is a known member of the PersonalProfileGenerationDecision enum.
func (e PersonalProfileGenerationDecision) Valid() bool {
	switch e {
	case PersonalProfileGenerationDecisionConfirmed:
		return true
	case PersonalProfileGenerationDecisionPending:
		return true
	default:
		return false
	}
}

// Defines values for PersonalProfileGenerationStatus.
const (
	PersonalProfileGenerationStatusFailed    PersonalProfileGenerationStatus = "failed"
	PersonalProfileGenerationStatusQueued    PersonalProfileGenerationStatus = "queued"
	PersonalProfileGenerationStatusRunning   PersonalProfileGenerationStatus = "running"
	PersonalProfileGenerationStatusSucceeded PersonalProfileGenerationStatus = "succeeded"
)

// Valid indicates whether the value is a known member of the PersonalProfileGenerationStatus enum.
func (e PersonalProfileGenerationStatus) Valid() bool {
	switch e {
	case PersonalProfileGenerationStatusFailed:
		return true
	case PersonalProfileGenerationStatusQueued:
		return true
	case PersonalProfileGenerationStatusRunning:
		return true
	case PersonalProfileGenerationStatusSucceeded:
		return true
	default:
		return false
	}
}

// Defines values for PersonalProfileSourceKind.
const (
	PersonalProfileSourceKindConnection        PersonalProfileSourceKind = "connection"
	PersonalProfileSourceKindExternalAiSummary PersonalProfileSourceKind = "external_ai_summary"
	PersonalProfileSourceKindInputVersion      PersonalProfileSourceKind = "input_version"
)

// Valid indicates whether the value is a known member of the PersonalProfileSourceKind enum.
func (e PersonalProfileSourceKind) Valid() bool {
	switch e {
	case PersonalProfileSourceKindConnection:
		return true
	case PersonalProfileSourceKindExternalAiSummary:
		return true
	case PersonalProfileSourceKindInputVersion:
		return true
	default:
		return false
	}
}

// Defines values for PersonalProfileSourceSelectionKind.
const (
	PersonalProfileSourceSelectionKindAnnouncementChannel PersonalProfileSourceSelectionKind = "announcement_channel"
	PersonalProfileSourceSelectionKindForumChannel        PersonalProfileSourceSelectionKind = "forum_channel"
	PersonalProfileSourceSelectionKindGithubRepository    PersonalProfileSourceSelectionKind = "github_repository"
	PersonalProfileSourceSelectionKindGoogleCalendar      PersonalProfileSourceSelectionKind = "google_calendar"
	PersonalProfileSourceSelectionKindMediaChannel        PersonalProfileSourceSelectionKind = "media_channel"
	PersonalProfileSourceSelectionKindNotionDatabase      PersonalProfileSourceSelectionKind = "notion_database"
	PersonalProfileSourceSelectionKindNotionPage          PersonalProfileSourceSelectionKind = "notion_page"
	PersonalProfileSourceSelectionKindPrivateChannel      PersonalProfileSourceSelectionKind = "private_channel"
	PersonalProfileSourceSelectionKindPublicChannel       PersonalProfileSourceSelectionKind = "public_channel"
	PersonalProfileSourceSelectionKindTextChannel         PersonalProfileSourceSelectionKind = "text_channel"
)

// Valid indicates whether the value is a known member of the PersonalProfileSourceSelectionKind enum.
func (e PersonalProfileSourceSelectionKind) Valid() bool {
	switch e {
	case PersonalProfileSourceSelectionKindAnnouncementChannel:
		return true
	case PersonalProfileSourceSelectionKindForumChannel:
		return true
	case PersonalProfileSourceSelectionKindGithubRepository:
		return true
	case PersonalProfileSourceSelectionKindGoogleCalendar:
		return true
	case PersonalProfileSourceSelectionKindMediaChannel:
		return true
	case PersonalProfileSourceSelectionKindNotionDatabase:
		return true
	case PersonalProfileSourceSelectionKindNotionPage:
		return true
	case PersonalProfileSourceSelectionKindPrivateChannel:
		return true
	case PersonalProfileSourceSelectionKindPublicChannel:
		return true
	case PersonalProfileSourceSelectionKindTextChannel:
		return true
	default:
		return false
	}
}

// Defines values for PersonalWikiFailureReason.
const (
	ComputerOffline     PersonalWikiFailureReason = "computer_offline"
	RuntimeAuthRequired PersonalWikiFailureReason = "runtime_auth_required"
	RuntimeIncompatible PersonalWikiFailureReason = "runtime_incompatible"
	RuntimeUnavailable  PersonalWikiFailureReason = "runtime_unavailable"
)

// Valid indicates whether the value is a known member of the PersonalWikiFailureReason enum.
func (e PersonalWikiFailureReason) Valid() bool {
	switch e {
	case ComputerOffline:
		return true
	case RuntimeAuthRequired:
		return true
	case RuntimeIncompatible:
		return true
	case RuntimeUnavailable:
		return true
	default:
		return false
	}
}

// Defines values for PersonalWikiState.
const (
	PersonalWikiStateFailed     PersonalWikiState = "failed"
	PersonalWikiStateIdle       PersonalWikiState = "idle"
	PersonalWikiStateRefreshing PersonalWikiState = "refreshing"
)

// Valid indicates whether the value is a known member of the PersonalWikiState enum.
func (e PersonalWikiState) Valid() bool {
	switch e {
	case PersonalWikiStateFailed:
		return true
	case PersonalWikiStateIdle:
		return true
	case PersonalWikiStateRefreshing:
		return true
	default:
		return false
	}
}

// Defines values for ReferenceSegmentTargetType.
const (
	ReferenceSegmentTargetTypeAgent ReferenceSegmentTargetType = "agent"
	ReferenceSegmentTargetTypeUser  ReferenceSegmentTargetType = "user"
)

// Valid indicates whether the value is a known member of the ReferenceSegmentTargetType enum.
func (e ReferenceSegmentTargetType) Valid() bool {
	switch e {
	case ReferenceSegmentTargetTypeAgent:
		return true
	case ReferenceSegmentTargetTypeUser:
		return true
	default:
		return false
	}
}

// Defines values for RoomBackgroundTaskCancelResultStatus.
const (
	RoomBackgroundTaskCancelResultStatusCanceled   RoomBackgroundTaskCancelResultStatus = "canceled"
	RoomBackgroundTaskCancelResultStatusNotRunning RoomBackgroundTaskCancelResultStatus = "not_running"
)

// Valid indicates whether the value is a known member of the RoomBackgroundTaskCancelResultStatus enum.
func (e RoomBackgroundTaskCancelResultStatus) Valid() bool {
	switch e {
	case RoomBackgroundTaskCancelResultStatusCanceled:
		return true
	case RoomBackgroundTaskCancelResultStatusNotRunning:
		return true
	default:
		return false
	}
}

// Defines values for RoomDocumentChangedPayloadKind.
const (
	RoomDocumentChangedPayloadKindDocumentCreated RoomDocumentChangedPayloadKind = "document.created"
)

// Valid indicates whether the value is a known member of the RoomDocumentChangedPayloadKind enum.
func (e RoomDocumentChangedPayloadKind) Valid() bool {
	switch e {
	case RoomDocumentChangedPayloadKindDocumentCreated:
		return true
	default:
		return false
	}
}

// Defines values for RoomEventType.
const (
	RoomEventTypeAgentRunStatusChanged       RoomEventType = "agent_run.status_changed"
	RoomEventTypeCaptureSessionChanged       RoomEventType = "capture.session.changed"
	RoomEventTypeCardChanged                 RoomEventType = "card.changed"
	RoomEventTypeDocumentCommentChanged      RoomEventType = "document.comment.changed"
	RoomEventTypeDocumentCreated             RoomEventType = "document.created"
	RoomEventTypeMessageCreated              RoomEventType = "message.created"
	RoomEventTypeMessageHidden               RoomEventType = "message.hidden"
	RoomEventTypeMessageReactionsChanged     RoomEventType = "message.reactions.changed"
	RoomEventTypeMessageThreadSummaryUpdated RoomEventType = "message.thread_summary.updated"
	RoomEventTypeRoomCreated                 RoomEventType = "room.created"
	RoomEventTypeRoomDeleted                 RoomEventType = "room.deleted"
	RoomEventTypeRoomHistoryCompacted        RoomEventType = "room.history.compacted"
	RoomEventTypeRoomMemberAdded             RoomEventType = "room.member.added"
	RoomEventTypeRoomMemberRemoved           RoomEventType = "room.member.removed"
	RoomEventTypeRoomMemberRoleChanged       RoomEventType = "room.member.role_changed"
	RoomEventTypeRoomParticipationChanged    RoomEventType = "room.participation.changed"
	RoomEventTypeRoomUpdated                 RoomEventType = "room.updated"
	RoomEventTypeRoutineChanged              RoomEventType = "routine.changed"
	RoomEventTypeTeamMdPublished             RoomEventType = "team_md.published"
	RoomEventTypeWorkItemChanged             RoomEventType = "work_item.changed"
)

// Valid indicates whether the value is a known member of the RoomEventType enum.
func (e RoomEventType) Valid() bool {
	switch e {
	case RoomEventTypeAgentRunStatusChanged:
		return true
	case RoomEventTypeCaptureSessionChanged:
		return true
	case RoomEventTypeCardChanged:
		return true
	case RoomEventTypeDocumentCommentChanged:
		return true
	case RoomEventTypeDocumentCreated:
		return true
	case RoomEventTypeMessageCreated:
		return true
	case RoomEventTypeMessageHidden:
		return true
	case RoomEventTypeMessageReactionsChanged:
		return true
	case RoomEventTypeMessageThreadSummaryUpdated:
		return true
	case RoomEventTypeRoomCreated:
		return true
	case RoomEventTypeRoomDeleted:
		return true
	case RoomEventTypeRoomHistoryCompacted:
		return true
	case RoomEventTypeRoomMemberAdded:
		return true
	case RoomEventTypeRoomMemberRemoved:
		return true
	case RoomEventTypeRoomMemberRoleChanged:
		return true
	case RoomEventTypeRoomParticipationChanged:
		return true
	case RoomEventTypeRoomUpdated:
		return true
	case RoomEventTypeRoutineChanged:
		return true
	case RoomEventTypeTeamMdPublished:
		return true
	case RoomEventTypeWorkItemChanged:
		return true
	default:
		return false
	}
}

// Defines values for RoomKind.
const (
	RoomKindDirect RoomKind = "direct"
	RoomKindRoom   RoomKind = "room"
	RoomKindThread RoomKind = "thread"
)

// Valid indicates whether the value is a known member of the RoomKind enum.
func (e RoomKind) Valid() bool {
	switch e {
	case RoomKindDirect:
		return true
	case RoomKindRoom:
		return true
	case RoomKindThread:
		return true
	default:
		return false
	}
}

// Defines values for RoomMemberRole.
const (
	Member RoomMemberRole = "member"
	Owner  RoomMemberRole = "owner"
)

// Valid indicates whether the value is a known member of the RoomMemberRole enum.
func (e RoomMemberRole) Valid() bool {
	switch e {
	case Member:
		return true
	case Owner:
		return true
	default:
		return false
	}
}

// Defines values for RoomMemberSnapshotPayloadKind.
const (
	RoomMemberAdded       RoomMemberSnapshotPayloadKind = "room.member.added"
	RoomMemberRemoved     RoomMemberSnapshotPayloadKind = "room.member.removed"
	RoomMemberRoleChanged RoomMemberSnapshotPayloadKind = "room.member.role_changed"
)

// Valid indicates whether the value is a known member of the RoomMemberSnapshotPayloadKind enum.
func (e RoomMemberSnapshotPayloadKind) Valid() bool {
	switch e {
	case RoomMemberAdded:
		return true
	case RoomMemberRemoved:
		return true
	case RoomMemberRoleChanged:
		return true
	default:
		return false
	}
}

// Defines values for RoomParticipationChangedPayloadKind.
const (
	RoomParticipationChanged RoomParticipationChangedPayloadKind = "room.participation.changed"
)

// Valid indicates whether the value is a known member of the RoomParticipationChangedPayloadKind enum.
func (e RoomParticipationChangedPayloadKind) Valid() bool {
	switch e {
	case RoomParticipationChanged:
		return true
	default:
		return false
	}
}

// Defines values for RoomParticipationStatus.
const (
	Joined RoomParticipationStatus = "joined"
	Left   RoomParticipationStatus = "left"
)

// Valid indicates whether the value is a known member of the RoomParticipationStatus enum.
func (e RoomParticipationStatus) Valid() bool {
	switch e {
	case Joined:
		return true
	case Left:
		return true
	default:
		return false
	}
}

// Defines values for RoomRunCancelResultStatus.
const (
	RoomRunCancelResultStatusAlreadyTerminal RoomRunCancelResultStatus = "already_terminal"
	RoomRunCancelResultStatusCancelRequested RoomRunCancelResultStatus = "cancel_requested"
	RoomRunCancelResultStatusCanceled        RoomRunCancelResultStatus = "canceled"
)

// Valid indicates whether the value is a known member of the RoomRunCancelResultStatus enum.
func (e RoomRunCancelResultStatus) Valid() bool {
	switch e {
	case RoomRunCancelResultStatusAlreadyTerminal:
		return true
	case RoomRunCancelResultStatusCancelRequested:
		return true
	case RoomRunCancelResultStatusCanceled:
		return true
	default:
		return false
	}
}

// Defines values for RoomRunRedeliverResultStatus.
const (
	NothingToRedeliver RoomRunRedeliverResultStatus = "nothing_to_redeliver"
	Redelivered        RoomRunRedeliverResultStatus = "redelivered"
)

// Valid indicates whether the value is a known member of the RoomRunRedeliverResultStatus enum.
func (e RoomRunRedeliverResultStatus) Valid() bool {
	switch e {
	case NothingToRedeliver:
		return true
	case Redelivered:
		return true
	default:
		return false
	}
}

// Defines values for RoomRunStatusAgentRefKind.
const (
	RoomRunStatusAgentRefKindAgent RoomRunStatusAgentRefKind = "agent"
)

// Valid indicates whether the value is a known member of the RoomRunStatusAgentRefKind enum.
func (e RoomRunStatusAgentRefKind) Valid() bool {
	switch e {
	case RoomRunStatusAgentRefKindAgent:
		return true
	default:
		return false
	}
}

// Defines values for RoomRunStatusState.
const (
	RoomRunStatusStateAborted   RoomRunStatusState = "aborted"
	RoomRunStatusStateActive    RoomRunStatusState = "active"
	RoomRunStatusStateCompleted RoomRunStatusState = "completed"
)

// Valid indicates whether the value is a known member of the RoomRunStatusState enum.
func (e RoomRunStatusState) Valid() bool {
	switch e {
	case RoomRunStatusStateAborted:
		return true
	case RoomRunStatusStateActive:
		return true
	case RoomRunStatusStateCompleted:
		return true
	default:
		return false
	}
}

// Defines values for RoomSnapshotPayloadKind.
const (
	RoomCreated RoomSnapshotPayloadKind = "room.created"
	RoomUpdated RoomSnapshotPayloadKind = "room.updated"
)

// Valid indicates whether the value is a known member of the RoomSnapshotPayloadKind enum.
func (e RoomSnapshotPayloadKind) Valid() bool {
	switch e {
	case RoomCreated:
		return true
	case RoomUpdated:
		return true
	default:
		return false
	}
}

// Defines values for RoutineCadenceKind.
const (
	RoutineCadenceKindDaily         RoutineCadenceKind = "daily"
	RoutineCadenceKindEveryNHours   RoutineCadenceKind = "every_n_hours"
	RoutineCadenceKindEveryNMinutes RoutineCadenceKind = "every_n_minutes"
	RoutineCadenceKindOnce          RoutineCadenceKind = "once"
	RoutineCadenceKindWeekly        RoutineCadenceKind = "weekly"
)

// Valid indicates whether the value is a known member of the RoutineCadenceKind enum.
func (e RoutineCadenceKind) Valid() bool {
	switch e {
	case RoutineCadenceKindDaily:
		return true
	case RoutineCadenceKindEveryNHours:
		return true
	case RoutineCadenceKindEveryNMinutes:
		return true
	case RoutineCadenceKindOnce:
		return true
	case RoutineCadenceKindWeekly:
		return true
	default:
		return false
	}
}

// Defines values for RoutineChangedPayloadChangeKind.
const (
	Created RoutineChangedPayloadChangeKind = "created"
	Deleted RoutineChangedPayloadChangeKind = "deleted"
	Fired   RoutineChangedPayloadChangeKind = "fired"
	Updated RoutineChangedPayloadChangeKind = "updated"
)

// Valid indicates whether the value is a known member of the RoutineChangedPayloadChangeKind enum.
func (e RoutineChangedPayloadChangeKind) Valid() bool {
	switch e {
	case Created:
		return true
	case Deleted:
		return true
	case Fired:
		return true
	case Updated:
		return true
	default:
		return false
	}
}

// Defines values for RoutineListenerApp.
const (
	RoutineListenerAppGmail           RoutineListenerApp = "gmail"
	RoutineListenerAppGoogleCalendar  RoutineListenerApp = "google_calendar"
	RoutineListenerAppOutlook         RoutineListenerApp = "outlook"
	RoutineListenerAppOutlookCalendar RoutineListenerApp = "outlook_calendar"
	RoutineListenerAppSlack           RoutineListenerApp = "slack"
)

// Valid indicates whether the value is a known member of the RoutineListenerApp enum.
func (e RoutineListenerApp) Valid() bool {
	switch e {
	case RoutineListenerAppGmail:
		return true
	case RoutineListenerAppGoogleCalendar:
		return true
	case RoutineListenerAppOutlook:
		return true
	case RoutineListenerAppOutlookCalendar:
		return true
	case RoutineListenerAppSlack:
		return true
	default:
		return false
	}
}

// Defines values for RoutineWeekday.
const (
	Friday    RoutineWeekday = "friday"
	Monday    RoutineWeekday = "monday"
	Saturday  RoutineWeekday = "saturday"
	Sunday    RoutineWeekday = "sunday"
	Thursday  RoutineWeekday = "thursday"
	Tuesday   RoutineWeekday = "tuesday"
	Wednesday RoutineWeekday = "wednesday"
)

// Valid indicates whether the value is a known member of the RoutineWeekday enum.
func (e RoutineWeekday) Valid() bool {
	switch e {
	case Friday:
		return true
	case Monday:
		return true
	case Saturday:
		return true
	case Sunday:
		return true
	case Thursday:
		return true
	case Tuesday:
		return true
	case Wednesday:
		return true
	default:
		return false
	}
}

// Defines values for RuntimePermissionDecisionViewKind.
const (
	RuntimePermissionDecisionViewKindCode RuntimePermissionDecisionViewKind = "code"
	RuntimePermissionDecisionViewKindGui  RuntimePermissionDecisionViewKind = "gui"
)

// Valid indicates whether the value is a known member of the RuntimePermissionDecisionViewKind enum.
func (e RuntimePermissionDecisionViewKind) Valid() bool {
	switch e {
	case RuntimePermissionDecisionViewKindCode:
		return true
	case RuntimePermissionDecisionViewKindGui:
		return true
	default:
		return false
	}
}

// Defines values for SearchKeyDecisionViewOrigin.
const (
	SearchKeyDecisionViewOriginRequested SearchKeyDecisionViewOrigin = "requested"
	SearchKeyDecisionViewOriginSuggested SearchKeyDecisionViewOrigin = "suggested"
)

// Valid indicates whether the value is a known member of the SearchKeyDecisionViewOrigin enum.
func (e SearchKeyDecisionViewOrigin) Valid() bool {
	switch e {
	case SearchKeyDecisionViewOriginRequested:
		return true
	case SearchKeyDecisionViewOriginSuggested:
		return true
	default:
		return false
	}
}

// Defines values for SearchKeyDecisionViewReason.
const (
	SearchKeyDecisionViewReasonFreeLimit SearchKeyDecisionViewReason = "free_limit"
	SearchKeyDecisionViewReasonMissing   SearchKeyDecisionViewReason = "missing"
	SearchKeyDecisionViewReasonRejected  SearchKeyDecisionViewReason = "rejected"
)

// Valid indicates whether the value is a known member of the SearchKeyDecisionViewReason enum.
func (e SearchKeyDecisionViewReason) Valid() bool {
	switch e {
	case SearchKeyDecisionViewReasonFreeLimit:
		return true
	case SearchKeyDecisionViewReasonMissing:
		return true
	case SearchKeyDecisionViewReasonRejected:
		return true
	default:
		return false
	}
}

// Defines values for SetDocumentLinkShareRole.
const (
	Editor SetDocumentLinkShareRole = "editor"
	Viewer SetDocumentLinkShareRole = "viewer"
)

// Valid indicates whether the value is a known member of the SetDocumentLinkShareRole enum.
func (e SetDocumentLinkShareRole) Valid() bool {
	switch e {
	case Editor:
		return true
	case Viewer:
		return true
	default:
		return false
	}
}

// Defines values for SkillManifestAccessScope.
const (
	SkillManifestAccessScopeOwner    SkillManifestAccessScope = "owner"
	SkillManifestAccessScopePlatform SkillManifestAccessScope = "platform"
	SkillManifestAccessScopeTenant   SkillManifestAccessScope = "tenant"
)

// Valid indicates whether the value is a known member of the SkillManifestAccessScope enum.
func (e SkillManifestAccessScope) Valid() bool {
	switch e {
	case SkillManifestAccessScopeOwner:
		return true
	case SkillManifestAccessScopePlatform:
		return true
	case SkillManifestAccessScopeTenant:
		return true
	default:
		return false
	}
}

// Defines values for SkillManifestAvailability.
const (
	SkillManifestAvailabilityActive   SkillManifestAvailability = "active"
	SkillManifestAvailabilityDisabled SkillManifestAvailability = "disabled"
)

// Valid indicates whether the value is a known member of the SkillManifestAvailability enum.
func (e SkillManifestAvailability) Valid() bool {
	switch e {
	case SkillManifestAvailabilityActive:
		return true
	case SkillManifestAvailabilityDisabled:
		return true
	default:
		return false
	}
}

// Defines values for SlackConversationKind.
const (
	PrivateChannel SlackConversationKind = "private_channel"
	PublicChannel  SlackConversationKind = "public_channel"
)

// Valid indicates whether the value is a known member of the SlackConversationKind enum.
func (e SlackConversationKind) Valid() bool {
	switch e {
	case PrivateChannel:
		return true
	case PublicChannel:
		return true
	default:
		return false
	}
}

// Defines values for TaskAttemptSummaryStatus.
const (
	TaskAttemptSummaryStatusPassed  TaskAttemptSummaryStatus = "passed"
	TaskAttemptSummaryStatusRunning TaskAttemptSummaryStatus = "running"
	TaskAttemptSummaryStatusStopped TaskAttemptSummaryStatus = "stopped"
)

// Valid indicates whether the value is a known member of the TaskAttemptSummaryStatus enum.
func (e TaskAttemptSummaryStatus) Valid() bool {
	switch e {
	case TaskAttemptSummaryStatusPassed:
		return true
	case TaskAttemptSummaryStatusRunning:
		return true
	case TaskAttemptSummaryStatusStopped:
		return true
	default:
		return false
	}
}

// Defines values for TaskConversationInputSource.
const (
	TaskConversationInputSourceMessage TaskConversationInputSource = "message"
	TaskConversationInputSourceSystem  TaskConversationInputSource = "system"
)

// Valid indicates whether the value is a known member of the TaskConversationInputSource enum.
func (e TaskConversationInputSource) Valid() bool {
	switch e {
	case TaskConversationInputSourceMessage:
		return true
	case TaskConversationInputSourceSystem:
		return true
	default:
		return false
	}
}

// Defines values for TaskExecutionProjectionDesiredControl.
const (
	TaskExecutionProjectionDesiredControlRun TaskExecutionProjectionDesiredControl = "run"
)

// Valid indicates whether the value is a known member of the TaskExecutionProjectionDesiredControl enum.
func (e TaskExecutionProjectionDesiredControl) Valid() bool {
	switch e {
	case TaskExecutionProjectionDesiredControlRun:
		return true
	default:
		return false
	}
}

// Defines values for TaskExecutionStatus.
const (
	TaskExecutionStatusCanceled           TaskExecutionStatus = "canceled"
	TaskExecutionStatusFailed             TaskExecutionStatus = "failed"
	TaskExecutionStatusIdle               TaskExecutionStatus = "idle"
	TaskExecutionStatusRunning            TaskExecutionStatus = "running"
	TaskExecutionStatusWaitingForApproval TaskExecutionStatus = "waiting_for_approval"
)

// Valid indicates whether the value is a known member of the TaskExecutionStatus enum.
func (e TaskExecutionStatus) Valid() bool {
	switch e {
	case TaskExecutionStatusCanceled:
		return true
	case TaskExecutionStatusFailed:
		return true
	case TaskExecutionStatusIdle:
		return true
	case TaskExecutionStatusRunning:
		return true
	case TaskExecutionStatusWaitingForApproval:
		return true
	default:
		return false
	}
}

// Defines values for TeamMdPattern.
const (
	AdversarialVerification TeamMdPattern = "adversarial-verification"
	ClassifyAndAct          TeamMdPattern = "classify-and-act"
	FanOutAndSynthesize     TeamMdPattern = "fan-out-and-synthesize"
	LoopUntilDone           TeamMdPattern = "loop-until-done"
	Tournament              TeamMdPattern = "tournament"
)

// Valid indicates whether the value is a known member of the TeamMdPattern enum.
func (e TeamMdPattern) Valid() bool {
	switch e {
	case AdversarialVerification:
		return true
	case ClassifyAndAct:
		return true
	case FanOutAndSynthesize:
		return true
	case LoopUntilDone:
		return true
	case Tournament:
		return true
	default:
		return false
	}
}

// Defines values for TenantAgentAvailabilityReason.
const (
	TenantAgentAvailabilityReasonAuthenticationRequired TenantAgentAvailabilityReason = "authentication_required"
	TenantAgentAvailabilityReasonOnline                 TenantAgentAvailabilityReason = "online"
	TenantAgentAvailabilityReasonReconnecting           TenantAgentAvailabilityReason = "reconnecting"
	TenantAgentAvailabilityReasonRuntimeError           TenantAgentAvailabilityReason = "runtime_error"
	TenantAgentAvailabilityReasonRuntimeIncompatible    TenantAgentAvailabilityReason = "runtime_incompatible"
	TenantAgentAvailabilityReasonRuntimeNotInstalled    TenantAgentAvailabilityReason = "runtime_not_installed"
	TenantAgentAvailabilityReasonStatusUnavailable      TenantAgentAvailabilityReason = "status_unavailable"
	TenantAgentAvailabilityReasonWaitingForComputer     TenantAgentAvailabilityReason = "waiting_for_computer"
)

// Valid indicates whether the value is a known member of the TenantAgentAvailabilityReason enum.
func (e TenantAgentAvailabilityReason) Valid() bool {
	switch e {
	case TenantAgentAvailabilityReasonAuthenticationRequired:
		return true
	case TenantAgentAvailabilityReasonOnline:
		return true
	case TenantAgentAvailabilityReasonReconnecting:
		return true
	case TenantAgentAvailabilityReasonRuntimeError:
		return true
	case TenantAgentAvailabilityReasonRuntimeIncompatible:
		return true
	case TenantAgentAvailabilityReasonRuntimeNotInstalled:
		return true
	case TenantAgentAvailabilityReasonStatusUnavailable:
		return true
	case TenantAgentAvailabilityReasonWaitingForComputer:
		return true
	default:
		return false
	}
}

// Defines values for TenantAgentAvailabilityStatus.
const (
	TenantAgentAvailabilityStatusError   TenantAgentAvailabilityStatus = "error"
	TenantAgentAvailabilityStatusOffline TenantAgentAvailabilityStatus = "offline"
	TenantAgentAvailabilityStatusOnline  TenantAgentAvailabilityStatus = "online"
	TenantAgentAvailabilityStatusUnknown TenantAgentAvailabilityStatus = "unknown"
)

// Valid indicates whether the value is a known member of the TenantAgentAvailabilityStatus enum.
func (e TenantAgentAvailabilityStatus) Valid() bool {
	switch e {
	case TenantAgentAvailabilityStatusError:
		return true
	case TenantAgentAvailabilityStatusOffline:
		return true
	case TenantAgentAvailabilityStatusOnline:
		return true
	case TenantAgentAvailabilityStatusUnknown:
		return true
	default:
		return false
	}
}

// Defines values for UnifiedDocumentFromBindingKind.
const (
	UnifiedDocumentFromBindingKindRoom       UnifiedDocumentFromBindingKind = "room"
	UnifiedDocumentFromBindingKindTask       UnifiedDocumentFromBindingKind = "task"
	UnifiedDocumentFromBindingKindWikiPage   UnifiedDocumentFromBindingKind = "wiki_page"
	UnifiedDocumentFromBindingKindWikiSource UnifiedDocumentFromBindingKind = "wiki_source"
)

// Valid indicates whether the value is a known member of the UnifiedDocumentFromBindingKind enum.
func (e UnifiedDocumentFromBindingKind) Valid() bool {
	switch e {
	case UnifiedDocumentFromBindingKindRoom:
		return true
	case UnifiedDocumentFromBindingKindTask:
		return true
	case UnifiedDocumentFromBindingKindWikiPage:
		return true
	case UnifiedDocumentFromBindingKindWikiSource:
		return true
	default:
		return false
	}
}

// Defines values for UnifiedDocumentStatus.
const (
	UnifiedDocumentStatusActive  UnifiedDocumentStatus = "active"
	UnifiedDocumentStatusTrashed UnifiedDocumentStatus = "trashed"
)

// Valid indicates whether the value is a known member of the UnifiedDocumentStatus enum.
func (e UnifiedDocumentStatus) Valid() bool {
	switch e {
	case UnifiedDocumentStatusActive:
		return true
	case UnifiedDocumentStatusTrashed:
		return true
	default:
		return false
	}
}

// Defines values for VoiceCaptureTranscriptRecoveryStatus.
const (
	VoiceCaptureTranscriptRecoveryStatusFailed    VoiceCaptureTranscriptRecoveryStatus = "failed"
	VoiceCaptureTranscriptRecoveryStatusPending   VoiceCaptureTranscriptRecoveryStatus = "pending"
	VoiceCaptureTranscriptRecoveryStatusRunning   VoiceCaptureTranscriptRecoveryStatus = "running"
	VoiceCaptureTranscriptRecoveryStatusSucceeded VoiceCaptureTranscriptRecoveryStatus = "succeeded"
)

// Valid indicates whether the value is a known member of the VoiceCaptureTranscriptRecoveryStatus enum.
func (e VoiceCaptureTranscriptRecoveryStatus) Valid() bool {
	switch e {
	case VoiceCaptureTranscriptRecoveryStatusFailed:
		return true
	case VoiceCaptureTranscriptRecoveryStatusPending:
		return true
	case VoiceCaptureTranscriptRecoveryStatusRunning:
		return true
	case VoiceCaptureTranscriptRecoveryStatusSucceeded:
		return true
	default:
		return false
	}
}

// Defines values for VoiceCaptureQuestionKind.
const (
	VoiceCaptureQuestionKindAnswer VoiceCaptureQuestionKind = "answer"
	VoiceCaptureQuestionKindTask   VoiceCaptureQuestionKind = "task"
)

// Valid indicates whether the value is a known member of the VoiceCaptureQuestionKind enum.
func (e VoiceCaptureQuestionKind) Valid() bool {
	switch e {
	case VoiceCaptureQuestionKindAnswer:
		return true
	case VoiceCaptureQuestionKindTask:
		return true
	default:
		return false
	}
}

// Defines values for VoiceCaptureQuickNotesState.
const (
	VoiceCaptureQuickNotesStateFailed  VoiceCaptureQuickNotesState = "failed"
	VoiceCaptureQuickNotesStatePending VoiceCaptureQuickNotesState = "pending"
	VoiceCaptureQuickNotesStateReady   VoiceCaptureQuickNotesState = "ready"
)

// Valid indicates whether the value is a known member of the VoiceCaptureQuickNotesState enum.
func (e VoiceCaptureQuickNotesState) Valid() bool {
	switch e {
	case VoiceCaptureQuickNotesStateFailed:
		return true
	case VoiceCaptureQuickNotesStatePending:
		return true
	case VoiceCaptureQuickNotesStateReady:
		return true
	default:
		return false
	}
}

// Defines values for VoiceCaptureStatus.
const (
	VoiceCaptureStatusFailed     VoiceCaptureStatus = "failed"
	VoiceCaptureStatusFinalized  VoiceCaptureStatus = "finalized"
	VoiceCaptureStatusFinalizing VoiceCaptureStatus = "finalizing"
	VoiceCaptureStatusRecording  VoiceCaptureStatus = "recording"
	VoiceCaptureStatusRecovering VoiceCaptureStatus = "recovering"
	VoiceCaptureStatusStarting   VoiceCaptureStatus = "starting"
)

// Valid indicates whether the value is a known member of the VoiceCaptureStatus enum.
func (e VoiceCaptureStatus) Valid() bool {
	switch e {
	case VoiceCaptureStatusFailed:
		return true
	case VoiceCaptureStatusFinalized:
		return true
	case VoiceCaptureStatusFinalizing:
		return true
	case VoiceCaptureStatusRecording:
		return true
	case VoiceCaptureStatusRecovering:
		return true
	case VoiceCaptureStatusStarting:
		return true
	default:
		return false
	}
}

// Defines values for VoiceDictationCommitReceiptStatus.
const (
	Accepted VoiceDictationCommitReceiptStatus = "accepted"
)

// Valid indicates whether the value is a known member of the VoiceDictationCommitReceiptStatus enum.
func (e VoiceDictationCommitReceiptStatus) Valid() bool {
	switch e {
	case Accepted:
		return true
	default:
		return false
	}
}

// Defines values for VoiceEventKind.
const (
	VoiceEventKindCapture    VoiceEventKind = "capture"
	VoiceEventKindSession    VoiceEventKind = "session"
	VoiceEventKindTranscript VoiceEventKind = "transcript"
)

// Valid indicates whether the value is a known member of the VoiceEventKind enum.
func (e VoiceEventKind) Valid() bool {
	switch e {
	case VoiceEventKindCapture:
		return true
	case VoiceEventKindSession:
		return true
	case VoiceEventKindTranscript:
		return true
	default:
		return false
	}
}

// Defines values for VoiceProvider.
const (
	Soniox VoiceProvider = "soniox"
	Xai    VoiceProvider = "xai"
)

// Valid indicates whether the value is a known member of the VoiceProvider enum.
func (e VoiceProvider) Valid() bool {
	switch e {
	case Soniox:
		return true
	case Xai:
		return true
	default:
		return false
	}
}

// Defines values for VoiceProviderKeyStatusSource.
const (
	Environment VoiceProviderKeyStatusSource = "environment"
	None        VoiceProviderKeyStatusSource = "none"
	Stored      VoiceProviderKeyStatusSource = "stored"
)

// Valid indicates whether the value is a known member of the VoiceProviderKeyStatusSource enum.
func (e VoiceProviderKeyStatusSource) Valid() bool {
	switch e {
	case Environment:
		return true
	case None:
		return true
	case Stored:
		return true
	default:
		return false
	}
}

// Defines values for VoiceSessionPurpose.
const (
	ChatDictation   VoiceSessionPurpose = "chat_dictation"
	ChatLive        VoiceSessionPurpose = "chat_live"
	HardwareControl VoiceSessionPurpose = "hardware_control"
)

// Valid indicates whether the value is a known member of the VoiceSessionPurpose enum.
func (e VoiceSessionPurpose) Valid() bool {
	switch e {
	case ChatDictation:
		return true
	case ChatLive:
		return true
	case HardwareControl:
		return true
	default:
		return false
	}
}

// Defines values for VoiceSessionStatus.
const (
	Closed       VoiceSessionStatus = "closed"
	Closing      VoiceSessionStatus = "closing"
	Connected    VoiceSessionStatus = "connected"
	Provisioning VoiceSessionStatus = "provisioning"
	Reconnecting VoiceSessionStatus = "reconnecting"
)

// Valid indicates whether the value is a known member of the VoiceSessionStatus enum.
func (e VoiceSessionStatus) Valid() bool {
	switch e {
	case Closed:
		return true
	case Closing:
		return true
	case Connected:
		return true
	case Provisioning:
		return true
	case Reconnecting:
		return true
	default:
		return false
	}
}

// Defines values for VoiceTranscriptEventLane.
const (
	Live     VoiceTranscriptEventLane = "live"
	Recovery VoiceTranscriptEventLane = "recovery"
)

// Valid indicates whether the value is a known member of the VoiceTranscriptEventLane enum.
func (e VoiceTranscriptEventLane) Valid() bool {
	switch e {
	case Live:
		return true
	case Recovery:
		return true
	default:
		return false
	}
}

// Defines values for VoiceTranscriptEventKind.
const (
	DictationTurn VoiceTranscriptEventKind = "dictation_turn"
	Speech        VoiceTranscriptEventKind = "speech"
)

// Valid indicates whether the value is a known member of the VoiceTranscriptEventKind enum.
func (e VoiceTranscriptEventKind) Valid() bool {
	switch e {
	case DictationTurn:
		return true
	case Speech:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchBackendKeyState.
const (
	WebSearchBackendKeyStateNone       WebSearchBackendKeyState = "none"
	WebSearchBackendKeyStateRejected   WebSearchBackendKeyState = "rejected"
	WebSearchBackendKeyStateUnverified WebSearchBackendKeyState = "unverified"
	WebSearchBackendKeyStateVerified   WebSearchBackendKeyState = "verified"
)

// Valid indicates whether the value is a known member of the WebSearchBackendKeyState enum.
func (e WebSearchBackendKeyState) Valid() bool {
	switch e {
	case WebSearchBackendKeyStateNone:
		return true
	case WebSearchBackendKeyStateRejected:
		return true
	case WebSearchBackendKeyStateUnverified:
		return true
	case WebSearchBackendKeyStateVerified:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchBackendStatus.
const (
	WebSearchBackendStatusKeyRejected WebSearchBackendStatus = "key_rejected"
	WebSearchBackendStatusKeyRequired WebSearchBackendStatus = "key_required"
	WebSearchBackendStatusReady       WebSearchBackendStatus = "ready"
)

// Valid indicates whether the value is a known member of the WebSearchBackendStatus enum.
func (e WebSearchBackendStatus) Valid() bool {
	switch e {
	case WebSearchBackendStatusKeyRejected:
		return true
	case WebSearchBackendStatusKeyRequired:
		return true
	case WebSearchBackendStatusReady:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchBackendTier.
const (
	WebSearchBackendTierFree WebSearchBackendTier = "free"
	WebSearchBackendTierKey  WebSearchBackendTier = "key"
	WebSearchBackendTierNone WebSearchBackendTier = "none"
)

// Valid indicates whether the value is a known member of the WebSearchBackendTier enum.
func (e WebSearchBackendTier) Valid() bool {
	switch e {
	case WebSearchBackendTierFree:
		return true
	case WebSearchBackendTierKey:
		return true
	case WebSearchBackendTierNone:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchBackendId.
const (
	WebSearchBackendIdBrave      WebSearchBackendId = "brave"
	WebSearchBackendIdDirect     WebSearchBackendId = "direct"
	WebSearchBackendIdDuckduckgo WebSearchBackendId = "duckduckgo"
	WebSearchBackendIdExa        WebSearchBackendId = "exa"
	WebSearchBackendIdFirecrawl  WebSearchBackendId = "firecrawl"
	WebSearchBackendIdTavily     WebSearchBackendId = "tavily"
	WebSearchBackendIdYou        WebSearchBackendId = "you"
)

// Valid indicates whether the value is a known member of the WebSearchBackendId enum.
func (e WebSearchBackendId) Valid() bool {
	switch e {
	case WebSearchBackendIdBrave:
		return true
	case WebSearchBackendIdDirect:
		return true
	case WebSearchBackendIdDuckduckgo:
		return true
	case WebSearchBackendIdExa:
		return true
	case WebSearchBackendIdFirecrawl:
		return true
	case WebSearchBackendIdTavily:
		return true
	case WebSearchBackendIdYou:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchCommand.
const (
	WebSearchCommandOpen   WebSearchCommand = "open"
	WebSearchCommandSearch WebSearchCommand = "search"
)

// Valid indicates whether the value is a known member of the WebSearchCommand enum.
func (e WebSearchCommand) Valid() bool {
	switch e {
	case WebSearchCommandOpen:
		return true
	case WebSearchCommandSearch:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchFilter.
const (
	WebSearchFilterRecency WebSearchFilter = "recency"
	WebSearchFilterSite    WebSearchFilter = "site"
)

// Valid indicates whether the value is a known member of the WebSearchFilter enum.
func (e WebSearchFilter) Valid() bool {
	switch e {
	case WebSearchFilterRecency:
		return true
	case WebSearchFilterSite:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchKeyBackend.
const (
	WebSearchKeyBackendBrave     WebSearchKeyBackend = "brave"
	WebSearchKeyBackendExa       WebSearchKeyBackend = "exa"
	WebSearchKeyBackendFirecrawl WebSearchKeyBackend = "firecrawl"
	WebSearchKeyBackendTavily    WebSearchKeyBackend = "tavily"
	WebSearchKeyBackendYou       WebSearchKeyBackend = "you"
)

// Valid indicates whether the value is a known member of the WebSearchKeyBackend enum.
func (e WebSearchKeyBackend) Valid() bool {
	switch e {
	case WebSearchKeyBackendBrave:
		return true
	case WebSearchKeyBackendExa:
		return true
	case WebSearchKeyBackendFirecrawl:
		return true
	case WebSearchKeyBackendTavily:
		return true
	case WebSearchKeyBackendYou:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchQuotaFrom.
const (
	WebSearchQuotaFromLastResponse WebSearchQuotaFrom = "last_response"
	WebSearchQuotaFromProvider     WebSearchQuotaFrom = "provider"
	WebSearchQuotaFromUnavailable  WebSearchQuotaFrom = "unavailable"
)

// Valid indicates whether the value is a known member of the WebSearchQuotaFrom enum.
func (e WebSearchQuotaFrom) Valid() bool {
	switch e {
	case WebSearchQuotaFromLastResponse:
		return true
	case WebSearchQuotaFromProvider:
		return true
	case WebSearchQuotaFromUnavailable:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchQuotaReason.
const (
	WebSearchQuotaReasonKeyRejected         WebSearchQuotaReason = "key_rejected"
	WebSearchQuotaReasonNoKey               WebSearchQuotaReason = "no_key"
	WebSearchQuotaReasonNotObserved         WebSearchQuotaReason = "not_observed"
	WebSearchQuotaReasonNotReported         WebSearchQuotaReason = "not_reported"
	WebSearchQuotaReasonProviderUnavailable WebSearchQuotaReason = "provider_unavailable"
)

// Valid indicates whether the value is a known member of the WebSearchQuotaReason enum.
func (e WebSearchQuotaReason) Valid() bool {
	switch e {
	case WebSearchQuotaReasonKeyRejected:
		return true
	case WebSearchQuotaReasonNoKey:
		return true
	case WebSearchQuotaReasonNotObserved:
		return true
	case WebSearchQuotaReasonNotReported:
		return true
	case WebSearchQuotaReasonProviderUnavailable:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchQuotaUnit.
const (
	WebSearchQuotaUnitCredits  WebSearchQuotaUnit = "credits"
	WebSearchQuotaUnitRequests WebSearchQuotaUnit = "requests"
	WebSearchQuotaUnitUsd      WebSearchQuotaUnit = "usd"
)

// Valid indicates whether the value is a known member of the WebSearchQuotaUnit enum.
func (e WebSearchQuotaUnit) Valid() bool {
	switch e {
	case WebSearchQuotaUnitCredits:
		return true
	case WebSearchQuotaUnitRequests:
		return true
	case WebSearchQuotaUnitUsd:
		return true
	default:
		return false
	}
}

// Defines values for WebSearchSearchBackend.
const (
	WebSearchSearchBackendBrave      WebSearchSearchBackend = "brave"
	WebSearchSearchBackendDuckduckgo WebSearchSearchBackend = "duckduckgo"
	WebSearchSearchBackendExa        WebSearchSearchBackend = "exa"
	WebSearchSearchBackendFirecrawl  WebSearchSearchBackend = "firecrawl"
	WebSearchSearchBackendTavily     WebSearchSearchBackend = "tavily"
	WebSearchSearchBackendYou        WebSearchSearchBackend = "you"
)

// Valid indicates whether the value is a known member of the WebSearchSearchBackend enum.
func (e WebSearchSearchBackend) Valid() bool {
	switch e {
	case WebSearchSearchBackendBrave:
		return true
	case WebSearchSearchBackendDuckduckgo:
		return true
	case WebSearchSearchBackendExa:
		return true
	case WebSearchSearchBackendFirecrawl:
		return true
	case WebSearchSearchBackendTavily:
		return true
	case WebSearchSearchBackendYou:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemActivityKind.
const (
	WorkItemActivityKindAccessGrantAdded          WorkItemActivityKind = "access_grant_added"
	WorkItemActivityKindAccessGrantRemoved        WorkItemActivityKind = "access_grant_removed"
	WorkItemActivityKindArchived                  WorkItemActivityKind = "archived"
	WorkItemActivityKindAssignmentAdded           WorkItemActivityKind = "assignment_added"
	WorkItemActivityKindAssignmentRemoved         WorkItemActivityKind = "assignment_removed"
	WorkItemActivityKindCommentDeleted            WorkItemActivityKind = "comment_deleted"
	WorkItemActivityKindCommentEdited             WorkItemActivityKind = "comment_edited"
	WorkItemActivityKindCreated                   WorkItemActivityKind = "created"
	WorkItemActivityKindExecutionControlRequested WorkItemActivityKind = "execution_control_requested"
	WorkItemActivityKindMetadataUpdated           WorkItemActivityKind = "metadata_updated"
	WorkItemActivityKindStateTransitioned         WorkItemActivityKind = "state_transitioned"
	WorkItemActivityKindTaskRecoveryDecision      WorkItemActivityKind = "task_recovery_decision"
	WorkItemActivityKindUnarchived                WorkItemActivityKind = "unarchived"
	WorkItemActivityKindWorkRoomCreated           WorkItemActivityKind = "work_room_created"
)

// Valid indicates whether the value is a known member of the WorkItemActivityKind enum.
func (e WorkItemActivityKind) Valid() bool {
	switch e {
	case WorkItemActivityKindAccessGrantAdded:
		return true
	case WorkItemActivityKindAccessGrantRemoved:
		return true
	case WorkItemActivityKindArchived:
		return true
	case WorkItemActivityKindAssignmentAdded:
		return true
	case WorkItemActivityKindAssignmentRemoved:
		return true
	case WorkItemActivityKindCommentDeleted:
		return true
	case WorkItemActivityKindCommentEdited:
		return true
	case WorkItemActivityKindCreated:
		return true
	case WorkItemActivityKindExecutionControlRequested:
		return true
	case WorkItemActivityKindMetadataUpdated:
		return true
	case WorkItemActivityKindStateTransitioned:
		return true
	case WorkItemActivityKindTaskRecoveryDecision:
		return true
	case WorkItemActivityKindUnarchived:
		return true
	case WorkItemActivityKindWorkRoomCreated:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemKind.
const (
	WorkItemKindIssue WorkItemKind = "issue"
	WorkItemKindTask  WorkItemKind = "task"
)

// Valid indicates whether the value is a known member of the WorkItemKind enum.
func (e WorkItemKind) Valid() bool {
	switch e {
	case WorkItemKindIssue:
		return true
	case WorkItemKindTask:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemPriority.
const (
	High   WorkItemPriority = "high"
	Low    WorkItemPriority = "low"
	Medium WorkItemPriority = "medium"
	Urgent WorkItemPriority = "urgent"
)

// Valid indicates whether the value is a known member of the WorkItemPriority enum.
func (e WorkItemPriority) Valid() bool {
	switch e {
	case High:
		return true
	case Low:
		return true
	case Medium:
		return true
	case Urgent:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemResolution.
const (
	Completed  WorkItemResolution = "completed"
	Duplicate  WorkItemResolution = "duplicate"
	Failed     WorkItemResolution = "failed"
	NotPlanned WorkItemResolution = "not_planned"
)

// Valid indicates whether the value is a known member of the WorkItemResolution enum.
func (e WorkItemResolution) Valid() bool {
	switch e {
	case Completed:
		return true
	case Duplicate:
		return true
	case Failed:
		return true
	case NotPlanned:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemState.
const (
	InProgress WorkItemState = "in_progress"
	Open       WorkItemState = "open"
	Resolved   WorkItemState = "resolved"
)

// Valid indicates whether the value is a known member of the WorkItemState enum.
func (e WorkItemState) Valid() bool {
	switch e {
	case InProgress:
		return true
	case Open:
		return true
	case Resolved:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemTaskExecutionSummaryControlOutcome.
const (
	Applied    WorkItemTaskExecutionSummaryControlOutcome = "applied"
	Rejected   WorkItemTaskExecutionSummaryControlOutcome = "rejected"
	Superseded WorkItemTaskExecutionSummaryControlOutcome = "superseded"
)

// Valid indicates whether the value is a known member of the WorkItemTaskExecutionSummaryControlOutcome enum.
func (e WorkItemTaskExecutionSummaryControlOutcome) Valid() bool {
	switch e {
	case Applied:
		return true
	case Rejected:
		return true
	case Superseded:
		return true
	default:
		return false
	}
}

// Defines values for WorkItemTaskExecutionSummaryDesiredControl.
const (
	WorkItemTaskExecutionSummaryDesiredControlPause     WorkItemTaskExecutionSummaryDesiredControl = "pause"
	WorkItemTaskExecutionSummaryDesiredControlRun       WorkItemTaskExecutionSummaryDesiredControl = "run"
	WorkItemTaskExecutionSummaryDesiredControlTerminate WorkItemTaskExecutionSummaryDesiredControl = "terminate"
)

// Valid indicates whether the value is a known member of the WorkItemTaskExecutionSummaryDesiredControl enum.
func (e WorkItemTaskExecutionSummaryDesiredControl) Valid() bool {
	switch e {
	case WorkItemTaskExecutionSummaryDesiredControlPause:
		return true
	case WorkItemTaskExecutionSummaryDesiredControlRun:
		return true
	case WorkItemTaskExecutionSummaryDesiredControlTerminate:
		return true
	default:
		return false
	}
}

// Defines values for ListLibraryDocumentsParamsView.
const (
	Owned     ListLibraryDocumentsParamsView = "owned"
	Recent    ListLibraryDocumentsParamsView = "recent"
	Shareable ListLibraryDocumentsParamsView = "shareable"
	Shared    ListLibraryDocumentsParamsView = "shared"
	Unfiled   ListLibraryDocumentsParamsView = "unfiled"
)

// Valid indicates whether the value is a known member of the ListLibraryDocumentsParamsView enum.
func (e ListLibraryDocumentsParamsView) Valid() bool {
	switch e {
	case Owned:
		return true
	case Recent:
		return true
	case Shareable:
		return true
	case Shared:
		return true
	case Unfiled:
		return true
	default:
		return false
	}
}

// Defines values for ListWorkItemsParamsScope.
const (
	ListWorkItemsParamsScopePersonal ListWorkItemsParamsScope = "personal"
	ListWorkItemsParamsScopeTenant   ListWorkItemsParamsScope = "tenant"
)

// Valid indicates whether the value is a known member of the ListWorkItemsParamsScope enum.
func (e ListWorkItemsParamsScope) Valid() bool {
	switch e {
	case ListWorkItemsParamsScopePersonal:
		return true
	case ListWorkItemsParamsScopeTenant:
		return true
	default:
		return false
	}
}

// Account defines model for Account.
type Account struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Email Normalized email address; the login identifier.
	Email openapi_types.Email `json:"email"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`
}

// AccountProfile defines model for AccountProfile.
type AccountProfile struct {
	// AvatarImage Uploaded JPEG or PNG data URL; empty string restores the default avatar.
	AvatarImage *string `json:"avatar_image,omitempty"`

	// BackgroundImage Uploaded JPEG or PNG data URL; empty string restores the default profile background.
	BackgroundImage         *string `json:"background_image,omitempty"`
	Bio                     string  `json:"bio"`
	BioUserManaged          bool    `json:"bio_user_managed"`
	Email                   string  `json:"email"`
	Name                    string  `json:"name"`
	NameUserManaged         bool    `json:"name_user_managed"`
	Organization            string  `json:"organization"`
	OrganizationUserManaged bool    `json:"organization_user_managed"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
}

// AccountProfileUpdateRequest defines model for AccountProfileUpdateRequest.
type AccountProfileUpdateRequest struct {
	// AvatarImage Uploaded JPEG or PNG data URL; empty string restores the default avatar.
	AvatarImage *string `json:"avatar_image,omitempty"`

	// BackgroundImage Uploaded JPEG or PNG data URL; empty string restores the default profile background.
	BackgroundImage *string `json:"background_image,omitempty"`
	Bio             *string `json:"bio,omitempty"`
	Name            *string `json:"name,omitempty"`
	Organization    *string `json:"organization,omitempty"`
}

// Actor defines model for Actor.
type Actor struct {
	// AccountId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AccountId *Id `json:"account_id,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt   Timestamp `json:"created_at"`
	DisplayName string    `json:"display_name"`

	// Email Account email of a Human Actor. Returned only by the Tenant Actor listing, where the caller is an active member of the same Tenant, so member pickers can match an invited address to an existing person.
	Email  *openapi_types.Email `json:"email,omitempty"`
	Handle *string              `json:"handle,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id        `json:"id"`
	Kind ActorKind `json:"kind"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`
}

// ActorKind defines model for ActorKind.
type ActorKind string

// ActorPage defines model for ActorPage.
type ActorPage struct {
	Items []Actor  `json:"items"`
	Page  PageMeta `json:"page"`
}

// ActorRef defines model for ActorRef.
type ActorRef struct {
	DisplayName string `json:"display_name"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id        `json:"id"`
	Kind ActorKind `json:"kind"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`
}

// AgentChangeConfirmationChange defines model for AgentChangeConfirmationChange.
type AgentChangeConfirmationChange struct {
	After string `json:"after"`

	// Before The current value; absent when creating an Agent.
	Before *string                            `json:"before,omitempty"`
	Field  AgentChangeConfirmationChangeField `json:"field"`
}

// AgentChangeConfirmationChangeField defines model for AgentChangeConfirmationChange.Field.
type AgentChangeConfirmationChangeField string

// AgentChangeDecisionView The view of an agent_change decision: an Agent asked to create an Agent or to change an Agent's name, description, or prompt, which requires the Sponsor to approve it.
type AgentChangeDecisionView struct {
	Action AgentChangeDecisionViewAction `json:"action"`

	// AgentName The changed Agent's current name, or the new Agent's name.
	AgentName string                          `json:"agent_name"`
	Changes   []AgentChangeConfirmationChange `json:"changes"`

	// TargetActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TargetActorId *Id `json:"target_actor_id,omitempty"`
}

// AgentChangeDecisionViewAction defines model for AgentChangeDecisionView.Action.
type AgentChangeDecisionViewAction string

// AgentCreatedNotice The Message author, an Agent, created this General Agent. Without approved_by it was created here and joined this Room; with approved_by it was created after that Human approved the confirmation card and joined no Room.
type AgentCreatedNotice struct {
	Agent      ActorRef  `json:"agent"`
	ApprovedBy *ActorRef `json:"approved_by,omitempty"`
	Type       string    `json:"type"`
}

// AgentModel defines model for AgentModel.
type AgentModel struct {
	AllowedReasoningEffort *[]AgentReasoningEffort `json:"allowed_reasoning_effort,omitempty"`
	DefaultReasoningEffort *AgentReasoningEffort   `json:"default_reasoning_effort,omitempty"`
	Id                     string                  `json:"id"`

	// IsDefault The model the Runtime runs when none is selected.
	IsDefault *bool  `json:"is_default,omitempty"`
	Label     string `json:"label"`
}

// AgentNoticeFieldChange defines model for AgentNoticeFieldChange.
type AgentNoticeFieldChange struct {
	After  string                      `json:"after"`
	Before string                      `json:"before"`
	Field  AgentNoticeFieldChangeField `json:"field"`
}

// AgentNoticeFieldChangeField defines model for AgentNoticeFieldChange.Field.
type AgentNoticeFieldChangeField string

// AgentProfileChangedNotice The Message author, an Agent, changed this Agent's identity through the Agent CLI. initialized means the Agent had the uninitialized prompt before. Instruction text is never included; instructions_changed only says whether it changed.
type AgentProfileChangedNotice struct {
	Agent               ActorRef                 `json:"agent"`
	Changes             []AgentNoticeFieldChange `json:"changes"`
	Initialized         bool                     `json:"initialized"`
	InstructionsChanged bool                     `json:"instructions_changed"`
	Type                string                   `json:"type"`
}

// AgentReasoningEffort defines model for AgentReasoningEffort.
type AgentReasoningEffort string

// AgentRunStatusChangedPayload An Agent Run shown in this Room changed status or committed Runtime presentation events. Clients fetch events after their last ordinal up to run.event_ordinal.
type AgentRunStatusChangedPayload struct {
	Kind interface{}   `json:"kind"`
	Run  RoomRunStatus `json:"run"`
}

// AgentRuntimeActivityContentBlock One explicitly projected, bounded public detail block. Provider-native payloads must be redacted and normalized before entering this field.
type AgentRuntimeActivityContentBlock struct {
	Content string                                 `json:"content"`
	Format  AgentRuntimeActivityContentBlockFormat `json:"format"`
	Label   *string                                `json:"label,omitempty"`
}

// AgentRuntimeActivityContentBlockFormat defines model for AgentRuntimeActivityContentBlock.Format.
type AgentRuntimeActivityContentBlockFormat string

// AgentRuntimeActivityFinishedEvent defines model for AgentRuntimeActivityFinishedEvent.
type AgentRuntimeActivityFinishedEvent struct {
	// ActivityId Opaque identity of one logical activity within a local Run. Provider-native item identifiers must not cross the Runtime adapter boundary.
	ActivityId AgentRuntimeActivityId              `json:"activity_id"`
	Content    *[]AgentRuntimeActivityContentBlock `json:"content,omitempty"`
	Outcome    AgentRuntimeActivityOutcome         `json:"outcome"`
	Type       string                              `json:"type"`
}

// AgentRuntimeActivityId Opaque identity of one logical activity within a local Run. Provider-native item identifiers must not cross the Runtime adapter boundary.
type AgentRuntimeActivityId = string

// AgentRuntimeActivityKind Runtime-neutral kind of an activity. Each Runtime adapter classifies its own tools; a single shell command gets the kind its program shows. Clients present an activity by kind, not by tool name.
type AgentRuntimeActivityKind string

// AgentRuntimeActivityOutcome defines model for AgentRuntimeActivityOutcome.
type AgentRuntimeActivityOutcome string

// AgentRuntimeActivityStartedEvent defines model for AgentRuntimeActivityStartedEvent.
type AgentRuntimeActivityStartedEvent struct {
	// ActivityId Opaque identity of one logical activity within a local Run. Provider-native item identifiers must not cross the Runtime adapter boundary.
	ActivityId AgentRuntimeActivityId              `json:"activity_id"`
	Content    *[]AgentRuntimeActivityContentBlock `json:"content,omitempty"`

	// Kind Runtime-neutral kind of an activity. Each Runtime adapter classifies its own tools; a single shell command gets the kind its program shows. Clients present an activity by kind, not by tool name.
	Kind  AgentRuntimeActivityKind `json:"kind"`
	Title string                   `json:"title"`
	Type  string                   `json:"type"`
}

// AgentRuntimeActivityUpdatedEvent defines model for AgentRuntimeActivityUpdatedEvent.
type AgentRuntimeActivityUpdatedEvent struct {
	// ActivityId Opaque identity of one logical activity within a local Run. Provider-native item identifiers must not cross the Runtime adapter boundary.
	ActivityId AgentRuntimeActivityId `json:"activity_id"`
	Detail     string                 `json:"detail"`
	Type       string                 `json:"type"`
}

// AgentRuntimeConfig The local Runtime an Agent runs is placement.runtime_type.
type AgentRuntimeConfig struct {
	Model string `json:"model"`

	// Placement Agents run on one of the Sponsor's Local Computers. Placement requires computer_id, runtime_type, and workspace_grant_id; TeamHub validates that invariant before persistence.
	Placement       *AgentRuntimePlacement `json:"placement,omitempty"`
	ReasoningEffort *AgentReasoningEffort  `json:"reasoning_effort,omitempty"`
}

// AgentRuntimeExecutionFailure Public classified failure; contains no native error text, paths, credentials, or task input. Each code is set where the failure is observed, from structured signals only. model_unavailable means the model service refused the selected model for the Runtime's account, so the Agent needs another model or another sign-in. model_not_offered means the Agent's Computer does not offer the selected model for its Runtime, or the model does not support the selected reasoning effort, so the Runtime could not start; the Agent needs a model and reasoning effort that Computer offers. context_too_long means the conversation no longer fits the model's context window. model_service_error means the model service reported a server-side error. timeout means the Runtime hit its local execution deadline. execution_outcome_unknown means a command was dispatched but no validated exit was observed before unexpected transport or Runtime failure. Intentional cancellation, authorization loss or unavailability, and normal retirement do not create this classification. Authorization loss or unavailability includes explicit revocation, authorization checks that fail or time out, and authorization expiry. This code does not currently cover unknown effects caused by control-plane disconnection. It remains a failed Run and must not be automatically replayed; verify its effects before starting another Run. reply_undelivered means a Room Run finished, but every message the Agent tried to post failed, so the Room received no reply from it. reply_not_sent means a Room Run finished without trying to post anything while a Human who mentioned the Agent waited for its reply; the Runtime ended the turn in text nobody sees, which is not posted for it. interrupted means the Run stopped before it finished for a reason other than a user cancellation, such as a restart or a Runner stopped on its Computer; part of its work may have taken effect and it is not replayed. computer_unavailable means the Agent's Computer could not run it: the Computer is unreachable, the Agent's Runner is stopped there, or the Runtime is not enabled. cleanup_unconfirmed means the Runtime process could not be confirmed stopped. response_too_large means the reply exceeded the Room's size limit. unclassified means no structured signal identified the cause. runtime_type is present when the failure belongs to a selected Runtime; it is absent for failures the Agent Service or TeamHub observes without one.
type AgentRuntimeExecutionFailure struct {
	Code           AgentRuntimeExecutionFailureCode `json:"code"`
	RuntimeType    *LocalRuntimeType                `json:"runtime_type,omitempty"`
	RuntimeVersion *string                          `json:"runtime_version,omitempty"`
}

// AgentRuntimeExecutionFailureCode defines model for AgentRuntimeExecutionFailure.Code.
type AgentRuntimeExecutionFailureCode string

// AgentRuntimeInt64 defines model for AgentRuntimeInt64.
type AgentRuntimeInt64 = string

// AgentRuntimePersistedPresentationEvent defines model for AgentRuntimePersistedPresentationEvent.
type AgentRuntimePersistedPresentationEvent struct {
	union json.RawMessage
}

// AgentRuntimePlacement Agents run on one of the Sponsor's Local Computers. Placement requires computer_id, runtime_type, and workspace_grant_id; TeamHub validates that invariant before persistence.
type AgentRuntimePlacement struct {
	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId  *Id                       `json:"computer_id,omitempty"`
	RuntimeType *LocalRuntimeType         `json:"runtime_type,omitempty"`
	Type        AgentRuntimePlacementType `json:"type"`

	// WorkspaceGrantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkspaceGrantId *Id `json:"workspace_grant_id,omitempty"`
}

// AgentRuntimePlacementType defines model for AgentRuntimePlacement.Type.
type AgentRuntimePlacementType string

// AgentRuntimePlanStep defines model for AgentRuntimePlanStep.
type AgentRuntimePlanStep struct {
	Content string                     `json:"content"`
	Status  AgentRuntimePlanStepStatus `json:"status"`
}

// AgentRuntimePlanStepStatus defines model for AgentRuntimePlanStep.Status.
type AgentRuntimePlanStepStatus string

// AgentRuntimePlanUpdatedEvent defines model for AgentRuntimePlanUpdatedEvent.
type AgentRuntimePlanUpdatedEvent struct {
	Explanation *string                `json:"explanation,omitempty"`
	Steps       []AgentRuntimePlanStep `json:"steps"`
	Type        string                 `json:"type"`
}

// AgentRuntimePositiveInt64 defines model for AgentRuntimePositiveInt64.
type AgentRuntimePositiveInt64 = string

// AgentRuntimePresentationOutputCreatedEvent defines model for AgentRuntimePresentationOutputCreatedEvent.
type AgentRuntimePresentationOutputCreatedEvent struct {
	// Continues Present only when the Agent declared, when sending this output, that more work in the same turn follows. Clients must not treat the linked reply as the turn's final reply.
	Continues  *bool                                                `json:"continues,omitempty"`
	OutputId   string                                               `json:"output_id"`
	OutputKind AgentRuntimePresentationOutputCreatedEventOutputKind `json:"output_kind"`
	Surface    AgentRuntimePresentationOutputCreatedEventSurface    `json:"surface"`
	Type       string                                               `json:"type"`
}

// AgentRuntimePresentationOutputCreatedEventOutputKind defines model for AgentRuntimePresentationOutputCreatedEvent.OutputKind.
type AgentRuntimePresentationOutputCreatedEventOutputKind string

// AgentRuntimePresentationOutputCreatedEventSurface defines model for AgentRuntimePresentationOutputCreatedEvent.Surface.
type AgentRuntimePresentationOutputCreatedEventSurface string

// AgentRuntimeStoppedStatusChangedEvent defines model for AgentRuntimeStoppedStatusChangedEvent.
type AgentRuntimeStoppedStatusChangedEvent struct {
	// Failure Public classified failure; contains no native error text, paths, credentials, or task input. Each code is set where the failure is observed, from structured signals only. model_unavailable means the model service refused the selected model for the Runtime's account, so the Agent needs another model or another sign-in. model_not_offered means the Agent's Computer does not offer the selected model for its Runtime, or the model does not support the selected reasoning effort, so the Runtime could not start; the Agent needs a model and reasoning effort that Computer offers. context_too_long means the conversation no longer fits the model's context window. model_service_error means the model service reported a server-side error. timeout means the Runtime hit its local execution deadline. execution_outcome_unknown means a command was dispatched but no validated exit was observed before unexpected transport or Runtime failure. Intentional cancellation, authorization loss or unavailability, and normal retirement do not create this classification. Authorization loss or unavailability includes explicit revocation, authorization checks that fail or time out, and authorization expiry. This code does not currently cover unknown effects caused by control-plane disconnection. It remains a failed Run and must not be automatically replayed; verify its effects before starting another Run. reply_undelivered means a Room Run finished, but every message the Agent tried to post failed, so the Room received no reply from it. reply_not_sent means a Room Run finished without trying to post anything while a Human who mentioned the Agent waited for its reply; the Runtime ended the turn in text nobody sees, which is not posted for it. interrupted means the Run stopped before it finished for a reason other than a user cancellation, such as a restart or a Runner stopped on its Computer; part of its work may have taken effect and it is not replayed. computer_unavailable means the Agent's Computer could not run it: the Computer is unreachable, the Agent's Runner is stopped there, or the Runtime is not enabled. cleanup_unconfirmed means the Runtime process could not be confirmed stopped. response_too_large means the reply exceeded the Room's size limit. unclassified means no structured signal identified the cause. runtime_type is present when the failure belongs to a selected Runtime; it is absent for failures the Agent Service or TeamHub observes without one.
	Failure *AgentRuntimeExecutionFailure                `json:"failure,omitempty"`
	Outcome AgentRuntimeStoppedStatusChangedEventOutcome `json:"outcome"`
	Status  string                                       `json:"status"`
	Type    string                                       `json:"type"`

	// UnconfirmedInputIds Follow-up inputs whose application to this Run could not be confirmed. Does not change the Run outcome.
	UnconfirmedInputIds *[]string `json:"unconfirmed_input_ids,omitempty"`
}

// AgentRuntimeStoppedStatusChangedEventOutcome defines model for AgentRuntimeStoppedStatusChangedEvent.Outcome.
type AgentRuntimeStoppedStatusChangedEventOutcome string

// AgentRuntimeWorkingStatusChangedEvent defines model for AgentRuntimeWorkingStatusChangedEvent.
type AgentRuntimeWorkingStatusChangedEvent struct {
	Status AgentRuntimeWorkingStatusChangedEventStatus `json:"status"`

	// Title Optional public queue label for queued, or the full provider-visible reasoning summary title for thinking. Omit for working; raw reasoning is never allowed.
	Title *string `json:"title,omitempty"`
	Type  string  `json:"type"`
}

// AgentRuntimeWorkingStatusChangedEventStatus defines model for AgentRuntimeWorkingStatusChangedEvent.Status.
type AgentRuntimeWorkingStatusChangedEventStatus string

// AgentSkillBinding defines model for AgentSkillBinding.
type AgentSkillBinding struct {
	// AgentActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AgentActorId   Id    `json:"agent_actor_id"`
	BindingVersion int64 `json:"binding_version"`

	// Config Frozen non-secret configuration validated against the selected Package Version.
	Config  map[string]interface{} `json:"config"`
	Enabled bool                   `json:"enabled"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id    Id       `json:"id"`
	Skill SkillRef `json:"skill"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`

	// UpdatedByActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	UpdatedByActorId Id `json:"updated_by_actor_id"`
}

// AgentSkillBindingList defines model for AgentSkillBindingList.
type AgentSkillBindingList struct {
	// AgentActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AgentActorId   Id                  `json:"agent_actor_id"`
	BindingVersion int64               `json:"binding_version"`
	Items          []AgentSkillBinding `json:"items"`
}

// AgentSkillBindingPutRequest defines model for AgentSkillBindingPutRequest.
type AgentSkillBindingPutRequest struct {
	// Config Must not contain passwords, API keys, tokens, or other secrets.
	Config  map[string]interface{} `json:"config"`
	Enabled bool                   `json:"enabled"`

	// ExpectedBindingVersion Exact Agent binding revision read before editing. Conflict never overwrites another window.
	ExpectedBindingVersion int64 `json:"expected_binding_version"`

	// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
	ManifestVersion ManifestVersion `json:"manifest_version"`

	// ReplaceSkillId Stable, case-sensitive logical Skill identifier.
	ReplaceSkillId *SkillIdentifier `json:"replace_skill_id,omitempty"`
}

// AgentSkillPackageUploadRequest defines model for AgentSkillPackageUploadRequest.
type AgentSkillPackageUploadRequest struct {
	// Package A Skill ZIP with root SKILL.md, or a single SKILL.md / skill.md file. TeamHub derives identity and the next Manifest version from the package.
	Package openapi_types.File `json:"package"`
}

// AgentSkillRegistration Initial enabled Agent binding to one existing sealed Skill Manifest version. Configuration defaults to an empty object. Agent registration does not upload or create a Skill Package.
type AgentSkillRegistration struct {
	// Description Current sealed Manifest description for Human-facing Agent directory responses.
	Description *string `json:"description,omitempty"`

	// IsDefault Managed platform default; not an explicit, editable or removable Agent binding.
	IsDefault *bool `json:"is_default,omitempty"`

	// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
	ManifestVersion ManifestVersion `json:"manifest_version"`
	Name            string          `json:"name"`

	// SkillId Stable, case-sensitive logical Skill identifier.
	SkillId SkillIdentifier `json:"skill_id"`
}

// AgentTemplate A reusable Agent definition. It carries identity text, instructions, Routines, and the exact Skill and Connector selections. Runtime provider, model, reasoning effort, and placement are Agent deployment facts and never belong to a template.
type AgentTemplate struct {
	// AvatarKey Product avatar selection carried with the template. Clients that do not know the key fall back to their own default.
	AvatarKey *string `json:"avatar_key,omitempty"`

	// ConnectorBindings Connected App keys this Agent used, carried so a consumer knows what to authorize. A template never carries a connection, account, credential, or token: the consumer grants access from their own connected accounts after the Agent exists.
	ConnectorBindings []ExternalAppKey `json:"connector_bindings"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt    Timestamp `json:"created_at"`
	Description  string    `json:"description"`
	Instructions string    `json:"instructions"`
	Name         string    `json:"name"`

	// Origin builtin templates ship with the deployment and belong to no Tenant. published templates are Human-published and are visible to every Tenant in the deployment.
	Origin      AgentTemplateOrigin `json:"origin"`
	PublishedBy *ActorRef           `json:"published_by,omitempty"`

	// Routines Fixed snapshots of all Routines in the publisher's direct Room with the source Agent. Copied automatically into the new Agent's direct Room with its Sponsor.
	Routines      []AgentTemplateRoutine   `json:"routines"`
	SkillBindings []AgentSkillRegistration `json:"skill_bindings"`

	// TemplateId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TemplateId Id `json:"template_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// AgentTemplateOrigin builtin templates ship with the deployment and belong to no Tenant. published templates are Human-published and are visible to every Tenant in the deployment.
type AgentTemplateOrigin string

// AgentTemplatePage defines model for AgentTemplatePage.
type AgentTemplatePage struct {
	Items []AgentTemplate `json:"items"`
}

// AgentTemplatePublishRequest Publishes one reusable definition to the deployment-wide template market. Skill references are stored exactly as given and are resolved against the consuming Tenant catalog when an Agent is created. Publishing shares the referenced Skill versions: a consumer may copy a version private to the publisher into their own Tenant through importAgentTemplateSkills. A reference that can be neither bound nor copied is skipped rather than rejected here. Connector references name Apps only; no connection, credential, or account of the publisher is ever carried.
type AgentTemplatePublishRequest struct {
	AvatarKey *string `json:"avatar_key,omitempty"`

	// ConnectorBindings Connected App keys this Agent used, carried so a consumer knows what to authorize. A template never carries a connection, account, credential, or token: the consumer grants access from their own connected accounts after the Agent exists.
	ConnectorBindings *[]ExternalAppKey         `json:"connector_bindings,omitempty"`
	Description       *string                   `json:"description,omitempty"`
	Instructions      string                    `json:"instructions"`
	Name              string                    `json:"name"`
	SkillBindings     *[]AgentSkillRegistration `json:"skill_bindings,omitempty"`

	// SourceAgentActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	SourceAgentActorId *Id `json:"source_agent_actor_id,omitempty"`
}

// AgentTemplateRoutine defines model for AgentTemplateRoutine.
type AgentTemplateRoutine struct {
	Cadence       RoutineCadence                    `json:"cadence"`
	CreatedByRole AgentTemplateRoutineCreatedByRole `json:"created_by_role"`
	Enabled       bool                              `json:"enabled"`
	Instruction   string                            `json:"instruction"`

	// Key Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Key Id `json:"key"`

	// MentionRole Absent when the source Routine has no valid mention of the source Agent. Raw instruction text is never rewritten.
	MentionRole *AgentTemplateRoutineMentionRole `json:"mention_role,omitempty"`
	Name        string                           `json:"name"`
}

// AgentTemplateRoutineCreatedByRole defines model for AgentTemplateRoutine.CreatedByRole.
type AgentTemplateRoutineCreatedByRole string

// AgentTemplateRoutineMentionRole Absent when the source Routine has no valid mention of the source Agent. Raw instruction text is never rewritten.
type AgentTemplateRoutineMentionRole string

// AgentTemplateSkillImport defines model for AgentTemplateSkillImport.
type AgentTemplateSkillImport struct {
	// Skill Initial enabled Agent binding to one existing sealed Skill Manifest version. Configuration defaults to an empty object. Agent registration does not upload or create a Skill Package.
	Skill *AgentSkillRegistration `json:"skill,omitempty"`

	// Source Initial enabled Agent binding to one existing sealed Skill Manifest version. Configuration defaults to an empty object. Agent registration does not upload or create a Skill Package.
	Source AgentSkillRegistration `json:"source"`

	// Status importable means the published template's Skill version can be copied from the publisher's Tenant into this Tenant as a private Skill of the caller. imported means the copy exists (created now or reused from an earlier import with identical content). unavailable means the source version is missing, disabled, deleted, or not owned by the template's publishing Tenant.
	Status AgentTemplateSkillImportStatus `json:"status"`
}

// AgentTemplateSkillImportPage Template Skill references the caller cannot bind from this Tenant catalog. References the catalog already resolves, including platform Skills, are not listed.
type AgentTemplateSkillImportPage struct {
	Items []AgentTemplateSkillImport `json:"items"`
}

// AgentTemplateSkillImportStatus importable means the published template's Skill version can be copied from the publisher's Tenant into this Tenant as a private Skill of the caller. imported means the copy exists (created now or reused from an earlier import with identical content). unavailable means the source version is missing, disabled, deleted, or not owned by the template's publishing Tenant.
type AgentTemplateSkillImportStatus string

// AgentType Persisted Agent runtime type.
type AgentType string

// AgentVisibilityScope Tenant directory visibility only. Sponsor visibility does not hide the Agent from members of a Room where the Sponsor explicitly admitted it, and workspace visibility does not grant Agent management or ordinary Room admission rights.
type AgentVisibilityScope string

// AnotherMe The Human's Another Me and its live direct Chat. Empty until the Another Me exists; room_id is also absent while the Chat is being deleted.
type AnotherMe struct {
	// AgentActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AgentActorId *Id `json:"agent_actor_id,omitempty"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId *Id `json:"room_id,omitempty"`
}

// ArtifactTreeSegment defines model for ArtifactTreeSegment.
type ArtifactTreeSegment struct {
	Content        string `json:"content"`
	DirectoryCount int    `json:"directory_count"`

	// EntryDocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	EntryDocumentId *Id `json:"entry_document_id,omitempty"`

	// EntryDocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	EntryDocumentVersionId *Id `json:"entry_document_version_id,omitempty"`
	FileCount              int `json:"file_count"`

	// PublicationGroupId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	PublicationGroupId Id     `json:"publication_group_id"`
	RootPath           string `json:"root_path"`
	TotalBytes         int64  `json:"total_bytes"`
	Type               string `json:"type"`
	union              json.RawMessage
}

// ArtifactTreeSegment0 defines model for .
type ArtifactTreeSegment0 = interface{}

// ArtifactTreeSegment1 defines model for .
type ArtifactTreeSegment1 = interface{}

// AttachmentUploadToken Service-signed upload credential. It names the uploading Human, the Room, and the stored file, and it expires at the upload's expires_at; clients must not construct or parse it.
type AttachmentUploadToken = string

// BrowserConnectionConfigureRequest The text a Human pasted from the Playwright Extension. TeamHub trims it, removes one optional PLAYWRIGHT_MCP_EXTENSION_TOKEN= prefix and optional surrounding quotes, then validates the token. TeamHub never stores it.
type BrowserConnectionConfigureRequest struct {
	ExtensionToken *string `json:"extension_token,omitempty"`

	// Profile A Chrome profile directory name inside the user's Chrome data directory.
	Profile *BrowserProfile `json:"profile,omitempty"`
}

// BrowserConnectionDecisionView The view of a browser_connection decision: the Local Computer whose everyday Chrome its owner is asked to connect, taken from the waiting Agent's placement. The owner's own connection answers it connected.
type BrowserConnectionDecisionView struct {
	ComputerId string `json:"computer_id"`
}

// BrowserConnectionStatus The browser that browser tools of this owner's Agents drive on one Local Computer. It never contains the Playwright Extension token.
type BrowserConnectionStatus struct {
	Browser *BrowserConnectionStatusBrowser `json:"browser,omitempty"`

	// ConfiguredAt UTC timestamp in RFC 3339 format with an explicit offset.
	ConfiguredAt *Timestamp                      `json:"configured_at,omitempty"`
	Message      *string                         `json:"message,omitempty"`
	Mode         BrowserConnectionStatusMode     `json:"mode"`
	Platform     BrowserConnectionStatusPlatform `json:"platform"`

	// Profile A Chrome profile directory name inside the user's Chrome data directory.
	Profile *BrowserProfile              `json:"profile,omitempty"`
	State   BrowserConnectionStatusState `json:"state"`

	// VerifiedAt UTC timestamp in RFC 3339 format with an explicit offset.
	VerifiedAt *Timestamp `json:"verified_at,omitempty"`
}

// BrowserConnectionStatusBrowser defines model for BrowserConnectionStatus.Browser.
type BrowserConnectionStatusBrowser string

// BrowserConnectionStatusMode defines model for BrowserConnectionStatus.Mode.
type BrowserConnectionStatusMode string

// BrowserConnectionStatusPlatform defines model for BrowserConnectionStatus.Platform.
type BrowserConnectionStatusPlatform string

// BrowserConnectionStatusState defines model for BrowserConnectionStatus.State.
type BrowserConnectionStatusState string

// BrowserProfile A Chrome profile directory name inside the user's Chrome data directory.
type BrowserProfile = string

// ByokEndpointInput A BYOK endpoint address and key, enough to list its models at base_url + path + /models with protocol's key header. The API key is never persisted in TeamHub or Agent Service.
type ByokEndpointInput struct {
	ApiKey  *string `json:"api_key,omitempty"`
	BaseUrl string  `json:"base_url"`

	// Endpoint A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
	Endpoint ByokUrlPath `json:"endpoint"`

	// Path A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
	Path ByokUrlPath `json:"path"`

	// Protocol Wire format of a BYOK upstream endpoint. The owner's client derives it from the end of the request address, else from the Runtime's own format; the Computer does not probe for it.
	Protocol      ByokProtocol `json:"protocol"`
	ReuseSavedKey *bool        `json:"reuse_saved_key,omitempty"`
}

// ByokInput Upstream endpoint configuration supplied by the Computer owner. Requests go to base_url + path + endpoint in protocol, and models are listed at base_url + path + /models. The API key is never persisted in TeamHub or Agent Service; only the Local Computer stores it in a private 0600 file.
type ByokInput struct {
	ApiKey        *string `json:"api_key,omitempty"`
	BaseUrl       string  `json:"base_url"`
	ContextWindow *int    `json:"context_window,omitempty"`

	// Endpoint A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
	Endpoint ByokUrlPath `json:"endpoint"`
	ModelId  string      `json:"model_id"`

	// Path A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
	Path ByokUrlPath `json:"path"`

	// Protocol Wire format of a BYOK upstream endpoint. The owner's client derives it from the end of the request address, else from the Runtime's own format; the Computer does not probe for it.
	Protocol      ByokProtocol `json:"protocol"`
	ReuseSavedKey *bool        `json:"reuse_saved_key,omitempty"`
}

// ByokModel A model a BYOK endpoint lists.
type ByokModel struct {
	ContextWindow *int   `json:"context_window,omitempty"`
	Id            string `json:"id"`

	// Name The endpoint's display name, when it differs from id.
	Name *string `json:"name,omitempty"`
}

// ByokModelList The models a BYOK endpoint lists, sorted by id.
type ByokModelList struct {
	Models []ByokModel `json:"models"`

	// Url The address that listed them.
	Url string `json:"url"`
}

// ByokProtocol Wire format of a BYOK upstream endpoint. The owner's client derives it from the end of the request address, else from the Runtime's own format; the Computer does not probe for it.
type ByokProtocol string

// ByokSummary Redacted BYOK configuration metadata reported by the Computer. path and endpoint are omitted when empty: a configured summary without them appends nothing there.
type ByokSummary struct {
	BaseUrl       *string `json:"base_url,omitempty"`
	Configured    bool    `json:"configured"`
	ContextWindow *int    `json:"context_window,omitempty"`

	// Endpoint A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
	Endpoint *ByokUrlPath `json:"endpoint,omitempty"`
	KeySaved bool         `json:"key_saved"`
	ModelId  *string      `json:"model_id,omitempty"`

	// Path A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
	Path *ByokUrlPath `json:"path,omitempty"`

	// Protocol Wire format of a BYOK upstream endpoint. The owner's client derives it from the end of the request address, else from the Runtime's own format; the Computer does not probe for it.
	Protocol *ByokProtocol `json:"protocol,omitempty"`
}

// ByokTestRequest A BYOK endpoint to verify with one request from the Computer.
type ByokTestRequest struct {
	// Byok Upstream endpoint configuration supplied by the Computer owner. Requests go to base_url + path + endpoint in protocol, and models are listed at base_url + path + /models. The API key is never persisted in TeamHub or Agent Service; only the Local Computer stores it in a private 0600 file.
	Byok ByokInput `json:"byok"`
}

// ByokTestResult Outcome of one request to an upstream BYOK endpoint from the Local Computer.
type ByokTestResult struct {
	ContextWindow int    `json:"context_window"`
	ModelId       string `json:"model_id"`
	Ok            bool   `json:"ok"`

	// Protocol Wire format of a BYOK upstream endpoint. The owner's client derives it from the end of the request address, else from the Runtime's own format; the Computer does not probe for it.
	Protocol ByokProtocol `json:"protocol"`

	// Url The address the request went to.
	Url string `json:"url"`
}

// ByokUrlPath A path appended to a BYOK base URL: empty, or whole segments each led by one slash, so it can only extend the base URL's path.
type ByokUrlPath = string

// CaptureSessionChangedPayload defines model for CaptureSessionChangedPayload.
type CaptureSessionChangedPayload struct {
	Kind interface{} `json:"kind"`

	// SessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	SessionId Id                                 `json:"session_id"`
	Status    CaptureSessionChangedPayloadStatus `json:"status"`
}

// CaptureSessionChangedPayloadStatus defines model for CaptureSessionChangedPayload.Status.
type CaptureSessionChangedPayloadStatus string

// CardChangedPayload defines model for CardChangedPayload.
type CardChangedPayload struct {
	Kind interface{} `json:"kind"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId Id    `json:"message_id"`
	Version   int64 `json:"version"`
}

// CompleteExternalConnectionAuthorizationRequest defines model for CompleteExternalConnectionAuthorizationRequest.
type CompleteExternalConnectionAuthorizationRequest struct {
	// ConnectedAccountId The connected account the Composio callback named, when it named one.
	ConnectedAccountId *string `json:"connected_account_id,omitempty"`
}

// ComputerPermissionAction One step the owner takes on their own Mac. prompt raises the macOS prompt, open_settings opens the System Settings pane, and relaunch restarts the Linger desktop app so a new grant takes effect.
type ComputerPermissionAction struct {
	Action ComputerPermissionActionAction `json:"action"`

	// Permission A macOS privacy permission an Agent can ask its Computer owner to grant.
	Permission *ComputerPermissionId `json:"permission,omitempty"`

	// Subject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
	Subject ComputerPermissionSubject `json:"subject"`
}

// ComputerPermissionActionAction defines model for ComputerPermissionAction.Action.
type ComputerPermissionActionAction string

// ComputerPermissionDecisionView The view of a computer_permission decision: the macOS permissions one app on the owner's Local Computer needs. The card reads their live state from the Computer; once all are granted TeamHub answers it granted.
type ComputerPermissionDecisionView struct {
	ComputerId  string                 `json:"computer_id"`
	Permissions []ComputerPermissionId `json:"permissions"`
	Reason      *string                `json:"reason,omitempty"`

	// Subject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
	Subject ComputerPermissionSubject `json:"subject"`
}

// ComputerPermissionEntry defines model for ComputerPermissionEntry.
type ComputerPermissionEntry struct {
	// Id A macOS privacy permission an Agent can ask its Computer owner to grant.
	Id ComputerPermissionId `json:"id"`

	// Prompt available when the Computer can raise the macOS prompt itself; settings_only when it can only open the System Settings pane.
	Prompt ComputerPermissionPrompt `json:"prompt"`

	// RelaunchRequired macOS applies a new grant only after the app restarts. True once the running app asked for this permission without seeing it granted.
	RelaunchRequired bool                    `json:"relaunch_required"`
	State            ComputerPermissionState `json:"state"`
}

// ComputerPermissionId A macOS privacy permission an Agent can ask its Computer owner to grant.
type ComputerPermissionId string

// ComputerPermissionPrompt available when the Computer can raise the macOS prompt itself; settings_only when it can only open the System Settings pane.
type ComputerPermissionPrompt string

// ComputerPermissionState defines model for ComputerPermissionState.
type ComputerPermissionState string

// ComputerPermissionStatus The macOS privacy permissions of one Local Computer. Other platforms have no such permissions and report no subjects.
type ComputerPermissionStatus struct {
	// Host desktop when the Linger desktop app runs the Computer; standalone otherwise.
	Host     ComputerPermissionStatusHost      `json:"host"`
	Platform ComputerPermissionStatusPlatform  `json:"platform"`
	Subjects []ComputerPermissionSubjectStatus `json:"subjects"`
}

// ComputerPermissionStatusHost desktop when the Linger desktop app runs the Computer; standalone otherwise.
type ComputerPermissionStatusHost string

// ComputerPermissionStatusPlatform defines model for ComputerPermissionStatus.Platform.
type ComputerPermissionStatusPlatform string

// ComputerPermissionSubject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
type ComputerPermissionSubject string

// ComputerPermissionSubjectStatus defines model for ComputerPermissionSubjectStatus.
type ComputerPermissionSubjectStatus struct {
	Permissions []ComputerPermissionEntry `json:"permissions"`

	// Subject The app macOS grants the permission to. linger is the Linger desktop app, which owns shell commands such as screencapture; computer_use is CuaDriver, which owns the computer-use tools.
	Subject ComputerPermissionSubject `json:"subject"`
}

// ConnectionAuthDecisionView The view of a connection_auth decision: the Connected App the Agent needs. account is the identity the Agent asked for, when it named one. connection_id is the Connection the Human chose, once they approved.
type ConnectionAuthDecisionView struct {
	Account *string `json:"account,omitempty"`
	AppKey  string  `json:"app_key"`

	// ConnectionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ConnectionId *Id `json:"connection_id,omitempty"`
}

// ConnectorConfirmationField defines model for ConnectorConfirmationField.
type ConnectorConfirmationField struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

// ConnectorConfirmationMessage defines model for ConnectorConfirmationMessage.
type ConnectorConfirmationMessage struct {
	Attachments *[]string `json:"attachments,omitempty"`
	Bcc         *[]string `json:"bcc,omitempty"`
	Body        string    `json:"body"`
	Cc          *[]string `json:"cc,omitempty"`

	// Destination Chat channel, conversation, or thread the message goes to.
	Destination *string `json:"destination,omitempty"`

	// Format mrkdwn is Slack's own markup, not Markdown.
	Format  ConnectorConfirmationMessageFormat `json:"format"`
	Subject *string                            `json:"subject,omitempty"`
	To      *[]string                          `json:"to,omitempty"`
}

// ConnectorConfirmationMessageFormat mrkdwn is Slack's own markup, not Markdown.
type ConnectorConfirmationMessageFormat string

// ConnectorWriteDecisionView The view of a connector_write decision: one external write a wrapped TeamHub CLI command asked to run. TeamHub builds it from the stored call it will run after approval, so message is what will actually be sent and input is the full call.
type ConnectorWriteDecisionView struct {
	// Account The connected account the call acts as.
	Account string `json:"account"`

	// App Connected application key, such as gmail or slack.
	App string `json:"app"`

	// Fields Target and key values of a change, in display order.
	Fields *[]ConnectorConfirmationField `json:"fields,omitempty"`

	// Input The full call arguments as JSON.
	Input string `json:"input"`

	// Kind message for mail and chat sends, change for the rest.
	Kind    ConnectorWriteDecisionViewKind `json:"kind"`
	Message *ConnectorConfirmationMessage  `json:"message,omitempty"`
	Title   string                         `json:"title"`

	// Tool The provider tool slug.
	Tool string `json:"tool"`
}

// ConnectorWriteDecisionViewKind message for mail and chat sends, change for the rest.
type ConnectorWriteDecisionViewKind string

// ContextDocumentCreateRequest defines model for ContextDocumentCreateRequest.
type ContextDocumentCreateRequest = map[string]interface{}

// ContextDocumentUploadRequest Ordinary file upload whose source Context is derived exclusively from its typed route.
type ContextDocumentUploadRequest struct {
	Content              openapi_types.File `json:"content"`
	Filename             string             `json:"filename"`
	MediaType            *string            `json:"media_type,omitempty"`
	RepresentationFormat string             `json:"representation_format"`
}

// CreatableAgentType Agent type selectable through Human-facing Agent creation APIs. AnotherMe Agents are provisioned by TeamHub for their Human, never created through these APIs.
type CreatableAgentType string

// CreateExternalConnectionReauthorizationRequest defines model for CreateExternalConnectionReauthorizationRequest.
type CreateExternalConnectionReauthorizationRequest struct {
	// DesktopCallbackUrl One-time OAuth return address on the desktop client's IPv4 loopback listener.
	DesktopCallbackUrl *ExternalConnectionDesktopCallbackURL `json:"desktop_callback_url,omitempty"`
	ExpectedRevision   int64                                 `json:"expected_revision"`
}

// CreateExternalConnectionRequest defines model for CreateExternalConnectionRequest.
type CreateExternalConnectionRequest struct {
	// AppKey Stable catalog key. TeamHub validates app availability and capabilities.
	AppKey ExternalAppKey `json:"app_key"`

	// DesktopCallbackUrl One-time OAuth return address on the desktop client's IPv4 loopback listener.
	DesktopCallbackUrl *ExternalConnectionDesktopCallbackURL `json:"desktop_callback_url,omitempty"`
}

// CreateRoomHistoryShare defines model for CreateRoomHistoryShare.
type CreateRoomHistoryShare struct {
	WebVersion *string `json:"web_version,omitempty"`
}

// CurrentIdentity defines model for CurrentIdentity.
type CurrentIdentity struct {
	Account Account `json:"account"`

	// Actors Active Human Actor identities available to this Account, one per Tenant in V0.
	Actors []Actor `json:"actors"`

	// ServerCapabilities Request fields this TeamHub accepts that earlier releases rejected, so a client newer than its server sends one only when the server lists it. A TeamHub that predates this list omits it. local_computer_enrollment_daemon_id: Local Computer enrollment accepts daemon_id.
	ServerCapabilities *[]CurrentIdentityServerCapabilities `json:"server_capabilities,omitempty"`
}

// CurrentIdentityServerCapabilities defines model for CurrentIdentity.ServerCapabilities.
type CurrentIdentityServerCapabilities string

// Cursor Opaque pagination cursor. Clients must not parse or modify it.
type Cursor = string

// DecisionAnswer defines model for DecisionAnswer.
type DecisionAnswer struct {
	// Answers Map of question id to the Human's answer; only with submit.
	Answers *map[string]DecisionAnswerValue `json:"answers,omitempty"`

	// AttachmentUploadIds Message attachment uploads a profile_setup_sources "done" answer attaches to the Human's message; same rules as message creation.
	AttachmentUploadIds *[]AttachmentUploadToken `json:"attachment_upload_ids,omitempty"`

	// Backend A backend that takes an API key saved in the product.
	Backend *WebSearchKeyBackend `json:"backend,omitempty"`

	// Comment The reason given with a denial, or a note with a question's answers.
	Comment *string `json:"comment,omitempty"`

	// ConnectionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ConnectionId *Id `json:"connection_id,omitempty"`

	// Decision approve or deny for connector_write, agent_change, runtime_permission, connection_auth and room_creation; deny or connected (recorded by TeamHub once the owner connects Chrome) for browser_connection; deny or configured (recorded by TeamHub once a Composio key is saved) for provider_key and search_key (with the backend whose key was saved); deny or granted (recorded by TeamHub once the Computer reports every permission granted) for computer_permission; submit for question; connected or skipped for profile_setup_apps; done or skipped for profile_setup_sources.
	Decision DecisionAnswerDecision `json:"decision"`

	// Links Absolute http(s) URLs a profile_setup_sources "done" answer shares; trimmed and deduplicated by TeamHub.
	Links *[]string `json:"links,omitempty"`
}

// DecisionAnswerDecision approve or deny for connector_write, agent_change, runtime_permission, connection_auth and room_creation; deny or connected (recorded by TeamHub once the owner connects Chrome) for browser_connection; deny or configured (recorded by TeamHub once a Composio key is saved) for provider_key and search_key (with the backend whose key was saved); deny or granted (recorded by TeamHub once the Computer reports every permission granted) for computer_permission; submit for question; connected or skipped for profile_setup_apps; done or skipped for profile_setup_sources.
type DecisionAnswerDecision string

// DecisionAnswerValue A radio or checkbox answer names option ids. Any other value is the Human's own written answer, which every option question accepts, so a checkbox answer holds up to 20 options and one written answer.
type DecisionAnswerValue struct {
	union json.RawMessage
}

// DecisionAnswerValue0 defines model for .
type DecisionAnswerValue0 = string

// DecisionAnswerValue1 defines model for .
type DecisionAnswerValue1 = []string

// DecisionKind profile_setup_apps and profile_setup_sources are the AnotherMe setup cards; only TeamHub opens them, never an Agent.
type DecisionKind string

// DecisionQuestion defines model for DecisionQuestion.
type DecisionQuestion struct {
	Id      string                   `json:"id"`
	Input   DecisionQuestionInput    `json:"input"`
	Options []DecisionQuestionOption `json:"options"`
	Prompt  string                   `json:"prompt"`
}

// DecisionQuestionInput defines model for DecisionQuestionInput.
type DecisionQuestionInput string

// DecisionQuestionOption defines model for DecisionQuestionOption.
type DecisionQuestionOption struct {
	Id    string `json:"id"`
	Label string `json:"label"`
}

// DecisionRequest The answer the card's kind takes, with the fields DecisionAnswer describes for it.
type DecisionRequest struct {
	Answers             *map[string]DecisionAnswerValue `json:"answers,omitempty"`
	AttachmentUploadIds *[]AttachmentUploadToken        `json:"attachment_upload_ids,omitempty"`

	// Comment A reason with deny (required for room_creation), or a note with submit.
	Comment *string `json:"comment,omitempty"`

	// ConnectionId The Connection a connection_auth approval chose; only with its approve.
	ConnectionId    *Id                     `json:"connection_id,omitempty"`
	Decision        DecisionRequestDecision `json:"decision"`
	ExpectedVersion int64                   `json:"expected_version"`
	Links           *[]string               `json:"links,omitempty"`
}

// DecisionRequestDecision defines model for DecisionRequest.Decision.
type DecisionRequestDecision string

// DecisionRequestedMessageCard A request waiting on one Human's decision. TeamHub runs what the decision approves and reports the result to the requesting Agent. Exactly the view property named by kind is present; both AnotherMe setup kinds use profile_setup.
type DecisionRequestedMessageCard struct {
	// AgentChange The view of an agent_change decision: an Agent asked to create an Agent or to change an Agent's name, description, or prompt, which requires the Sponsor to approve it.
	AgentChange *AgentChangeDecisionView `json:"agent_change,omitempty"`
	Answer      *DecisionAnswer          `json:"answer,omitempty"`

	// BrowserConnection The view of a browser_connection decision: the Local Computer whose everyday Chrome its owner is asked to connect, taken from the waiting Agent's placement. The owner's own connection answers it connected.
	BrowserConnection *BrowserConnectionDecisionView `json:"browser_connection,omitempty"`
	CardType          string                         `json:"card_type"`

	// ComputerPermission The view of a computer_permission decision: the macOS permissions one app on the owner's Local Computer needs. The card reads their live state from the Computer; once all are granted TeamHub answers it granted.
	ComputerPermission *ComputerPermissionDecisionView `json:"computer_permission,omitempty"`

	// ConnectionAuth The view of a connection_auth decision: the Connected App the Agent needs. account is the identity the Agent asked for, when it named one. connection_id is the Connection the Human chose, once they approved.
	ConnectionAuth *ConnectionAuthDecisionView `json:"connection_auth,omitempty"`

	// ConnectorWrite The view of a connector_write decision: one external write a wrapped TeamHub CLI command asked to run. TeamHub builds it from the stored call it will run after approval, so message is what will actually be sent and input is the full call.
	ConnectorWrite *ConnectorWriteDecisionView `json:"connector_write,omitempty"`

	// DecidedAt UTC timestamp in RFC 3339 format with an explicit offset.
	DecidedAt *Timestamp `json:"decided_at,omitempty"`

	// DecidedBy Human-only Room-scoped identity for card decision ownership and attribution.
	DecidedBy *MessageCardHumanActorRef `json:"decided_by,omitempty"`

	// DecisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DecisionId Id `json:"decision_id"`

	// DecisionOwner Human-only Room-scoped identity for card decision ownership and attribution.
	DecisionOwner MessageCardHumanActorRef `json:"decision_owner"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt *Timestamp `json:"expires_at,omitempty"`
	Intent    string     `json:"intent"`

	// Kind profile_setup_apps and profile_setup_sources are the AnotherMe setup cards; only TeamHub opens them, never an Agent.
	Kind DecisionKind `json:"kind"`

	// Outcome What the run returned or why it did not run, after it finished.
	Outcome *string `json:"outcome,omitempty"`

	// ProfileSetup The view of an AnotherMe setup decision. A profile_setup_apps card lists the Connected App keys it offers; a profile_setup_sources card has no fields.
	ProfileSetup *ProfileSetupDecisionView `json:"profile_setup,omitempty"`

	// ProviderKey The view of a provider_key decision: the deployment has no Composio API key, which every Connected App needs. app_key names the app the Agent wanted, when its command said. Saving a key answers it configured.
	ProviderKey *ProviderKeyDecisionView `json:"provider_key,omitempty"`

	// Question The view of a question decision: the questions an Agent, its Runtime, or a new Agent's opening asks. The card title is the question card's prompt.
	Question *QuestionDecisionView `json:"question,omitempty"`

	// Requester Room-scoped card identity. The enclosing Message already supplies Tenant authority.
	Requester MessageCardActorRef `json:"requester"`

	// RoomCreation The view of a room_creation decision: the Room TeamHub froze when the Agent asked, and once approved, the Room it created.
	RoomCreation *RoomCreationDecisionView `json:"room_creation,omitempty"`

	// RuntimePermission The view of a runtime_permission decision: a tool call that needs the sponsor's approval. title is built by rules from the call and host evidence, never by the judge model; tool and input are the full call.
	RuntimePermission *RuntimePermissionDecisionView `json:"runtime_permission,omitempty"`

	// SearchKey The view of a search_key decision: the web search backend the card shows. origin is requested when the Agent's command named it, and suggested when the command named none and nothing was usable, so TeamHub picked the first backend in its order that still needs a key. reason says why: no key is saved (missing), the provider refused the saved one (rejected), or the keyless You.com searches are used up (free_limit). The Human may add a key for any other backend instead; saving any web search key answers the card configured with that backend.
	SearchKey *SearchKeyDecisionView `json:"search_key,omitempty"`

	// Status For connector_write and agent_change, approved and executing mean TeamHub is running the approved request, and unknown means a run stopped midway and may have taken effect; TeamHub does not run it again. A question or AnotherMe setup card ends answered. An approved runtime_permission lets the Agent retry that one call until expires_at, and ends consumed once it does. An approved connection_auth is authorizing until the OAuth it started completes (succeeded), fails, or expires. A provider_key ends answered when someone saves a Composio key, denied when its Human declines. A browser_connection ends answered when its owner connects, denied when they decline. A room_creation ends succeeded with its Room created, or denied. A computer_permission ends answered once every permission it asks for is granted, denied when its owner declines. A search_key ends answered when someone saves any web search key, denied when its Human declines.
	Status DecisionStatus `json:"status"`

	// Title What the card asks; a question card's prompt.
	Title   string `json:"title"`
	Version int64  `json:"version"`
}

// DecisionStatus For connector_write and agent_change, approved and executing mean TeamHub is running the approved request, and unknown means a run stopped midway and may have taken effect; TeamHub does not run it again. A question or AnotherMe setup card ends answered. An approved runtime_permission lets the Agent retry that one call until expires_at, and ends consumed once it does. An approved connection_auth is authorizing until the OAuth it started completes (succeeded), fails, or expires. A provider_key ends answered when someone saves a Composio key, denied when its Human declines. A browser_connection ends answered when its owner connects, denied when they decline. A room_creation ends succeeded with its Room created, or denied. A computer_permission ends answered once every permission it asks for is granted, denied when its owner declines. A search_key ends answered when someone saves any web search key, denied when its Human declines.
type DecisionStatus string

// DirectRoomOpenRequest defines model for DirectRoomOpenRequest.
type DirectRoomOpenRequest struct {
	// PeerActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	PeerActorId Id `json:"peer_actor_id"`
}

// DisconnectExternalConnectionRequest defines model for DisconnectExternalConnectionRequest.
type DisconnectExternalConnectionRequest struct {
	ExpectedRevision int64 `json:"expected_revision"`
}

// DiscordChannel defines model for DiscordChannel.
type DiscordChannel struct {
	Id   string             `json:"id"`
	Kind DiscordChannelKind `json:"kind"`
	Name string             `json:"name"`
}

// DiscordChannelKind defines model for DiscordChannel.Kind.
type DiscordChannelKind string

// DiscordChannelList defines model for DiscordChannelList.
type DiscordChannelList struct {
	Channels []DiscordChannel `json:"channels"`
}

// Document defines model for Document.
type Document struct {
	AccessV2 *DocumentAccessEnvelopeV2 `json:"access_v2,omitempty"`

	// CanEditNativeContent TeamHub-projected native format and available Draft capability, independent of the current Actor's write authorization.
	CanEditNativeContent bool                        `json:"can_edit_native_content"`
	Capabilities         UnifiedDocumentCapabilities `json:"capabilities"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt       Timestamp                         `json:"created_at"`
	Creator         UnifiedDocumentActor              `json:"creator"`
	CurrentVersion  UnifiedDocumentNullableVersionRef `json:"current_version"`
	DraftCapability DocumentDraftCapability           `json:"draft_capability"`
	Format          string                            `json:"format"`
	From            []UnifiedDocumentFrom             `json:"from"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id                   Id                    `json:"id"`
	Owner                UnifiedDocumentActor  `json:"owner"`
	RepresentationFormat string                `json:"representation_format"`
	SearchMatch          *DocumentSearchMatch  `json:"search_match,omitempty"`
	Status               UnifiedDocumentStatus `json:"status"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id     `json:"tenant_id"`
	Title    string `json:"title"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentDraftCapability defines model for Document.DraftCapability.
type DocumentDraftCapability string

// DocumentAccessEnvelopeV2 defines model for DocumentAccessEnvelopeV2.
type DocumentAccessEnvelopeV2 struct {
	AuthorizationMode DocumentAuthorizationModeV2 `json:"authorization_mode"`
	ContentRole       DocumentContentRoleV2       `json:"content_role"`
	Policy            DocumentAccessPolicyV2      `json:"policy"`
	SchemaVersion     int                         `json:"schema_version"`
	Sources           []DocumentAccessSourceV2    `json:"sources"`
}

// DocumentAccessPolicyV2 defines model for DocumentAccessPolicyV2.
type DocumentAccessPolicyV2 struct {
	LinkScope     DocumentLinkScopeV2 `json:"link_scope"`
	SchemaVersion int                 `json:"schema_version"`
}

// DocumentAccessSourceKindV2 defines model for DocumentAccessSourceKindV2.
type DocumentAccessSourceKindV2 string

// DocumentAccessSourceProvenanceV2 defines model for DocumentAccessSourceProvenanceV2.
type DocumentAccessSourceProvenanceV2 struct {
	BindingKind *DocumentAccessSourceProvenanceV2BindingKind `json:"binding_kind,omitempty"`

	// ContextId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ContextId *Id `json:"context_id,omitempty"`

	// GrantorActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	GrantorActorId *Id                                  `json:"grantor_actor_id,omitempty"`
	Kind           DocumentAccessSourceProvenanceV2Kind `json:"kind"`

	// MembershipEpochId Current caller Room Membership epoch when this source contributes access.
	MembershipEpochId *Id `json:"membership_epoch_id,omitempty"`

	// MembershipMode Room membership is resolved at read time; the share does not snapshot members.
	MembershipMode *DocumentAccessSourceProvenanceV2MembershipMode `json:"membership_mode,omitempty"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId      *Id     `json:"message_id,omitempty"`
	ParentSourceId *string `json:"parent_source_id,omitempty"`
	Reason         *string `json:"reason,omitempty"`
	SchemaVersion  int     `json:"schema_version"`
}

// DocumentAccessSourceProvenanceV2BindingKind defines model for DocumentAccessSourceProvenanceV2.BindingKind.
type DocumentAccessSourceProvenanceV2BindingKind string

// DocumentAccessSourceProvenanceV2Kind defines model for DocumentAccessSourceProvenanceV2.Kind.
type DocumentAccessSourceProvenanceV2Kind string

// DocumentAccessSourceProvenanceV2MembershipMode Room membership is resolved at read time; the share does not snapshot members.
type DocumentAccessSourceProvenanceV2MembershipMode string

// DocumentAccessSourceStatusV2 defines model for DocumentAccessSourceStatusV2.
type DocumentAccessSourceStatusV2 string

// DocumentAccessSourceV2 defines model for DocumentAccessSourceV2.
type DocumentAccessSourceV2 struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// GrantorActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	GrantorActorId *Id                              `json:"grantor_actor_id,omitempty"`
	Provenance     DocumentAccessSourceProvenanceV2 `json:"provenance"`
	Reason         *string                          `json:"reason,omitempty"`
	Role           DocumentContentRoleV2            `json:"role"`
	SchemaVersion  int                              `json:"schema_version"`
	SourceId       string                           `json:"source_id"`
	SourceKind     DocumentAccessSourceKindV2       `json:"source_kind"`
	SourceVersion  int64                            `json:"source_version"`
	Status         DocumentAccessSourceStatusV2     `json:"status"`
	Target         *DocumentAccessTargetV2          `json:"target,omitempty"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentAccessTargetV2 defines model for DocumentAccessTargetV2.
type DocumentAccessTargetV2 struct {
	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id                         `json:"id"`
	Kind DocumentAccessTargetV2Kind `json:"kind"`
}

// DocumentAccessTargetV2Kind defines model for DocumentAccessTargetV2.Kind.
type DocumentAccessTargetV2Kind string

// DocumentAgentMentionCandidatePageV1 defines model for DocumentAgentMentionCandidatePageV1.
type DocumentAgentMentionCandidatePageV1 struct {
	Items []DocumentAgentMentionCandidateV1 `json:"items"`
	Page  PageMeta                          `json:"page"`
}

// DocumentAgentMentionCandidateV1 defines model for DocumentAgentMentionCandidateV1.
type DocumentAgentMentionCandidateV1 struct {
	Actor ActorRef `json:"actor"`

	// AgentManagementId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AgentManagementId Id                                 `json:"agent_management_id"`
	Relationship      DocumentAgentMentionRelationshipV1 `json:"relationship"`
}

// DocumentAgentMentionRelationshipV1 defines model for DocumentAgentMentionRelationshipV1.
type DocumentAgentMentionRelationshipV1 string

// DocumentAsset defines model for DocumentAsset.
type DocumentAsset struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id     `json:"document_id"`
	Filename   string `json:"filename"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id        Id                  `json:"id"`
	MediaType string              `json:"media_type"`
	Sha256    string              `json:"sha256"`
	SizeBytes int64               `json:"size_bytes"`
	Status    DocumentAssetStatus `json:"status"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentAssetStatus defines model for DocumentAssetStatus.
type DocumentAssetStatus string

// DocumentAssetUploadRequest defines model for DocumentAssetUploadRequest.
type DocumentAssetUploadRequest struct {
	Filename  string `json:"filename"`
	MediaType string `json:"media_type"`
	Sha256    string `json:"sha256"`
	SizeBytes int64  `json:"size_bytes"`
}

// DocumentAuthorizationModeV2 defines model for DocumentAuthorizationModeV2.
type DocumentAuthorizationModeV2 string

// DocumentComment defines model for DocumentComment.
type DocumentComment struct {
	Author ActorRef `json:"author"`
	Body   string   `json:"body"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// DeletedAt UTC timestamp in RFC 3339 format with an explicit offset.
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// ParentCommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentCommentId *Id `json:"parent_comment_id,omitempty"`
	Reactions       []struct {
		ActorIds []Id `json:"actor_ids"`

		// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
		CreatedAt Timestamp `json:"created_at"`
		Emoji     string    `json:"emoji"`
	} `json:"reactions"`
	Segments []DocumentCommentSegment `json:"segments"`

	// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ThreadId Id `json:"thread_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt     Timestamp `json:"updated_at"`
	VersionNumber int64     `json:"version_number"`
}

// DocumentCommentAnchor defines model for DocumentCommentAnchor.
type DocumentCommentAnchor struct {
	BlockId       string `json:"block_id"`
	ContextAfter  string `json:"context_after"`
	ContextBefore string `json:"context_before"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`
	CreatedBy ActorRef  `json:"created_by"`

	// DocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentVersionId *Id `json:"document_version_id,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id         Id                        `json:"id"`
	Kind       DocumentCommentAnchorKind `json:"kind"`
	QuotedText string                    `json:"quoted_text"`
}

// DocumentCommentAnchorKind defines model for DocumentCommentAnchor.Kind.
type DocumentCommentAnchorKind string

// DocumentCommentAnchorAttachmentRequest defines model for DocumentCommentAnchorAttachmentRequest.
type DocumentCommentAnchorAttachmentRequest struct {
	ExpectedFullStateFingerprint string `json:"expected_full_state_fingerprint"`
	ExpectedPersistedSeq         int64  `json:"expected_persisted_seq"`
}

// DocumentCommentAnchorAttachmentResult defines model for DocumentCommentAnchorAttachmentResult.
type DocumentCommentAnchorAttachmentResult struct {
	// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RevisionId Id                                          `json:"revision_id"`
	Status     DocumentCommentAnchorAttachmentResultStatus `json:"status"`
	Thread     DocumentCommentThread                       `json:"thread"`
}

// DocumentCommentAnchorAttachmentResultStatus defines model for DocumentCommentAnchorAttachmentResult.Status.
type DocumentCommentAnchorAttachmentResultStatus string

// DocumentCommentAnchorInput defines model for DocumentCommentAnchorInput.
type DocumentCommentAnchorInput struct {
	BlockId       string `json:"block_id"`
	ContextAfter  string `json:"context_after"`
	ContextBefore string `json:"context_before"`
	QuotedText    string `json:"quoted_text"`
}

// DocumentCommentAnchorStatus defines model for DocumentCommentAnchorStatus.
type DocumentCommentAnchorStatus string

// DocumentCommentChangedPayload defines model for DocumentCommentChangedPayload.
type DocumentCommentChangedPayload struct {
	// AttentionActorIds Humans this change mentions for the first time in the comment; each counts it as an unread mention.
	AttentionActorIds *[]Id                                   `json:"attention_actor_ids,omitempty"`
	ChangeKind        DocumentCommentChangedPayloadChangeKind `json:"change_kind"`

	// CommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CommentId *Id `json:"comment_id,omitempty"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id          `json:"document_id"`
	Kind       interface{} `json:"kind"`

	// ThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ThreadId Id `json:"thread_id"`
}

// DocumentCommentChangedPayloadChangeKind defines model for DocumentCommentChangedPayload.ChangeKind.
type DocumentCommentChangedPayloadChangeKind string

// DocumentCommentContentRequest Ordered structured content; concatenated segment content is the readable body.
type DocumentCommentContentRequest struct {
	Segments []DocumentCommentSegment `json:"segments"`
}

// DocumentCommentCurrentContextSelector Exact active Room Binding in which this Comment mutation is authored; it also admits that Room's member Agents as references.
type DocumentCommentCurrentContextSelector struct {
	BindingKind string `json:"binding_kind"`

	// ContextId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ContextId Id `json:"context_id"`
}

// DocumentCommentDurableHeadSelector Exact committed Draft head accepted by the Human before invoking an Agent.
type DocumentCommentDurableHeadSelector struct {
	PersistedSeq     int64  `json:"persisted_seq"`
	StateHash        string `json:"state_hash"`
	StateHashVersion int    `json:"state_hash_version"`
}

// DocumentCommentReferenceSegment defines model for DocumentCommentReferenceSegment.
type DocumentCommentReferenceSegment struct {
	// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ActorId Id     `json:"actor_id"`
	Content string `json:"content"`
	Type    string `json:"type"`
}

// DocumentCommentReplyCreateRequest defines model for DocumentCommentReplyCreateRequest.
type DocumentCommentReplyCreateRequest struct {
	// CurrentContext Exact active Room Binding in which this Comment mutation is authored; it also admits that Room's member Agents as references.
	CurrentContext *DocumentCommentCurrentContextSelector `json:"current_context,omitempty"`

	// DurableHead Exact committed Draft head accepted by the Human before invoking an Agent.
	DurableHead *DocumentCommentDurableHeadSelector `json:"durable_head,omitempty"`

	// ParentCommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentCommentId *Id                      `json:"parent_comment_id,omitempty"`
	Segments        []DocumentCommentSegment `json:"segments"`
}

// DocumentCommentSegment defines model for DocumentCommentSegment.
type DocumentCommentSegment struct {
	union json.RawMessage
}

// DocumentCommentTextSegment defines model for DocumentCommentTextSegment.
type DocumentCommentTextSegment struct {
	Content string `json:"content"`
	Type    string `json:"type"`
}

// DocumentCommentThread defines model for DocumentCommentThread.
type DocumentCommentThread struct {
	Anchor       DocumentCommentAnchor       `json:"anchor"`
	AnchorStatus DocumentCommentAnchorStatus `json:"anchor_status"`
	Comments     []DocumentComment           `json:"comments"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`
	CreatedBy ActorRef  `json:"created_by"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id       Id   `json:"id"`
	Resolved bool `json:"resolved"`

	// ResolvedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ResolvedAt *Timestamp `json:"resolved_at,omitempty"`
	ResolvedBy *ActorRef  `json:"resolved_by,omitempty"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentCommentThreadCreateRequest defines model for DocumentCommentThreadCreateRequest.
type DocumentCommentThreadCreateRequest struct {
	Anchor *DocumentCommentAnchorInput `json:"anchor,omitempty"`

	// CurrentContext Exact active Room Binding in which this Comment mutation is authored; it also admits that Room's member Agents as references.
	CurrentContext *DocumentCommentCurrentContextSelector `json:"current_context,omitempty"`

	// DocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentVersionId *Id `json:"document_version_id,omitempty"`

	// DurableHead Exact committed Draft head accepted by the Human before invoking an Agent.
	DurableHead *DocumentCommentDurableHeadSelector `json:"durable_head,omitempty"`

	// InitialComment Ordered structured content; concatenated segment content is the readable body.
	InitialComment DocumentCommentContentRequest `json:"initial_comment"`
	union          json.RawMessage
}

// DocumentCommentThreadCreateRequest0 defines model for .
type DocumentCommentThreadCreateRequest0 = interface{}

// DocumentCommentThreadCreateRequest1 defines model for .
type DocumentCommentThreadCreateRequest1 = interface{}

// DocumentCommentThreadPage defines model for DocumentCommentThreadPage.
type DocumentCommentThreadPage struct {
	Items []DocumentCommentThread `json:"items"`
	Page  PageMeta                `json:"page"`
}

// DocumentCommentThreadResolutionRequest Desired Thread resolution state; reopening clears resolver evidence.
type DocumentCommentThreadResolutionRequest struct {
	Resolved bool `json:"resolved"`
}

// DocumentCommentUpdateRequest defines model for DocumentCommentUpdateRequest.
type DocumentCommentUpdateRequest struct {
	// CurrentContext Exact active Room Binding in which this Comment mutation is authored; it also admits that Room's member Agents as references.
	CurrentContext *DocumentCommentCurrentContextSelector `json:"current_context,omitempty"`

	// DurableHead Exact committed Draft head accepted by the Human before invoking an Agent.
	DurableHead     *DocumentCommentDurableHeadSelector `json:"durable_head,omitempty"`
	ExpectedVersion int64                               `json:"expected_version"`
	Segments        []DocumentCommentSegment            `json:"segments"`
}

// DocumentCommentVersionRequest defines model for DocumentCommentVersionRequest.
type DocumentCommentVersionRequest struct {
	ExpectedVersion int64 `json:"expected_version"`
}

// DocumentContentRoleV2 defines model for DocumentContentRoleV2.
type DocumentContentRoleV2 string

// DocumentCreateRequest defines model for DocumentCreateRequest.
type DocumentCreateRequest struct {
	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId *Id `json:"parent_id,omitempty"`

	// RepresentationFormat User-facing representation for the native BlockNote Draft. Defaults to markdown.
	RepresentationFormat *DocumentCreateRequestRepresentationFormat `json:"representation_format,omitempty"`
}

// DocumentCreateRequestRepresentationFormat User-facing representation for the native BlockNote Draft. Defaults to markdown.
type DocumentCreateRequestRepresentationFormat string

// DocumentDirectCollaboratorCreateRequest defines model for DocumentDirectCollaboratorCreateRequest.
type DocumentDirectCollaboratorCreateRequest struct {
	Role DocumentDirectCollaboratorCreateRequestRole `json:"role"`

	// TargetActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TargetActorId Id `json:"target_actor_id"`
}

// DocumentDirectCollaboratorCreateRequestRole defines model for DocumentDirectCollaboratorCreateRequest.Role.
type DocumentDirectCollaboratorCreateRequestRole string

// DocumentDirectCollaboratorRevokeRequest defines model for DocumentDirectCollaboratorRevokeRequest.
type DocumentDirectCollaboratorRevokeRequest struct {
	ExpectedVersion int64 `json:"expected_version"`
}

// DocumentDirectCollaboratorUpdateRequest defines model for DocumentDirectCollaboratorUpdateRequest.
type DocumentDirectCollaboratorUpdateRequest struct {
	ExpectedVersion int64                                       `json:"expected_version"`
	Role            DocumentDirectCollaboratorUpdateRequestRole `json:"role"`
}

// DocumentDirectCollaboratorUpdateRequestRole defines model for DocumentDirectCollaboratorUpdateRequest.Role.
type DocumentDirectCollaboratorUpdateRequestRole string

// DocumentDraftTitleUpdateRequest defines model for DocumentDraftTitleUpdateRequest.
type DocumentDraftTitleUpdateRequest struct {
	Title string `json:"title"`
}

// DocumentDuplicateRequest defines model for DocumentDuplicateRequest.
type DocumentDuplicateRequest struct {
	// TargetFolderId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TargetFolderId *Id `json:"target_folder_id,omitempty"`
}

// DocumentFolderCreateRequest defines model for DocumentFolderCreateRequest.
type DocumentFolderCreateRequest struct {
	Name string `json:"name"`

	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId *Id `json:"parent_id,omitempty"`
}

// DocumentGeneralAccessV1 defines model for DocumentGeneralAccessV1.
type DocumentGeneralAccessV1 struct {
	// CanonicalUrl Stable Product Client URL. Reading or copying it never mutates authorization state.
	CanonicalUrl string              `json:"canonical_url"`
	Scope        DocumentLinkScopeV2 `json:"scope"`
}

// DocumentHistoryCheckpoint defines model for DocumentHistoryCheckpoint.
type DocumentHistoryCheckpoint struct {
	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId   Id                    `json:"document_id"`
	HistoryEntry *DocumentHistoryEntry `json:"history_entry,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id                 Id                              `json:"id"`
	Status             DocumentHistoryCheckpointStatus `json:"status"`
	TargetPersistedSeq int64                           `json:"target_persisted_seq"`
}

// DocumentHistoryCheckpointStatus defines model for DocumentHistoryCheckpoint.Status.
type DocumentHistoryCheckpointStatus string

// DocumentHistoryContent defines model for DocumentHistoryContent.
type DocumentHistoryContent struct {
	AssetManifest        []DocumentRevisionInputAsset `json:"asset_manifest"`
	FullStateFingerprint Sha256                       `json:"full_state_fingerprint"`
	HistoryEntry         DocumentHistoryEntry         `json:"history_entry"`
	StateBytes           DocumentStateBytes           `json:"state_bytes"`
	StateBytesSha256     Sha256                       `json:"state_bytes_sha256"`
	StateVector          StateVector                  `json:"state_vector"`
}

// DocumentHistoryEntry defines model for DocumentHistoryEntry.
type DocumentHistoryEntry struct {
	Contributors []UnifiedDocumentActor `json:"contributors"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp            `json:"created_at"`
	CreatedBy UnifiedDocumentActor `json:"created_by"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id           Id    `json:"id"`
	PersistedSeq int64 `json:"persisted_seq"`

	// RevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RevisionId Id                     `json:"revision_id"`
	Trigger    DocumentHistoryTrigger `json:"trigger"`
}

// DocumentHistoryPage defines model for DocumentHistoryPage.
type DocumentHistoryPage struct {
	Items []DocumentHistoryEntry `json:"items"`
	Page  PageMeta               `json:"page"`
}

// DocumentHistoryRestoreResult defines model for DocumentHistoryRestoreResult.
type DocumentHistoryRestoreResult struct {
	HistoryEntry DocumentHistoryEntry               `json:"history_entry"`
	Status       DocumentHistoryRestoreResultStatus `json:"status"`
}

// DocumentHistoryRestoreResultStatus defines model for DocumentHistoryRestoreResult.Status.
type DocumentHistoryRestoreResultStatus string

// DocumentHistoryTrigger defines model for DocumentHistoryTrigger.
type DocumentHistoryTrigger string

// DocumentLinkAccess defines model for DocumentLinkAccess.
type DocumentLinkAccess struct {
	DocumentId string                 `json:"document_id"`
	LinkId     string                 `json:"link_id"`
	Role       DocumentLinkAccessRole `json:"role"`
	TenantId   string                 `json:"tenant_id"`
	Version    int64                  `json:"version"`
}

// DocumentLinkAccessRole defines model for DocumentLinkAccess.Role.
type DocumentLinkAccessRole string

// DocumentLinkScopeV2 defines model for DocumentLinkScopeV2.
type DocumentLinkScopeV2 string

// DocumentLinkShare defines model for DocumentLinkShare.
type DocumentLinkShare struct {
	DocumentId string                  `json:"document_id"`
	Id         string                  `json:"id"`
	Role       DocumentLinkShareRole   `json:"role"`
	Status     DocumentLinkShareStatus `json:"status"`

	// Token Returned only on creation or reset. Never persisted as plaintext.
	Token *string `json:"token,omitempty"`

	// Url Public Web URL with the capability in its fragment; returned only with a new token.
	Url     *string `json:"url,omitempty"`
	Version int64   `json:"version"`
}

// DocumentLinkShareRole defines model for DocumentLinkShare.Role.
type DocumentLinkShareRole string

// DocumentLinkShareStatus defines model for DocumentLinkShare.Status.
type DocumentLinkShareStatus string

// DocumentManagementCapabilitiesV2 defines model for DocumentManagementCapabilitiesV2.
type DocumentManagementCapabilitiesV2 struct {
	CanChangeOwnership      bool `json:"can_change_ownership"`
	CanUpdateExternalPolicy bool `json:"can_update_external_policy"`
	CanUpdateLinkPolicy     bool `json:"can_update_link_policy"`
}

// DocumentMetadataUpdateRequest defines model for DocumentMetadataUpdateRequest.
type DocumentMetadataUpdateRequest struct {
	Title string `json:"title"`
}

// DocumentOpenResult defines model for DocumentOpenResult.
type DocumentOpenResult struct {
	CollaborationCredential *RoomDocumentCollaborationCredential `json:"collaboration_credential,omitempty"`
	CurrentVersion          *DocumentVersion                     `json:"current_version,omitempty"`
	Document                Document                             `json:"document"`
}

// DocumentPage defines model for DocumentPage.
type DocumentPage struct {
	Items []Document `json:"items"`
	Page  PageMeta   `json:"page"`
}

// DocumentPlacementDocument defines model for DocumentPlacementDocument.
type DocumentPlacementDocument struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp           `json:"created_at"`
	Document  DocumentTreeSummary `json:"document"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id       Id     `json:"id"`
	NodeKind string `json:"node_kind"`

	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId *Id    `json:"parent_id,omitempty"`
	SortKey  string `json:"sort_key"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentPlacementFolder defines model for DocumentPlacementFolder.
type DocumentPlacementFolder struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id       Id     `json:"id"`
	Name     string `json:"name"`
	NodeKind string `json:"node_kind"`

	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId *Id    `json:"parent_id,omitempty"`
	SortKey  string `json:"sort_key"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentPlacementNode defines model for DocumentPlacementNode.
type DocumentPlacementNode struct {
	union json.RawMessage
}

// DocumentPlacementUpdateRequest defines model for DocumentPlacementUpdateRequest.
type DocumentPlacementUpdateRequest struct {
	MoveToRoot *bool   `json:"move_to_root,omitempty"`
	Name       *string `json:"name,omitempty"`

	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId *Id `json:"parent_id,omitempty"`
}

// DocumentPreviewSession defines model for DocumentPreviewSession.
type DocumentPreviewSession struct {
	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt Timestamp `json:"expires_at"`

	// PreviewUrl Service-signed short-lived capability URL. Its path begins with /v0/document-previews/ and the bearer capability is returned only in this URL; clients must not construct it. The entry serves the selected Document Version; relative paths resolve at request time against the entry's current parent folder and serve each Document's current Version. It cannot be revoked before expires_at, except by the caller losing read access to the previewed Document.
	PreviewUrl string `json:"preview_url"`
}

// DocumentRevisionInputAsset defines model for DocumentRevisionInputAsset.
type DocumentRevisionInputAsset struct {
	// AssetId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AssetId   Id     `json:"asset_id"`
	Sha256    string `json:"sha256"`
	SizeBytes int64  `json:"size_bytes"`
}

// DocumentRoomBindingRemoveRequest defines model for DocumentRoomBindingRemoveRequest.
type DocumentRoomBindingRemoveRequest struct {
	ExpectedVersion int64 `json:"expected_version"`
}

// DocumentRoomBindingResultV1 defines model for DocumentRoomBindingResultV1.
type DocumentRoomBindingResultV1 struct {
	// BindingId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	BindingId Id `json:"binding_id"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id                              `json:"document_id"`
	Role       DocumentRoomBindingResultV1Role `json:"role"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId  Id                                `json:"room_id"`
	Status  DocumentRoomBindingResultV1Status `json:"status"`
	Version int64                             `json:"version"`
}

// DocumentRoomBindingResultV1Role defines model for DocumentRoomBindingResultV1.Role.
type DocumentRoomBindingResultV1Role string

// DocumentRoomBindingResultV1Status defines model for DocumentRoomBindingResultV1.Status.
type DocumentRoomBindingResultV1Status string

// DocumentSearchMatch defines model for DocumentSearchMatch.
type DocumentSearchMatch struct {
	// BodyIndexStatus Whether this Document's body text is available to keyword search.
	BodyIndexStatus DocumentSearchMatchBodyIndexStatus `json:"body_index_status"`

	// BodySnippet About 60 characters on each side of the first body match, with … marking a side where body text was cut; absent when only the title, a name or a bound source matched.
	BodySnippet *string `json:"body_snippet,omitempty"`
}

// DocumentSearchMatchBodyIndexStatus Whether this Document's body text is available to keyword search.
type DocumentSearchMatchBodyIndexStatus string

// DocumentSegment defines model for DocumentSegment.
type DocumentSegment struct {
	// Content User-visible Document label included in raw_message.
	Content string `json:"content"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// Presentation Optional presentation intent. inline preserves an in-text @Document reference; card presents a delivered Document with the shared Human/Agent Document card; canvas presents the card and asks clients viewing the Room live to open the Document in the side panel. Omitted values remain inline for historical compatibility.
	Presentation *DocumentSegmentPresentation `json:"presentation,omitempty"`
	Type         string                       `json:"type"`
}

// DocumentSegmentPresentation Optional presentation intent. inline preserves an in-text @Document reference; card presents a delivered Document with the shared Human/Agent Document card; canvas presents the card and asks clients viewing the Room live to open the Document in the side panel. Omitted values remain inline for historical compatibility.
type DocumentSegmentPresentation string

// DocumentShareSourceV2 defines model for DocumentShareSourceV2.
type DocumentShareSourceV2 struct {
	// CallerAccessState Explains whether this source currently determines or still contributes to the caller's effective role.
	CallerAccessState *DocumentShareSourceV2CallerAccessState `json:"caller_access_state,omitempty"`
	Label             string                                  `json:"label"`
	Source            DocumentAccessSourceV2                  `json:"source"`

	// SourceGroup Stable Share panel group for this provenance source.
	SourceGroup *DocumentShareSourceV2SourceGroup `json:"source_group,omitempty"`
	TargetActor *ActorRef                         `json:"target_actor,omitempty"`
}

// DocumentShareSourceV2CallerAccessState Explains whether this source currently determines or still contributes to the caller's effective role.
type DocumentShareSourceV2CallerAccessState string

// DocumentShareSourceV2SourceGroup Stable Share panel group for this provenance source.
type DocumentShareSourceV2SourceGroup string

// DocumentShareViewV2 defines model for DocumentShareViewV2.
type DocumentShareViewV2 struct {
	CallerContentRole      DocumentContentRoleV2             `json:"caller_content_role"`
	CanManageCollaborators bool                              `json:"can_manage_collaborators"`
	GeneralAccess          *DocumentGeneralAccessV1          `json:"general_access,omitempty"`
	ManagementCapabilities *DocumentManagementCapabilitiesV2 `json:"management_capabilities,omitempty"`
	SchemaVersion          int                               `json:"schema_version"`
	Sources                []DocumentShareSourceV2           `json:"sources"`
}

// DocumentStateBytes defines model for DocumentStateBytes.
type DocumentStateBytes = string

// DocumentTreeSummary defines model for DocumentTreeSummary.
type DocumentTreeSummary struct {
	// AccessSources Current actor's ordinary access provenance for Shared with me navigation; never an access source itself.
	AccessSources        *[]DocumentAccessSourceV2   `json:"access_sources,omitempty"`
	CanEditNativeContent bool                        `json:"can_edit_native_content"`
	Capabilities         UnifiedDocumentCapabilities `json:"capabilities"`
	Format               string                      `json:"format"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id                   Id                    `json:"id"`
	Owner                UnifiedDocumentActor  `json:"owner"`
	RepresentationFormat string                `json:"representation_format"`
	Status               UnifiedDocumentStatus `json:"status"`
	Title                string                `json:"title"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// DocumentUploadRequest defines model for DocumentUploadRequest.
type DocumentUploadRequest struct {
	Content   openapi_types.File `json:"content"`
	Filename  string             `json:"filename"`
	MediaType *string            `json:"media_type,omitempty"`

	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId             *Id    `json:"parent_id,omitempty"`
	RepresentationFormat string `json:"representation_format"`
}

// DocumentVersion defines model for DocumentVersion.
type DocumentVersion struct {
	// BaseVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	BaseVersionId *Id `json:"base_version_id,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp            `json:"created_at"`
	CreatedBy UnifiedDocumentActor `json:"created_by"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId            Id     `json:"document_id"`
	ExporterSchemaVersion *int   `json:"exporter_schema_version,omitempty"`
	Filename              string `json:"filename"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id                   Id     `json:"id"`
	MediaType            string `json:"media_type"`
	RepresentationFormat string `json:"representation_format"`
	Sha256               string `json:"sha256"`
	SizeBytes            int64  `json:"size_bytes"`

	// Source human_export is retained only for immutable pre-Export-Artifact history.
	Source DocumentVersionSource `json:"source"`

	// SourceInvocationId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	SourceInvocationId *Id `json:"source_invocation_id,omitempty"`

	// SourceRevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	SourceRevisionId *Id `json:"source_revision_id,omitempty"`
	VersionNumber    int `json:"version_number"`
}

// DocumentVersionSource human_export is retained only for immutable pre-Export-Artifact history.
type DocumentVersionSource string

// DocumentVersionPage defines model for DocumentVersionPage.
type DocumentVersionPage struct {
	Items []DocumentVersion `json:"items"`
	Page  PageMeta          `json:"page"`
}

// DocumentVersionUploadRequest defines model for DocumentVersionUploadRequest.
type DocumentVersionUploadRequest struct {
	Content openapi_types.File `json:"content"`

	// ExpectedCurrentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ExpectedCurrentVersionId Id     `json:"expected_current_version_id"`
	Filename                 string `json:"filename"`

	// LinkToken Optional editor capability; revalidated on every write and replay, without creating an Actor grant.
	LinkToken            *string `json:"link_token,omitempty"`
	MediaType            *string `json:"media_type,omitempty"`
	RepresentationFormat string  `json:"representation_format"`
}

// Error defines model for Error.
type Error struct {
	Code    string         `json:"code"`
	Details *[]ErrorDetail `json:"details,omitempty"`

	// Message Human-readable summary safe to display; clients branch on code, not message.
	Message   string `json:"message"`
	RequestId string `json:"request_id"`
	Retryable *bool  `json:"retryable,omitempty"`
}

// ErrorDetail defines model for ErrorDetail.
type ErrorDetail struct {
	// Code Optional stable classification for this individual validation issue.
	Code  *string `json:"code,omitempty"`
	Field string  `json:"field"`

	// LimitBytes With code too_large, the largest size the field accepts, in bytes.
	LimitBytes *int64 `json:"limit_bytes,omitempty"`
	Reason     string `json:"reason"`
}

// ErrorResponse defines model for ErrorResponse.
type ErrorResponse struct {
	Error Error `json:"error"`
}

// ExternalApp defines model for ExternalApp.
type ExternalApp struct {
	AllowsMultipleConnections bool                    `json:"allows_multiple_connections"`
	Availability              ExternalAppAvailability `json:"availability"`
	Capabilities              []ExternalAppCapability `json:"capabilities"`
	Description               string                  `json:"description"`
	DisplayName               string                  `json:"display_name"`

	// Key Stable catalog key. TeamHub validates app availability and capabilities.
	Key     ExternalAppKey `json:"key"`
	LogoUrl *string        `json:"logo_url,omitempty"`

	// SupportsReauthorization Whether account identity can be verified when replacing credentials. Otherwise create a new connection and explicitly grant Agent access again.
	SupportsReauthorization *bool `json:"supports_reauthorization,omitempty"`
}

// ExternalAppAvailability defines model for ExternalAppAvailability.
type ExternalAppAvailability string

// ExternalAppCapability defines model for ExternalAppCapability.
type ExternalAppCapability string

// ExternalAppKey Stable catalog key. TeamHub validates app availability and capabilities.
type ExternalAppKey = string

// ExternalAppList defines model for ExternalAppList.
type ExternalAppList struct {
	Apps []ExternalApp `json:"apps"`

	// ProviderConfigured Whether this deployment has an external connection provider. When false, every app is unavailable until an operator configures the provider credential.
	ProviderConfigured bool `json:"provider_configured"`

	// ProviderKey Where the Composio API key comes from. The key itself is never returned.
	ProviderKey ExternalProviderKeyStatus `json:"provider_key"`
}

// ExternalConnection defines model for ExternalConnection.
type ExternalConnection struct {
	// AutoReminders Whether AnotherMe watches this connection for things that need the Human's attention. Only apps with the proactive_reminders capability are watched.
	AutoReminders bool `json:"auto_reminders"`

	// ConnectExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ConnectExpiresAt *Timestamp `json:"connect_expires_at,omitempty"`

	// ConnectUrl Short-lived Composio Connect Link, returned while the connection is pending.
	ConnectUrl *string `json:"connect_url,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// IdentityLabel Provider identity text safe to display. Credentials and upstream IDs are never returned.
	IdentityLabel *string `json:"identity_label,omitempty"`

	// Provider Stable catalog key. TeamHub validates app availability and capabilities.
	Provider ExternalAppKey `json:"provider"`

	// ReauthorizationConnectExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ReauthorizationConnectExpiresAt *Timestamp `json:"reauthorization_connect_expires_at,omitempty"`

	// ReauthorizationConnectUrl Short-lived Composio Connect Link of the reauthorization in progress.
	ReauthorizationConnectUrl *string `json:"reauthorization_connect_url,omitempty"`

	// ReauthorizationErrorCode How the last reauthorization failed, cleared when another starts or one succeeds.
	ReauthorizationErrorCode *ExternalConnectionReauthorizationErrorCode `json:"reauthorization_error_code,omitempty"`

	// Reauthorizing Whether a reauthorization is in progress; absent means none.
	Reauthorizing *bool                    `json:"reauthorizing,omitempty"`
	Revision      int64                    `json:"revision"`
	Status        ExternalConnectionStatus `json:"status"`

	// StatusCheckRequestedAt UTC timestamp in RFC 3339 format with an explicit offset.
	StatusCheckRequestedAt *Timestamp `json:"status_check_requested_at,omitempty"`

	// StatusCheckedAt UTC timestamp in RFC 3339 format with an explicit offset.
	StatusCheckedAt *Timestamp `json:"status_checked_at,omitempty"`
	StatusErrorCode *string    `json:"status_error_code,omitempty"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// ExternalConnectionReauthorizationErrorCode How the last reauthorization failed, cleared when another starts or one succeeds.
type ExternalConnectionReauthorizationErrorCode string

// ExternalConnectionAgentAccess defines model for ExternalConnectionAgentAccess.
type ExternalConnectionAgentAccess struct {
	// AgentActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AgentActorId      Id     `json:"agent_actor_id"`
	AgentDisplayName  string `json:"agent_display_name"`
	AgentManagementId string `json:"agent_management_id"`
	Granted           bool   `json:"granted"`
	Revision          int64  `json:"revision"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`
}

// ExternalConnectionAgentAccessList defines model for ExternalConnectionAgentAccessList.
type ExternalConnectionAgentAccessList struct {
	Agents []ExternalConnectionAgentAccess `json:"agents"`
}

// ExternalConnectionDesktopCallbackURL One-time OAuth return address on the desktop client's IPv4 loopback listener.
type ExternalConnectionDesktopCallbackURL = string

// ExternalConnectionList defines model for ExternalConnectionList.
type ExternalConnectionList struct {
	Connections []ExternalConnection `json:"connections"`
}

// ExternalConnectionStatus defines model for ExternalConnectionStatus.
type ExternalConnectionStatus string

// ExternalConnectionStatusCheckRequest defines model for ExternalConnectionStatusCheckRequest.
type ExternalConnectionStatusCheckRequest struct {
	ExpectedRevision int64 `json:"expected_revision"`
}

// ExternalProviderKeyStatus Where the Composio API key comes from. The key itself is never returned.
type ExternalProviderKeyStatus struct {
	// CanSave Whether a key can be saved in the product. False when COMPOSIO_API_KEY is set or TEAMHUB_SECRET_ENCRYPTION_KEY is missing.
	CanSave bool `json:"can_save"`

	// Source environment is COMPOSIO_API_KEY and always wins; stored was saved in the product.
	Source ExternalProviderKeyStatusSource `json:"source"`
}

// ExternalProviderKeyStatusSource environment is COMPOSIO_API_KEY and always wins; stored was saved in the product.
type ExternalProviderKeyStatusSource string

// FileSegment Legacy immutable attachment reference retained for historical Messages.
type FileSegment struct {
	Content string `json:"content"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// DocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentVersionId Id `json:"document_version_id"`

	// Filename Canonical filename of the immutable Version, supplied by TeamHub.
	Filename *string `json:"filename,omitempty"`

	// MediaType Canonical media type of the immutable Version, supplied by TeamHub.
	MediaType *string `json:"media_type,omitempty"`
	Type      string  `json:"type"`
}

// GitHubRepository defines model for GitHubRepository.
type GitHubRepository struct {
	DefaultBranch string `json:"default_branch"`
	Description   string `json:"description"`
	FullName      string `json:"full_name"`
	HtmlUrl       string `json:"html_url"`
	Id            string `json:"id"`
	Language      string `json:"language"`
	Name          string `json:"name"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// GitHubRepositoryPage defines model for GitHubRepositoryPage.
type GitHubRepositoryPage struct {
	NextCursor   *string            `json:"next_cursor,omitempty"`
	Repositories []GitHubRepository `json:"repositories"`
}

// GoogleCalendar defines model for GoogleCalendar.
type GoogleCalendar struct {
	AccessRole GoogleCalendarAccessRole `json:"access_role"`
	Id         string                   `json:"id"`
	Primary    bool                     `json:"primary"`
	Selected   bool                     `json:"selected"`
	Summary    string                   `json:"summary"`
	TimeZone   *string                  `json:"time_zone,omitempty"`
}

// GoogleCalendarAccessRole defines model for GoogleCalendar.AccessRole.
type GoogleCalendarAccessRole string

// GoogleCalendarPage defines model for GoogleCalendarPage.
type GoogleCalendarPage struct {
	Calendars     []GoogleCalendar `json:"calendars"`
	NextPageToken *string          `json:"next_page_token,omitempty"`
}

// HtmlFragmentSegment defines model for HtmlFragmentSegment.
type HtmlFragmentSegment struct {
	// Content Raw-message text for the inline widget. show_fragment uses the exact flat, content-addressed Documents path of its projected HTML file; this is not widget markup.
	Content string `json:"content"`

	// Html Widget HTML or SVG markup inlined by show_fragment. This is message content, not a published Document. Ordinary delivered Documents use presentation=card.
	Html string `json:"html"`
	Type string `json:"type"`
}

// HumanRoomCreateRequest The creator is the Room's owner and only member; others are added afterwards.
type HumanRoomCreateRequest struct {
	Description *string `json:"description,omitempty"`
	Name        string  `json:"name"`
}

// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type Id = string

// IdempotencyKey Client-generated key scoped to the authenticated principal and operation.
type IdempotencyKey = string

// LatestMessageSummary defines model for LatestMessageSummary.
type LatestMessageSummary struct {
	Author ActorRef `json:"author"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id         Id     `json:"id"`
	RawMessage string `json:"raw_message"`

	// RoomSeq Monotonically increasing sequence allocated within one Room.
	RoomSeq RoomSeq `json:"room_seq"`
}

// LocalAgentRuntimeStatus defines model for LocalAgentRuntimeStatus.
type LocalAgentRuntimeStatus struct {
	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId     Id                                    `json:"computer_id"`
	ComputerStatus LocalAgentRuntimeStatusComputerStatus `json:"computer_status"`

	// ConnectionStatus Freshness of the persisted connection observation, independent of the last Runtime diagnostic.
	ConnectionStatus *LocalAgentRuntimeStatusConnectionStatus `json:"connection_status,omitempty"`
	DisplayName      string                                   `json:"display_name"`
	ErrorCode        *LocalRuntimeDiagnosticErrorCode         `json:"error_code,omitempty"`
	Message          *string                                  `json:"message,omitempty"`

	// ObservedAt Time of the last persisted Computer connection observation, including heartbeats and disconnects; not a live execution check.
	ObservedAt  *time.Time                   `json:"observed_at,omitempty"`
	RuntimeType LocalRuntimeType             `json:"runtime_type"`
	Status      LocalRuntimeDiagnosticStatus `json:"status"`
	Version     *string                      `json:"version,omitempty"`
}

// LocalAgentRuntimeStatusComputerStatus defines model for LocalAgentRuntimeStatus.ComputerStatus.
type LocalAgentRuntimeStatusComputerStatus string

// LocalAgentRuntimeStatusConnectionStatus Freshness of the persisted connection observation, independent of the last Runtime diagnostic.
type LocalAgentRuntimeStatusConnectionStatus string

// LocalComputer defines model for LocalComputer.
type LocalComputer struct {
	// ActiveOperations Active Operations the Computer reported at its last heartbeat; 0 while it is offline.
	ActiveOperations int `json:"active_operations"`

	// AvailableCapacity Currently available active Operation slots. Present only when capacity is configured.
	AvailableCapacity *int `json:"available_capacity,omitempty"`

	// Capacity Optional maximum simultaneous active Operations on this Computer. Omission means unlimited; it does not limit bound Agents.
	Capacity *int `json:"capacity,omitempty"`

	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id `json:"computer_id"`

	// DaemonVersion Release version the Computer reported when it last connected.
	DaemonVersion *string `json:"daemon_version,omitempty"`
	DisplayName   string  `json:"display_name"`

	// LastSeenAt UTC timestamp in RFC 3339 format with an explicit offset.
	LastSeenAt *Timestamp `json:"last_seen_at,omitempty"`

	// Platform Last native host platform reported by this Computer. Omission preserves an existing observation; unknown legacy Computers omit this field.
	Platform *LocalComputerPlatform `json:"platform,omitempty"`

	// RecommendedVersion Recommended Computer release. This is advisory and does not prevent legacy execution.
	RecommendedVersion *string `json:"recommended_version,omitempty"`

	// Runtimes Runtimes and models as the Computer last reported them, kept while it is offline so an Agent can be placed there.
	Runtimes []LocalComputerRuntime `json:"runtimes"`
	Status   LocalComputerStatus    `json:"status"`

	// UpgradeRequired The enrolled Computer is incompatible with the current Runner Gateway and must be upgraded in place.
	UpgradeRequired bool                          `json:"upgrade_required"`
	WorkspaceGrants []LocalComputerWorkspaceGrant `json:"workspace_grants"`
}

// LocalComputerPlatform Last native host platform reported by this Computer. Omission preserves an existing observation; unknown legacy Computers omit this field.
type LocalComputerPlatform string

// LocalComputerStatus defines model for LocalComputer.Status.
type LocalComputerStatus string

// LocalComputerCredentialBundle defines model for LocalComputerCredentialBundle.
type LocalComputerCredentialBundle struct {
	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id `json:"computer_id"`

	// CredentialExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	CredentialExpiresAt Timestamp `json:"credential_expires_at"`
	GatewayToken        *string   `json:"gateway_token,omitempty"`
	GatewayUrl          string    `json:"gateway_url"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`
}

// LocalComputerEnrollmentAuthorization defines model for LocalComputerEnrollmentAuthorization.
type LocalComputerEnrollmentAuthorization struct {
	AuthorizationCode *string `json:"authorization_code,omitempty"`

	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id `json:"computer_id"`

	// EnrollmentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	EnrollmentId Id `json:"enrollment_id"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt Timestamp `json:"expires_at"`
}

// LocalComputerEnrollmentCreateRequest defines model for LocalComputerEnrollmentCreateRequest.
type LocalComputerEnrollmentCreateRequest struct {
	CodeChallenge string `json:"code_challenge"`

	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId *Id `json:"computer_id,omitempty"`

	// DaemonId SHA-256 of the local Daemon Ed25519 public key in base64url. When supplied, TeamHub renews a live Computer already bound to this Daemon Identity for the same owner and rejects claims by another owner with 409 DAEMON_IDENTITY_IN_USE.
	DaemonId    *string `json:"daemon_id,omitempty"`
	DisplayName string  `json:"display_name"`
	RedirectUri string  `json:"redirect_uri"`
}

// LocalComputerEnrollmentExchangeRequest defines model for LocalComputerEnrollmentExchangeRequest.
type LocalComputerEnrollmentExchangeRequest struct {
	AuthorizationCode *string `json:"authorization_code,omitempty"`
	CodeVerifier      *string `json:"code_verifier,omitempty"`
	RedirectUri       string  `json:"redirect_uri"`
}

// LocalComputerPage defines model for LocalComputerPage.
type LocalComputerPage struct {
	Items []LocalComputer `json:"items"`
}

// LocalComputerRuntime defines model for LocalComputerRuntime.
type LocalComputerRuntime struct {
	ErrorCode *LocalRuntimeDiagnosticErrorCode `json:"error_code,omitempty"`
	Message   *string                          `json:"message,omitempty"`
	Models    []AgentModel                     `json:"models"`
	Status    LocalRuntimeDiagnosticStatus     `json:"status"`
	Type      LocalRuntimeType                 `json:"type"`

	// Version Observed diagnostic value; never a compatibility gate.
	Version *string `json:"version,omitempty"`
}

// LocalComputerWorkspaceGrant defines model for LocalComputerWorkspaceGrant.
type LocalComputerWorkspaceGrant struct {
	// GrantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	GrantId Id                              `json:"grant_id"`
	Label   string                          `json:"label"`
	Mode    LocalComputerWorkspaceGrantMode `json:"mode"`
}

// LocalComputerWorkspaceGrantMode defines model for LocalComputerWorkspaceGrant.Mode.
type LocalComputerWorkspaceGrantMode string

// LocalIdentityChallenge defines model for LocalIdentityChallenge.
type LocalIdentityChallenge struct {
	// Nonce 32 fresh random bytes in unpadded base64url.
	Nonce string `json:"nonce"`
}

// LocalIdentityProof defines model for LocalIdentityProof.
type LocalIdentityProof struct {
	// Proof Unpadded base64url HMAC-SHA256 of the challenge.
	Proof string `json:"proof"`
}

// LocalModel One validated chat model of the catalog on this platform and its state on this Computer. Sizes are bytes; readers format them.
type LocalModel struct {
	// ActiveParameters Parameters active per token on an moe model, such as 3B.
	ActiveParameters *string `json:"active_parameters,omitempty"`

	// Architecture Weight activation topology: dense activates all parameters per token; moe activates a subset.
	Architecture *LocalModelArchitecture `json:"architecture,omitempty"`
	Availability LocalModelAvailability  `json:"availability"`

	// Capabilities Capabilities verified by localmodels on this platform.
	Capabilities  *[]LocalModelCapability     `json:"capabilities,omitempty"`
	ContextTokens int64                       `json:"context_tokens"`
	Description   string                      `json:"description"`
	Download      *LocalModelDownloadProgress `json:"download,omitempty"`
	DownloadBytes int64                       `json:"download_bytes"`
	Endpoint      *LocalModelEndpoint         `json:"endpoint,omitempty"`
	Error         *LocalModelError            `json:"error,omitempty"`

	// Family Model family for brand presentation; never inferred from name.
	Family *LocalModelFamily `json:"family,omitempty"`

	// Fit Where the model can live, judged on total capacity so it stays stable across loads. system means localmodels can run it from RAM, slower.
	Fit LocalModelFit `json:"fit"`

	// Id Stable localmodels library id: catalog id and variant, such as qwen3-4b:Q4_K_M.
	Id LocalModelId `json:"id"`

	// License SPDX identifier or license name, such as Apache-2.0 or Gemma Terms of Use.
	License *string `json:"license,omitempty"`

	// MemoryBytes Footprint when loaded at its context policy, from the localmodels estimator.
	MemoryBytes int64           `json:"memory_bytes"`
	Name        string          `json:"name"`
	Note        *LocalModelNote `json:"note,omitempty"`

	// Parameters Total parameter scale for display, such as 30B or 4B.
	Parameters *string `json:"parameters,omitempty"`

	// PiModel The runtime_model an Agent on runtime pi stores for this model, <pi provider>/<pi model id>; present while the model is on the Computer.
	PiModel *string `json:"pi_model,omitempty"`

	// Pool A place a model can live: gpu:<index>, system (RAM beside GPUs), or unified (RAM of a host without discrete GPUs).
	Pool *LocalModelPoolId `json:"pool,omitempty"`

	// PromptTokensPerSecond Warm prompt-processing speed in tokens/s measured at the last load; absent when unknown.
	PromptTokensPerSecond *float32 `json:"prompt_tokens_per_second,omitempty"`

	// Publisher Organization or author that published the weights.
	Publisher *string `json:"publisher,omitempty"`
	Quant     string  `json:"quant"`

	// Recommended True on at most one model, an absent downloadable one.
	Recommended bool `json:"recommended"`

	// SourceUrl HTTPS model card or repository URL.
	SourceUrl *string `json:"source_url,omitempty"`

	// State absent: not on disk. idle: on disk, holding no memory. loading reserves its memory before it finishes; loaded is registered with the local gateway and Pi.
	State LocalModelState `json:"state"`

	// TokensPerSecond Warm speed measured at the last load; absent when unknown.
	TokensPerSecond *float32 `json:"tokens_per_second,omitempty"`
	Vision          bool     `json:"vision"`
}

// LocalModelActionAccepted defines model for LocalModelActionAccepted.
type LocalModelActionAccepted struct {
	Action LocalModelActionAcceptedAction `json:"action"`

	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id `json:"computer_id"`

	// ModelId Stable localmodels library id: catalog id and variant, such as qwen3-4b:Q4_K_M.
	ModelId LocalModelId `json:"model_id"`
}

// LocalModelActionAcceptedAction defines model for LocalModelActionAccepted.Action.
type LocalModelActionAcceptedAction string

// LocalModelActionRequest A Human's action on one model. The click is the approval; there is no separate confirm step on the Computer. unload_first only with load.
type LocalModelActionRequest struct {
	Action LocalModelActionRequestAction `json:"action"`

	// UnloadFirst Loaded models in the same pool to unload before the load starts.
	UnloadFirst *[]LocalModelId `json:"unload_first,omitempty"`
}

// LocalModelActionRequestAction defines model for LocalModelActionRequest.Action.
type LocalModelActionRequestAction string

// LocalModelArchitecture Weight activation topology: dense activates all parameters per token; moe activates a subset.
type LocalModelArchitecture string

// LocalModelAvailability defines model for LocalModelAvailability.
type LocalModelAvailability struct {
	Downloadable bool                          `json:"downloadable"`
	Reason       *LocalModelAvailabilityReason `json:"reason,omitempty"`
}

// LocalModelAvailabilityReason defines model for LocalModelAvailabilityReason.
type LocalModelAvailabilityReason struct {
	Code      LocalModelAvailabilityReasonCode `json:"code"`
	HaveBytes *int64                           `json:"have_bytes,omitempty"`
	NeedBytes *int64                           `json:"need_bytes,omitempty"`
}

// LocalModelAvailabilityReasonCode defines model for LocalModelAvailabilityReason.Code.
type LocalModelAvailabilityReasonCode string

// LocalModelCapability Model capability verified by localmodels on this platform.
type LocalModelCapability string

// LocalModelDownloadProgress defines model for LocalModelDownloadProgress.
type LocalModelDownloadProgress struct {
	BytesPerSecond *int64                         `json:"bytes_per_second,omitempty"`
	DoneBytes      int64                          `json:"done_bytes"`
	Step           LocalModelDownloadProgressStep `json:"step"`
	TotalBytes     int64                          `json:"total_bytes"`
}

// LocalModelDownloadProgressStep defines model for LocalModelDownloadProgress.Step.
type LocalModelDownloadProgressStep string

// LocalModelEndpoint defines model for LocalModelEndpoint.
type LocalModelEndpoint struct {
	BaseUrl string `json:"base_url"`
}

// LocalModelError defines model for LocalModelError.
type LocalModelError struct {
	// Cause Why a GATEWAY_REGISTRATION_FAILED happened, when the Computer supervised the failed job. GATEWAY_HOME_NOT_PRIVATE: the local gateway's private folder at path has another owner; closing Linger and renaming that folder lets the model load.
	Cause *LocalModelErrorCause `json:"cause,omitempty"`

	// Code Closed localmodels library error set. It is extended only together with the localmodels library contract.
	Code LocalModelErrorCode `json:"code"`

	// Detail Diagnostic text for display; never matched on.
	Detail *string `json:"detail,omitempty"`

	// Path The folder the cause names, on the Computer. The public view carries it only for the Computer's owner.
	Path *string `json:"path,omitempty"`
}

// LocalModelErrorCause Why a GATEWAY_REGISTRATION_FAILED happened, when the Computer supervised the failed job. GATEWAY_HOME_NOT_PRIVATE: the local gateway's private folder at path has another owner; closing Linger and renaming that folder lets the model load.
type LocalModelErrorCause string

// LocalModelErrorCode Closed localmodels library error set. It is extended only together with the localmodels library contract.
type LocalModelErrorCode string

// LocalModelFamily Model family for brand presentation; never inferred from name.
type LocalModelFamily string

// LocalModelFit Where the model can live, judged on total capacity so it stays stable across loads. system means localmodels can run it from RAM, slower.
type LocalModelFit string

// LocalModelGpu defines model for LocalModelGpu.
type LocalModelGpu struct {
	FreeBytes  int64   `json:"free_bytes"`
	Index      int     `json:"index"`
	Name       string  `json:"name"`
	TotalBytes int64   `json:"total_bytes"`
	Uuid       *string `json:"uuid,omitempty"`
}

// LocalModelHost Hardware and software of the Computer as localmodels reports it.
type LocalModelHost struct {
	Arch          LocalModelHostArch `json:"arch"`
	DiskFreeBytes int64              `json:"disk_free_bytes"`

	// EngineLabel Display only, such as llama.cpp b11370 with CUDA.
	EngineLabel string          `json:"engine_label"`
	Gpus        []LocalModelGpu `json:"gpus"`

	// OsLabel Display only, such as Ubuntu 24.04.
	OsLabel       string                 `json:"os_label"`
	Platform      LocalModelHostPlatform `json:"platform"`
	RamTotalBytes int64                  `json:"ram_total_bytes"`
}

// LocalModelHostArch defines model for LocalModelHost.Arch.
type LocalModelHostArch string

// LocalModelHostPlatform defines model for LocalModelHost.Platform.
type LocalModelHostPlatform string

// LocalModelId Stable localmodels library id: catalog id and variant, such as qwen3-4b:Q4_K_M.
type LocalModelId = string

// LocalModelNote defines model for LocalModelNote.
type LocalModelNote struct {
	Code LocalModelNoteCode `json:"code"`
}

// LocalModelNoteCode defines model for LocalModelNote.Code.
type LocalModelNoteCode string

// LocalModelPool One place models load into. The system and unified budgets are 80% of RAM, as localmodels computes them.
type LocalModelPool struct {
	// GpuIndex Present only for kind gpu; matches LocalModelGpu.index.
	GpuIndex *int                   `json:"gpu_index,omitempty"`
	Holders  []LocalModelPoolHolder `json:"holders"`

	// Id A place a model can live: gpu:<index>, system (RAM beside GPUs), or unified (RAM of a host without discrete GPUs).
	Id         LocalModelPoolId   `json:"id"`
	Kind       LocalModelPoolKind `json:"kind"`
	TotalBytes int64              `json:"total_bytes"`
	UsedBytes  int64              `json:"used_bytes"`
}

// LocalModelPoolKind defines model for LocalModelPool.Kind.
type LocalModelPoolKind string

// LocalModelPoolHolder Something holding pool memory. A component is a foundation service such as an embedding, reranker, or speech model; it is never a model row.
type LocalModelPoolHolder struct {
	Bytes int64                    `json:"bytes"`
	Id    string                   `json:"id"`
	Kind  LocalModelPoolHolderKind `json:"kind"`
	Name  string                   `json:"name"`
}

// LocalModelPoolHolderKind defines model for LocalModelPoolHolder.Kind.
type LocalModelPoolHolderKind string

// LocalModelPoolId A place a model can live: gpu:<index>, system (RAM beside GPUs), or unified (RAM of a host without discrete GPUs).
type LocalModelPoolId = string

// LocalModelState absent: not on disk. idle: on disk, holding no memory. loading reserves its memory before it finishes; loaded is registered with the local gateway and Pi.
type LocalModelState string

// LocalModelUser An Agent whose runtime model is this model on this Computer.
type LocalModelUser struct {
	// AgentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AgentId Id     `json:"agent_id"`
	Name    string `json:"name"`
}

// LocalModelView defines model for LocalModelView.
type LocalModelView struct {
	// Model One validated chat model of the catalog on this platform and its state on this Computer. Sizes are bytes; readers format them.
	Model LocalModel `json:"model"`

	// UsedBy Active Agents placed on this Computer with runtime pi whose runtime model is this model's gateway model.
	UsedBy []LocalModelUser `json:"used_by"`
}

// LocalModelsComputer defines model for LocalModelsComputer.
type LocalModelsComputer struct {
	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId  Id     `json:"computer_id"`
	DisplayName string `json:"display_name"`

	// Host Hardware and software of the Computer as localmodels reports it.
	Host *LocalModelHost `json:"host,omitempty"`

	// LastSeenAt UTC timestamp in RFC 3339 format with an explicit offset.
	LastSeenAt *Timestamp                `json:"last_seen_at,omitempty"`
	Status     LocalModelsComputerStatus `json:"status"`
}

// LocalModelsComputerStatus defines model for LocalModelsComputer.Status.
type LocalModelsComputerStatus string

// LocalModelsError The common error body with error.code narrowed to LocalModelsErrorCode.
type LocalModelsError struct {
	// Code error.code of a refused local-models action (403, 409, 502, 503, 504); 400, 401, and 404 use the common codes. LOCAL_COMPUTER_OFFLINE: the Computer is not connected. LOCAL_MODEL_ACTION_FORBIDDEN: the viewer is not the Computer owner. LOCAL_MODELS_UNAVAILABLE: the Computer has no usable localmodels tool. LOCAL_MODEL_ACTION_FAILED: the Computer refused with a library error that has no code of its own here (502). LOCAL_MODELS_SERVICE_UNAVAILABLE: Agent Service could not be reached (503). LOCAL_MODEL_ACTION_UNCONFIRMED: the connected Computer had not decided by the action's deadline; it may still run the action, and the library snapshots show the outcome (504). The other LOCAL_MODEL_ codes are the Computer's refusal codes of the same name (409).
	Code    LocalModelsErrorCode `json:"code"`
	Details *[]ErrorDetail       `json:"details,omitempty"`

	// Message Human-readable summary safe to display; clients branch on code, not message.
	Message   string `json:"message"`
	RequestId string `json:"request_id"`
	Retryable *bool  `json:"retryable,omitempty"`
}

// LocalModelsErrorCode error.code of a refused local-models action (403, 409, 502, 503, 504); 400, 401, and 404 use the common codes. LOCAL_COMPUTER_OFFLINE: the Computer is not connected. LOCAL_MODEL_ACTION_FORBIDDEN: the viewer is not the Computer owner. LOCAL_MODELS_UNAVAILABLE: the Computer has no usable localmodels tool. LOCAL_MODEL_ACTION_FAILED: the Computer refused with a library error that has no code of its own here (502). LOCAL_MODELS_SERVICE_UNAVAILABLE: Agent Service could not be reached (503). LOCAL_MODEL_ACTION_UNCONFIRMED: the connected Computer had not decided by the action's deadline; it may still run the action, and the library snapshots show the outcome (504). The other LOCAL_MODEL_ codes are the Computer's refusal codes of the same name (409).
type LocalModelsErrorCode string

// LocalModelsErrorResponse defines model for LocalModelsErrorResponse.
type LocalModelsErrorResponse struct {
	// Error The common error body with error.code narrowed to LocalModelsErrorCode.
	Error LocalModelsError `json:"error"`
}

// LocalModelsRefreshAccepted defines model for LocalModelsRefreshAccepted.
type LocalModelsRefreshAccepted struct {
	Action LocalModelsRefreshAcceptedAction `json:"action"`

	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id `json:"computer_id"`
}

// LocalModelsRefreshAcceptedAction defines model for LocalModelsRefreshAccepted.Action.
type LocalModelsRefreshAcceptedAction string

// LocalModelsView One Computer's model library as last reported. Only the Computer owner can act (viewer_is_owner); other Tenant members who can see the Computer read it.
type LocalModelsView struct {
	Available bool                `json:"available"`
	Computer  LocalModelsComputer `json:"computer"`
	Models    []LocalModelView    `json:"models"`

	// ObservedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ObservedAt    *Timestamp                        `json:"observed_at,omitempty"`
	Pools         []LocalModelPool                  `json:"pools"`
	Reason        *LocalModelsViewUnavailableReason `json:"reason,omitempty"`
	ToolVersion   *string                           `json:"tool_version,omitempty"`
	ViewerIsOwner bool                              `json:"viewer_is_owner"`
}

// LocalModelsViewUnavailableReason defines model for LocalModelsViewUnavailableReason.
type LocalModelsViewUnavailableReason struct {
	// Code NOT_REPORTED: the Computer never sent a snapshot. Otherwise the reason from its last snapshot.
	Code LocalModelsViewUnavailableReasonCode `json:"code"`

	// Detail Diagnostic text for display; never matched on.
	Detail *string `json:"detail,omitempty"`
}

// LocalModelsViewUnavailableReasonCode NOT_REPORTED: the Computer never sent a snapshot. Otherwise the reason from its last snapshot.
type LocalModelsViewUnavailableReasonCode string

// LocalRuntimeDiagnosticErrorCode defines model for LocalRuntimeDiagnosticErrorCode.
type LocalRuntimeDiagnosticErrorCode string

// LocalRuntimeDiagnosticStatus defines model for LocalRuntimeDiagnosticStatus.
type LocalRuntimeDiagnosticStatus string

// LocalRuntimeType defines model for LocalRuntimeType.
type LocalRuntimeType string

// LocalSkillCandidate defines model for LocalSkillCandidate.
type LocalSkillCandidate struct {
	// CandidateRef Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CandidateRef    Id                               `json:"candidate_ref"`
	Description     string                           `json:"description"`
	ErrorCode       *string                          `json:"error_code,omitempty"`
	ErrorDetail     *string                          `json:"error_detail,omitempty"`
	FileCount       int                              `json:"file_count"`
	Importability   LocalSkillCandidateImportability `json:"importability"`
	ManifestExcerpt *string                          `json:"manifest_excerpt,omitempty"`
	Name            string                           `json:"name"`
	NativeEnabled   *bool                            `json:"native_enabled,omitempty"`
	NativeSource    *string                          `json:"native_source,omitempty"`
	Normalizations  []string                         `json:"normalizations"`
	PackageSha256   string                           `json:"package_sha256"`
	RiskFlags       []string                         `json:"risk_flags"`
	SizeBytes       int64                            `json:"size_bytes"`
}

// LocalSkillCandidateImportability defines model for LocalSkillCandidate.Importability.
type LocalSkillCandidateImportability string

// LocalSkillScan defines model for LocalSkillScan.
type LocalSkillScan struct {
	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id `json:"computer_id"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt   Timestamp                 `json:"expires_at"`
	Items       []LocalSkillCandidate     `json:"items"`
	RuntimeType LocalSkillScanRuntimeType `json:"runtime_type"`

	// ScanId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ScanId Id `json:"scan_id"`
}

// LocalSkillScanRuntimeType defines model for LocalSkillScan.RuntimeType.
type LocalSkillScanRuntimeType string

// LocalSkillScanRequest defines model for LocalSkillScanRequest.
type LocalSkillScanRequest struct {
	RuntimeType LocalSkillScanRequestRuntimeType `json:"runtime_type"`
}

// LocalSkillScanRequestRuntimeType defines model for LocalSkillScanRequest.RuntimeType.
type LocalSkillScanRequestRuntimeType string

// LoginRequest defines model for LoginRequest.
type LoginRequest struct {
	// Identifier The Account's email address, matched case-insensitively.
	Identifier string  `json:"identifier"`
	Password   *string `json:"password,omitempty"`
}

// MailCanvasState defines model for MailCanvasState.
type MailCanvasState struct {
	// CanEdit Whether the caller may send or decline this email.
	CanEdit   bool    `json:"can_edit"`
	Error     *string `json:"error,omitempty"`
	MessageId *string `json:"message_id,omitempty"`

	// SourceDigest Fingerprint of the saved email; Send must echo it so only the reviewed version goes out.
	SourceDigest string                `json:"source_digest"`
	Status       MailCanvasStateStatus `json:"status"`
	Subject      string                `json:"subject"`
	To           string                `json:"to"`
}

// MailCanvasStateStatus defines model for MailCanvasState.Status.
type MailCanvasStateStatus string

// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
type ManifestVersion = string

// MeetingFiles defines model for MeetingFiles.
type MeetingFiles struct {
	CaptureId           string    `json:"capture_id"`
	RecordingDocumentId string    `json:"recording_document_id"`
	RecordingFilename   string    `json:"recording_filename"`
	RecordingVersionId  string    `json:"recording_version_id"`
	StartedAt           time.Time `json:"started_at"`

	// SummaryPath Reader-facing Markdown path under timeline/meetings in the personal memory tree.
	SummaryPath          *string `json:"summary_path,omitempty"`
	SummaryReady         bool    `json:"summary_ready"`
	TranscriptDocumentId string  `json:"transcript_document_id"`
	TranscriptVersionId  string  `json:"transcript_version_id"`
}

// MeetingNotesSegment A finished recording's quick notes, which TeamHub writes from its transcript after posting the recording and transcript. Clients read them from the Capture's quick_notes. Only TeamHub creates it.
type MeetingNotesSegment struct {
	// CaptureId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CaptureId Id `json:"capture_id"`

	// Content User-visible label included in raw_message.
	Content string `json:"content"`
	Type    string `json:"type"`
}

// MemberAddedNotice The Message author added this Human or Agent to the Room.
type MemberAddedNotice struct {
	Member ActorRef `json:"member"`
	Type   string   `json:"type"`
}

// MemoryEntry defines model for MemoryEntry.
type MemoryEntry struct {
	Content string              `json:"content"`
	Date    *openapi_types.Date `json:"date,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id      Id              `json:"id"`
	Kind    MemoryEntryKind `json:"kind"`
	Meeting *MeetingFiles   `json:"meeting,omitempty"`
	Path    string          `json:"path"`
	Summary string          `json:"summary"`
	Title   string          `json:"title"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// MemoryEntryKind defines model for MemoryEntryKind.
type MemoryEntryKind string

// MemoryEntryListItem defines model for MemoryEntryListItem.
type MemoryEntryListItem = MemoryEntry

// MemoryEntryPage defines model for MemoryEntryPage.
type MemoryEntryPage struct {
	Items []MemoryEntryListItem `json:"items"`

	// NextCursor Opaque pagination cursor. Clients must not parse or modify it.
	NextCursor *Cursor `json:"next_cursor,omitempty"`
}

// Message defines model for Message.
type Message struct {
	// Attachments Ordered exact immutable Document Versions attached to this Message.
	Attachments []MessageAttachment `json:"attachments"`
	Author      ActorRef            `json:"author"`

	// Card A request waiting on one Human's decision. TeamHub runs what the decision approves and reports the result to the requesting Agent. Exactly the view property named by kind is present; both AnotherMe setup kinds use profile_setup.
	Card *DecisionRequestedMessageCard `json:"card,omitempty"`

	// CardContextMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CardContextMessageId *Id `json:"card_context_message_id,omitempty"`

	// CardKind Present only with card_title. profile marks the Agent's delivery of the Human's Personal Profile; Web shows the Wiki Profile entry only for it.
	CardKind *MessageCardKind `json:"card_kind,omitempty"`

	// CardTitle Present only on a conversation Message an Agent sent with teamhub message card; Web shows it as a light card with this title above the body and files.
	CardTitle *string `json:"card_title,omitempty"`

	// ContextMessages Ordered immutable Room Messages explicitly selected as context for this top-level Message. This is not a Thread or reply hierarchy. Omitted on historical payloads.
	ContextMessages *[]MessageContext `json:"context_messages,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// MessageKind Product-level Message rendering and behavior category. conversation is Human-visible and Agent-inbox material. agent_runtime is Agent Inbox material and must not appear in the Human timeline, unread, latest_message, or room summary. room_notice is a Human-only timeline line about an Agent creation, a new member, or an Agent identity change; it never reaches an Agent and is not counted as unread or shown as latest_message.
	MessageKind MessageKind `json:"message_kind"`

	// Notice Structured Room notice. Actor display names are snapshots taken when the notice was written; raw_message carries the same line as plain text.
	Notice *MessageNotice `json:"notice,omitempty"`

	// RawMessage Exact display text reconstructed by concatenating segment content in array order.
	RawMessage string `json:"raw_message"`

	// Reactions Public emoji Reactions grouped by Reaction ID in first-reacted order. Omitted when the Message has none or does not support Reactions.
	Reactions *[]MessageReaction `json:"reactions,omitempty"`

	// ReplyToMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ReplyToMessageId *Id `json:"reply_to_message_id,omitempty"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// RoutineName Human-only display label for an Agent Message produced by a fired Room Routine. Omitted when provenance or the name is unavailable.
	RoutineName *string          `json:"routine_name,omitempty"`
	Segments    []MessageSegment `json:"segments"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id                    `json:"tenant_id"`
	Thread   *MessageThreadSummary `json:"thread,omitempty"`
}

// MessageCardKind Present only with card_title. profile marks the Agent's delivery of the Human's Personal Profile; Web shows the Wiki Profile entry only for it.
type MessageCardKind string

// MessageActivityLog defines model for MessageActivityLog.
type MessageActivityLog struct {
	// HasNativeTurn True when Activity identity resolved a Provider-native turn.
	HasNativeTurn bool    `json:"has_native_turn"`
	ProviderKind  string  `json:"provider_kind"`
	Reason        *string `json:"reason,omitempty"`

	// Records Sanitized Provider-native records for the exact turn. When the Provider omits native turn identity, only exact tool-call records are returned.
	Records []MessageActivityRecord  `json:"records"`
	Status  MessageActivityLogStatus `json:"status"`

	// Truncated True when the response reached the bounded record limit.
	Truncated bool `json:"truncated"`
}

// MessageActivityLogStatus defines model for MessageActivityLog.Status.
type MessageActivityLogStatus string

// MessageActivityRecord defines model for MessageActivityRecord.
type MessageActivityRecord struct {
	Category       MessageActivityRecordCategory  `json:"category"`
	NativeRecord   map[string]interface{}         `json:"native_record"`
	NativeType     string                         `json:"native_type"`
	Ordinal        int                            `json:"ordinal"`
	Phase          *string                        `json:"phase,omitempty"`
	RedactedFields []MessageActivityRedactedField `json:"redacted_fields"`
	Role           *string                        `json:"role,omitempty"`

	// Timestamp UTC timestamp in RFC 3339 format with an explicit offset.
	Timestamp  *Timestamp `json:"timestamp,omitempty"`
	ToolCallId *string    `json:"tool_call_id,omitempty"`
	ToolName   *string    `json:"tool_name,omitempty"`
	TurnId     *string    `json:"turn_id,omitempty"`
}

// MessageActivityRecordCategory defines model for MessageActivityRecord.Category.
type MessageActivityRecordCategory string

// MessageActivityRedactedField defines model for MessageActivityRedactedField.
type MessageActivityRedactedField struct {
	ByteCount *int64                             `json:"byte_count,omitempty"`
	Path      string                             `json:"path"`
	Reason    MessageActivityRedactedFieldReason `json:"reason"`
}

// MessageActivityRedactedFieldReason defines model for MessageActivityRedactedField.Reason.
type MessageActivityRedactedFieldReason string

// MessageAttachment defines model for MessageAttachment.
type MessageAttachment struct {
	// Available False after the Document is trashed or the immutable Version bytes are unavailable.
	Available bool `json:"available"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// DocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentVersionId Id     `json:"document_version_id"`
	Filename          string `json:"filename"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id        Id     `json:"id"`
	MediaType string `json:"media_type"`
	Sha256    string `json:"sha256"`
	SizeBytes int64  `json:"size_bytes"`

	// SourceRoomId Room Binding from which the immutable Document Version was selected. It can differ from the Message Room when a managed Task publishes its result to an Origin Room.
	SourceRoomId *Id `json:"source_room_id,omitempty"`
}

// MessageAttachmentUpload defines model for MessageAttachmentUpload.
type MessageAttachmentUpload struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt Timestamp `json:"expires_at"`
	Filename  string    `json:"filename"`

	// Id Service-signed upload credential. It names the uploading Human, the Room, and the stored file, and it expires at the upload's expires_at; clients must not construct or parse it.
	Id        AttachmentUploadToken `json:"id"`
	MediaType string                `json:"media_type"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId    Id     `json:"room_id"`
	Sha256    string `json:"sha256"`
	SizeBytes int64  `json:"size_bytes"`
	Status    string `json:"status"`
}

// MessageAttachmentUploadRequest defines model for MessageAttachmentUploadRequest.
type MessageAttachmentUploadRequest struct {
	Content   openapi_types.File `json:"content"`
	Filename  string             `json:"filename"`
	MediaType *string            `json:"media_type,omitempty"`
}

// MessageCardActorRef Room-scoped card identity. The enclosing Message already supplies Tenant authority.
type MessageCardActorRef struct {
	DisplayName string `json:"display_name"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id        `json:"id"`
	Kind ActorKind `json:"kind"`
}

// MessageCardHumanActorRef Human-only Room-scoped identity for card decision ownership and attribution.
type MessageCardHumanActorRef struct {
	DisplayName string `json:"display_name"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id     `json:"id"`
	Kind string `json:"kind"`
}

// MessageContext defines model for MessageContext.
type MessageContext struct {
	Author ActorRef `json:"author"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId  Id               `json:"message_id"`
	RawMessage string           `json:"raw_message"`
	Segments   []MessageSegment `json:"segments"`
}

// MessageCreateRequest context_message_ids are optional context and never satisfy the Message content requirement by themselves. raw_message and segments may be empty only when attachment_upload_ids or context_document_version_ids is non-empty.
type MessageCreateRequest struct {
	// AttachmentUploadIds Unexpired upload credentials issued to the same Human in this Room. Each upload attaches to one Message only; TeamHub appends exact ordinary Document Version file segments in array order.
	AttachmentUploadIds *[]AttachmentUploadToken `json:"attachment_upload_ids,omitempty"`

	// ContextDocumentVersionIds Ordered exact Document Versions selected as immutable Agent context. TeamHub derives provenance from each Version, requires the current Human to remain authorized for both the source Room and this target Room, and persists the Versions as Message attachments without downloading or re-uploading their bytes. A later Version of the same Document never changes this selection.
	ContextDocumentVersionIds *[]Id `json:"context_document_version_ids,omitempty"`

	// ContextMessageIds Ordered committed Messages from this Room selected as context. They do not create a Thread and do not select an Agent target.
	ContextMessageIds *[]Id `json:"context_message_ids,omitempty"`

	// MessageKind Human Message creation only accepts conversation. TeamHub uses conversation when omitted.
	MessageKind *MessageKind     `json:"message_kind,omitempty"`
	RawMessage  string           `json:"raw_message"`
	Segments    []MessageSegment `json:"segments"`

	// VoiceLiveTurn Marks a Human Message as a turn the caller's own active chat_live VoiceSession answers. TeamHub records it once for that turn. A turn the live model handed to a live task (start_task or reply_to_task) is routed to Room Agents as usual; any other turn does not wake them. The marker never grants authority.
	VoiceLiveTurn *VoiceLiveTurnMarker `json:"voice_live_turn,omitempty"`
}

// MessageForwardRequest defines model for MessageForwardRequest.
type MessageForwardRequest struct {
	Target MessageForwardTarget `json:"target"`
}

// MessageForwardResult defines model for MessageForwardResult.
type MessageForwardResult struct {
	Message        Message `json:"message"`
	RoomBindingIds []Id    `json:"room_binding_ids"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`
}

// MessageForwardTarget defines model for MessageForwardTarget.
type MessageForwardTarget struct {
	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id                       `json:"id"`
	Kind MessageForwardTargetKind `json:"kind"`
}

// MessageForwardTargetKind defines model for MessageForwardTarget.Kind.
type MessageForwardTargetKind string

// MessageHiddenPayload Placeholder for a Message that Human clients never receive, such as a Task terminal notice kept in Agent-only history. It keeps room_seq contiguous; clients advance their cursor without projecting product state from this event.
type MessageHiddenPayload struct {
	Kind interface{} `json:"kind"`
}

// MessageKind Product-level Message rendering and behavior category. conversation is Human-visible and Agent-inbox material. agent_runtime is Agent Inbox material and must not appear in the Human timeline, unread, latest_message, or room summary. room_notice is a Human-only timeline line about an Agent creation, a new member, or an Agent identity change; it never reaches an Agent and is not counted as unread or shown as latest_message.
type MessageKind string

// MessageNotice Structured Room notice. Actor display names are snapshots taken when the notice was written; raw_message carries the same line as plain text.
type MessageNotice struct {
	union json.RawMessage
}

// MessagePage defines model for MessagePage.
type MessagePage struct {
	Items []Message `json:"items"`
	Page  PageMeta  `json:"page"`

	// SnapshotRoomSeq Room Event watermark read before this Message snapshot.
	SnapshotRoomSeq int64 `json:"snapshot_room_seq"`
}

// MessageReaction defines model for MessageReaction.
type MessageReaction struct {
	// ActorIds Human and Agent Actors with this Reaction, in reaction order; the count is the array length.
	ActorIds []Id `json:"actor_ids"`

	// ReactionId Stable emoji ID in the official Reaction library shared by Humans and Agents: the emoji IDs of @emoji-mart/data 1.2.1 set 15 (Unicode Emoji 15). TeamHub rejects IDs outside that library.
	ReactionId MessageReactionId `json:"reaction_id"`
}

// MessageReactionId Stable emoji ID in the official Reaction library shared by Humans and Agents: the emoji IDs of @emoji-mart/data 1.2.1 set 15 (Unicode Emoji 15). TeamHub rejects IDs outside that library.
type MessageReactionId = string

// MessageReactionsChangedPayload defines model for MessageReactionsChangedPayload.
type MessageReactionsChangedPayload struct {
	Kind interface{} `json:"kind"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId Id `json:"message_id"`

	// Reactions Complete current Reaction aggregate for the Message; replaces any local projection.
	Reactions []MessageReaction `json:"reactions"`
}

// MessageSearchHit defines model for MessageSearchHit.
type MessageSearchHit struct {
	Message Message           `json:"message"`
	Room    MessageSearchRoom `json:"room"`
}

// MessageSearchPage defines model for MessageSearchPage.
type MessageSearchPage struct {
	Items []MessageSearchHit `json:"items"`
	Page  PageMeta           `json:"page"`
}

// MessageSearchRoom defines model for MessageSearchRoom.
type MessageSearchRoom struct {
	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id       `json:"id"`
	Kind RoomKind `json:"kind"`
	Name string   `json:"name"`

	// ParentRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentRoomId *Id `json:"parent_room_id,omitempty"`

	// RootMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RootMessageId *Id `json:"root_message_id,omitempty"`
}

// MessageSegment defines model for MessageSegment.
type MessageSegment struct {
	union json.RawMessage
}

// MessageSnapshotPayload defines model for MessageSnapshotPayload.
type MessageSnapshotPayload struct {
	Kind    interface{} `json:"kind"`
	Message Message     `json:"message"`
}

// MessageThreadSummary defines model for MessageThreadSummary.
type MessageThreadSummary struct {
	// LatestReplyAt UTC timestamp in RFC 3339 format with an explicit offset.
	LatestReplyAt      *Timestamp  `json:"latest_reply_at,omitempty"`
	LatestReplyAuthors *[]ActorRef `json:"latest_reply_authors,omitempty"`
	ReplyCount         int64       `json:"reply_count"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`
}

// MessageThreadSummaryUpdatedPayload defines model for MessageThreadSummaryUpdatedPayload.
type MessageThreadSummaryUpdatedPayload struct {
	Kind interface{} `json:"kind"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId Id                   `json:"message_id"`
	Thread    MessageThreadSummary `json:"thread"`
}

// ModelSourceError The common error body with error.code narrowed to ModelSourceErrorCode.
type ModelSourceError struct {
	// Code error.code of a refused model-source request (403, 409, 502, 503, 504); 400, 401, and 404 use the common codes. LOCAL_COMPUTER_OFFLINE: the Computer is not connected. MODEL_SOURCE_FORBIDDEN: the viewer is not the Computer owner. MODEL_SOURCE_UNAVAILABLE: the Computer has no localmodels tool or cannot switch model sources. AGENT_HAS_ACTIVE_RUNS: Agents on the Computer have running work and force_terminate was false; details carries one entry per such Agent, with field "agent" and the Agent's display name as reason. RUNTIME_NOT_ENABLED, LOCAL_MODEL_NO_ROOM, LOCAL_MODEL_UNKNOWN, and the BYOK_ codes are the Computer's refusals (409); for BYOK_AUTH_FAILED, BYOK_NOT_FOUND, BYOK_UNREACHABLE and BYOK_UPSTREAM_REJECTED, message is the Computer's own and names the address it sent to and the endpoint's HTTP status. MODEL_SOURCE_FAILED: the Computer failed with an error that has no code of its own here (502). MODEL_SOURCE_SERVICE_UNAVAILABLE: Agent Service could not be reached (503). MODEL_SOURCE_UNCONFIRMED: the Computer had not answered by the deadline; it may still switch (504).
	Code    ModelSourceErrorCode `json:"code"`
	Details *[]ErrorDetail       `json:"details,omitempty"`

	// Message Human-readable summary safe to display; clients branch on code, not message.
	Message   string `json:"message"`
	RequestId string `json:"request_id"`
}

// ModelSourceErrorCode error.code of a refused model-source request (403, 409, 502, 503, 504); 400, 401, and 404 use the common codes. LOCAL_COMPUTER_OFFLINE: the Computer is not connected. MODEL_SOURCE_FORBIDDEN: the viewer is not the Computer owner. MODEL_SOURCE_UNAVAILABLE: the Computer has no localmodels tool or cannot switch model sources. AGENT_HAS_ACTIVE_RUNS: Agents on the Computer have running work and force_terminate was false; details carries one entry per such Agent, with field "agent" and the Agent's display name as reason. RUNTIME_NOT_ENABLED, LOCAL_MODEL_NO_ROOM, LOCAL_MODEL_UNKNOWN, and the BYOK_ codes are the Computer's refusals (409); for BYOK_AUTH_FAILED, BYOK_NOT_FOUND, BYOK_UNREACHABLE and BYOK_UPSTREAM_REJECTED, message is the Computer's own and names the address it sent to and the endpoint's HTTP status. MODEL_SOURCE_FAILED: the Computer failed with an error that has no code of its own here (502). MODEL_SOURCE_SERVICE_UNAVAILABLE: Agent Service could not be reached (503). MODEL_SOURCE_UNCONFIRMED: the Computer had not answered by the deadline; it may still switch (504).
type ModelSourceErrorCode string

// ModelSourceErrorResponse defines model for ModelSourceErrorResponse.
type ModelSourceErrorResponse struct {
	// Error The common error body with error.code narrowed to ModelSourceErrorCode.
	Error ModelSourceError `json:"error"`
}

// ModelSourceMode Active model source mode on a Local Computer.
type ModelSourceMode string

// ModelSourceRuntime Agent runtime harness driving turns on the Computer.
type ModelSourceRuntime string

// ModelSourceStatus Active model source and redacted BYOK metadata on one Local Computer.
type ModelSourceStatus struct {
	// Byok Redacted BYOK configuration metadata reported by the Computer. path and endpoint are omitted when empty: a configured summary without them appends nothing there.
	Byok       ByokSummary `json:"byok"`
	GatewayUrl *string     `json:"gateway_url,omitempty"`

	// Mode Active model source mode on a Local Computer.
	Mode            ModelSourceMode       `json:"mode"`
	ReasoningEffort *AgentReasoningEffort `json:"reasoning_effort,omitempty"`

	// Runtime Agent runtime harness driving turns on the Computer.
	Runtime ModelSourceRuntime `json:"runtime"`

	// RuntimeModel After a switch, the model the Computer's Agents run: the target model when the active Runtime offers it, else that Runtime's default.
	RuntimeModel string `json:"runtime_model"`
}

// ModelSourceSwitchRequest Owner request to switch a Computer between local models, native subscriptions, and BYOK on Bifrost. When active Runs exist on the Computer's affected Agents and force_terminate is false, TeamHub refuses with 409 AGENT_HAS_ACTIVE_RUNS; retrying with force_terminate true terminates those Runs and applies the switch.
type ModelSourceSwitchRequest struct {
	// Byok Upstream endpoint configuration supplied by the Computer owner. Requests go to base_url + path + endpoint in protocol, and models are listed at base_url + path + /models. The API key is never persisted in TeamHub or Agent Service; only the Local Computer stores it in a private 0600 file.
	Byok *ByokInput `json:"byok,omitempty"`

	// ForceTerminate True ends running work on the Computer's Agents; absent means false.
	ForceTerminate *bool `json:"force_terminate,omitempty"`

	// LocalModelId Stable localmodels library id: catalog id and variant, such as qwen3-4b:Q4_K_M.
	LocalModelId *LocalModelId `json:"local_model_id,omitempty"`

	// Mode Active model source mode on a Local Computer.
	Mode ModelSourceMode `json:"mode"`

	// Runtime Agent runtime harness driving turns on the Computer.
	Runtime *ModelSourceRuntime `json:"runtime,omitempty"`
}

// ModelSourceView Current model source state of one Local Computer as viewed from Settings.
type ModelSourceView struct {
	// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ComputerId Id   `json:"computer_id"`
	Online     bool `json:"online"`

	// Status Active model source and redacted BYOK metadata on one Local Computer.
	Status             *ModelSourceStatus `json:"status,omitempty"`
	TerminatedRunCount *int               `json:"terminated_run_count,omitempty"`
	UpdatedAgentCount  *int               `json:"updated_agent_count,omitempty"`
	ViewerIsOwner      bool               `json:"viewer_is_owner"`
}

// MyDocumentTree defines model for MyDocumentTree.
type MyDocumentTree struct {
	Items []DocumentPlacementNode `json:"items"`
}

// NotionResource defines model for NotionResource.
type NotionResource struct {
	Id    string             `json:"id"`
	Kind  NotionResourceKind `json:"kind"`
	Title string             `json:"title"`
	Url   *string            `json:"url,omitempty"`
}

// NotionResourceKind defines model for NotionResource.Kind.
type NotionResourceKind string

// NotionResourcePage defines model for NotionResourcePage.
type NotionResourcePage struct {
	NextCursor *string          `json:"next_cursor,omitempty"`
	Resources  []NotionResource `json:"resources"`
}

// PageMeta defines model for PageMeta.
type PageMeta struct {
	HasMore bool `json:"has_more"`

	// NextCursor Opaque pagination cursor. Clients must not parse or modify it.
	NextCursor *Cursor `json:"next_cursor,omitempty"`
}

// PasswordChangeRequest defines model for PasswordChangeRequest.
type PasswordChangeRequest struct {
	CurrentPassword *string `json:"current_password,omitempty"`

	// NewPassword 8-1024 UTF-8 bytes. TeamHub counts bytes; minLength and maxLength count characters, so they bound the byte rule only loosely.
	NewPassword *string `json:"new_password,omitempty"`
}

// PersonalInsight defines model for PersonalInsight.
type PersonalInsight struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`
	Dimension string    `json:"dimension"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id        Id     `json:"id"`
	Statement string `json:"statement"`
}

// PersonalInsightGeneration defines model for PersonalInsightGeneration.
type PersonalInsightGeneration struct {
	Status string `json:"status"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// PersonalInsightList defines model for PersonalInsightList.
type PersonalInsightList struct {
	Items            []PersonalInsight          `json:"items"`
	LatestGeneration *PersonalInsightGeneration `json:"latest_generation,omitempty"`
}

// PersonalProfile defines model for PersonalProfile.
type PersonalProfile struct {
	// BuildingSince Set while the Profile is being written, by an Agent's build or a queued or running generation; when it started.
	BuildingSince *time.Time                `json:"building_since,omitempty"`
	Current       *PersonalProfileRevision  `json:"current,omitempty"`
	HasMore       bool                      `json:"has_more"`
	History       []PersonalProfileRevision `json:"history"`
}

// PersonalProfileBackground The Background module; it needs a non-blank overview, a point, or a timeline entry.
type PersonalProfileBackground struct {
	Overview string                 `json:"overview"`
	Points   []PersonalProfilePoint `json:"points"`

	// Timeline Entries in the submitted order.
	Timeline []PersonalProfileTimelineEntry `json:"timeline"`
}

// PersonalProfileDocument The structured Personal Profile. Text fields are plain text: no line may start with "#", and scripts and images are rejected. TeamHub renders the Markdown. Invalid documents are rejected with profile_document_invalid or profile_module_empty and an issue naming the field.
type PersonalProfileDocument struct {
	// Background The Background module; it needs a non-blank overview, a point, or a timeline entry.
	Background PersonalProfileBackground `json:"background"`

	// CommunicationStyle One Profile module; it needs a non-blank overview or at least one point.
	CommunicationStyle PersonalProfileModule `json:"communication_style"`
	Name               string                `json:"name"`

	// Preferences One Profile module; it needs a non-blank overview or at least one point.
	Preferences PersonalProfileModule `json:"preferences"`

	// WorkingStyle One Profile module; it needs a non-blank overview or at least one point.
	WorkingStyle PersonalProfileModule `json:"working_style"`

	// WritingStyle One Profile module; it needs a non-blank overview or at least one point.
	WritingStyle PersonalProfileModule `json:"writing_style"`
}

// PersonalProfileGeneration defines model for PersonalProfileGeneration.
type PersonalProfileGeneration struct {
	// BaseProfileRevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	BaseProfileRevisionId *Id `json:"base_profile_revision_id,omitempty"`

	// CandidateRevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CandidateRevisionId *Id `json:"candidate_revision_id,omitempty"`

	// CompletedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CompletedAt *Timestamp `json:"completed_at,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt      Timestamp                         `json:"created_at"`
	DecisionStatus PersonalProfileGenerationDecision `json:"decision_status"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id            Id                                `json:"id"`
	LastErrorCode *string                           `json:"last_error_code,omitempty"`
	PromptVersion string                            `json:"prompt_version"`
	Sources       []PersonalProfileGenerationSource `json:"sources"`
	Status        PersonalProfileGenerationStatus   `json:"status"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// PersonalProfileGenerationCreateRequest defines model for PersonalProfileGenerationCreateRequest.
type PersonalProfileGenerationCreateRequest struct {
	Sources []PersonalProfileGenerationSourceInput `json:"sources"`
}

// PersonalProfileGenerationDecision defines model for PersonalProfileGenerationDecision.
type PersonalProfileGenerationDecision string

// PersonalProfileGenerationList defines model for PersonalProfileGenerationList.
type PersonalProfileGenerationList struct {
	Items []PersonalProfileGeneration `json:"items"`
}

// PersonalProfileGenerationSource defines model for PersonalProfileGenerationSource.
type PersonalProfileGenerationSource struct {
	// ConnectionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ConnectionId  *Id     `json:"connection_id,omitempty"`
	FileDeleted   *bool   `json:"file_deleted,omitempty"`
	Filename      *string `json:"filename,omitempty"`
	IdentityLabel *string `json:"identity_label,omitempty"`

	// InputVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	InputVersionId *Id                       `json:"input_version_id,omitempty"`
	Kind           PersonalProfileSourceKind `json:"kind"`
	MediaType      *string                   `json:"media_type,omitempty"`
	Provider       *string                   `json:"provider,omitempty"`
	SizeBytes      *int64                    `json:"size_bytes,omitempty"`
}

// PersonalProfileGenerationSourceInput defines model for PersonalProfileGenerationSourceInput.
type PersonalProfileGenerationSourceInput struct {
	// ConnectionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ConnectionId *Id `json:"connection_id,omitempty"`

	// InputVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	InputVersionId *Id                               `json:"input_version_id,omitempty"`
	Kind           PersonalProfileSourceKind         `json:"kind"`
	Selections     *[]PersonalProfileSourceSelection `json:"selections,omitempty"`
	Summary        *string                           `json:"summary,omitempty"`
}

// PersonalProfileGenerationStatus defines model for PersonalProfileGenerationStatus.
type PersonalProfileGenerationStatus string

// PersonalProfileModule One Profile module; it needs a non-blank overview or at least one point.
type PersonalProfileModule struct {
	Overview string                 `json:"overview"`
	Points   []PersonalProfilePoint `json:"points"`
}

// PersonalProfilePoint One topical point of a module; it needs non-empty text or at least one item.
type PersonalProfilePoint struct {
	Items []string `json:"items"`
	Text  string   `json:"text"`
	Title string   `json:"title"`
}

// PersonalProfileReplaceRequest defines model for PersonalProfileReplaceRequest.
type PersonalProfileReplaceRequest struct {
	// BaseRevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	BaseRevisionId Id `json:"base_revision_id"`

	// Markdown The complete edited Profile Markdown, in the layout the Revision's markdown uses; it replaces the whole Profile.
	Markdown string `json:"markdown"`
}

// PersonalProfileRevision defines model for PersonalProfileRevision.
type PersonalProfileRevision struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// Markdown The Markdown TeamHub rendered from profile.
	Markdown string `json:"markdown"`

	// Profile The structured Personal Profile. Text fields are plain text: no line may start with "#", and scripts and images are rejected. TeamHub renders the Markdown. Invalid documents are rejected with profile_document_invalid or profile_module_empty and an issue naming the field.
	Profile       PersonalProfileDocument `json:"profile"`
	PromptVersion string                  `json:"prompt_version"`

	// SourceApps App keys recorded as evidence for this revision; omitted when unknown.
	SourceApps *[]string `json:"source_apps,omitempty"`

	// SourceProfileGenerationId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	SourceProfileGenerationId *Id `json:"source_profile_generation_id,omitempty"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`
}

// PersonalProfileSourceKind defines model for PersonalProfileSourceKind.
type PersonalProfileSourceKind string

// PersonalProfileSourceSelection defines model for PersonalProfileSourceSelection.
type PersonalProfileSourceSelection struct {
	IsPrivate bool                               `json:"is_private"`
	Kind      PersonalProfileSourceSelectionKind `json:"kind"`
	Name      string                             `json:"name"`
	RemoteId  string                             `json:"remote_id"`
}

// PersonalProfileSourceSelectionKind defines model for PersonalProfileSourceSelection.Kind.
type PersonalProfileSourceSelectionKind string

// PersonalProfileTimelineEntry One education or work entry; period and organization are required, and an empty place, role or description means the value is unknown.
type PersonalProfileTimelineEntry struct {
	Description  string   `json:"description"`
	Details      []string `json:"details"`
	Organization string   `json:"organization"`
	Period       string   `json:"period"`
	Place        string   `json:"place"`
	Role         string   `json:"role"`
}

// PersonalWiki defines model for PersonalWiki.
type PersonalWiki struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt *Timestamp `json:"created_at,omitempty"`

	// CurrentRevisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CurrentRevisionId *Id `json:"current_revision_id,omitempty"`

	// FailureReason Actionable cause of the latest failed refresh when known: computer_offline, runtime_incompatible, runtime_auth_required, or runtime_unavailable.
	FailureReason *PersonalWikiFailureReason `json:"failure_reason,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id *Id `json:"id,omitempty"`

	// LatestRefreshId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	LatestRefreshId *Id `json:"latest_refresh_id,omitempty"`

	// OwnerActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OwnerActorId Id `json:"owner_actor_id"`

	// PreviewRevision Advances when the active refresh has a new three-minute preview.
	PreviewRevision *int64 `json:"preview_revision,omitempty"`

	// PublishedGeneration Advances by one with each published Revision.
	PublishedGeneration int64 `json:"published_generation"`

	// State refreshing while a refresh runs or its follow-up is queued; failed when the latest refresh failed or conflicted.
	State PersonalWikiState `json:"state"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
}

// PersonalWikiFailureReason Actionable cause of the latest failed refresh when known: computer_offline, runtime_incompatible, runtime_auth_required, or runtime_unavailable.
type PersonalWikiFailureReason string

// PersonalWikiState refreshing while a refresh runs or its follow-up is queued; failed when the latest refresh failed or conflicted.
type PersonalWikiState string

// PocketNote defines model for PocketNote.
type PocketNote struct {
	// Date Calendar day in the TeamHub process time zone (TZ) that owns one Pocket Note page.
	Date      PocketNoteDate `json:"date"`
	Text      PocketNoteText `json:"text"`
	UpdatedAt time.Time      `json:"updated_at"`
}

// PocketNoteDate Calendar day in the TeamHub process time zone (TZ) that owns one Pocket Note page.
type PocketNoteDate = string

// PocketNotePage defines model for PocketNotePage.
type PocketNotePage struct {
	// Items Non-empty pages, newest day first.
	Items []PocketNote `json:"items"`
	Page  PageMeta     `json:"page"`

	// Today Calendar day in the TeamHub process time zone (TZ) that owns one Pocket Note page.
	Today PocketNoteDate `json:"today"`
}

// PocketNoteText defines model for PocketNoteText.
type PocketNoteText = string

// PocketNoteUpdateRequest defines model for PocketNoteUpdateRequest.
type PocketNoteUpdateRequest struct {
	Text PocketNoteText `json:"text"`
}

// ProfileSetupDecisionView The view of an AnotherMe setup decision. A profile_setup_apps card lists the Connected App keys it offers; a profile_setup_sources card has no fields.
type ProfileSetupDecisionView struct {
	// Apps Connected App keys a profile_setup_apps card offers first.
	Apps *[]string `json:"apps,omitempty"`

	// MoreApps Connected App keys a profile_setup_apps card offers behind "more".
	MoreApps *[]string `json:"more_apps,omitempty"`
}

// ProviderKeyDecisionView The view of a provider_key decision: the deployment has no Composio API key, which every Connected App needs. app_key names the app the Agent wanted, when its command said. Saving a key answers it configured.
type ProviderKeyDecisionView struct {
	AppKey *string `json:"app_key,omitempty"`
}

// QuestionDecisionView The view of a question decision: the questions an Agent, its Runtime, or a new Agent's opening asks. The card title is the question card's prompt.
type QuestionDecisionView struct {
	Questions []DecisionQuestion `json:"questions"`
}

// ReadRoomHistoryShare defines model for ReadRoomHistoryShare.
type ReadRoomHistoryShare struct {
	After   *int64  `json:"after,omitempty"`
	AssetId *string `json:"asset_id,omitempty"`
	Token   string  `json:"token"`
}

// ReferenceSegment defines model for ReferenceSegment.
type ReferenceSegment struct {
	Content string `json:"content"`

	// Target Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Target Id `json:"target"`

	// TargetType user references a Human Actor; agent references an Agent Actor.
	TargetType ReferenceSegmentTargetType `json:"target_type"`
	Type       string                     `json:"type"`
}

// ReferenceSegmentTargetType user references a Human Actor; agent references an Agent Actor.
type ReferenceSegmentTargetType string

// ResolveDocumentLinkShare defines model for ResolveDocumentLinkShare.
type ResolveDocumentLinkShare struct {
	Token string `json:"token"`
}

// RevokeDocumentLinkShare defines model for RevokeDocumentLinkShare.
type RevokeDocumentLinkShare struct {
	ExpectedVersion int64 `json:"expected_version"`
}

// Room A member-scoped collaboration space. Current Room members can read the complete Room history, including data committed before they joined. Non-members and callers from another Tenant receive the same not-found response even if they know the Room ID.
type Room struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt        Timestamp `json:"created_at"`
	CreatedBy        ActorRef  `json:"created_by"`
	Description      *string   `json:"description,omitempty"`
	DirectPeer       *ActorRef `json:"direct_peer,omitempty"`
	DirectPeerActive *bool     `json:"direct_peer_active,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id       `json:"id"`
	Kind RoomKind `json:"kind"`
	Name string   `json:"name"`

	// ParentRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentRoomId *Id `json:"parent_room_id,omitempty"`

	// Participation Personal Room participation; leaving preserves membership and its role.
	Participation *RoomParticipationStatus `json:"participation,omitempty"`

	// RootMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RootMessageId *Id `json:"root_message_id,omitempty"`

	// SnapshotRoomSeq Room event watermark captured before reading this projection. Events at or below this watermark are reflected in the response; newer events may also be reflected. Present on authorized Room detail/member reads. Older servers may omit it.
	SnapshotRoomSeq *int64 `json:"snapshot_room_seq,omitempty"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// RoomBackgroundTask defines model for RoomBackgroundTask.
type RoomBackgroundTask struct {
	CreatedAt time.Time `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// Requirement What the Room's Meta asked its AlterEgo to do.
	Requirement string `json:"requirement"`
	Title       string `json:"title"`
}

// RoomBackgroundTaskCancelResult defines model for RoomBackgroundTaskCancelResult.
type RoomBackgroundTaskCancelResult struct {
	// Status canceled when this request stopped the Task; not_running when it was no longer running, so nothing changed.
	Status RoomBackgroundTaskCancelResultStatus `json:"status"`
	TaskId string                               `json:"task_id"`
}

// RoomBackgroundTaskCancelResultStatus canceled when this request stopped the Task; not_running when it was no longer running, so nothing changed.
type RoomBackgroundTaskCancelResultStatus string

// RoomBackgroundTaskList defines model for RoomBackgroundTaskList.
type RoomBackgroundTaskList struct {
	// Items Oldest first. Waiting for an approval counts as running; a Task leaves the list once it is idle, failed or canceled.
	Items []RoomBackgroundTask `json:"items"`
}

// RoomCreationDecisionView defines model for RoomCreationDecisionView.
type RoomCreationDecisionView struct {
	// CreatedRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CreatedRoomId          *Id              `json:"created_room_id,omitempty"`
	Description            *string          `json:"description,omitempty"`
	InitialMessageSegments []MessageSegment `json:"initial_message_segments"`
	MemberIds              []Id             `json:"member_ids"`
	Name                   string           `json:"name"`

	// OriginRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OriginRoomId Id `json:"origin_room_id"`
}

// RoomCreationProposal defines model for RoomCreationProposal.
type RoomCreationProposal struct {
	Description            *string          `json:"description,omitempty"`
	InitialMessageSegments []MessageSegment `json:"initial_message_segments"`
	MemberIds              []Id             `json:"member_ids"`
	Name                   string           `json:"name"`

	// OriginRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OriginRoomId Id `json:"origin_room_id"`
}

// RoomDeletedPayload defines model for RoomDeletedPayload.
type RoomDeletedPayload struct {
	// DeletedAt UTC timestamp in RFC 3339 format with an explicit offset.
	DeletedAt Timestamp   `json:"deleted_at"`
	Kind      interface{} `json:"kind"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`
}

// RoomDocumentChangedPayload defines model for RoomDocumentChangedPayload.
type RoomDocumentChangedPayload struct {
	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// DocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentVersionId *Id                            `json:"document_version_id,omitempty"`
	Kind              RoomDocumentChangedPayloadKind `json:"kind"`
}

// RoomDocumentChangedPayloadKind defines model for RoomDocumentChangedPayload.Kind.
type RoomDocumentChangedPayloadKind string

// RoomDocumentCollaborationCredential defines model for RoomDocumentCollaborationCredential.
type RoomDocumentCollaborationCredential struct {
	// CollaborationCredential Signed connection token, opaque to the browser, that Document Runtime verifies when the connection opens.
	CollaborationCredential string `json:"collaboration_credential"`

	// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DocumentId Id `json:"document_id"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt Timestamp `json:"expires_at"`
}

// RoomEventEnvelope Persistent, at-least-once synchronization record. event_type must equal payload.kind. Payload contains the small committed snapshot needed for immediate UI projection; it is not the authoritative resource and clients may GET the resource to repair or hydrate extra data.
type RoomEventEnvelope struct {
	Actor *ActorRef `json:"actor,omitempty"`

	// EventId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	EventId   Id            `json:"event_id"`
	EventType RoomEventType `json:"event_type"`

	// OccurredAt UTC timestamp in RFC 3339 format with an explicit offset.
	OccurredAt Timestamp        `json:"occurred_at"`
	Payload    RoomEventPayload `json:"payload"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// RoomSeq Monotonically increasing sequence allocated within one Room.
	RoomSeq RoomSeq `json:"room_seq"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`
}

// RoomEventPage defines model for RoomEventPage.
type RoomEventPage struct {
	// HasMore true when another page is needed before reaching latest_room_seq.
	HasMore bool `json:"has_more"`

	// Items Strictly ascending room_seq values, all greater than after.
	Items []RoomEventEnvelope `json:"items"`

	// LatestRoomSeq Highest committed sequence observed when this page was produced.
	LatestRoomSeq int64 `json:"latest_room_seq"`
}

// RoomEventPayload defines model for RoomEventPayload.
type RoomEventPayload struct {
	union json.RawMessage
}

// RoomEventType defines model for RoomEventType.
type RoomEventType string

// RoomHistoryCompactedPayload Compatibility marker that preserves an existing room_seq after an obsolete event model is removed. Clients advance their cursor without projecting product state from this event.
type RoomHistoryCompactedPayload struct {
	Kind interface{} `json:"kind"`

	// RemovedEventType Historical event type removed from the current product model.
	RemovedEventType string `json:"removed_event_type"`
}

// RoomHistoryMessage defines model for RoomHistoryMessage.
type RoomHistoryMessage struct {
	Attachments []struct {
		Filename     string  `json:"filename"`
		Id           string  `json:"id"`
		ImageAssetId *string `json:"image_asset_id,omitempty"`
		MediaType    string  `json:"media_type"`
		SizeBytes    int64   `json:"size_bytes"`
	} `json:"attachments"`
	Author      ActorRef `json:"author"`
	AvatarImage *string  `json:"avatar_image,omitempty"`
	Body        string   `json:"body"`
	Card        *struct {
		Description string `json:"description"`
		Status      string `json:"status"`
		Title       string `json:"title"`
	} `json:"card,omitempty"`
	CreatedAt time.Time        `json:"created_at"`
	Id        string           `json:"id"`
	Position  int64            `json:"position"`
	Segments  []MessageSegment `json:"segments"`
}

// RoomHistoryShare defines model for RoomHistoryShare.
type RoomHistoryShare struct {
	CreatedAt       time.Time `json:"created_at"`
	Id              string    `json:"id"`
	MessageCount    int       `json:"message_count"`
	Revoked         bool      `json:"revoked"`
	RoomName        string    `json:"room_name"`
	SnapshotRoomSeq int64     `json:"snapshot_room_seq"`

	// Token Returned only when a link is created. Never logged or stored in plaintext.
	Token *string `json:"token,omitempty"`
}

// RoomHistorySharePage defines model for RoomHistorySharePage.
type RoomHistorySharePage struct {
	Items []RoomHistoryShare `json:"items"`
}

// RoomHistorySnapshot defines model for RoomHistorySnapshot.
type RoomHistorySnapshot struct {
	Items     []RoomHistoryMessage `json:"items"`
	NextAfter int64                `json:"next_after"`
	Share     RoomHistoryShare     `json:"share"`
}

// RoomKind defines model for RoomKind.
type RoomKind string

// RoomListItem Room metadata plus the current Human's durable attention projection. The latest message is omitted until the Room has a Message. Counts exclude Messages authored by the caller and clear only through an explicit monotonic read-state update. Thread rooms are included for current parent Room members who opened the Thread, posted a non-seed reply, or were mentioned.
type RoomListItem struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt        Timestamp `json:"created_at"`
	CreatedBy        ActorRef  `json:"created_by"`
	Description      *string   `json:"description,omitempty"`
	DirectPeer       *ActorRef `json:"direct_peer,omitempty"`
	DirectPeerActive *bool     `json:"direct_peer_active,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id            Id                    `json:"id"`
	Kind          RoomKind              `json:"kind"`
	LatestMessage *LatestMessageSummary `json:"latest_message,omitempty"`
	LatestRoomSeq int64                 `json:"latest_room_seq"`

	// MemberPreview The first nine current members, Humans and Agents alike, in the order they joined, for the Room's avatar mosaic. A Thread previews its parent Room's members.
	MemberPreview *[]ActorRef `json:"member_preview,omitempty"`
	Name          string      `json:"name"`

	// ParentRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentRoomId *Id `json:"parent_room_id,omitempty"`

	// Participation Personal Room participation; leaving preserves membership and its role.
	Participation *RoomParticipationStatus `json:"participation,omitempty"`

	// PinnedAt UTC timestamp in RFC 3339 format with an explicit offset.
	PinnedAt           *Timestamp `json:"pinned_at,omitempty"`
	ReadThroughRoomSeq int64      `json:"read_through_room_seq"`

	// RootMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RootMessageId *Id `json:"root_message_id,omitempty"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId           Id    `json:"tenant_id"`
	UnreadMentionCount int64 `json:"unread_mention_count"`
	UnreadMessageCount int64 `json:"unread_message_count"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// RoomMember defines model for RoomMember.
type RoomMember struct {
	Actor   ActorRef `json:"actor"`
	AddedBy ActorRef `json:"added_by"`

	// JoinedAt UTC timestamp in RFC 3339 format with an explicit offset.
	JoinedAt Timestamp `json:"joined_at"`

	// Role Owners manage Room metadata and membership; members participate in Room work.
	Role RoomMemberRole `json:"role"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// RoomMemberPage defines model for RoomMemberPage.
type RoomMemberPage struct {
	Items []RoomMember `json:"items"`
	Page  PageMeta     `json:"page"`

	// SnapshotRoomSeq Room event watermark captured before reading this projection. Events at or below this watermark are reflected in the response; newer events may also be reflected. Present on authorized Room detail/member reads. Older servers may omit it.
	SnapshotRoomSeq *int64 `json:"snapshot_room_seq,omitempty"`
}

// RoomMemberPutRequest defines model for RoomMemberPutRequest.
type RoomMemberPutRequest struct {
	// Role Owners manage Room metadata and membership; members participate in Room work.
	Role RoomMemberRole `json:"role"`
}

// RoomMemberRole Owners manage Room metadata and membership; members participate in Room work.
type RoomMemberRole string

// RoomMemberSnapshotPayload defines model for RoomMemberSnapshotPayload.
type RoomMemberSnapshotPayload struct {
	Kind   RoomMemberSnapshotPayloadKind `json:"kind"`
	Member RoomMember                    `json:"member"`
}

// RoomMemberSnapshotPayloadKind defines model for RoomMemberSnapshotPayload.Kind.
type RoomMemberSnapshotPayloadKind string

// RoomPage defines model for RoomPage.
type RoomPage struct {
	Items []RoomListItem `json:"items"`
	Page  PageMeta       `json:"page"`
}

// RoomParticipationChangedPayload defines model for RoomParticipationChangedPayload.
type RoomParticipationChangedPayload struct {
	// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ActorId Id                                  `json:"actor_id"`
	Kind    RoomParticipationChangedPayloadKind `json:"kind"`

	// Status Personal Room participation; leaving preserves membership and its role.
	Status RoomParticipationStatus `json:"status"`
}

// RoomParticipationChangedPayloadKind defines model for RoomParticipationChangedPayload.Kind.
type RoomParticipationChangedPayloadKind string

// RoomParticipationRequest defines model for RoomParticipationRequest.
type RoomParticipationRequest struct {
	// Status Personal Room participation; leaving preserves membership and its role.
	Status RoomParticipationStatus `json:"status"`
}

// RoomParticipationStatus Personal Room participation; leaving preserves membership and its role.
type RoomParticipationStatus string

// RoomPinState defines model for RoomPinState.
type RoomPinState struct {
	// PinnedAt UTC timestamp in RFC 3339 format with an explicit offset.
	PinnedAt *Timestamp `json:"pinned_at,omitempty"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`
}

// RoomPinUpdateRequest defines model for RoomPinUpdateRequest.
type RoomPinUpdateRequest struct {
	Pinned bool `json:"pinned"`
}

// RoomReadState defines model for RoomReadState.
type RoomReadState struct {
	ReadThroughRoomSeq int64 `json:"read_through_room_seq"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// RoomReadStateUpdateRequest defines model for RoomReadStateUpdateRequest.
type RoomReadStateUpdateRequest struct {
	ThroughRoomSeq int64 `json:"through_room_seq"`
}

// RoomRunCancelRequest defines model for RoomRunCancelRequest.
type RoomRunCancelRequest struct {
	// RequestId Client-generated key scoped to the authenticated principal and operation.
	RequestId IdempotencyKey `json:"request_id"`
}

// RoomRunCancelResult defines model for RoomRunCancelResult.
type RoomRunCancelResult struct {
	AgentActorId string                    `json:"agent_actor_id"`
	MessageIds   []string                  `json:"message_ids"`
	RunId        string                    `json:"run_id"`
	Status       RoomRunCancelResultStatus `json:"status"`
}

// RoomRunCancelResultStatus defines model for RoomRunCancelResult.Status.
type RoomRunCancelResultStatus string

// RoomRunRedeliverResult defines model for RoomRunRedeliverResult.
type RoomRunRedeliverResult struct {
	RedeliveredCount int                          `json:"redelivered_count"`
	RunId            string                       `json:"run_id"`
	Status           RoomRunRedeliverResultStatus `json:"status"`
}

// RoomRunRedeliverResultStatus defines model for RoomRunRedeliverResult.Status.
type RoomRunRedeliverResultStatus string

// RoomRunStatus defines model for RoomRunStatus.
type RoomRunStatus struct {
	Agent RoomRunStatusAgentRef `json:"agent"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// EventOrdinal Ordinal of the Run's last committed Runtime presentation event; 0 before the first. It only grows, so clients use it to deduplicate and to fetch newer events.
	EventOrdinal int64 `json:"event_ordinal"`

	// Replied The active Run's latest output is the Agent's final reply and nothing it must still answer or do came after it, while its native turn may still be ending. Clients show the Agent as no longer working; the Room list leaves the Run out the same way.
	Replied bool `json:"replied"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// RunId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RunId Id `json:"run_id"`

	// Status active while the Run is queued or running, completed once it succeeded, aborted once it failed or was canceled.
	Status RoomRunStatusState `json:"status"`

	// StopReason The reason TeamHub recorded when the Run was canceled, such as task_terminal.
	StopReason *string `json:"stop_reason,omitempty"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// RoomRunStatusAgentRef defines model for RoomRunStatusAgentRef.
type RoomRunStatusAgentRef struct {
	DisplayName string `json:"display_name"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id                        `json:"id"`
	Kind RoomRunStatusAgentRefKind `json:"kind"`
}

// RoomRunStatusAgentRefKind defines model for RoomRunStatusAgentRef.Kind.
type RoomRunStatusAgentRefKind string

// RoomRunStatusList defines model for RoomRunStatusList.
type RoomRunStatusList struct {
	Items []RoomRunStatus `json:"items"`
}

// RoomRunStatusState active while the Run is queued or running, completed once it succeeded, aborted once it failed or was canceled.
type RoomRunStatusState string

// RoomSeq Monotonically increasing sequence allocated within one Room.
type RoomSeq = int64

// RoomSnapshotPayload defines model for RoomSnapshotPayload.
type RoomSnapshotPayload struct {
	Kind RoomSnapshotPayloadKind `json:"kind"`

	// Room A member-scoped collaboration space. Current Room members can read the complete Room history, including data committed before they joined. Non-members and callers from another Tenant receive the same not-found response even if they know the Room ID.
	Room Room `json:"room"`
}

// RoomSnapshotPayloadKind defines model for RoomSnapshotPayload.Kind.
type RoomSnapshotPayloadKind string

// RoomUpdateRequest defines model for RoomUpdateRequest.
type RoomUpdateRequest struct {
	Description *string `json:"description,omitempty"`
	Name        *string `json:"name,omitempty"`
}

// Routine A Routine has exactly one of cadence and listener. A listener Routine is AnotherMe's app listener; it can only be paused and resumed, and goes away when the Human revokes AnotherMe's access to the app.
type Routine struct {
	Cadence *RoutineCadence `json:"cadence,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// CreatedByActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CreatedByActorId Id   `json:"created_by_actor_id"`
	Enabled          bool `json:"enabled"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id          Id               `json:"id"`
	Instruction string           `json:"instruction"`
	Listener    *RoutineListener `json:"listener,omitempty"`

	// MentionActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MentionActorId *Id    `json:"mention_actor_id,omitempty"`
	Name           string `json:"name"`

	// NextRunAt UTC timestamp in RFC 3339 format with an explicit offset.
	NextRunAt *Timestamp `json:"next_run_at,omitempty"`
	Revision  int64      `json:"revision"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// RoutineCadence defines model for RoutineCadence.
type RoutineCadence struct {
	// Hour Local hour for daily and weekly cadences.
	Hour *int `json:"hour,omitempty"`

	// IntervalHours Repeat interval for every_n_hours cadences.
	IntervalHours *int `json:"interval_hours,omitempty"`

	// IntervalMinutes Repeat interval in minutes for every_n_minutes cadences, in 10-minute increments.
	IntervalMinutes *int               `json:"interval_minutes,omitempty"`
	Kind            RoutineCadenceKind `json:"kind"`

	// Minute Local minute for daily and weekly cadences.
	Minute *int `json:"minute,omitempty"`

	// RunAt The one moment a once cadence fires; the Routine is done (disabled) afterwards.
	RunAt *time.Time `json:"run_at,omitempty"`

	// Timezone IANA timezone used to evaluate the cadence.
	Timezone string `json:"timezone"`

	// Weekdays Selected local weekdays for weekly cadences, ordered Monday through Sunday in responses. Required for weekly cadences.
	Weekdays *[]RoutineWeekday `json:"weekdays,omitempty"`
}

// RoutineCadenceKind defines model for RoutineCadenceKind.
type RoutineCadenceKind string

// RoutineChangedPayload defines model for RoutineChangedPayload.
type RoutineChangedPayload struct {
	ChangeKind RoutineChangedPayloadChangeKind `json:"change_kind"`
	Kind       interface{}                     `json:"kind"`
	Revision   int64                           `json:"revision"`

	// RoutineId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoutineId Id `json:"routine_id"`

	// RoutineName Name snapshotted when a Routine fires, for Human-facing Message provenance.
	RoutineName *string `json:"routine_name,omitempty"`
}

// RoutineChangedPayloadChangeKind defines model for RoutineChangedPayload.ChangeKind.
type RoutineChangedPayloadChangeKind string

// RoutineCreateRequest defines model for RoutineCreateRequest.
type RoutineCreateRequest struct {
	Cadence RoutineCadence `json:"cadence"`

	// Enabled Defaults to true when omitted.
	Enabled     *bool  `json:"enabled,omitempty"`
	Instruction string `json:"instruction"`

	// MentionActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MentionActorId *Id    `json:"mention_actor_id,omitempty"`
	Name           string `json:"name"`
}

// RoutineListener defines model for RoutineListener.
type RoutineListener struct {
	// App Connected app whose new events the Routine hands to proactive judgement.
	App RoutineListenerApp `json:"app"`
}

// RoutineListenerApp Connected app whose new events the Routine hands to proactive judgement.
type RoutineListenerApp string

// RoutinePage defines model for RoutinePage.
type RoutinePage struct {
	Items []Routine `json:"items"`
	Page  PageMeta  `json:"page"`
}

// RoutineUpdateRequest defines model for RoutineUpdateRequest.
type RoutineUpdateRequest struct {
	Cadence          *RoutineCadence `json:"cadence,omitempty"`
	Enabled          *bool           `json:"enabled,omitempty"`
	ExpectedRevision int64           `json:"expected_revision"`
	Instruction      *string         `json:"instruction,omitempty"`

	// MentionActorId Set to an Agent Actor ID, or null to clear the mention.
	MentionActorId *string `json:"mention_actor_id,omitempty"`
	Name           *string `json:"name,omitempty"`
}

// RoutineWeekday defines model for RoutineWeekday.
type RoutineWeekday string

// RuntimePermissionDecisionView The view of a runtime_permission decision: a tool call that needs the sponsor's approval. title is built by rules from the call and host evidence, never by the judge model; tool and input are the full call.
type RuntimePermissionDecisionView struct {
	// Input The shell command or the native tool input as JSON.
	Input string `json:"input"`

	// Kind gui for browser and desktop actions, code for the rest.
	Kind RuntimePermissionDecisionViewKind `json:"kind"`

	// Page The browser page and target element the host resolved for a GUI action.
	Page *RuntimePermissionPage `json:"page,omitempty"`

	// Patch The diff the action applies to files.
	Patch *string `json:"patch,omitempty"`

	// Rationale The judge model's one-sentence reason for asking.
	Rationale string `json:"rationale"`

	// Screenshot The screen before a GUI action, with its target marked. Only the card's decision owner can load url.
	Screenshot *RuntimePermissionScreenshot `json:"screenshot,omitempty"`
	Script     *RuntimePermissionScript     `json:"script,omitempty"`
	Title      string                       `json:"title"`
	Tool       string                       `json:"tool"`
}

// RuntimePermissionDecisionViewKind gui for browser and desktop actions, code for the rest.
type RuntimePermissionDecisionViewKind string

// RuntimePermissionPage The browser page and target element the host resolved for a GUI action.
type RuntimePermissionPage struct {
	TargetName *string `json:"target_name,omitempty"`
	TargetRole *string `json:"target_role,omitempty"`
	Title      *string `json:"title,omitempty"`
	Url        string  `json:"url"`
}

// RuntimePermissionScreenshot The screen before a GUI action, with its target marked. Only the card's decision owner can load url.
type RuntimePermissionScreenshot struct {
	Height int    `json:"height"`
	Url    string `json:"url"`
	Width  int    `json:"width"`
}

// RuntimePermissionScript defines model for RuntimePermissionScript.
type RuntimePermissionScript struct {
	Body   string  `json:"body"`
	Path   string  `json:"path"`
	Sha256 *string `json:"sha256,omitempty"`
}

// RuntimePresentationEventPage published_through_ordinal is the Run's last committed event ordinal when the page was read.
type RuntimePresentationEventPage struct {
	HasMore                 bool                             `json:"has_more"`
	Items                   []RuntimePresentationEventRecord `json:"items"`
	PublishedThroughOrdinal AgentRuntimeInt64                `json:"published_through_ordinal"`
}

// RuntimePresentationEventRecord defines model for RuntimePresentationEventRecord.
type RuntimePresentationEventRecord struct {
	Event        AgentRuntimePersistedPresentationEvent `json:"event"`
	EventOrdinal AgentRuntimePositiveInt64              `json:"event_ordinal"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId *Id `json:"message_id,omitempty"`

	// SegmentId Stable TeamHub identity of the presentation Segment containing this event.
	SegmentId string `json:"segment_id"`
}

// SaveExternalProviderKeyRequest defines model for SaveExternalProviderKeyRequest.
type SaveExternalProviderKeyRequest struct {
	ApiKey string `json:"api_key"`
}

// SaveVoiceProviderKeyRequest defines model for SaveVoiceProviderKeyRequest.
type SaveVoiceProviderKeyRequest struct {
	ApiKey string `json:"api_key"`
}

// SaveWebSearchKeyRequest defines model for SaveWebSearchKeyRequest.
type SaveWebSearchKeyRequest struct {
	ApiKey string `json:"api_key"`

	// DecisionId The search_key card the key is added from. TeamHub then runs the search or page open that card was posted for against this backend with the new key before saving it, and answers the card with what that call returned. Without it, or for a card posted by a connect request, the key gets the official check.
	DecisionId *string `json:"decision_id,omitempty"`
}

// SearchKeyDecisionView The view of a search_key decision: the web search backend the card shows. origin is requested when the Agent's command named it, and suggested when the command named none and nothing was usable, so TeamHub picked the first backend in its order that still needs a key. reason says why: no key is saved (missing), the provider refused the saved one (rejected), or the keyless You.com searches are used up (free_limit). The Human may add a key for any other backend instead; saving any web search key answers the card configured with that backend.
type SearchKeyDecisionView struct {
	// Backend A backend that takes an API key saved in the product.
	Backend WebSearchKeyBackend         `json:"backend"`
	Origin  SearchKeyDecisionViewOrigin `json:"origin"`
	Reason  SearchKeyDecisionViewReason `json:"reason"`
}

// SearchKeyDecisionViewOrigin defines model for SearchKeyDecisionView.Origin.
type SearchKeyDecisionViewOrigin string

// SearchKeyDecisionViewReason defines model for SearchKeyDecisionView.Reason.
type SearchKeyDecisionViewReason string

// SendMailCanvasRequest defines model for SendMailCanvasRequest.
type SendMailCanvasRequest struct {
	// ConnectionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ConnectionId Id     `json:"connection_id"`
	RequestId    string `json:"request_id"`
	SourceDigest string `json:"source_digest"`
}

// Session defines model for Session.
type Session struct {
	// AccountId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AccountId Id `json:"account_id"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt Timestamp `json:"expires_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id       Id              `json:"id"`
	Identity CurrentIdentity `json:"identity"`
}

// SetDocumentLinkShare defines model for SetDocumentLinkShare.
type SetDocumentLinkShare struct {
	ExpectedVersion int64                    `json:"expected_version"`
	Reset           *bool                    `json:"reset,omitempty"`
	Role            SetDocumentLinkShareRole `json:"role"`
}

// SetDocumentLinkShareRole defines model for SetDocumentLinkShare.Role.
type SetDocumentLinkShareRole string

// SetExternalConnectionAgentAccessRequest defines model for SetExternalConnectionAgentAccessRequest.
type SetExternalConnectionAgentAccessRequest struct {
	Granted bool `json:"granted"`
}

// SetExternalConnectionAutoRemindersRequest defines model for SetExternalConnectionAutoRemindersRequest.
type SetExternalConnectionAutoRemindersRequest struct {
	Enabled bool `json:"enabled"`
}

// SetWebSearchDefaultRequest defines model for SetWebSearchDefaultRequest.
type SetWebSearchDefaultRequest struct {
	// Backend A backend that runs searches.
	Backend WebSearchSearchBackend `json:"backend"`
}

// Sha256 defines model for Sha256.
type Sha256 = string

// SharedDocumentMoveRequest defines model for SharedDocumentMoveRequest.
type SharedDocumentMoveRequest struct {
	MoveToRoot *bool `json:"move_to_root,omitempty"`

	// ParentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ParentId *Id `json:"parent_id,omitempty"`
}

// SharedDocumentTree defines model for SharedDocumentTree.
type SharedDocumentTree struct {
	Items []DocumentPlacementNode `json:"items"`
}

// SkillIdentifier Stable, case-sensitive logical Skill identifier.
type SkillIdentifier = string

// SkillManifest defines model for SkillManifest.
type SkillManifest struct {
	// AccessScope Authorization scope of the stable Skill identity.
	AccessScope SkillManifestAccessScope `json:"access_scope"`

	// Availability Mutable Tenant-market availability kept outside the immutable Package payload. Disabled versions remain visible but cannot be selected for an enabled Binding or new Run Snapshot.
	Availability SkillManifestAvailability `json:"availability"`

	// ConfigSchema JSON Schema describing non-secret configuration. It is TeamHub policy metadata and is not inferred from or merged with files in the Package.
	ConfigSchema map[string]interface{} `json:"config_schema"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// CreatedByActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CreatedByActorId Id     `json:"created_by_actor_id"`
	Description      string `json:"description"`
	FileCount        int    `json:"file_count"`

	// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
	ManifestVersion ManifestVersion `json:"manifest_version"`

	// Name Skill name, the same as package_name.
	Name string `json:"name"`

	// OwnerActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OwnerActorId *Id `json:"owner_actor_id,omitempty"`

	// PackageName Agent Skills frontmatter name and logical Package directory name.
	PackageName string `json:"package_name"`

	// PackageSha256 Deterministic digest of normalized paths and file content hashes. ZIP ordering, timestamps, compression, and an optional single wrapper directory do not affect it.
	PackageSha256 string `json:"package_sha256"`
	SizeBytes     int64  `json:"size_bytes"`

	// SkillId Stable, case-sensitive logical Skill identifier.
	SkillId SkillIdentifier `json:"skill_id"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`

	// UpdatedByActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	UpdatedByActorId Id `json:"updated_by_actor_id"`
}

// SkillManifestAccessScope Authorization scope of the stable Skill identity.
type SkillManifestAccessScope string

// SkillManifestAvailability Mutable Tenant-market availability kept outside the immutable Package payload. Disabled versions remain visible but cannot be selected for an enabled Binding or new Run Snapshot.
type SkillManifestAvailability string

// SkillManifestPage defines model for SkillManifestPage.
type SkillManifestPage struct {
	Items []SkillManifest `json:"items"`
	Page  PageMeta        `json:"page"`
}

// SkillRef defines model for SkillRef.
type SkillRef struct {
	// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
	ManifestVersion ManifestVersion `json:"manifest_version"`

	// SkillId Stable, case-sensitive logical Skill identifier.
	SkillId SkillIdentifier `json:"skill_id"`
}

// SkillSegment defines model for SkillSegment.
type SkillSegment struct {
	// Content Exact slash token shown in raw_message, for example /summarize.
	Content string `json:"content"`

	// ManifestVersion Immutable strict Semantic Version for a Skill Manifest.
	ManifestVersion ManifestVersion `json:"manifest_version"`

	// SkillId Stable, case-sensitive logical Skill identifier.
	SkillId SkillIdentifier `json:"skill_id"`

	// Target Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Target Id     `json:"target"`
	Type   string `json:"type"`
}

// SlackConversation defines model for SlackConversation.
type SlackConversation struct {
	Id        string                `json:"id"`
	IsPrivate bool                  `json:"is_private"`
	Kind      SlackConversationKind `json:"kind"`
	Name      string                `json:"name"`
}

// SlackConversationKind defines model for SlackConversation.Kind.
type SlackConversationKind string

// SlackConversationPage defines model for SlackConversationPage.
type SlackConversationPage struct {
	Conversations []SlackConversation `json:"conversations"`
	NextCursor    *string             `json:"next_cursor,omitempty"`
}

// StateVector defines model for StateVector.
type StateVector = string

// TaskAttemptPolicyV1 defines model for TaskAttemptPolicyV1.
type TaskAttemptPolicyV1 struct {
	MaxRetries          int  `json:"max_retries"`
	PolicyVersion       int  `json:"policy_version"`
	RetryOnAgentFailure bool `json:"retry_on_agent_failure"`
	RetryOnTimeout      bool `json:"retry_on_timeout"`
	TimeoutSeconds      int  `json:"timeout_seconds"`
}

// TaskAttemptSummary defines model for TaskAttemptSummary.
type TaskAttemptSummary struct {
	AttemptNumber int64 `json:"attempt_number"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt            Timestamp `json:"created_at"`
	CurrentInputRevision int64     `json:"current_input_revision"`

	// DeadlineAt UTC timestamp in RFC 3339 format with an explicit offset.
	DeadlineAt *Timestamp `json:"deadline_at,omitempty"`

	// FinishedAt UTC timestamp in RFC 3339 format with an explicit offset.
	FinishedAt *Timestamp `json:"finished_at,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id             Id                       `json:"id"`
	Status         TaskAttemptSummaryStatus `json:"status"`
	StopReasonCode *string                  `json:"stop_reason_code,omitempty"`
}

// TaskAttemptSummaryStatus defines model for TaskAttemptSummary.Status.
type TaskAttemptSummaryStatus string

// TaskConversation defines model for TaskConversation.
type TaskConversation struct {
	Cards  []TaskConversationCard  `json:"cards"`
	Inputs []TaskConversationInput `json:"inputs"`
}

// TaskConversationCard defines model for TaskConversationCard.
type TaskConversationCard struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// DecisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	DecisionId Id `json:"decision_id"`

	// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	MessageId Id `json:"message_id"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`
}

// TaskConversationInput defines model for TaskConversationInput.
type TaskConversationInput struct {
	Author ActorRef `json:"author"`
	Body   string   `json:"body"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// Source A message from the Meta or a person, or a system notice such as a card's result.
	Source TaskConversationInputSource `json:"source"`
}

// TaskConversationInputSource A message from the Meta or a person, or a system notice such as a card's result.
type TaskConversationInputSource string

// TaskExecutionProjection Human-safe current Task execution projection. It excludes Worker leases, effect payloads, and participant Local Run references.
type TaskExecutionProjection struct {
	ControlRevision        int64                                 `json:"control_revision"`
	ControlSettledRevision int64                                 `json:"control_settled_revision"`
	CurrentAttempt         *TaskAttemptSummary                   `json:"current_attempt,omitempty"`
	DesiredControl         TaskExecutionProjectionDesiredControl `json:"desired_control"`
	ExecutionRevision      int64                                 `json:"execution_revision"`

	// ExecutionUpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExecutionUpdatedAt Timestamp     `json:"execution_updated_at"`
	Generation         int64         `json:"generation"`
	ReasonCode         *string       `json:"reason_code,omitempty"`
	RunSpec            TaskRunSpecV1 `json:"run_spec"`

	// Status A delegated Task's state. None is terminal: a Meta message wakes every state but running.
	Status TaskExecutionStatus `json:"status"`

	// TaskId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TaskId Id `json:"task_id"`
}

// TaskExecutionProjectionDesiredControl defines model for TaskExecutionProjection.DesiredControl.
type TaskExecutionProjectionDesiredControl string

// TaskExecutionStatus A delegated Task's state. None is terminal: a Meta message wakes every state but running.
type TaskExecutionStatus string

// TaskRunSpecV1 defines model for TaskRunSpecV1.
type TaskRunSpecV1 struct {
	AttemptPolicy TaskAttemptPolicyV1 `json:"attempt_policy"`

	// ResultAgentActorId The Actor of the Agent whose AlterEgo runs the Task.
	ResultAgentActorId Id  `json:"result_agent_actor_id"`
	SchemaVersion      int `json:"schema_version"`
}

// TaskRuntimePresentationRunPage Room-authorized public Task activities. Unfinished Runs are independent of history pagination; both lists may contain the same Run. History is newest first by Run creation. A Task without a work Room omits work_room_id.
type TaskRuntimePresentationRunPage struct {
	ActiveItems  []RoomRunStatus `json:"active_items"`
	HistoryItems []RoomRunStatus `json:"history_items"`
	NextCursor   *string         `json:"next_cursor,omitempty"`

	// WorkRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkRoomId *Id `json:"work_room_id,omitempty"`
}

// TeamMdDocument One Room's parsed collaboration protocol document. TeamHub owns parsing so every consumer reads the same structure; raw_markdown is the verbatim submitted content.
type TeamMdDocument struct {
	// CollaboratePattern Collaboration pattern declared in the team.md frontmatter. TeamHub matches this value exactly; it does not normalize spelling, spacing, or case.
	CollaboratePattern TeamMdPattern `json:"collaborate_pattern"`

	// Members Team Members in document declaration order.
	Members []TeamMdParticipant `json:"members"`

	// Orchestrator One Orchestrator or Team Member declared in a team.md.
	Orchestrator TeamMdParticipant `json:"orchestrator"`

	// RawMarkdown The submitted team.md content, stored verbatim and projected to Agents unchanged.
	RawMarkdown string `json:"raw_markdown"`

	// Revision Monotonic revision of this Room's team.md. Each accepted submission replaces the previous one.
	Revision int64 `json:"revision"`

	// TaskGoal The shared goal this team is collaborating to reach.
	TaskGoal string `json:"task_goal"`

	// UpdatedAt When TeamHub accepted the current revision.
	UpdatedAt time.Time `json:"updated_at"`
}

// TeamMdParticipant One Orchestrator or Team Member declared in a team.md.
type TeamMdParticipant struct {
	// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ActorId Id `json:"actor_id"`

	// Name Document-local display name. Relationships reference this value, not the Actor ID.
	Name string `json:"name"`

	// ReceiveFrom Declared names this participant receives handoffs from. Empty when the document says none.
	ReceiveFrom []string `json:"receive_from"`

	// ReportTo Declared names this participant reports to. Empty when the document says none.
	ReportTo []string `json:"report_to"`

	// Role Optional description of what this participant is responsible for.
	Role *string `json:"role,omitempty"`
}

// TeamMdPattern Collaboration pattern declared in the team.md frontmatter. TeamHub matches this value exactly; it does not normalize spelling, spacing, or case.
type TeamMdPattern string

// TeamMdPublishedPayload An Agent published a new revision of the Room's team.md. Clients read the document from GET /v0/rooms/{roomId}/team-md.
type TeamMdPublishedPayload struct {
	Kind     interface{} `json:"kind"`
	Revision int64       `json:"revision"`
}

// Tenant The deployment's Space. It has no row of its own; its name follows the Human's display name.
type Tenant struct {
	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// Name The Human's display name (at most 120 characters) followed by "'s Workspace".
	Name string `json:"name"`
}

// TenantAgent defines model for TenantAgent.
type TenantAgent struct {
	Actor Actor `json:"actor"`

	// AgentManagementId Opaque AgentManagement identifier.
	AgentManagementId string `json:"agent_management_id"`

	// AgentType Persisted Agent runtime type.
	AgentType AgentType `json:"agent_type"`

	// AvatarImageUrl Same-origin URL of the uploaded image shown on the avatar background when avatar_key selects an image. The URL carries the image version, so it changes whenever the image does and each version may be cached indefinitely. Omitted when the Agent has no uploaded image.
	AvatarImageUrl *string `json:"avatar_image_url,omitempty"`

	// AvatarKey Product avatar selection: `figure:<name>:RRGGBB` (the named animal character on a background) or `image:RRGGBB` (the uploaded image on a background). Set at creation and replaced through the Agent avatar endpoint.
	AvatarKey             *string `json:"avatar_key,omitempty"`
	ConfigurationRevision int64   `json:"configuration_revision"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt    Timestamp `json:"created_at"`
	CreatedBy    ActorRef  `json:"created_by"`
	Description  string    `json:"description"`
	Instructions string    `json:"instructions"`

	// Runtime The local Runtime an Agent runs is placement.runtime_type.
	Runtime       AgentRuntimeConfig       `json:"runtime"`
	SkillBindings []AgentSkillRegistration `json:"skill_bindings"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`

	// VisibilityScope Tenant directory visibility only. Sponsor visibility does not hide the Agent from members of a Room where the Sponsor explicitly admitted it, and workspace visibility does not grant Agent management or ordinary Room admission rights.
	VisibilityScope AgentVisibilityScope `json:"visibility_scope"`
}

// TenantAgentAvailability defines model for TenantAgentAvailability.
type TenantAgentAvailability struct {
	// ActiveTaskCount Number of non-terminal managed Tasks assigned to this Agent.
	ActiveTaskCount int64                       `json:"active_task_count"`
	CurrentActivity *TenantAgentCurrentActivity `json:"current_activity,omitempty"`

	// Label English wording of the status, the fallback for clients that do not know `reason`.
	Label string `json:"label"`

	// Reason Why the Agent has its status, as a stable code clients word in their own language. `label` and `current_activity.summary` carry the same state in English for clients that do not know the code. With `runtime_error` the summary is the Runtime's own diagnostic text.
	Reason *TenantAgentAvailabilityReason `json:"reason,omitempty"`

	// Status Runtime availability. Managed Task execution is represented by active_task_count.
	Status TenantAgentAvailabilityStatus `json:"status"`
}

// TenantAgentAvailabilityPage defines model for TenantAgentAvailabilityPage.
type TenantAgentAvailabilityPage struct {
	Items []TenantAgentAvailabilitySnapshot `json:"items"`
	Page  PageMeta                          `json:"page"`
}

// TenantAgentAvailabilityReason Why the Agent has its status, as a stable code clients word in their own language. `label` and `current_activity.summary` carry the same state in English for clients that do not know the code. With `runtime_error` the summary is the Runtime's own diagnostic text.
type TenantAgentAvailabilityReason string

// TenantAgentAvailabilitySnapshot defines model for TenantAgentAvailabilitySnapshot.
type TenantAgentAvailabilitySnapshot struct {
	// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ActorId            Id                       `json:"actor_id"`
	Availability       TenantAgentAvailability  `json:"availability"`
	LocalRuntimeStatus *LocalAgentRuntimeStatus `json:"local_runtime_status,omitempty"`
}

// TenantAgentAvailabilityStatus Runtime availability. Managed Task execution is represented by active_task_count.
type TenantAgentAvailabilityStatus string

// TenantAgentAvatarUpdateRequest defines model for TenantAgentAvatarUpdateRequest.
type TenantAgentAvatarUpdateRequest struct {
	// AvatarImage JPEG, PNG, or WebP data URL. An empty string removes the uploaded image; omitting it keeps the current image.
	AvatarImage *string `json:"avatar_image,omitempty"`
	AvatarKey   string  `json:"avatar_key"`
}

// TenantAgentCreateRequest defines model for TenantAgentCreateRequest.
type TenantAgentCreateRequest struct {
	// AgentType Agent type selectable through Human-facing Agent creation APIs. AnotherMe Agents are provisioned by TeamHub for their Human, never created through these APIs.
	AgentType *CreatableAgentType `json:"agent_type,omitempty"`

	// AvatarKey Product avatar selection stored with the Agent so every Human sees the same avatar. Clients that do not recognise the key fall back to their own derived default.
	AvatarKey    *string `json:"avatar_key,omitempty"`
	Description  *string `json:"description,omitempty"`
	Instructions string  `json:"instructions"`
	Name         string  `json:"name"`

	// Runtime The local Runtime an Agent runs is placement.runtime_type.
	Runtime AgentRuntimeConfig `json:"runtime"`

	// SkillBindings Initial enabled Agent Skill bindings; skill_id values must be unique. Configuration defaults to an empty object and must satisfy each selected Manifest.
	SkillBindings *[]AgentSkillRegistration `json:"skill_bindings,omitempty"`

	// TemplateId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TemplateId *Id `json:"template_id,omitempty"`

	// VisibilityScope Tenant directory visibility only. Sponsor visibility does not hide the Agent from members of a Room where the Sponsor explicitly admitted it, and workspace visibility does not grant Agent management or ordinary Room admission rights.
	VisibilityScope *AgentVisibilityScope `json:"visibility_scope,omitempty"`
}

// TenantAgentCurrentActivity defines model for TenantAgentCurrentActivity.
type TenantAgentCurrentActivity struct {
	// RunId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RunId   *Id    `json:"run_id,omitempty"`
	Summary string `json:"summary"`

	// WorkItemId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkItemId *Id `json:"work_item_id,omitempty"`
}

// TenantAgentPage defines model for TenantAgentPage.
type TenantAgentPage struct {
	Items []TenantAgent `json:"items"`
	Page  PageMeta      `json:"page"`
}

// TenantAgentUpdateRequest defines model for TenantAgentUpdateRequest.
type TenantAgentUpdateRequest struct {
	Description                   *string `json:"description,omitempty"`
	ExpectedConfigurationRevision int64   `json:"expected_configuration_revision"`

	// Instructions Updated Agent instructions. Omit to preserve the current instructions; changes require the Sponsor and an idle Agent.
	Instructions *string `json:"instructions,omitempty"`
	Name         *string `json:"name,omitempty"`

	// Runtime The local Runtime an Agent runs is placement.runtime_type.
	Runtime *AgentRuntimeConfig `json:"runtime,omitempty"`
}

// TenantList defines model for TenantList.
type TenantList struct {
	Items []Tenant `json:"items"`
}

// TenantRoomActivity defines model for TenantRoomActivity.
type TenantRoomActivity struct {
	// FailedRoomIds Room IDs whose latest visible Local Run in the last 7 days is failed and that have no running Local Run. An empty array means no visible Room has a current failed run.
	FailedRoomIds []string `json:"failed_room_ids"`

	// RunningRoomIds Room IDs with at least one running Local Run in an active Room Agent membership that has not replied (see RoomRunStatus.replied). Work in a Thread counts for its parent Room. An empty array means no visible Room is working.
	RunningRoomIds []string `json:"running_room_ids"`
}

// TextSegment defines model for TextSegment.
type TextSegment struct {
	Content string `json:"content"`
	Type    string `json:"type"`
}

// ThreadRoom defines model for ThreadRoom.
type ThreadRoom struct {
	// Room A member-scoped collaboration space. Current Room members can read the complete Room history, including data committed before they joined. Non-members and callers from another Tenant receive the same not-found response even if they know the Room ID.
	Room Room `json:"room"`
}

// Timestamp UTC timestamp in RFC 3339 format with an explicit offset.
type Timestamp = time.Time

// UnifiedDocumentActor defines model for UnifiedDocumentActor.
type UnifiedDocumentActor = ActorRef

// UnifiedDocumentCapabilities defines model for UnifiedDocumentCapabilities.
type UnifiedDocumentCapabilities struct {
	Comment      bool `json:"comment"`
	Delete       bool `json:"delete"`
	Duplicate    bool `json:"duplicate"`
	Export       bool `json:"export"`
	Manage       bool `json:"manage"`
	Read         bool `json:"read"`
	UseAsContext bool `json:"use_as_context"`
	Write        bool `json:"write"`
}

// UnifiedDocumentFrom defines model for UnifiedDocumentFrom.
type UnifiedDocumentFrom struct {
	BindingKind UnifiedDocumentFromBindingKind `json:"binding_kind"`

	// ContextId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ContextId Id      `json:"context_id"`
	Label     *string `json:"label,omitempty"`

	// PageKey Present for wiki_page bindings; preserves the generated Personal Wiki path used to derive its read-only folder hierarchy.
	PageKey *string `json:"page_key,omitempty"`
}

// UnifiedDocumentFromBindingKind defines model for UnifiedDocumentFrom.BindingKind.
type UnifiedDocumentFromBindingKind string

// UnifiedDocumentNullableVersionRef defines model for UnifiedDocumentNullableVersionRef.
type UnifiedDocumentNullableVersionRef = *UnifiedDocumentVersionRef

// UnifiedDocumentStatus defines model for UnifiedDocumentStatus.
type UnifiedDocumentStatus string

// UnifiedDocumentVersionRef defines model for UnifiedDocumentVersionRef.
type UnifiedDocumentVersionRef struct {
	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id            Id     `json:"id"`
	Sha256        string `json:"sha256"`
	VersionNumber int    `json:"version_number"`
}

// VoiceCapture defines model for VoiceCapture.
type VoiceCapture struct {
	ArchivedThroughMs *int64 `json:"archived_through_ms,omitempty"`

	// AudioDocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	AudioDocumentVersionId *Id `json:"audio_document_version_id,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// GapCount Number of authoritative unrecoverable media gaps observed during this Capture.
	GapCount int64 `json:"gap_count"`

	// GapDurationMs Total duration of authoritative unrecoverable media gaps during this Capture.
	GapDurationMs int64 `json:"gap_duration_ms"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id              Id      `json:"id"`
	LastFailureCode *string `json:"last_failure_code,omitempty"`

	// QuickNotes Quick notes written from the transcript seconds after the completion Message, which promised them. title and sections are present once state is ready; failed means the Message keeps only the recording and transcript.
	QuickNotes *VoiceCaptureQuickNotes `json:"quick_notes,omitempty"`

	// RequestedStartOffsetMs Original Capture start request on the VoiceSession audio timeline. Stable across media startup alignment; scopes transient ASR previews, not archived audio trimming.
	RequestedStartOffsetMs int64 `json:"requested_start_offset_ms"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id `json:"room_id"`

	// SourceAudioDocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	SourceAudioDocumentVersionId *Id                `json:"source_audio_document_version_id,omitempty"`
	Status                       VoiceCaptureStatus `json:"status"`

	// TranscriptDocumentVersionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TranscriptDocumentVersionId  *Id                                   `json:"transcript_document_version_id,omitempty"`
	TranscriptRecoveryProgressMs *int64                                `json:"transcript_recovery_progress_ms,omitempty"`
	TranscriptRecoveryStatus     *VoiceCaptureTranscriptRecoveryStatus `json:"transcript_recovery_status,omitempty"`
	TranscriptRecoveryTotalMs    *int64                                `json:"transcript_recovery_total_ms,omitempty"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`

	// VoiceSessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	VoiceSessionId Id `json:"voice_session_id"`
}

// VoiceCaptureTranscriptRecoveryStatus defines model for VoiceCapture.TranscriptRecoveryStatus.
type VoiceCaptureTranscriptRecoveryStatus string

// VoiceCaptureQuestion defines model for VoiceCaptureQuestion.
type VoiceCaptureQuestion struct {
	// Answer The answer; empty for a task request.
	Answer string `json:"answer"`

	// Answered False when the recording so far does not settle the question.
	Answered  bool      `json:"answered"`
	CreatedAt time.Time `json:"created_at"`

	// CutoffOffsetMs End of the last confirmed transcript the answer could read.
	CutoffOffsetMs int64  `json:"cutoff_offset_ms"`
	Id             string `json:"id"`

	// Kind answer when the recording's Agent answered the question; task when it recognized a request for the caller's Another Me to act, which is handed to Another Me as a background Task request.
	Kind     VoiceCaptureQuestionKind `json:"kind"`
	Question string                   `json:"question"`

	// SentMessageId The hidden Message that handed this task request to the caller's Another Me; absent until it is sent.
	SentMessageId *string                      `json:"sent_message_id,omitempty"`
	Sources       []VoiceCaptureQuestionSource `json:"sources"`

	// TaskTitle Short title the recording's Agent gave a task request.
	TaskTitle *string `json:"task_title,omitempty"`
}

// VoiceCaptureQuestionKind answer when the recording's Agent answered the question; task when it recognized a request for the caller's Another Me to act, which is handed to Another Me as a background Task request.
type VoiceCaptureQuestionKind string

// VoiceCaptureQuestionList defines model for VoiceCaptureQuestionList.
type VoiceCaptureQuestionList struct {
	Items []VoiceCaptureQuestion `json:"items"`
}

// VoiceCaptureQuestionRequest defines model for VoiceCaptureQuestionRequest.
type VoiceCaptureQuestionRequest struct {
	Question string `json:"question"`
}

// VoiceCaptureQuestionSource defines model for VoiceCaptureQuestionSource.
type VoiceCaptureQuestionSource struct {
	EndOffsetMs   int64  `json:"end_offset_ms"`
	StartOffsetMs int64  `json:"start_offset_ms"`
	Text          string `json:"text"`
}

// VoiceCaptureQuickNotes Quick notes written from the transcript seconds after the completion Message, which promised them. title and sections are present once state is ready; failed means the Message keeps only the recording and transcript.
type VoiceCaptureQuickNotes struct {
	Sections *[]struct {
		Bullets []string `json:"bullets"`
		Heading string   `json:"heading"`
	} `json:"sections,omitempty"`
	State VoiceCaptureQuickNotesState `json:"state"`
	Title *string                     `json:"title,omitempty"`
}

// VoiceCaptureQuickNotesState defines model for VoiceCaptureQuickNotes.State.
type VoiceCaptureQuickNotesState string

// VoiceCaptureStartRequest defines model for VoiceCaptureStartRequest.
type VoiceCaptureStartRequest struct {
	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId        Id    `json:"room_id"`
	StartOffsetMs int64 `json:"start_offset_ms"`
}

// VoiceCaptureStatus defines model for VoiceCaptureStatus.
type VoiceCaptureStatus string

// VoiceConnectionCredential defines model for VoiceConnectionCredential.
type VoiceConnectionCredential struct {
	// Credential Short-lived opaque LiveKit participant grant.
	Credential string `json:"credential"`
	Endpoint   string `json:"endpoint"`

	// ExpiresAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExpiresAt  Timestamp `json:"expires_at"`
	Generation int64     `json:"generation"`
}

// VoiceDictationCommitReceipt defines model for VoiceDictationCommitReceipt.
type VoiceDictationCommitReceipt struct {
	// RequestId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RequestId Id                                `json:"request_id"`
	Status    VoiceDictationCommitReceiptStatus `json:"status"`
}

// VoiceDictationCommitReceiptStatus defines model for VoiceDictationCommitReceipt.Status.
type VoiceDictationCommitReceiptStatus string

// VoiceDictationCommitRequest Transient request to finalize the current dictation turn. Retry with the same request ID; ordinary chat message idempotence uses the resulting dictation_turn event ID.
type VoiceDictationCommitRequest struct {
	// RequestId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RequestId Id `json:"request_id"`
}

// VoiceEvent defines model for VoiceEvent.
type VoiceEvent struct {
	Capture    *VoiceCapture         `json:"capture,omitempty"`
	Kind       VoiceEventKind        `json:"kind"`
	Session    *VoiceSession         `json:"session,omitempty"`
	Transcript *VoiceTranscriptEvent `json:"transcript,omitempty"`
}

// VoiceEventKind defines model for VoiceEvent.Kind.
type VoiceEventKind string

// VoiceEventPage Transcript events committed after the cursor, in commit order, followed on the last page by the current VoiceSession and its unfinished and newest Captures. Session and Capture items are current snapshots, not changes, and may repeat; clients upsert every item by resource ID. Cursors are opaque and scoped to one VoiceSession. Partial snapshots have no cursor.
type VoiceEventPage struct {
	HasMore    bool         `json:"has_more"`
	Items      []VoiceEvent `json:"items"`
	NextCursor string       `json:"next_cursor"`
}

// VoiceLiveTurnMarker Marks a Human Message as a turn the caller's own active chat_live VoiceSession answers. TeamHub records it once for that turn. A turn the live model handed to a live task (start_task or reply_to_task) is routed to Room Agents as usual; any other turn does not wake them. The marker never grants authority.
type VoiceLiveTurnMarker struct {
	// TurnId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TurnId Id `json:"turn_id"`

	// VoiceSessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	VoiceSessionId Id `json:"voice_session_id"`
}

// VoiceMediaPolicy defines model for VoiceMediaPolicy.
type VoiceMediaPolicy struct {
	// ActiveRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ActiveRoomId *Id `json:"active_room_id,omitempty"`

	// LiveEnabled Whether this tenant may enter live voice mode.
	LiveEnabled *bool `json:"live_enabled,omitempty"`

	// LiveSupported Whether the xAI live voice provider is configured; Live does not need Soniox.
	LiveSupported *bool                   `json:"live_supported,omitempty"`
	SonioxKey     *VoiceProviderKeyStatus `json:"soniox_key,omitempty"`

	// VoiceAvailable The deployment can run voice (TEAMHUB_VOICE_MEDIA=on); clients show voice entries only when true.
	VoiceAvailable *bool `json:"voice_available,omitempty"`

	// VoiceMediaSupported Soniox ASR is configured, so Recording, Pocket notes dictation and Voice Mode dictation are available.
	VoiceMediaSupported bool                    `json:"voice_media_supported"`
	XaiKey              *VoiceProviderKeyStatus `json:"xai_key,omitempty"`
}

// VoiceProvider defines model for VoiceProvider.
type VoiceProvider string

// VoiceProviderKeyStatus defines model for VoiceProviderKeyStatus.
type VoiceProviderKeyStatus struct {
	// CanSave False when the provider's environment variable is set, no secret encryption key is configured, or voice media is off.
	CanSave bool `json:"can_save"`

	// Source Where the effective key comes from; the environment wins over a stored key.
	Source VoiceProviderKeyStatusSource `json:"source"`
}

// VoiceProviderKeyStatusSource Where the effective key comes from; the environment wins over a stored key.
type VoiceProviderKeyStatusSource string

// VoiceSession defines model for VoiceSession.
type VoiceSession struct {
	// ClosedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ClosedAt *Timestamp `json:"closed_at,omitempty"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// CreatedByActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CreatedByActorId     Id    `json:"created_by_actor_id"`
	CredentialGeneration int64 `json:"credential_generation"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// InputEndedOffsetMs Latest persisted track_ended offset, reported only after preceding transcript callbacks are accepted. A value older than input_started_offset_ms does not confirm the current input has drained. Absent until an input drains.
	InputEndedOffsetMs *int64 `json:"input_ended_offset_ms,omitempty"`

	// InputReadyGeneration Publisher generation whose Runtime has opened its ASR consumer. Zero means not ready.
	InputReadyGeneration *int64 `json:"input_ready_generation,omitempty"`

	// InputStartedOffsetMs Latest persisted track_started offset on the session audio clock. Absent until Runtime reports an input boundary.
	InputStartedOffsetMs *int64  `json:"input_started_offset_ms,omitempty"`
	LastFailureCode      *string `json:"last_failure_code,omitempty"`
	PartialEndOffsetMs   *int64  `json:"partial_end_offset_ms,omitempty"`
	PartialStartOffsetMs *int64  `json:"partial_start_offset_ms,omitempty"`

	// PartialTranscript Latest uncommitted ASR hypothesis. It is cleared when a final event arrives and is never used for the formal transcript.
	PartialTranscript *string             `json:"partial_transcript,omitempty"`
	Purpose           VoiceSessionPurpose `json:"purpose"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId Id                 `json:"room_id"`
	Status VoiceSessionStatus `json:"status"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
}

// VoiceSessionCreateRequest defines model for VoiceSessionCreateRequest.
type VoiceSessionCreateRequest struct {
	Purpose VoiceSessionPurpose `json:"purpose"`
}

// VoiceSessionPurpose defines model for VoiceSessionPurpose.
type VoiceSessionPurpose string

// VoiceSessionStatus defines model for VoiceSessionStatus.
type VoiceSessionStatus string

// VoiceTranscriptEvent defines model for VoiceTranscriptEvent.
type VoiceTranscriptEvent struct {
	// AcceptedAt UTC timestamp in RFC 3339 format with an explicit offset.
	AcceptedAt Timestamp `json:"accepted_at"`

	// CaptureSessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CaptureSessionId *Id   `json:"capture_session_id,omitempty"`
	EndOffsetMs      int64 `json:"end_offset_ms"`

	// EventId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	EventId Id `json:"event_id"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id         Id                       `json:"id"`
	Kind       VoiceTranscriptEventKind `json:"kind"`
	Lane       VoiceTranscriptEventLane `json:"lane"`
	MediaEpoch int32                    `json:"media_epoch"`

	// SpeakerId Session-scoped anonymous speaker cluster. Omitted when the provider did not label this window.
	SpeakerId     *string `json:"speaker_id,omitempty"`
	StartOffsetMs int64   `json:"start_offset_ms"`
	Text          string  `json:"text"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`

	// VoiceSessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	VoiceSessionId Id `json:"voice_session_id"`
}

// VoiceTranscriptEventLane defines model for VoiceTranscriptEvent.Lane.
type VoiceTranscriptEventLane string

// VoiceTranscriptEventKind defines model for VoiceTranscriptEventKind.
type VoiceTranscriptEventKind string

// VoiceTranscriptEventPage defines model for VoiceTranscriptEventPage.
type VoiceTranscriptEventPage struct {
	// EventCursor Voice event cursor read in the same snapshot as this HTTP page; every transcript event committed later is delivered after it by the event feed. Absent from SSE partial frames.
	EventCursor          *string                `json:"event_cursor,omitempty"`
	Items                []VoiceTranscriptEvent `json:"items"`
	PartialEndOffsetMs   *int64                 `json:"partial_end_offset_ms,omitempty"`
	PartialStartOffsetMs *int64                 `json:"partial_start_offset_ms,omitempty"`
	PartialTranscript    *string                `json:"partial_transcript,omitempty"`
}

// WebSearchBackend One backend with the static text a client shows for it and its live state. status is ready when a call would run now: DuckDuckGo and direct always, You.com also without a key, the others with a key that is not rejected.
type WebSearchBackend struct {
	Commands []WebSearchCommand `json:"commands"`

	// Description The provider's own one-line description of its product.
	Description string `json:"description"`

	// Filters The search filters the backend honors; any other is refused before a call.
	Filters []WebSearchFilter `json:"filters"`

	// FreeTier The provider's free allowance, for display.
	FreeTier *string `json:"free_tier,omitempty"`

	// Id A web search backend. duckduckgo searches without a key. direct opens pages only and is fetched by the Agent CLI on the Agent's computer; TeamHub never fetches a page itself.
	Id       WebSearchBackendId       `json:"id"`
	KeyState WebSearchBackendKeyState `json:"key_state"`

	// KeyUrl Where the Human gets a key.
	KeyUrl *string `json:"key_url,omitempty"`

	// Keyless Whether the backend works without a saved key.
	Keyless bool `json:"keyless"`

	// MaxLimit The most results one search returns; 0 for a backend without search.
	MaxLimit int `json:"max_limit"`

	// MaxSites How many sites one search may name; 0 when it takes no site filter.
	MaxSites int    `json:"max_sites"`
	Name     string `json:"name"`

	// OfficialKeyCheck Whether the provider has an official endpoint TeamHub checks a key with before saving it. Without one the key is saved unverified and proven by its first call.
	OfficialKeyCheck bool `json:"official_key_check"`

	// Quota Left out when the caller asked for the list without quota.
	Quota  *WebSearchQuota        `json:"quota,omitempty"`
	Status WebSearchBackendStatus `json:"status"`

	// Tier How a call to the backend runs now. key: with an API key saved in the product (or one it still needs); free: without a key, on a free service with limits that TeamHub does not count (DuckDuckGo, and You.com without a key); none: direct, which needs no account.
	Tier WebSearchBackendTier `json:"tier"`

	// TierText A short display line for the tier, set for free.
	TierText *string `json:"tier_text,omitempty"`
}

// WebSearchBackendKeyState defines model for WebSearchBackend.KeyState.
type WebSearchBackendKeyState string

// WebSearchBackendStatus defines model for WebSearchBackend.Status.
type WebSearchBackendStatus string

// WebSearchBackendTier How a call to the backend runs now. key: with an API key saved in the product (or one it still needs); free: without a key, on a free service with limits that TeamHub does not count (DuckDuckGo, and You.com without a key); none: direct, which needs no account.
type WebSearchBackendTier string

// WebSearchBackendId A web search backend. duckduckgo searches without a key. direct opens pages only and is fetched by the Agent CLI on the Agent's computer; TeamHub never fetches a page itself.
type WebSearchBackendId string

// WebSearchBackendList Every backend in TeamHub's default order. default_search is the backend a search without one uses now: the default a Human saved (chosen_default_search) even when its key stopped working, else the first backend with a usable key in that order, else duckduckgo.
type WebSearchBackendList struct {
	Backends []WebSearchBackend `json:"backends"`

	// CanSaveKeys False when the deployment has no TEAMHUB_SECRET_ENCRYPTION_KEY to seal keys with.
	CanSaveKeys bool `json:"can_save_keys"`

	// ChosenDefaultSearch A backend that runs searches.
	ChosenDefaultSearch *WebSearchSearchBackend `json:"chosen_default_search,omitempty"`
	DefaultOpen         string                  `json:"default_open"`

	// DefaultSearch A backend that runs searches.
	DefaultSearch WebSearchSearchBackend `json:"default_search"`
}

// WebSearchCommand defines model for WebSearchCommand.
type WebSearchCommand string

// WebSearchDefault defines model for WebSearchDefault.
type WebSearchDefault struct {
	// ChosenDefaultSearch A backend that runs searches.
	ChosenDefaultSearch *WebSearchSearchBackend `json:"chosen_default_search,omitempty"`

	// DefaultSearch A backend that runs searches.
	DefaultSearch WebSearchSearchBackend `json:"default_search"`
}

// WebSearchFilter defines model for WebSearchFilter.
type WebSearchFilter string

// WebSearchKeyBackend A backend that takes an API key saved in the product.
type WebSearchKeyBackend string

// WebSearchQuota What is left on the backend's account. from says where the numbers came from: provider is the provider's official usage endpoint read for this response; last_response is the rate-limit headers of the last call (Brave), as of observed_at; unavailable carries no numbers and reason says why.
type WebSearchQuota struct {
	From WebSearchQuotaFrom `json:"from"`

	// Limit Absent when the provider reports no cap.
	Limit *float32 `json:"limit,omitempty"`

	// ObservedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ObservedAt *Timestamp `json:"observed_at,omitempty"`
	Plan       *string    `json:"plan,omitempty"`

	// Reason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.
	Reason    *WebSearchQuotaReason `json:"reason,omitempty"`
	Remaining *float32              `json:"remaining,omitempty"`

	// ResetsAt UTC timestamp in RFC 3339 format with an explicit offset.
	ResetsAt *Timestamp          `json:"resets_at,omitempty"`
	Unit     *WebSearchQuotaUnit `json:"unit,omitempty"`
}

// WebSearchQuotaFrom defines model for WebSearchQuota.From.
type WebSearchQuotaFrom string

// WebSearchQuotaReason no_key: no key is saved; not_reported: there is no usage endpoint to read (keyless You.com, DuckDuckGo, Exa, direct); not_observed: Brave has answered no call yet; key_rejected: the provider refused the saved key; provider_unavailable: the usage endpoint did not answer in time.
type WebSearchQuotaReason string

// WebSearchQuotaUnit defines model for WebSearchQuota.Unit.
type WebSearchQuotaUnit string

// WebSearchSearchBackend A backend that runs searches.
type WebSearchSearchBackend string

// WorkItem defines model for WorkItem.
type WorkItem struct {
	// ArchivedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ArchivedAt *Timestamp           `json:"archived_at,omitempty"`
	Assignees  []WorkItemAssignment `json:"assignees"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt            Timestamp             `json:"created_at"`
	CreatedBy            ActorRef              `json:"created_by"`
	Description          string                `json:"description"`
	ExplicitAccessGrants []WorkItemAccessGrant `json:"explicit_access_grants"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id           `json:"id"`
	Kind WorkItemKind `json:"kind"`

	// Number Stable Tenant-scoped Work Item display number.
	Number int64 `json:"number"`

	// OriginMessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OriginMessageId *Id `json:"origin_message_id,omitempty"`

	// OriginRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OriginRoomId     *Id                           `json:"origin_room_id,omitempty"`
	Priority         WorkItemPriority              `json:"priority"`
	ReferencedActors []ActorRef                    `json:"referenced_actors"`
	Resolution       *WorkItemResolution           `json:"resolution,omitempty"`
	State            WorkItemState                 `json:"state"`
	TaskExecution    *WorkItemTaskExecutionSummary `json:"task_execution,omitempty"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id     `json:"tenant_id"`
	Title    string `json:"title"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
	UpdatedBy ActorRef  `json:"updated_by"`
	Version   int64     `json:"version"`

	// WorkRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkRoomId *Id `json:"work_room_id,omitempty"`
}

// WorkItemAccessGrant defines model for WorkItemAccessGrant.
type WorkItemAccessGrant struct {
	Actor ActorRef `json:"actor"`

	// GrantedAt UTC timestamp in RFC 3339 format with an explicit offset.
	GrantedAt Timestamp `json:"granted_at"`
	GrantedBy ActorRef  `json:"granted_by"`
}

// WorkItemActivity defines model for WorkItemActivity.
type WorkItemActivity struct {
	Actor ActorRef `json:"actor"`

	// CommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	CommentId *Id `json:"comment_id,omitempty"`

	// Details Restricted activity-specific audit details. execution_control_requested includes action, control_revision, source_kind, source_id, and optional reason; task_recovery_decision includes action, generation, intervention identity/version, and source_kind.
	Details   map[string]interface{} `json:"details"`
	FromState *WorkItemState         `json:"from_state,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id   Id                   `json:"id"`
	Kind WorkItemActivityKind `json:"kind"`

	// OccurredAt UTC timestamp in RFC 3339 format with an explicit offset.
	OccurredAt Timestamp `json:"occurred_at"`

	// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	RoomId *Id `json:"room_id,omitempty"`

	// TargetActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TargetActorId *Id            `json:"target_actor_id,omitempty"`
	ToState       *WorkItemState `json:"to_state,omitempty"`

	// WorkItemId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkItemId Id `json:"work_item_id"`
}

// WorkItemActivityKind defines model for WorkItemActivityKind.
type WorkItemActivityKind string

// WorkItemActivityTimelineEntry defines model for WorkItemActivityTimelineEntry.
type WorkItemActivityTimelineEntry struct {
	Activity WorkItemActivity `json:"activity"`
	Type     string           `json:"type"`
}

// WorkItemAssignment defines model for WorkItemAssignment.
type WorkItemAssignment struct {
	Actor ActorRef `json:"actor"`

	// AssignedAt UTC timestamp in RFC 3339 format with an explicit offset.
	AssignedAt Timestamp `json:"assigned_at"`
	AssignedBy ActorRef  `json:"assigned_by"`
}

// WorkItemChangedPayload defines model for WorkItemChangedPayload.
type WorkItemChangedPayload struct {
	Kind    interface{} `json:"kind"`
	Version int64       `json:"version"`

	// WorkItemId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkItemId Id `json:"work_item_id"`
}

// WorkItemComment defines model for WorkItemComment.
type WorkItemComment struct {
	Author ActorRef `json:"author"`

	// Body Empty only for a soft-deleted Comment tombstone.
	Body string `json:"body"`

	// CreatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	CreatedAt Timestamp `json:"created_at"`

	// DeletedAt UTC timestamp in RFC 3339 format with an explicit offset.
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	// Id Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	Id Id `json:"id"`

	// Segments Empty only for a soft-deleted Comment tombstone.
	Segments []WorkItemCommentSegment `json:"segments"`

	// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	TenantId Id `json:"tenant_id"`

	// UpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	UpdatedAt Timestamp `json:"updated_at"`
	Version   int64     `json:"version"`

	// WorkItemId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	WorkItemId Id `json:"work_item_id"`
}

// WorkItemCommentCreateRequest Concatenating segment content in order must equal body.
type WorkItemCommentCreateRequest struct {
	Body     string                   `json:"body"`
	Segments []WorkItemCommentSegment `json:"segments"`
}

// WorkItemCommentPage defines model for WorkItemCommentPage.
type WorkItemCommentPage struct {
	Items []WorkItemComment `json:"items"`
	Page  PageMeta          `json:"page"`
}

// WorkItemCommentReferenceSegment defines model for WorkItemCommentReferenceSegment.
type WorkItemCommentReferenceSegment struct {
	// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	ActorId Id     `json:"actor_id"`
	Content string `json:"content"`
	Type    string `json:"type"`
}

// WorkItemCommentSegment defines model for WorkItemCommentSegment.
type WorkItemCommentSegment struct {
	union json.RawMessage
}

// WorkItemCommentTextSegment defines model for WorkItemCommentTextSegment.
type WorkItemCommentTextSegment struct {
	Content string `json:"content"`
	Type    string `json:"type"`
}

// WorkItemCommentTimelineEntry defines model for WorkItemCommentTimelineEntry.
type WorkItemCommentTimelineEntry struct {
	Comment WorkItemComment `json:"comment"`
	Type    string          `json:"type"`
}

// WorkItemCommentUpdateRequest Replaces the complete content; concatenating segment content must equal body.
type WorkItemCommentUpdateRequest struct {
	Body            string                   `json:"body"`
	ExpectedVersion int64                    `json:"expected_version"`
	Segments        []WorkItemCommentSegment `json:"segments"`
}

// WorkItemCreateRequest defines model for WorkItemCreateRequest.
type WorkItemCreateRequest struct {
	AssigneeActorIds *[]Id        `json:"assignee_actor_ids,omitempty"`
	Description      *string      `json:"description,omitempty"`
	Kind             WorkItemKind `json:"kind"`

	// OriginRoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
	OriginRoomId       *Id               `json:"origin_room_id,omitempty"`
	Priority           *WorkItemPriority `json:"priority,omitempty"`
	ReferencedActorIds *[]Id             `json:"referenced_actor_ids,omitempty"`
	Title              string            `json:"title"`
}

// WorkItemKind defines model for WorkItemKind.
type WorkItemKind string

// WorkItemPage defines model for WorkItemPage.
type WorkItemPage struct {
	Items []WorkItem `json:"items"`
	Page  PageMeta   `json:"page"`
}

// WorkItemPriority defines model for WorkItemPriority.
type WorkItemPriority string

// WorkItemResolution defines model for WorkItemResolution.
type WorkItemResolution string

// WorkItemState defines model for WorkItemState.
type WorkItemState string

// WorkItemTaskExecutionSummary defines model for WorkItemTaskExecutionSummary.
type WorkItemTaskExecutionSummary struct {
	ControlOutcome         *WorkItemTaskExecutionSummaryControlOutcome `json:"control_outcome,omitempty"`
	ControlRevision        int64                                       `json:"control_revision"`
	ControlSettledRevision int64                                       `json:"control_settled_revision"`
	DesiredControl         WorkItemTaskExecutionSummaryDesiredControl  `json:"desired_control"`
	ExecutionRevision      int64                                       `json:"execution_revision"`

	// ExecutionUpdatedAt UTC timestamp in RFC 3339 format with an explicit offset.
	ExecutionUpdatedAt Timestamp `json:"execution_updated_at"`
	Generation         int64     `json:"generation"`

	// PendingControl True while the desired control revision has not been settled.
	PendingControl bool    `json:"pending_control"`
	ReasonCode     *string `json:"reason_code,omitempty"`

	// Status A delegated Task's state. None is terminal: a Meta message wakes every state but running.
	Status TaskExecutionStatus `json:"status"`
}

// WorkItemTaskExecutionSummaryControlOutcome defines model for WorkItemTaskExecutionSummary.ControlOutcome.
type WorkItemTaskExecutionSummaryControlOutcome string

// WorkItemTaskExecutionSummaryDesiredControl defines model for WorkItemTaskExecutionSummary.DesiredControl.
type WorkItemTaskExecutionSummaryDesiredControl string

// WorkItemTimelineEntry defines model for WorkItemTimelineEntry.
type WorkItemTimelineEntry struct {
	union json.RawMessage
}

// WorkItemTimelinePage defines model for WorkItemTimelinePage.
type WorkItemTimelinePage struct {
	Items []WorkItemTimelineEntry `json:"items"`
	Page  PageMeta                `json:"page"`
}

// WorkItemTransitionRequest defines model for WorkItemTransitionRequest.
type WorkItemTransitionRequest struct {
	ExpectedVersion int64               `json:"expected_version"`
	Resolution      *WorkItemResolution `json:"resolution,omitempty"`
	State           WorkItemState       `json:"state"`
}

// WorkItemUpdateRequest defines model for WorkItemUpdateRequest.
type WorkItemUpdateRequest struct {
	Description        *string           `json:"description,omitempty"`
	ExpectedVersion    int64             `json:"expected_version"`
	Priority           *WorkItemPriority `json:"priority,omitempty"`
	ReferencedActorIds *[]Id             `json:"referenced_actor_ids,omitempty"`
	Title              *string           `json:"title,omitempty"`
}

// WorkItemVersionRequest defines model for WorkItemVersionRequest.
type WorkItemVersionRequest struct {
	ExpectedVersion int64 `json:"expected_version"`
}

// ActorId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type ActorId = Id

// AfterRoomSeq defines model for AfterRoomSeq.
type AfterRoomSeq = int64

// AgentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type AgentId = Id

// AgentTemplateId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type AgentTemplateId = Id

// AttachmentUploadId Service-signed upload credential. It names the uploading Human, the Room, and the stored file, and it expires at the upload's expires_at; clients must not construct or parse it.
type AttachmentUploadId = AttachmentUploadToken

// CaptureSessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type CaptureSessionId = Id

// ComputerId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type ComputerId = Id

// DecisionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type DecisionId = Id

// DocumentAssetId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type DocumentAssetId = Id

// DocumentCommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type DocumentCommentId = Id

// DocumentCommentReaction defines model for DocumentCommentReaction.
type DocumentCommentReaction = string

// DocumentCommentThreadId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type DocumentCommentThreadId = Id

// DocumentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type DocumentId = Id

// Limit defines model for Limit.
type Limit = int

// MessageId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type MessageId = Id

// RoomId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type RoomId = Id

// RoutineId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type RoutineId = Id

// TenantId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type TenantId = Id

// VoiceSessionId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type VoiceSessionId = Id

// WorkItemCommentId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type WorkItemCommentId = Id

// WorkItemId Opaque, case-sensitive identifier. Clients must not infer type or time from it.
type WorkItemId = Id

// BadGateway defines model for BadGateway.
type BadGateway = ErrorResponse

// BadRequest defines model for BadRequest.
type BadRequest = ErrorResponse

// Conflict defines model for Conflict.
type Conflict = ErrorResponse

// FileError defines model for FileError.
type FileError struct {
	Error struct {
		BaseVersionId    *string `json:"base_version_id,omitempty"`
		Code             string  `json:"code"`
		CurrentVersionId *string `json:"current_version_id,omitempty"`
		Details          *struct {
			// RetryAfterSeconds Advisory delay for latest_not_ready.
			RetryAfterSeconds int32 `json:"retry_after_seconds"`
		} `json:"details,omitempty"`
		Message string `json:"message"`
	} `json:"error"`
}

// Forbidden defines model for Forbidden.
type Forbidden = ErrorResponse

// Gone defines model for Gone.
type Gone = ErrorResponse

// InternalError defines model for InternalError.
type InternalError = ErrorResponse

// LocalModelsRefused defines model for LocalModelsRefused.
type LocalModelsRefused = LocalModelsErrorResponse

// ModelSourceRefused defines model for ModelSourceRefused.
type ModelSourceRefused = ModelSourceErrorResponse

// NotFound defines model for NotFound.
type NotFound = ErrorResponse

// PayloadTooLarge defines model for PayloadTooLarge.
type PayloadTooLarge = ErrorResponse

// ServiceUnavailable defines model for ServiceUnavailable.
type ServiceUnavailable = ErrorResponse

// TooManyRequests defines model for TooManyRequests.
type TooManyRequests = ErrorResponse

// Unauthenticated defines model for Unauthenticated.
type Unauthenticated = ErrorResponse

// sessionCookieContextKey is the context key for sessionCookie security scheme
type sessionCookieContextKey string

// DownloadDocumentVersionParams defines parameters for DownloadDocumentVersion.
type DownloadDocumentVersionParams struct {
	// Range A single RFC 9110 byte range. Multipart ranges are not supported.
	Range *string `json:"Range,omitempty"`

	// IfRange Strong Document Version ETag controlling whether Range is honored.
	IfRange *string `json:"If-Range,omitempty"`
}

// ListDocumentAgentMentionCandidatesParams defines parameters for ListDocumentAgentMentionCandidates.
type ListDocumentAgentMentionCandidatesParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// PlanRoomDocumentAssetParams defines parameters for PlanRoomDocumentAsset.
type PlanRoomDocumentAssetParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListRoomDocumentCommentThreadsParams defines parameters for ListRoomDocumentCommentThreads.
type ListRoomDocumentCommentThreadsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// DownloadLatestDocumentParams defines parameters for DownloadLatestDocument.
type DownloadLatestDocumentParams struct {
	// Range A single RFC 9110 byte range. Multipart ranges are not supported.
	Range *string `json:"Range,omitempty"`

	// IfRange Strong resolved Content Head ETag controlling whether Range is honored.
	IfRange *string `json:"If-Range,omitempty"`
}

// ListDocumentHistoryParams defines parameters for ListDocumentHistory.
type ListDocumentHistoryParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListDocumentVersionsParams defines parameters for ListDocumentVersions.
type ListDocumentVersionsParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// UploadDocumentVersionParams defines parameters for UploadDocumentVersion.
type UploadDocumentVersionParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// StreamEventsParams defines parameters for StreamEvents.
type StreamEventsParams struct {
	// Room Room cursor roomId:room_seq, the highest room_seq the client applied.
	Room *[]string `form:"room,omitempty" json:"room,omitempty"`
}

// ListGitHubRepositoriesParams defines parameters for ListGitHubRepositories.
type ListGitHubRepositoriesParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListGoogleCalendarsParams defines parameters for ListGoogleCalendars.
type ListGoogleCalendarsParams struct {
	PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`
	Limit     *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListNotionResourcesParams defines parameters for ListNotionResources.
type ListNotionResourcesParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListSlackConversationsParams defines parameters for ListSlackConversations.
type ListSlackConversationsParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListLibraryDocumentsParams defines parameters for ListLibraryDocuments.
type ListLibraryDocumentsParams struct {
	View   ListLibraryDocumentsParamsView `form:"view" json:"view"`
	Cursor *string                        `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int                           `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListLibraryDocumentsParamsView defines parameters for ListLibraryDocuments.
type ListLibraryDocumentsParamsView string

// SearchLibraryDocumentsParams defines parameters for SearchLibraryDocuments.
type SearchLibraryDocumentsParams struct {
	// Q Case-insensitive substring matched against the title, the owner and creator display names, the names of bound Rooms the caller is a member of, the titles of bound Tasks, and the indexed body text. Formats, IDs and binding kinds are not matched. Trimmed before matching and 1 to 200 characters after trimming.
	Q string `form:"q" json:"q"`

	// TenantId Restrict results to one Tenant; without it the search spans every Tenant the caller belongs to.
	TenantId *Id     `form:"tenant_id,omitempty" json:"tenant_id,omitempty"`
	Cursor   *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit    *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListRoomDocumentsParams defines parameters for ListRoomDocuments.
type ListRoomDocumentsParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// UploadRoomDocumentParams defines parameters for UploadRoomDocument.
type UploadRoomDocumentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListRoomEventsParams defines parameters for ListRoomEvents.
type ListRoomEventsParams struct {
	// After Return only Room Events whose room_seq is strictly greater than this value.
	After *AfterRoomSeq `form:"after,omitempty" json:"after,omitempty"`
	Limit *Limit        `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListRoomMembersParams defines parameters for ListRoomMembers.
type ListRoomMembersParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// UploadMessageAttachmentParams defines parameters for UploadMessageAttachment.
type UploadMessageAttachmentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListMessagesParams defines parameters for ListMessages.
type ListMessagesParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// CreateMessageParams defines parameters for CreateMessage.
type CreateMessageParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ForwardRoomMessageParams defines parameters for ForwardRoomMessage.
type ForwardRoomMessageParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListRoomRoutinesParams defines parameters for ListRoomRoutines.
type ListRoomRoutinesParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListRoomRuntimePresentationEventsParams defines parameters for ListRoomRuntimePresentationEvents.
type ListRoomRuntimePresentationEventsParams struct {
	After *AgentRuntimeInt64 `form:"after,omitempty" json:"after,omitempty"`
	Limit *Limit             `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListRoomRuntimePresentationRunsParams defines parameters for ListRoomRuntimePresentationRuns.
type ListRoomRuntimePresentationRunsParams struct {
	// RunId Exact Local Run identity for live or terminal activity recovery.
	RunId *Id `form:"run_id,omitempty" json:"run_id,omitempty"`

	// MessageId Loaded Room Message IDs that bound finished Run recovery.
	MessageId *[]Id `form:"message_id,omitempty" json:"message_id,omitempty"`
}

// DeleteRoutineParams defines parameters for DeleteRoutine.
type DeleteRoutineParams struct {
	ExpectedRevision int64 `form:"expected_revision" json:"expected_revision"`
}

// ListTaskRuntimePresentationRunsParams defines parameters for ListTaskRuntimePresentationRuns.
type ListTaskRuntimePresentationRunsParams struct {
	Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListActorsParams defines parameters for ListActors.
type ListActorsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListTenantAgentAvailabilityParams defines parameters for ListTenantAgentAvailability.
type ListTenantAgentAvailabilityParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListTenantAgentsParams defines parameters for ListTenantAgents.
type ListTenantAgentsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// GetTenantAgentAvatarImageParams defines parameters for GetTenantAgentAvatarImage.
type GetTenantAgentAvatarImageParams struct {
	// V Image version from avatar_image_url.
	V           *string `form:"v,omitempty" json:"v,omitempty"`
	IfNoneMatch *string `json:"If-None-Match,omitempty"`
}

// DeleteAgentSkillBindingParams defines parameters for DeleteAgentSkillBinding.
type DeleteAgentSkillBindingParams struct {
	ExpectedBindingVersion int64 `form:"expected_binding_version" json:"expected_binding_version"`
}

// UploadAgentSkillPackageParams defines parameters for UploadAgentSkillPackage.
type UploadAgentSkillPackageParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// UploadTenantDocumentParams defines parameters for UploadTenantDocument.
type UploadTenantDocumentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListPocketNotesParams defines parameters for ListPocketNotes.
type ListPocketNotesParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListPersonalMemoryEntriesParams defines parameters for ListPersonalMemoryEntries.
type ListPersonalMemoryEntriesParams struct {
	Cursor *Cursor          `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit           `form:"limit,omitempty" json:"limit,omitempty"`
	Kind   *MemoryEntryKind `form:"kind,omitempty" json:"kind,omitempty"`
}

// SearchTenantMessagesParams defines parameters for SearchTenantMessages.
type SearchTenantMessagesParams struct {
	// Q Trimmed before matching; 1 to 200 characters after trimming.
	Q      string  `form:"q" json:"q"`
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListPersonalWikiDocumentsParams defines parameters for ListPersonalWikiDocuments.
type ListPersonalWikiDocumentsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// UploadPersonalWikiDocumentParams defines parameters for UploadPersonalWikiDocument.
type UploadPersonalWikiDocumentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// GetPersonalWikiPreviewParams defines parameters for GetPersonalWikiPreview.
type GetPersonalWikiPreviewParams struct {
	RefreshId string `form:"refresh_id" json:"refresh_id"`
}

// ListRoomsParams defines parameters for ListRooms.
type ListRoomsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListSkillManifestsParams defines parameters for ListSkillManifests.
type ListSkillManifestsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListWorkItemsParams defines parameters for ListWorkItems.
type ListWorkItemsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`

	// Scope Tenant lists every readable Work Item; personal limits the Dashboard projection to Work Items related to the current Human or their sponsored Agents.
	Scope           *ListWorkItemsParamsScope `form:"scope,omitempty" json:"scope,omitempty"`
	Kind            *WorkItemKind             `form:"kind,omitempty" json:"kind,omitempty"`
	State           *WorkItemState            `form:"state,omitempty" json:"state,omitempty"`
	Priority        *WorkItemPriority         `form:"priority,omitempty" json:"priority,omitempty"`
	ExecutionStatus *TaskExecutionStatus      `form:"execution_status,omitempty" json:"execution_status,omitempty"`

	// PendingControl Filter Tasks by whether a control revision is waiting to be settled.
	PendingControl  *bool `form:"pending_control,omitempty" json:"pending_control,omitempty"`
	AssigneeActorId *Id   `form:"assignee_actor_id,omitempty" json:"assignee_actor_id,omitempty"`
	OriginRoomId    *Id   `form:"origin_room_id,omitempty" json:"origin_room_id,omitempty"`
	WorkRoomId      *Id   `form:"work_room_id,omitempty" json:"work_room_id,omitempty"`
	Archived        *bool `form:"archived,omitempty" json:"archived,omitempty"`
}

// ListWorkItemsParamsScope defines parameters for ListWorkItems.
type ListWorkItemsParamsScope string

// CreateWorkItemParams defines parameters for CreateWorkItem.
type CreateWorkItemParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListVoiceEventsParams defines parameters for ListVoiceEvents.
type ListVoiceEventsParams struct {
	After *string `form:"after,omitempty" json:"after,omitempty"`
}

// StreamVoiceEventsParams defines parameters for StreamVoiceEvents.
type StreamVoiceEventsParams struct {
	After       *string `form:"after,omitempty" json:"after,omitempty"`
	LastEventID *string `json:"Last-Event-ID,omitempty"`
}

// ListVoiceTranscriptEventsParams defines parameters for ListVoiceTranscriptEvents.
type ListVoiceTranscriptEventsParams struct {
	AfterUpdatedAt *Timestamp `form:"after_updated_at,omitempty" json:"after_updated_at,omitempty"`
	AfterId        *Id        `form:"after_id,omitempty" json:"after_id,omitempty"`
}

// ListWebSearchBackendsParams defines parameters for ListWebSearchBackends.
type ListWebSearchBackendsParams struct {
	// IncludeQuota Read each backend's live quota from its provider.
	IncludeQuota *bool `form:"include_quota,omitempty" json:"include_quota,omitempty"`
}

// UpdateWorkItemParams defines parameters for UpdateWorkItem.
type UpdateWorkItemParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// DeleteWorkItemAccessGrantParams defines parameters for DeleteWorkItemAccessGrant.
type DeleteWorkItemAccessGrantParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// PutWorkItemAccessGrantParams defines parameters for PutWorkItemAccessGrant.
type PutWorkItemAccessGrantParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ArchiveWorkItemParams defines parameters for ArchiveWorkItem.
type ArchiveWorkItemParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// DeleteWorkItemAssignmentParams defines parameters for DeleteWorkItemAssignment.
type DeleteWorkItemAssignmentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// PutWorkItemAssignmentParams defines parameters for PutWorkItemAssignment.
type PutWorkItemAssignmentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListWorkItemCommentsParams defines parameters for ListWorkItemComments.
type ListWorkItemCommentsParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// CreateWorkItemCommentParams defines parameters for CreateWorkItemComment.
type CreateWorkItemCommentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// DeleteWorkItemCommentParams defines parameters for DeleteWorkItemComment.
type DeleteWorkItemCommentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// UpdateWorkItemCommentParams defines parameters for UpdateWorkItemComment.
type UpdateWorkItemCommentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// UploadWorkItemDocumentParams defines parameters for UploadWorkItemDocument.
type UploadWorkItemDocumentParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// BindDocumentToWorkItemParams defines parameters for BindDocumentToWorkItem.
type BindDocumentToWorkItemParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ListWorkItemTimelineParams defines parameters for ListWorkItemTimeline.
type ListWorkItemTimelineParams struct {
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// TransitionWorkItemParams defines parameters for TransitionWorkItem.
type TransitionWorkItemParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// UnarchiveWorkItemParams defines parameters for UnarchiveWorkItem.
type UnarchiveWorkItemParams struct {
	// IdempotencyKey Reusing the same key with the same canonical request returns the original result. Reusing it with different input returns 409 IDEMPOTENCY_KEY_REUSED.
	IdempotencyKey IdempotencyKey `json:"Idempotency-Key"`
}

// ChangePasswordJSONRequestBody defines body for ChangePassword for application/json ContentType.
type ChangePasswordJSONRequestBody = PasswordChangeRequest

// LoginJSONRequestBody defines body for Login for application/json ContentType.
type LoginJSONRequestBody = LoginRequest

// DecideDecisionJSONRequestBody defines body for DecideDecision for application/json ContentType.
type DecideDecisionJSONRequestBody = DecisionRequest

// UpdateRoomDocumentCommentThreadJSONRequestBody defines body for UpdateRoomDocumentCommentThread for application/json ContentType.
type UpdateRoomDocumentCommentThreadJSONRequestBody = DocumentCommentThreadResolutionRequest

// AttachDocumentCommentSelectionAnchorJSONRequestBody defines body for AttachDocumentCommentSelectionAnchor for application/json ContentType.
type AttachDocumentCommentSelectionAnchorJSONRequestBody = DocumentCommentAnchorAttachmentRequest

// ReanchorRoomDocumentCommentThreadJSONRequestBody defines body for ReanchorRoomDocumentCommentThread for application/json ContentType.
type ReanchorRoomDocumentCommentThreadJSONRequestBody = DocumentCommentAnchorInput

// CreateRoomDocumentCommentReplyJSONRequestBody defines body for CreateRoomDocumentCommentReply for application/json ContentType.
type CreateRoomDocumentCommentReplyJSONRequestBody = DocumentCommentReplyCreateRequest

// DeleteRoomDocumentCommentJSONRequestBody defines body for DeleteRoomDocumentComment for application/json ContentType.
type DeleteRoomDocumentCommentJSONRequestBody = DocumentCommentVersionRequest

// UpdateRoomDocumentCommentJSONRequestBody defines body for UpdateRoomDocumentComment for application/json ContentType.
type UpdateRoomDocumentCommentJSONRequestBody = DocumentCommentUpdateRequest

// UpdateDocumentMetadataJSONRequestBody defines body for UpdateDocumentMetadata for application/json ContentType.
type UpdateDocumentMetadataJSONRequestBody = DocumentMetadataUpdateRequest

// PlanRoomDocumentAssetJSONRequestBody defines body for PlanRoomDocumentAsset for application/json ContentType.
type PlanRoomDocumentAssetJSONRequestBody = DocumentAssetUploadRequest

// CreateDocumentDirectCollaboratorJSONRequestBody defines body for CreateDocumentDirectCollaborator for application/json ContentType.
type CreateDocumentDirectCollaboratorJSONRequestBody = DocumentDirectCollaboratorCreateRequest

// UpdateDocumentDirectCollaboratorJSONRequestBody defines body for UpdateDocumentDirectCollaborator for application/json ContentType.
type UpdateDocumentDirectCollaboratorJSONRequestBody = DocumentDirectCollaboratorUpdateRequest

// RevokeDocumentDirectCollaboratorJSONRequestBody defines body for RevokeDocumentDirectCollaborator for application/json ContentType.
type RevokeDocumentDirectCollaboratorJSONRequestBody = DocumentDirectCollaboratorRevokeRequest

// CreateRoomDocumentCommentThreadJSONRequestBody defines body for CreateRoomDocumentCommentThread for application/json ContentType.
type CreateRoomDocumentCommentThreadJSONRequestBody = DocumentCommentThreadCreateRequest

// UpdateDocumentDraftTitleJSONRequestBody defines body for UpdateDocumentDraftTitle for application/json ContentType.
type UpdateDocumentDraftTitleJSONRequestBody = DocumentDraftTitleUpdateRequest

// DuplicateDocumentJSONRequestBody defines body for DuplicateDocument for application/json ContentType.
type DuplicateDocumentJSONRequestBody = DocumentDuplicateRequest

// RevokeDocumentLinkShareJSONRequestBody defines body for RevokeDocumentLinkShare for application/json ContentType.
type RevokeDocumentLinkShareJSONRequestBody = RevokeDocumentLinkShare

// SetDocumentLinkShareJSONRequestBody defines body for SetDocumentLinkShare for application/json ContentType.
type SetDocumentLinkShareJSONRequestBody = SetDocumentLinkShare

// SendMailCanvasJSONRequestBody defines body for SendMailCanvas for application/json ContentType.
type SendMailCanvasJSONRequestBody = SendMailCanvasRequest

// RemoveDocumentFromRoomJSONRequestBody defines body for RemoveDocumentFromRoom for application/json ContentType.
type RemoveDocumentFromRoomJSONRequestBody = DocumentRoomBindingRemoveRequest

// UploadDocumentVersionMultipartRequestBody defines body for UploadDocumentVersion for multipart/form-data ContentType.
type UploadDocumentVersionMultipartRequestBody = DocumentVersionUploadRequest

// SaveExternalProviderKeyJSONRequestBody defines body for SaveExternalProviderKey for application/json ContentType.
type SaveExternalProviderKeyJSONRequestBody = SaveExternalProviderKeyRequest

// CompleteExternalConnectionAuthorizationJSONRequestBody defines body for CompleteExternalConnectionAuthorization for application/json ContentType.
type CompleteExternalConnectionAuthorizationJSONRequestBody = CompleteExternalConnectionAuthorizationRequest

// CreateExternalConnectionJSONRequestBody defines body for CreateExternalConnection for application/json ContentType.
type CreateExternalConnectionJSONRequestBody = CreateExternalConnectionRequest

// SetExternalConnectionAgentAccessJSONRequestBody defines body for SetExternalConnectionAgentAccess for application/json ContentType.
type SetExternalConnectionAgentAccessJSONRequestBody = SetExternalConnectionAgentAccessRequest

// SetExternalConnectionAutoRemindersJSONRequestBody defines body for SetExternalConnectionAutoReminders for application/json ContentType.
type SetExternalConnectionAutoRemindersJSONRequestBody = SetExternalConnectionAutoRemindersRequest

// DisconnectExternalConnectionJSONRequestBody defines body for DisconnectExternalConnection for application/json ContentType.
type DisconnectExternalConnectionJSONRequestBody = DisconnectExternalConnectionRequest

// CreateExternalConnectionReauthorizationJSONRequestBody defines body for CreateExternalConnectionReauthorization for application/json ContentType.
type CreateExternalConnectionReauthorizationJSONRequestBody = CreateExternalConnectionReauthorizationRequest

// CreateExternalConnectionStatusCheckJSONRequestBody defines body for CreateExternalConnectionStatusCheck for application/json ContentType.
type CreateExternalConnectionStatusCheckJSONRequestBody = ExternalConnectionStatusCheckRequest

// ExchangeLocalComputerEnrollmentJSONRequestBody defines body for ExchangeLocalComputerEnrollment for application/json ContentType.
type ExchangeLocalComputerEnrollmentJSONRequestBody = LocalComputerEnrollmentExchangeRequest

// ProveLocalIdentityJSONRequestBody defines body for ProveLocalIdentity for application/json ContentType.
type ProveLocalIdentityJSONRequestBody = LocalIdentityChallenge

// UpdateRoomJSONRequestBody defines body for UpdateRoom for application/json ContentType.
type UpdateRoomJSONRequestBody = RoomUpdateRequest

// CreateRoomDocumentJSONRequestBody defines body for CreateRoomDocument for application/json ContentType.
type CreateRoomDocumentJSONRequestBody = ContextDocumentCreateRequest

// UploadRoomDocumentMultipartRequestBody defines body for UploadRoomDocument for multipart/form-data ContentType.
type UploadRoomDocumentMultipartRequestBody = ContextDocumentUploadRequest

// CreateRoomHistoryShareJSONRequestBody defines body for CreateRoomHistoryShare for application/json ContentType.
type CreateRoomHistoryShareJSONRequestBody = CreateRoomHistoryShare

// PutRoomMemberJSONRequestBody defines body for PutRoomMember for application/json ContentType.
type PutRoomMemberJSONRequestBody = RoomMemberPutRequest

// UploadMessageAttachmentMultipartRequestBody defines body for UploadMessageAttachment for multipart/form-data ContentType.
type UploadMessageAttachmentMultipartRequestBody = MessageAttachmentUploadRequest

// CreateMessageJSONRequestBody defines body for CreateMessage for application/json ContentType.
type CreateMessageJSONRequestBody = MessageCreateRequest

// ForwardRoomMessageJSONRequestBody defines body for ForwardRoomMessage for application/json ContentType.
type ForwardRoomMessageJSONRequestBody = MessageForwardRequest

// SetRoomParticipationJSONRequestBody defines body for SetRoomParticipation for application/json ContentType.
type SetRoomParticipationJSONRequestBody = RoomParticipationRequest

// UpdateRoomPinJSONRequestBody defines body for UpdateRoomPin for application/json ContentType.
type UpdateRoomPinJSONRequestBody = RoomPinUpdateRequest

// UpdateRoomReadStateJSONRequestBody defines body for UpdateRoomReadState for application/json ContentType.
type UpdateRoomReadStateJSONRequestBody = RoomReadStateUpdateRequest

// CreateRoomRoutineJSONRequestBody defines body for CreateRoomRoutine for application/json ContentType.
type CreateRoomRoutineJSONRequestBody = RoutineCreateRequest

// CancelRoomRunJSONRequestBody defines body for CancelRoomRun for application/json ContentType.
type CancelRoomRunJSONRequestBody = RoomRunCancelRequest

// CreateVoiceSessionJSONRequestBody defines body for CreateVoiceSession for application/json ContentType.
type CreateVoiceSessionJSONRequestBody = VoiceSessionCreateRequest

// UpdateRoutineJSONRequestBody defines body for UpdateRoutine for application/json ContentType.
type UpdateRoutineJSONRequestBody = RoutineUpdateRequest

// DownloadSharedDocumentJSONRequestBody defines body for DownloadSharedDocument for application/json ContentType.
type DownloadSharedDocumentJSONRequestBody = ResolveDocumentLinkShare

// ResolveDocumentLinkShareJSONRequestBody defines body for ResolveDocumentLinkShare for application/json ContentType.
type ResolveDocumentLinkShareJSONRequestBody = ResolveDocumentLinkShare

// ReadRoomHistoryShareAssetJSONRequestBody defines body for ReadRoomHistoryShareAsset for application/json ContentType.
type ReadRoomHistoryShareAssetJSONRequestBody = ReadRoomHistoryShare

// ReadRoomHistoryShareJSONRequestBody defines body for ReadRoomHistoryShare for application/json ContentType.
type ReadRoomHistoryShareJSONRequestBody = ReadRoomHistoryShare

// PatchAccountProfileJSONRequestBody defines body for PatchAccountProfile for application/json ContentType.
type PatchAccountProfileJSONRequestBody = AccountProfileUpdateRequest

// PublishAgentTemplateJSONRequestBody defines body for PublishAgentTemplate for application/json ContentType.
type PublishAgentTemplateJSONRequestBody = AgentTemplatePublishRequest

// CreateTenantAgentJSONRequestBody defines body for CreateTenantAgent for application/json ContentType.
type CreateTenantAgentJSONRequestBody = TenantAgentCreateRequest

// UpdateTenantAgentJSONRequestBody defines body for UpdateTenantAgent for application/json ContentType.
type UpdateTenantAgentJSONRequestBody = TenantAgentUpdateRequest

// UpdateTenantAgentAvatarJSONRequestBody defines body for UpdateTenantAgentAvatar for application/json ContentType.
type UpdateTenantAgentAvatarJSONRequestBody = TenantAgentAvatarUpdateRequest

// PutAgentSkillBindingJSONRequestBody defines body for PutAgentSkillBinding for application/json ContentType.
type PutAgentSkillBindingJSONRequestBody = AgentSkillBindingPutRequest

// UploadAgentSkillPackageMultipartRequestBody defines body for UploadAgentSkillPackage for multipart/form-data ContentType.
type UploadAgentSkillPackageMultipartRequestBody = AgentSkillPackageUploadRequest

// OpenDirectRoomJSONRequestBody defines body for OpenDirectRoom for application/json ContentType.
type OpenDirectRoomJSONRequestBody = DirectRoomOpenRequest

// CreateTenantDocumentJSONRequestBody defines body for CreateTenantDocument for application/json ContentType.
type CreateTenantDocumentJSONRequestBody = DocumentCreateRequest

// UploadTenantDocumentMultipartRequestBody defines body for UploadTenantDocument for multipart/form-data ContentType.
type UploadTenantDocumentMultipartRequestBody = DocumentUploadRequest

// CreateLocalComputerEnrollmentJSONRequestBody defines body for CreateLocalComputerEnrollment for application/json ContentType.
type CreateLocalComputerEnrollmentJSONRequestBody = LocalComputerEnrollmentCreateRequest

// PutLocalComputerBrowserConnectionJSONRequestBody defines body for PutLocalComputerBrowserConnection for application/json ContentType.
type PutLocalComputerBrowserConnectionJSONRequestBody = BrowserConnectionConfigureRequest

// ActOnLocalComputerModelJSONRequestBody defines body for ActOnLocalComputerModel for application/json ContentType.
type ActOnLocalComputerModelJSONRequestBody = LocalModelActionRequest

// SwitchLocalComputerModelSourceJSONRequestBody defines body for SwitchLocalComputerModelSource for application/json ContentType.
type SwitchLocalComputerModelSourceJSONRequestBody = ModelSourceSwitchRequest

// ListLocalComputerByokModelsJSONRequestBody defines body for ListLocalComputerByokModels for application/json ContentType.
type ListLocalComputerByokModelsJSONRequestBody = ByokEndpointInput

// TestLocalComputerModelSourceJSONRequestBody defines body for TestLocalComputerModelSource for application/json ContentType.
type TestLocalComputerModelSourceJSONRequestBody = ByokTestRequest

// ActOnLocalComputerPermissionJSONRequestBody defines body for ActOnLocalComputerPermission for application/json ContentType.
type ActOnLocalComputerPermissionJSONRequestBody = ComputerPermissionAction

// ScanLocalSkillsJSONRequestBody defines body for ScanLocalSkills for application/json ContentType.
type ScanLocalSkillsJSONRequestBody = LocalSkillScanRequest

// CreateTenantMyDocumentFolderJSONRequestBody defines body for CreateTenantMyDocumentFolder for application/json ContentType.
type CreateTenantMyDocumentFolderJSONRequestBody = DocumentFolderCreateRequest

// UpdateTenantMyDocumentPlacementJSONRequestBody defines body for UpdateTenantMyDocumentPlacement for application/json ContentType.
type UpdateTenantMyDocumentPlacementJSONRequestBody = DocumentPlacementUpdateRequest

// PutTodayPocketNoteJSONRequestBody defines body for PutTodayPocketNote for application/json ContentType.
type PutTodayPocketNoteJSONRequestBody = PocketNoteUpdateRequest

// CreateMySharedDocumentFolderJSONRequestBody defines body for CreateMySharedDocumentFolder for application/json ContentType.
type CreateMySharedDocumentFolderJSONRequestBody = DocumentFolderCreateRequest

// UpdateMySharedDocumentFolderJSONRequestBody defines body for UpdateMySharedDocumentFolder for application/json ContentType.
type UpdateMySharedDocumentFolderJSONRequestBody = DocumentPlacementUpdateRequest

// MoveMySharedDocumentJSONRequestBody defines body for MoveMySharedDocument for application/json ContentType.
type MoveMySharedDocumentJSONRequestBody = SharedDocumentMoveRequest

// CreatePersonalProfileGenerationJSONRequestBody defines body for CreatePersonalProfileGeneration for application/json ContentType.
type CreatePersonalProfileGenerationJSONRequestBody = PersonalProfileGenerationCreateRequest

// ReplacePersonalProfileJSONRequestBody defines body for ReplacePersonalProfile for application/json ContentType.
type ReplacePersonalProfileJSONRequestBody = PersonalProfileReplaceRequest

// UploadPersonalWikiDocumentMultipartRequestBody defines body for UploadPersonalWikiDocument for multipart/form-data ContentType.
type UploadPersonalWikiDocumentMultipartRequestBody = DocumentUploadRequest

// CreateRoomJSONRequestBody defines body for CreateRoom for application/json ContentType.
type CreateRoomJSONRequestBody = HumanRoomCreateRequest

// CreateWorkItemJSONRequestBody defines body for CreateWorkItem for application/json ContentType.
type CreateWorkItemJSONRequestBody = WorkItemCreateRequest

// AskVoiceCaptureQuestionJSONRequestBody defines body for AskVoiceCaptureQuestion for application/json ContentType.
type AskVoiceCaptureQuestionJSONRequestBody = VoiceCaptureQuestionRequest

// SaveVoiceProviderKeyJSONRequestBody defines body for SaveVoiceProviderKey for application/json ContentType.
type SaveVoiceProviderKeyJSONRequestBody = SaveVoiceProviderKeyRequest

// StartVoiceCaptureJSONRequestBody defines body for StartVoiceCapture for application/json ContentType.
type StartVoiceCaptureJSONRequestBody = VoiceCaptureStartRequest

// CommitVoiceDictationTurnJSONRequestBody defines body for CommitVoiceDictationTurn for application/json ContentType.
type CommitVoiceDictationTurnJSONRequestBody = VoiceDictationCommitRequest

// SaveWebSearchKeyJSONRequestBody defines body for SaveWebSearchKey for application/json ContentType.
type SaveWebSearchKeyJSONRequestBody = SaveWebSearchKeyRequest

// SetWebSearchDefaultJSONRequestBody defines body for SetWebSearchDefault for application/json ContentType.
type SetWebSearchDefaultJSONRequestBody = SetWebSearchDefaultRequest

// UpdateWorkItemJSONRequestBody defines body for UpdateWorkItem for application/json ContentType.
type UpdateWorkItemJSONRequestBody = WorkItemUpdateRequest

// ArchiveWorkItemJSONRequestBody defines body for ArchiveWorkItem for application/json ContentType.
type ArchiveWorkItemJSONRequestBody = WorkItemVersionRequest

// CreateWorkItemCommentJSONRequestBody defines body for CreateWorkItemComment for application/json ContentType.
type CreateWorkItemCommentJSONRequestBody = WorkItemCommentCreateRequest

// DeleteWorkItemCommentJSONRequestBody defines body for DeleteWorkItemComment for application/json ContentType.
type DeleteWorkItemCommentJSONRequestBody = WorkItemVersionRequest

// UpdateWorkItemCommentJSONRequestBody defines body for UpdateWorkItemComment for application/json ContentType.
type UpdateWorkItemCommentJSONRequestBody = WorkItemCommentUpdateRequest

// UploadWorkItemDocumentMultipartRequestBody defines body for UploadWorkItemDocument for multipart/form-data ContentType.
type UploadWorkItemDocumentMultipartRequestBody = ContextDocumentUploadRequest

// TransitionWorkItemJSONRequestBody defines body for TransitionWorkItem for application/json ContentType.
type TransitionWorkItemJSONRequestBody = WorkItemTransitionRequest

// UnarchiveWorkItemJSONRequestBody defines body for UnarchiveWorkItem for application/json ContentType.
type UnarchiveWorkItemJSONRequestBody = WorkItemVersionRequest

// AsAgentRuntimeWorkingStatusChangedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimeWorkingStatusChangedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimeWorkingStatusChangedEvent() (AgentRuntimeWorkingStatusChangedEvent, error) {
	var body AgentRuntimeWorkingStatusChangedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimeWorkingStatusChangedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimeWorkingStatusChangedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimeWorkingStatusChangedEvent(v AgentRuntimeWorkingStatusChangedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimeWorkingStatusChangedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimeWorkingStatusChangedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimeWorkingStatusChangedEvent(v AgentRuntimeWorkingStatusChangedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRuntimeStoppedStatusChangedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimeStoppedStatusChangedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimeStoppedStatusChangedEvent() (AgentRuntimeStoppedStatusChangedEvent, error) {
	var body AgentRuntimeStoppedStatusChangedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimeStoppedStatusChangedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimeStoppedStatusChangedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimeStoppedStatusChangedEvent(v AgentRuntimeStoppedStatusChangedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimeStoppedStatusChangedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimeStoppedStatusChangedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimeStoppedStatusChangedEvent(v AgentRuntimeStoppedStatusChangedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRuntimePlanUpdatedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimePlanUpdatedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimePlanUpdatedEvent() (AgentRuntimePlanUpdatedEvent, error) {
	var body AgentRuntimePlanUpdatedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimePlanUpdatedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimePlanUpdatedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimePlanUpdatedEvent(v AgentRuntimePlanUpdatedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimePlanUpdatedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimePlanUpdatedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimePlanUpdatedEvent(v AgentRuntimePlanUpdatedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRuntimeActivityStartedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimeActivityStartedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimeActivityStartedEvent() (AgentRuntimeActivityStartedEvent, error) {
	var body AgentRuntimeActivityStartedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimeActivityStartedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimeActivityStartedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimeActivityStartedEvent(v AgentRuntimeActivityStartedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimeActivityStartedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimeActivityStartedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimeActivityStartedEvent(v AgentRuntimeActivityStartedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRuntimeActivityUpdatedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimeActivityUpdatedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimeActivityUpdatedEvent() (AgentRuntimeActivityUpdatedEvent, error) {
	var body AgentRuntimeActivityUpdatedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimeActivityUpdatedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimeActivityUpdatedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimeActivityUpdatedEvent(v AgentRuntimeActivityUpdatedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimeActivityUpdatedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimeActivityUpdatedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimeActivityUpdatedEvent(v AgentRuntimeActivityUpdatedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRuntimeActivityFinishedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimeActivityFinishedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimeActivityFinishedEvent() (AgentRuntimeActivityFinishedEvent, error) {
	var body AgentRuntimeActivityFinishedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimeActivityFinishedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimeActivityFinishedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimeActivityFinishedEvent(v AgentRuntimeActivityFinishedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimeActivityFinishedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimeActivityFinishedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimeActivityFinishedEvent(v AgentRuntimeActivityFinishedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRuntimePresentationOutputCreatedEvent returns the union data inside the AgentRuntimePersistedPresentationEvent as a AgentRuntimePresentationOutputCreatedEvent
func (t AgentRuntimePersistedPresentationEvent) AsAgentRuntimePresentationOutputCreatedEvent() (AgentRuntimePresentationOutputCreatedEvent, error) {
	var body AgentRuntimePresentationOutputCreatedEvent
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRuntimePresentationOutputCreatedEvent overwrites any union data inside the AgentRuntimePersistedPresentationEvent as the provided AgentRuntimePresentationOutputCreatedEvent
func (t *AgentRuntimePersistedPresentationEvent) FromAgentRuntimePresentationOutputCreatedEvent(v AgentRuntimePresentationOutputCreatedEvent) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRuntimePresentationOutputCreatedEvent performs a merge with any union data inside the AgentRuntimePersistedPresentationEvent, using the provided AgentRuntimePresentationOutputCreatedEvent
func (t *AgentRuntimePersistedPresentationEvent) MergeAgentRuntimePresentationOutputCreatedEvent(v AgentRuntimePresentationOutputCreatedEvent) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t AgentRuntimePersistedPresentationEvent) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *AgentRuntimePersistedPresentationEvent) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsArtifactTreeSegment0 returns the union data inside the ArtifactTreeSegment as a ArtifactTreeSegment0
func (t ArtifactTreeSegment) AsArtifactTreeSegment0() (ArtifactTreeSegment0, error) {
	var body ArtifactTreeSegment0
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromArtifactTreeSegment0 overwrites any union data inside the ArtifactTreeSegment as the provided ArtifactTreeSegment0
func (t *ArtifactTreeSegment) FromArtifactTreeSegment0(v ArtifactTreeSegment0) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeArtifactTreeSegment0 performs a merge with any union data inside the ArtifactTreeSegment, using the provided ArtifactTreeSegment0
func (t *ArtifactTreeSegment) MergeArtifactTreeSegment0(v ArtifactTreeSegment0) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsArtifactTreeSegment1 returns the union data inside the ArtifactTreeSegment as a ArtifactTreeSegment1
func (t ArtifactTreeSegment) AsArtifactTreeSegment1() (ArtifactTreeSegment1, error) {
	var body ArtifactTreeSegment1
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromArtifactTreeSegment1 overwrites any union data inside the ArtifactTreeSegment as the provided ArtifactTreeSegment1
func (t *ArtifactTreeSegment) FromArtifactTreeSegment1(v ArtifactTreeSegment1) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeArtifactTreeSegment1 performs a merge with any union data inside the ArtifactTreeSegment, using the provided ArtifactTreeSegment1
func (t *ArtifactTreeSegment) MergeArtifactTreeSegment1(v ArtifactTreeSegment1) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t ArtifactTreeSegment) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	if err != nil {
		return nil, err
	}
	object := make(map[string]json.RawMessage)
	if t.union != nil {
		err = json.Unmarshal(b, &object)
		if err != nil {
			return nil, err
		}
	}

	object["content"], err = json.Marshal(t.Content)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'content': %w", err)
	}

	object["directory_count"], err = json.Marshal(t.DirectoryCount)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'directory_count': %w", err)
	}

	if t.EntryDocumentId != nil {
		object["entry_document_id"], err = json.Marshal(t.EntryDocumentId)
		if err != nil {
			return nil, fmt.Errorf("error marshaling 'entry_document_id': %w", err)
		}
	}

	if t.EntryDocumentVersionId != nil {
		object["entry_document_version_id"], err = json.Marshal(t.EntryDocumentVersionId)
		if err != nil {
			return nil, fmt.Errorf("error marshaling 'entry_document_version_id': %w", err)
		}
	}

	object["file_count"], err = json.Marshal(t.FileCount)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'file_count': %w", err)
	}

	object["publication_group_id"], err = json.Marshal(t.PublicationGroupId)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'publication_group_id': %w", err)
	}

	object["root_path"], err = json.Marshal(t.RootPath)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'root_path': %w", err)
	}

	object["total_bytes"], err = json.Marshal(t.TotalBytes)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'total_bytes': %w", err)
	}

	object["type"], err = json.Marshal(t.Type)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'type': %w", err)
	}

	b, err = json.Marshal(object)
	return b, err
}

func (t *ArtifactTreeSegment) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	if err != nil {
		return err
	}
	object := make(map[string]json.RawMessage)
	err = json.Unmarshal(b, &object)
	if err != nil {
		return err
	}

	if raw, found := object["content"]; found {
		err = json.Unmarshal(raw, &t.Content)
		if err != nil {
			return fmt.Errorf("error reading 'content': %w", err)
		}
	}

	if raw, found := object["directory_count"]; found {
		err = json.Unmarshal(raw, &t.DirectoryCount)
		if err != nil {
			return fmt.Errorf("error reading 'directory_count': %w", err)
		}
	}

	if raw, found := object["entry_document_id"]; found {
		err = json.Unmarshal(raw, &t.EntryDocumentId)
		if err != nil {
			return fmt.Errorf("error reading 'entry_document_id': %w", err)
		}
	}

	if raw, found := object["entry_document_version_id"]; found {
		err = json.Unmarshal(raw, &t.EntryDocumentVersionId)
		if err != nil {
			return fmt.Errorf("error reading 'entry_document_version_id': %w", err)
		}
	}

	if raw, found := object["file_count"]; found {
		err = json.Unmarshal(raw, &t.FileCount)
		if err != nil {
			return fmt.Errorf("error reading 'file_count': %w", err)
		}
	}

	if raw, found := object["publication_group_id"]; found {
		err = json.Unmarshal(raw, &t.PublicationGroupId)
		if err != nil {
			return fmt.Errorf("error reading 'publication_group_id': %w", err)
		}
	}

	if raw, found := object["root_path"]; found {
		err = json.Unmarshal(raw, &t.RootPath)
		if err != nil {
			return fmt.Errorf("error reading 'root_path': %w", err)
		}
	}

	if raw, found := object["total_bytes"]; found {
		err = json.Unmarshal(raw, &t.TotalBytes)
		if err != nil {
			return fmt.Errorf("error reading 'total_bytes': %w", err)
		}
	}

	if raw, found := object["type"]; found {
		err = json.Unmarshal(raw, &t.Type)
		if err != nil {
			return fmt.Errorf("error reading 'type': %w", err)
		}
	}

	return err
}

// AsDecisionAnswerValue0 returns the union data inside the DecisionAnswerValue as a DecisionAnswerValue0
func (t DecisionAnswerValue) AsDecisionAnswerValue0() (DecisionAnswerValue0, error) {
	var body DecisionAnswerValue0
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDecisionAnswerValue0 overwrites any union data inside the DecisionAnswerValue as the provided DecisionAnswerValue0
func (t *DecisionAnswerValue) FromDecisionAnswerValue0(v DecisionAnswerValue0) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDecisionAnswerValue0 performs a merge with any union data inside the DecisionAnswerValue, using the provided DecisionAnswerValue0
func (t *DecisionAnswerValue) MergeDecisionAnswerValue0(v DecisionAnswerValue0) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsDecisionAnswerValue1 returns the union data inside the DecisionAnswerValue as a DecisionAnswerValue1
func (t DecisionAnswerValue) AsDecisionAnswerValue1() (DecisionAnswerValue1, error) {
	var body DecisionAnswerValue1
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDecisionAnswerValue1 overwrites any union data inside the DecisionAnswerValue as the provided DecisionAnswerValue1
func (t *DecisionAnswerValue) FromDecisionAnswerValue1(v DecisionAnswerValue1) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDecisionAnswerValue1 performs a merge with any union data inside the DecisionAnswerValue, using the provided DecisionAnswerValue1
func (t *DecisionAnswerValue) MergeDecisionAnswerValue1(v DecisionAnswerValue1) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t DecisionAnswerValue) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *DecisionAnswerValue) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsDocumentCommentTextSegment returns the union data inside the DocumentCommentSegment as a DocumentCommentTextSegment
func (t DocumentCommentSegment) AsDocumentCommentTextSegment() (DocumentCommentTextSegment, error) {
	var body DocumentCommentTextSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentCommentTextSegment overwrites any union data inside the DocumentCommentSegment as the provided DocumentCommentTextSegment
func (t *DocumentCommentSegment) FromDocumentCommentTextSegment(v DocumentCommentTextSegment) error {
	v.Type = "text"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentCommentTextSegment performs a merge with any union data inside the DocumentCommentSegment, using the provided DocumentCommentTextSegment
func (t *DocumentCommentSegment) MergeDocumentCommentTextSegment(v DocumentCommentTextSegment) error {
	v.Type = "text"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsDocumentCommentReferenceSegment returns the union data inside the DocumentCommentSegment as a DocumentCommentReferenceSegment
func (t DocumentCommentSegment) AsDocumentCommentReferenceSegment() (DocumentCommentReferenceSegment, error) {
	var body DocumentCommentReferenceSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentCommentReferenceSegment overwrites any union data inside the DocumentCommentSegment as the provided DocumentCommentReferenceSegment
func (t *DocumentCommentSegment) FromDocumentCommentReferenceSegment(v DocumentCommentReferenceSegment) error {
	v.Type = "reference"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentCommentReferenceSegment performs a merge with any union data inside the DocumentCommentSegment, using the provided DocumentCommentReferenceSegment
func (t *DocumentCommentSegment) MergeDocumentCommentReferenceSegment(v DocumentCommentReferenceSegment) error {
	v.Type = "reference"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t DocumentCommentSegment) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"type"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t DocumentCommentSegment) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "reference":
		return t.AsDocumentCommentReferenceSegment()
	case "text":
		return t.AsDocumentCommentTextSegment()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t DocumentCommentSegment) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *DocumentCommentSegment) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsDocumentCommentThreadCreateRequest0 returns the union data inside the DocumentCommentThreadCreateRequest as a DocumentCommentThreadCreateRequest0
func (t DocumentCommentThreadCreateRequest) AsDocumentCommentThreadCreateRequest0() (DocumentCommentThreadCreateRequest0, error) {
	var body DocumentCommentThreadCreateRequest0
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentCommentThreadCreateRequest0 overwrites any union data inside the DocumentCommentThreadCreateRequest as the provided DocumentCommentThreadCreateRequest0
func (t *DocumentCommentThreadCreateRequest) FromDocumentCommentThreadCreateRequest0(v DocumentCommentThreadCreateRequest0) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentCommentThreadCreateRequest0 performs a merge with any union data inside the DocumentCommentThreadCreateRequest, using the provided DocumentCommentThreadCreateRequest0
func (t *DocumentCommentThreadCreateRequest) MergeDocumentCommentThreadCreateRequest0(v DocumentCommentThreadCreateRequest0) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsDocumentCommentThreadCreateRequest1 returns the union data inside the DocumentCommentThreadCreateRequest as a DocumentCommentThreadCreateRequest1
func (t DocumentCommentThreadCreateRequest) AsDocumentCommentThreadCreateRequest1() (DocumentCommentThreadCreateRequest1, error) {
	var body DocumentCommentThreadCreateRequest1
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentCommentThreadCreateRequest1 overwrites any union data inside the DocumentCommentThreadCreateRequest as the provided DocumentCommentThreadCreateRequest1
func (t *DocumentCommentThreadCreateRequest) FromDocumentCommentThreadCreateRequest1(v DocumentCommentThreadCreateRequest1) error {
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentCommentThreadCreateRequest1 performs a merge with any union data inside the DocumentCommentThreadCreateRequest, using the provided DocumentCommentThreadCreateRequest1
func (t *DocumentCommentThreadCreateRequest) MergeDocumentCommentThreadCreateRequest1(v DocumentCommentThreadCreateRequest1) error {
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t DocumentCommentThreadCreateRequest) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	if err != nil {
		return nil, err
	}
	object := make(map[string]json.RawMessage)
	if t.union != nil {
		err = json.Unmarshal(b, &object)
		if err != nil {
			return nil, err
		}
	}

	if t.Anchor != nil {
		object["anchor"], err = json.Marshal(t.Anchor)
		if err != nil {
			return nil, fmt.Errorf("error marshaling 'anchor': %w", err)
		}
	}

	if t.CurrentContext != nil {
		object["current_context"], err = json.Marshal(t.CurrentContext)
		if err != nil {
			return nil, fmt.Errorf("error marshaling 'current_context': %w", err)
		}
	}

	if t.DocumentVersionId != nil {
		object["document_version_id"], err = json.Marshal(t.DocumentVersionId)
		if err != nil {
			return nil, fmt.Errorf("error marshaling 'document_version_id': %w", err)
		}
	}

	if t.DurableHead != nil {
		object["durable_head"], err = json.Marshal(t.DurableHead)
		if err != nil {
			return nil, fmt.Errorf("error marshaling 'durable_head': %w", err)
		}
	}

	object["initial_comment"], err = json.Marshal(t.InitialComment)
	if err != nil {
		return nil, fmt.Errorf("error marshaling 'initial_comment': %w", err)
	}

	b, err = json.Marshal(object)
	return b, err
}

func (t *DocumentCommentThreadCreateRequest) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	if err != nil {
		return err
	}
	object := make(map[string]json.RawMessage)
	err = json.Unmarshal(b, &object)
	if err != nil {
		return err
	}

	if raw, found := object["anchor"]; found {
		err = json.Unmarshal(raw, &t.Anchor)
		if err != nil {
			return fmt.Errorf("error reading 'anchor': %w", err)
		}
	}

	if raw, found := object["current_context"]; found {
		err = json.Unmarshal(raw, &t.CurrentContext)
		if err != nil {
			return fmt.Errorf("error reading 'current_context': %w", err)
		}
	}

	if raw, found := object["document_version_id"]; found {
		err = json.Unmarshal(raw, &t.DocumentVersionId)
		if err != nil {
			return fmt.Errorf("error reading 'document_version_id': %w", err)
		}
	}

	if raw, found := object["durable_head"]; found {
		err = json.Unmarshal(raw, &t.DurableHead)
		if err != nil {
			return fmt.Errorf("error reading 'durable_head': %w", err)
		}
	}

	if raw, found := object["initial_comment"]; found {
		err = json.Unmarshal(raw, &t.InitialComment)
		if err != nil {
			return fmt.Errorf("error reading 'initial_comment': %w", err)
		}
	}

	return err
}

// AsDocumentPlacementFolder returns the union data inside the DocumentPlacementNode as a DocumentPlacementFolder
func (t DocumentPlacementNode) AsDocumentPlacementFolder() (DocumentPlacementFolder, error) {
	var body DocumentPlacementFolder
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentPlacementFolder overwrites any union data inside the DocumentPlacementNode as the provided DocumentPlacementFolder
func (t *DocumentPlacementNode) FromDocumentPlacementFolder(v DocumentPlacementFolder) error {
	v.NodeKind = "folder"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentPlacementFolder performs a merge with any union data inside the DocumentPlacementNode, using the provided DocumentPlacementFolder
func (t *DocumentPlacementNode) MergeDocumentPlacementFolder(v DocumentPlacementFolder) error {
	v.NodeKind = "folder"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsDocumentPlacementDocument returns the union data inside the DocumentPlacementNode as a DocumentPlacementDocument
func (t DocumentPlacementNode) AsDocumentPlacementDocument() (DocumentPlacementDocument, error) {
	var body DocumentPlacementDocument
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentPlacementDocument overwrites any union data inside the DocumentPlacementNode as the provided DocumentPlacementDocument
func (t *DocumentPlacementNode) FromDocumentPlacementDocument(v DocumentPlacementDocument) error {
	v.NodeKind = "document"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentPlacementDocument performs a merge with any union data inside the DocumentPlacementNode, using the provided DocumentPlacementDocument
func (t *DocumentPlacementNode) MergeDocumentPlacementDocument(v DocumentPlacementDocument) error {
	v.NodeKind = "document"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t DocumentPlacementNode) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"node_kind"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t DocumentPlacementNode) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "document":
		return t.AsDocumentPlacementDocument()
	case "folder":
		return t.AsDocumentPlacementFolder()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t DocumentPlacementNode) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *DocumentPlacementNode) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsAgentCreatedNotice returns the union data inside the MessageNotice as a AgentCreatedNotice
func (t MessageNotice) AsAgentCreatedNotice() (AgentCreatedNotice, error) {
	var body AgentCreatedNotice
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentCreatedNotice overwrites any union data inside the MessageNotice as the provided AgentCreatedNotice
func (t *MessageNotice) FromAgentCreatedNotice(v AgentCreatedNotice) error {
	v.Type = "agent_created"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentCreatedNotice performs a merge with any union data inside the MessageNotice, using the provided AgentCreatedNotice
func (t *MessageNotice) MergeAgentCreatedNotice(v AgentCreatedNotice) error {
	v.Type = "agent_created"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsMemberAddedNotice returns the union data inside the MessageNotice as a MemberAddedNotice
func (t MessageNotice) AsMemberAddedNotice() (MemberAddedNotice, error) {
	var body MemberAddedNotice
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromMemberAddedNotice overwrites any union data inside the MessageNotice as the provided MemberAddedNotice
func (t *MessageNotice) FromMemberAddedNotice(v MemberAddedNotice) error {
	v.Type = "member_added"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeMemberAddedNotice performs a merge with any union data inside the MessageNotice, using the provided MemberAddedNotice
func (t *MessageNotice) MergeMemberAddedNotice(v MemberAddedNotice) error {
	v.Type = "member_added"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentProfileChangedNotice returns the union data inside the MessageNotice as a AgentProfileChangedNotice
func (t MessageNotice) AsAgentProfileChangedNotice() (AgentProfileChangedNotice, error) {
	var body AgentProfileChangedNotice
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentProfileChangedNotice overwrites any union data inside the MessageNotice as the provided AgentProfileChangedNotice
func (t *MessageNotice) FromAgentProfileChangedNotice(v AgentProfileChangedNotice) error {
	v.Type = "agent_profile_changed"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentProfileChangedNotice performs a merge with any union data inside the MessageNotice, using the provided AgentProfileChangedNotice
func (t *MessageNotice) MergeAgentProfileChangedNotice(v AgentProfileChangedNotice) error {
	v.Type = "agent_profile_changed"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t MessageNotice) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"type"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t MessageNotice) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "agent_created":
		return t.AsAgentCreatedNotice()
	case "agent_profile_changed":
		return t.AsAgentProfileChangedNotice()
	case "member_added":
		return t.AsMemberAddedNotice()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t MessageNotice) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *MessageNotice) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsReferenceSegment returns the union data inside the MessageSegment as a ReferenceSegment
func (t MessageSegment) AsReferenceSegment() (ReferenceSegment, error) {
	var body ReferenceSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromReferenceSegment overwrites any union data inside the MessageSegment as the provided ReferenceSegment
func (t *MessageSegment) FromReferenceSegment(v ReferenceSegment) error {
	v.Type = "reference"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeReferenceSegment performs a merge with any union data inside the MessageSegment, using the provided ReferenceSegment
func (t *MessageSegment) MergeReferenceSegment(v ReferenceSegment) error {
	v.Type = "reference"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsTextSegment returns the union data inside the MessageSegment as a TextSegment
func (t MessageSegment) AsTextSegment() (TextSegment, error) {
	var body TextSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromTextSegment overwrites any union data inside the MessageSegment as the provided TextSegment
func (t *MessageSegment) FromTextSegment(v TextSegment) error {
	v.Type = "text"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeTextSegment performs a merge with any union data inside the MessageSegment, using the provided TextSegment
func (t *MessageSegment) MergeTextSegment(v TextSegment) error {
	v.Type = "text"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsFileSegment returns the union data inside the MessageSegment as a FileSegment
func (t MessageSegment) AsFileSegment() (FileSegment, error) {
	var body FileSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromFileSegment overwrites any union data inside the MessageSegment as the provided FileSegment
func (t *MessageSegment) FromFileSegment(v FileSegment) error {
	v.Type = "file"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeFileSegment performs a merge with any union data inside the MessageSegment, using the provided FileSegment
func (t *MessageSegment) MergeFileSegment(v FileSegment) error {
	v.Type = "file"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsHtmlFragmentSegment returns the union data inside the MessageSegment as a HtmlFragmentSegment
func (t MessageSegment) AsHtmlFragmentSegment() (HtmlFragmentSegment, error) {
	var body HtmlFragmentSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromHtmlFragmentSegment overwrites any union data inside the MessageSegment as the provided HtmlFragmentSegment
func (t *MessageSegment) FromHtmlFragmentSegment(v HtmlFragmentSegment) error {
	v.Type = "html_fragment"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeHtmlFragmentSegment performs a merge with any union data inside the MessageSegment, using the provided HtmlFragmentSegment
func (t *MessageSegment) MergeHtmlFragmentSegment(v HtmlFragmentSegment) error {
	v.Type = "html_fragment"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsDocumentSegment returns the union data inside the MessageSegment as a DocumentSegment
func (t MessageSegment) AsDocumentSegment() (DocumentSegment, error) {
	var body DocumentSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentSegment overwrites any union data inside the MessageSegment as the provided DocumentSegment
func (t *MessageSegment) FromDocumentSegment(v DocumentSegment) error {
	v.Type = "document"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentSegment performs a merge with any union data inside the MessageSegment, using the provided DocumentSegment
func (t *MessageSegment) MergeDocumentSegment(v DocumentSegment) error {
	v.Type = "document"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsSkillSegment returns the union data inside the MessageSegment as a SkillSegment
func (t MessageSegment) AsSkillSegment() (SkillSegment, error) {
	var body SkillSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromSkillSegment overwrites any union data inside the MessageSegment as the provided SkillSegment
func (t *MessageSegment) FromSkillSegment(v SkillSegment) error {
	v.Type = "skill"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeSkillSegment performs a merge with any union data inside the MessageSegment, using the provided SkillSegment
func (t *MessageSegment) MergeSkillSegment(v SkillSegment) error {
	v.Type = "skill"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsArtifactTreeSegment returns the union data inside the MessageSegment as a ArtifactTreeSegment
func (t MessageSegment) AsArtifactTreeSegment() (ArtifactTreeSegment, error) {
	var body ArtifactTreeSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromArtifactTreeSegment overwrites any union data inside the MessageSegment as the provided ArtifactTreeSegment
func (t *MessageSegment) FromArtifactTreeSegment(v ArtifactTreeSegment) error {
	v.Type = "artifact_tree"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeArtifactTreeSegment performs a merge with any union data inside the MessageSegment, using the provided ArtifactTreeSegment
func (t *MessageSegment) MergeArtifactTreeSegment(v ArtifactTreeSegment) error {
	v.Type = "artifact_tree"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsMeetingNotesSegment returns the union data inside the MessageSegment as a MeetingNotesSegment
func (t MessageSegment) AsMeetingNotesSegment() (MeetingNotesSegment, error) {
	var body MeetingNotesSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromMeetingNotesSegment overwrites any union data inside the MessageSegment as the provided MeetingNotesSegment
func (t *MessageSegment) FromMeetingNotesSegment(v MeetingNotesSegment) error {
	v.Type = "meeting_notes"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeMeetingNotesSegment performs a merge with any union data inside the MessageSegment, using the provided MeetingNotesSegment
func (t *MessageSegment) MergeMeetingNotesSegment(v MeetingNotesSegment) error {
	v.Type = "meeting_notes"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t MessageSegment) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"type"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t MessageSegment) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "artifact_tree":
		return t.AsArtifactTreeSegment()
	case "document":
		return t.AsDocumentSegment()
	case "file":
		return t.AsFileSegment()
	case "html_fragment":
		return t.AsHtmlFragmentSegment()
	case "meeting_notes":
		return t.AsMeetingNotesSegment()
	case "reference":
		return t.AsReferenceSegment()
	case "skill":
		return t.AsSkillSegment()
	case "text":
		return t.AsTextSegment()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t MessageSegment) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *MessageSegment) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsRoomParticipationChangedPayload returns the union data inside the RoomEventPayload as a RoomParticipationChangedPayload
func (t RoomEventPayload) AsRoomParticipationChangedPayload() (RoomParticipationChangedPayload, error) {
	var body RoomParticipationChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoomParticipationChangedPayload overwrites any union data inside the RoomEventPayload as the provided RoomParticipationChangedPayload
func (t *RoomEventPayload) FromRoomParticipationChangedPayload(v RoomParticipationChangedPayload) error {
	v.Kind = "RoomParticipationChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoomParticipationChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoomParticipationChangedPayload
func (t *RoomEventPayload) MergeRoomParticipationChangedPayload(v RoomParticipationChangedPayload) error {
	v.Kind = "RoomParticipationChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsRoomSnapshotPayload returns the union data inside the RoomEventPayload as a RoomSnapshotPayload
func (t RoomEventPayload) AsRoomSnapshotPayload() (RoomSnapshotPayload, error) {
	var body RoomSnapshotPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoomSnapshotPayload overwrites any union data inside the RoomEventPayload as the provided RoomSnapshotPayload
func (t *RoomEventPayload) FromRoomSnapshotPayload(v RoomSnapshotPayload) error {
	v.Kind = "RoomSnapshotPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoomSnapshotPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoomSnapshotPayload
func (t *RoomEventPayload) MergeRoomSnapshotPayload(v RoomSnapshotPayload) error {
	v.Kind = "RoomSnapshotPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsRoomDeletedPayload returns the union data inside the RoomEventPayload as a RoomDeletedPayload
func (t RoomEventPayload) AsRoomDeletedPayload() (RoomDeletedPayload, error) {
	var body RoomDeletedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoomDeletedPayload overwrites any union data inside the RoomEventPayload as the provided RoomDeletedPayload
func (t *RoomEventPayload) FromRoomDeletedPayload(v RoomDeletedPayload) error {
	v.Kind = "RoomDeletedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoomDeletedPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoomDeletedPayload
func (t *RoomEventPayload) MergeRoomDeletedPayload(v RoomDeletedPayload) error {
	v.Kind = "RoomDeletedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsRoomHistoryCompactedPayload returns the union data inside the RoomEventPayload as a RoomHistoryCompactedPayload
func (t RoomEventPayload) AsRoomHistoryCompactedPayload() (RoomHistoryCompactedPayload, error) {
	var body RoomHistoryCompactedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoomHistoryCompactedPayload overwrites any union data inside the RoomEventPayload as the provided RoomHistoryCompactedPayload
func (t *RoomEventPayload) FromRoomHistoryCompactedPayload(v RoomHistoryCompactedPayload) error {
	v.Kind = "RoomHistoryCompactedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoomHistoryCompactedPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoomHistoryCompactedPayload
func (t *RoomEventPayload) MergeRoomHistoryCompactedPayload(v RoomHistoryCompactedPayload) error {
	v.Kind = "RoomHistoryCompactedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsMessageSnapshotPayload returns the union data inside the RoomEventPayload as a MessageSnapshotPayload
func (t RoomEventPayload) AsMessageSnapshotPayload() (MessageSnapshotPayload, error) {
	var body MessageSnapshotPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromMessageSnapshotPayload overwrites any union data inside the RoomEventPayload as the provided MessageSnapshotPayload
func (t *RoomEventPayload) FromMessageSnapshotPayload(v MessageSnapshotPayload) error {
	v.Kind = "MessageSnapshotPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeMessageSnapshotPayload performs a merge with any union data inside the RoomEventPayload, using the provided MessageSnapshotPayload
func (t *RoomEventPayload) MergeMessageSnapshotPayload(v MessageSnapshotPayload) error {
	v.Kind = "MessageSnapshotPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsMessageHiddenPayload returns the union data inside the RoomEventPayload as a MessageHiddenPayload
func (t RoomEventPayload) AsMessageHiddenPayload() (MessageHiddenPayload, error) {
	var body MessageHiddenPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromMessageHiddenPayload overwrites any union data inside the RoomEventPayload as the provided MessageHiddenPayload
func (t *RoomEventPayload) FromMessageHiddenPayload(v MessageHiddenPayload) error {
	v.Kind = "MessageHiddenPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeMessageHiddenPayload performs a merge with any union data inside the RoomEventPayload, using the provided MessageHiddenPayload
func (t *RoomEventPayload) MergeMessageHiddenPayload(v MessageHiddenPayload) error {
	v.Kind = "MessageHiddenPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsMessageThreadSummaryUpdatedPayload returns the union data inside the RoomEventPayload as a MessageThreadSummaryUpdatedPayload
func (t RoomEventPayload) AsMessageThreadSummaryUpdatedPayload() (MessageThreadSummaryUpdatedPayload, error) {
	var body MessageThreadSummaryUpdatedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromMessageThreadSummaryUpdatedPayload overwrites any union data inside the RoomEventPayload as the provided MessageThreadSummaryUpdatedPayload
func (t *RoomEventPayload) FromMessageThreadSummaryUpdatedPayload(v MessageThreadSummaryUpdatedPayload) error {
	v.Kind = "MessageThreadSummaryUpdatedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeMessageThreadSummaryUpdatedPayload performs a merge with any union data inside the RoomEventPayload, using the provided MessageThreadSummaryUpdatedPayload
func (t *RoomEventPayload) MergeMessageThreadSummaryUpdatedPayload(v MessageThreadSummaryUpdatedPayload) error {
	v.Kind = "MessageThreadSummaryUpdatedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsMessageReactionsChangedPayload returns the union data inside the RoomEventPayload as a MessageReactionsChangedPayload
func (t RoomEventPayload) AsMessageReactionsChangedPayload() (MessageReactionsChangedPayload, error) {
	var body MessageReactionsChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromMessageReactionsChangedPayload overwrites any union data inside the RoomEventPayload as the provided MessageReactionsChangedPayload
func (t *RoomEventPayload) FromMessageReactionsChangedPayload(v MessageReactionsChangedPayload) error {
	v.Kind = "MessageReactionsChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeMessageReactionsChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided MessageReactionsChangedPayload
func (t *RoomEventPayload) MergeMessageReactionsChangedPayload(v MessageReactionsChangedPayload) error {
	v.Kind = "MessageReactionsChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsCardChangedPayload returns the union data inside the RoomEventPayload as a CardChangedPayload
func (t RoomEventPayload) AsCardChangedPayload() (CardChangedPayload, error) {
	var body CardChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromCardChangedPayload overwrites any union data inside the RoomEventPayload as the provided CardChangedPayload
func (t *RoomEventPayload) FromCardChangedPayload(v CardChangedPayload) error {
	v.Kind = "CardChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeCardChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided CardChangedPayload
func (t *RoomEventPayload) MergeCardChangedPayload(v CardChangedPayload) error {
	v.Kind = "CardChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsRoomDocumentChangedPayload returns the union data inside the RoomEventPayload as a RoomDocumentChangedPayload
func (t RoomEventPayload) AsRoomDocumentChangedPayload() (RoomDocumentChangedPayload, error) {
	var body RoomDocumentChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoomDocumentChangedPayload overwrites any union data inside the RoomEventPayload as the provided RoomDocumentChangedPayload
func (t *RoomEventPayload) FromRoomDocumentChangedPayload(v RoomDocumentChangedPayload) error {
	v.Kind = "RoomDocumentChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoomDocumentChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoomDocumentChangedPayload
func (t *RoomEventPayload) MergeRoomDocumentChangedPayload(v RoomDocumentChangedPayload) error {
	v.Kind = "RoomDocumentChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsRoomMemberSnapshotPayload returns the union data inside the RoomEventPayload as a RoomMemberSnapshotPayload
func (t RoomEventPayload) AsRoomMemberSnapshotPayload() (RoomMemberSnapshotPayload, error) {
	var body RoomMemberSnapshotPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoomMemberSnapshotPayload overwrites any union data inside the RoomEventPayload as the provided RoomMemberSnapshotPayload
func (t *RoomEventPayload) FromRoomMemberSnapshotPayload(v RoomMemberSnapshotPayload) error {
	v.Kind = "RoomMemberSnapshotPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoomMemberSnapshotPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoomMemberSnapshotPayload
func (t *RoomEventPayload) MergeRoomMemberSnapshotPayload(v RoomMemberSnapshotPayload) error {
	v.Kind = "RoomMemberSnapshotPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsWorkItemChangedPayload returns the union data inside the RoomEventPayload as a WorkItemChangedPayload
func (t RoomEventPayload) AsWorkItemChangedPayload() (WorkItemChangedPayload, error) {
	var body WorkItemChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromWorkItemChangedPayload overwrites any union data inside the RoomEventPayload as the provided WorkItemChangedPayload
func (t *RoomEventPayload) FromWorkItemChangedPayload(v WorkItemChangedPayload) error {
	v.Kind = "WorkItemChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeWorkItemChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided WorkItemChangedPayload
func (t *RoomEventPayload) MergeWorkItemChangedPayload(v WorkItemChangedPayload) error {
	v.Kind = "WorkItemChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsDocumentCommentChangedPayload returns the union data inside the RoomEventPayload as a DocumentCommentChangedPayload
func (t RoomEventPayload) AsDocumentCommentChangedPayload() (DocumentCommentChangedPayload, error) {
	var body DocumentCommentChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromDocumentCommentChangedPayload overwrites any union data inside the RoomEventPayload as the provided DocumentCommentChangedPayload
func (t *RoomEventPayload) FromDocumentCommentChangedPayload(v DocumentCommentChangedPayload) error {
	v.Kind = "DocumentCommentChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeDocumentCommentChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided DocumentCommentChangedPayload
func (t *RoomEventPayload) MergeDocumentCommentChangedPayload(v DocumentCommentChangedPayload) error {
	v.Kind = "DocumentCommentChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsRoutineChangedPayload returns the union data inside the RoomEventPayload as a RoutineChangedPayload
func (t RoomEventPayload) AsRoutineChangedPayload() (RoutineChangedPayload, error) {
	var body RoutineChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromRoutineChangedPayload overwrites any union data inside the RoomEventPayload as the provided RoutineChangedPayload
func (t *RoomEventPayload) FromRoutineChangedPayload(v RoutineChangedPayload) error {
	v.Kind = "RoutineChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeRoutineChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided RoutineChangedPayload
func (t *RoomEventPayload) MergeRoutineChangedPayload(v RoutineChangedPayload) error {
	v.Kind = "RoutineChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsCaptureSessionChangedPayload returns the union data inside the RoomEventPayload as a CaptureSessionChangedPayload
func (t RoomEventPayload) AsCaptureSessionChangedPayload() (CaptureSessionChangedPayload, error) {
	var body CaptureSessionChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromCaptureSessionChangedPayload overwrites any union data inside the RoomEventPayload as the provided CaptureSessionChangedPayload
func (t *RoomEventPayload) FromCaptureSessionChangedPayload(v CaptureSessionChangedPayload) error {
	v.Kind = "CaptureSessionChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeCaptureSessionChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided CaptureSessionChangedPayload
func (t *RoomEventPayload) MergeCaptureSessionChangedPayload(v CaptureSessionChangedPayload) error {
	v.Kind = "CaptureSessionChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsAgentRunStatusChangedPayload returns the union data inside the RoomEventPayload as a AgentRunStatusChangedPayload
func (t RoomEventPayload) AsAgentRunStatusChangedPayload() (AgentRunStatusChangedPayload, error) {
	var body AgentRunStatusChangedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromAgentRunStatusChangedPayload overwrites any union data inside the RoomEventPayload as the provided AgentRunStatusChangedPayload
func (t *RoomEventPayload) FromAgentRunStatusChangedPayload(v AgentRunStatusChangedPayload) error {
	v.Kind = "AgentRunStatusChangedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeAgentRunStatusChangedPayload performs a merge with any union data inside the RoomEventPayload, using the provided AgentRunStatusChangedPayload
func (t *RoomEventPayload) MergeAgentRunStatusChangedPayload(v AgentRunStatusChangedPayload) error {
	v.Kind = "AgentRunStatusChangedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsTeamMdPublishedPayload returns the union data inside the RoomEventPayload as a TeamMdPublishedPayload
func (t RoomEventPayload) AsTeamMdPublishedPayload() (TeamMdPublishedPayload, error) {
	var body TeamMdPublishedPayload
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromTeamMdPublishedPayload overwrites any union data inside the RoomEventPayload as the provided TeamMdPublishedPayload
func (t *RoomEventPayload) FromTeamMdPublishedPayload(v TeamMdPublishedPayload) error {
	v.Kind = "TeamMdPublishedPayload"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeTeamMdPublishedPayload performs a merge with any union data inside the RoomEventPayload, using the provided TeamMdPublishedPayload
func (t *RoomEventPayload) MergeTeamMdPublishedPayload(v TeamMdPublishedPayload) error {
	v.Kind = "TeamMdPublishedPayload"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t RoomEventPayload) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"kind"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t RoomEventPayload) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "AgentRunStatusChangedPayload":
		return t.AsAgentRunStatusChangedPayload()
	case "CaptureSessionChangedPayload":
		return t.AsCaptureSessionChangedPayload()
	case "CardChangedPayload":
		return t.AsCardChangedPayload()
	case "DocumentCommentChangedPayload":
		return t.AsDocumentCommentChangedPayload()
	case "MessageHiddenPayload":
		return t.AsMessageHiddenPayload()
	case "MessageReactionsChangedPayload":
		return t.AsMessageReactionsChangedPayload()
	case "MessageSnapshotPayload":
		return t.AsMessageSnapshotPayload()
	case "MessageThreadSummaryUpdatedPayload":
		return t.AsMessageThreadSummaryUpdatedPayload()
	case "RoomDeletedPayload":
		return t.AsRoomDeletedPayload()
	case "RoomDocumentChangedPayload":
		return t.AsRoomDocumentChangedPayload()
	case "RoomHistoryCompactedPayload":
		return t.AsRoomHistoryCompactedPayload()
	case "RoomMemberSnapshotPayload":
		return t.AsRoomMemberSnapshotPayload()
	case "RoomParticipationChangedPayload":
		return t.AsRoomParticipationChangedPayload()
	case "RoomSnapshotPayload":
		return t.AsRoomSnapshotPayload()
	case "RoutineChangedPayload":
		return t.AsRoutineChangedPayload()
	case "TeamMdPublishedPayload":
		return t.AsTeamMdPublishedPayload()
	case "WorkItemChangedPayload":
		return t.AsWorkItemChangedPayload()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t RoomEventPayload) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *RoomEventPayload) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsWorkItemCommentTextSegment returns the union data inside the WorkItemCommentSegment as a WorkItemCommentTextSegment
func (t WorkItemCommentSegment) AsWorkItemCommentTextSegment() (WorkItemCommentTextSegment, error) {
	var body WorkItemCommentTextSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromWorkItemCommentTextSegment overwrites any union data inside the WorkItemCommentSegment as the provided WorkItemCommentTextSegment
func (t *WorkItemCommentSegment) FromWorkItemCommentTextSegment(v WorkItemCommentTextSegment) error {
	v.Type = "text"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeWorkItemCommentTextSegment performs a merge with any union data inside the WorkItemCommentSegment, using the provided WorkItemCommentTextSegment
func (t *WorkItemCommentSegment) MergeWorkItemCommentTextSegment(v WorkItemCommentTextSegment) error {
	v.Type = "text"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsWorkItemCommentReferenceSegment returns the union data inside the WorkItemCommentSegment as a WorkItemCommentReferenceSegment
func (t WorkItemCommentSegment) AsWorkItemCommentReferenceSegment() (WorkItemCommentReferenceSegment, error) {
	var body WorkItemCommentReferenceSegment
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromWorkItemCommentReferenceSegment overwrites any union data inside the WorkItemCommentSegment as the provided WorkItemCommentReferenceSegment
func (t *WorkItemCommentSegment) FromWorkItemCommentReferenceSegment(v WorkItemCommentReferenceSegment) error {
	v.Type = "reference"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeWorkItemCommentReferenceSegment performs a merge with any union data inside the WorkItemCommentSegment, using the provided WorkItemCommentReferenceSegment
func (t *WorkItemCommentSegment) MergeWorkItemCommentReferenceSegment(v WorkItemCommentReferenceSegment) error {
	v.Type = "reference"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t WorkItemCommentSegment) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"type"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t WorkItemCommentSegment) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "reference":
		return t.AsWorkItemCommentReferenceSegment()
	case "text":
		return t.AsWorkItemCommentTextSegment()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t WorkItemCommentSegment) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *WorkItemCommentSegment) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}

// AsWorkItemCommentTimelineEntry returns the union data inside the WorkItemTimelineEntry as a WorkItemCommentTimelineEntry
func (t WorkItemTimelineEntry) AsWorkItemCommentTimelineEntry() (WorkItemCommentTimelineEntry, error) {
	var body WorkItemCommentTimelineEntry
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromWorkItemCommentTimelineEntry overwrites any union data inside the WorkItemTimelineEntry as the provided WorkItemCommentTimelineEntry
func (t *WorkItemTimelineEntry) FromWorkItemCommentTimelineEntry(v WorkItemCommentTimelineEntry) error {
	v.Type = "comment"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeWorkItemCommentTimelineEntry performs a merge with any union data inside the WorkItemTimelineEntry, using the provided WorkItemCommentTimelineEntry
func (t *WorkItemTimelineEntry) MergeWorkItemCommentTimelineEntry(v WorkItemCommentTimelineEntry) error {
	v.Type = "comment"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

// AsWorkItemActivityTimelineEntry returns the union data inside the WorkItemTimelineEntry as a WorkItemActivityTimelineEntry
func (t WorkItemTimelineEntry) AsWorkItemActivityTimelineEntry() (WorkItemActivityTimelineEntry, error) {
	var body WorkItemActivityTimelineEntry
	err := json.Unmarshal(t.union, &body)
	return body, err
}

// FromWorkItemActivityTimelineEntry overwrites any union data inside the WorkItemTimelineEntry as the provided WorkItemActivityTimelineEntry
func (t *WorkItemTimelineEntry) FromWorkItemActivityTimelineEntry(v WorkItemActivityTimelineEntry) error {
	v.Type = "activity"
	b, err := json.Marshal(v)
	t.union = b
	return err
}

// MergeWorkItemActivityTimelineEntry performs a merge with any union data inside the WorkItemTimelineEntry, using the provided WorkItemActivityTimelineEntry
func (t *WorkItemTimelineEntry) MergeWorkItemActivityTimelineEntry(v WorkItemActivityTimelineEntry) error {
	v.Type = "activity"
	b, err := json.Marshal(v)
	if err != nil {
		return err
	}

	merged, err := runtime.JSONMerge(t.union, b)
	t.union = merged
	return err
}

func (t WorkItemTimelineEntry) Discriminator() (string, error) {
	var discriminator struct {
		Discriminator string `json:"type"`
	}
	err := json.Unmarshal(t.union, &discriminator)
	return discriminator.Discriminator, err
}

func (t WorkItemTimelineEntry) ValueByDiscriminator() (interface{}, error) {
	discriminator, err := t.Discriminator()
	if err != nil {
		return nil, err
	}
	switch discriminator {
	case "activity":
		return t.AsWorkItemActivityTimelineEntry()
	case "comment":
		return t.AsWorkItemCommentTimelineEntry()
	default:
		return nil, errors.New("unknown discriminator value: " + discriminator)
	}
}

func (t WorkItemTimelineEntry) MarshalJSON() ([]byte, error) {
	b, err := t.union.MarshalJSON()
	return b, err
}

func (t *WorkItemTimelineEntry) UnmarshalJSON(b []byte) error {
	err := t.union.UnmarshalJSON(b)
	return err
}