gaato/anthropic/gen does not have a README file

    APIError

    pub(all) struct APIError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of APIError.

    APIError::equal

    fn APIError::equal(APIError, APIError) -> Bool
    automatically derived

    APIError::new

    fn APIError::new(message~ : String, type_~ : String) -> APIError

    Creates a APIError with omitted optional fields absent.

    APIError::not_equal

    fn APIError::not_equal(x : APIError, y : APIError) -> Bool
    automatically derived

    APIError::to_json

    Encodes this value as JSON.

    APIError::to_repr

    automatically derived

    AllowedCaller

    pub(all) enum AllowedCaller {
    Direct
    CodeExecution20250825
    CodeExecution20260120
    CodeExecution20260521
    Custom(String)
    } derive(Eq,
    Debug
    )

    Specifies who can invoke a tool. Values: direct: The model can call this tool directly. code_execution_20250825: The tool can be called from the code execution environment (v1). code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence). code_execution_20260521: The tool can be called from the code execution environment (v2 with persistence).

    AllowedCaller::equal

    automatically derived

    AllowedCaller::not_equal

    fn AllowedCaller::not_equal(x : AllowedCaller, y : AllowedCaller) -> Bool
    automatically derived

    AllowedCaller::to_json

    Encodes this string enum as JSON.

    AllowedCaller::to_repr

    automatically derived

    AssistantInputMessage

    pub(all) struct AssistantInputMessage {
    content : InputMessageContent
    role : String
    } derive(Eq,
    Debug
    )

    Generated representation of AssistantInputMessage.

    AssistantInputMessage::equal

    automatically derived

    AssistantInputMessage::new

    fn AssistantInputMessage::new(content~ : InputMessageContent, role~ : String) -> AssistantInputMessage

    Creates a AssistantInputMessage with omitted optional fields absent.

    AssistantInputMessage::not_equal

    automatically derived

    AssistantInputMessage::to_json

    Encodes this value as JSON.

    AssistantInputMessage::to_repr

    automatically derived

    AuthenticationError

    pub(all) struct AuthenticationError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of AuthenticationError.

    AuthenticationError::equal

    automatically derived

    AuthenticationError::new

    fn AuthenticationError::new(message~ : String, type_~ : String) -> AuthenticationError

    Creates a AuthenticationError with omitted optional fields absent.

    AuthenticationError::not_equal

    automatically derived

    AuthenticationError::to_json

    Encodes this value as JSON.

    AuthenticationError::to_repr

    automatically derived

    AvailableToolsLimitExceededErrorDetails

    pub(all) struct AvailableToolsLimitExceededErrorDetails {
    } derive(Eq,
    Debug
    )

    The tools available after a message exceed a limit on their number or their size.

    AvailableToolsLimitExceededErrorDetails::equal

    automatically derived

    AvailableToolsLimitExceededErrorDetails::not_equal

    automatically derived

    AvailableToolsLimitExceededErrorDetails::to_json

    Encodes this value as JSON.

    AvailableToolsLimitExceededErrorDetails::to_repr

    automatically derived

    Base64ImageSource

    pub(all) struct Base64ImageSource {
    data : String
    media_type : Base64ImageSourceMediaType
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of Base64ImageSource.

    Base64ImageSource::equal

    automatically derived

    Base64ImageSource::new

    fn Base64ImageSource::new(data~ : String, media_type~ : Base64ImageSourceMediaType, type_~ : String) -> Base64ImageSource

    Creates a Base64ImageSource with omitted optional fields absent.

    Base64ImageSource::not_equal

    fn Base64ImageSource::not_equal(x : Base64ImageSource, y : Base64ImageSource) -> Bool
    automatically derived

    Base64ImageSource::to_json

    Encodes this value as JSON.

    Base64ImageSource::to_repr

    automatically derived

    Base64ImageSourceMediaType

    pub(all) enum Base64ImageSourceMediaType {
    ImageJpeg
    ImagePng
    ImageGif
    ImageWebp
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum Base64ImageSourceMediaType.

    Base64ImageSourceMediaType::equal

    automatically derived

    Base64ImageSourceMediaType::not_equal

    automatically derived

    Base64ImageSourceMediaType::to_json

    Encodes this string enum as JSON.

    Base64ImageSourceMediaType::to_repr

    automatically derived

    Base64PDFSource

    pub(all) struct Base64PDFSource {
    data : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of Base64PDFSource.

    Base64PDFSource::equal

    automatically derived

    Base64PDFSource::new

    fn Base64PDFSource::new(data~ : String, type_~ : String) -> Base64PDFSource

    Creates a Base64PDFSource with omitted optional fields absent.

    Base64PDFSource::not_equal

    fn Base64PDFSource::not_equal(x : Base64PDFSource, y : Base64PDFSource) -> Bool
    automatically derived

    Base64PDFSource::to_json

    Encodes this value as JSON.

    Base64PDFSource::to_repr

    automatically derived

    BashCodeExecutionToolResultErrorCode

    pub(all) enum BashCodeExecutionToolResultErrorCode {
    InvalidToolInput
    Unavailable
    TooManyRequests
    ExecutionTimeExceeded
    OutputFileTooLarge
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum BashCodeExecutionToolResultErrorCode.

    BashCodeExecutionToolResultErrorCode::equal

    automatically derived

    BashCodeExecutionToolResultErrorCode::not_equal

    automatically derived

    BashCodeExecutionToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    BashCodeExecutionToolResultErrorCode::to_repr

    automatically derived

    BashTool20250124

    pub(all) struct BashTool20250124 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [BashTool20250124CacheControl]
    defer_loading : Bool?
    input_examples : Array[Map[String,
    Json
    ]]?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of BashTool20250124.

    BashTool20250124::equal

    automatically derived

    BashTool20250124::new

    fn BashTool20250124::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : BashTool20250124CacheControl, defer_loading? : Bool, input_examples? : Array[Map[String,
    Json
    ]], strict? : Bool) -> BashTool20250124

    Creates a BashTool20250124 with omitted optional fields absent.

    BashTool20250124::not_equal

    fn BashTool20250124::not_equal(x : BashTool20250124, y : BashTool20250124) -> Bool
    automatically derived

    BashTool20250124::to_json

    Encodes this value as JSON.

    BashTool20250124::to_repr

    automatically derived

    BashTool20250124CacheControl

    pub(all) enum BashTool20250124CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    BashTool20250124CacheControl::equal

    automatically derived

    BashTool20250124CacheControl::not_equal

    automatically derived

    BashTool20250124CacheControl::to_json

    Encodes this tagged union as JSON.

    BashTool20250124CacheControl::to_repr

    automatically derived

    BillingError

    pub(all) struct BillingError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of BillingError.

    BillingError::equal

    automatically derived

    BillingError::new

    fn BillingError::new(message~ : String, type_~ : String) -> BillingError

    Creates a BillingError with omitted optional fields absent.

    BillingError::not_equal

    fn BillingError::not_equal(x : BillingError, y : BillingError) -> Bool
    automatically derived

    BillingError::to_json

    Encodes this value as JSON.

    BillingError::to_repr

    automatically derived

    BrowserCloseTabConfig

    pub(all) struct BrowserCloseTabConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    close_tab's config overrides.

    BrowserCloseTabConfig::equal

    automatically derived

    BrowserCloseTabConfig::new

    fn BrowserCloseTabConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserCloseTabConfig

    Creates a BrowserCloseTabConfig with omitted optional fields absent.

    BrowserCloseTabConfig::not_equal

    automatically derived

    BrowserCloseTabConfig::to_json

    Encodes this value as JSON.

    BrowserCloseTabConfig::to_repr

    automatically derived

    BrowserDoubleClickConfig

    pub(all) struct BrowserDoubleClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    double_click's config overrides.

    BrowserDoubleClickConfig::equal

    automatically derived

    BrowserDoubleClickConfig::new

    fn BrowserDoubleClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserDoubleClickConfig

    Creates a BrowserDoubleClickConfig with omitted optional fields absent.

    BrowserDoubleClickConfig::not_equal

    automatically derived

    BrowserDoubleClickConfig::to_json

    Encodes this value as JSON.

    BrowserDoubleClickConfig::to_repr

    automatically derived

    BrowserFileUploadConfig

    pub(all) struct BrowserFileUploadConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    file_upload's config overrides.

    BrowserFileUploadConfig::equal

    automatically derived

    BrowserFileUploadConfig::new

    fn BrowserFileUploadConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserFileUploadConfig

    Creates a BrowserFileUploadConfig with omitted optional fields absent.

    BrowserFileUploadConfig::not_equal

    automatically derived

    BrowserFileUploadConfig::to_json

    Encodes this value as JSON.

    BrowserFileUploadConfig::to_repr

    automatically derived

    BrowserFindConfig

    pub(all) struct BrowserFindConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    find's config overrides.

    BrowserFindConfig::equal

    automatically derived

    BrowserFindConfig::new

    fn BrowserFindConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserFindConfig

    Creates a BrowserFindConfig with omitted optional fields absent.

    BrowserFindConfig::not_equal

    fn BrowserFindConfig::not_equal(x : BrowserFindConfig, y : BrowserFindConfig) -> Bool
    automatically derived

    BrowserFindConfig::to_json

    Encodes this value as JSON.

    BrowserFindConfig::to_repr

    automatically derived

    BrowserFormInputConfig

    pub(all) struct BrowserFormInputConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    form_input's config overrides.

    BrowserFormInputConfig::equal

    automatically derived

    BrowserFormInputConfig::new

    fn BrowserFormInputConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserFormInputConfig

    Creates a BrowserFormInputConfig with omitted optional fields absent.

    BrowserFormInputConfig::not_equal

    automatically derived

    BrowserFormInputConfig::to_json

    Encodes this value as JSON.

    BrowserFormInputConfig::to_repr

    automatically derived

    BrowserGetPageTextConfig

    pub(all) struct BrowserGetPageTextConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    get_page_text's config overrides.

    BrowserGetPageTextConfig::equal

    automatically derived

    BrowserGetPageTextConfig::new

    fn BrowserGetPageTextConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserGetPageTextConfig

    Creates a BrowserGetPageTextConfig with omitted optional fields absent.

    BrowserGetPageTextConfig::not_equal

    automatically derived

    BrowserGetPageTextConfig::to_json

    Encodes this value as JSON.

    BrowserGetPageTextConfig::to_repr

    automatically derived

    BrowserHoldKeyConfig

    pub(all) struct BrowserHoldKeyConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    hold_key's config overrides.

    BrowserHoldKeyConfig::equal

    automatically derived

    BrowserHoldKeyConfig::new

    fn BrowserHoldKeyConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserHoldKeyConfig

    Creates a BrowserHoldKeyConfig with omitted optional fields absent.

    BrowserHoldKeyConfig::not_equal

    automatically derived

    BrowserHoldKeyConfig::to_json

    Encodes this value as JSON.

    BrowserHoldKeyConfig::to_repr

    automatically derived

    BrowserHoverConfig

    pub(all) struct BrowserHoverConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    hover's config overrides.

    BrowserHoverConfig::equal

    automatically derived

    BrowserHoverConfig::new

    fn BrowserHoverConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserHoverConfig

    Creates a BrowserHoverConfig with omitted optional fields absent.

    BrowserHoverConfig::not_equal

    automatically derived

    BrowserHoverConfig::to_json

    Encodes this value as JSON.

    BrowserHoverConfig::to_repr

    automatically derived

    BrowserJavascriptExecConfig

    pub(all) struct BrowserJavascriptExecConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    javascript_exec's config overrides.

    BrowserJavascriptExecConfig::equal

    automatically derived

    BrowserJavascriptExecConfig::new

    fn BrowserJavascriptExecConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserJavascriptExecConfig

    Creates a BrowserJavascriptExecConfig with omitted optional fields absent.

    BrowserJavascriptExecConfig::not_equal

    automatically derived

    BrowserJavascriptExecConfig::to_json

    Encodes this value as JSON.

    BrowserJavascriptExecConfig::to_repr

    automatically derived

    BrowserKeyConfig

    pub(all) struct BrowserKeyConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    key's config overrides.

    BrowserKeyConfig::equal

    automatically derived

    BrowserKeyConfig::new

    fn BrowserKeyConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserKeyConfig

    Creates a BrowserKeyConfig with omitted optional fields absent.

    BrowserKeyConfig::not_equal

    fn BrowserKeyConfig::not_equal(x : BrowserKeyConfig, y : BrowserKeyConfig) -> Bool
    automatically derived

    BrowserKeyConfig::to_json

    Encodes this value as JSON.

    BrowserKeyConfig::to_repr

    automatically derived

    BrowserLeftClickConfig

    pub(all) struct BrowserLeftClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_click's config overrides.

    BrowserLeftClickConfig::equal

    automatically derived

    BrowserLeftClickConfig::new

    fn BrowserLeftClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserLeftClickConfig

    Creates a BrowserLeftClickConfig with omitted optional fields absent.

    BrowserLeftClickConfig::not_equal

    automatically derived

    BrowserLeftClickConfig::to_json

    Encodes this value as JSON.

    BrowserLeftClickConfig::to_repr

    automatically derived

    BrowserLeftClickDragConfig

    pub(all) struct BrowserLeftClickDragConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_click_drag's config overrides.

    BrowserLeftClickDragConfig::equal

    automatically derived

    BrowserLeftClickDragConfig::new

    fn BrowserLeftClickDragConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserLeftClickDragConfig

    Creates a BrowserLeftClickDragConfig with omitted optional fields absent.

    BrowserLeftClickDragConfig::not_equal

    automatically derived

    BrowserLeftClickDragConfig::to_json

    Encodes this value as JSON.

    BrowserLeftClickDragConfig::to_repr

    automatically derived

    BrowserLeftMouseDownConfig

    pub(all) struct BrowserLeftMouseDownConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_mouse_down's config overrides.

    BrowserLeftMouseDownConfig::equal

    automatically derived

    BrowserLeftMouseDownConfig::new

    fn BrowserLeftMouseDownConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserLeftMouseDownConfig

    Creates a BrowserLeftMouseDownConfig with omitted optional fields absent.

    BrowserLeftMouseDownConfig::not_equal

    automatically derived

    BrowserLeftMouseDownConfig::to_json

    Encodes this value as JSON.

    BrowserLeftMouseDownConfig::to_repr

    automatically derived

    BrowserLeftMouseUpConfig

    pub(all) struct BrowserLeftMouseUpConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_mouse_up's config overrides.

    BrowserLeftMouseUpConfig::equal

    automatically derived

    BrowserLeftMouseUpConfig::new

    fn BrowserLeftMouseUpConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserLeftMouseUpConfig

    Creates a BrowserLeftMouseUpConfig with omitted optional fields absent.

    BrowserLeftMouseUpConfig::not_equal

    automatically derived

    BrowserLeftMouseUpConfig::to_json

    Encodes this value as JSON.

    BrowserLeftMouseUpConfig::to_repr

    automatically derived

    BrowserListTabsConfig

    pub(all) struct BrowserListTabsConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    list_tabs's config overrides.

    BrowserListTabsConfig::equal

    automatically derived

    BrowserListTabsConfig::new

    fn BrowserListTabsConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserListTabsConfig

    Creates a BrowserListTabsConfig with omitted optional fields absent.

    BrowserListTabsConfig::not_equal

    automatically derived

    BrowserListTabsConfig::to_json

    Encodes this value as JSON.

    BrowserListTabsConfig::to_repr

    automatically derived

    BrowserMiddleClickConfig

    pub(all) struct BrowserMiddleClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    middle_click's config overrides.

    BrowserMiddleClickConfig::equal

    automatically derived

    BrowserMiddleClickConfig::new

    fn BrowserMiddleClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserMiddleClickConfig

    Creates a BrowserMiddleClickConfig with omitted optional fields absent.

    BrowserMiddleClickConfig::not_equal

    automatically derived

    BrowserMiddleClickConfig::to_json

    Encodes this value as JSON.

    BrowserMiddleClickConfig::to_repr

    automatically derived

    BrowserMouseMoveConfig

    pub(all) struct BrowserMouseMoveConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    mouse_move's config overrides.

    BrowserMouseMoveConfig::equal

    automatically derived

    BrowserMouseMoveConfig::new

    fn BrowserMouseMoveConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserMouseMoveConfig

    Creates a BrowserMouseMoveConfig with omitted optional fields absent.

    BrowserMouseMoveConfig::not_equal

    automatically derived

    BrowserMouseMoveConfig::to_json

    Encodes this value as JSON.

    BrowserMouseMoveConfig::to_repr

    automatically derived

    BrowserNavigateConfig

    pub(all) struct BrowserNavigateConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    navigate's config overrides.

    BrowserNavigateConfig::equal

    automatically derived

    BrowserNavigateConfig::new

    fn BrowserNavigateConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserNavigateConfig

    Creates a BrowserNavigateConfig with omitted optional fields absent.

    BrowserNavigateConfig::not_equal

    automatically derived

    BrowserNavigateConfig::to_json

    Encodes this value as JSON.

    BrowserNavigateConfig::to_repr

    automatically derived

    BrowserNewTabConfig

    pub(all) struct BrowserNewTabConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    new_tab's config overrides.

    BrowserNewTabConfig::equal

    automatically derived

    BrowserNewTabConfig::new

    fn BrowserNewTabConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserNewTabConfig

    Creates a BrowserNewTabConfig with omitted optional fields absent.

    BrowserNewTabConfig::not_equal

    automatically derived

    BrowserNewTabConfig::to_json

    Encodes this value as JSON.

    BrowserNewTabConfig::to_repr

    automatically derived

    BrowserReadConsoleConfig

    pub(all) struct BrowserReadConsoleConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    read_console's config overrides.

    BrowserReadConsoleConfig::equal

    automatically derived

    BrowserReadConsoleConfig::new

    fn BrowserReadConsoleConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserReadConsoleConfig

    Creates a BrowserReadConsoleConfig with omitted optional fields absent.

    BrowserReadConsoleConfig::not_equal

    automatically derived

    BrowserReadConsoleConfig::to_json

    Encodes this value as JSON.

    BrowserReadConsoleConfig::to_repr

    automatically derived

    BrowserReadNetworkConfig

    pub(all) struct BrowserReadNetworkConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    read_network's config overrides.

    BrowserReadNetworkConfig::equal

    automatically derived

    BrowserReadNetworkConfig::new

    fn BrowserReadNetworkConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserReadNetworkConfig

    Creates a BrowserReadNetworkConfig with omitted optional fields absent.

    BrowserReadNetworkConfig::not_equal

    automatically derived

    BrowserReadNetworkConfig::to_json

    Encodes this value as JSON.

    BrowserReadNetworkConfig::to_repr

    automatically derived

    BrowserReadPageConfig

    pub(all) struct BrowserReadPageConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    read_page's config overrides.

    BrowserReadPageConfig::equal

    automatically derived

    BrowserReadPageConfig::new

    fn BrowserReadPageConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserReadPageConfig

    Creates a BrowserReadPageConfig with omitted optional fields absent.

    BrowserReadPageConfig::not_equal

    automatically derived

    BrowserReadPageConfig::to_json

    Encodes this value as JSON.

    BrowserReadPageConfig::to_repr

    automatically derived

    BrowserRightClickConfig

    pub(all) struct BrowserRightClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    right_click's config overrides.

    BrowserRightClickConfig::equal

    automatically derived

    BrowserRightClickConfig::new

    fn BrowserRightClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserRightClickConfig

    Creates a BrowserRightClickConfig with omitted optional fields absent.

    BrowserRightClickConfig::not_equal

    automatically derived

    BrowserRightClickConfig::to_json

    Encodes this value as JSON.

    BrowserRightClickConfig::to_repr

    automatically derived

    BrowserScreenshotConfig

    pub(all) struct BrowserScreenshotConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    screenshot's config overrides.

    BrowserScreenshotConfig::equal

    automatically derived

    BrowserScreenshotConfig::new

    fn BrowserScreenshotConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserScreenshotConfig

    Creates a BrowserScreenshotConfig with omitted optional fields absent.

    BrowserScreenshotConfig::not_equal

    automatically derived

    BrowserScreenshotConfig::to_json

    Encodes this value as JSON.

    BrowserScreenshotConfig::to_repr

    automatically derived

    BrowserScrollConfig

    pub(all) struct BrowserScrollConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    scroll's config overrides.

    BrowserScrollConfig::equal

    automatically derived

    BrowserScrollConfig::new

    fn BrowserScrollConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserScrollConfig

    Creates a BrowserScrollConfig with omitted optional fields absent.

    BrowserScrollConfig::not_equal

    automatically derived

    BrowserScrollConfig::to_json

    Encodes this value as JSON.

    BrowserScrollConfig::to_repr

    automatically derived

    BrowserScrollToConfig

    pub(all) struct BrowserScrollToConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    scroll_to's config overrides.

    BrowserScrollToConfig::equal

    automatically derived

    BrowserScrollToConfig::new

    fn BrowserScrollToConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserScrollToConfig

    Creates a BrowserScrollToConfig with omitted optional fields absent.

    BrowserScrollToConfig::not_equal

    automatically derived

    BrowserScrollToConfig::to_json

    Encodes this value as JSON.

    BrowserScrollToConfig::to_repr

    automatically derived

    BrowserStateChangeDownloadCompleted

    pub(all) struct BrowserStateChangeDownloadCompleted {
    download_id : String
    path :
    Presence
    [String]
    size_bytes :
    Presence
    [Int]
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

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

    BrowserStateChangeDownloadCompleted::equal

    automatically derived

    BrowserStateChangeDownloadCompleted::new

    fn BrowserStateChangeDownloadCompleted::new(download_id~ : String, type_~ : String, url~ : String, path? : String, size_bytes? : Int) -> BrowserStateChangeDownloadCompleted

    Creates a BrowserStateChangeDownloadCompleted with omitted optional fields absent.

    BrowserStateChangeDownloadCompleted::not_equal

    automatically derived

    BrowserStateChangeDownloadCompleted::to_json

    Encodes this value as JSON.

    BrowserStateChangeDownloadCompleted::to_repr

    automatically derived

    BrowserStateChangeDownloadFailed

    pub(all) struct BrowserStateChangeDownloadFailed {
    download_id : String
    error :
    Presence
    [String]
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

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

    BrowserStateChangeDownloadFailed::equal

    automatically derived

    BrowserStateChangeDownloadFailed::new

    fn BrowserStateChangeDownloadFailed::new(download_id~ : String, type_~ : String, url~ : String, error? : String) -> BrowserStateChangeDownloadFailed

    Creates a BrowserStateChangeDownloadFailed with omitted optional fields absent.

    BrowserStateChangeDownloadFailed::not_equal

    automatically derived

    BrowserStateChangeDownloadFailed::to_json

    Encodes this value as JSON.

    BrowserStateChangeDownloadFailed::to_repr

    automatically derived

    BrowserStateChangeDownloadStarted

    pub(all) struct BrowserStateChangeDownloadStarted {
    download_id : String
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    A file download that started during this call.

    BrowserStateChangeDownloadStarted::equal

    automatically derived

    BrowserStateChangeDownloadStarted::new

    fn BrowserStateChangeDownloadStarted::new(download_id~ : String, type_~ : String, url~ : String) -> BrowserStateChangeDownloadStarted

    Creates a BrowserStateChangeDownloadStarted with omitted optional fields absent.

    BrowserStateChangeDownloadStarted::not_equal

    automatically derived

    BrowserStateChangeDownloadStarted::to_json

    Encodes this value as JSON.

    BrowserStateChangeDownloadStarted::to_repr

    automatically derived

    BrowserStateChangeTabOpened

    pub(all) struct BrowserStateChangeTabOpened {
    tab_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    A tab this call's execution opened that remains open at its end — the creation delta of the tabs inventory, not an event log. Carries only the tab_id; the tab's title and url live on its tabs entry, which must include the same tab_id. A tab opened during a failed call gets no deferred tab_opened; it simply appears in the next result's tabs inventory.

    BrowserStateChangeTabOpened::equal

    automatically derived

    BrowserStateChangeTabOpened::new

    fn BrowserStateChangeTabOpened::new(tab_id~ : String, type_~ : String) -> BrowserStateChangeTabOpened

    Creates a BrowserStateChangeTabOpened with omitted optional fields absent.

    BrowserStateChangeTabOpened::not_equal

    automatically derived

    BrowserStateChangeTabOpened::to_json

    Encodes this value as JSON.

    BrowserStateChangeTabOpened::to_repr

    automatically derived

    BrowserStateTabEntry

    pub(all) struct BrowserStateTabEntry {
    active : Bool?
    tab_id : String
    title : String
    url : String
    } derive(Eq,
    Debug
    )

    One open browser tab reported in a browser_state block's tabs inventory. tab_id is the caller-assigned identifier for the tab; title and url describe the page the tab is currently showing and may be empty strings (a blank tab legitimately has both empty). active marks the tab that is active after this call; whenever tabs is non-empty, exactly one entry is marked.

    BrowserStateTabEntry::equal

    automatically derived

    BrowserStateTabEntry::new

    fn BrowserStateTabEntry::new(tab_id~ : String, title~ : String, url~ : String, active? : Bool) -> BrowserStateTabEntry

    Creates a BrowserStateTabEntry with omitted optional fields absent.

    BrowserStateTabEntry::not_equal

    automatically derived

    BrowserStateTabEntry::to_json

    Encodes this value as JSON.

    BrowserStateTabEntry::to_repr

    automatically derived

    BrowserSwitchTabConfig

    pub(all) struct BrowserSwitchTabConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    switch_tab's config overrides.

    BrowserSwitchTabConfig::equal

    automatically derived

    BrowserSwitchTabConfig::new

    fn BrowserSwitchTabConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserSwitchTabConfig

    Creates a BrowserSwitchTabConfig with omitted optional fields absent.

    BrowserSwitchTabConfig::not_equal

    automatically derived

    BrowserSwitchTabConfig::to_json

    Encodes this value as JSON.

    BrowserSwitchTabConfig::to_repr

    automatically derived

    BrowserToolset20260801

    The browser toolset: a single tools[] entry (carrying no name) that declares the browser tool family. The model is served the family's tool with any members disabled via configs removed from its schema.

    BrowserToolset20260801::equal

    automatically derived

    BrowserToolset20260801::new

    Creates a BrowserToolset20260801 with omitted optional fields absent.

    BrowserToolset20260801::not_equal

    automatically derived

    BrowserToolset20260801::to_json

    Encodes this value as JSON.

    BrowserToolset20260801::to_repr

    automatically derived

    BrowserToolset20260801CacheControl

    pub(all) enum BrowserToolset20260801CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    BrowserToolset20260801CacheControl::equal

    automatically derived

    BrowserToolset20260801CacheControl::not_equal

    automatically derived

    BrowserToolset20260801CacheControl::to_json

    Encodes this tagged union as JSON.

    BrowserToolset20260801CacheControl::to_repr

    automatically derived

    BrowserToolsetConfigs

    pub(all) struct BrowserToolsetConfigs {
    close_tab :
    Presence
    [BrowserCloseTabConfig]
    double_click :
    Presence
    [BrowserDoubleClickConfig]
    file_upload :
    Presence
    [BrowserFileUploadConfig]
    find :
    Presence
    [BrowserFindConfig]
    form_input :
    Presence
    [BrowserFormInputConfig]
    get_page_text :
    Presence
    [BrowserGetPageTextConfig]
    hold_key :
    Presence
    [BrowserHoldKeyConfig]
    hover :
    Presence
    [BrowserHoverConfig]
    javascript_exec :
    Presence
    [BrowserJavascriptExecConfig]
    key :
    Presence
    [BrowserKeyConfig]
    left_click :
    Presence
    [BrowserLeftClickConfig]
    left_click_drag :
    Presence
    [BrowserLeftClickDragConfig]
    left_mouse_down :
    Presence
    [BrowserLeftMouseDownConfig]
    left_mouse_up :
    Presence
    [BrowserLeftMouseUpConfig]
    list_tabs :
    Presence
    [BrowserListTabsConfig]
    middle_click :
    Presence
    [BrowserMiddleClickConfig]
    mouse_move :
    Presence
    [BrowserMouseMoveConfig]
    navigate :
    Presence
    [BrowserNavigateConfig]
    new_tab :
    Presence
    [BrowserNewTabConfig]
    read_console :
    Presence
    [BrowserReadConsoleConfig]
    read_network :
    Presence
    [BrowserReadNetworkConfig]
    read_page :
    Presence
    [BrowserReadPageConfig]
    right_click :
    Presence
    [BrowserRightClickConfig]
    screenshot :
    Presence
    [BrowserScreenshotConfig]
    scroll :
    Presence
    [BrowserScrollConfig]
    scroll_to :
    Presence
    [BrowserScrollToConfig]
    switch_tab :
    Presence
    [BrowserSwitchTabConfig]
    triple_click :
    Presence
    [BrowserTripleClickConfig]
    type_ :
    Presence
    [BrowserTypeConfig]
    wait :
    Presence
    [BrowserWaitConfig]
    zoom :
    Presence
    [BrowserZoomConfig]
    } derive(Eq,
    Debug
    )

    Per-member configuration for browser_toolset_20260801: one optional field per member tool, keyed by the member name — the same name the member's tool_use blocks carry. Every member is an accepted key, and a member's defaults apply wherever its key is absent. Unknown keys are rejected: the field set is this toolset version's complete member set.

    BrowserToolsetConfigs::equal

    automatically derived

    BrowserToolsetConfigs::new

    fn BrowserToolsetConfigs::new(close_tab? : BrowserCloseTabConfig, double_click? : BrowserDoubleClickConfig, file_upload? : BrowserFileUploadConfig, find? : BrowserFindConfig, form_input? : BrowserFormInputConfig, get_page_text? : BrowserGetPageTextConfig, hold_key? : BrowserHoldKeyConfig, hover? : BrowserHoverConfig, javascript_exec? : BrowserJavascriptExecConfig, key? : BrowserKeyConfig, left_click? : BrowserLeftClickConfig, left_click_drag? : BrowserLeftClickDragConfig, left_mouse_down? : BrowserLeftMouseDownConfig, left_mouse_up? : BrowserLeftMouseUpConfig, list_tabs? : BrowserListTabsConfig, middle_click? : BrowserMiddleClickConfig, mouse_move? : BrowserMouseMoveConfig, navigate? : BrowserNavigateConfig, new_tab? : BrowserNewTabConfig, read_console? : BrowserReadConsoleConfig, read_network? : BrowserReadNetworkConfig, read_page? : BrowserReadPageConfig, right_click? : BrowserRightClickConfig, screenshot? : BrowserScreenshotConfig, scroll? : BrowserScrollConfig, scroll_to? : BrowserScrollToConfig, switch_tab? : BrowserSwitchTabConfig, triple_click? : BrowserTripleClickConfig, type_? : BrowserTypeConfig, wait? : BrowserWaitConfig, zoom? : BrowserZoomConfig) -> BrowserToolsetConfigs

    Creates a BrowserToolsetConfigs with omitted optional fields absent.

    BrowserToolsetConfigs::not_equal

    automatically derived

    BrowserToolsetConfigs::to_json

    Encodes this value as JSON.

    BrowserToolsetConfigs::to_repr

    automatically derived

    BrowserTripleClickConfig

    pub(all) struct BrowserTripleClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    triple_click's config overrides.

    BrowserTripleClickConfig::equal

    automatically derived

    BrowserTripleClickConfig::new

    fn BrowserTripleClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserTripleClickConfig

    Creates a BrowserTripleClickConfig with omitted optional fields absent.

    BrowserTripleClickConfig::not_equal

    automatically derived

    BrowserTripleClickConfig::to_json

    Encodes this value as JSON.

    BrowserTripleClickConfig::to_repr

    automatically derived

    BrowserTypeConfig

    pub(all) struct BrowserTypeConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    type's config overrides.

    BrowserTypeConfig::equal

    automatically derived

    BrowserTypeConfig::new

    fn BrowserTypeConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserTypeConfig

    Creates a BrowserTypeConfig with omitted optional fields absent.

    BrowserTypeConfig::not_equal

    fn BrowserTypeConfig::not_equal(x : BrowserTypeConfig, y : BrowserTypeConfig) -> Bool
    automatically derived

    BrowserTypeConfig::to_json

    Encodes this value as JSON.

    BrowserTypeConfig::to_repr

    automatically derived

    BrowserWaitConfig

    pub(all) struct BrowserWaitConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    wait's config overrides.

    BrowserWaitConfig::equal

    automatically derived

    BrowserWaitConfig::new

    fn BrowserWaitConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserWaitConfig

    Creates a BrowserWaitConfig with omitted optional fields absent.

    BrowserWaitConfig::not_equal

    fn BrowserWaitConfig::not_equal(x : BrowserWaitConfig, y : BrowserWaitConfig) -> Bool
    automatically derived

    BrowserWaitConfig::to_json

    Encodes this value as JSON.

    BrowserWaitConfig::to_repr

    automatically derived

    BrowserZoomConfig

    pub(all) struct BrowserZoomConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    zoom's config overrides.

    BrowserZoomConfig::equal

    automatically derived

    BrowserZoomConfig::new

    fn BrowserZoomConfig::new(defer_loading? : Bool, enabled? : Bool) -> BrowserZoomConfig

    Creates a BrowserZoomConfig with omitted optional fields absent.

    BrowserZoomConfig::not_equal

    fn BrowserZoomConfig::not_equal(x : BrowserZoomConfig, y : BrowserZoomConfig) -> Bool
    automatically derived

    BrowserZoomConfig::to_json

    Encodes this value as JSON.

    BrowserZoomConfig::to_repr

    automatically derived

    CacheControlEphemeral

    pub(all) struct CacheControlEphemeral {
    ttl : CacheControlEphemeralTtl?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of CacheControlEphemeral.

    CacheControlEphemeral::equal

    automatically derived

    CacheControlEphemeral::new

    Creates a CacheControlEphemeral with omitted optional fields absent.

    CacheControlEphemeral::not_equal

    automatically derived

    CacheControlEphemeral::to_json

    Encodes this value as JSON.

    CacheControlEphemeral::to_repr

    automatically derived

    CacheControlEphemeralTtl

    pub(all) enum CacheControlEphemeralTtl {
    Value5m
    Value1h
    Custom(String)
    } derive(Eq,
    Debug
    )

    The time-to-live for the cache control breakpoint. This may be one the following values: - 5m: 5 minutes - 1h: 1 hour Defaults to 5m. See prompt caching pricing for details.

    CacheControlEphemeralTtl::equal

    automatically derived

    CacheControlEphemeralTtl::not_equal

    automatically derived

    CacheControlEphemeralTtl::to_json

    Encodes this string enum as JSON.

    CacheControlEphemeralTtl::to_repr

    automatically derived

    CacheCreation

    pub(all) struct CacheCreation {
    ephemeral_1h_input_tokens : Int
    ephemeral_5m_input_tokens : Int
    } derive(Eq,
    Debug
    )

    Generated representation of CacheCreation.

    CacheCreation::equal

    automatically derived

    CacheCreation::new

    fn CacheCreation::new(ephemeral_1h_input_tokens~ : Int, ephemeral_5m_input_tokens~ : Int) -> CacheCreation

    Creates a CacheCreation with omitted optional fields absent.

    CacheCreation::not_equal

    fn CacheCreation::not_equal(x : CacheCreation, y : CacheCreation) -> Bool
    automatically derived

    CacheCreation::to_json

    Encodes this value as JSON.

    CacheCreation::to_repr

    automatically derived

    CacheMissMessagesChanged

    pub(all) struct CacheMissMessagesChanged {
    cache_missed_input_tokens : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    A cache_miss_reason for a request whose messages differ from the previous request's in an earlier entry, instead of only having entries appended. The model, system, and tools match. See the cache diagnostics guide to learn what to change for each reason.

    CacheMissMessagesChanged::equal

    automatically derived

    CacheMissMessagesChanged::new

    fn CacheMissMessagesChanged::new(cache_missed_input_tokens~ : Int, type_~ : String) -> CacheMissMessagesChanged

    Creates a CacheMissMessagesChanged with omitted optional fields absent.

    CacheMissMessagesChanged::not_equal

    automatically derived

    CacheMissMessagesChanged::to_json

    Encodes this value as JSON.

    CacheMissMessagesChanged::to_repr

    automatically derived

    CacheMissModelChanged

    pub(all) struct CacheMissModelChanged {
    cache_missed_input_tokens : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    A cache_miss_reason for a request whose model or speed differs from the previous request's. See the cache diagnostics guide to learn what to change for each reason.

    CacheMissModelChanged::equal

    automatically derived

    CacheMissModelChanged::new

    fn CacheMissModelChanged::new(cache_missed_input_tokens~ : Int, type_~ : String) -> CacheMissModelChanged

    Creates a CacheMissModelChanged with omitted optional fields absent.

    CacheMissModelChanged::not_equal

    automatically derived

    CacheMissModelChanged::to_json

    Encodes this value as JSON.

    CacheMissModelChanged::to_repr

    automatically derived

    CacheMissPreviousMessageNotFound

    pub(all) struct CacheMissPreviousMessageNotFound {
    type_ : String
    } derive(Eq,
    Debug
    )

    A cache_miss_reason for when the API doesn't have a stored record of the request that diagnostics.previous_message_id references. This doesn't mean that this request changed. See the cache diagnostics guide to learn what to change for each reason.

    CacheMissPreviousMessageNotFound::equal

    automatically derived

    CacheMissPreviousMessageNotFound::new

    Creates a CacheMissPreviousMessageNotFound with omitted optional fields absent.

    CacheMissPreviousMessageNotFound::not_equal

    automatically derived

    CacheMissPreviousMessageNotFound::to_json

    Encodes this value as JSON.

    CacheMissPreviousMessageNotFound::to_repr

    automatically derived

    CacheMissReason

    pub(all) enum CacheMissReason {
    MessagesChanged(CacheMissMessagesChanged)
    ModelChanged(CacheMissModelChanged)
    PreviousMessageNotFound(CacheMissPreviousMessageNotFound)
    SystemChanged(CacheMissSystemChanged)
    ToolsChanged(CacheMissToolsChanged)
    Unavailable(CacheMissUnavailable)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union CacheMissReason.

    CacheMissReason::equal

    automatically derived

    CacheMissReason::not_equal

    fn CacheMissReason::not_equal(x : CacheMissReason, y : CacheMissReason) -> Bool
    automatically derived

    CacheMissReason::to_json

    Encodes this tagged union as JSON.

    CacheMissReason::to_repr

    automatically derived

    CacheMissSystemChanged

    pub(all) struct CacheMissSystemChanged {
    cache_missed_input_tokens : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    A cache_miss_reason for a request whose system differs from the previous request's. See the cache diagnostics guide to learn what to change for each reason.

    CacheMissSystemChanged::equal

    automatically derived

    CacheMissSystemChanged::new

    fn CacheMissSystemChanged::new(cache_missed_input_tokens~ : Int, type_~ : String) -> CacheMissSystemChanged

    Creates a CacheMissSystemChanged with omitted optional fields absent.

    CacheMissSystemChanged::not_equal

    automatically derived

    CacheMissSystemChanged::to_json

    Encodes this value as JSON.

    CacheMissSystemChanged::to_repr

    automatically derived

    CacheMissToolsChanged

    pub(all) struct CacheMissToolsChanged {
    cache_missed_input_tokens : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    A cache_miss_reason for a request whose tools differ from the previous request's, for example because tools were added, removed, or reordered. See the cache diagnostics guide to learn what to change for each reason.

    CacheMissToolsChanged::equal

    automatically derived

    CacheMissToolsChanged::new

    fn CacheMissToolsChanged::new(cache_missed_input_tokens~ : Int, type_~ : String) -> CacheMissToolsChanged

    Creates a CacheMissToolsChanged with omitted optional fields absent.

    CacheMissToolsChanged::not_equal

    automatically derived

    CacheMissToolsChanged::to_json

    Encodes this value as JSON.

    CacheMissToolsChanged::to_repr

    automatically derived

    CacheMissUnavailable

    pub(all) struct CacheMissUnavailable {
    type_ : String
    } derive(Eq,
    Debug
    )

    A cache_miss_reason for when the API can't give a diagnosis. The request itself was processed normally. This includes a request whose model, system, and tools match the previous request's but whose other prompt-affecting parameters, such as thinking or tool_choice, differ. See the cache diagnostics guide to learn what to change for each reason.

    CacheMissUnavailable::equal

    automatically derived

    CacheMissUnavailable::new

    fn CacheMissUnavailable::new(type_~ : String) -> CacheMissUnavailable

    Creates a CacheMissUnavailable with omitted optional fields absent.

    CacheMissUnavailable::not_equal

    automatically derived

    CacheMissUnavailable::to_json

    Encodes this value as JSON.

    CacheMissUnavailable::to_repr

    automatically derived

    CapabilitySupport

    pub(all) struct CapabilitySupport {
    supported : Bool
    } derive(Eq,
    Debug
    )

    Indicates whether a capability is supported.

    CapabilitySupport::equal

    automatically derived

    CapabilitySupport::new

    fn CapabilitySupport::new(supported~ : Bool) -> CapabilitySupport

    Creates a CapabilitySupport with omitted optional fields absent.

    CapabilitySupport::not_equal

    fn CapabilitySupport::not_equal(x : CapabilitySupport, y : CapabilitySupport) -> Bool
    automatically derived

    CapabilitySupport::to_json

    Encodes this value as JSON.

    CapabilitySupport::to_repr

    automatically derived

    CitationsDelta

    pub(all) struct CitationsDelta {
    citation : CitationsDeltaCitation
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of CitationsDelta.

    CitationsDelta::equal

    automatically derived

    CitationsDelta::new

    fn CitationsDelta::new(citation~ : CitationsDeltaCitation, type_~ : String) -> CitationsDelta

    Creates a CitationsDelta with omitted optional fields absent.

    CitationsDelta::not_equal

    fn CitationsDelta::not_equal(x : CitationsDelta, y : CitationsDelta) -> Bool
    automatically derived

    CitationsDelta::to_json

    Encodes this value as JSON.

    CitationsDelta::to_repr

    automatically derived

    CitationsDeltaCitation

    pub(all) enum CitationsDeltaCitation {
    CharLocation(ResponseCharLocationCitation)
    ContentBlockLocation(ResponseContentBlockLocationCitation)
    PageLocation(ResponsePageLocationCitation)
    SearchResultLocation(ResponseSearchResultLocationCitation)
    WebSearchResultLocation(ResponseWebSearchResultLocationCitation)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union CitationsDeltaCitation.

    CitationsDeltaCitation::equal

    automatically derived

    CitationsDeltaCitation::not_equal

    automatically derived

    CitationsDeltaCitation::to_json

    Encodes this tagged union as JSON.

    CitationsDeltaCitation::to_repr

    automatically derived

    ClaudeCodeKeyCreatorNotMemberErrorDetails

    pub(all) struct ClaudeCodeKeyCreatorNotMemberErrorDetails {
    } derive(Eq,
    Debug
    )

    The API key belongs to the Claude Code workspace, and the user who created it is no longer a member of the organization or of that workspace.

    ClaudeCodeKeyCreatorNotMemberErrorDetails::equal

    automatically derived

    ClaudeCodeKeyCreatorNotMemberErrorDetails::not_equal

    automatically derived

    ClaudeCodeKeyCreatorNotMemberErrorDetails::to_json

    Encodes this value as JSON.

    ClaudeCodeKeyCreatorNotMemberErrorDetails::to_repr

    automatically derived

    ClaudeCodeVersionTooOldErrorDetails

    pub(all) struct ClaudeCodeVersionTooOldErrorDetails {
    } derive(Eq,
    Debug
    )

    The request comes from a Claude Code version older than the minimum that the requested model or the organization requires. Update Claude Code, then retry.

    ClaudeCodeVersionTooOldErrorDetails::equal

    automatically derived

    ClaudeCodeVersionTooOldErrorDetails::not_equal

    automatically derived

    ClaudeCodeVersionTooOldErrorDetails::to_json

    Encodes this value as JSON.

    ClaudeCodeVersionTooOldErrorDetails::to_repr

    automatically derived

    CmekKeyDisabledErrorDetails

    pub(all) struct CmekKeyDisabledErrorDetails {
    } derive(Eq,
    Debug
    )

    The workspace's customer-managed encryption key is disabled or revoked. Re-enable the key, then retry.

    CmekKeyDisabledErrorDetails::equal

    automatically derived

    CmekKeyDisabledErrorDetails::not_equal

    automatically derived

    CmekKeyDisabledErrorDetails::to_json

    Encodes this value as JSON.

    CmekKeyDisabledErrorDetails::to_repr

    automatically derived

    CmekKeyNetworkBlockedErrorDetails

    pub(all) struct CmekKeyNetworkBlockedErrorDetails {
    } derive(Eq,
    Debug
    )

    The key management service's network access controls blocked the request to the workspace's customer-managed encryption key. The key itself may be healthy.

    CmekKeyNetworkBlockedErrorDetails::equal

    automatically derived

    CmekKeyNetworkBlockedErrorDetails::not_equal

    automatically derived

    CmekKeyNetworkBlockedErrorDetails::to_json

    Encodes this value as JSON.

    CmekKeyNetworkBlockedErrorDetails::to_repr

    automatically derived

    CmekKeyUnreachableErrorDetails

    pub(all) struct CmekKeyUnreachableErrorDetails {
    } derive(Eq,
    Debug
    )

    The workspace's customer-managed encryption key could not be reached. Retry the request; if this continues, check that the key is available in your key management service, or contact Anthropic support.

    CmekKeyUnreachableErrorDetails::equal

    automatically derived

    CmekKeyUnreachableErrorDetails::not_equal

    automatically derived

    CmekKeyUnreachableErrorDetails::to_json

    Encodes this value as JSON.

    CmekKeyUnreachableErrorDetails::to_repr

    automatically derived

    CodeExecutionTool20250522

    pub(all) struct CodeExecutionTool20250522 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [CodeExecutionTool20250522CacheControl]
    defer_loading : Bool?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of CodeExecutionTool20250522.

    CodeExecutionTool20250522::equal

    automatically derived

    CodeExecutionTool20250522::new

    fn CodeExecutionTool20250522::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : CodeExecutionTool20250522CacheControl, defer_loading? : Bool, strict? : Bool) -> CodeExecutionTool20250522

    Creates a CodeExecutionTool20250522 with omitted optional fields absent.

    CodeExecutionTool20250522::not_equal

    automatically derived

    CodeExecutionTool20250522::to_json

    Encodes this value as JSON.

    CodeExecutionTool20250522::to_repr

    automatically derived

    CodeExecutionTool20250522CacheControl

    pub(all) enum CodeExecutionTool20250522CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20250522CacheControl::equal

    automatically derived

    CodeExecutionTool20250522CacheControl::not_equal

    automatically derived

    CodeExecutionTool20250522CacheControl::to_json

    Encodes this tagged union as JSON.

    CodeExecutionTool20250522CacheControl::to_repr

    automatically derived

    CodeExecutionTool20250825

    pub(all) struct CodeExecutionTool20250825 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [CodeExecutionTool20250825CacheControl]
    defer_loading : Bool?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of CodeExecutionTool20250825.

    CodeExecutionTool20250825::equal

    automatically derived

    CodeExecutionTool20250825::new

    fn CodeExecutionTool20250825::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : CodeExecutionTool20250825CacheControl, defer_loading? : Bool, strict? : Bool) -> CodeExecutionTool20250825

    Creates a CodeExecutionTool20250825 with omitted optional fields absent.

    CodeExecutionTool20250825::not_equal

    automatically derived

    CodeExecutionTool20250825::to_json

    Encodes this value as JSON.

    CodeExecutionTool20250825::to_repr

    automatically derived

    CodeExecutionTool20250825CacheControl

    pub(all) enum CodeExecutionTool20250825CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20250825CacheControl::equal

    automatically derived

    CodeExecutionTool20250825CacheControl::not_equal

    automatically derived

    CodeExecutionTool20250825CacheControl::to_json

    Encodes this tagged union as JSON.

    CodeExecutionTool20250825CacheControl::to_repr

    automatically derived

    CodeExecutionTool20260120

    pub(all) struct CodeExecutionTool20260120 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [CodeExecutionTool20260120CacheControl]
    defer_loading : Bool?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    A tools entry for the code execution tool, version code_execution_20260120. It adds REPL state persistence to version code_execution_20250825. REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container. See the code execution tool guide to learn what each tool version adds.

    CodeExecutionTool20260120::equal

    automatically derived

    CodeExecutionTool20260120::new

    fn CodeExecutionTool20260120::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : CodeExecutionTool20260120CacheControl, defer_loading? : Bool, strict? : Bool) -> CodeExecutionTool20260120

    Creates a CodeExecutionTool20260120 with omitted optional fields absent.

    CodeExecutionTool20260120::not_equal

    automatically derived

    CodeExecutionTool20260120::to_json

    Encodes this value as JSON.

    CodeExecutionTool20260120::to_repr

    automatically derived

    CodeExecutionTool20260120CacheControl

    pub(all) enum CodeExecutionTool20260120CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20260120CacheControl::equal

    automatically derived

    CodeExecutionTool20260120CacheControl::not_equal

    automatically derived

    CodeExecutionTool20260120CacheControl::to_json

    Encodes this tagged union as JSON.

    CodeExecutionTool20260120CacheControl::to_repr

    automatically derived

    CodeExecutionTool20260521

    pub(all) struct CodeExecutionTool20260521 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [CodeExecutionTool20260521CacheControl]
    defer_loading : Bool?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Code execution tool with REPL state persistence.

    CodeExecutionTool20260521::equal

    automatically derived

    CodeExecutionTool20260521::new

    fn CodeExecutionTool20260521::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : CodeExecutionTool20260521CacheControl, defer_loading? : Bool, strict? : Bool) -> CodeExecutionTool20260521

    Creates a CodeExecutionTool20260521 with omitted optional fields absent.

    CodeExecutionTool20260521::not_equal

    automatically derived

    CodeExecutionTool20260521::to_json

    Encodes this value as JSON.

    CodeExecutionTool20260521::to_repr

    automatically derived

    CodeExecutionTool20260521CacheControl

    pub(all) enum CodeExecutionTool20260521CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20260521CacheControl::equal

    automatically derived

    CodeExecutionTool20260521CacheControl::not_equal

    automatically derived

    CodeExecutionTool20260521CacheControl::to_json

    Encodes this tagged union as JSON.

    CodeExecutionTool20260521CacheControl::to_repr

    automatically derived

    CodeExecutionToolResultErrorCode

    pub(all) enum CodeExecutionToolResultErrorCode {
    InvalidToolInput
    Unavailable
    TooManyRequests
    ExecutionTimeExceeded
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum CodeExecutionToolResultErrorCode.

    CodeExecutionToolResultErrorCode::equal

    automatically derived

    CodeExecutionToolResultErrorCode::not_equal

    automatically derived

    CodeExecutionToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    CodeExecutionToolResultErrorCode::to_repr

    automatically derived

    CompactionBlockAmbiguousErrorDetails

    pub(all) struct CompactionBlockAmbiguousErrorDetails {
    } derive(Eq,
    Debug
    )

    messages holds more than one compaction block with content. Send only the block the conversation returned last.

    CompactionBlockAmbiguousErrorDetails::equal

    automatically derived

    CompactionBlockAmbiguousErrorDetails::not_equal

    automatically derived

    CompactionBlockAmbiguousErrorDetails::to_json

    Encodes this value as JSON.

    CompactionBlockAmbiguousErrorDetails::to_repr

    automatically derived

    CompactionBlockMisplacedErrorDetails

    pub(all) struct CompactionBlockMisplacedErrorDetails {
    } derive(Eq,
    Debug
    )

    The compaction block is not the first block of the conversation, or is in a system message.

    CompactionBlockMisplacedErrorDetails::equal

    automatically derived

    CompactionBlockMisplacedErrorDetails::not_equal

    automatically derived

    CompactionBlockMisplacedErrorDetails::to_json

    Encodes this value as JSON.

    CompactionBlockMisplacedErrorDetails::to_repr

    automatically derived

    CompactionContentMismatchErrorDetails

    pub(all) struct CompactionContentMismatchErrorDetails {
    } derive(Eq,
    Debug
    )

    The compaction block's content differs from the text its signature recorded.

    CompactionContentMismatchErrorDetails::equal

    automatically derived

    CompactionContentMismatchErrorDetails::not_equal

    automatically derived

    CompactionContentMismatchErrorDetails::to_json

    Encodes this value as JSON.

    CompactionContentMismatchErrorDetails::to_repr

    automatically derived

    CompactionIncompleteTurnErrorDetails

    pub(all) struct CompactionIncompleteTurnErrorDetails {
    } derive(Eq,
    Debug
    )

    The compaction request ends on an assistant turn that is not finished.

    CompactionIncompleteTurnErrorDetails::equal

    automatically derived

    CompactionIncompleteTurnErrorDetails::not_equal

    automatically derived

    CompactionIncompleteTurnErrorDetails::to_json

    Encodes this value as JSON.

    CompactionIncompleteTurnErrorDetails::to_repr

    automatically derived

    CompactionNothingToSummarizeErrorDetails

    pub(all) struct CompactionNothingToSummarizeErrorDetails {
    } derive(Eq,
    Debug
    )

    messages holds no user or assistant content to summarize or adopt.

    CompactionNothingToSummarizeErrorDetails::equal

    automatically derived

    CompactionNothingToSummarizeErrorDetails::not_equal

    automatically derived

    CompactionNothingToSummarizeErrorDetails::to_json

    Encodes this value as JSON.

    CompactionNothingToSummarizeErrorDetails::to_repr

    automatically derived

    CompactionSignatureInvalidErrorDetails

    pub(all) struct CompactionSignatureInvalidErrorDetails {
    } derive(Eq,
    Debug
    )

    The compaction block's signature does not verify.

    CompactionSignatureInvalidErrorDetails::equal

    automatically derived

    CompactionSignatureInvalidErrorDetails::not_equal

    automatically derived

    CompactionSignatureInvalidErrorDetails::to_json

    Encodes this value as JSON.

    CompactionSignatureInvalidErrorDetails::to_repr

    automatically derived

    CompactionTooManyToolReferencesErrorDetails

    pub(all) struct CompactionTooManyToolReferencesErrorDetails {
    } derive(Eq,
    Debug
    )

    The conversation references more distinct tools than a compaction block can record.

    CompactionTooManyToolReferencesErrorDetails::equal

    automatically derived

    CompactionTooManyToolReferencesErrorDetails::not_equal

    automatically derived

    CompactionTooManyToolReferencesErrorDetails::to_json

    Encodes this value as JSON.

    CompactionTooManyToolReferencesErrorDetails::to_repr

    automatically derived

    CompactionToolChangesMismatchErrorDetails

    pub(all) struct CompactionToolChangesMismatchErrorDetails {
    } derive(Eq,
    Debug
    )

    The compaction block's tool_changes differs from what was returned with the block.

    CompactionToolChangesMismatchErrorDetails::equal

    automatically derived

    CompactionToolChangesMismatchErrorDetails::not_equal

    automatically derived

    CompactionToolChangesMismatchErrorDetails::to_json

    Encodes this value as JSON.

    CompactionToolChangesMismatchErrorDetails::to_repr

    automatically derived

    CompactionUnavailableErrorDetails

    pub(all) struct CompactionUnavailableErrorDetails {
    } derive(Eq,
    Debug
    )

    The compaction could not be completed for a transient server reason. Retry the request.

    CompactionUnavailableErrorDetails::equal

    automatically derived

    CompactionUnavailableErrorDetails::not_equal

    automatically derived

    CompactionUnavailableErrorDetails::to_json

    Encodes this value as JSON.

    CompactionUnavailableErrorDetails::to_repr

    automatically derived

    ComputerCursorPositionConfig

    pub(all) struct ComputerCursorPositionConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    cursor_position's config overrides.

    ComputerCursorPositionConfig::equal

    automatically derived

    ComputerCursorPositionConfig::new

    fn ComputerCursorPositionConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerCursorPositionConfig

    Creates a ComputerCursorPositionConfig with omitted optional fields absent.

    ComputerCursorPositionConfig::not_equal

    automatically derived

    ComputerCursorPositionConfig::to_json

    Encodes this value as JSON.

    ComputerCursorPositionConfig::to_repr

    automatically derived

    ComputerDoubleClickConfig

    pub(all) struct ComputerDoubleClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    double_click's config overrides.

    ComputerDoubleClickConfig::equal

    automatically derived

    ComputerDoubleClickConfig::new

    fn ComputerDoubleClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerDoubleClickConfig

    Creates a ComputerDoubleClickConfig with omitted optional fields absent.

    ComputerDoubleClickConfig::not_equal

    automatically derived

    ComputerDoubleClickConfig::to_json

    Encodes this value as JSON.

    ComputerDoubleClickConfig::to_repr

    automatically derived

    ComputerHoldKeyConfig

    pub(all) struct ComputerHoldKeyConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    hold_key's config overrides.

    ComputerHoldKeyConfig::equal

    automatically derived

    ComputerHoldKeyConfig::new

    fn ComputerHoldKeyConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerHoldKeyConfig

    Creates a ComputerHoldKeyConfig with omitted optional fields absent.

    ComputerHoldKeyConfig::not_equal

    automatically derived

    ComputerHoldKeyConfig::to_json

    Encodes this value as JSON.

    ComputerHoldKeyConfig::to_repr

    automatically derived

    ComputerKeyConfig

    pub(all) struct ComputerKeyConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    key's config overrides.

    ComputerKeyConfig::equal

    automatically derived

    ComputerKeyConfig::new

    fn ComputerKeyConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerKeyConfig

    Creates a ComputerKeyConfig with omitted optional fields absent.

    ComputerKeyConfig::not_equal

    fn ComputerKeyConfig::not_equal(x : ComputerKeyConfig, y : ComputerKeyConfig) -> Bool
    automatically derived

    ComputerKeyConfig::to_json

    Encodes this value as JSON.

    ComputerKeyConfig::to_repr

    automatically derived

    ComputerLeftClickConfig

    pub(all) struct ComputerLeftClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_click's config overrides.

    ComputerLeftClickConfig::equal

    automatically derived

    ComputerLeftClickConfig::new

    fn ComputerLeftClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerLeftClickConfig

    Creates a ComputerLeftClickConfig with omitted optional fields absent.

    ComputerLeftClickConfig::not_equal

    automatically derived

    ComputerLeftClickConfig::to_json

    Encodes this value as JSON.

    ComputerLeftClickConfig::to_repr

    automatically derived

    ComputerLeftClickDragConfig

    pub(all) struct ComputerLeftClickDragConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_click_drag's config overrides.

    ComputerLeftClickDragConfig::equal

    automatically derived

    ComputerLeftClickDragConfig::new

    fn ComputerLeftClickDragConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerLeftClickDragConfig

    Creates a ComputerLeftClickDragConfig with omitted optional fields absent.

    ComputerLeftClickDragConfig::not_equal

    automatically derived

    ComputerLeftClickDragConfig::to_json

    Encodes this value as JSON.

    ComputerLeftClickDragConfig::to_repr

    automatically derived

    ComputerLeftMouseDownConfig

    pub(all) struct ComputerLeftMouseDownConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_mouse_down's config overrides.

    ComputerLeftMouseDownConfig::equal

    automatically derived

    ComputerLeftMouseDownConfig::new

    fn ComputerLeftMouseDownConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerLeftMouseDownConfig

    Creates a ComputerLeftMouseDownConfig with omitted optional fields absent.

    ComputerLeftMouseDownConfig::not_equal

    automatically derived

    ComputerLeftMouseDownConfig::to_json

    Encodes this value as JSON.

    ComputerLeftMouseDownConfig::to_repr

    automatically derived

    ComputerLeftMouseUpConfig

    pub(all) struct ComputerLeftMouseUpConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    left_mouse_up's config overrides.

    ComputerLeftMouseUpConfig::equal

    automatically derived

    ComputerLeftMouseUpConfig::new

    fn ComputerLeftMouseUpConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerLeftMouseUpConfig

    Creates a ComputerLeftMouseUpConfig with omitted optional fields absent.

    ComputerLeftMouseUpConfig::not_equal

    automatically derived

    ComputerLeftMouseUpConfig::to_json

    Encodes this value as JSON.

    ComputerLeftMouseUpConfig::to_repr

    automatically derived

    ComputerMiddleClickConfig

    pub(all) struct ComputerMiddleClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    middle_click's config overrides.

    ComputerMiddleClickConfig::equal

    automatically derived

    ComputerMiddleClickConfig::new

    fn ComputerMiddleClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerMiddleClickConfig

    Creates a ComputerMiddleClickConfig with omitted optional fields absent.

    ComputerMiddleClickConfig::not_equal

    automatically derived

    ComputerMiddleClickConfig::to_json

    Encodes this value as JSON.

    ComputerMiddleClickConfig::to_repr

    automatically derived

    ComputerMouseMoveConfig

    pub(all) struct ComputerMouseMoveConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    mouse_move's config overrides.

    ComputerMouseMoveConfig::equal

    automatically derived

    ComputerMouseMoveConfig::new

    fn ComputerMouseMoveConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerMouseMoveConfig

    Creates a ComputerMouseMoveConfig with omitted optional fields absent.

    ComputerMouseMoveConfig::not_equal

    automatically derived

    ComputerMouseMoveConfig::to_json

    Encodes this value as JSON.

    ComputerMouseMoveConfig::to_repr

    automatically derived

    ComputerRightClickConfig

    pub(all) struct ComputerRightClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    right_click's config overrides.

    ComputerRightClickConfig::equal

    automatically derived

    ComputerRightClickConfig::new

    fn ComputerRightClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerRightClickConfig

    Creates a ComputerRightClickConfig with omitted optional fields absent.

    ComputerRightClickConfig::not_equal

    automatically derived

    ComputerRightClickConfig::to_json

    Encodes this value as JSON.

    ComputerRightClickConfig::to_repr

    automatically derived

    ComputerScreenshotConfig

    pub(all) struct ComputerScreenshotConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    screenshot's config overrides.

    ComputerScreenshotConfig::equal

    automatically derived

    ComputerScreenshotConfig::new

    fn ComputerScreenshotConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerScreenshotConfig

    Creates a ComputerScreenshotConfig with omitted optional fields absent.

    ComputerScreenshotConfig::not_equal

    automatically derived

    ComputerScreenshotConfig::to_json

    Encodes this value as JSON.

    ComputerScreenshotConfig::to_repr

    automatically derived

    ComputerScrollConfig

    pub(all) struct ComputerScrollConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    scroll's config overrides.

    ComputerScrollConfig::equal

    automatically derived

    ComputerScrollConfig::new

    fn ComputerScrollConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerScrollConfig

    Creates a ComputerScrollConfig with omitted optional fields absent.

    ComputerScrollConfig::not_equal

    automatically derived

    ComputerScrollConfig::to_json

    Encodes this value as JSON.

    ComputerScrollConfig::to_repr

    automatically derived

    ComputerToolset20260801

    The computer toolset: a single tools[] entry (carrying no name) that declares the computer tool family. The model is served the family's tool with any members disabled via configs removed from its schema. Every member is enabled by default, zoom included. The single-tool options display_number and enable_zoom are not fields of a toolset entry — it carries only type, configs, and cache_control; zoom is controlled via configs.zoom.enabled.

    ComputerToolset20260801::equal

    automatically derived

    ComputerToolset20260801::new

    Creates a ComputerToolset20260801 with omitted optional fields absent.

    ComputerToolset20260801::not_equal

    automatically derived

    ComputerToolset20260801::to_json

    Encodes this value as JSON.

    ComputerToolset20260801::to_repr

    automatically derived

    ComputerToolset20260801CacheControl

    pub(all) enum ComputerToolset20260801CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    ComputerToolset20260801CacheControl::equal

    automatically derived

    ComputerToolset20260801CacheControl::not_equal

    automatically derived

    ComputerToolset20260801CacheControl::to_json

    Encodes this tagged union as JSON.

    ComputerToolset20260801CacheControl::to_repr

    automatically derived

    ComputerToolsetConfigs

    Per-member configuration for computer_toolset_20260801: one optional field per member tool, keyed by the member name — the same name the member's tool_use blocks carry. Every member is an accepted key, and a member's defaults apply wherever its key is absent. Unknown keys are rejected: the field set is this toolset version's complete member set.

    ComputerToolsetConfigs::equal

    automatically derived

    ComputerToolsetConfigs::new

    Creates a ComputerToolsetConfigs with omitted optional fields absent.

    ComputerToolsetConfigs::not_equal

    automatically derived

    ComputerToolsetConfigs::to_json

    Encodes this value as JSON.

    ComputerToolsetConfigs::to_repr

    automatically derived

    ComputerTripleClickConfig

    pub(all) struct ComputerTripleClickConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    triple_click's config overrides.

    ComputerTripleClickConfig::equal

    automatically derived

    ComputerTripleClickConfig::new

    fn ComputerTripleClickConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerTripleClickConfig

    Creates a ComputerTripleClickConfig with omitted optional fields absent.

    ComputerTripleClickConfig::not_equal

    automatically derived

    ComputerTripleClickConfig::to_json

    Encodes this value as JSON.

    ComputerTripleClickConfig::to_repr

    automatically derived

    ComputerTypeConfig

    pub(all) struct ComputerTypeConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    type's config overrides.

    ComputerTypeConfig::equal

    automatically derived

    ComputerTypeConfig::new

    fn ComputerTypeConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerTypeConfig

    Creates a ComputerTypeConfig with omitted optional fields absent.

    ComputerTypeConfig::not_equal

    automatically derived

    ComputerTypeConfig::to_json

    Encodes this value as JSON.

    ComputerTypeConfig::to_repr

    automatically derived

    ComputerWaitConfig

    pub(all) struct ComputerWaitConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    wait's config overrides.

    ComputerWaitConfig::equal

    automatically derived

    ComputerWaitConfig::new

    fn ComputerWaitConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerWaitConfig

    Creates a ComputerWaitConfig with omitted optional fields absent.

    ComputerWaitConfig::not_equal

    automatically derived

    ComputerWaitConfig::to_json

    Encodes this value as JSON.

    ComputerWaitConfig::to_repr

    automatically derived

    ComputerZoomConfig

    pub(all) struct ComputerZoomConfig {
    defer_loading :
    Presence
    [Bool]
    enabled :
    Presence
    [Bool]
    } derive(Eq,
    Debug
    )

    zoom's config overrides.

    ComputerZoomConfig::equal

    automatically derived

    ComputerZoomConfig::new

    fn ComputerZoomConfig::new(defer_loading? : Bool, enabled? : Bool) -> ComputerZoomConfig

    Creates a ComputerZoomConfig with omitted optional fields absent.

    ComputerZoomConfig::not_equal

    automatically derived

    ComputerZoomConfig::to_json

    Encodes this value as JSON.

    ComputerZoomConfig::to_repr

    automatically derived

    Container

    pub(all) struct Container {
    expires_at : String
    id : String
    skills : Array[ContainerSkill]?
    } derive(Eq,
    Debug
    )

    Information about the container used in the request (for the code execution tool)

    Container::equal

    fn Container::equal(Container, Container) -> Bool
    automatically derived

    Container::new

    fn Container::new(expires_at~ : String, id~ : String, skills? : Array[ContainerSkill]) -> Container

    Creates a Container with omitted optional fields absent.

    Container::not_equal

    fn Container::not_equal(x : Container, y : Container) -> Bool
    automatically derived

    Container::to_json

    Encodes this value as JSON.

    Container::to_repr

    automatically derived

    ContainerParams

    Container parameters with skills to be loaded.

    ContainerParams::equal

    automatically derived

    ContainerParams::new

    fn ContainerParams::new(id? : String, skills? : Array[SkillParams]) -> ContainerParams

    Creates a ContainerParams with omitted optional fields absent.

    ContainerParams::not_equal

    fn ContainerParams::not_equal(x : ContainerParams, y : ContainerParams) -> Bool
    automatically derived

    ContainerParams::to_json

    Encodes this value as JSON.

    ContainerParams::to_repr

    automatically derived

    ContainerSkill

    pub(all) struct ContainerSkill {
    skill_id : String
    type_ : ContainerSkillType
    version : String
    } derive(Eq,
    Debug
    )

    A skill that was loaded in a container (response model).

    ContainerSkill::equal

    automatically derived

    ContainerSkill::new

    fn ContainerSkill::new(skill_id~ : String, type_~ : ContainerSkillType, version~ : String) -> ContainerSkill

    Creates a ContainerSkill with omitted optional fields absent.

    ContainerSkill::not_equal

    fn ContainerSkill::not_equal(x : ContainerSkill, y : ContainerSkill) -> Bool
    automatically derived

    ContainerSkill::to_json

    Encodes this value as JSON.

    ContainerSkill::to_repr

    automatically derived

    ContainerSkillType

    pub(all) enum ContainerSkillType {
    Anthropic
    Custom
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

    ContainerSkillType::equal

    automatically derived

    ContainerSkillType::not_equal

    automatically derived

    ContainerSkillType::to_json

    Encodes this string enum as JSON.

    ContainerSkillType::to_repr

    automatically derived

    ContentBlock

    pub(all) enum ContentBlock {
    BashCodeExecutionToolResult(ResponseBashCodeExecutionToolResultBlock)
    CodeExecutionToolResult(ResponseCodeExecutionToolResultBlock)
    ContainerUpload(ResponseContainerUploadBlock)
    RedactedThinking(ResponseRedactedThinkingBlock)
    ServerToolUse(ResponseServerToolUseBlock)
    Text(ResponseTextBlock)
    TextEditorCodeExecutionToolResult(ResponseTextEditorCodeExecutionToolResultBlock)
    Thinking(ResponseThinkingBlock)
    ToolSearchToolResult(ResponseToolSearchToolResultBlock)
    ToolUse(ResponseToolUseBlock)
    WebFetchToolResult(ResponseWebFetchToolResultBlock)
    WebSearchToolResult(ResponseWebSearchToolResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ContentBlock.

    ContentBlock::equal

    automatically derived

    ContentBlock::not_equal

    fn ContentBlock::not_equal(x : ContentBlock, y : ContentBlock) -> Bool
    automatically derived

    ContentBlock::to_json

    Encodes this tagged union as JSON.

    ContentBlock::to_repr

    automatically derived

    ContentBlockDeltaEvent

    pub(all) struct ContentBlockDeltaEvent {
    delta : ContentBlockDeltaEventDelta
    index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ContentBlockDeltaEvent.

    ContentBlockDeltaEvent::equal

    automatically derived

    ContentBlockDeltaEvent::new

    fn ContentBlockDeltaEvent::new(delta~ : ContentBlockDeltaEventDelta, index~ : Int, type_~ : String) -> ContentBlockDeltaEvent

    Creates a ContentBlockDeltaEvent with omitted optional fields absent.

    ContentBlockDeltaEvent::not_equal

    automatically derived

    ContentBlockDeltaEvent::to_json

    Encodes this value as JSON.

    ContentBlockDeltaEvent::to_repr

    automatically derived

    ContentBlockDeltaEventDelta

    pub(all) enum ContentBlockDeltaEventDelta {
    CitationsDelta(CitationsDelta)
    InputJsonDelta(InputJsonContentBlockDelta)
    SignatureDelta(SignatureContentBlockDelta)
    TextDelta(TextContentBlockDelta)
    ThinkingDelta(ThinkingContentBlockDelta)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ContentBlockDeltaEventDelta.

    ContentBlockDeltaEventDelta::equal

    automatically derived

    ContentBlockDeltaEventDelta::not_equal

    automatically derived

    ContentBlockDeltaEventDelta::to_json

    Encodes this tagged union as JSON.

    ContentBlockDeltaEventDelta::to_repr

    automatically derived

    ContentBlockSource

    pub(all) struct ContentBlockSource {
    content : ContentBlockSourceContent
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ContentBlockSource.

    ContentBlockSource::equal

    automatically derived

    ContentBlockSource::new

    fn ContentBlockSource::new(content~ : ContentBlockSourceContent, type_~ : String) -> ContentBlockSource

    Creates a ContentBlockSource with omitted optional fields absent.

    ContentBlockSource::not_equal

    automatically derived

    ContentBlockSource::to_json

    Encodes this value as JSON.

    ContentBlockSource::to_repr

    automatically derived

    ContentBlockSourceContent

    pub(all) enum ContentBlockSourceContent {
    Text(String)
    ValueArray(Array[ContentBlockSourceContentValueArrayItem])
    } derive(Eq,
    Debug
    )

    Generated untagged union ContentBlockSourceContent.

    ContentBlockSourceContent::equal

    automatically derived

    ContentBlockSourceContent::not_equal

    automatically derived

    ContentBlockSourceContent::to_json

    Encodes this union as JSON.

    ContentBlockSourceContent::to_repr

    automatically derived

    ContentBlockSourceContentValueArrayItem

    pub(all) enum ContentBlockSourceContentValueArrayItem {
    Image(RequestImageBlock)
    Text(RequestTextBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ContentBlockSourceContentValueArrayItem.

    ContentBlockSourceContentValueArrayItem::equal

    automatically derived

    ContentBlockSourceContentValueArrayItem::not_equal

    automatically derived

    ContentBlockSourceContentValueArrayItem::to_json

    Encodes this tagged union as JSON.

    ContentBlockSourceContentValueArrayItem::to_repr

    automatically derived

    ContentBlockStartEvent

    pub(all) struct ContentBlockStartEvent {
    content_block : ContentBlockStartEventContentBlock
    index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ContentBlockStartEvent.

    ContentBlockStartEvent::equal

    automatically derived

    ContentBlockStartEvent::new

    fn ContentBlockStartEvent::new(content_block~ : ContentBlockStartEventContentBlock, index~ : Int, type_~ : String) -> ContentBlockStartEvent

    Creates a ContentBlockStartEvent with omitted optional fields absent.

    ContentBlockStartEvent::not_equal

    automatically derived

    ContentBlockStartEvent::to_json

    Encodes this value as JSON.

    ContentBlockStartEvent::to_repr

    automatically derived

    ContentBlockStartEventContentBlock

    pub(all) enum ContentBlockStartEventContentBlock {
    BashCodeExecutionToolResult(ResponseBashCodeExecutionToolResultBlock)
    CodeExecutionToolResult(ResponseCodeExecutionToolResultBlock)
    ContainerUpload(ResponseContainerUploadBlock)
    RedactedThinking(ResponseRedactedThinkingBlock)
    ServerToolUse(ResponseServerToolUseBlock)
    Text(ResponseTextBlock)
    TextEditorCodeExecutionToolResult(ResponseTextEditorCodeExecutionToolResultBlock)
    Thinking(ResponseThinkingBlock)
    ToolSearchToolResult(ResponseToolSearchToolResultBlock)
    ToolUse(ResponseToolUseBlock)
    WebFetchToolResult(ResponseWebFetchToolResultBlock)
    WebSearchToolResult(ResponseWebSearchToolResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ContentBlockStartEventContentBlock.

    ContentBlockStartEventContentBlock::equal

    automatically derived

    ContentBlockStartEventContentBlock::not_equal

    automatically derived

    ContentBlockStartEventContentBlock::to_json

    Encodes this tagged union as JSON.

    ContentBlockStartEventContentBlock::to_repr

    automatically derived

    ContentBlockStopEvent

    pub(all) struct ContentBlockStopEvent {
    index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ContentBlockStopEvent.

    ContentBlockStopEvent::equal

    automatically derived

    ContentBlockStopEvent::new

    fn ContentBlockStopEvent::new(index~ : Int, type_~ : String) -> ContentBlockStopEvent

    Creates a ContentBlockStopEvent with omitted optional fields absent.

    ContentBlockStopEvent::not_equal

    automatically derived

    ContentBlockStopEvent::to_json

    Encodes this value as JSON.

    ContentBlockStopEvent::to_repr

    automatically derived

    ContextManagementCapability

    pub(all) struct ContextManagementCapability {
    clear_thinking_20251015 : CapabilitySupport?
    clear_tool_uses_20250919 : CapabilitySupport?
    compact_20260112 : CapabilitySupport?
    supported : Bool
    } derive(Eq,
    Debug
    )

    Context management capability details.

    ContextManagementCapability::equal

    automatically derived

    ContextManagementCapability::new

    fn ContextManagementCapability::new(supported~ : Bool, clear_thinking_20251015? : CapabilitySupport, clear_tool_uses_20250919? : CapabilitySupport, compact_20260112? : CapabilitySupport) -> ContextManagementCapability

    Creates a ContextManagementCapability with omitted optional fields absent.

    ContextManagementCapability::not_equal

    automatically derived

    ContextManagementCapability::to_json

    Encodes this value as JSON.

    ContextManagementCapability::to_repr

    automatically derived

    ContractSpendLimitReachedErrorDetails

    pub(all) struct ContractSpendLimitReachedErrorDetails {
    } derive(Eq,
    Debug
    )

    The organization has reached the spend limit of its contract.

    ContractSpendLimitReachedErrorDetails::equal

    automatically derived

    ContractSpendLimitReachedErrorDetails::not_equal

    automatically derived

    ContractSpendLimitReachedErrorDetails::to_json

    Encodes this value as JSON.

    ContractSpendLimitReachedErrorDetails::to_repr

    automatically derived

    CountMessageTokensParams

    Generated representation of CountMessageTokensParams.

    CountMessageTokensParams::equal

    automatically derived

    CountMessageTokensParams::new

    fn CountMessageTokensParams::new(messages~ : Array[InputMessageUnion], model~ : String, cache_control? : CountMessageTokensParamsCacheControl, output_config? : OutputConfig, speed? : Speed, system? : CountMessageTokensParamsSystem, thinking? : ThinkingConfigParam, tool_choice? : ToolChoice, tools? : Array[CountMessageTokensParamsToolsItem]) -> CountMessageTokensParams

    Creates a CountMessageTokensParams with omitted optional fields absent.

    CountMessageTokensParams::not_equal

    automatically derived

    CountMessageTokensParams::to_json

    Encodes this value as JSON.

    CountMessageTokensParams::to_repr

    automatically derived

    CountMessageTokensParamsCacheControl

    pub(all) enum CountMessageTokensParamsCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

    CountMessageTokensParamsCacheControl::equal

    automatically derived

    CountMessageTokensParamsCacheControl::not_equal

    automatically derived

    CountMessageTokensParamsCacheControl::to_json

    Encodes this tagged union as JSON.

    CountMessageTokensParamsCacheControl::to_repr

    automatically derived

    CountMessageTokensParamsSystem

    pub(all) enum CountMessageTokensParamsSystem {
    Text(String)
    RequestTextBlockArray(Array[RequestTextBlock])
    } derive(Eq,
    Debug
    )

    System prompt. A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our guide to system prompts.

    CountMessageTokensParamsSystem::equal

    automatically derived

    CountMessageTokensParamsSystem::not_equal

    automatically derived

    CountMessageTokensParamsSystem::to_json

    Encodes this union as JSON.

    CountMessageTokensParamsSystem::to_repr

    automatically derived

    CountMessageTokensParamsToolsItem

    pub(all) enum CountMessageTokensParamsToolsItem {
    Tool(Tool)
    BashTool20250124(BashTool20250124)
    CodeExecutionTool20250522(CodeExecutionTool20250522)
    CodeExecutionTool20250825(CodeExecutionTool20250825)
    CodeExecutionTool20260120(CodeExecutionTool20260120)
    CodeExecutionTool20260521(CodeExecutionTool20260521)
    BrowserToolset20260801(BrowserToolset20260801)
    MemoryTool20250818(MemoryTool20250818)
    ComputerToolset20260801(ComputerToolset20260801)
    TextEditor20250124(TextEditor20250124)
    TextEditor20250429(TextEditor20250429)
    TextEditor20250728(TextEditor20250728)
    WebSearchTool20250305(WebSearchTool20250305)
    WebFetchTool20250910(WebFetchTool20250910)
    WebSearchTool20260209(WebSearchTool20260209)
    WebFetchTool20260209(WebFetchTool20260209)
    WebFetchTool20260309(WebFetchTool20260309)
    WebSearchTool20260318(WebSearchTool20260318)
    WebFetchTool20260318(WebFetchTool20260318)
    ToolSearchToolBM2520251119(ToolSearchToolBM2520251119)
    ToolSearchToolRegex20251119(ToolSearchToolRegex20251119)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union CountMessageTokensParamsToolsItem.

    CountMessageTokensParamsToolsItem::equal

    automatically derived

    CountMessageTokensParamsToolsItem::not_equal

    automatically derived

    CountMessageTokensParamsToolsItem::to_json

    Encodes this tagged union as JSON.

    CountMessageTokensParamsToolsItem::to_repr

    automatically derived

    CountMessageTokensResponse

    pub(all) struct CountMessageTokensResponse {
    input_tokens : Int
    } derive(Eq,
    Debug
    )

    Generated representation of CountMessageTokensResponse.

    CountMessageTokensResponse::equal

    automatically derived

    CountMessageTokensResponse::new

    Creates a CountMessageTokensResponse with omitted optional fields absent.

    CountMessageTokensResponse::not_equal

    automatically derived

    CountMessageTokensResponse::to_json

    Encodes this value as JSON.

    CountMessageTokensResponse::to_repr

    automatically derived

    CreateMessageParams

    pub(all) struct CreateMessageParams {
    model : String
    messages : Array[InputMessageUnion]
    cache_control :
    Presence
    [CreateMessageParamsCacheControl]
    container :
    Presence
    [CreateMessageParamsContainer]
    diagnostics :
    Presence
    [DiagnosticsParam]
    inference_geo :
    Presence
    [String]
    max_tokens : Int
    metadata : Metadata?
    output_config : OutputConfig?
    service_tier : CreateMessageParamsServiceTier?
    speed :
    Presence
    [Speed]
    stop_sequences : Array[String]?
    stream : Bool?
    system : CreateMessageParamsSystem?
    thinking : ThinkingConfigParam?
    tool_choice : ToolChoice?
    tools : Array[CreateMessageParamsToolsItem]?
    } derive(Eq,
    Debug
    )

    The parameters of a request for the next message in a conversation. See the Messages API guide to learn more about requests and responses.

    CreateMessageParams::equal

    automatically derived

    CreateMessageParams::new

    fn CreateMessageParams::new(model~ : String, messages~ : Array[InputMessageUnion], max_tokens~ : Int, cache_control? : CreateMessageParamsCacheControl, container? : CreateMessageParamsContainer, diagnostics? : DiagnosticsParam, inference_geo? : String, metadata? : Metadata, output_config? : OutputConfig, service_tier? : CreateMessageParamsServiceTier, speed? : Speed, stop_sequences? : Array[String], stream? : Bool, system? : CreateMessageParamsSystem, thinking? : ThinkingConfigParam, tool_choice? : ToolChoice, tools? : Array[CreateMessageParamsToolsItem]) -> CreateMessageParams

    Creates a CreateMessageParams with omitted optional fields absent.

    CreateMessageParams::not_equal

    automatically derived

    CreateMessageParams::to_json

    Encodes this value as JSON.

    CreateMessageParams::to_repr

    automatically derived

    CreateMessageParamsCacheControl

    pub(all) enum CreateMessageParamsCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

    CreateMessageParamsCacheControl::equal

    automatically derived

    CreateMessageParamsCacheControl::not_equal

    automatically derived

    CreateMessageParamsCacheControl::to_json

    Encodes this tagged union as JSON.

    CreateMessageParamsCacheControl::to_repr

    automatically derived

    CreateMessageParamsContainer

    pub(all) enum CreateMessageParamsContainer {
    ContainerParams(ContainerParams)
    Text(String)
    } derive(Eq,
    Debug
    )

    Container identifier for reuse across requests.

    CreateMessageParamsContainer::equal

    automatically derived

    CreateMessageParamsContainer::not_equal

    automatically derived

    CreateMessageParamsContainer::to_json

    Encodes this union as JSON.

    CreateMessageParamsContainer::to_repr

    automatically derived

    CreateMessageParamsServiceTier

    pub(all) enum CreateMessageParamsServiceTier {
    Auto
    StandardOnly
    Custom(String)
    } derive(Eq,
    Debug
    )

    Determines whether to use priority capacity (if available) or standard capacity for this request. Anthropic offers different levels of service for your API requests. See service-tiers for details.

    CreateMessageParamsServiceTier::equal

    automatically derived

    CreateMessageParamsServiceTier::not_equal

    automatically derived

    CreateMessageParamsServiceTier::to_json

    Encodes this string enum as JSON.

    CreateMessageParamsServiceTier::to_repr

    automatically derived

    CreateMessageParamsSystem

    pub(all) enum CreateMessageParamsSystem {
    Text(String)
    RequestTextBlockArray(Array[RequestTextBlock])
    } derive(Eq,
    Debug
    )

    System prompt. A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our guide to system prompts.

    CreateMessageParamsSystem::equal

    automatically derived

    CreateMessageParamsSystem::not_equal

    automatically derived

    CreateMessageParamsSystem::to_json

    Encodes this union as JSON.

    CreateMessageParamsSystem::to_repr

    automatically derived

    CreateMessageParamsToolsItem

    pub(all) enum CreateMessageParamsToolsItem {
    Tool(Tool)
    BashTool20250124(BashTool20250124)
    CodeExecutionTool20250522(CodeExecutionTool20250522)
    CodeExecutionTool20250825(CodeExecutionTool20250825)
    CodeExecutionTool20260120(CodeExecutionTool20260120)
    CodeExecutionTool20260521(CodeExecutionTool20260521)
    BrowserToolset20260801(BrowserToolset20260801)
    MemoryTool20250818(MemoryTool20250818)
    ComputerToolset20260801(ComputerToolset20260801)
    TextEditor20250124(TextEditor20250124)
    TextEditor20250429(TextEditor20250429)
    TextEditor20250728(TextEditor20250728)
    WebSearchTool20250305(WebSearchTool20250305)
    WebFetchTool20250910(WebFetchTool20250910)
    WebSearchTool20260209(WebSearchTool20260209)
    WebFetchTool20260209(WebFetchTool20260209)
    WebFetchTool20260309(WebFetchTool20260309)
    WebSearchTool20260318(WebSearchTool20260318)
    WebFetchTool20260318(WebFetchTool20260318)
    ToolSearchToolBM2520251119(ToolSearchToolBM2520251119)
    ToolSearchToolRegex20251119(ToolSearchToolRegex20251119)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union CreateMessageParamsToolsItem.

    CreateMessageParamsToolsItem::equal

    automatically derived

    CreateMessageParamsToolsItem::not_equal

    automatically derived

    CreateMessageParamsToolsItem::to_json

    Encodes this tagged union as JSON.

    CreateMessageParamsToolsItem::to_repr

    automatically derived

    Diagnostics

    pub(all) struct Diagnostics {
    cache_miss_reason : CacheMissReason?
    } derive(Eq,
    Debug
    )

    Request-level diagnostics: why the prompt cache could not fully reuse the prefix of the request named by diagnostics.previous_message_id.

    Diagnostics::equal

    fn Diagnostics::equal(Diagnostics, Diagnostics) -> Bool
    automatically derived

    Diagnostics::new

    fn Diagnostics::new(cache_miss_reason? : CacheMissReason) -> Diagnostics

    Creates a Diagnostics with omitted optional fields absent.

    Diagnostics::not_equal

    fn Diagnostics::not_equal(x : Diagnostics, y : Diagnostics) -> Bool
    automatically derived

    Diagnostics::to_json

    Encodes this value as JSON.

    Diagnostics::to_repr

    automatically derived

    DiagnosticsParam

    pub(all) struct DiagnosticsParam {
    previous_message_id :
    Presence
    [String]
    } derive(Eq,
    Debug
    )

    Request-level diagnostics. Currently carries the previous response id for prompt-cache divergence reporting.

    DiagnosticsParam::equal

    automatically derived

    DiagnosticsParam::new

    fn DiagnosticsParam::new(previous_message_id? : String) -> DiagnosticsParam

    Creates a DiagnosticsParam with omitted optional fields absent.

    DiagnosticsParam::not_equal

    fn DiagnosticsParam::not_equal(x : DiagnosticsParam, y : DiagnosticsParam) -> Bool
    automatically derived

    DiagnosticsParam::to_json

    Encodes this value as JSON.

    DiagnosticsParam::to_repr

    automatically derived

    DirectCaller

    pub(all) struct DirectCaller {
    type_ : String
    } derive(Eq,
    Debug
    )

    Tool invocation directly from the model.

    DirectCaller::equal

    automatically derived

    DirectCaller::new

    fn DirectCaller::new(type_~ : String) -> DirectCaller

    Creates a DirectCaller with omitted optional fields absent.

    DirectCaller::not_equal

    fn DirectCaller::not_equal(x : DirectCaller, y : DirectCaller) -> Bool
    automatically derived

    DirectCaller::to_json

    Encodes this value as JSON.

    DirectCaller::to_repr

    automatically derived

    EffortCapability

    pub(all) struct EffortCapability {
    high : CapabilitySupport
    low : CapabilitySupport
    max : CapabilitySupport
    medium : CapabilitySupport
    supported : Bool
    xhigh : CapabilitySupport?
    } derive(Eq,
    Debug
    )

    Effort (reasoning_effort) capability details.

    EffortCapability::equal

    automatically derived

    EffortCapability::new

    fn EffortCapability::new(high~ : CapabilitySupport, low~ : CapabilitySupport, max~ : CapabilitySupport, medium~ : CapabilitySupport, supported~ : Bool, xhigh? : CapabilitySupport) -> EffortCapability

    Creates a EffortCapability with omitted optional fields absent.

    EffortCapability::not_equal

    fn EffortCapability::not_equal(x : EffortCapability, y : EffortCapability) -> Bool
    automatically derived

    EffortCapability::to_json

    Encodes this value as JSON.

    EffortCapability::to_repr

    automatically derived

    EffortLevel

    pub(all) enum EffortLevel {
    Low
    Medium
    High
    Xhigh
    Max
    Custom(String)
    } derive(Eq,
    Debug
    )

    All possible effort levels.

    EffortLevel::equal

    fn EffortLevel::equal(EffortLevel, EffortLevel) -> Bool
    automatically derived

    EffortLevel::not_equal

    fn EffortLevel::not_equal(x : EffortLevel, y : EffortLevel) -> Bool
    automatically derived

    EffortLevel::to_json

    Encodes this string enum as JSON.

    EffortLevel::to_repr

    automatically derived

    EnforcedSpendLimitReachedErrorDetails

    pub(all) struct EnforcedSpendLimitReachedErrorDetails {
    } derive(Eq,
    Debug
    )

    The organization has crossed the monthly API usage threshold of its API tier.

    EnforcedSpendLimitReachedErrorDetails::equal

    automatically derived

    EnforcedSpendLimitReachedErrorDetails::not_equal

    automatically derived

    EnforcedSpendLimitReachedErrorDetails::to_json

    Encodes this value as JSON.

    EnforcedSpendLimitReachedErrorDetails::to_repr

    automatically derived

    ErrorResponse

    pub(all) struct ErrorResponse {
    error : ErrorResponseError
    request_id : String?
    } derive(Eq,
    Debug
    )

    Generated representation of ErrorResponse.

    ErrorResponse::equal

    automatically derived

    ErrorResponse::new

    fn ErrorResponse::new(error~ : ErrorResponseError, request_id? : String) -> ErrorResponse

    Creates a ErrorResponse with omitted optional fields absent.

    ErrorResponse::not_equal

    fn ErrorResponse::not_equal(x : ErrorResponse, y : ErrorResponse) -> Bool
    automatically derived

    ErrorResponse::to_json

    Encodes this value as JSON.

    ErrorResponse::to_repr

    automatically derived

    ErrorResponseError

    pub(all) enum ErrorResponseError {
    ApiError(APIError)
    AuthenticationError(AuthenticationError)
    BillingError(BillingError)
    InvalidRequestError(InvalidRequestError)
    NotFoundError(NotFoundError)
    OverloadedError(OverloadedError)
    PermissionError(PermissionError)
    RateLimitError(RateLimitError)
    TimeoutError(GatewayTimeoutError)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ErrorResponseError.

    ErrorResponseError::equal

    automatically derived

    ErrorResponseError::not_equal

    automatically derived

    ErrorResponseError::to_json

    Encodes this tagged union as JSON.

    ErrorResponseError::to_repr

    automatically derived

    FileDocumentSource

    pub(all) struct FileDocumentSource {
    file_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of FileDocumentSource.

    FileDocumentSource::equal

    automatically derived

    FileDocumentSource::new

    fn FileDocumentSource::new(file_id~ : String, type_~ : String) -> FileDocumentSource

    Creates a FileDocumentSource with omitted optional fields absent.

    FileDocumentSource::not_equal

    automatically derived

    FileDocumentSource::to_json

    Encodes this value as JSON.

    FileDocumentSource::to_repr

    automatically derived

    FileImageSource

    pub(all) struct FileImageSource {
    file_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of FileImageSource.

    FileImageSource::equal

    automatically derived

    FileImageSource::new

    fn FileImageSource::new(file_id~ : String, type_~ : String) -> FileImageSource

    Creates a FileImageSource with omitted optional fields absent.

    FileImageSource::not_equal

    fn FileImageSource::not_equal(x : FileImageSource, y : FileImageSource) -> Bool
    automatically derived

    FileImageSource::to_json

    Encodes this value as JSON.

    FileImageSource::to_repr

    automatically derived

    GatewayTimeoutError

    pub(all) struct GatewayTimeoutError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of GatewayTimeoutError.

    GatewayTimeoutError::equal

    automatically derived

    GatewayTimeoutError::new

    fn GatewayTimeoutError::new(message~ : String, type_~ : String) -> GatewayTimeoutError

    Creates a GatewayTimeoutError with omitted optional fields absent.

    GatewayTimeoutError::not_equal

    automatically derived

    GatewayTimeoutError::to_json

    Encodes this value as JSON.

    GatewayTimeoutError::to_repr

    automatically derived

    ImageDimensionsTooLargeErrorDetails

    pub(all) struct ImageDimensionsTooLargeErrorDetails {
    max_side_length_pixels : Int
    paths : Array[String]
    } derive(Eq,
    Debug
    )

    The longest side of one or more images in the request exceeds the image size limit. Scale each image in paths so that neither side exceeds max_side_length_pixels, or remove it, then retry.

    ImageDimensionsTooLargeErrorDetails::equal

    automatically derived

    ImageDimensionsTooLargeErrorDetails::new

    fn ImageDimensionsTooLargeErrorDetails::new(max_side_length_pixels~ : Int, paths~ : Array[String]) -> ImageDimensionsTooLargeErrorDetails

    Creates a ImageDimensionsTooLargeErrorDetails with omitted optional fields absent.

    ImageDimensionsTooLargeErrorDetails::not_equal

    automatically derived

    ImageDimensionsTooLargeErrorDetails::to_json

    Encodes this value as JSON.

    ImageDimensionsTooLargeErrorDetails::to_repr

    automatically derived

    InputContentBlock

    pub(all) enum InputContentBlock {
    BashCodeExecutionToolResult(RequestBashCodeExecutionToolResultBlock)
    CodeExecutionToolResult(RequestCodeExecutionToolResultBlock)
    ContainerUpload(RequestContainerUploadBlock)
    Document(RequestDocumentBlock)
    Image(RequestImageBlock)
    RedactedThinking(RequestRedactedThinkingBlock)
    SearchResult(RequestSearchResultBlock)
    ServerToolUse(RequestServerToolUseBlock)
    Text(RequestTextBlock)
    TextEditorCodeExecutionToolResult(RequestTextEditorCodeExecutionToolResultBlock)
    Thinking(RequestThinkingBlock)
    ToolResult(RequestToolResultBlock)
    ToolSearchToolResult(RequestToolSearchToolResultBlock)
    ToolUse(RequestToolUseBlock)
    WebFetchToolResult(RequestWebFetchToolResultBlock)
    WebSearchToolResult(RequestWebSearchToolResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union InputContentBlock.

    InputContentBlock::equal

    automatically derived

    InputContentBlock::not_equal

    fn InputContentBlock::not_equal(x : InputContentBlock, y : InputContentBlock) -> Bool
    automatically derived

    InputContentBlock::to_json

    Encodes this tagged union as JSON.

    InputContentBlock::to_repr

    automatically derived

    InputJsonContentBlockDelta

    pub(all) struct InputJsonContentBlockDelta {
    partial_json : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of InputJsonContentBlockDelta.

    InputJsonContentBlockDelta::equal

    automatically derived

    InputJsonContentBlockDelta::new

    fn InputJsonContentBlockDelta::new(partial_json~ : String, type_~ : String) -> InputJsonContentBlockDelta

    Creates a InputJsonContentBlockDelta with omitted optional fields absent.

    InputJsonContentBlockDelta::not_equal

    automatically derived

    InputJsonContentBlockDelta::to_json

    Encodes this value as JSON.

    InputJsonContentBlockDelta::to_repr

    automatically derived

    InputMessageContent

    pub(all) enum InputMessageContent {
    Text(String)
    InputContentBlockArray(Array[InputContentBlock])
    } derive(Eq,
    Debug
    )

    Generated untagged union InputMessageContent.

    InputMessageContent::equal

    automatically derived

    InputMessageContent::not_equal

    automatically derived

    InputMessageContent::to_json

    Encodes this union as JSON.

    InputMessageContent::to_repr

    automatically derived

    InputMessageUnion

    pub(all) enum InputMessageUnion {
    Assistant(AssistantInputMessage)
    System(SystemInputMessage)
    User(UserInputMessage)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union InputMessageUnion.

    InputMessageUnion::equal

    automatically derived

    InputMessageUnion::not_equal

    fn InputMessageUnion::not_equal(x : InputMessageUnion, y : InputMessageUnion) -> Bool
    automatically derived

    InputMessageUnion::to_json

    Encodes this tagged union as JSON.

    InputMessageUnion::to_repr

    automatically derived

    InvalidRequestError

    pub(all) struct InvalidRequestError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of InvalidRequestError.

    InvalidRequestError::equal

    automatically derived

    InvalidRequestError::new

    fn InvalidRequestError::new(message~ : String, type_~ : String) -> InvalidRequestError

    Creates a InvalidRequestError with omitted optional fields absent.

    InvalidRequestError::not_equal

    automatically derived

    InvalidRequestError::to_json

    Encodes this value as JSON.

    InvalidRequestError::to_repr

    automatically derived

    JsonOutputFormat

    pub(all) struct JsonOutputFormat {
    schema :
    Json

    } derive(Eq,
    Debug
    )

    Generated representation of JsonOutputFormat.

    JsonOutputFormat::equal

    automatically derived

    JsonOutputFormat::new

    Creates a JsonOutputFormat with omitted optional fields absent.

    JsonOutputFormat::not_equal

    fn JsonOutputFormat::not_equal(x : JsonOutputFormat, y : JsonOutputFormat) -> Bool
    automatically derived

    JsonOutputFormat::to_json

    Encodes this value as JSON.

    JsonOutputFormat::to_repr

    automatically derived

    LinkedOrganizationBillingUnavailableErrorDetails

    pub(all) struct LinkedOrganizationBillingUnavailableErrorDetails {
    } derive(Eq,
    Debug
    )

    Anthropic cannot currently bill the organization linked to the request's user profile, for a reason that lies with that organization's own account. The response does not say what the reason is.

    LinkedOrganizationBillingUnavailableErrorDetails::not_equal

    automatically derived

    LinkedOrganizationBillingUnavailableErrorDetails::to_json

    Encodes this value as JSON.

    LinkedOrganizationBillingUnavailableErrorDetails::to_repr

    automatically derived

    LinkedOrganizationSpendLimitReachedErrorDetails

    pub(all) struct LinkedOrganizationSpendLimitReachedErrorDetails {
    } derive(Eq,
    Debug
    )

    The organization linked to the request's user profile has reached a spend limit that it set, or lacks credit for the request. The response does not say which applies.

    LinkedOrganizationSpendLimitReachedErrorDetails::equal

    automatically derived

    LinkedOrganizationSpendLimitReachedErrorDetails::not_equal

    automatically derived

    LinkedOrganizationSpendLimitReachedErrorDetails::to_json

    Encodes this value as JSON.

    LinkedOrganizationSpendLimitReachedErrorDetails::to_repr

    automatically derived

    ListResponseModelInfo

    pub(all) struct ListResponseModelInfo {
    data : Array[ModelInfo]
    first_id : String?
    has_more : Bool
    last_id : String?
    } derive(Eq,
    Debug
    )

    Generated representation of ListResponseModelInfo.

    ListResponseModelInfo::equal

    automatically derived

    ListResponseModelInfo::new

    fn ListResponseModelInfo::new(data~ : Array[ModelInfo], has_more~ : Bool, first_id? : String, last_id? : String) -> ListResponseModelInfo

    Creates a ListResponseModelInfo with omitted optional fields absent.

    ListResponseModelInfo::not_equal

    automatically derived

    ListResponseModelInfo::to_json

    Encodes this value as JSON.

    ListResponseModelInfo::to_repr

    automatically derived

    MemoryTool20250818

    pub(all) struct MemoryTool20250818 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [MemoryTool20250818CacheControl]
    defer_loading : Bool?
    input_examples : Array[Map[String,
    Json
    ]]?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of MemoryTool20250818.

    MemoryTool20250818::equal

    automatically derived

    MemoryTool20250818::new

    fn MemoryTool20250818::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : MemoryTool20250818CacheControl, defer_loading? : Bool, input_examples? : Array[Map[String,
    Json
    ]], strict? : Bool) -> MemoryTool20250818

    Creates a MemoryTool20250818 with omitted optional fields absent.

    MemoryTool20250818::not_equal

    automatically derived

    MemoryTool20250818::to_json

    Encodes this value as JSON.

    MemoryTool20250818::to_repr

    automatically derived

    MemoryTool20250818CacheControl

    pub(all) enum MemoryTool20250818CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    MemoryTool20250818CacheControl::equal

    automatically derived

    MemoryTool20250818CacheControl::not_equal

    automatically derived

    MemoryTool20250818CacheControl::to_json

    Encodes this tagged union as JSON.

    MemoryTool20250818CacheControl::to_repr

    automatically derived

    Message

    pub(all) struct Message {
    id : String
    content : Array[ContentBlock]
    model : String
    stop_reason : StopReason?
    stop_sequence :
    Presence
    [String]
    stop_details :
    Presence
    [StopDetails]
    usage : Usage
    diagnostics :
    Presence
    [Diagnostics]
    container :
    Presence
    [Container]
    } derive(Eq,
    Debug
    )

    Generated representation of Message.

    Message::equal

    fn Message::equal(Message, Message) -> Bool
    automatically derived

    Message::new

    fn Message::new(id~ : String, content~ : Array[ContentBlock], model~ : String, usage~ : Usage, stop_reason? : StopReason, stop_sequence? : String, stop_details? : StopDetails, diagnostics? : Diagnostics, container? : Container) -> Message

    Creates a Message with omitted optional fields absent.

    Message::not_equal

    fn Message::not_equal(x : Message, y : Message) -> Bool
    automatically derived

    Message::to_json

    Encodes this value as JSON.

    Message::to_repr

    automatically derived

    MessageDelta

    Generated representation of MessageDelta.

    MessageDelta::equal

    automatically derived

    MessageDelta::new

    fn MessageDelta::new(container? : Container, stop_details? : StopDetails, stop_reason? : StopReason, stop_sequence? : String) -> MessageDelta

    Creates a MessageDelta with omitted optional fields absent.

    MessageDelta::not_equal

    fn MessageDelta::not_equal(x : MessageDelta, y : MessageDelta) -> Bool
    automatically derived

    MessageDelta::to_json

    Encodes this value as JSON.

    MessageDelta::to_repr

    automatically derived

    MessageDeltaEvent

    pub(all) struct MessageDeltaEvent {
    delta : MessageDelta
    type_ : String
    usage : MessageDeltaUsage
    } derive(Eq,
    Debug
    )

    Generated representation of MessageDeltaEvent.

    MessageDeltaEvent::equal

    automatically derived

    MessageDeltaEvent::new

    fn MessageDeltaEvent::new(delta~ : MessageDelta, type_~ : String, usage~ : MessageDeltaUsage) -> MessageDeltaEvent

    Creates a MessageDeltaEvent with omitted optional fields absent.

    MessageDeltaEvent::not_equal

    fn MessageDeltaEvent::not_equal(x : MessageDeltaEvent, y : MessageDeltaEvent) -> Bool
    automatically derived

    MessageDeltaEvent::to_json

    Encodes this value as JSON.

    MessageDeltaEvent::to_repr

    automatically derived

    MessageDeltaUsage

    pub(all) struct MessageDeltaUsage {
    cache_creation_input_tokens :
    Presence
    [Int]
    cache_read_input_tokens :
    Presence
    [Int]
    input_tokens :
    Presence
    [Int]
    output_tokens : Int
    output_tokens_details :
    Presence
    [OutputTokensDetails]
    server_tool_use :
    Presence
    [ServerToolUsage]
    } derive(Eq,
    Debug
    )

    Generated representation of MessageDeltaUsage.

    MessageDeltaUsage::equal

    automatically derived

    MessageDeltaUsage::new

    fn MessageDeltaUsage::new(output_tokens~ : Int, cache_creation_input_tokens? : Int, cache_read_input_tokens? : Int, input_tokens? : Int, output_tokens_details? : OutputTokensDetails, server_tool_use? : ServerToolUsage) -> MessageDeltaUsage

    Creates a MessageDeltaUsage with omitted optional fields absent.

    MessageDeltaUsage::not_equal

    fn MessageDeltaUsage::not_equal(x : MessageDeltaUsage, y : MessageDeltaUsage) -> Bool
    automatically derived

    MessageDeltaUsage::to_json

    Encodes this value as JSON.

    MessageDeltaUsage::to_repr

    automatically derived

    MessageStartEvent

    pub(all) struct MessageStartEvent {
    message : Message
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of MessageStartEvent.

    MessageStartEvent::equal

    automatically derived

    MessageStartEvent::new

    fn MessageStartEvent::new(message~ : Message, type_~ : String) -> MessageStartEvent

    Creates a MessageStartEvent with omitted optional fields absent.

    MessageStartEvent::not_equal

    fn MessageStartEvent::not_equal(x : MessageStartEvent, y : MessageStartEvent) -> Bool
    automatically derived

    MessageStartEvent::to_json

    Encodes this value as JSON.

    MessageStartEvent::to_repr

    automatically derived

    MessageStopEvent

    pub(all) struct MessageStopEvent {
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of MessageStopEvent.

    MessageStopEvent::equal

    automatically derived

    MessageStopEvent::new

    fn MessageStopEvent::new(type_~ : String) -> MessageStopEvent

    Creates a MessageStopEvent with omitted optional fields absent.

    MessageStopEvent::not_equal

    fn MessageStopEvent::not_equal(x : MessageStopEvent, y : MessageStopEvent) -> Bool
    automatically derived

    MessageStopEvent::to_json

    Encodes this value as JSON.

    MessageStopEvent::to_repr

    automatically derived

    MessageStreamEvent

    pub(all) enum MessageStreamEvent {
    ContentBlockDelta(ContentBlockDeltaEvent)
    ContentBlockStart(ContentBlockStartEvent)
    ContentBlockStop(ContentBlockStopEvent)
    MessageDelta(MessageDeltaEvent)
    MessageStart(MessageStartEvent)
    MessageStop(MessageStopEvent)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union MessageStreamEvent.

    MessageStreamEvent::equal

    automatically derived

    MessageStreamEvent::not_equal

    automatically derived

    MessageStreamEvent::to_json

    Encodes this tagged union as JSON.

    MessageStreamEvent::to_repr

    automatically derived

    Metadata

    pub(all) struct Metadata {
    user_id :
    Presence
    [String]
    } derive(Eq,
    Debug
    )

    Generated representation of Metadata.

    Metadata::equal

    fn Metadata::equal(Metadata, Metadata) -> Bool
    automatically derived

    Metadata::new

    fn Metadata::new(user_id? : String) -> Metadata

    Creates a Metadata with omitted optional fields absent.

    Metadata::not_equal

    fn Metadata::not_equal(x : Metadata, y : Metadata) -> Bool
    automatically derived

    Metadata::to_json

    Encodes this value as JSON.

    Metadata::to_repr

    automatically derived

    ModelCapabilities

    pub(all) struct ModelCapabilities {
    batch : CapabilitySupport
    citations : CapabilitySupport
    code_execution : CapabilitySupport
    context_management : ContextManagementCapability
    effort : EffortCapability
    image_input : CapabilitySupport
    pdf_input : CapabilitySupport
    server_tools : ServerToolsCapability
    structured_outputs : CapabilitySupport
    thinking : ThinkingCapability
    } derive(Eq,
    Debug
    )

    Model capability information.

    ModelCapabilities::equal

    automatically derived

    ModelCapabilities::new

    fn ModelCapabilities::new(batch~ : CapabilitySupport, citations~ : CapabilitySupport, code_execution~ : CapabilitySupport, context_management~ : ContextManagementCapability, effort~ : EffortCapability, image_input~ : CapabilitySupport, pdf_input~ : CapabilitySupport, server_tools~ : ServerToolsCapability, structured_outputs~ : CapabilitySupport, thinking~ : ThinkingCapability) -> ModelCapabilities

    Creates a ModelCapabilities with omitted optional fields absent.

    ModelCapabilities::not_equal

    fn ModelCapabilities::not_equal(x : ModelCapabilities, y : ModelCapabilities) -> Bool
    automatically derived

    ModelCapabilities::to_json

    Encodes this value as JSON.

    ModelCapabilities::to_repr

    automatically derived

    ModelInfo

    pub(all) struct ModelInfo {
    capabilities : ModelCapabilities?
    created_at : String
    deprecated_at : String?
    display_name : String
    id : String
    lifecycle : ModelInfoLifecycle
    line : ModelLine?
    max_input_tokens : Int?
    max_tokens : Int?
    retires_at : String?
    } derive(Eq,
    Debug
    )

    Generated representation of ModelInfo.

    ModelInfo::equal

    fn ModelInfo::equal(ModelInfo, ModelInfo) -> Bool
    automatically derived

    ModelInfo::new

    fn ModelInfo::new(created_at~ : String, display_name~ : String, id~ : String, lifecycle~ : ModelInfoLifecycle, capabilities? : ModelCapabilities, deprecated_at? : String, line? : ModelLine, max_input_tokens? : Int, max_tokens? : Int, retires_at? : String) -> ModelInfo

    Creates a ModelInfo with omitted optional fields absent.

    ModelInfo::not_equal

    fn ModelInfo::not_equal(x : ModelInfo, y : ModelInfo) -> Bool
    automatically derived

    ModelInfo::to_json

    Encodes this value as JSON.

    ModelInfo::to_repr

    automatically derived

    ModelInfoLifecycle

    pub(all) enum ModelInfoLifecycle {
    Active
    Deprecated
    Retired
    Unknown(String)
    } derive(Eq,
    Debug
    )

    The model's current lifecycle stage. - active: The model is available for use, open to new adopters, and not scheduled for retirement. - deprecated: The model remains callable for organizations with existing access, but is headed for retirement and closed to new adopters. - retired: The model is no longer available for use; inference requests naming it fail. It remains in the catalogue as the historical record of its retirement.

    ModelInfoLifecycle::equal

    automatically derived

    ModelInfoLifecycle::not_equal

    automatically derived

    ModelInfoLifecycle::to_json

    Encodes this string enum as JSON.

    ModelInfoLifecycle::to_repr

    automatically derived

    ModelLine

    pub(all) enum ModelLine {
    Haiku
    Sonnet
    Opus
    Fable
    Mythos
    Unknown(String)
    } derive(Eq,
    Debug
    )

    A Claude model line, such as opus or sonnet. More lines may be added as new values.

    ModelLine::equal

    fn ModelLine::equal(ModelLine, ModelLine) -> Bool
    automatically derived

    ModelLine::not_equal

    fn ModelLine::not_equal(x : ModelLine, y : ModelLine) -> Bool
    automatically derived

    ModelLine::to_json

    Encodes this string enum as JSON.

    ModelLine::to_repr

    automatically derived

    ModelsListLifecycleItem

    pub(all) enum ModelsListLifecycleItem {
    Active
    Deprecated
    Retired
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ModelsListLifecycleItem.

    ModelsListLifecycleItem::equal

    automatically derived

    ModelsListLifecycleItem::not_equal

    automatically derived

    ModelsListLifecycleItem::to_json

    Encodes this string enum as JSON.

    ModelsListLifecycleItem::to_repr

    automatically derived

    NotFoundError

    pub(all) struct NotFoundError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of NotFoundError.

    NotFoundError::equal

    automatically derived

    NotFoundError::new

    fn NotFoundError::new(message~ : String, type_~ : String) -> NotFoundError

    Creates a NotFoundError with omitted optional fields absent.

    NotFoundError::not_equal

    fn NotFoundError::not_equal(x : NotFoundError, y : NotFoundError) -> Bool
    automatically derived

    NotFoundError::to_json

    Encodes this value as JSON.

    NotFoundError::to_repr

    automatically derived

    OrganizationOnHoldErrorDetails

    pub(all) struct OrganizationOnHoldErrorDetails {
    appeal_url :
    Presence
    [String]
    } derive(Eq,
    Debug
    )

    Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. appeal_url, when present, is where the organization can appeal.

    OrganizationOnHoldErrorDetails::equal

    automatically derived

    OrganizationOnHoldErrorDetails::new

    Creates a OrganizationOnHoldErrorDetails with omitted optional fields absent.

    OrganizationOnHoldErrorDetails::not_equal

    automatically derived

    OrganizationOnHoldErrorDetails::to_json

    Encodes this value as JSON.

    OrganizationOnHoldErrorDetails::to_repr

    automatically derived

    OutputConfig

    Generated representation of OutputConfig.

    OutputConfig::equal

    automatically derived

    OutputConfig::new

    fn OutputConfig::new(effort? : EffortLevel, format? : JsonOutputFormat) -> OutputConfig

    Creates a OutputConfig with omitted optional fields absent.

    OutputConfig::not_equal

    fn OutputConfig::not_equal(x : OutputConfig, y : OutputConfig) -> Bool
    automatically derived

    OutputConfig::to_json

    Encodes this value as JSON.

    OutputConfig::to_repr

    automatically derived

    OutputTokensDetails

    pub(all) struct OutputTokensDetails {
    thinking_tokens : Int
    } derive(Eq,
    Debug
    )

    Generated representation of OutputTokensDetails.

    OutputTokensDetails::equal

    automatically derived

    OutputTokensDetails::new

    fn OutputTokensDetails::new(thinking_tokens~ : Int) -> OutputTokensDetails

    Creates a OutputTokensDetails with omitted optional fields absent.

    OutputTokensDetails::not_equal

    automatically derived

    OutputTokensDetails::to_json

    Encodes this value as JSON.

    OutputTokensDetails::to_repr

    automatically derived

    OverloadedError

    pub(all) struct OverloadedError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of OverloadedError.

    OverloadedError::equal

    automatically derived

    OverloadedError::new

    fn OverloadedError::new(message~ : String, type_~ : String) -> OverloadedError

    Creates a OverloadedError with omitted optional fields absent.

    OverloadedError::not_equal

    fn OverloadedError::not_equal(x : OverloadedError, y : OverloadedError) -> Bool
    automatically derived

    OverloadedError::to_json

    Encodes this value as JSON.

    OverloadedError::to_repr

    automatically derived

    PermissionError

    pub(all) struct PermissionError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of PermissionError.

    PermissionError::equal

    automatically derived

    PermissionError::new

    fn PermissionError::new(message~ : String, type_~ : String) -> PermissionError

    Creates a PermissionError with omitted optional fields absent.

    PermissionError::not_equal

    fn PermissionError::not_equal(x : PermissionError, y : PermissionError) -> Bool
    automatically derived

    PermissionError::to_json

    Encodes this value as JSON.

    PermissionError::to_repr

    automatically derived

    PlainTextSource

    pub(all) struct PlainTextSource {
    data : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of PlainTextSource.

    PlainTextSource::equal

    automatically derived

    PlainTextSource::new

    fn PlainTextSource::new(data~ : String, type_~ : String) -> PlainTextSource

    Creates a PlainTextSource with omitted optional fields absent.

    PlainTextSource::not_equal

    fn PlainTextSource::not_equal(x : PlainTextSource, y : PlainTextSource) -> Bool
    automatically derived

    PlainTextSource::to_json

    Encodes this value as JSON.

    PlainTextSource::to_repr

    automatically derived

    RampLimitExceededErrorDetails

    pub(all) struct RampLimitExceededErrorDetails {
    } derive(Eq,
    Debug
    )

    The request would exceed a ramp limit, which caps how fast usage can grow. Retry after the time in the retry-after header.

    RampLimitExceededErrorDetails::equal

    automatically derived

    RampLimitExceededErrorDetails::not_equal

    automatically derived

    RampLimitExceededErrorDetails::to_json

    Encodes this value as JSON.

    RampLimitExceededErrorDetails::to_repr

    automatically derived

    RateLimitError

    pub(all) struct RateLimitError {
    message : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RateLimitError.

    RateLimitError::equal

    automatically derived

    RateLimitError::new

    fn RateLimitError::new(message~ : String, type_~ : String) -> RateLimitError

    Creates a RateLimitError with omitted optional fields absent.

    RateLimitError::not_equal

    fn RateLimitError::not_equal(x : RateLimitError, y : RateLimitError) -> Bool
    automatically derived

    RateLimitError::to_json

    Encodes this value as JSON.

    RateLimitError::to_repr

    automatically derived

    RefusalCategory

    pub(all) enum RefusalCategory {
    Cyber
    Bio
    FrontierLlm
    ReasoningExtraction
    GeneralHarms
    Unknown(String)
    } derive(Eq,
    Debug
    )

    The policy category that triggered a refusal.

    RefusalCategory::equal

    automatically derived

    RefusalCategory::not_equal

    fn RefusalCategory::not_equal(x : RefusalCategory, y : RefusalCategory) -> Bool
    automatically derived

    RefusalCategory::to_json

    Encodes this string enum as JSON.

    RefusalCategory::to_repr

    automatically derived

    RefusalStopDetails

    pub(all) struct RefusalStopDetails {
    category : RefusalCategory?
    explanation : String?
    type_ : String
    } derive(Eq,
    Debug
    )

    Structured information about a refusal.

    RefusalStopDetails::equal

    automatically derived

    RefusalStopDetails::new

    fn RefusalStopDetails::new(type_~ : String, category? : RefusalCategory, explanation? : String) -> RefusalStopDetails

    Creates a RefusalStopDetails with omitted optional fields absent.

    RefusalStopDetails::not_equal

    automatically derived

    RefusalStopDetails::to_json

    Encodes this value as JSON.

    RefusalStopDetails::to_repr

    automatically derived

    RequestBashCodeExecutionOutputBlock

    pub(all) struct RequestBashCodeExecutionOutputBlock {
    file_id : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestBashCodeExecutionOutputBlock.

    RequestBashCodeExecutionOutputBlock::equal

    automatically derived

    RequestBashCodeExecutionOutputBlock::new

    Creates a RequestBashCodeExecutionOutputBlock with omitted optional fields absent.

    RequestBashCodeExecutionOutputBlock::not_equal

    automatically derived

    RequestBashCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    RequestBashCodeExecutionOutputBlock::to_repr

    automatically derived

    RequestBashCodeExecutionResultBlock

    pub(all) struct RequestBashCodeExecutionResultBlock {
    content : Array[RequestBashCodeExecutionOutputBlock]
    return_code : Int
    stderr : String
    stdout : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestBashCodeExecutionResultBlock.

    RequestBashCodeExecutionResultBlock::equal

    automatically derived

    RequestBashCodeExecutionResultBlock::new

    fn RequestBashCodeExecutionResultBlock::new(content~ : Array[RequestBashCodeExecutionOutputBlock], return_code~ : Int, stderr~ : String, stdout~ : String, type_~ : String) -> RequestBashCodeExecutionResultBlock

    Creates a RequestBashCodeExecutionResultBlock with omitted optional fields absent.

    RequestBashCodeExecutionResultBlock::not_equal

    automatically derived

    RequestBashCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    RequestBashCodeExecutionResultBlock::to_repr

    automatically derived

    RequestBashCodeExecutionToolResultBlock

    pub(all) struct RequestBashCodeExecutionToolResultBlock {
    cache_control :
    Presence
    [RequestBashCodeExecutionToolResultBlockCacheControl]
    content : RequestBashCodeExecutionToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestBashCodeExecutionToolResultBlock.

    RequestBashCodeExecutionToolResultBlock::equal

    automatically derived

    RequestBashCodeExecutionToolResultBlock::new

    Creates a RequestBashCodeExecutionToolResultBlock with omitted optional fields absent.

    RequestBashCodeExecutionToolResultBlock::not_equal

    automatically derived

    RequestBashCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    RequestBashCodeExecutionToolResultBlock::to_repr

    automatically derived

    RequestBashCodeExecutionToolResultBlockCacheControl

    pub(all) enum RequestBashCodeExecutionToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestBashCodeExecutionToolResultBlockCacheControl::not_equal

    automatically derived

    RequestBashCodeExecutionToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestBashCodeExecutionToolResultBlockCacheControl::to_repr

    automatically derived

    RequestBashCodeExecutionToolResultBlockContent

    pub(all) enum RequestBashCodeExecutionToolResultBlockContent {
    BashCodeExecutionToolResultError(RequestBashCodeExecutionToolResultError)
    BashCodeExecutionResult(RequestBashCodeExecutionResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestBashCodeExecutionToolResultBlockContent.

    RequestBashCodeExecutionToolResultBlockContent::equal

    automatically derived

    RequestBashCodeExecutionToolResultBlockContent::not_equal

    automatically derived

    RequestBashCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestBashCodeExecutionToolResultBlockContent::to_repr

    automatically derived

    RequestBashCodeExecutionToolResultError

    pub(all) struct RequestBashCodeExecutionToolResultError {
    error_code : BashCodeExecutionToolResultErrorCode
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestBashCodeExecutionToolResultError.

    RequestBashCodeExecutionToolResultError::equal

    automatically derived

    RequestBashCodeExecutionToolResultError::new

    Creates a RequestBashCodeExecutionToolResultError with omitted optional fields absent.

    RequestBashCodeExecutionToolResultError::not_equal

    automatically derived

    RequestBashCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    RequestBashCodeExecutionToolResultError::to_repr

    automatically derived

    RequestBodyEncodingInvalidErrorDetails

    pub(all) struct RequestBodyEncodingInvalidErrorDetails {
    } derive(Eq,
    Debug
    )

    The request body is not valid for its Content-Encoding.

    RequestBodyEncodingInvalidErrorDetails::equal

    automatically derived

    RequestBodyEncodingInvalidErrorDetails::not_equal

    automatically derived

    RequestBodyEncodingInvalidErrorDetails::to_json

    Encodes this value as JSON.

    RequestBodyEncodingInvalidErrorDetails::to_repr

    automatically derived

    RequestBodyEncodingUnsupportedErrorDetails

    pub(all) struct RequestBodyEncodingUnsupportedErrorDetails {
    } derive(Eq,
    Debug
    )

    The request's Content-Encoding is not supported.

    RequestBodyEncodingUnsupportedErrorDetails::equal

    automatically derived

    RequestBodyEncodingUnsupportedErrorDetails::not_equal

    automatically derived

    RequestBodyEncodingUnsupportedErrorDetails::to_json

    Encodes this value as JSON.

    RequestBodyEncodingUnsupportedErrorDetails::to_repr

    automatically derived

    RequestBodyTooLargeAfterDecodingErrorDetails

    pub(all) struct RequestBodyTooLargeAfterDecodingErrorDetails {
    } derive(Eq,
    Debug
    )

    The compressed request body exceeds the request size limit once decoded.

    RequestBodyTooLargeAfterDecodingErrorDetails::equal

    automatically derived

    RequestBodyTooLargeAfterDecodingErrorDetails::not_equal

    automatically derived

    RequestBodyTooLargeAfterDecodingErrorDetails::to_json

    Encodes this value as JSON.

    RequestBodyTooLargeAfterDecodingErrorDetails::to_repr

    automatically derived

    RequestBrowserStateBlock

    The caller's browser state after a browser toolset member call — the full inventory of open tabs, which tab is active, and any side effects (tabs opened, download state changes) the call produced. At most one per tool_result, only on a non-error result answering a browser toolset member tool_use. The server renders the model-visible text from it; the model never sees the raw fields.

    RequestBrowserStateBlock::equal

    automatically derived

    RequestBrowserStateBlock::new

    Creates a RequestBrowserStateBlock with omitted optional fields absent.

    RequestBrowserStateBlock::not_equal

    automatically derived

    RequestBrowserStateBlock::to_json

    Encodes this value as JSON.

    RequestBrowserStateBlock::to_repr

    automatically derived

    RequestBrowserStateBlockCacheControl

    pub(all) enum RequestBrowserStateBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestBrowserStateBlockCacheControl::equal

    automatically derived

    RequestBrowserStateBlockCacheControl::not_equal

    automatically derived

    RequestBrowserStateBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestBrowserStateBlockCacheControl::to_repr

    automatically derived

    RequestBrowserStateBlockStateChangesItem

    pub(all) enum RequestBrowserStateBlockStateChangesItem {
    DownloadCompleted(BrowserStateChangeDownloadCompleted)
    DownloadFailed(BrowserStateChangeDownloadFailed)
    DownloadStarted(BrowserStateChangeDownloadStarted)
    TabOpened(BrowserStateChangeTabOpened)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestBrowserStateBlockStateChangesItem.

    RequestBrowserStateBlockStateChangesItem::equal

    automatically derived

    RequestBrowserStateBlockStateChangesItem::not_equal

    automatically derived

    RequestBrowserStateBlockStateChangesItem::to_json

    Encodes this tagged union as JSON.

    RequestBrowserStateBlockStateChangesItem::to_repr

    automatically derived

    RequestCharLocationCitation

    pub(all) struct RequestCharLocationCitation {
    cited_text : String
    document_index : Int
    document_title : String?
    end_char_index : Int
    start_char_index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestCharLocationCitation.

    RequestCharLocationCitation::equal

    automatically derived

    RequestCharLocationCitation::new

    fn RequestCharLocationCitation::new(cited_text~ : String, document_index~ : Int, end_char_index~ : Int, start_char_index~ : Int, type_~ : String, document_title? : String) -> RequestCharLocationCitation

    Creates a RequestCharLocationCitation with omitted optional fields absent.

    RequestCharLocationCitation::not_equal

    automatically derived

    RequestCharLocationCitation::to_json

    Encodes this value as JSON.

    RequestCharLocationCitation::to_repr

    automatically derived

    RequestCitationsConfig

    pub(all) struct RequestCitationsConfig {
    enabled : Bool?
    } derive(Eq,
    Debug
    )

    Generated representation of RequestCitationsConfig.

    RequestCitationsConfig::equal

    automatically derived

    RequestCitationsConfig::new

    Creates a RequestCitationsConfig with omitted optional fields absent.

    RequestCitationsConfig::not_equal

    automatically derived

    RequestCitationsConfig::to_json

    Encodes this value as JSON.

    RequestCitationsConfig::to_repr

    automatically derived

    RequestCodeExecutionOutputBlock

    pub(all) struct RequestCodeExecutionOutputBlock {
    file_id : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestCodeExecutionOutputBlock.

    RequestCodeExecutionOutputBlock::equal

    automatically derived

    RequestCodeExecutionOutputBlock::new

    Creates a RequestCodeExecutionOutputBlock with omitted optional fields absent.

    RequestCodeExecutionOutputBlock::not_equal

    automatically derived

    RequestCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    RequestCodeExecutionOutputBlock::to_repr

    automatically derived

    RequestCodeExecutionResultBlock

    pub(all) struct RequestCodeExecutionResultBlock {
    content : Array[RequestCodeExecutionOutputBlock]
    return_code : Int
    stderr : String
    stdout : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestCodeExecutionResultBlock.

    RequestCodeExecutionResultBlock::equal

    automatically derived

    RequestCodeExecutionResultBlock::new

    fn RequestCodeExecutionResultBlock::new(content~ : Array[RequestCodeExecutionOutputBlock], return_code~ : Int, stderr~ : String, stdout~ : String, type_~ : String) -> RequestCodeExecutionResultBlock

    Creates a RequestCodeExecutionResultBlock with omitted optional fields absent.

    RequestCodeExecutionResultBlock::not_equal

    automatically derived

    RequestCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    RequestCodeExecutionResultBlock::to_repr

    automatically derived

    RequestCodeExecutionToolResultBlock

    pub(all) struct RequestCodeExecutionToolResultBlock {
    cache_control :
    Presence
    [RequestCodeExecutionToolResultBlockCacheControl]
    content : RequestCodeExecutionToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestCodeExecutionToolResultBlock.

    RequestCodeExecutionToolResultBlock::equal

    automatically derived

    RequestCodeExecutionToolResultBlock::new

    Creates a RequestCodeExecutionToolResultBlock with omitted optional fields absent.

    RequestCodeExecutionToolResultBlock::not_equal

    automatically derived

    RequestCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    RequestCodeExecutionToolResultBlock::to_repr

    automatically derived

    RequestCodeExecutionToolResultBlockCacheControl

    pub(all) enum RequestCodeExecutionToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestCodeExecutionToolResultBlockCacheControl::equal

    automatically derived

    RequestCodeExecutionToolResultBlockCacheControl::not_equal

    automatically derived

    RequestCodeExecutionToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestCodeExecutionToolResultBlockCacheControl::to_repr

    automatically derived

    RequestCodeExecutionToolResultBlockContent

    pub(all) enum RequestCodeExecutionToolResultBlockContent {
    CodeExecutionToolResultError(RequestCodeExecutionToolResultError)
    CodeExecutionResult(RequestCodeExecutionResultBlock)
    EncryptedCodeExecutionResult(RequestEncryptedCodeExecutionResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestCodeExecutionToolResultBlockContent.

    RequestCodeExecutionToolResultBlockContent::equal

    automatically derived

    RequestCodeExecutionToolResultBlockContent::not_equal

    automatically derived

    RequestCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestCodeExecutionToolResultBlockContent::to_repr

    automatically derived

    RequestCodeExecutionToolResultError

    pub(all) struct RequestCodeExecutionToolResultError {
    error_code : CodeExecutionToolResultErrorCode
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestCodeExecutionToolResultError.

    RequestCodeExecutionToolResultError::equal

    automatically derived

    RequestCodeExecutionToolResultError::new

    Creates a RequestCodeExecutionToolResultError with omitted optional fields absent.

    RequestCodeExecutionToolResultError::not_equal

    automatically derived

    RequestCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    RequestCodeExecutionToolResultError::to_repr

    automatically derived

    RequestContainerUploadBlock

    pub(all) struct RequestContainerUploadBlock {
    cache_control :
    Presence
    [RequestContainerUploadBlockCacheControl]
    file_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

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

    RequestContainerUploadBlock::equal

    automatically derived

    RequestContainerUploadBlock::new

    fn RequestContainerUploadBlock::new(file_id~ : String, type_~ : String, cache_control? : RequestContainerUploadBlockCacheControl) -> RequestContainerUploadBlock

    Creates a RequestContainerUploadBlock with omitted optional fields absent.

    RequestContainerUploadBlock::not_equal

    automatically derived

    RequestContainerUploadBlock::to_json

    Encodes this value as JSON.

    RequestContainerUploadBlock::to_repr

    automatically derived

    RequestContainerUploadBlockCacheControl

    pub(all) enum RequestContainerUploadBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestContainerUploadBlockCacheControl::equal

    automatically derived

    RequestContainerUploadBlockCacheControl::not_equal

    automatically derived

    RequestContainerUploadBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestContainerUploadBlockCacheControl::to_repr

    automatically derived

    RequestContentBlockLocationCitation

    pub(all) struct RequestContentBlockLocationCitation {
    cited_text : String
    document_index : Int
    document_title : String?
    end_block_index : Int
    start_block_index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestContentBlockLocationCitation.

    RequestContentBlockLocationCitation::equal

    automatically derived

    RequestContentBlockLocationCitation::new

    fn RequestContentBlockLocationCitation::new(cited_text~ : String, document_index~ : Int, end_block_index~ : Int, start_block_index~ : Int, type_~ : String, document_title? : String) -> RequestContentBlockLocationCitation

    Creates a RequestContentBlockLocationCitation with omitted optional fields absent.

    RequestContentBlockLocationCitation::not_equal

    automatically derived

    RequestContentBlockLocationCitation::to_json

    Encodes this value as JSON.

    RequestContentBlockLocationCitation::to_repr

    automatically derived

    RequestDocumentBlock

    Generated representation of RequestDocumentBlock.

    RequestDocumentBlock::equal

    automatically derived

    RequestDocumentBlock::new

    fn RequestDocumentBlock::new(source~ : RequestDocumentBlockSource, type_~ : String, cache_control? : RequestDocumentBlockCacheControl, citations? : RequestCitationsConfig, context? : String, title? : String) -> RequestDocumentBlock

    Creates a RequestDocumentBlock with omitted optional fields absent.

    RequestDocumentBlock::not_equal

    automatically derived

    RequestDocumentBlock::to_json

    Encodes this value as JSON.

    RequestDocumentBlock::to_repr

    automatically derived

    RequestDocumentBlockCacheControl

    pub(all) enum RequestDocumentBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestDocumentBlockCacheControl::equal

    automatically derived

    RequestDocumentBlockCacheControl::not_equal

    automatically derived

    RequestDocumentBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestDocumentBlockCacheControl::to_repr

    automatically derived

    RequestDocumentBlockSource

    pub(all) enum RequestDocumentBlockSource {
    Base64(Base64PDFSource)
    Content(ContentBlockSource)
    File(FileDocumentSource)
    Text(PlainTextSource)
    Url(URLPDFSource)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestDocumentBlockSource.

    RequestDocumentBlockSource::equal

    automatically derived

    RequestDocumentBlockSource::not_equal

    automatically derived

    RequestDocumentBlockSource::to_json

    Encodes this tagged union as JSON.

    RequestDocumentBlockSource::to_repr

    automatically derived

    RequestEncryptedCodeExecutionResultBlock

    pub(all) struct RequestEncryptedCodeExecutionResultBlock {
    content : Array[RequestCodeExecutionOutputBlock]
    encrypted_stdout : String
    return_code : Int
    stderr : String
    type_ : String
    } derive(Eq,
    Debug
    )

    The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.

    RequestEncryptedCodeExecutionResultBlock::equal

    automatically derived

    RequestEncryptedCodeExecutionResultBlock::new

    fn RequestEncryptedCodeExecutionResultBlock::new(content~ : Array[RequestCodeExecutionOutputBlock], encrypted_stdout~ : String, return_code~ : Int, stderr~ : String, type_~ : String) -> RequestEncryptedCodeExecutionResultBlock

    Creates a RequestEncryptedCodeExecutionResultBlock with omitted optional fields absent.

    RequestEncryptedCodeExecutionResultBlock::not_equal

    automatically derived

    RequestEncryptedCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    RequestEncryptedCodeExecutionResultBlock::to_repr

    automatically derived

    RequestImageBlock

    Generated representation of RequestImageBlock.

    RequestImageBlock::equal

    automatically derived

    RequestImageBlock::new

    fn RequestImageBlock::new(source~ : RequestImageBlockSource, type_~ : String, cache_control? : RequestImageBlockCacheControl, transformations? : RequestImageTransformations) -> RequestImageBlock

    Creates a RequestImageBlock with omitted optional fields absent.

    RequestImageBlock::not_equal

    fn RequestImageBlock::not_equal(x : RequestImageBlock, y : RequestImageBlock) -> Bool
    automatically derived

    RequestImageBlock::to_json

    Encodes this value as JSON.

    RequestImageBlock::to_repr

    automatically derived

    RequestImageBlockCacheControl

    pub(all) enum RequestImageBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestImageBlockCacheControl::equal

    automatically derived

    RequestImageBlockCacheControl::not_equal

    automatically derived

    RequestImageBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestImageBlockCacheControl::to_repr

    automatically derived

    RequestImageBlockSource

    pub(all) enum RequestImageBlockSource {
    Base64(Base64ImageSource)
    File(FileImageSource)
    Url(URLImageSource)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestImageBlockSource.

    RequestImageBlockSource::equal

    automatically derived

    RequestImageBlockSource::not_equal

    automatically derived

    RequestImageBlockSource::to_json

    Encodes this tagged union as JSON.

    RequestImageBlockSource::to_repr

    automatically derived

    RequestImageTransformations

    pub(all) struct RequestImageTransformations {
    oversized_image : RequestImageTransformationsOversizedImage?
    } derive(Eq,
    Debug
    )

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

    RequestImageTransformations::equal

    automatically derived

    RequestImageTransformations::new

    Creates a RequestImageTransformations with omitted optional fields absent.

    RequestImageTransformations::not_equal

    automatically derived

    RequestImageTransformations::to_json

    Encodes this value as JSON.

    RequestImageTransformations::to_repr

    automatically derived

    RequestImageTransformationsOversizedImage

    pub(all) enum RequestImageTransformationsOversizedImage {
    Downsize
    Error
    Custom(String)
    } derive(Eq,
    Debug
    )

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

    RequestImageTransformationsOversizedImage::equal

    automatically derived

    RequestImageTransformationsOversizedImage::not_equal

    automatically derived

    RequestImageTransformationsOversizedImage::to_json

    Encodes this string enum as JSON.

    RequestImageTransformationsOversizedImage::to_repr

    automatically derived

    RequestPageLocationCitation

    pub(all) struct RequestPageLocationCitation {
    cited_text : String
    document_index : Int
    document_title : String?
    end_page_number : Int
    start_page_number : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestPageLocationCitation.

    RequestPageLocationCitation::equal

    automatically derived

    RequestPageLocationCitation::new

    fn RequestPageLocationCitation::new(cited_text~ : String, document_index~ : Int, end_page_number~ : Int, start_page_number~ : Int, type_~ : String, document_title? : String) -> RequestPageLocationCitation

    Creates a RequestPageLocationCitation with omitted optional fields absent.

    RequestPageLocationCitation::not_equal

    automatically derived

    RequestPageLocationCitation::to_json

    Encodes this value as JSON.

    RequestPageLocationCitation::to_repr

    automatically derived

    RequestRedactedThinkingBlock

    pub(all) struct RequestRedactedThinkingBlock {
    data : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestRedactedThinkingBlock.

    RequestRedactedThinkingBlock::equal

    automatically derived

    RequestRedactedThinkingBlock::new

    fn RequestRedactedThinkingBlock::new(data~ : String, type_~ : String) -> RequestRedactedThinkingBlock

    Creates a RequestRedactedThinkingBlock with omitted optional fields absent.

    RequestRedactedThinkingBlock::not_equal

    automatically derived

    RequestRedactedThinkingBlock::to_json

    Encodes this value as JSON.

    RequestRedactedThinkingBlock::to_repr

    automatically derived

    RequestSearchResultBlock

    pub(all) struct RequestSearchResultBlock {
    cache_control :
    Presence
    [RequestSearchResultBlockCacheControl]
    citations : RequestCitationsConfig?
    content : Array[RequestTextBlock]
    source : String
    title : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestSearchResultBlock.

    RequestSearchResultBlock::equal

    automatically derived

    RequestSearchResultBlock::new

    fn RequestSearchResultBlock::new(content~ : Array[RequestTextBlock], source~ : String, title~ : String, type_~ : String, cache_control? : RequestSearchResultBlockCacheControl, citations? : RequestCitationsConfig) -> RequestSearchResultBlock

    Creates a RequestSearchResultBlock with omitted optional fields absent.

    RequestSearchResultBlock::not_equal

    automatically derived

    RequestSearchResultBlock::to_json

    Encodes this value as JSON.

    RequestSearchResultBlock::to_repr

    automatically derived

    RequestSearchResultBlockCacheControl

    pub(all) enum RequestSearchResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestSearchResultBlockCacheControl::equal

    automatically derived

    RequestSearchResultBlockCacheControl::not_equal

    automatically derived

    RequestSearchResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestSearchResultBlockCacheControl::to_repr

    automatically derived

    RequestSearchResultLocationCitation

    pub(all) struct RequestSearchResultLocationCitation {
    cited_text : String
    end_block_index : Int
    search_result_index : Int
    source : String
    start_block_index : Int
    title : String?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestSearchResultLocationCitation.

    RequestSearchResultLocationCitation::equal

    automatically derived

    RequestSearchResultLocationCitation::new

    fn RequestSearchResultLocationCitation::new(cited_text~ : String, end_block_index~ : Int, search_result_index~ : Int, source~ : String, start_block_index~ : Int, type_~ : String, title? : String) -> RequestSearchResultLocationCitation

    Creates a RequestSearchResultLocationCitation with omitted optional fields absent.

    RequestSearchResultLocationCitation::not_equal

    automatically derived

    RequestSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    RequestSearchResultLocationCitation::to_repr

    automatically derived

    RequestServerToolUseBlock

    Generated representation of RequestServerToolUseBlock.

    RequestServerToolUseBlock::equal

    automatically derived

    RequestServerToolUseBlock::new

    Creates a RequestServerToolUseBlock with omitted optional fields absent.

    RequestServerToolUseBlock::not_equal

    automatically derived

    RequestServerToolUseBlock::to_json

    Encodes this value as JSON.

    RequestServerToolUseBlock::to_repr

    automatically derived

    RequestServerToolUseBlockCacheControl

    pub(all) enum RequestServerToolUseBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestServerToolUseBlockCacheControl::equal

    automatically derived

    RequestServerToolUseBlockCacheControl::not_equal

    automatically derived

    RequestServerToolUseBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestServerToolUseBlockCacheControl::to_repr

    automatically derived

    RequestServerToolUseBlockCaller

    pub(all) enum RequestServerToolUseBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestServerToolUseBlockCaller.

    RequestServerToolUseBlockCaller::equal

    automatically derived

    RequestServerToolUseBlockCaller::not_equal

    automatically derived

    RequestServerToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestServerToolUseBlockCaller::to_repr

    automatically derived

    RequestServerToolUseBlockName

    pub(all) enum RequestServerToolUseBlockName {
    WebSearch
    WebFetch
    CodeExecution
    BashCodeExecution
    TextEditorCodeExecution
    ToolSearchToolRegex
    ToolSearchToolBm25
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum RequestServerToolUseBlockName.

    RequestServerToolUseBlockName::equal

    automatically derived

    RequestServerToolUseBlockName::not_equal

    automatically derived

    RequestServerToolUseBlockName::to_json

    Encodes this string enum as JSON.

    RequestServerToolUseBlockName::to_repr

    automatically derived

    RequestTextBlock

    Generated representation of RequestTextBlock.

    RequestTextBlock::equal

    automatically derived

    RequestTextBlock::new

    fn RequestTextBlock::new(text~ : String, type_~ : String, cache_control? : RequestTextBlockCacheControl, citations? : Array[RequestTextBlockCitationsItem]) -> RequestTextBlock

    Creates a RequestTextBlock with omitted optional fields absent.

    RequestTextBlock::not_equal

    fn RequestTextBlock::not_equal(x : RequestTextBlock, y : RequestTextBlock) -> Bool
    automatically derived

    RequestTextBlock::to_json

    Encodes this value as JSON.

    RequestTextBlock::to_repr

    automatically derived

    RequestTextBlockCacheControl

    pub(all) enum RequestTextBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestTextBlockCacheControl::equal

    automatically derived

    RequestTextBlockCacheControl::not_equal

    automatically derived

    RequestTextBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestTextBlockCacheControl::to_repr

    automatically derived

    RequestTextBlockCitationsItem

    pub(all) enum RequestTextBlockCitationsItem {
    CharLocation(RequestCharLocationCitation)
    ContentBlockLocation(RequestContentBlockLocationCitation)
    PageLocation(RequestPageLocationCitation)
    SearchResultLocation(RequestSearchResultLocationCitation)
    WebSearchResultLocation(RequestWebSearchResultLocationCitation)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestTextBlockCitationsItem.

    RequestTextBlockCitationsItem::equal

    automatically derived

    RequestTextBlockCitationsItem::not_equal

    automatically derived

    RequestTextBlockCitationsItem::to_json

    Encodes this tagged union as JSON.

    RequestTextBlockCitationsItem::to_repr

    automatically derived

    RequestTextEditorCodeExecutionCreateResultBlock

    pub(all) struct RequestTextEditorCodeExecutionCreateResultBlock {
    is_file_update : Bool
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestTextEditorCodeExecutionCreateResultBlock.

    RequestTextEditorCodeExecutionCreateResultBlock::equal

    automatically derived

    RequestTextEditorCodeExecutionCreateResultBlock::new

    Creates a RequestTextEditorCodeExecutionCreateResultBlock with omitted optional fields absent.

    RequestTextEditorCodeExecutionCreateResultBlock::not_equal

    automatically derived

    RequestTextEditorCodeExecutionCreateResultBlock::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionCreateResultBlock::to_repr

    automatically derived

    RequestTextEditorCodeExecutionStrReplaceResultBlock

    pub(all) struct RequestTextEditorCodeExecutionStrReplaceResultBlock {
    lines :
    Presence
    [Array[String]]
    new_lines :
    Presence
    [Int]
    new_start :
    Presence
    [Int]
    old_lines :
    Presence
    [Int]
    old_start :
    Presence
    [Int]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestTextEditorCodeExecutionStrReplaceResultBlock.

    RequestTextEditorCodeExecutionStrReplaceResultBlock::new

    fn RequestTextEditorCodeExecutionStrReplaceResultBlock::new(type_~ : String, lines? : Array[String], new_lines? : Int, new_start? : Int, old_lines? : Int, old_start? : Int) -> RequestTextEditorCodeExecutionStrReplaceResultBlock

    Creates a RequestTextEditorCodeExecutionStrReplaceResultBlock with omitted optional fields absent.

    RequestTextEditorCodeExecutionStrReplaceResultBlock::not_equal

    automatically derived

    RequestTextEditorCodeExecutionStrReplaceResultBlock::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionStrReplaceResultBlock::to_repr

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlock

    pub(all) struct RequestTextEditorCodeExecutionToolResultBlock {
    cache_control :
    Presence
    [RequestTextEditorCodeExecutionToolResultBlockCacheControl]
    content : RequestTextEditorCodeExecutionToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestTextEditorCodeExecutionToolResultBlock.

    RequestTextEditorCodeExecutionToolResultBlock::equal

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlock::new

    Creates a RequestTextEditorCodeExecutionToolResultBlock with omitted optional fields absent.

    RequestTextEditorCodeExecutionToolResultBlock::not_equal

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionToolResultBlock::to_repr

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlockCacheControl

    pub(all) enum RequestTextEditorCodeExecutionToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestTextEditorCodeExecutionToolResultBlockCacheControl::not_equal

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestTextEditorCodeExecutionToolResultBlockCacheControl::to_repr

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlockContent

    pub(all) enum RequestTextEditorCodeExecutionToolResultBlockContent {
    TextEditorCodeExecutionToolResultError(RequestTextEditorCodeExecutionToolResultError)
    TextEditorCodeExecutionViewResult(RequestTextEditorCodeExecutionViewResultBlock)
    TextEditorCodeExecutionCreateResult(RequestTextEditorCodeExecutionCreateResultBlock)
    TextEditorCodeExecutionStrReplaceResult(RequestTextEditorCodeExecutionStrReplaceResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestTextEditorCodeExecutionToolResultBlockContent.

    RequestTextEditorCodeExecutionToolResultBlockContent::not_equal

    automatically derived

    RequestTextEditorCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestTextEditorCodeExecutionToolResultBlockContent::to_repr

    automatically derived

    RequestTextEditorCodeExecutionToolResultError

    pub(all) struct RequestTextEditorCodeExecutionToolResultError {
    error_code : TextEditorCodeExecutionToolResultErrorCode
    error_message :
    Presence
    [String]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestTextEditorCodeExecutionToolResultError.

    RequestTextEditorCodeExecutionToolResultError::equal

    automatically derived

    RequestTextEditorCodeExecutionToolResultError::new

    Creates a RequestTextEditorCodeExecutionToolResultError with omitted optional fields absent.

    RequestTextEditorCodeExecutionToolResultError::not_equal

    automatically derived

    RequestTextEditorCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionToolResultError::to_repr

    automatically derived

    RequestTextEditorCodeExecutionViewResultBlock

    pub(all) struct RequestTextEditorCodeExecutionViewResultBlock {
    content : String
    file_type : RequestTextEditorCodeExecutionViewResultBlockFileType
    num_lines :
    Presence
    [Int]
    start_line :
    Presence
    [Int]
    total_lines :
    Presence
    [Int]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestTextEditorCodeExecutionViewResultBlock.

    RequestTextEditorCodeExecutionViewResultBlock::equal

    automatically derived

    RequestTextEditorCodeExecutionViewResultBlock::new

    fn RequestTextEditorCodeExecutionViewResultBlock::new(content~ : String, file_type~ : RequestTextEditorCodeExecutionViewResultBlockFileType, type_~ : String, num_lines? : Int, start_line? : Int, total_lines? : Int) -> RequestTextEditorCodeExecutionViewResultBlock

    Creates a RequestTextEditorCodeExecutionViewResultBlock with omitted optional fields absent.

    RequestTextEditorCodeExecutionViewResultBlock::not_equal

    automatically derived

    RequestTextEditorCodeExecutionViewResultBlock::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionViewResultBlock::to_repr

    automatically derived

    RequestTextEditorCodeExecutionViewResultBlockFileType

    pub(all) enum RequestTextEditorCodeExecutionViewResultBlockFileType {
    Text
    Image
    Pdf
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum RequestTextEditorCodeExecutionViewResultBlockFileType.

    RequestTextEditorCodeExecutionViewResultBlockFileType::not_equal

    automatically derived

    RequestTextEditorCodeExecutionViewResultBlockFileType::to_json

    Encodes this string enum as JSON.

    RequestTextEditorCodeExecutionViewResultBlockFileType::to_repr

    automatically derived

    RequestThinkingBlock

    pub(all) struct RequestThinkingBlock {
    signature : String
    thinking : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestThinkingBlock.

    RequestThinkingBlock::equal

    automatically derived

    RequestThinkingBlock::new

    fn RequestThinkingBlock::new(signature~ : String, thinking~ : String, type_~ : String) -> RequestThinkingBlock

    Creates a RequestThinkingBlock with omitted optional fields absent.

    RequestThinkingBlock::not_equal

    automatically derived

    RequestThinkingBlock::to_json

    Encodes this value as JSON.

    RequestThinkingBlock::to_repr

    automatically derived

    RequestToolReferenceBlock

    pub(all) struct RequestToolReferenceBlock {
    cache_control :
    Presence
    [RequestToolReferenceBlockCacheControl]
    tool_name : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Tool reference block that can be included in tool_result content.

    RequestToolReferenceBlock::equal

    automatically derived

    RequestToolReferenceBlock::new

    fn RequestToolReferenceBlock::new(tool_name~ : String, type_~ : String, cache_control? : RequestToolReferenceBlockCacheControl) -> RequestToolReferenceBlock

    Creates a RequestToolReferenceBlock with omitted optional fields absent.

    RequestToolReferenceBlock::not_equal

    automatically derived

    RequestToolReferenceBlock::to_json

    Encodes this value as JSON.

    RequestToolReferenceBlock::to_repr

    automatically derived

    RequestToolReferenceBlockCacheControl

    pub(all) enum RequestToolReferenceBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestToolReferenceBlockCacheControl::equal

    automatically derived

    RequestToolReferenceBlockCacheControl::not_equal

    automatically derived

    RequestToolReferenceBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolReferenceBlockCacheControl::to_repr

    automatically derived

    RequestToolResultBlock

    pub(all) struct RequestToolResultBlock {
    cache_control :
    Presence
    [RequestToolResultBlockCacheControl]
    content : RequestToolResultBlockContent?
    is_error : Bool?
    tool_use_id : String
    toolset_name :
    Presence
    [String]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestToolResultBlock.

    RequestToolResultBlock::equal

    automatically derived

    RequestToolResultBlock::new

    fn RequestToolResultBlock::new(tool_use_id~ : String, type_~ : String, cache_control? : RequestToolResultBlockCacheControl, content? : RequestToolResultBlockContent, is_error? : Bool, toolset_name? : String) -> RequestToolResultBlock

    Creates a RequestToolResultBlock with omitted optional fields absent.

    RequestToolResultBlock::not_equal

    automatically derived

    RequestToolResultBlock::to_json

    Encodes this value as JSON.

    RequestToolResultBlock::to_repr

    automatically derived

    RequestToolResultBlockCacheControl

    pub(all) enum RequestToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestToolResultBlockCacheControl::equal

    automatically derived

    RequestToolResultBlockCacheControl::not_equal

    automatically derived

    RequestToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolResultBlockCacheControl::to_repr

    automatically derived

    RequestToolResultBlockContent

    pub(all) enum RequestToolResultBlockContent {
    Text(String)
    ValueArray(Array[RequestToolResultBlockContentValueArrayItem])
    } derive(Eq,
    Debug
    )

    Generated untagged union RequestToolResultBlockContent.

    RequestToolResultBlockContent::equal

    automatically derived

    RequestToolResultBlockContent::not_equal

    automatically derived

    RequestToolResultBlockContent::to_json

    Encodes this union as JSON.

    RequestToolResultBlockContent::to_repr

    automatically derived

    RequestToolResultBlockContentValueArrayItem

    pub(all) enum RequestToolResultBlockContentValueArrayItem {
    BrowserState(RequestBrowserStateBlock)
    Document(RequestDocumentBlock)
    Image(RequestImageBlock)
    SearchResult(RequestSearchResultBlock)
    Text(RequestTextBlock)
    ToolReference(RequestToolReferenceBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestToolResultBlockContentValueArrayItem.

    RequestToolResultBlockContentValueArrayItem::equal

    automatically derived

    RequestToolResultBlockContentValueArrayItem::not_equal

    automatically derived

    RequestToolResultBlockContentValueArrayItem::to_json

    Encodes this tagged union as JSON.

    RequestToolResultBlockContentValueArrayItem::to_repr

    automatically derived

    RequestToolSearchToolResultBlock

    pub(all) struct RequestToolSearchToolResultBlock {
    cache_control :
    Presence
    [RequestToolSearchToolResultBlockCacheControl]
    content : RequestToolSearchToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestToolSearchToolResultBlock.

    RequestToolSearchToolResultBlock::equal

    automatically derived

    RequestToolSearchToolResultBlock::new

    Creates a RequestToolSearchToolResultBlock with omitted optional fields absent.

    RequestToolSearchToolResultBlock::not_equal

    automatically derived

    RequestToolSearchToolResultBlock::to_json

    Encodes this value as JSON.

    RequestToolSearchToolResultBlock::to_repr

    automatically derived

    RequestToolSearchToolResultBlockCacheControl

    pub(all) enum RequestToolSearchToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestToolSearchToolResultBlockCacheControl::equal

    automatically derived

    RequestToolSearchToolResultBlockCacheControl::not_equal

    automatically derived

    RequestToolSearchToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolSearchToolResultBlockCacheControl::to_repr

    automatically derived

    RequestToolSearchToolResultBlockContent

    pub(all) enum RequestToolSearchToolResultBlockContent {
    ToolSearchToolResultError(RequestToolSearchToolResultError)
    ToolSearchToolSearchResult(RequestToolSearchToolSearchResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestToolSearchToolResultBlockContent.

    RequestToolSearchToolResultBlockContent::equal

    automatically derived

    RequestToolSearchToolResultBlockContent::not_equal

    automatically derived

    RequestToolSearchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestToolSearchToolResultBlockContent::to_repr

    automatically derived

    RequestToolSearchToolResultError

    pub(all) struct RequestToolSearchToolResultError {
    error_code : ToolSearchToolResultErrorCode
    error_message :
    Presence
    [String]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestToolSearchToolResultError.

    RequestToolSearchToolResultError::equal

    automatically derived

    RequestToolSearchToolResultError::new

    fn RequestToolSearchToolResultError::new(error_code~ : ToolSearchToolResultErrorCode, type_~ : String, error_message? : String) -> RequestToolSearchToolResultError

    Creates a RequestToolSearchToolResultError with omitted optional fields absent.

    RequestToolSearchToolResultError::not_equal

    automatically derived

    RequestToolSearchToolResultError::to_json

    Encodes this value as JSON.

    RequestToolSearchToolResultError::to_repr

    automatically derived

    RequestToolSearchToolSearchResultBlock

    pub(all) struct RequestToolSearchToolSearchResultBlock {
    tool_references : Array[RequestToolReferenceBlock]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestToolSearchToolSearchResultBlock.

    RequestToolSearchToolSearchResultBlock::equal

    automatically derived

    RequestToolSearchToolSearchResultBlock::new

    Creates a RequestToolSearchToolSearchResultBlock with omitted optional fields absent.

    RequestToolSearchToolSearchResultBlock::not_equal

    automatically derived

    RequestToolSearchToolSearchResultBlock::to_json

    Encodes this value as JSON.

    RequestToolSearchToolSearchResultBlock::to_repr

    automatically derived

    RequestToolUseBlock

    pub(all) struct RequestToolUseBlock {
    cache_control :
    Presence
    [RequestToolUseBlockCacheControl]
    caller : RequestToolUseBlockCaller?
    id : String
    input :
    Json

    name : String
    toolset_name :
    Presence
    [String]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestToolUseBlock.

    RequestToolUseBlock::equal

    automatically derived

    RequestToolUseBlock::new

    fn RequestToolUseBlock::new(id~ : String, input~ :
    Json
    , name~ : String, type_~ : String, cache_control? : RequestToolUseBlockCacheControl, caller? : RequestToolUseBlockCaller, toolset_name? : String) -> RequestToolUseBlock

    Creates a RequestToolUseBlock with omitted optional fields absent.

    RequestToolUseBlock::not_equal

    automatically derived

    RequestToolUseBlock::to_json

    Encodes this value as JSON.

    RequestToolUseBlock::to_repr

    automatically derived

    RequestToolUseBlockCacheControl

    pub(all) enum RequestToolUseBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestToolUseBlockCacheControl::equal

    automatically derived

    RequestToolUseBlockCacheControl::not_equal

    automatically derived

    RequestToolUseBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolUseBlockCacheControl::to_repr

    automatically derived

    RequestToolUseBlockCaller

    pub(all) enum RequestToolUseBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestToolUseBlockCaller.

    RequestToolUseBlockCaller::equal

    automatically derived

    RequestToolUseBlockCaller::not_equal

    automatically derived

    RequestToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestToolUseBlockCaller::to_repr

    automatically derived

    RequestWebFetchResultBlock

    pub(all) struct RequestWebFetchResultBlock {
    content : RequestDocumentBlock
    retrieved_at :
    Presence
    [String]
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebFetchResultBlock.

    RequestWebFetchResultBlock::equal

    automatically derived

    RequestWebFetchResultBlock::new

    fn RequestWebFetchResultBlock::new(content~ : RequestDocumentBlock, type_~ : String, url~ : String, retrieved_at? : String) -> RequestWebFetchResultBlock

    Creates a RequestWebFetchResultBlock with omitted optional fields absent.

    RequestWebFetchResultBlock::not_equal

    automatically derived

    RequestWebFetchResultBlock::to_json

    Encodes this value as JSON.

    RequestWebFetchResultBlock::to_repr

    automatically derived

    RequestWebFetchToolResultBlock

    pub(all) struct RequestWebFetchToolResultBlock {
    cache_control :
    Presence
    [RequestWebFetchToolResultBlockCacheControl]
    caller : RequestWebFetchToolResultBlockCaller?
    content : RequestWebFetchToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebFetchToolResultBlock.

    RequestWebFetchToolResultBlock::equal

    automatically derived

    RequestWebFetchToolResultBlock::new

    Creates a RequestWebFetchToolResultBlock with omitted optional fields absent.

    RequestWebFetchToolResultBlock::not_equal

    automatically derived

    RequestWebFetchToolResultBlock::to_json

    Encodes this value as JSON.

    RequestWebFetchToolResultBlock::to_repr

    automatically derived

    RequestWebFetchToolResultBlockCacheControl

    pub(all) enum RequestWebFetchToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestWebFetchToolResultBlockCacheControl::equal

    automatically derived

    RequestWebFetchToolResultBlockCacheControl::not_equal

    automatically derived

    RequestWebFetchToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchToolResultBlockCacheControl::to_repr

    automatically derived

    RequestWebFetchToolResultBlockCaller

    pub(all) enum RequestWebFetchToolResultBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestWebFetchToolResultBlockCaller.

    RequestWebFetchToolResultBlockCaller::equal

    automatically derived

    RequestWebFetchToolResultBlockCaller::not_equal

    automatically derived

    RequestWebFetchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchToolResultBlockCaller::to_repr

    automatically derived

    RequestWebFetchToolResultBlockContent

    pub(all) enum RequestWebFetchToolResultBlockContent {
    WebFetchToolResultError(RequestWebFetchToolResultError)
    WebFetchResult(RequestWebFetchResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestWebFetchToolResultBlockContent.

    RequestWebFetchToolResultBlockContent::equal

    automatically derived

    RequestWebFetchToolResultBlockContent::not_equal

    automatically derived

    RequestWebFetchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchToolResultBlockContent::to_repr

    automatically derived

    RequestWebFetchToolResultError

    pub(all) struct RequestWebFetchToolResultError {
    error_code : WebFetchToolResultErrorCode
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebFetchToolResultError.

    RequestWebFetchToolResultError::equal

    automatically derived

    RequestWebFetchToolResultError::new

    Creates a RequestWebFetchToolResultError with omitted optional fields absent.

    RequestWebFetchToolResultError::not_equal

    automatically derived

    RequestWebFetchToolResultError::to_json

    Encodes this value as JSON.

    RequestWebFetchToolResultError::to_repr

    automatically derived

    RequestWebSearchResultBlock

    pub(all) struct RequestWebSearchResultBlock {
    encrypted_content : String
    page_age :
    Presence
    [String]
    title : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebSearchResultBlock.

    RequestWebSearchResultBlock::equal

    automatically derived

    RequestWebSearchResultBlock::new

    fn RequestWebSearchResultBlock::new(encrypted_content~ : String, title~ : String, url~ : String, page_age? : String) -> RequestWebSearchResultBlock

    Creates a RequestWebSearchResultBlock with omitted optional fields absent.

    RequestWebSearchResultBlock::not_equal

    automatically derived

    RequestWebSearchResultBlock::to_json

    Encodes this value as JSON.

    RequestWebSearchResultBlock::to_repr

    automatically derived

    RequestWebSearchResultLocationCitation

    pub(all) struct RequestWebSearchResultLocationCitation {
    cited_text : String
    encrypted_index : String
    title : String?
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebSearchResultLocationCitation.

    RequestWebSearchResultLocationCitation::equal

    automatically derived

    RequestWebSearchResultLocationCitation::new

    fn RequestWebSearchResultLocationCitation::new(cited_text~ : String, encrypted_index~ : String, type_~ : String, url~ : String, title? : String) -> RequestWebSearchResultLocationCitation

    Creates a RequestWebSearchResultLocationCitation with omitted optional fields absent.

    RequestWebSearchResultLocationCitation::not_equal

    automatically derived

    RequestWebSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    RequestWebSearchResultLocationCitation::to_repr

    automatically derived

    RequestWebSearchToolResultBlock

    pub(all) struct RequestWebSearchToolResultBlock {
    cache_control :
    Presence
    [RequestWebSearchToolResultBlockCacheControl]
    caller : RequestWebSearchToolResultBlockCaller?
    content : RequestWebSearchToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebSearchToolResultBlock.

    RequestWebSearchToolResultBlock::equal

    automatically derived

    RequestWebSearchToolResultBlock::new

    Creates a RequestWebSearchToolResultBlock with omitted optional fields absent.

    RequestWebSearchToolResultBlock::not_equal

    automatically derived

    RequestWebSearchToolResultBlock::to_json

    Encodes this value as JSON.

    RequestWebSearchToolResultBlock::to_repr

    automatically derived

    RequestWebSearchToolResultBlockCacheControl

    pub(all) enum RequestWebSearchToolResultBlockCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    RequestWebSearchToolResultBlockCacheControl::equal

    automatically derived

    RequestWebSearchToolResultBlockCacheControl::not_equal

    automatically derived

    RequestWebSearchToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestWebSearchToolResultBlockCacheControl::to_repr

    automatically derived

    RequestWebSearchToolResultBlockCaller

    pub(all) enum RequestWebSearchToolResultBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union RequestWebSearchToolResultBlockCaller.

    RequestWebSearchToolResultBlockCaller::equal

    automatically derived

    RequestWebSearchToolResultBlockCaller::not_equal

    automatically derived

    RequestWebSearchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestWebSearchToolResultBlockCaller::to_repr

    automatically derived

    RequestWebSearchToolResultBlockContent

    pub(all) enum RequestWebSearchToolResultBlockContent {
    RequestWebSearchResultBlockArray(Array[RequestWebSearchResultBlock])
    RequestWebSearchToolResultError(RequestWebSearchToolResultError)
    } derive(Eq,
    Debug
    )

    Generated untagged union RequestWebSearchToolResultBlockContent.

    RequestWebSearchToolResultBlockContent::equal

    automatically derived

    RequestWebSearchToolResultBlockContent::not_equal

    automatically derived

    RequestWebSearchToolResultBlockContent::to_json

    Encodes this union as JSON.

    RequestWebSearchToolResultBlockContent::to_repr

    automatically derived

    RequestWebSearchToolResultError

    pub(all) struct RequestWebSearchToolResultError {
    error_code : WebSearchToolResultErrorCode
    } derive(Eq,
    Debug
    )

    Generated representation of RequestWebSearchToolResultError.

    RequestWebSearchToolResultError::equal

    automatically derived

    RequestWebSearchToolResultError::new

    Creates a RequestWebSearchToolResultError with omitted optional fields absent.

    RequestWebSearchToolResultError::not_equal

    automatically derived

    RequestWebSearchToolResultError::to_json

    Encodes this value as JSON.

    RequestWebSearchToolResultError::to_repr

    automatically derived

    ResponseBashCodeExecutionOutputBlock

    pub(all) struct ResponseBashCodeExecutionOutputBlock {
    file_id : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseBashCodeExecutionOutputBlock.

    ResponseBashCodeExecutionOutputBlock::equal

    automatically derived

    ResponseBashCodeExecutionOutputBlock::new

    Creates a ResponseBashCodeExecutionOutputBlock with omitted optional fields absent.

    ResponseBashCodeExecutionOutputBlock::not_equal

    automatically derived

    ResponseBashCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionOutputBlock::to_repr

    automatically derived

    ResponseBashCodeExecutionResultBlock

    pub(all) struct ResponseBashCodeExecutionResultBlock {
    content : Array[ResponseBashCodeExecutionOutputBlock]
    return_code : Int
    stderr : String
    stdout : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseBashCodeExecutionResultBlock.

    ResponseBashCodeExecutionResultBlock::equal

    automatically derived

    ResponseBashCodeExecutionResultBlock::new

    fn ResponseBashCodeExecutionResultBlock::new(content~ : Array[ResponseBashCodeExecutionOutputBlock], return_code~ : Int, stderr~ : String, stdout~ : String, type_~ : String) -> ResponseBashCodeExecutionResultBlock

    Creates a ResponseBashCodeExecutionResultBlock with omitted optional fields absent.

    ResponseBashCodeExecutionResultBlock::not_equal

    automatically derived

    ResponseBashCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionResultBlock::to_repr

    automatically derived

    ResponseBashCodeExecutionToolResultBlock

    pub(all) struct ResponseBashCodeExecutionToolResultBlock {
    content : ResponseBashCodeExecutionToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseBashCodeExecutionToolResultBlock.

    ResponseBashCodeExecutionToolResultBlock::equal

    automatically derived

    ResponseBashCodeExecutionToolResultBlock::new

    Creates a ResponseBashCodeExecutionToolResultBlock with omitted optional fields absent.

    ResponseBashCodeExecutionToolResultBlock::not_equal

    automatically derived

    ResponseBashCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionToolResultBlock::to_repr

    automatically derived

    ResponseBashCodeExecutionToolResultBlockContent

    pub(all) enum ResponseBashCodeExecutionToolResultBlockContent {
    BashCodeExecutionToolResultError(ResponseBashCodeExecutionToolResultError)
    BashCodeExecutionResult(ResponseBashCodeExecutionResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseBashCodeExecutionToolResultBlockContent.

    ResponseBashCodeExecutionToolResultBlockContent::equal

    automatically derived

    ResponseBashCodeExecutionToolResultBlockContent::not_equal

    automatically derived

    ResponseBashCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseBashCodeExecutionToolResultBlockContent::to_repr

    automatically derived

    ResponseBashCodeExecutionToolResultError

    pub(all) struct ResponseBashCodeExecutionToolResultError {
    error_code : BashCodeExecutionToolResultErrorCode
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseBashCodeExecutionToolResultError.

    ResponseBashCodeExecutionToolResultError::equal

    automatically derived

    ResponseBashCodeExecutionToolResultError::new

    Creates a ResponseBashCodeExecutionToolResultError with omitted optional fields absent.

    ResponseBashCodeExecutionToolResultError::not_equal

    automatically derived

    ResponseBashCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionToolResultError::to_repr

    automatically derived

    ResponseCharLocationCitation

    pub(all) struct ResponseCharLocationCitation {
    cited_text : String
    document_index : Int
    document_title : String?
    end_char_index : Int
    file_id : String?
    start_char_index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseCharLocationCitation.

    ResponseCharLocationCitation::equal

    automatically derived

    ResponseCharLocationCitation::new

    fn ResponseCharLocationCitation::new(cited_text~ : String, document_index~ : Int, end_char_index~ : Int, start_char_index~ : Int, type_~ : String, document_title? : String, file_id? : String) -> ResponseCharLocationCitation

    Creates a ResponseCharLocationCitation with omitted optional fields absent.

    ResponseCharLocationCitation::not_equal

    automatically derived

    ResponseCharLocationCitation::to_json

    Encodes this value as JSON.

    ResponseCharLocationCitation::to_repr

    automatically derived

    ResponseCitationsConfig

    pub(all) struct ResponseCitationsConfig {
    enabled : Bool
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseCitationsConfig.

    ResponseCitationsConfig::equal

    automatically derived

    ResponseCitationsConfig::new

    Creates a ResponseCitationsConfig with omitted optional fields absent.

    ResponseCitationsConfig::not_equal

    automatically derived

    ResponseCitationsConfig::to_json

    Encodes this value as JSON.

    ResponseCitationsConfig::to_repr

    automatically derived

    ResponseCodeExecutionOutputBlock

    pub(all) struct ResponseCodeExecutionOutputBlock {
    file_id : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseCodeExecutionOutputBlock.

    ResponseCodeExecutionOutputBlock::equal

    automatically derived

    ResponseCodeExecutionOutputBlock::new

    Creates a ResponseCodeExecutionOutputBlock with omitted optional fields absent.

    ResponseCodeExecutionOutputBlock::not_equal

    automatically derived

    ResponseCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionOutputBlock::to_repr

    automatically derived

    ResponseCodeExecutionResultBlock

    pub(all) struct ResponseCodeExecutionResultBlock {
    content : Array[ResponseCodeExecutionOutputBlock]
    return_code : Int
    stderr : String
    stdout : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseCodeExecutionResultBlock.

    ResponseCodeExecutionResultBlock::equal

    automatically derived

    ResponseCodeExecutionResultBlock::new

    fn ResponseCodeExecutionResultBlock::new(content~ : Array[ResponseCodeExecutionOutputBlock], return_code~ : Int, stderr~ : String, stdout~ : String, type_~ : String) -> ResponseCodeExecutionResultBlock

    Creates a ResponseCodeExecutionResultBlock with omitted optional fields absent.

    ResponseCodeExecutionResultBlock::not_equal

    automatically derived

    ResponseCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionResultBlock::to_repr

    automatically derived

    ResponseCodeExecutionToolResultBlock

    pub(all) struct ResponseCodeExecutionToolResultBlock {
    content : ResponseCodeExecutionToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseCodeExecutionToolResultBlock.

    ResponseCodeExecutionToolResultBlock::equal

    automatically derived

    ResponseCodeExecutionToolResultBlock::new

    Creates a ResponseCodeExecutionToolResultBlock with omitted optional fields absent.

    ResponseCodeExecutionToolResultBlock::not_equal

    automatically derived

    ResponseCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionToolResultBlock::to_repr

    automatically derived

    ResponseCodeExecutionToolResultBlockContent

    pub(all) enum ResponseCodeExecutionToolResultBlockContent {
    CodeExecutionToolResultError(ResponseCodeExecutionToolResultError)
    CodeExecutionResult(ResponseCodeExecutionResultBlock)
    EncryptedCodeExecutionResult(ResponseEncryptedCodeExecutionResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseCodeExecutionToolResultBlockContent.

    ResponseCodeExecutionToolResultBlockContent::equal

    automatically derived

    ResponseCodeExecutionToolResultBlockContent::not_equal

    automatically derived

    ResponseCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseCodeExecutionToolResultBlockContent::to_repr

    automatically derived

    ResponseCodeExecutionToolResultError

    pub(all) struct ResponseCodeExecutionToolResultError {
    error_code : CodeExecutionToolResultErrorCode
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseCodeExecutionToolResultError.

    ResponseCodeExecutionToolResultError::equal

    automatically derived

    ResponseCodeExecutionToolResultError::new

    Creates a ResponseCodeExecutionToolResultError with omitted optional fields absent.

    ResponseCodeExecutionToolResultError::not_equal

    automatically derived

    ResponseCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionToolResultError::to_repr

    automatically derived

    ResponseContainerUploadBlock

    pub(all) struct ResponseContainerUploadBlock {
    file_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Response model for a file uploaded to the container.

    ResponseContainerUploadBlock::equal

    automatically derived

    ResponseContainerUploadBlock::new

    fn ResponseContainerUploadBlock::new(file_id~ : String, type_~ : String) -> ResponseContainerUploadBlock

    Creates a ResponseContainerUploadBlock with omitted optional fields absent.

    ResponseContainerUploadBlock::not_equal

    automatically derived

    ResponseContainerUploadBlock::to_json

    Encodes this value as JSON.

    ResponseContainerUploadBlock::to_repr

    automatically derived

    ResponseContentBlockLocationCitation

    pub(all) struct ResponseContentBlockLocationCitation {
    cited_text : String
    document_index : Int
    document_title : String?
    end_block_index : Int
    file_id : String?
    start_block_index : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseContentBlockLocationCitation.

    ResponseContentBlockLocationCitation::equal

    automatically derived

    ResponseContentBlockLocationCitation::new

    fn ResponseContentBlockLocationCitation::new(cited_text~ : String, document_index~ : Int, end_block_index~ : Int, start_block_index~ : Int, type_~ : String, document_title? : String, file_id? : String) -> ResponseContentBlockLocationCitation

    Creates a ResponseContentBlockLocationCitation with omitted optional fields absent.

    ResponseContentBlockLocationCitation::not_equal

    automatically derived

    ResponseContentBlockLocationCitation::to_json

    Encodes this value as JSON.

    ResponseContentBlockLocationCitation::to_repr

    automatically derived

    ResponseDocumentBlock

    pub(all) struct ResponseDocumentBlock {
    citations : ResponseCitationsConfig?
    source : ResponseDocumentBlockSource
    title : String?
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseDocumentBlock.

    ResponseDocumentBlock::equal

    automatically derived

    ResponseDocumentBlock::new

    Creates a ResponseDocumentBlock with omitted optional fields absent.

    ResponseDocumentBlock::not_equal

    automatically derived

    ResponseDocumentBlock::to_json

    Encodes this value as JSON.

    ResponseDocumentBlock::to_repr

    automatically derived

    ResponseDocumentBlockSource

    pub(all) enum ResponseDocumentBlockSource {
    Base64(Base64PDFSource)
    Text(PlainTextSource)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseDocumentBlockSource.

    ResponseDocumentBlockSource::equal

    automatically derived

    ResponseDocumentBlockSource::not_equal

    automatically derived

    ResponseDocumentBlockSource::to_json

    Encodes this tagged union as JSON.

    ResponseDocumentBlockSource::to_repr

    automatically derived

    ResponseEncryptedCodeExecutionResultBlock

    pub(all) struct ResponseEncryptedCodeExecutionResultBlock {
    content : Array[ResponseCodeExecutionOutputBlock]
    encrypted_stdout : String
    return_code : Int
    stderr : String
    type_ : String
    } derive(Eq,
    Debug
    )

    The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form. The API returns this block in place of code_execution_result when the code called the web search tool. See the programmatic tool calling guide to learn more about programmatic tool calling.

    ResponseEncryptedCodeExecutionResultBlock::equal

    automatically derived

    ResponseEncryptedCodeExecutionResultBlock::new

    fn ResponseEncryptedCodeExecutionResultBlock::new(content~ : Array[ResponseCodeExecutionOutputBlock], encrypted_stdout~ : String, return_code~ : Int, stderr~ : String, type_~ : String) -> ResponseEncryptedCodeExecutionResultBlock

    Creates a ResponseEncryptedCodeExecutionResultBlock with omitted optional fields absent.

    ResponseEncryptedCodeExecutionResultBlock::not_equal

    automatically derived

    ResponseEncryptedCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    ResponseEncryptedCodeExecutionResultBlock::to_repr

    automatically derived

    ResponsePageLocationCitation

    pub(all) struct ResponsePageLocationCitation {
    cited_text : String
    document_index : Int
    document_title : String?
    end_page_number : Int
    file_id : String?
    start_page_number : Int
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponsePageLocationCitation.

    ResponsePageLocationCitation::equal

    automatically derived

    ResponsePageLocationCitation::new

    fn ResponsePageLocationCitation::new(cited_text~ : String, document_index~ : Int, end_page_number~ : Int, start_page_number~ : Int, type_~ : String, document_title? : String, file_id? : String) -> ResponsePageLocationCitation

    Creates a ResponsePageLocationCitation with omitted optional fields absent.

    ResponsePageLocationCitation::not_equal

    automatically derived

    ResponsePageLocationCitation::to_json

    Encodes this value as JSON.

    ResponsePageLocationCitation::to_repr

    automatically derived

    ResponseRedactedThinkingBlock

    pub(all) struct ResponseRedactedThinkingBlock {
    data : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseRedactedThinkingBlock.

    ResponseRedactedThinkingBlock::equal

    automatically derived

    ResponseRedactedThinkingBlock::new

    fn ResponseRedactedThinkingBlock::new(data~ : String, type_~ : String) -> ResponseRedactedThinkingBlock

    Creates a ResponseRedactedThinkingBlock with omitted optional fields absent.

    ResponseRedactedThinkingBlock::not_equal

    automatically derived

    ResponseRedactedThinkingBlock::to_json

    Encodes this value as JSON.

    ResponseRedactedThinkingBlock::to_repr

    automatically derived

    ResponseSearchResultLocationCitation

    pub(all) struct ResponseSearchResultLocationCitation {
    cited_text : String
    end_block_index : Int
    search_result_index : Int
    source : String
    start_block_index : Int
    title : String?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseSearchResultLocationCitation.

    ResponseSearchResultLocationCitation::equal

    automatically derived

    ResponseSearchResultLocationCitation::new

    fn ResponseSearchResultLocationCitation::new(cited_text~ : String, end_block_index~ : Int, search_result_index~ : Int, source~ : String, start_block_index~ : Int, type_~ : String, title? : String) -> ResponseSearchResultLocationCitation

    Creates a ResponseSearchResultLocationCitation with omitted optional fields absent.

    ResponseSearchResultLocationCitation::not_equal

    automatically derived

    ResponseSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    ResponseSearchResultLocationCitation::to_repr

    automatically derived

    ResponseServerToolUseBlock

    pub(all) struct ResponseServerToolUseBlock {
    caller : ResponseServerToolUseBlockCaller
    id : String
    input :
    Json

    name : ResponseServerToolUseBlockName
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseServerToolUseBlock.

    ResponseServerToolUseBlock::equal

    automatically derived

    ResponseServerToolUseBlock::new

    Creates a ResponseServerToolUseBlock with omitted optional fields absent.

    ResponseServerToolUseBlock::not_equal

    automatically derived

    ResponseServerToolUseBlock::to_json

    Encodes this value as JSON.

    ResponseServerToolUseBlock::to_repr

    automatically derived

    ResponseServerToolUseBlockCaller

    pub(all) enum ResponseServerToolUseBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseServerToolUseBlockCaller.

    ResponseServerToolUseBlockCaller::equal

    automatically derived

    ResponseServerToolUseBlockCaller::not_equal

    automatically derived

    ResponseServerToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseServerToolUseBlockCaller::to_repr

    automatically derived

    ResponseServerToolUseBlockName

    pub(all) enum ResponseServerToolUseBlockName {
    WebSearch
    WebFetch
    CodeExecution
    BashCodeExecution
    TextEditorCodeExecution
    ToolSearchToolRegex
    ToolSearchToolBm25
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ResponseServerToolUseBlockName.

    ResponseServerToolUseBlockName::equal

    automatically derived

    ResponseServerToolUseBlockName::not_equal

    automatically derived

    ResponseServerToolUseBlockName::to_json

    Encodes this string enum as JSON.

    ResponseServerToolUseBlockName::to_repr

    automatically derived

    ResponseTextBlock

    pub(all) struct ResponseTextBlock {
    citations :
    Presence
    [Array[ResponseTextBlockCitationsItem]]
    text : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseTextBlock.

    ResponseTextBlock::equal

    automatically derived

    ResponseTextBlock::new

    fn ResponseTextBlock::new(text~ : String, type_~ : String, citations? : Array[ResponseTextBlockCitationsItem]) -> ResponseTextBlock

    Creates a ResponseTextBlock with omitted optional fields absent.

    ResponseTextBlock::not_equal

    fn ResponseTextBlock::not_equal(x : ResponseTextBlock, y : ResponseTextBlock) -> Bool
    automatically derived

    ResponseTextBlock::to_json

    Encodes this value as JSON.

    ResponseTextBlock::to_repr

    automatically derived

    ResponseTextBlockCitationsItem

    pub(all) enum ResponseTextBlockCitationsItem {
    CharLocation(ResponseCharLocationCitation)
    ContentBlockLocation(ResponseContentBlockLocationCitation)
    PageLocation(ResponsePageLocationCitation)
    SearchResultLocation(ResponseSearchResultLocationCitation)
    WebSearchResultLocation(ResponseWebSearchResultLocationCitation)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseTextBlockCitationsItem.

    ResponseTextBlockCitationsItem::equal

    automatically derived

    ResponseTextBlockCitationsItem::not_equal

    automatically derived

    ResponseTextBlockCitationsItem::to_json

    Encodes this tagged union as JSON.

    ResponseTextBlockCitationsItem::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionCreateResultBlock

    pub(all) struct ResponseTextEditorCodeExecutionCreateResultBlock {
    is_file_update : Bool
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseTextEditorCodeExecutionCreateResultBlock.

    ResponseTextEditorCodeExecutionCreateResultBlock::new

    Creates a ResponseTextEditorCodeExecutionCreateResultBlock with omitted optional fields absent.

    ResponseTextEditorCodeExecutionCreateResultBlock::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionCreateResultBlock::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionCreateResultBlock::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionStrReplaceResultBlock

    pub(all) struct ResponseTextEditorCodeExecutionStrReplaceResultBlock {
    lines : Array[String]?
    new_lines : Int?
    new_start : Int?
    old_lines : Int?
    old_start : Int?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseTextEditorCodeExecutionStrReplaceResultBlock.

    ResponseTextEditorCodeExecutionStrReplaceResultBlock::new

    fn ResponseTextEditorCodeExecutionStrReplaceResultBlock::new(type_~ : String, lines? : Array[String], new_lines? : Int, new_start? : Int, old_lines? : Int, old_start? : Int) -> ResponseTextEditorCodeExecutionStrReplaceResultBlock

    Creates a ResponseTextEditorCodeExecutionStrReplaceResultBlock with omitted optional fields absent.

    ResponseTextEditorCodeExecutionStrReplaceResultBlock::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionStrReplaceResultBlock::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionStrReplaceResultBlock::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionToolResultBlock

    pub(all) struct ResponseTextEditorCodeExecutionToolResultBlock {
    content : ResponseTextEditorCodeExecutionToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseTextEditorCodeExecutionToolResultBlock.

    ResponseTextEditorCodeExecutionToolResultBlock::equal

    automatically derived

    ResponseTextEditorCodeExecutionToolResultBlock::new

    Creates a ResponseTextEditorCodeExecutionToolResultBlock with omitted optional fields absent.

    ResponseTextEditorCodeExecutionToolResultBlock::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionToolResultBlock::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionToolResultBlockContent

    pub(all) enum ResponseTextEditorCodeExecutionToolResultBlockContent {
    TextEditorCodeExecutionToolResultError(ResponseTextEditorCodeExecutionToolResultError)
    TextEditorCodeExecutionViewResult(ResponseTextEditorCodeExecutionViewResultBlock)
    TextEditorCodeExecutionCreateResult(ResponseTextEditorCodeExecutionCreateResultBlock)
    TextEditorCodeExecutionStrReplaceResult(ResponseTextEditorCodeExecutionStrReplaceResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseTextEditorCodeExecutionToolResultBlockContent.

    ResponseTextEditorCodeExecutionToolResultBlockContent::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseTextEditorCodeExecutionToolResultBlockContent::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionToolResultError

    pub(all) struct ResponseTextEditorCodeExecutionToolResultError {
    error_code : TextEditorCodeExecutionToolResultErrorCode
    error_message : String?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseTextEditorCodeExecutionToolResultError.

    ResponseTextEditorCodeExecutionToolResultError::equal

    automatically derived

    ResponseTextEditorCodeExecutionToolResultError::new

    Creates a ResponseTextEditorCodeExecutionToolResultError with omitted optional fields absent.

    ResponseTextEditorCodeExecutionToolResultError::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionToolResultError::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionViewResultBlock

    pub(all) struct ResponseTextEditorCodeExecutionViewResultBlock {
    content : String
    file_type : ResponseTextEditorCodeExecutionViewResultBlockFileType
    num_lines : Int?
    start_line : Int?
    total_lines : Int?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseTextEditorCodeExecutionViewResultBlock.

    ResponseTextEditorCodeExecutionViewResultBlock::equal

    automatically derived

    ResponseTextEditorCodeExecutionViewResultBlock::new

    fn ResponseTextEditorCodeExecutionViewResultBlock::new(content~ : String, file_type~ : ResponseTextEditorCodeExecutionViewResultBlockFileType, type_~ : String, num_lines? : Int, start_line? : Int, total_lines? : Int) -> ResponseTextEditorCodeExecutionViewResultBlock

    Creates a ResponseTextEditorCodeExecutionViewResultBlock with omitted optional fields absent.

    ResponseTextEditorCodeExecutionViewResultBlock::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionViewResultBlock::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionViewResultBlock::to_repr

    automatically derived

    ResponseTextEditorCodeExecutionViewResultBlockFileType

    pub(all) enum ResponseTextEditorCodeExecutionViewResultBlockFileType {
    Text
    Image
    Pdf
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ResponseTextEditorCodeExecutionViewResultBlockFileType.

    ResponseTextEditorCodeExecutionViewResultBlockFileType::not_equal

    automatically derived

    ResponseTextEditorCodeExecutionViewResultBlockFileType::to_json

    Encodes this string enum as JSON.

    ResponseTextEditorCodeExecutionViewResultBlockFileType::to_repr

    automatically derived

    ResponseThinkingBlock

    pub(all) struct ResponseThinkingBlock {
    signature : String
    thinking : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseThinkingBlock.

    ResponseThinkingBlock::equal

    automatically derived

    ResponseThinkingBlock::new

    fn ResponseThinkingBlock::new(signature~ : String, thinking~ : String, type_~ : String) -> ResponseThinkingBlock

    Creates a ResponseThinkingBlock with omitted optional fields absent.

    ResponseThinkingBlock::not_equal

    automatically derived

    ResponseThinkingBlock::to_json

    Encodes this value as JSON.

    ResponseThinkingBlock::to_repr

    automatically derived

    ResponseToolReferenceBlock

    pub(all) struct ResponseToolReferenceBlock {
    tool_name : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseToolReferenceBlock.

    ResponseToolReferenceBlock::equal

    automatically derived

    ResponseToolReferenceBlock::new

    Creates a ResponseToolReferenceBlock with omitted optional fields absent.

    ResponseToolReferenceBlock::not_equal

    automatically derived

    ResponseToolReferenceBlock::to_json

    Encodes this value as JSON.

    ResponseToolReferenceBlock::to_repr

    automatically derived

    ResponseToolSearchToolResultBlock

    pub(all) struct ResponseToolSearchToolResultBlock {
    content : ResponseToolSearchToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseToolSearchToolResultBlock.

    ResponseToolSearchToolResultBlock::equal

    automatically derived

    ResponseToolSearchToolResultBlock::new

    Creates a ResponseToolSearchToolResultBlock with omitted optional fields absent.

    ResponseToolSearchToolResultBlock::not_equal

    automatically derived

    ResponseToolSearchToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseToolSearchToolResultBlock::to_repr

    automatically derived

    ResponseToolSearchToolResultBlockContent

    pub(all) enum ResponseToolSearchToolResultBlockContent {
    ToolSearchToolResultError(ResponseToolSearchToolResultError)
    ToolSearchToolSearchResult(ResponseToolSearchToolSearchResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseToolSearchToolResultBlockContent.

    ResponseToolSearchToolResultBlockContent::equal

    automatically derived

    ResponseToolSearchToolResultBlockContent::not_equal

    automatically derived

    ResponseToolSearchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseToolSearchToolResultBlockContent::to_repr

    automatically derived

    ResponseToolSearchToolResultError

    pub(all) struct ResponseToolSearchToolResultError {
    error_code : ToolSearchToolResultErrorCode
    error_message : String?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseToolSearchToolResultError.

    ResponseToolSearchToolResultError::equal

    automatically derived

    ResponseToolSearchToolResultError::new

    fn ResponseToolSearchToolResultError::new(error_code~ : ToolSearchToolResultErrorCode, type_~ : String, error_message? : String) -> ResponseToolSearchToolResultError

    Creates a ResponseToolSearchToolResultError with omitted optional fields absent.

    ResponseToolSearchToolResultError::not_equal

    automatically derived

    ResponseToolSearchToolResultError::to_json

    Encodes this value as JSON.

    ResponseToolSearchToolResultError::to_repr

    automatically derived

    ResponseToolSearchToolSearchResultBlock

    pub(all) struct ResponseToolSearchToolSearchResultBlock {
    tool_references : Array[ResponseToolReferenceBlock]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseToolSearchToolSearchResultBlock.

    ResponseToolSearchToolSearchResultBlock::equal

    automatically derived

    ResponseToolSearchToolSearchResultBlock::new

    Creates a ResponseToolSearchToolSearchResultBlock with omitted optional fields absent.

    ResponseToolSearchToolSearchResultBlock::not_equal

    automatically derived

    ResponseToolSearchToolSearchResultBlock::to_json

    Encodes this value as JSON.

    ResponseToolSearchToolSearchResultBlock::to_repr

    automatically derived

    ResponseToolUseBlock

    pub(all) struct ResponseToolUseBlock {
    caller : ResponseToolUseBlockCaller
    id : String
    input :
    Json

    name : String
    toolset_name :
    Presence
    [String]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseToolUseBlock.

    ResponseToolUseBlock::equal

    automatically derived

    ResponseToolUseBlock::new

    fn ResponseToolUseBlock::new(caller~ : ResponseToolUseBlockCaller, id~ : String, input~ :
    Json
    , name~ : String, type_~ : String, toolset_name? : String) -> ResponseToolUseBlock

    Creates a ResponseToolUseBlock with omitted optional fields absent.

    ResponseToolUseBlock::not_equal

    automatically derived

    ResponseToolUseBlock::to_json

    Encodes this value as JSON.

    ResponseToolUseBlock::to_repr

    automatically derived

    ResponseToolUseBlockCaller

    pub(all) enum ResponseToolUseBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseToolUseBlockCaller.

    ResponseToolUseBlockCaller::equal

    automatically derived

    ResponseToolUseBlockCaller::not_equal

    automatically derived

    ResponseToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseToolUseBlockCaller::to_repr

    automatically derived

    ResponseWebFetchResultBlock

    pub(all) struct ResponseWebFetchResultBlock {
    content : ResponseDocumentBlock
    retrieved_at : String?
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebFetchResultBlock.

    ResponseWebFetchResultBlock::equal

    automatically derived

    ResponseWebFetchResultBlock::new

    fn ResponseWebFetchResultBlock::new(content~ : ResponseDocumentBlock, type_~ : String, url~ : String, retrieved_at? : String) -> ResponseWebFetchResultBlock

    Creates a ResponseWebFetchResultBlock with omitted optional fields absent.

    ResponseWebFetchResultBlock::not_equal

    automatically derived

    ResponseWebFetchResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebFetchResultBlock::to_repr

    automatically derived

    ResponseWebFetchToolResultBlock

    pub(all) struct ResponseWebFetchToolResultBlock {
    caller : ResponseWebFetchToolResultBlockCaller
    content : ResponseWebFetchToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebFetchToolResultBlock.

    ResponseWebFetchToolResultBlock::equal

    automatically derived

    ResponseWebFetchToolResultBlock::new

    Creates a ResponseWebFetchToolResultBlock with omitted optional fields absent.

    ResponseWebFetchToolResultBlock::not_equal

    automatically derived

    ResponseWebFetchToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebFetchToolResultBlock::to_repr

    automatically derived

    ResponseWebFetchToolResultBlockCaller

    pub(all) enum ResponseWebFetchToolResultBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseWebFetchToolResultBlockCaller.

    ResponseWebFetchToolResultBlockCaller::equal

    automatically derived

    ResponseWebFetchToolResultBlockCaller::not_equal

    automatically derived

    ResponseWebFetchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseWebFetchToolResultBlockCaller::to_repr

    automatically derived

    ResponseWebFetchToolResultBlockContent

    pub(all) enum ResponseWebFetchToolResultBlockContent {
    WebFetchToolResultError(ResponseWebFetchToolResultError)
    WebFetchResult(ResponseWebFetchResultBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseWebFetchToolResultBlockContent.

    ResponseWebFetchToolResultBlockContent::equal

    automatically derived

    ResponseWebFetchToolResultBlockContent::not_equal

    automatically derived

    ResponseWebFetchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseWebFetchToolResultBlockContent::to_repr

    automatically derived

    ResponseWebFetchToolResultError

    pub(all) struct ResponseWebFetchToolResultError {
    error_code : WebFetchToolResultErrorCode
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebFetchToolResultError.

    ResponseWebFetchToolResultError::equal

    automatically derived

    ResponseWebFetchToolResultError::new

    Creates a ResponseWebFetchToolResultError with omitted optional fields absent.

    ResponseWebFetchToolResultError::not_equal

    automatically derived

    ResponseWebFetchToolResultError::to_json

    Encodes this value as JSON.

    ResponseWebFetchToolResultError::to_repr

    automatically derived

    ResponseWebSearchResultBlock

    pub(all) struct ResponseWebSearchResultBlock {
    encrypted_content : String
    page_age : String?
    title : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebSearchResultBlock.

    ResponseWebSearchResultBlock::equal

    automatically derived

    ResponseWebSearchResultBlock::new

    fn ResponseWebSearchResultBlock::new(encrypted_content~ : String, title~ : String, url~ : String, page_age? : String) -> ResponseWebSearchResultBlock

    Creates a ResponseWebSearchResultBlock with omitted optional fields absent.

    ResponseWebSearchResultBlock::not_equal

    automatically derived

    ResponseWebSearchResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebSearchResultBlock::to_repr

    automatically derived

    ResponseWebSearchResultLocationCitation

    pub(all) struct ResponseWebSearchResultLocationCitation {
    cited_text : String
    encrypted_index : String
    title : String?
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebSearchResultLocationCitation.

    ResponseWebSearchResultLocationCitation::equal

    automatically derived

    ResponseWebSearchResultLocationCitation::new

    fn ResponseWebSearchResultLocationCitation::new(cited_text~ : String, encrypted_index~ : String, type_~ : String, url~ : String, title? : String) -> ResponseWebSearchResultLocationCitation

    Creates a ResponseWebSearchResultLocationCitation with omitted optional fields absent.

    ResponseWebSearchResultLocationCitation::not_equal

    automatically derived

    ResponseWebSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    ResponseWebSearchResultLocationCitation::to_repr

    automatically derived

    ResponseWebSearchToolResultBlock

    pub(all) struct ResponseWebSearchToolResultBlock {
    caller : ResponseWebSearchToolResultBlockCaller
    content : ResponseWebSearchToolResultBlockContent
    tool_use_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebSearchToolResultBlock.

    ResponseWebSearchToolResultBlock::equal

    automatically derived

    ResponseWebSearchToolResultBlock::new

    Creates a ResponseWebSearchToolResultBlock with omitted optional fields absent.

    ResponseWebSearchToolResultBlock::not_equal

    automatically derived

    ResponseWebSearchToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebSearchToolResultBlock::to_repr

    automatically derived

    ResponseWebSearchToolResultBlockCaller

    pub(all) enum ResponseWebSearchToolResultBlockCaller {
    CodeExecution20250825(ServerToolCaller)
    CodeExecution20260120(ServerToolCaller20260120)
    Direct(DirectCaller)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union ResponseWebSearchToolResultBlockCaller.

    ResponseWebSearchToolResultBlockCaller::equal

    automatically derived

    ResponseWebSearchToolResultBlockCaller::not_equal

    automatically derived

    ResponseWebSearchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseWebSearchToolResultBlockCaller::to_repr

    automatically derived

    ResponseWebSearchToolResultBlockContent

    pub(all) enum ResponseWebSearchToolResultBlockContent {
    ResponseWebSearchToolResultError(ResponseWebSearchToolResultError)
    ResponseWebSearchResultBlockArray(Array[ResponseWebSearchResultBlock])
    } derive(Eq,
    Debug
    )

    Generated untagged union ResponseWebSearchToolResultBlockContent.

    ResponseWebSearchToolResultBlockContent::equal

    automatically derived

    ResponseWebSearchToolResultBlockContent::not_equal

    automatically derived

    ResponseWebSearchToolResultBlockContent::to_json

    Encodes this union as JSON.

    ResponseWebSearchToolResultBlockContent::to_repr

    automatically derived

    ResponseWebSearchToolResultError

    pub(all) struct ResponseWebSearchToolResultError {
    error_code : WebSearchToolResultErrorCode
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseWebSearchToolResultError.

    ResponseWebSearchToolResultError::equal

    automatically derived

    ResponseWebSearchToolResultError::new

    Creates a ResponseWebSearchToolResultError with omitted optional fields absent.

    ResponseWebSearchToolResultError::not_equal

    automatically derived

    ResponseWebSearchToolResultError::to_json

    Encodes this value as JSON.

    ResponseWebSearchToolResultError::to_repr

    automatically derived

    ServerToolCaller

    pub(all) struct ServerToolCaller {
    tool_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Tool invocation generated by a server-side tool.

    ServerToolCaller::equal

    automatically derived

    ServerToolCaller::new

    fn ServerToolCaller::new(tool_id~ : String, type_~ : String) -> ServerToolCaller

    Creates a ServerToolCaller with omitted optional fields absent.

    ServerToolCaller::not_equal

    fn ServerToolCaller::not_equal(x : ServerToolCaller, y : ServerToolCaller) -> Bool
    automatically derived

    ServerToolCaller::to_json

    Encodes this value as JSON.

    ServerToolCaller::to_repr

    automatically derived

    ServerToolCaller20260120

    pub(all) struct ServerToolCaller20260120 {
    tool_id : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ServerToolCaller20260120.

    ServerToolCaller20260120::equal

    automatically derived

    ServerToolCaller20260120::new

    fn ServerToolCaller20260120::new(tool_id~ : String, type_~ : String) -> ServerToolCaller20260120

    Creates a ServerToolCaller20260120 with omitted optional fields absent.

    ServerToolCaller20260120::not_equal

    automatically derived

    ServerToolCaller20260120::to_json

    Encodes this value as JSON.

    ServerToolCaller20260120::to_repr

    automatically derived

    ServerToolUsage

    pub(all) struct ServerToolUsage {
    web_fetch_requests : Int
    web_search_requests : Int
    } derive(Eq,
    Debug
    )

    Generated representation of ServerToolUsage.

    ServerToolUsage::equal

    automatically derived

    ServerToolUsage::new

    fn ServerToolUsage::new(web_fetch_requests~ : Int, web_search_requests~ : Int) -> ServerToolUsage

    Creates a ServerToolUsage with omitted optional fields absent.

    ServerToolUsage::not_equal

    fn ServerToolUsage::not_equal(x : ServerToolUsage, y : ServerToolUsage) -> Bool
    automatically derived

    ServerToolUsage::to_json

    Encodes this value as JSON.

    ServerToolUsage::to_repr

    automatically derived

    ServerToolsCapability

    pub(all) struct ServerToolsCapability {
    code_execution : CapabilitySupport
    supported : Bool
    web_search : CapabilitySupport
    } derive(Eq,
    Debug
    )

    Web search and code execution tool support, with one entry per tool.

    ServerToolsCapability::equal

    automatically derived

    ServerToolsCapability::new

    fn ServerToolsCapability::new(code_execution~ : CapabilitySupport, supported~ : Bool, web_search~ : CapabilitySupport) -> ServerToolsCapability

    Creates a ServerToolsCapability with omitted optional fields absent.

    ServerToolsCapability::not_equal

    automatically derived

    ServerToolsCapability::to_json

    Encodes this value as JSON.

    ServerToolsCapability::to_repr

    automatically derived

    SignatureContentBlockDelta

    pub(all) struct SignatureContentBlockDelta {
    signature : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of SignatureContentBlockDelta.

    SignatureContentBlockDelta::equal

    automatically derived

    SignatureContentBlockDelta::new

    fn SignatureContentBlockDelta::new(signature~ : String, type_~ : String) -> SignatureContentBlockDelta

    Creates a SignatureContentBlockDelta with omitted optional fields absent.

    SignatureContentBlockDelta::not_equal

    automatically derived

    SignatureContentBlockDelta::to_json

    Encodes this value as JSON.

    SignatureContentBlockDelta::to_repr

    automatically derived

    SkillParams

    pub(all) struct SkillParams {
    skill_id : String
    type_ : SkillParamsType
    version : String?
    } derive(Eq,
    Debug
    )

    Specification for a skill to be loaded in a container.

    SkillParams::equal

    fn SkillParams::equal(SkillParams, SkillParams) -> Bool
    automatically derived

    SkillParams::new

    fn SkillParams::new(skill_id~ : String, type_~ : SkillParamsType, version? : String) -> SkillParams

    Creates a SkillParams with omitted optional fields absent.

    SkillParams::not_equal

    fn SkillParams::not_equal(x : SkillParams, y : SkillParams) -> Bool
    automatically derived

    SkillParams::to_json

    Encodes this value as JSON.

    SkillParams::to_repr

    automatically derived

    SkillParamsType

    pub(all) enum SkillParamsType {
    Anthropic
    CustomSkill
    Custom(String)
    } derive(Eq,
    Debug
    )

    Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)

    SkillParamsType::equal

    automatically derived

    SkillParamsType::not_equal

    fn SkillParamsType::not_equal(x : SkillParamsType, y : SkillParamsType) -> Bool
    automatically derived

    SkillParamsType::to_json

    Encodes this string enum as JSON.

    SkillParamsType::to_repr

    automatically derived

    SkillReadBlockedUndecryptableErrorDetails

    pub(all) struct SkillReadBlockedUndecryptableErrorDetails {
    } derive(Eq,
    Debug
    )

    A custom skill the request names is stored under an encryption key state the workspace cannot currently decrypt.

    SkillReadBlockedUndecryptableErrorDetails::equal

    automatically derived

    SkillReadBlockedUndecryptableErrorDetails::not_equal

    automatically derived

    SkillReadBlockedUndecryptableErrorDetails::to_json

    Encodes this value as JSON.

    SkillReadBlockedUndecryptableErrorDetails::to_repr

    automatically derived

    Speed

    pub(all) enum Speed {
    Standard
    Fast
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum Speed.

    Speed::equal

    fn Speed::equal(Speed, Speed) -> Bool
    automatically derived

    Speed::not_equal

    fn Speed::not_equal(x : Speed, y : Speed) -> Bool
    automatically derived

    Speed::to_json

    Encodes this string enum as JSON.

    Speed::to_repr

    automatically derived

    StopDetails

    pub(all) enum StopDetails {
    Refusal(RefusalStopDetails)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union StopDetails.

    StopDetails::equal

    fn StopDetails::equal(StopDetails, StopDetails) -> Bool
    automatically derived

    StopDetails::not_equal

    fn StopDetails::not_equal(x : StopDetails, y : StopDetails) -> Bool
    automatically derived

    StopDetails::to_json

    Encodes this tagged union as JSON.

    StopDetails::to_repr

    automatically derived

    StopReason

    pub(all) enum StopReason {
    EndTurn
    MaxTokens
    StopSequence
    ToolUse
    PauseTurn
    Refusal
    ModelContextWindowExceeded
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum StopReason.

    StopReason::equal

    fn StopReason::equal(StopReason, StopReason) -> Bool
    automatically derived

    StopReason::not_equal

    fn StopReason::not_equal(x : StopReason, y : StopReason) -> Bool
    automatically derived

    StopReason::to_json

    Encodes this string enum as JSON.

    StopReason::to_repr

    automatically derived

    SystemInputMessage

    pub(all) struct SystemInputMessage {
    content : SystemInputMessageContent
    role : String
    } derive(Eq,
    Debug
    )

    Generated representation of SystemInputMessage.

    SystemInputMessage::equal

    automatically derived

    SystemInputMessage::new

    fn SystemInputMessage::new(content~ : SystemInputMessageContent, role~ : String) -> SystemInputMessage

    Creates a SystemInputMessage with omitted optional fields absent.

    SystemInputMessage::not_equal

    automatically derived

    SystemInputMessage::to_json

    Encodes this value as JSON.

    SystemInputMessage::to_repr

    automatically derived

    SystemInputMessageContent

    pub(all) enum SystemInputMessageContent {
    Text(String)
    ValueArray(Array[SystemInputMessageContentValueArrayItem])
    } derive(Eq,
    Debug
    )

    Generated untagged union SystemInputMessageContent.

    SystemInputMessageContent::equal

    automatically derived

    SystemInputMessageContent::not_equal

    automatically derived

    SystemInputMessageContent::to_json

    Encodes this union as JSON.

    SystemInputMessageContent::to_repr

    automatically derived

    SystemInputMessageContentValueArrayItem

    pub(all) enum SystemInputMessageContentValueArrayItem {
    Text(RequestTextBlock)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Generated tagged union SystemInputMessageContentValueArrayItem.

    SystemInputMessageContentValueArrayItem::equal

    automatically derived

    SystemInputMessageContentValueArrayItem::not_equal

    automatically derived

    SystemInputMessageContentValueArrayItem::to_json

    Encodes this tagged union as JSON.

    SystemInputMessageContentValueArrayItem::to_repr

    automatically derived

    TextContentBlockDelta

    pub(all) struct TextContentBlockDelta {
    text : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of TextContentBlockDelta.

    TextContentBlockDelta::equal

    automatically derived

    TextContentBlockDelta::new

    fn TextContentBlockDelta::new(text~ : String, type_~ : String) -> TextContentBlockDelta

    Creates a TextContentBlockDelta with omitted optional fields absent.

    TextContentBlockDelta::not_equal

    automatically derived

    TextContentBlockDelta::to_json

    Encodes this value as JSON.

    TextContentBlockDelta::to_repr

    automatically derived

    TextEditor20250124

    pub(all) struct TextEditor20250124 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [TextEditor20250124CacheControl]
    defer_loading : Bool?
    input_examples : Array[Map[String,
    Json
    ]]?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of TextEditor20250124.

    TextEditor20250124::equal

    automatically derived

    TextEditor20250124::new

    fn TextEditor20250124::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : TextEditor20250124CacheControl, defer_loading? : Bool, input_examples? : Array[Map[String,
    Json
    ]], strict? : Bool) -> TextEditor20250124

    Creates a TextEditor20250124 with omitted optional fields absent.

    TextEditor20250124::not_equal

    automatically derived

    TextEditor20250124::to_json

    Encodes this value as JSON.

    TextEditor20250124::to_repr

    automatically derived

    TextEditor20250124CacheControl

    pub(all) enum TextEditor20250124CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    TextEditor20250124CacheControl::equal

    automatically derived

    TextEditor20250124CacheControl::not_equal

    automatically derived

    TextEditor20250124CacheControl::to_json

    Encodes this tagged union as JSON.

    TextEditor20250124CacheControl::to_repr

    automatically derived

    TextEditor20250429

    pub(all) struct TextEditor20250429 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [TextEditor20250429CacheControl]
    defer_loading : Bool?
    input_examples : Array[Map[String,
    Json
    ]]?
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of TextEditor20250429.

    TextEditor20250429::equal

    automatically derived

    TextEditor20250429::new

    fn TextEditor20250429::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : TextEditor20250429CacheControl, defer_loading? : Bool, input_examples? : Array[Map[String,
    Json
    ]], strict? : Bool) -> TextEditor20250429

    Creates a TextEditor20250429 with omitted optional fields absent.

    TextEditor20250429::not_equal

    automatically derived

    TextEditor20250429::to_json

    Encodes this value as JSON.

    TextEditor20250429::to_repr

    automatically derived

    TextEditor20250429CacheControl

    pub(all) enum TextEditor20250429CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    TextEditor20250429CacheControl::equal

    automatically derived

    TextEditor20250429CacheControl::not_equal

    automatically derived

    TextEditor20250429CacheControl::to_json

    Encodes this tagged union as JSON.

    TextEditor20250429CacheControl::to_repr

    automatically derived

    TextEditor20250728

    pub(all) struct TextEditor20250728 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [TextEditor20250728CacheControl]
    defer_loading : Bool?
    input_examples : Array[Map[String,
    Json
    ]]?
    max_characters :
    Presence
    [Int]
    strict : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of TextEditor20250728.

    TextEditor20250728::equal

    automatically derived

    TextEditor20250728::new

    fn TextEditor20250728::new(type_~ : String, allowed_callers? : Array[AllowedCaller], cache_control? : TextEditor20250728CacheControl, defer_loading? : Bool, input_examples? : Array[Map[String,
    Json
    ]], max_characters? : Int, strict? : Bool) -> TextEditor20250728

    Creates a TextEditor20250728 with omitted optional fields absent.

    TextEditor20250728::not_equal

    automatically derived

    TextEditor20250728::to_json

    Encodes this value as JSON.

    TextEditor20250728::to_repr

    automatically derived

    TextEditor20250728CacheControl

    pub(all) enum TextEditor20250728CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    TextEditor20250728CacheControl::equal

    automatically derived

    TextEditor20250728CacheControl::not_equal

    automatically derived

    TextEditor20250728CacheControl::to_json

    Encodes this tagged union as JSON.

    TextEditor20250728CacheControl::to_repr

    automatically derived

    TextEditorCodeExecutionToolResultErrorCode

    pub(all) enum TextEditorCodeExecutionToolResultErrorCode {
    InvalidToolInput
    Unavailable
    TooManyRequests
    ExecutionTimeExceeded
    FileNotFound
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum TextEditorCodeExecutionToolResultErrorCode.

    TextEditorCodeExecutionToolResultErrorCode::equal

    automatically derived

    TextEditorCodeExecutionToolResultErrorCode::not_equal

    automatically derived

    TextEditorCodeExecutionToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    TextEditorCodeExecutionToolResultErrorCode::to_repr

    automatically derived

    ThinkingCapability

    pub(all) struct ThinkingCapability {
    supported : Bool
    types : ThinkingTypes
    } derive(Eq,
    Debug
    )

    Thinking capability details.

    ThinkingCapability::equal

    automatically derived

    ThinkingCapability::new

    fn ThinkingCapability::new(supported~ : Bool, types~ : ThinkingTypes) -> ThinkingCapability

    Creates a ThinkingCapability with omitted optional fields absent.

    ThinkingCapability::not_equal

    automatically derived

    ThinkingCapability::to_json

    Encodes this value as JSON.

    ThinkingCapability::to_repr

    automatically derived

    ThinkingConfigAdaptive

    pub(all) struct ThinkingConfigAdaptive {
    display :
    Presence
    [ThinkingDisplayMode]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ThinkingConfigAdaptive.

    ThinkingConfigAdaptive::equal

    automatically derived

    ThinkingConfigAdaptive::new

    fn ThinkingConfigAdaptive::new(type_~ : String, display? : ThinkingDisplayMode) -> ThinkingConfigAdaptive

    Creates a ThinkingConfigAdaptive with omitted optional fields absent.

    ThinkingConfigAdaptive::not_equal

    automatically derived

    ThinkingConfigAdaptive::to_json

    Encodes this value as JSON.

    ThinkingConfigAdaptive::to_repr

    automatically derived

    ThinkingConfigBetweenTools

    pub(all) struct ThinkingConfigBetweenTools {
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ThinkingConfigBetweenTools.

    ThinkingConfigBetweenTools::equal

    automatically derived

    ThinkingConfigBetweenTools::new

    Creates a ThinkingConfigBetweenTools with omitted optional fields absent.

    ThinkingConfigBetweenTools::not_equal

    automatically derived

    ThinkingConfigBetweenTools::to_json

    Encodes this value as JSON.

    ThinkingConfigBetweenTools::to_repr

    automatically derived

    ThinkingConfigDisabled

    pub(all) struct ThinkingConfigDisabled {
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ThinkingConfigDisabled.

    ThinkingConfigDisabled::equal

    automatically derived

    ThinkingConfigDisabled::new

    Creates a ThinkingConfigDisabled with omitted optional fields absent.

    ThinkingConfigDisabled::not_equal

    automatically derived

    ThinkingConfigDisabled::to_json

    Encodes this value as JSON.

    ThinkingConfigDisabled::to_repr

    automatically derived

    ThinkingConfigEnabled

    pub(all) struct ThinkingConfigEnabled {
    budget_tokens : Int
    display :
    Presence
    [ThinkingDisplayMode]
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ThinkingConfigEnabled.

    ThinkingConfigEnabled::equal

    automatically derived

    ThinkingConfigEnabled::new

    fn ThinkingConfigEnabled::new(budget_tokens~ : Int, type_~ : String, display? : ThinkingDisplayMode) -> ThinkingConfigEnabled

    Creates a ThinkingConfigEnabled with omitted optional fields absent.

    ThinkingConfigEnabled::not_equal

    automatically derived

    ThinkingConfigEnabled::to_json

    Encodes this value as JSON.

    ThinkingConfigEnabled::to_repr

    automatically derived

    ThinkingConfigParam

    pub(all) enum ThinkingConfigParam {
    Adaptive(ThinkingConfigAdaptive)
    BetweenTools(ThinkingConfigBetweenTools)
    Disabled(ThinkingConfigDisabled)
    Enabled(ThinkingConfigEnabled)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Configuration for Claude's thinking. With {"type": "adaptive"}, Claude decides when and how much to think. With {"type": "enabled"} (manual extended thinking), you set a budget_tokens of at least 1,024. Thinking tokens count toward your max_tokens limit. Which type values are accepted, and what happens when you omit thinking, depend on the model. See thinking for each model's behavior.

    ThinkingConfigParam::equal

    automatically derived

    ThinkingConfigParam::not_equal

    automatically derived

    ThinkingConfigParam::to_json

    Encodes this tagged union as JSON.

    ThinkingConfigParam::to_repr

    automatically derived

    ThinkingContentBlockDelta

    pub(all) struct ThinkingContentBlockDelta {
    thinking : String
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ThinkingContentBlockDelta.

    ThinkingContentBlockDelta::equal

    automatically derived

    ThinkingContentBlockDelta::new

    fn ThinkingContentBlockDelta::new(thinking~ : String, type_~ : String) -> ThinkingContentBlockDelta

    Creates a ThinkingContentBlockDelta with omitted optional fields absent.

    ThinkingContentBlockDelta::not_equal

    automatically derived

    ThinkingContentBlockDelta::to_json

    Encodes this value as JSON.

    ThinkingContentBlockDelta::to_repr

    automatically derived

    ThinkingDisplayMode

    pub(all) enum ThinkingDisplayMode {
    Summarized
    Omitted
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ThinkingDisplayMode.

    ThinkingDisplayMode::equal

    automatically derived

    ThinkingDisplayMode::not_equal

    automatically derived

    ThinkingDisplayMode::to_json

    Encodes this string enum as JSON.

    ThinkingDisplayMode::to_repr

    automatically derived

    ThinkingTypes

    pub(all) struct ThinkingTypes {
    adaptive : CapabilitySupport
    between_tools : CapabilitySupport
    disabled : CapabilitySupport
    enabled : CapabilitySupport
    } derive(Eq,
    Debug
    )

    Which thinking.type values the model accepts on requests. Read each key on its own: for example, enabled can be false while disabled is true.

    ThinkingTypes::equal

    automatically derived

    ThinkingTypes::new

    fn ThinkingTypes::new(adaptive~ : CapabilitySupport, between_tools~ : CapabilitySupport, disabled~ : CapabilitySupport, enabled~ : CapabilitySupport) -> ThinkingTypes

    Creates a ThinkingTypes with omitted optional fields absent.

    ThinkingTypes::not_equal

    fn ThinkingTypes::not_equal(x : ThinkingTypes, y : ThinkingTypes) -> Bool
    automatically derived

    ThinkingTypes::to_json

    Encodes this value as JSON.

    ThinkingTypes::to_repr

    automatically derived

    ThreadAlreadyContinuedErrorDetails

    pub(all) struct ThreadAlreadyContinuedErrorDetails {
    } derive(Eq,
    Debug
    )

    The response that previous_message_id names has already been continued, and each response can be continued only once. Continue from the Thread's most recent response id.

    ThreadAlreadyContinuedErrorDetails::equal

    automatically derived

    ThreadAlreadyContinuedErrorDetails::not_equal

    automatically derived

    ThreadAlreadyContinuedErrorDetails::to_json

    Encodes this value as JSON.

    ThreadAlreadyContinuedErrorDetails::to_repr

    automatically derived

    ThreadContinueInFlightErrorDetails

    pub(all) struct ThreadContinueInFlightErrorDetails {
    } derive(Eq,
    Debug
    )

    Another request is still continuing from the same previous_message_id. Wait for it to complete and continue from its response id, or replay the full conversation with thread: {"type": "create"}.

    ThreadContinueInFlightErrorDetails::equal

    automatically derived

    ThreadContinueInFlightErrorDetails::not_equal

    automatically derived

    ThreadContinueInFlightErrorDetails::to_json

    Encodes this value as JSON.

    ThreadContinueInFlightErrorDetails::to_repr

    automatically derived

    ThreadFingerprintMismatchErrorDetails

    pub(all) struct ThreadFingerprintMismatchErrorDetails {
    } derive(Eq,
    Debug
    )

    A field that must stay the same across a Thread's turns differs from the value stored with the Thread; the message names each such field. Send the stored values, or replay the full conversation with thread: {"type": "create"} to change them.

    ThreadFingerprintMismatchErrorDetails::equal

    automatically derived

    ThreadFingerprintMismatchErrorDetails::not_equal

    automatically derived

    ThreadFingerprintMismatchErrorDetails::to_json

    Encodes this value as JSON.

    ThreadFingerprintMismatchErrorDetails::to_repr

    automatically derived

    ThreadNotFoundErrorDetails

    pub(all) struct ThreadNotFoundErrorDetails {
    } derive(Eq,
    Debug
    )

    No usable Thread state was found for previous_message_id. Replay the full conversation with thread: {"type": "create"} to start a new Thread.

    ThreadNotFoundErrorDetails::equal

    automatically derived

    ThreadNotFoundErrorDetails::not_equal

    automatically derived

    ThreadNotFoundErrorDetails::to_json

    Encodes this value as JSON.

    ThreadNotFoundErrorDetails::to_repr

    automatically derived

    ThreadUnsupportedRequestErrorDetails

    The request combines thread with a request field or an organization setting that Threads do not support; unsupported, when present, names it. Send the full conversation without thread, or change that field.

    ThreadUnsupportedRequestErrorDetails::equal

    automatically derived

    ThreadUnsupportedRequestErrorDetails::new

    Creates a ThreadUnsupportedRequestErrorDetails with omitted optional fields absent.

    ThreadUnsupportedRequestErrorDetails::not_equal

    automatically derived

    ThreadUnsupportedRequestErrorDetails::to_json

    Encodes this value as JSON.

    ThreadUnsupportedRequestErrorDetails::to_repr

    automatically derived

    ThreadUnsupportedRequestErrorDetailsUnsupportedItem

    pub(all) enum ThreadUnsupportedRequestErrorDetailsUnsupportedItem {
    CacheControl
    ContextManagement
    Fallbacks
    Hipaa
    InferenceHooks
    Thinking
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ThreadUnsupportedRequestErrorDetailsUnsupportedItem.

    ThreadUnsupportedRequestErrorDetailsUnsupportedItem::not_equal

    automatically derived

    ThreadUnsupportedRequestErrorDetailsUnsupportedItem::to_json

    Encodes this string enum as JSON.

    ThreadUnsupportedRequestErrorDetailsUnsupportedItem::to_repr

    automatically derived

    Tool

    pub(all) struct Tool {
    type_ :
    Presence
    [String]
    description : String?
    name : String
    input_schema :
    Json

    cache_control :
    Presence
    [ToolCacheControl]
    strict : Bool?
    eager_input_streaming :
    Presence
    [Bool]
    allowed_callers : Array[AllowedCaller]?
    defer_loading : Bool?
    input_examples : Array[Map[String,
    Json
    ]]?
    } derive(Eq,
    Debug
    )

    Generated representation of Tool.

    Tool::equal

    fn Tool::equal(Tool, Tool) -> Bool
    automatically derived

    Tool::new

    fn Tool::new(name~ : String, input_schema~ :
    Json
    , type_? : String, description? : String, cache_control? : ToolCacheControl, strict? : Bool, eager_input_streaming? : Bool, allowed_callers? : Array[AllowedCaller], defer_loading? : Bool, input_examples? : Array[Map[String,
    Json
    ]]) -> Tool

    Creates a Tool with omitted optional fields absent.

    Tool::not_equal

    fn Tool::not_equal(x : Tool, y : Tool) -> Bool
    automatically derived

    Tool::to_json

    Encodes this value as JSON.

    Tool::to_repr

    automatically derived

    ToolCacheControl

    pub(all) enum ToolCacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    ToolCacheControl::equal

    automatically derived

    ToolCacheControl::not_equal

    fn ToolCacheControl::not_equal(x : ToolCacheControl, y : ToolCacheControl) -> Bool
    automatically derived

    ToolCacheControl::to_json

    Encodes this tagged union as JSON.

    ToolCacheControl::to_repr

    automatically derived

    ToolChoice

    pub(all) enum ToolChoice {
    Any(ToolChoiceAny)
    Auto(ToolChoiceAuto)
    None(ToolChoiceNone)
    Tool(ToolChoiceTool)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

    ToolChoice::equal

    fn ToolChoice::equal(ToolChoice, ToolChoice) -> Bool
    automatically derived

    ToolChoice::not_equal

    fn ToolChoice::not_equal(x : ToolChoice, y : ToolChoice) -> Bool
    automatically derived

    ToolChoice::to_json

    Encodes this tagged union as JSON.

    ToolChoice::to_repr

    automatically derived

    ToolChoiceAny

    pub(all) struct ToolChoiceAny {
    disable_parallel_tool_use : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    The model will use any available tools.

    ToolChoiceAny::equal

    automatically derived

    ToolChoiceAny::new

    fn ToolChoiceAny::new(type_~ : String, disable_parallel_tool_use? : Bool) -> ToolChoiceAny

    Creates a ToolChoiceAny with omitted optional fields absent.

    ToolChoiceAny::not_equal

    fn ToolChoiceAny::not_equal(x : ToolChoiceAny, y : ToolChoiceAny) -> Bool
    automatically derived

    ToolChoiceAny::to_json

    Encodes this value as JSON.

    ToolChoiceAny::to_repr

    automatically derived

    ToolChoiceAuto

    pub(all) struct ToolChoiceAuto {
    disable_parallel_tool_use : Bool?
    type_ : String
    } derive(Eq,
    Debug
    )

    The model will automatically decide whether to use tools.

    ToolChoiceAuto::equal

    automatically derived

    ToolChoiceAuto::new

    fn ToolChoiceAuto::new(type_~ : String, disable_parallel_tool_use? : Bool) -> ToolChoiceAuto

    Creates a ToolChoiceAuto with omitted optional fields absent.

    ToolChoiceAuto::not_equal

    fn ToolChoiceAuto::not_equal(x : ToolChoiceAuto, y : ToolChoiceAuto) -> Bool
    automatically derived

    ToolChoiceAuto::to_json

    Encodes this value as JSON.

    ToolChoiceAuto::to_repr

    automatically derived

    ToolChoiceNone

    pub(all) struct ToolChoiceNone {
    type_ : String
    } derive(Eq,
    Debug
    )

    The model will not be allowed to use tools.

    ToolChoiceNone::equal

    automatically derived

    ToolChoiceNone::new

    fn ToolChoiceNone::new(type_~ : String) -> ToolChoiceNone

    Creates a ToolChoiceNone with omitted optional fields absent.

    ToolChoiceNone::not_equal

    fn ToolChoiceNone::not_equal(x : ToolChoiceNone, y : ToolChoiceNone) -> Bool
    automatically derived

    ToolChoiceNone::to_json

    Encodes this value as JSON.

    ToolChoiceNone::to_repr

    automatically derived

    ToolChoiceTool

    pub(all) struct ToolChoiceTool {
    disable_parallel_tool_use : Bool?
    name : String
    type_ : String
    } derive(Eq,
    Debug
    )

    The model will use the specified tool with tool_choice.name.

    ToolChoiceTool::equal

    automatically derived

    ToolChoiceTool::new

    fn ToolChoiceTool::new(name~ : String, type_~ : String, disable_parallel_tool_use? : Bool) -> ToolChoiceTool

    Creates a ToolChoiceTool with omitted optional fields absent.

    ToolChoiceTool::not_equal

    fn ToolChoiceTool::not_equal(x : ToolChoiceTool, y : ToolChoiceTool) -> Bool
    automatically derived

    ToolChoiceTool::to_json

    Encodes this value as JSON.

    ToolChoiceTool::to_repr

    automatically derived

    ToolNameConflictErrorDetails

    pub(all) struct ToolNameConflictErrorDetails {
    } derive(Eq,
    Debug
    )

    A tool made available in messages takes a name that an available tool of another kind, or of another MCP server, already holds.

    ToolNameConflictErrorDetails::equal

    automatically derived

    ToolNameConflictErrorDetails::not_equal

    automatically derived

    ToolNameConflictErrorDetails::to_json

    Encodes this value as JSON.

    ToolNameConflictErrorDetails::to_repr

    automatically derived

    ToolReferenceUnresolvedErrorDetails

    pub(all) struct ToolReferenceUnresolvedErrorDetails {
    } derive(Eq,
    Debug
    )

    A tool change or MCP tool listing references a tool or MCP server that is not defined at that position in the conversation.

    ToolReferenceUnresolvedErrorDetails::equal

    automatically derived

    ToolReferenceUnresolvedErrorDetails::not_equal

    automatically derived

    ToolReferenceUnresolvedErrorDetails::to_json

    Encodes this value as JSON.

    ToolReferenceUnresolvedErrorDetails::to_repr

    automatically derived

    ToolSearchToolBM2520251119

    pub(all) struct ToolSearchToolBM2520251119 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [ToolSearchToolBM2520251119CacheControl]
    defer_loading : Bool?
    strict : Bool?
    type_ : ToolSearchToolBM2520251119Type
    } derive(Eq,
    Debug
    )

    Generated representation of ToolSearchToolBM2520251119.

    ToolSearchToolBM2520251119::equal

    automatically derived

    ToolSearchToolBM2520251119::new

    fn ToolSearchToolBM2520251119::new(type_~ : ToolSearchToolBM2520251119Type, allowed_callers? : Array[AllowedCaller], cache_control? : ToolSearchToolBM2520251119CacheControl, defer_loading? : Bool, strict? : Bool) -> ToolSearchToolBM2520251119

    Creates a ToolSearchToolBM2520251119 with omitted optional fields absent.

    ToolSearchToolBM2520251119::not_equal

    automatically derived

    ToolSearchToolBM2520251119::to_json

    Encodes this value as JSON.

    ToolSearchToolBM2520251119::to_repr

    automatically derived

    ToolSearchToolBM2520251119CacheControl

    pub(all) enum ToolSearchToolBM2520251119CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    ToolSearchToolBM2520251119CacheControl::equal

    automatically derived

    ToolSearchToolBM2520251119CacheControl::not_equal

    automatically derived

    ToolSearchToolBM2520251119CacheControl::to_json

    Encodes this tagged union as JSON.

    ToolSearchToolBM2520251119CacheControl::to_repr

    automatically derived

    ToolSearchToolBM2520251119Type

    pub(all) enum ToolSearchToolBM2520251119Type {
    ToolSearchToolBm2520251119
    ToolSearchToolBm25
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ToolSearchToolBM2520251119Type.

    ToolSearchToolBM2520251119Type::equal

    automatically derived

    ToolSearchToolBM2520251119Type::not_equal

    automatically derived

    ToolSearchToolBM2520251119Type::to_json

    Encodes this string enum as JSON.

    ToolSearchToolBM2520251119Type::to_repr

    automatically derived

    ToolSearchToolRegex20251119

    pub(all) struct ToolSearchToolRegex20251119 {
    allowed_callers : Array[AllowedCaller]?
    cache_control :
    Presence
    [ToolSearchToolRegex20251119CacheControl]
    defer_loading : Bool?
    strict : Bool?
    type_ : ToolSearchToolRegex20251119Type
    } derive(Eq,
    Debug
    )

    Generated representation of ToolSearchToolRegex20251119.

    ToolSearchToolRegex20251119::equal

    automatically derived

    ToolSearchToolRegex20251119::new

    fn ToolSearchToolRegex20251119::new(type_~ : ToolSearchToolRegex20251119Type, allowed_callers? : Array[AllowedCaller], cache_control? : ToolSearchToolRegex20251119CacheControl, defer_loading? : Bool, strict? : Bool) -> ToolSearchToolRegex20251119

    Creates a ToolSearchToolRegex20251119 with omitted optional fields absent.

    ToolSearchToolRegex20251119::not_equal

    automatically derived

    ToolSearchToolRegex20251119::to_json

    Encodes this value as JSON.

    ToolSearchToolRegex20251119::to_repr

    automatically derived

    ToolSearchToolRegex20251119CacheControl

    pub(all) enum ToolSearchToolRegex20251119CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    ToolSearchToolRegex20251119CacheControl::equal

    automatically derived

    ToolSearchToolRegex20251119CacheControl::not_equal

    automatically derived

    ToolSearchToolRegex20251119CacheControl::to_json

    Encodes this tagged union as JSON.

    ToolSearchToolRegex20251119CacheControl::to_repr

    automatically derived

    ToolSearchToolRegex20251119Type

    pub(all) enum ToolSearchToolRegex20251119Type {
    ToolSearchToolRegex20251119
    ToolSearchToolRegex
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ToolSearchToolRegex20251119Type.

    ToolSearchToolRegex20251119Type::equal

    automatically derived

    ToolSearchToolRegex20251119Type::not_equal

    automatically derived

    ToolSearchToolRegex20251119Type::to_json

    Encodes this string enum as JSON.

    ToolSearchToolRegex20251119Type::to_repr

    automatically derived

    ToolSearchToolResultErrorCode

    pub(all) enum ToolSearchToolResultErrorCode {
    InvalidToolInput
    Unavailable
    TooManyRequests
    ExecutionTimeExceeded
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum ToolSearchToolResultErrorCode.

    ToolSearchToolResultErrorCode::equal

    automatically derived

    ToolSearchToolResultErrorCode::not_equal

    automatically derived

    ToolSearchToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    ToolSearchToolResultErrorCode::to_repr

    automatically derived

    URLImageSource

    pub(all) struct URLImageSource {
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of URLImageSource.

    URLImageSource::equal

    automatically derived

    URLImageSource::new

    fn URLImageSource::new(type_~ : String, url~ : String) -> URLImageSource

    Creates a URLImageSource with omitted optional fields absent.

    URLImageSource::not_equal

    fn URLImageSource::not_equal(x : URLImageSource, y : URLImageSource) -> Bool
    automatically derived

    URLImageSource::to_json

    Encodes this value as JSON.

    URLImageSource::to_repr

    automatically derived

    URLPDFSource

    pub(all) struct URLPDFSource {
    type_ : String
    url : String
    } derive(Eq,
    Debug
    )

    Generated representation of URLPDFSource.

    URLPDFSource::equal

    automatically derived

    URLPDFSource::new

    fn URLPDFSource::new(type_~ : String, url~ : String) -> URLPDFSource

    Creates a URLPDFSource with omitted optional fields absent.

    URLPDFSource::not_equal

    fn URLPDFSource::not_equal(x : URLPDFSource, y : URLPDFSource) -> Bool
    automatically derived

    URLPDFSource::to_json

    Encodes this value as JSON.

    URLPDFSource::to_repr

    automatically derived

    Usage

    Generated representation of Usage.

    Usage::equal

    fn Usage::equal(Usage, Usage) -> Bool
    automatically derived

    Usage::new

    fn Usage::new(input_tokens~ : Int, output_tokens~ : Int, cache_creation? : CacheCreation, cache_creation_input_tokens? : Int, cache_read_input_tokens? : Int, inference_geo? : String, output_tokens_details? : OutputTokensDetails, server_tool_use? : ServerToolUsage, service_tier? : UsageServiceTier, speed? : Speed) -> Usage

    Creates a Usage with omitted optional fields absent.

    Usage::not_equal

    fn Usage::not_equal(x : Usage, y : Usage) -> Bool
    automatically derived

    Usage::to_json

    Encodes this value as JSON.

    Usage::to_repr

    automatically derived

    UsageServiceTier

    pub(all) enum UsageServiceTier {
    Standard
    Priority
    Batch
    Unknown(String)
    } derive(Eq,
    Debug
    )

    If the request used the priority, standard, or batch tier.

    UsageServiceTier::equal

    automatically derived

    UsageServiceTier::not_equal

    fn UsageServiceTier::not_equal(x : UsageServiceTier, y : UsageServiceTier) -> Bool
    automatically derived

    UsageServiceTier::to_json

    Encodes this string enum as JSON.

    UsageServiceTier::to_repr

    automatically derived

    UserInputMessage

    pub(all) struct UserInputMessage {
    content : InputMessageContent
    role : String
    } derive(Eq,
    Debug
    )

    Generated representation of UserInputMessage.

    UserInputMessage::equal

    automatically derived

    UserInputMessage::new

    fn UserInputMessage::new(content~ : InputMessageContent, role~ : String) -> UserInputMessage

    Creates a UserInputMessage with omitted optional fields absent.

    UserInputMessage::not_equal

    fn UserInputMessage::not_equal(x : UserInputMessage, y : UserInputMessage) -> Bool
    automatically derived

    UserInputMessage::to_json

    Encodes this value as JSON.

    UserInputMessage::to_repr

    automatically derived

    UserLocation

    Generated representation of UserLocation.

    UserLocation::equal

    automatically derived

    UserLocation::new

    fn UserLocation::new(city? : String, country? : String, region? : String, timezone? : String) -> UserLocation

    Creates a UserLocation with omitted optional fields absent.

    UserLocation::not_equal

    fn UserLocation::not_equal(x : UserLocation, y : UserLocation) -> Bool
    automatically derived

    UserLocation::to_json

    Encodes this value as JSON.

    UserLocation::to_repr

    automatically derived

    UserProfileBillingNotAuthorizedErrorDetails

    pub(all) struct UserProfileBillingNotAuthorizedErrorDetails {
    } derive(Eq,
    Debug
    )

    The customer that the request's user profile represents has not authorized the caller to bill them, or the authorization that the request's credential uses has ended. The response does not say which applies.

    UserProfileBillingNotAuthorizedErrorDetails::equal

    automatically derived

    UserProfileBillingNotAuthorizedErrorDetails::not_equal

    automatically derived

    UserProfileBillingNotAuthorizedErrorDetails::to_json

    Encodes this value as JSON.

    UserProfileBillingNotAuthorizedErrorDetails::to_repr

    automatically derived

    UserProfileNotBillableErrorDetails

    pub(all) struct UserProfileNotBillableErrorDetails {
    } derive(Eq,
    Debug
    )

    The request's user profile cannot be billed. The response gives no more specific error code and does not say what the reason is.

    UserProfileNotBillableErrorDetails::equal

    automatically derived

    UserProfileNotBillableErrorDetails::not_equal

    automatically derived

    UserProfileNotBillableErrorDetails::to_json

    Encodes this value as JSON.

    UserProfileNotBillableErrorDetails::to_repr

    automatically derived

    UserProfileRequiredErrorDetails

    pub(all) struct UserProfileRequiredErrorDetails {
    } derive(Eq,
    Debug
    )

    The request sets billing_policy.bill_to to "user_profile" but names no user profile. Name the profile to bill in the anthropic-user-profile-id header.

    UserProfileRequiredErrorDetails::equal

    automatically derived

    UserProfileRequiredErrorDetails::not_equal

    automatically derived

    UserProfileRequiredErrorDetails::to_json

    Encodes this value as JSON.

    UserProfileRequiredErrorDetails::to_repr

    automatically derived

    WebFetchTool20250910

    Generated representation of WebFetchTool20250910.

    WebFetchTool20250910::equal

    automatically derived

    WebFetchTool20250910::new

    fn WebFetchTool20250910::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebFetchTool20250910CacheControl, citations? : RequestCitationsConfig, defer_loading? : Bool, max_content_tokens? : Int, max_uses? : Int, strict? : Bool, url_sources? : WebFetchUrlSources) -> WebFetchTool20250910

    Creates a WebFetchTool20250910 with omitted optional fields absent.

    WebFetchTool20250910::not_equal

    automatically derived

    WebFetchTool20250910::to_json

    Encodes this value as JSON.

    WebFetchTool20250910::to_repr

    automatically derived

    WebFetchTool20250910CacheControl

    pub(all) enum WebFetchTool20250910CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebFetchTool20250910CacheControl::equal

    automatically derived

    WebFetchTool20250910CacheControl::not_equal

    automatically derived

    WebFetchTool20250910CacheControl::to_json

    Encodes this tagged union as JSON.

    WebFetchTool20250910CacheControl::to_repr

    automatically derived

    WebFetchTool20260209

    Generated representation of WebFetchTool20260209.

    WebFetchTool20260209::equal

    automatically derived

    WebFetchTool20260209::new

    fn WebFetchTool20260209::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebFetchTool20260209CacheControl, citations? : RequestCitationsConfig, defer_loading? : Bool, max_content_tokens? : Int, max_uses? : Int, strict? : Bool, url_sources? : WebFetchUrlSources) -> WebFetchTool20260209

    Creates a WebFetchTool20260209 with omitted optional fields absent.

    WebFetchTool20260209::not_equal

    automatically derived

    WebFetchTool20260209::to_json

    Encodes this value as JSON.

    WebFetchTool20260209::to_repr

    automatically derived

    WebFetchTool20260209CacheControl

    pub(all) enum WebFetchTool20260209CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebFetchTool20260209CacheControl::equal

    automatically derived

    WebFetchTool20260209CacheControl::not_equal

    automatically derived

    WebFetchTool20260209CacheControl::to_json

    Encodes this tagged union as JSON.

    WebFetchTool20260209CacheControl::to_repr

    automatically derived

    WebFetchTool20260309

    pub(all) struct WebFetchTool20260309 {
    allowed_callers : Array[AllowedCaller]?
    allowed_domains :
    Presence
    [Array[String]]
    blocked_domains :
    Presence
    [Array[String]]
    cache_control :
    Presence
    [WebFetchTool20260309CacheControl]
    citations :
    Presence
    [RequestCitationsConfig]
    defer_loading : Bool?
    max_content_tokens :
    Presence
    [Int]
    max_uses :
    Presence
    [Int]
    strict : Bool?
    type_ : String
    url_sources :
    Presence
    [WebFetchUrlSources]
    use_cache : Bool?
    } derive(Eq,
    Debug
    )

    Web fetch tool with use_cache parameter for bypassing cached content.

    WebFetchTool20260309::equal

    automatically derived

    WebFetchTool20260309::new

    fn WebFetchTool20260309::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebFetchTool20260309CacheControl, citations? : RequestCitationsConfig, defer_loading? : Bool, max_content_tokens? : Int, max_uses? : Int, strict? : Bool, url_sources? : WebFetchUrlSources, use_cache? : Bool) -> WebFetchTool20260309

    Creates a WebFetchTool20260309 with omitted optional fields absent.

    WebFetchTool20260309::not_equal

    automatically derived

    WebFetchTool20260309::to_json

    Encodes this value as JSON.

    WebFetchTool20260309::to_repr

    automatically derived

    WebFetchTool20260309CacheControl

    pub(all) enum WebFetchTool20260309CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebFetchTool20260309CacheControl::equal

    automatically derived

    WebFetchTool20260309CacheControl::not_equal

    automatically derived

    WebFetchTool20260309CacheControl::to_json

    Encodes this tagged union as JSON.

    WebFetchTool20260309CacheControl::to_repr

    automatically derived

    WebFetchTool20260318

    pub(all) struct WebFetchTool20260318 {
    allowed_callers : Array[AllowedCaller]?
    allowed_domains :
    Presence
    [Array[String]]
    blocked_domains :
    Presence
    [Array[String]]
    cache_control :
    Presence
    [WebFetchTool20260318CacheControl]
    citations :
    Presence
    [RequestCitationsConfig]
    defer_loading : Bool?
    max_content_tokens :
    Presence
    [Int]
    max_uses :
    Presence
    [Int]
    response_inclusion : WebFetchTool20260318ResponseInclusion?
    strict : Bool?
    type_ : String
    url_sources :
    Presence
    [WebFetchUrlSources]
    use_cache : Bool?
    } derive(Eq,
    Debug
    )

    Generated representation of WebFetchTool20260318.

    WebFetchTool20260318::equal

    automatically derived

    WebFetchTool20260318::new

    fn WebFetchTool20260318::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebFetchTool20260318CacheControl, citations? : RequestCitationsConfig, defer_loading? : Bool, max_content_tokens? : Int, max_uses? : Int, response_inclusion? : WebFetchTool20260318ResponseInclusion, strict? : Bool, url_sources? : WebFetchUrlSources, use_cache? : Bool) -> WebFetchTool20260318

    Creates a WebFetchTool20260318 with omitted optional fields absent.

    WebFetchTool20260318::not_equal

    automatically derived

    WebFetchTool20260318::to_json

    Encodes this value as JSON.

    WebFetchTool20260318::to_repr

    automatically derived

    WebFetchTool20260318CacheControl

    pub(all) enum WebFetchTool20260318CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebFetchTool20260318CacheControl::equal

    automatically derived

    WebFetchTool20260318CacheControl::not_equal

    automatically derived

    WebFetchTool20260318CacheControl::to_json

    Encodes this tagged union as JSON.

    WebFetchTool20260318CacheControl::to_repr

    automatically derived

    WebFetchTool20260318ResponseInclusion

    pub(all) enum WebFetchTool20260318ResponseInclusion {
    Full
    Excluded
    Custom(String)
    } derive(Eq,
    Debug
    )

    How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

    WebFetchTool20260318ResponseInclusion::equal

    automatically derived

    WebFetchTool20260318ResponseInclusion::not_equal

    automatically derived

    WebFetchTool20260318ResponseInclusion::to_json

    Encodes this string enum as JSON.

    WebFetchTool20260318ResponseInclusion::to_repr

    automatically derived

    WebFetchToolResultErrorCode

    pub(all) enum WebFetchToolResultErrorCode {
    InvalidToolInput
    UrlTooLong
    UrlNotAllowed
    UrlNotInPriorContext
    UrlNotAccessible
    UnsupportedContentType
    TooManyRequests
    MaxUsesExceeded
    Unavailable
    ContentTooLarge
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum WebFetchToolResultErrorCode.

    WebFetchToolResultErrorCode::equal

    automatically derived

    WebFetchToolResultErrorCode::not_equal

    automatically derived

    WebFetchToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    WebFetchToolResultErrorCode::to_repr

    automatically derived

    WebFetchUrlSourceAll

    pub(all) struct WebFetchUrlSourceAll {
    type_ : String
    } derive(Eq,
    Debug
    )

    The url_sources variant under which a source contributes in full: every result of the tool filter's source, or all user input.

    WebFetchUrlSourceAll::equal

    automatically derived

    WebFetchUrlSourceAll::new

    fn WebFetchUrlSourceAll::new(type_~ : String) -> WebFetchUrlSourceAll

    Creates a WebFetchUrlSourceAll with omitted optional fields absent.

    WebFetchUrlSourceAll::not_equal

    automatically derived

    WebFetchUrlSourceAll::to_json

    Encodes this value as JSON.

    WebFetchUrlSourceAll::to_repr

    automatically derived

    WebFetchUrlSourceExcept

    pub(all) struct WebFetchUrlSourceExcept {
    tools : Array[WebFetchUrlSourceToolReference]
    type_ : String
    } derive(Eq,
    Debug
    )

    The tool filter variant under which every result but the named tools' contributes.

    WebFetchUrlSourceExcept::equal

    automatically derived

    WebFetchUrlSourceExcept::new

    Creates a WebFetchUrlSourceExcept with omitted optional fields absent.

    WebFetchUrlSourceExcept::not_equal

    automatically derived

    WebFetchUrlSourceExcept::to_json

    Encodes this value as JSON.

    WebFetchUrlSourceExcept::to_repr

    automatically derived

    WebFetchUrlSourceNone

    pub(all) struct WebFetchUrlSourceNone {
    type_ : String
    } derive(Eq,
    Debug
    )

    The url_sources variant under which a source contributes nothing: no result of the tool filter's source, or no user input.

    WebFetchUrlSourceNone::equal

    automatically derived

    WebFetchUrlSourceNone::new

    fn WebFetchUrlSourceNone::new(type_~ : String) -> WebFetchUrlSourceNone

    Creates a WebFetchUrlSourceNone with omitted optional fields absent.

    WebFetchUrlSourceNone::not_equal

    automatically derived

    WebFetchUrlSourceNone::to_json

    Encodes this value as JSON.

    WebFetchUrlSourceNone::to_repr

    automatically derived

    WebFetchUrlSourceOnly

    pub(all) struct WebFetchUrlSourceOnly {
    tools : Array[WebFetchUrlSourceToolReference]
    type_ : String
    } derive(Eq,
    Debug
    )

    The tool filter variant under which only the named tools' results contribute.

    WebFetchUrlSourceOnly::equal

    automatically derived

    WebFetchUrlSourceOnly::new

    Creates a WebFetchUrlSourceOnly with omitted optional fields absent.

    WebFetchUrlSourceOnly::not_equal

    automatically derived

    WebFetchUrlSourceOnly::to_json

    Encodes this value as JSON.

    WebFetchUrlSourceOnly::to_repr

    automatically derived

    WebFetchUrlSourceToolReference

    pub(all) struct WebFetchUrlSourceToolReference {
    name : String
    } derive(Eq,
    Debug
    )

    One entry of a tool filter's tools: it must name a tool declared in this request's tools[].

    WebFetchUrlSourceToolReference::equal

    automatically derived

    WebFetchUrlSourceToolReference::new

    Creates a WebFetchUrlSourceToolReference with omitted optional fields absent.

    WebFetchUrlSourceToolReference::not_equal

    automatically derived

    WebFetchUrlSourceToolReference::to_json

    Encodes this value as JSON.

    WebFetchUrlSourceToolReference::to_repr

    automatically derived

    WebFetchUrlSources

    pub(all) struct WebFetchUrlSources {
    client_tool_results : WebFetchUrlSourcesClientToolResults?
    server_tool_results : WebFetchUrlSourcesServerToolResults?
    user_input : WebFetchUrlSourcesUserInput?
    } derive(Eq,
    Debug
    )

    Which sources contribute to the set of URLs web fetch may fetch. Each key is a tagged variant: user_input is all or none; the two tool filters are all, none, only (only the named tools' results) or except (every result but the named tools'). A named tool must be declared in this request's tools[].

    WebFetchUrlSources::equal

    automatically derived

    WebFetchUrlSources::new

    Creates a WebFetchUrlSources with omitted optional fields absent.

    WebFetchUrlSources::not_equal

    automatically derived

    WebFetchUrlSources::to_json

    Encodes this value as JSON.

    WebFetchUrlSources::to_repr

    automatically derived

    WebFetchUrlSourcesClientToolResults

    pub(all) enum WebFetchUrlSourcesClientToolResults {
    All(WebFetchUrlSourceAll)
    Except(WebFetchUrlSourceExcept)
    None(WebFetchUrlSourceNone)
    Only(WebFetchUrlSourceOnly)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[].

    WebFetchUrlSourcesClientToolResults::equal

    automatically derived

    WebFetchUrlSourcesClientToolResults::not_equal

    automatically derived

    WebFetchUrlSourcesClientToolResults::to_json

    Encodes this tagged union as JSON.

    WebFetchUrlSourcesClientToolResults::to_repr

    automatically derived

    WebFetchUrlSourcesServerToolResults

    pub(all) enum WebFetchUrlSourcesServerToolResults {
    All(WebFetchUrlSourceAll)
    Except(WebFetchUrlSourceExcept)
    None(WebFetchUrlSourceNone)
    Only(WebFetchUrlSourceOnly)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute.

    WebFetchUrlSourcesServerToolResults::equal

    automatically derived

    WebFetchUrlSourcesServerToolResults::not_equal

    automatically derived

    WebFetchUrlSourcesServerToolResults::to_json

    Encodes this tagged union as JSON.

    WebFetchUrlSourcesServerToolResults::to_repr

    automatically derived

    WebFetchUrlSourcesUserInput

    pub(all) enum WebFetchUrlSourcesUserInput {
    All(WebFetchUrlSourceAll)
    None(WebFetchUrlSourceNone)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Whether URLs in user messages are fetchable: "all" or "none".

    WebFetchUrlSourcesUserInput::equal

    automatically derived

    WebFetchUrlSourcesUserInput::not_equal

    automatically derived

    WebFetchUrlSourcesUserInput::to_json

    Encodes this tagged union as JSON.

    WebFetchUrlSourcesUserInput::to_repr

    automatically derived

    WebSearchTool20250305

    pub(all) struct WebSearchTool20250305 {
    allowed_callers : Array[AllowedCaller]?
    allowed_domains :
    Presence
    [Array[String]]
    blocked_domains :
    Presence
    [Array[String]]
    cache_control :
    Presence
    [WebSearchTool20250305CacheControl]
    defer_loading : Bool?
    max_uses :
    Presence
    [Int]
    strict : Bool?
    type_ : String
    user_location :
    Presence
    [UserLocation]
    } derive(Eq,
    Debug
    )

    Generated representation of WebSearchTool20250305.

    WebSearchTool20250305::equal

    automatically derived

    WebSearchTool20250305::new

    fn WebSearchTool20250305::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebSearchTool20250305CacheControl, defer_loading? : Bool, max_uses? : Int, strict? : Bool, user_location? : UserLocation) -> WebSearchTool20250305

    Creates a WebSearchTool20250305 with omitted optional fields absent.

    WebSearchTool20250305::not_equal

    automatically derived

    WebSearchTool20250305::to_json

    Encodes this value as JSON.

    WebSearchTool20250305::to_repr

    automatically derived

    WebSearchTool20250305CacheControl

    pub(all) enum WebSearchTool20250305CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebSearchTool20250305CacheControl::equal

    automatically derived

    WebSearchTool20250305CacheControl::not_equal

    automatically derived

    WebSearchTool20250305CacheControl::to_json

    Encodes this tagged union as JSON.

    WebSearchTool20250305CacheControl::to_repr

    automatically derived

    WebSearchTool20260209

    pub(all) struct WebSearchTool20260209 {
    allowed_callers : Array[AllowedCaller]?
    allowed_domains :
    Presence
    [Array[String]]
    blocked_domains :
    Presence
    [Array[String]]
    cache_control :
    Presence
    [WebSearchTool20260209CacheControl]
    defer_loading : Bool?
    max_uses :
    Presence
    [Int]
    strict : Bool?
    type_ : String
    user_location :
    Presence
    [UserLocation]
    } derive(Eq,
    Debug
    )

    Generated representation of WebSearchTool20260209.

    WebSearchTool20260209::equal

    automatically derived

    WebSearchTool20260209::new

    fn WebSearchTool20260209::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebSearchTool20260209CacheControl, defer_loading? : Bool, max_uses? : Int, strict? : Bool, user_location? : UserLocation) -> WebSearchTool20260209

    Creates a WebSearchTool20260209 with omitted optional fields absent.

    WebSearchTool20260209::not_equal

    automatically derived

    WebSearchTool20260209::to_json

    Encodes this value as JSON.

    WebSearchTool20260209::to_repr

    automatically derived

    WebSearchTool20260209CacheControl

    pub(all) enum WebSearchTool20260209CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebSearchTool20260209CacheControl::equal

    automatically derived

    WebSearchTool20260209CacheControl::not_equal

    automatically derived

    WebSearchTool20260209CacheControl::to_json

    Encodes this tagged union as JSON.

    WebSearchTool20260209CacheControl::to_repr

    automatically derived

    WebSearchTool20260318

    pub(all) struct WebSearchTool20260318 {
    allowed_callers : Array[AllowedCaller]?
    allowed_domains :
    Presence
    [Array[String]]
    blocked_domains :
    Presence
    [Array[String]]
    cache_control :
    Presence
    [WebSearchTool20260318CacheControl]
    defer_loading : Bool?
    max_uses :
    Presence
    [Int]
    response_inclusion : WebSearchTool20260318ResponseInclusion?
    strict : Bool?
    type_ : String
    user_location :
    Presence
    [UserLocation]
    } derive(Eq,
    Debug
    )

    Generated representation of WebSearchTool20260318.

    WebSearchTool20260318::equal

    automatically derived

    WebSearchTool20260318::new

    fn WebSearchTool20260318::new(type_~ : String, allowed_callers? : Array[AllowedCaller], allowed_domains? : Array[String], blocked_domains? : Array[String], cache_control? : WebSearchTool20260318CacheControl, defer_loading? : Bool, max_uses? : Int, response_inclusion? : WebSearchTool20260318ResponseInclusion, strict? : Bool, user_location? : UserLocation) -> WebSearchTool20260318

    Creates a WebSearchTool20260318 with omitted optional fields absent.

    WebSearchTool20260318::not_equal

    automatically derived

    WebSearchTool20260318::to_json

    Encodes this value as JSON.

    WebSearchTool20260318::to_repr

    automatically derived

    WebSearchTool20260318CacheControl

    pub(all) enum WebSearchTool20260318CacheControl {
    Ephemeral(CacheControlEphemeral)
    Unknown(String,
    Json
    )
    } derive(Eq,
    Debug
    )

    Create a cache control breakpoint at this content block.

    WebSearchTool20260318CacheControl::equal

    automatically derived

    WebSearchTool20260318CacheControl::not_equal

    automatically derived

    WebSearchTool20260318CacheControl::to_json

    Encodes this tagged union as JSON.

    WebSearchTool20260318CacheControl::to_repr

    automatically derived

    WebSearchTool20260318ResponseInclusion

    pub(all) enum WebSearchTool20260318ResponseInclusion {
    Full
    Excluded
    Custom(String)
    } derive(Eq,
    Debug
    )

    How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.

    WebSearchTool20260318ResponseInclusion::equal

    automatically derived

    WebSearchTool20260318ResponseInclusion::not_equal

    automatically derived

    WebSearchTool20260318ResponseInclusion::to_json

    Encodes this string enum as JSON.

    WebSearchTool20260318ResponseInclusion::to_repr

    automatically derived

    WebSearchToolResultErrorCode

    pub(all) enum WebSearchToolResultErrorCode {
    InvalidToolInput
    Unavailable
    MaxUsesExceeded
    TooManyRequests
    QueryTooLong
    RequestTooLarge
    Unknown(String)
    } derive(Eq,
    Debug
    )

    Generated string enum WebSearchToolResultErrorCode.

    WebSearchToolResultErrorCode::equal

    automatically derived

    WebSearchToolResultErrorCode::not_equal

    automatically derived

    WebSearchToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    WebSearchToolResultErrorCode::to_repr

    automatically derived

    messages_count_tokens_post_decode

    Decodes a successful messages_count_tokens_post response.

    messages_count_tokens_post_decode_json

    Decodes a parsed successful messages_count_tokens_post response.

    messages_count_tokens_post_request

    fn messages_count_tokens_post_request(body : CountMessageTokensParams, anthropic_version? : String, anthropic_user_profile_id? : String, anthropic_workspace_id? : String) ->
    Request

    Count tokens in a Message

    messages_post_decode

    Decodes a successful messages_post response.

    messages_post_decode_json

    Decodes a parsed successful messages_post response.

    messages_post_request

    fn messages_post_request(body : CreateMessageParams, anthropic_version? : String, anthropic_user_profile_id? : String, anthropic_workspace_id? : String) ->
    Request

    Create a Message

    models_get_decode

    Decodes a successful models_get response.

    models_get_decode_json

    Decodes a parsed successful models_get response.

    models_get_request

    fn models_get_request(model_id : String, anthropic_version? : String, anthropic_workspace_id? : String) ->
    Request

    Get a Model

    models_list_decode

    Decodes a successful models_list response.

    models_list_decode_json

    Decodes a parsed successful models_list response.

    models_list_request

    fn models_list_request(before_id? : String, after_id? : String, limit? : Int, lifecycle? : Array[ModelsListLifecycleItem], anthropic_version? : String, anthropic_workspace_id? : String) ->
    Request

    List Models