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.
    impl ToJson for APIError

    APIError::equal

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

    APIError::from_json

    Decodes this value from JSON.

    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

    APIError::to_json

    fn APIError::to_json(self : APIError) -> Json

    Encodes this value as JSON.

    APIError::to_repr

    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

    AllowedCaller::from_json

    Decodes this string enum from JSON.

    AllowedCaller::not_equal

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

    AllowedCaller::to_json

    fn AllowedCaller::to_json(self : AllowedCaller) -> Json

    Encodes this string enum as JSON.

    AuthenticationError

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

    Generated representation of AuthenticationError.

    AuthenticationError::equal

    AuthenticationError::from_json

    Decodes this value from JSON.

    AuthenticationError::new

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

    Creates a AuthenticationError with omitted optional fields absent.

    AuthenticationError::not_equal

    AuthenticationError::to_json

    Encodes this value as JSON.

    Base64ImageSource

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

    Generated representation of Base64ImageSource.

    Base64ImageSource::equal

    Base64ImageSource::from_json

    Decodes this value from JSON.

    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

    Base64ImageSource::to_json

    Encodes this value as JSON.

    Base64ImageSourceMediaType

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

    Generated string enum Base64ImageSourceMediaType.

    Base64ImageSourceMediaType::equal

    Base64ImageSourceMediaType::from_json

    Decodes this string enum from JSON.

    Base64ImageSourceMediaType::not_equal

    Base64ImageSourceMediaType::to_json

    Encodes this string enum as JSON.

    Base64PDFSource

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

    Generated representation of Base64PDFSource.

    Base64PDFSource::equal

    Base64PDFSource::from_json

    Decodes this value from JSON.

    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

    Base64PDFSource::to_json

    fn Base64PDFSource::to_json(self : Base64PDFSource) -> Json

    Encodes this value as JSON.

    BashCodeExecutionToolResultErrorCode

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

    Generated string enum BashCodeExecutionToolResultErrorCode.

    BashCodeExecutionToolResultErrorCode::from_json

    Decodes this string enum from JSON.

    BashCodeExecutionToolResultErrorCode::not_equal

    BashCodeExecutionToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    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

    BashTool20250124::from_json

    Decodes this value from JSON.

    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

    BashTool20250124::to_json

    fn BashTool20250124::to_json(self : BashTool20250124) -> Json

    Encodes this value as JSON.

    BashTool20250124CacheControl

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

    Create a cache control breakpoint at this content block.

    BashTool20250124CacheControl::from_json

    Decodes this tagged union from JSON.

    BashTool20250124CacheControl::not_equal

    BashTool20250124CacheControl::to_json

    Encodes this tagged union as JSON.

    BillingError

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

    Generated representation of BillingError.

    BillingError::equal

    BillingError::from_json

    Decodes this value from JSON.

    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

    BillingError::to_json

    fn BillingError::to_json(self : BillingError) -> Json

    Encodes this value as JSON.

    BrowserCloseTabConfig

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

    close_tab's config overrides.

    BrowserCloseTabConfig::equal

    BrowserCloseTabConfig::from_json

    Decodes this value from JSON.

    BrowserCloseTabConfig::new

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

    Creates a BrowserCloseTabConfig with omitted optional fields absent.

    BrowserCloseTabConfig::not_equal

    BrowserCloseTabConfig::to_json

    Encodes this value as JSON.

    BrowserDoubleClickConfig

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

    double_click's config overrides.

    BrowserDoubleClickConfig::equal

    BrowserDoubleClickConfig::from_json

    Decodes this value from JSON.

    BrowserDoubleClickConfig::new

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

    Creates a BrowserDoubleClickConfig with omitted optional fields absent.

    BrowserDoubleClickConfig::not_equal

    BrowserDoubleClickConfig::to_json

    Encodes this value as JSON.

    BrowserFileUploadConfig

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

    file_upload's config overrides.

    BrowserFileUploadConfig::equal

    BrowserFileUploadConfig::from_json

    Decodes this value from JSON.

    BrowserFileUploadConfig::new

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

    Creates a BrowserFileUploadConfig with omitted optional fields absent.

    BrowserFileUploadConfig::not_equal

    BrowserFileUploadConfig::to_json

    Encodes this value as JSON.

    BrowserFindConfig

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

    find's config overrides.

    BrowserFindConfig::equal

    BrowserFindConfig::from_json

    Decodes this value from JSON.

    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

    BrowserFindConfig::to_json

    Encodes this value as JSON.

    BrowserFormInputConfig

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

    form_input's config overrides.

    BrowserFormInputConfig::equal

    BrowserFormInputConfig::from_json

    Decodes this value from JSON.

    BrowserFormInputConfig::new

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

    Creates a BrowserFormInputConfig with omitted optional fields absent.

    BrowserFormInputConfig::not_equal

    BrowserFormInputConfig::to_json

    Encodes this value as JSON.

    BrowserGetPageTextConfig

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

    get_page_text's config overrides.

    BrowserGetPageTextConfig::equal

    BrowserGetPageTextConfig::from_json

    Decodes this value from JSON.

    BrowserGetPageTextConfig::new

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

    Creates a BrowserGetPageTextConfig with omitted optional fields absent.

    BrowserGetPageTextConfig::not_equal

    BrowserGetPageTextConfig::to_json

    Encodes this value as JSON.

    BrowserHoldKeyConfig

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

    hold_key's config overrides.

    BrowserHoldKeyConfig::equal

    BrowserHoldKeyConfig::from_json

    Decodes this value from JSON.

    BrowserHoldKeyConfig::new

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

    Creates a BrowserHoldKeyConfig with omitted optional fields absent.

    BrowserHoldKeyConfig::not_equal

    BrowserHoldKeyConfig::to_json

    Encodes this value as JSON.

    BrowserHoverConfig

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

    hover's config overrides.

    BrowserHoverConfig::equal

    BrowserHoverConfig::from_json

    Decodes this value from JSON.

    BrowserHoverConfig::new

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

    Creates a BrowserHoverConfig with omitted optional fields absent.

    BrowserHoverConfig::not_equal

    BrowserHoverConfig::to_json

    Encodes this value as JSON.

    BrowserJavascriptExecConfig

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

    javascript_exec's config overrides.

    BrowserJavascriptExecConfig::from_json

    Decodes this value from JSON.

    BrowserJavascriptExecConfig::new

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

    Creates a BrowserJavascriptExecConfig with omitted optional fields absent.

    BrowserJavascriptExecConfig::not_equal

    BrowserJavascriptExecConfig::to_json

    Encodes this value as JSON.

    BrowserKeyConfig

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

    key's config overrides.

    BrowserKeyConfig::equal

    BrowserKeyConfig::from_json

    Decodes this value from JSON.

    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

    BrowserKeyConfig::to_json

    fn BrowserKeyConfig::to_json(self : BrowserKeyConfig) -> Json

    Encodes this value as JSON.

    BrowserLeftClickConfig

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

    left_click's config overrides.

    BrowserLeftClickConfig::equal

    BrowserLeftClickConfig::from_json

    Decodes this value from JSON.

    BrowserLeftClickConfig::new

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

    Creates a BrowserLeftClickConfig with omitted optional fields absent.

    BrowserLeftClickConfig::not_equal

    BrowserLeftClickConfig::to_json

    Encodes this value as JSON.

    BrowserLeftClickDragConfig

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

    left_click_drag's config overrides.

    BrowserLeftClickDragConfig::equal

    BrowserLeftClickDragConfig::from_json

    Decodes this value from JSON.

    BrowserLeftClickDragConfig::new

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

    Creates a BrowserLeftClickDragConfig with omitted optional fields absent.

    BrowserLeftClickDragConfig::not_equal

    BrowserLeftClickDragConfig::to_json

    Encodes this value as JSON.

    BrowserLeftMouseDownConfig

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

    left_mouse_down's config overrides.

    BrowserLeftMouseDownConfig::equal

    BrowserLeftMouseDownConfig::from_json

    Decodes this value from JSON.

    BrowserLeftMouseDownConfig::new

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

    Creates a BrowserLeftMouseDownConfig with omitted optional fields absent.

    BrowserLeftMouseDownConfig::not_equal

    BrowserLeftMouseDownConfig::to_json

    Encodes this value as JSON.

    BrowserLeftMouseUpConfig

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

    left_mouse_up's config overrides.

    BrowserLeftMouseUpConfig::equal

    BrowserLeftMouseUpConfig::from_json

    Decodes this value from JSON.

    BrowserLeftMouseUpConfig::new

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

    Creates a BrowserLeftMouseUpConfig with omitted optional fields absent.

    BrowserLeftMouseUpConfig::not_equal

    BrowserLeftMouseUpConfig::to_json

    Encodes this value as JSON.

    BrowserListTabsConfig

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

    list_tabs's config overrides.

    BrowserListTabsConfig::equal

    BrowserListTabsConfig::from_json

    Decodes this value from JSON.

    BrowserListTabsConfig::new

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

    Creates a BrowserListTabsConfig with omitted optional fields absent.

    BrowserListTabsConfig::not_equal

    BrowserListTabsConfig::to_json

    Encodes this value as JSON.

    BrowserMiddleClickConfig

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

    middle_click's config overrides.

    BrowserMiddleClickConfig::equal

    BrowserMiddleClickConfig::from_json

    Decodes this value from JSON.

    BrowserMiddleClickConfig::new

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

    Creates a BrowserMiddleClickConfig with omitted optional fields absent.

    BrowserMiddleClickConfig::not_equal

    BrowserMiddleClickConfig::to_json

    Encodes this value as JSON.

    BrowserMouseMoveConfig

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

    mouse_move's config overrides.

    BrowserMouseMoveConfig::equal

    BrowserMouseMoveConfig::from_json

    Decodes this value from JSON.

    BrowserMouseMoveConfig::new

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

    Creates a BrowserMouseMoveConfig with omitted optional fields absent.

    BrowserMouseMoveConfig::not_equal

    BrowserMouseMoveConfig::to_json

    Encodes this value as JSON.

    BrowserNavigateConfig

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

    navigate's config overrides.

    BrowserNavigateConfig::equal

    BrowserNavigateConfig::from_json

    Decodes this value from JSON.

    BrowserNavigateConfig::new

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

    Creates a BrowserNavigateConfig with omitted optional fields absent.

    BrowserNavigateConfig::not_equal

    BrowserNavigateConfig::to_json

    Encodes this value as JSON.

    BrowserNewTabConfig

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

    new_tab's config overrides.

    BrowserNewTabConfig::equal

    BrowserNewTabConfig::from_json

    Decodes this value from JSON.

    BrowserNewTabConfig::new

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

    Creates a BrowserNewTabConfig with omitted optional fields absent.

    BrowserNewTabConfig::not_equal

    BrowserNewTabConfig::to_json

    Encodes this value as JSON.

    BrowserReadConsoleConfig

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

    read_console's config overrides.

    BrowserReadConsoleConfig::equal

    BrowserReadConsoleConfig::from_json

    Decodes this value from JSON.

    BrowserReadConsoleConfig::new

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

    Creates a BrowserReadConsoleConfig with omitted optional fields absent.

    BrowserReadConsoleConfig::not_equal

    BrowserReadConsoleConfig::to_json

    Encodes this value as JSON.

    BrowserReadNetworkConfig

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

    read_network's config overrides.

    BrowserReadNetworkConfig::equal

    BrowserReadNetworkConfig::from_json

    Decodes this value from JSON.

    BrowserReadNetworkConfig::new

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

    Creates a BrowserReadNetworkConfig with omitted optional fields absent.

    BrowserReadNetworkConfig::not_equal

    BrowserReadNetworkConfig::to_json

    Encodes this value as JSON.

    BrowserReadPageConfig

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

    read_page's config overrides.

    BrowserReadPageConfig::equal

    BrowserReadPageConfig::from_json

    Decodes this value from JSON.

    BrowserReadPageConfig::new

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

    Creates a BrowserReadPageConfig with omitted optional fields absent.

    BrowserReadPageConfig::not_equal

    BrowserReadPageConfig::to_json

    Encodes this value as JSON.

    BrowserRightClickConfig

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

    right_click's config overrides.

    BrowserRightClickConfig::equal

    BrowserRightClickConfig::from_json

    Decodes this value from JSON.

    BrowserRightClickConfig::new

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

    Creates a BrowserRightClickConfig with omitted optional fields absent.

    BrowserRightClickConfig::not_equal

    BrowserRightClickConfig::to_json

    Encodes this value as JSON.

    BrowserScreenshotConfig

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

    screenshot's config overrides.

    BrowserScreenshotConfig::equal

    BrowserScreenshotConfig::from_json

    Decodes this value from JSON.

    BrowserScreenshotConfig::new

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

    Creates a BrowserScreenshotConfig with omitted optional fields absent.

    BrowserScreenshotConfig::not_equal

    BrowserScreenshotConfig::to_json

    Encodes this value as JSON.

    BrowserScrollConfig

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

    scroll's config overrides.

    BrowserScrollConfig::equal

    BrowserScrollConfig::from_json

    Decodes this value from JSON.

    BrowserScrollConfig::new

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

    Creates a BrowserScrollConfig with omitted optional fields absent.

    BrowserScrollConfig::not_equal

    BrowserScrollConfig::to_json

    Encodes this value as JSON.

    BrowserScrollToConfig

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

    scroll_to's config overrides.

    BrowserScrollToConfig::equal

    BrowserScrollToConfig::from_json

    Decodes this value from JSON.

    BrowserScrollToConfig::new

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

    Creates a BrowserScrollToConfig with omitted optional fields absent.

    BrowserScrollToConfig::not_equal

    BrowserScrollToConfig::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    BrowserStateChangeDownloadCompleted::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    BrowserStateChangeDownloadFailed::to_json

    Encodes this value as JSON.

    BrowserStateChangeDownloadStarted

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

    A file download that started during this call.

    BrowserStateChangeDownloadStarted::from_json

    Decodes this value from JSON.

    BrowserStateChangeDownloadStarted::new

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

    Creates a BrowserStateChangeDownloadStarted with omitted optional fields absent.

    BrowserStateChangeDownloadStarted::not_equal

    BrowserStateChangeDownloadStarted::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    BrowserStateChangeTabOpened::new

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

    Creates a BrowserStateChangeTabOpened with omitted optional fields absent.

    BrowserStateChangeTabOpened::not_equal

    BrowserStateChangeTabOpened::to_json

    Encodes this value as JSON.

    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

    BrowserStateTabEntry::from_json

    Decodes this value from JSON.

    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

    BrowserStateTabEntry::to_json

    Encodes this value as JSON.

    BrowserSwitchTabConfig

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

    switch_tab's config overrides.

    BrowserSwitchTabConfig::equal

    BrowserSwitchTabConfig::from_json

    Decodes this value from JSON.

    BrowserSwitchTabConfig::new

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

    Creates a BrowserSwitchTabConfig with omitted optional fields absent.

    BrowserSwitchTabConfig::not_equal

    BrowserSwitchTabConfig::to_json

    Encodes this value as JSON.

    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

    BrowserToolset20260801::from_json

    Decodes this value from JSON.

    BrowserToolset20260801::new

    Creates a BrowserToolset20260801 with omitted optional fields absent.

    BrowserToolset20260801::not_equal

    BrowserToolset20260801::to_json

    Encodes this value as JSON.

    BrowserToolset20260801CacheControl

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

    Create a cache control breakpoint at this content block.

    BrowserToolset20260801CacheControl::from_json

    Decodes this tagged union from JSON.

    BrowserToolset20260801CacheControl::not_equal

    BrowserToolset20260801CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    BrowserToolsetConfigs::from_json

    Decodes this value from JSON.

    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

    BrowserToolsetConfigs::to_json

    Encodes this value as JSON.

    BrowserTripleClickConfig

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

    triple_click's config overrides.

    BrowserTripleClickConfig::equal

    BrowserTripleClickConfig::from_json

    Decodes this value from JSON.

    BrowserTripleClickConfig::new

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

    Creates a BrowserTripleClickConfig with omitted optional fields absent.

    BrowserTripleClickConfig::not_equal

    BrowserTripleClickConfig::to_json

    Encodes this value as JSON.

    BrowserTypeConfig

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

    type's config overrides.

    BrowserTypeConfig::equal

    BrowserTypeConfig::from_json

    Decodes this value from JSON.

    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

    BrowserTypeConfig::to_json

    Encodes this value as JSON.

    BrowserWaitConfig

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

    wait's config overrides.

    BrowserWaitConfig::equal

    BrowserWaitConfig::from_json

    Decodes this value from JSON.

    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

    BrowserWaitConfig::to_json

    Encodes this value as JSON.

    BrowserZoomConfig

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

    zoom's config overrides.

    BrowserZoomConfig::equal

    BrowserZoomConfig::from_json

    Decodes this value from JSON.

    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

    BrowserZoomConfig::to_json

    Encodes this value as JSON.

    CacheControlEphemeral

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

    Generated representation of CacheControlEphemeral.

    CacheControlEphemeral::equal

    CacheControlEphemeral::from_json

    Decodes this value from JSON.

    CacheControlEphemeral::new

    Creates a CacheControlEphemeral with omitted optional fields absent.

    CacheControlEphemeral::not_equal

    CacheControlEphemeral::to_json

    Encodes this value as JSON.

    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

    CacheControlEphemeralTtl::from_json

    Decodes this string enum from JSON.

    CacheControlEphemeralTtl::not_equal

    CacheControlEphemeralTtl::to_json

    Encodes this string enum as JSON.

    CacheCreation

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

    Generated representation of CacheCreation.

    CacheCreation::equal

    CacheCreation::from_json

    Decodes this value from JSON.

    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

    CacheCreation::to_json

    fn CacheCreation::to_json(self : CacheCreation) -> Json

    Encodes this value as JSON.

    CacheMissMessagesChanged

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

    Generated representation of CacheMissMessagesChanged.

    CacheMissMessagesChanged::equal

    CacheMissMessagesChanged::from_json

    Decodes this value from JSON.

    CacheMissMessagesChanged::new

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

    Creates a CacheMissMessagesChanged with omitted optional fields absent.

    CacheMissMessagesChanged::not_equal

    CacheMissMessagesChanged::to_json

    Encodes this value as JSON.

    CacheMissModelChanged

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

    Generated representation of CacheMissModelChanged.

    CacheMissModelChanged::equal

    CacheMissModelChanged::from_json

    Decodes this value from JSON.

    CacheMissModelChanged::new

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

    Creates a CacheMissModelChanged with omitted optional fields absent.

    CacheMissModelChanged::not_equal

    CacheMissModelChanged::to_json

    Encodes this value as JSON.

    CacheMissPreviousMessageNotFound

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

    Generated representation of CacheMissPreviousMessageNotFound.

    CacheMissPreviousMessageNotFound::from_json

    Decodes this value from JSON.

    CacheMissPreviousMessageNotFound::new

    Creates a CacheMissPreviousMessageNotFound with omitted optional fields absent.

    CacheMissPreviousMessageNotFound::not_equal

    CacheMissPreviousMessageNotFound::to_json

    Encodes this value as JSON.

    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

    CacheMissReason::from_json

    Decodes this tagged union from JSON.

    CacheMissReason::not_equal

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

    CacheMissReason::to_json

    fn CacheMissReason::to_json(self : CacheMissReason) -> Json

    Encodes this tagged union as JSON.

    CacheMissSystemChanged

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

    Generated representation of CacheMissSystemChanged.

    CacheMissSystemChanged::equal

    CacheMissSystemChanged::from_json

    Decodes this value from JSON.

    CacheMissSystemChanged::new

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

    Creates a CacheMissSystemChanged with omitted optional fields absent.

    CacheMissSystemChanged::not_equal

    CacheMissSystemChanged::to_json

    Encodes this value as JSON.

    CacheMissToolsChanged

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

    Generated representation of CacheMissToolsChanged.

    CacheMissToolsChanged::equal

    CacheMissToolsChanged::from_json

    Decodes this value from JSON.

    CacheMissToolsChanged::new

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

    Creates a CacheMissToolsChanged with omitted optional fields absent.

    CacheMissToolsChanged::not_equal

    CacheMissToolsChanged::to_json

    Encodes this value as JSON.

    CacheMissUnavailable

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

    Generated representation of CacheMissUnavailable.

    CacheMissUnavailable::equal

    CacheMissUnavailable::from_json

    Decodes this value from JSON.

    CacheMissUnavailable::new

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

    Creates a CacheMissUnavailable with omitted optional fields absent.

    CacheMissUnavailable::not_equal

    CacheMissUnavailable::to_json

    Encodes this value as JSON.

    CapabilitySupport

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

    Indicates whether a capability is supported.

    CapabilitySupport::equal

    CapabilitySupport::from_json

    Decodes this value from JSON.

    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

    CapabilitySupport::to_json

    Encodes this value as JSON.

    CitationsDelta

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

    Generated representation of CitationsDelta.

    CitationsDelta::equal

    CitationsDelta::from_json

    Decodes this value from JSON.

    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

    CitationsDelta::to_json

    fn CitationsDelta::to_json(self : CitationsDelta) -> Json

    Encodes this value as JSON.

    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

    CitationsDeltaCitation::from_json

    Decodes this tagged union from JSON.

    CitationsDeltaCitation::not_equal

    CitationsDeltaCitation::to_json

    Encodes this tagged union as JSON.

    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

    CodeExecutionTool20250522::from_json

    Decodes this value from JSON.

    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

    CodeExecutionTool20250522::to_json

    Encodes this value as JSON.

    CodeExecutionTool20250522CacheControl

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

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20250522CacheControl::from_json

    Decodes this tagged union from JSON.

    CodeExecutionTool20250522CacheControl::not_equal

    CodeExecutionTool20250522CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    CodeExecutionTool20250825::from_json

    Decodes this value from JSON.

    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

    CodeExecutionTool20250825::to_json

    Encodes this value as JSON.

    CodeExecutionTool20250825CacheControl

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

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20250825CacheControl::from_json

    Decodes this tagged union from JSON.

    CodeExecutionTool20250825CacheControl::not_equal

    CodeExecutionTool20250825CacheControl::to_json

    Encodes this tagged union as JSON.

    CodeExecutionTool20260120

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

    Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).

    CodeExecutionTool20260120::equal

    CodeExecutionTool20260120::from_json

    Decodes this value from JSON.

    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

    CodeExecutionTool20260120::to_json

    Encodes this value as JSON.

    CodeExecutionTool20260120CacheControl

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

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20260120CacheControl::from_json

    Decodes this tagged union from JSON.

    CodeExecutionTool20260120CacheControl::not_equal

    CodeExecutionTool20260120CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    CodeExecutionTool20260521::from_json

    Decodes this value from JSON.

    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

    CodeExecutionTool20260521::to_json

    Encodes this value as JSON.

    CodeExecutionTool20260521CacheControl

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

    Create a cache control breakpoint at this content block.

    CodeExecutionTool20260521CacheControl::from_json

    Decodes this tagged union from JSON.

    CodeExecutionTool20260521CacheControl::not_equal

    CodeExecutionTool20260521CacheControl::to_json

    Encodes this tagged union as JSON.

    CodeExecutionToolResultErrorCode

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

    Generated string enum CodeExecutionToolResultErrorCode.

    CodeExecutionToolResultErrorCode::from_json

    Decodes this string enum from JSON.

    CodeExecutionToolResultErrorCode::not_equal

    CodeExecutionToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    ComputerCursorPositionConfig

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

    cursor_position's config overrides.

    ComputerCursorPositionConfig::from_json

    Decodes this value from JSON.

    ComputerCursorPositionConfig::new

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

    Creates a ComputerCursorPositionConfig with omitted optional fields absent.

    ComputerCursorPositionConfig::not_equal

    ComputerCursorPositionConfig::to_json

    Encodes this value as JSON.

    ComputerDoubleClickConfig

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

    double_click's config overrides.

    ComputerDoubleClickConfig::equal

    ComputerDoubleClickConfig::from_json

    Decodes this value from JSON.

    ComputerDoubleClickConfig::new

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

    Creates a ComputerDoubleClickConfig with omitted optional fields absent.

    ComputerDoubleClickConfig::not_equal

    ComputerDoubleClickConfig::to_json

    Encodes this value as JSON.

    ComputerHoldKeyConfig

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

    hold_key's config overrides.

    ComputerHoldKeyConfig::equal

    ComputerHoldKeyConfig::from_json

    Decodes this value from JSON.

    ComputerHoldKeyConfig::new

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

    Creates a ComputerHoldKeyConfig with omitted optional fields absent.

    ComputerHoldKeyConfig::not_equal

    ComputerHoldKeyConfig::to_json

    Encodes this value as JSON.

    ComputerKeyConfig

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

    key's config overrides.

    ComputerKeyConfig::equal

    ComputerKeyConfig::from_json

    Decodes this value from JSON.

    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

    ComputerKeyConfig::to_json

    Encodes this value as JSON.

    ComputerLeftClickConfig

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

    left_click's config overrides.

    ComputerLeftClickConfig::equal

    ComputerLeftClickConfig::from_json

    Decodes this value from JSON.

    ComputerLeftClickConfig::new

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

    Creates a ComputerLeftClickConfig with omitted optional fields absent.

    ComputerLeftClickConfig::not_equal

    ComputerLeftClickConfig::to_json

    Encodes this value as JSON.

    ComputerLeftClickDragConfig

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

    left_click_drag's config overrides.

    ComputerLeftClickDragConfig::from_json

    Decodes this value from JSON.

    ComputerLeftClickDragConfig::new

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

    Creates a ComputerLeftClickDragConfig with omitted optional fields absent.

    ComputerLeftClickDragConfig::not_equal

    ComputerLeftClickDragConfig::to_json

    Encodes this value as JSON.

    ComputerLeftMouseDownConfig

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

    left_mouse_down's config overrides.

    ComputerLeftMouseDownConfig::from_json

    Decodes this value from JSON.

    ComputerLeftMouseDownConfig::new

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

    Creates a ComputerLeftMouseDownConfig with omitted optional fields absent.

    ComputerLeftMouseDownConfig::not_equal

    ComputerLeftMouseDownConfig::to_json

    Encodes this value as JSON.

    ComputerLeftMouseUpConfig

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

    left_mouse_up's config overrides.

    ComputerLeftMouseUpConfig::equal

    ComputerLeftMouseUpConfig::from_json

    Decodes this value from JSON.

    ComputerLeftMouseUpConfig::new

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

    Creates a ComputerLeftMouseUpConfig with omitted optional fields absent.

    ComputerLeftMouseUpConfig::not_equal

    ComputerLeftMouseUpConfig::to_json

    Encodes this value as JSON.

    ComputerMiddleClickConfig

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

    middle_click's config overrides.

    ComputerMiddleClickConfig::equal

    ComputerMiddleClickConfig::from_json

    Decodes this value from JSON.

    ComputerMiddleClickConfig::new

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

    Creates a ComputerMiddleClickConfig with omitted optional fields absent.

    ComputerMiddleClickConfig::not_equal

    ComputerMiddleClickConfig::to_json

    Encodes this value as JSON.

    ComputerMouseMoveConfig

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

    mouse_move's config overrides.

    ComputerMouseMoveConfig::equal

    ComputerMouseMoveConfig::from_json

    Decodes this value from JSON.

    ComputerMouseMoveConfig::new

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

    Creates a ComputerMouseMoveConfig with omitted optional fields absent.

    ComputerMouseMoveConfig::not_equal

    ComputerMouseMoveConfig::to_json

    Encodes this value as JSON.

    ComputerRightClickConfig

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

    right_click's config overrides.

    ComputerRightClickConfig::equal

    ComputerRightClickConfig::from_json

    Decodes this value from JSON.

    ComputerRightClickConfig::new

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

    Creates a ComputerRightClickConfig with omitted optional fields absent.

    ComputerRightClickConfig::not_equal

    ComputerRightClickConfig::to_json

    Encodes this value as JSON.

    ComputerScreenshotConfig

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

    screenshot's config overrides.

    ComputerScreenshotConfig::equal

    ComputerScreenshotConfig::from_json

    Decodes this value from JSON.

    ComputerScreenshotConfig::new

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

    Creates a ComputerScreenshotConfig with omitted optional fields absent.

    ComputerScreenshotConfig::not_equal

    ComputerScreenshotConfig::to_json

    Encodes this value as JSON.

    ComputerScrollConfig

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

    scroll's config overrides.

    ComputerScrollConfig::equal

    ComputerScrollConfig::from_json

    Decodes this value from JSON.

    ComputerScrollConfig::new

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

    Creates a ComputerScrollConfig with omitted optional fields absent.

    ComputerScrollConfig::not_equal

    ComputerScrollConfig::to_json

    Encodes this value as JSON.

    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

    ComputerToolset20260801::from_json

    Decodes this value from JSON.

    ComputerToolset20260801::new

    Creates a ComputerToolset20260801 with omitted optional fields absent.

    ComputerToolset20260801::not_equal

    ComputerToolset20260801::to_json

    Encodes this value as JSON.

    ComputerToolset20260801CacheControl

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

    Create a cache control breakpoint at this content block.

    ComputerToolset20260801CacheControl::from_json

    Decodes this tagged union from JSON.

    ComputerToolset20260801CacheControl::not_equal

    ComputerToolset20260801CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    ComputerToolsetConfigs::from_json

    Decodes this value from JSON.

    ComputerToolsetConfigs::new

    Creates a ComputerToolsetConfigs with omitted optional fields absent.

    ComputerToolsetConfigs::not_equal

    ComputerToolsetConfigs::to_json

    Encodes this value as JSON.

    ComputerTripleClickConfig

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

    triple_click's config overrides.

    ComputerTripleClickConfig::equal

    ComputerTripleClickConfig::from_json

    Decodes this value from JSON.

    ComputerTripleClickConfig::new

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

    Creates a ComputerTripleClickConfig with omitted optional fields absent.

    ComputerTripleClickConfig::not_equal

    ComputerTripleClickConfig::to_json

    Encodes this value as JSON.

    ComputerTypeConfig

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

    type's config overrides.

    ComputerTypeConfig::equal

    ComputerTypeConfig::from_json

    Decodes this value from JSON.

    ComputerTypeConfig::new

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

    Creates a ComputerTypeConfig with omitted optional fields absent.

    ComputerTypeConfig::not_equal

    ComputerTypeConfig::to_json

    Encodes this value as JSON.

    ComputerWaitConfig

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

    wait's config overrides.

    ComputerWaitConfig::equal

    ComputerWaitConfig::from_json

    Decodes this value from JSON.

    ComputerWaitConfig::new

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

    Creates a ComputerWaitConfig with omitted optional fields absent.

    ComputerWaitConfig::not_equal

    ComputerWaitConfig::to_json

    Encodes this value as JSON.

    ComputerZoomConfig

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

    zoom's config overrides.

    ComputerZoomConfig::equal

    ComputerZoomConfig::from_json

    Decodes this value from JSON.

    ComputerZoomConfig::new

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

    Creates a ComputerZoomConfig with omitted optional fields absent.

    ComputerZoomConfig::not_equal

    ComputerZoomConfig::to_json

    Encodes this value as JSON.

    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)
    impl ToJson for Container

    Container::equal

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

    Container::from_json

    Decodes this value from JSON.

    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

    Container::to_json

    fn Container::to_json(self : Container) -> Json

    Encodes this value as JSON.

    ContainerParams

    Container parameters with skills to be loaded.

    ContainerParams::equal

    ContainerParams::from_json

    Decodes this value from JSON.

    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

    ContainerParams::to_json

    fn ContainerParams::to_json(self : ContainerParams) -> Json

    Encodes this value as JSON.

    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

    ContainerSkill::from_json

    Decodes this value from JSON.

    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

    ContainerSkill::to_json

    fn ContainerSkill::to_json(self : ContainerSkill) -> Json

    Encodes this value as JSON.

    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

    ContainerSkillType::from_json

    Decodes this string enum from JSON.

    ContainerSkillType::not_equal

    ContainerSkillType::to_json

    Encodes this string enum as JSON.

    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

    ContentBlock::from_json

    Decodes this tagged union from JSON.

    ContentBlock::not_equal

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

    ContentBlock::to_json

    fn ContentBlock::to_json(self : ContentBlock) -> Json

    Encodes this tagged union as JSON.

    ContentBlockDeltaEvent

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

    Generated representation of ContentBlockDeltaEvent.

    ContentBlockDeltaEvent::equal

    ContentBlockDeltaEvent::from_json

    Decodes this value from JSON.

    ContentBlockDeltaEvent::new

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

    Creates a ContentBlockDeltaEvent with omitted optional fields absent.

    ContentBlockDeltaEvent::not_equal

    ContentBlockDeltaEvent::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    ContentBlockDeltaEventDelta::not_equal

    ContentBlockDeltaEventDelta::to_json

    Encodes this tagged union as JSON.

    ContentBlockSource

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

    Generated representation of ContentBlockSource.

    ContentBlockSource::equal

    ContentBlockSource::from_json

    Decodes this value from JSON.

    ContentBlockSource::new

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

    Creates a ContentBlockSource with omitted optional fields absent.

    ContentBlockSource::not_equal

    ContentBlockSource::to_json

    Encodes this value as JSON.

    ContentBlockSourceContent

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

    Generated untagged union ContentBlockSourceContent.

    ContentBlockSourceContent::equal

    ContentBlockSourceContent::from_json

    Decodes this union from JSON.

    ContentBlockSourceContent::not_equal

    ContentBlockSourceContent::to_json

    Encodes this union as JSON.

    ContentBlockSourceContentValueArrayItem

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

    Generated tagged union ContentBlockSourceContentValueArrayItem.

    ContentBlockSourceContentValueArrayItem::from_json

    Decodes this tagged union from JSON.

    ContentBlockSourceContentValueArrayItem::not_equal

    ContentBlockSourceContentValueArrayItem::to_json

    Encodes this tagged union as JSON.

    ContentBlockStartEvent

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

    Generated representation of ContentBlockStartEvent.

    ContentBlockStartEvent::equal

    ContentBlockStartEvent::from_json

    Decodes this value from JSON.

    ContentBlockStartEvent::new

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

    Creates a ContentBlockStartEvent with omitted optional fields absent.

    ContentBlockStartEvent::not_equal

    ContentBlockStartEvent::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    ContentBlockStartEventContentBlock::not_equal

    ContentBlockStartEventContentBlock::to_json

    Encodes this tagged union as JSON.

    ContentBlockStopEvent

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

    Generated representation of ContentBlockStopEvent.

    ContentBlockStopEvent::equal

    ContentBlockStopEvent::from_json

    Decodes this value from JSON.

    ContentBlockStopEvent::new

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

    Creates a ContentBlockStopEvent with omitted optional fields absent.

    ContentBlockStopEvent::not_equal

    ContentBlockStopEvent::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ContextManagementCapability::to_json

    Encodes this value as JSON.

    CountMessageTokensParams

    pub(all) struct CountMessageTokensParams {
    cache_control :
    Presence
    [CountMessageTokensParamsCacheControl]
    messages : Array[InputMessage]
    model : String
    output_config : OutputConfig?
    system : CountMessageTokensParamsSystem?
    thinking : ThinkingConfigParam?
    tool_choice : ToolChoice?
    tools : Array[CountMessageTokensParamsToolsItem]?
    } derive(Eq,
    Debug
    )

    Generated representation of CountMessageTokensParams.

    CountMessageTokensParams::equal

    CountMessageTokensParams::from_json

    Decodes this value from JSON.

    CountMessageTokensParams::new

    Creates a CountMessageTokensParams with omitted optional fields absent.

    CountMessageTokensParams::not_equal

    CountMessageTokensParams::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    CountMessageTokensParamsCacheControl::not_equal

    CountMessageTokensParamsCacheControl::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this union from JSON.

    CountMessageTokensParamsSystem::not_equal

    CountMessageTokensParamsSystem::to_json

    Encodes this union as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    CountMessageTokensParamsToolsItem::not_equal

    CountMessageTokensParamsToolsItem::to_json

    Encodes this tagged union as JSON.

    CountMessageTokensResponse

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

    Generated representation of CountMessageTokensResponse.

    CountMessageTokensResponse::equal

    CountMessageTokensResponse::from_json

    Decodes this value from JSON.

    CountMessageTokensResponse::new

    Creates a CountMessageTokensResponse with omitted optional fields absent.

    CountMessageTokensResponse::not_equal

    CountMessageTokensResponse::to_json

    Encodes this value as JSON.

    CreateMessageParams

    pub(all) struct CreateMessageParams {
    model : String
    messages : Array[InputMessage]
    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?
    stop_sequences : Array[String]?
    stream : Bool?
    system : CreateMessageParamsSystem?
    temperature : Double?
    thinking : ThinkingConfigParam?
    tool_choice : ToolChoice?
    tools : Array[CreateMessageParamsToolsItem]?
    top_k : Int?
    top_p : Double?
    } derive(Eq,
    Debug
    )

    Generated representation of CreateMessageParams.

    CreateMessageParams::equal

    CreateMessageParams::from_json

    Decodes this value from JSON.

    CreateMessageParams::new

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

    Creates a CreateMessageParams with omitted optional fields absent.

    CreateMessageParams::not_equal

    CreateMessageParams::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    CreateMessageParamsCacheControl::not_equal

    CreateMessageParamsCacheControl::to_json

    Encodes this tagged union as JSON.

    CreateMessageParamsContainer

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

    Container identifier for reuse across requests.

    CreateMessageParamsContainer::from_json

    Decodes this union from JSON.

    CreateMessageParamsContainer::not_equal

    CreateMessageParamsContainer::to_json

    Encodes this union as JSON.

    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::from_json

    Decodes this string enum from JSON.

    CreateMessageParamsServiceTier::not_equal

    CreateMessageParamsServiceTier::to_json

    Encodes this string enum as JSON.

    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

    CreateMessageParamsSystem::from_json

    Decodes this union from JSON.

    CreateMessageParamsSystem::not_equal

    CreateMessageParamsSystem::to_json

    Encodes this union as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    CreateMessageParamsToolsItem::not_equal

    CreateMessageParamsToolsItem::to_json

    Encodes this tagged union as JSON.

    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

    Diagnostics::from_json

    Decodes this value from JSON.

    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

    Diagnostics::to_json

    fn Diagnostics::to_json(self : Diagnostics) -> Json

    Encodes this value as JSON.

    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

    DiagnosticsParam::from_json

    Decodes this value from JSON.

    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

    DiagnosticsParam::to_json

    fn DiagnosticsParam::to_json(self : DiagnosticsParam) -> Json

    Encodes this value as JSON.

    DirectCaller

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

    Tool invocation directly from the model.

    DirectCaller::equal

    DirectCaller::from_json

    Decodes this value from JSON.

    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

    DirectCaller::to_json

    fn DirectCaller::to_json(self : DirectCaller) -> Json

    Encodes this value as JSON.

    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

    EffortCapability::from_json

    Decodes this value from JSON.

    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

    EffortCapability::to_json

    fn EffortCapability::to_json(self : EffortCapability) -> Json

    Encodes this value as JSON.

    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

    EffortLevel::from_json

    Decodes this string enum from JSON.

    EffortLevel::not_equal

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

    EffortLevel::to_json

    fn EffortLevel::to_json(self : EffortLevel) -> Json

    Encodes this string enum as JSON.

    ErrorResponse

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

    Generated representation of ErrorResponse.

    ErrorResponse::equal

    ErrorResponse::from_json

    Decodes this value from JSON.

    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

    ErrorResponse::to_json

    fn ErrorResponse::to_json(self : ErrorResponse) -> Json

    Encodes this value as JSON.

    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

    ErrorResponseError::from_json

    Decodes this tagged union from JSON.

    ErrorResponseError::not_equal

    ErrorResponseError::to_json

    Encodes this tagged union as JSON.

    FileDocumentSource

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

    Generated representation of FileDocumentSource.

    FileDocumentSource::equal

    FileDocumentSource::from_json

    Decodes this value from JSON.

    FileDocumentSource::new

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

    Creates a FileDocumentSource with omitted optional fields absent.

    FileDocumentSource::not_equal

    FileDocumentSource::to_json

    Encodes this value as JSON.

    FileImageSource

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

    Generated representation of FileImageSource.

    FileImageSource::equal

    FileImageSource::from_json

    Decodes this value from JSON.

    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

    FileImageSource::to_json

    fn FileImageSource::to_json(self : FileImageSource) -> Json

    Encodes this value as JSON.

    GatewayTimeoutError

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

    Generated representation of GatewayTimeoutError.

    GatewayTimeoutError::equal

    GatewayTimeoutError::from_json

    Decodes this value from JSON.

    GatewayTimeoutError::new

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

    Creates a GatewayTimeoutError with omitted optional fields absent.

    GatewayTimeoutError::not_equal

    GatewayTimeoutError::to_json

    Encodes this value as JSON.

    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

    InputContentBlock::from_json

    Decodes this tagged union from JSON.

    InputContentBlock::not_equal

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

    InputContentBlock::to_json

    Encodes this tagged union as JSON.

    InputJsonContentBlockDelta

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

    Generated representation of InputJsonContentBlockDelta.

    InputJsonContentBlockDelta::equal

    InputJsonContentBlockDelta::from_json

    Decodes this value from JSON.

    InputJsonContentBlockDelta::new

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

    Creates a InputJsonContentBlockDelta with omitted optional fields absent.

    InputJsonContentBlockDelta::not_equal

    InputJsonContentBlockDelta::to_json

    Encodes this value as JSON.

    InputMessage

    pub(all) struct InputMessage {
    content : InputMessageContent
    role : InputMessageRole
    } derive(Eq,
    Debug
    )

    Generated representation of InputMessage.

    InputMessage::equal

    InputMessage::from_json

    Decodes this value from JSON.

    InputMessage::new

    Creates a InputMessage with omitted optional fields absent.

    InputMessage::not_equal

    fn InputMessage::not_equal(x : InputMessage, y : InputMessage) -> Bool

    InputMessage::to_json

    fn InputMessage::to_json(self : InputMessage) -> Json

    Encodes this value as JSON.

    InputMessageContent

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

    Generated untagged union InputMessageContent.

    InputMessageContent::equal

    InputMessageContent::from_json

    Decodes this union from JSON.

    InputMessageContent::not_equal

    InputMessageContent::to_json

    Encodes this union as JSON.

    InputMessageRole

    pub(all) enum InputMessageRole {
    User
    Assistant
    System
    Custom(String)
    } derive(Eq,
    Debug
    )

    Generated string enum InputMessageRole.

    InputMessageRole::equal

    InputMessageRole::from_json

    Decodes this string enum from JSON.

    InputMessageRole::not_equal

    fn InputMessageRole::not_equal(x : InputMessageRole, y : InputMessageRole) -> Bool

    InputMessageRole::to_json

    fn InputMessageRole::to_json(self : InputMessageRole) -> Json

    Encodes this string enum as JSON.

    InvalidRequestError

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

    Generated representation of InvalidRequestError.

    InvalidRequestError::equal

    InvalidRequestError::from_json

    Decodes this value from JSON.

    InvalidRequestError::new

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

    Creates a InvalidRequestError with omitted optional fields absent.

    InvalidRequestError::not_equal

    InvalidRequestError::to_json

    Encodes this value as JSON.

    JsonOutputFormat

    pub(all) struct JsonOutputFormat {
    schema : Json
    } derive(Eq,
    Debug
    )

    Generated representation of JsonOutputFormat.

    JsonOutputFormat::equal

    JsonOutputFormat::from_json

    Decodes this value from JSON.

    JsonOutputFormat::new

    fn JsonOutputFormat::new(schema~ : Json) -> JsonOutputFormat

    Creates a JsonOutputFormat with omitted optional fields absent.

    JsonOutputFormat::not_equal

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

    JsonOutputFormat::to_json

    fn JsonOutputFormat::to_json(self : JsonOutputFormat) -> Json

    Encodes this value as JSON.

    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

    ListResponseModelInfo::from_json

    Decodes this value from JSON.

    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

    ListResponseModelInfo::to_json

    Encodes this value as JSON.

    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

    MemoryTool20250818::from_json

    Decodes this value from JSON.

    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

    MemoryTool20250818::to_json

    Encodes this value as JSON.

    MemoryTool20250818CacheControl

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

    Create a cache control breakpoint at this content block.

    MemoryTool20250818CacheControl::from_json

    Decodes this tagged union from JSON.

    MemoryTool20250818CacheControl::not_equal

    MemoryTool20250818CacheControl::to_json

    Encodes this tagged union as JSON.

    Message

    Generated representation of Message.
    impl ToJson for Message

    Message::equal

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

    Message::from_json

    Decodes this value from JSON.

    Message::new

    fn Message::new(id~ : String, content~ : Array[ContentBlock], model~ : String, usage~ : Usage, stop_reason? : StopReason, stop_sequence? : String, stop_details? : RefusalStopDetails, 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

    Message::to_json

    fn Message::to_json(self : Message) -> Json

    Encodes this value as JSON.

    Message::to_repr

    MessageDelta

    Generated representation of MessageDelta.

    MessageDelta::equal

    MessageDelta::from_json

    Decodes this value from JSON.

    MessageDelta::new

    fn MessageDelta::new(container? : Container, stop_details? : RefusalStopDetails, 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

    MessageDelta::to_json

    fn MessageDelta::to_json(self : MessageDelta) -> Json

    Encodes this value as JSON.

    MessageDeltaEvent

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

    Generated representation of MessageDeltaEvent.

    MessageDeltaEvent::equal

    MessageDeltaEvent::from_json

    Decodes this value from JSON.

    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

    MessageDeltaEvent::to_json

    Encodes this value as JSON.

    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

    MessageDeltaUsage::from_json

    Decodes this value from JSON.

    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

    MessageDeltaUsage::to_json

    Encodes this value as JSON.

    MessageStartEvent

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

    Generated representation of MessageStartEvent.

    MessageStartEvent::equal

    MessageStartEvent::from_json

    Decodes this value from JSON.

    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

    MessageStartEvent::to_json

    Encodes this value as JSON.

    MessageStopEvent

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

    Generated representation of MessageStopEvent.

    MessageStopEvent::equal

    MessageStopEvent::from_json

    Decodes this value from JSON.

    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

    MessageStopEvent::to_json

    fn MessageStopEvent::to_json(self : MessageStopEvent) -> Json

    Encodes this value as JSON.

    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

    MessageStreamEvent::from_json

    Decodes this tagged union from JSON.

    MessageStreamEvent::not_equal

    MessageStreamEvent::to_json

    Encodes this tagged union as JSON.

    Metadata

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

    Generated representation of Metadata.
    impl ToJson for Metadata

    Metadata::equal

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

    Metadata::from_json

    Decodes this value from JSON.

    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

    Metadata::to_json

    fn Metadata::to_json(self : Metadata) -> Json

    Encodes this value as JSON.

    Metadata::to_repr

    ModelCapabilities

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

    Model capability information.

    ModelCapabilities::equal

    ModelCapabilities::from_json

    Decodes this value from JSON.

    ModelCapabilities::new

    fn ModelCapabilities::new(batch~ : CapabilitySupport, citations~ : CapabilitySupport, code_execution~ : CapabilitySupport, context_management~ : ContextManagementCapability, effort~ : EffortCapability, image_input~ : CapabilitySupport, pdf_input~ : CapabilitySupport, 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

    ModelCapabilities::to_json

    Encodes this value as JSON.

    ModelInfo

    pub(all) struct ModelInfo {
    capabilities : ModelCapabilities?
    created_at : String
    display_name : String
    id : String
    max_input_tokens : Int?
    max_tokens : Int?
    } derive(Eq,
    Debug
    )

    Generated representation of ModelInfo.
    impl ToJson for ModelInfo

    ModelInfo::equal

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

    ModelInfo::from_json

    Decodes this value from JSON.

    ModelInfo::new

    fn ModelInfo::new(created_at~ : String, display_name~ : String, id~ : String, capabilities? : ModelCapabilities, max_input_tokens? : Int, max_tokens? : Int) -> ModelInfo

    Creates a ModelInfo with omitted optional fields absent.

    ModelInfo::not_equal

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

    ModelInfo::to_json

    fn ModelInfo::to_json(self : ModelInfo) -> Json

    Encodes this value as JSON.

    NotFoundError

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

    Generated representation of NotFoundError.

    NotFoundError::equal

    NotFoundError::from_json

    Decodes this value from JSON.

    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

    NotFoundError::to_json

    fn NotFoundError::to_json(self : NotFoundError) -> Json

    Encodes this value as JSON.

    OutputConfig

    Generated representation of OutputConfig.

    OutputConfig::equal

    OutputConfig::from_json

    Decodes this value from JSON.

    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

    OutputConfig::to_json

    fn OutputConfig::to_json(self : OutputConfig) -> Json

    Encodes this value as JSON.

    OutputTokensDetails

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

    Generated representation of OutputTokensDetails.

    OutputTokensDetails::equal

    OutputTokensDetails::from_json

    Decodes this value from JSON.

    OutputTokensDetails::new

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

    Creates a OutputTokensDetails with omitted optional fields absent.

    OutputTokensDetails::not_equal

    OutputTokensDetails::to_json

    Encodes this value as JSON.

    OverloadedError

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

    Generated representation of OverloadedError.

    OverloadedError::equal

    OverloadedError::from_json

    Decodes this value from JSON.

    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

    OverloadedError::to_json

    fn OverloadedError::to_json(self : OverloadedError) -> Json

    Encodes this value as JSON.

    PermissionError

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

    Generated representation of PermissionError.

    PermissionError::equal

    PermissionError::from_json

    Decodes this value from JSON.

    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

    PermissionError::to_json

    fn PermissionError::to_json(self : PermissionError) -> Json

    Encodes this value as JSON.

    PlainTextSource

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

    Generated representation of PlainTextSource.

    PlainTextSource::equal

    PlainTextSource::from_json

    Decodes this value from JSON.

    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

    PlainTextSource::to_json

    fn PlainTextSource::to_json(self : PlainTextSource) -> Json

    Encodes this value as JSON.

    RateLimitError

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

    Generated representation of RateLimitError.

    RateLimitError::equal

    RateLimitError::from_json

    Decodes this value from JSON.

    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

    RateLimitError::to_json

    fn RateLimitError::to_json(self : RateLimitError) -> Json

    Encodes this value as JSON.

    RefusalCategory

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

    The policy category that triggered a refusal.

    RefusalCategory::equal

    RefusalCategory::from_json

    Decodes this string enum from JSON.

    RefusalCategory::not_equal

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

    RefusalCategory::to_json

    fn RefusalCategory::to_json(self : RefusalCategory) -> Json

    Encodes this string enum as JSON.

    RefusalStopDetails

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

    Structured information about a refusal.

    RefusalStopDetails::equal

    RefusalStopDetails::from_json

    Decodes this value from JSON.

    RefusalStopDetails::new

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

    Creates a RefusalStopDetails with omitted optional fields absent.

    RefusalStopDetails::not_equal

    RefusalStopDetails::to_json

    Encodes this value as JSON.

    RequestBashCodeExecutionOutputBlock

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

    Generated representation of RequestBashCodeExecutionOutputBlock.

    RequestBashCodeExecutionOutputBlock::from_json

    Decodes this value from JSON.

    RequestBashCodeExecutionOutputBlock::new

    Creates a RequestBashCodeExecutionOutputBlock with omitted optional fields absent.

    RequestBashCodeExecutionOutputBlock::not_equal

    RequestBashCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestBashCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestBashCodeExecutionToolResultBlock::new

    Creates a RequestBashCodeExecutionToolResultBlock with omitted optional fields absent.

    RequestBashCodeExecutionToolResultBlock::not_equal

    RequestBashCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    RequestBashCodeExecutionToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestBashCodeExecutionToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestBashCodeExecutionToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestBashCodeExecutionToolResultBlockContent

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

    Generated tagged union RequestBashCodeExecutionToolResultBlockContent.

    RequestBashCodeExecutionToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    RequestBashCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestBashCodeExecutionToolResultError

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

    Generated representation of RequestBashCodeExecutionToolResultError.

    RequestBashCodeExecutionToolResultError::from_json

    Decodes this value from JSON.

    RequestBashCodeExecutionToolResultError::new

    Creates a RequestBashCodeExecutionToolResultError with omitted optional fields absent.

    RequestBashCodeExecutionToolResultError::not_equal

    RequestBashCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    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

    RequestBrowserStateBlock::from_json

    Decodes this value from JSON.

    RequestBrowserStateBlock::new

    Creates a RequestBrowserStateBlock with omitted optional fields absent.

    RequestBrowserStateBlock::not_equal

    RequestBrowserStateBlock::to_json

    Encodes this value as JSON.

    RequestBrowserStateBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestBrowserStateBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestBrowserStateBlockCacheControl::not_equal

    RequestBrowserStateBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestBrowserStateBlockStateChangesItem

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

    Generated tagged union RequestBrowserStateBlockStateChangesItem.

    RequestBrowserStateBlockStateChangesItem::from_json

    Decodes this tagged union from JSON.

    RequestBrowserStateBlockStateChangesItem::not_equal

    RequestBrowserStateBlockStateChangesItem::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestCharLocationCitation::to_json

    Encodes this value as JSON.

    RequestCitationsConfig

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

    Generated representation of RequestCitationsConfig.

    RequestCitationsConfig::equal

    RequestCitationsConfig::from_json

    Decodes this value from JSON.

    RequestCitationsConfig::new

    Creates a RequestCitationsConfig with omitted optional fields absent.

    RequestCitationsConfig::not_equal

    RequestCitationsConfig::to_json

    Encodes this value as JSON.

    RequestCodeExecutionOutputBlock

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

    Generated representation of RequestCodeExecutionOutputBlock.

    RequestCodeExecutionOutputBlock::from_json

    Decodes this value from JSON.

    RequestCodeExecutionOutputBlock::new

    Creates a RequestCodeExecutionOutputBlock with omitted optional fields absent.

    RequestCodeExecutionOutputBlock::not_equal

    RequestCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestCodeExecutionToolResultBlock::new

    Creates a RequestCodeExecutionToolResultBlock with omitted optional fields absent.

    RequestCodeExecutionToolResultBlock::not_equal

    RequestCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    RequestCodeExecutionToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestCodeExecutionToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestCodeExecutionToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestCodeExecutionToolResultBlockContent

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

    Generated tagged union RequestCodeExecutionToolResultBlockContent.

    RequestCodeExecutionToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    RequestCodeExecutionToolResultBlockContent::not_equal

    RequestCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestCodeExecutionToolResultError

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

    Generated representation of RequestCodeExecutionToolResultError.

    RequestCodeExecutionToolResultError::from_json

    Decodes this value from JSON.

    RequestCodeExecutionToolResultError::new

    Creates a RequestCodeExecutionToolResultError with omitted optional fields absent.

    RequestCodeExecutionToolResultError::not_equal

    RequestCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestContainerUploadBlock::to_json

    Encodes this value as JSON.

    RequestContainerUploadBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestContainerUploadBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestContainerUploadBlockCacheControl::not_equal

    RequestContainerUploadBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestContentBlockLocationCitation::to_json

    Encodes this value as JSON.

    RequestDocumentBlock

    Generated representation of RequestDocumentBlock.

    RequestDocumentBlock::equal

    RequestDocumentBlock::from_json

    Decodes this value from JSON.

    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

    RequestDocumentBlock::to_json

    Encodes this value as JSON.

    RequestDocumentBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestDocumentBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestDocumentBlockCacheControl::not_equal

    RequestDocumentBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    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

    RequestDocumentBlockSource::from_json

    Decodes this tagged union from JSON.

    RequestDocumentBlockSource::not_equal

    RequestDocumentBlockSource::to_json

    Encodes this tagged union as JSON.

    RequestEncryptedCodeExecutionResultBlock

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

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

    RequestEncryptedCodeExecutionResultBlock::from_json

    Decodes this value from JSON.

    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

    RequestEncryptedCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    RequestImageBlock

    Generated representation of RequestImageBlock.

    RequestImageBlock::equal

    RequestImageBlock::from_json

    Decodes this value from JSON.

    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

    RequestImageBlock::to_json

    Encodes this value as JSON.

    RequestImageBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestImageBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestImageBlockCacheControl::not_equal

    RequestImageBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestImageBlockSource

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

    Generated tagged union RequestImageBlockSource.

    RequestImageBlockSource::equal

    RequestImageBlockSource::from_json

    Decodes this tagged union from JSON.

    RequestImageBlockSource::not_equal

    RequestImageBlockSource::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestImageTransformations::new

    Creates a RequestImageTransformations with omitted optional fields absent.

    RequestImageTransformations::not_equal

    RequestImageTransformations::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this string enum from JSON.

    RequestImageTransformationsOversizedImage::not_equal

    RequestImageTransformationsOversizedImage::to_json

    Encodes this string enum as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestPageLocationCitation::to_json

    Encodes this value as JSON.

    RequestRedactedThinkingBlock

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

    Generated representation of RequestRedactedThinkingBlock.

    RequestRedactedThinkingBlock::from_json

    Decodes this value from JSON.

    RequestRedactedThinkingBlock::new

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

    Creates a RequestRedactedThinkingBlock with omitted optional fields absent.

    RequestRedactedThinkingBlock::not_equal

    RequestRedactedThinkingBlock::to_json

    Encodes this value as JSON.

    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

    RequestSearchResultBlock::from_json

    Decodes this value from JSON.

    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

    RequestSearchResultBlock::to_json

    Encodes this value as JSON.

    RequestSearchResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestSearchResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestSearchResultBlockCacheControl::not_equal

    RequestSearchResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    RequestServerToolUseBlock

    pub(all) struct RequestServerToolUseBlock {
    cache_control :
    Presence
    [RequestServerToolUseBlockCacheControl]
    caller : RequestServerToolUseBlockCaller?
    id : String
    input : Json
    name : RequestServerToolUseBlockName
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of RequestServerToolUseBlock.

    RequestServerToolUseBlock::equal

    RequestServerToolUseBlock::from_json

    Decodes this value from JSON.

    RequestServerToolUseBlock::new

    Creates a RequestServerToolUseBlock with omitted optional fields absent.

    RequestServerToolUseBlock::not_equal

    RequestServerToolUseBlock::to_json

    Encodes this value as JSON.

    RequestServerToolUseBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestServerToolUseBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestServerToolUseBlockCacheControl::not_equal

    RequestServerToolUseBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestServerToolUseBlockCaller

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

    Generated tagged union RequestServerToolUseBlockCaller.

    RequestServerToolUseBlockCaller::from_json

    Decodes this tagged union from JSON.

    RequestServerToolUseBlockCaller::not_equal

    RequestServerToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestServerToolUseBlockName

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

    Generated string enum RequestServerToolUseBlockName.

    RequestServerToolUseBlockName::from_json

    Decodes this string enum from JSON.

    RequestServerToolUseBlockName::not_equal

    RequestServerToolUseBlockName::to_json

    Encodes this string enum as JSON.

    RequestTextBlock

    Generated representation of RequestTextBlock.

    RequestTextBlock::equal

    RequestTextBlock::from_json

    Decodes this value from JSON.

    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

    RequestTextBlock::to_json

    fn RequestTextBlock::to_json(self : RequestTextBlock) -> Json

    Encodes this value as JSON.

    RequestTextBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestTextBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestTextBlockCacheControl::not_equal

    RequestTextBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    RequestTextBlockCitationsItem::not_equal

    RequestTextBlockCitationsItem::to_json

    Encodes this tagged union as JSON.

    RequestTextEditorCodeExecutionCreateResultBlock

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

    Generated representation of RequestTextEditorCodeExecutionCreateResultBlock.

    RequestTextEditorCodeExecutionCreateResultBlock::from_json

    Decodes this value from JSON.

    RequestTextEditorCodeExecutionCreateResultBlock::new

    Creates a RequestTextEditorCodeExecutionCreateResultBlock with omitted optional fields absent.

    RequestTextEditorCodeExecutionCreateResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestTextEditorCodeExecutionToolResultBlock::new

    Creates a RequestTextEditorCodeExecutionToolResultBlock with omitted optional fields absent.

    RequestTextEditorCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestTextEditorCodeExecutionToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestTextEditorCodeExecutionToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestTextEditorCodeExecutionToolResultBlockContent

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

    Generated tagged union RequestTextEditorCodeExecutionToolResultBlockContent.

    RequestTextEditorCodeExecutionToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    RequestTextEditorCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestTextEditorCodeExecutionToolResultError

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

    Generated representation of RequestTextEditorCodeExecutionToolResultError.

    RequestTextEditorCodeExecutionToolResultError::from_json

    Decodes this value from JSON.

    RequestTextEditorCodeExecutionToolResultError::new

    Creates a RequestTextEditorCodeExecutionToolResultError with omitted optional fields absent.

    RequestTextEditorCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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::to_json

    Encodes this value as JSON.

    RequestTextEditorCodeExecutionViewResultBlockFileType

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

    Generated string enum RequestTextEditorCodeExecutionViewResultBlockFileType.

    RequestTextEditorCodeExecutionViewResultBlockFileType::from_json

    Decodes this string enum from JSON.

    RequestTextEditorCodeExecutionViewResultBlockFileType::to_json

    Encodes this string enum as JSON.

    RequestThinkingBlock

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

    Generated representation of RequestThinkingBlock.

    RequestThinkingBlock::equal

    RequestThinkingBlock::from_json

    Decodes this value from JSON.

    RequestThinkingBlock::new

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

    Creates a RequestThinkingBlock with omitted optional fields absent.

    RequestThinkingBlock::not_equal

    RequestThinkingBlock::to_json

    Encodes this value as JSON.

    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

    RequestToolReferenceBlock::from_json

    Decodes this value from JSON.

    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

    RequestToolReferenceBlock::to_json

    Encodes this value as JSON.

    RequestToolReferenceBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestToolReferenceBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestToolReferenceBlockCacheControl::not_equal

    RequestToolReferenceBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    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

    RequestToolResultBlock::from_json

    Decodes this value from JSON.

    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

    RequestToolResultBlock::to_json

    Encodes this value as JSON.

    RequestToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestToolResultBlockCacheControl::not_equal

    RequestToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolResultBlockContent

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

    Generated untagged union RequestToolResultBlockContent.

    RequestToolResultBlockContent::from_json

    Decodes this union from JSON.

    RequestToolResultBlockContent::not_equal

    RequestToolResultBlockContent::to_json

    Encodes this union as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    RequestToolResultBlockContentValueArrayItem::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestToolSearchToolResultBlock::new

    Creates a RequestToolSearchToolResultBlock with omitted optional fields absent.

    RequestToolSearchToolResultBlock::not_equal

    RequestToolSearchToolResultBlock::to_json

    Encodes this value as JSON.

    RequestToolSearchToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestToolSearchToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestToolSearchToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolSearchToolResultBlockContent

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

    Generated tagged union RequestToolSearchToolResultBlockContent.

    RequestToolSearchToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    RequestToolSearchToolResultBlockContent::not_equal

    RequestToolSearchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestToolSearchToolResultError

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

    Generated representation of RequestToolSearchToolResultError.

    RequestToolSearchToolResultError::from_json

    Decodes this value from JSON.

    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

    RequestToolSearchToolResultError::to_json

    Encodes this value as JSON.

    RequestToolSearchToolSearchResultBlock

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

    Generated representation of RequestToolSearchToolSearchResultBlock.

    RequestToolSearchToolSearchResultBlock::from_json

    Decodes this value from JSON.

    RequestToolSearchToolSearchResultBlock::new

    Creates a RequestToolSearchToolSearchResultBlock with omitted optional fields absent.

    RequestToolSearchToolSearchResultBlock::not_equal

    RequestToolSearchToolSearchResultBlock::to_json

    Encodes this value as JSON.

    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

    RequestToolUseBlock::from_json

    Decodes this value from JSON.

    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

    RequestToolUseBlock::to_json

    Encodes this value as JSON.

    RequestToolUseBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestToolUseBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestToolUseBlockCacheControl::not_equal

    RequestToolUseBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestToolUseBlockCaller

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

    Generated tagged union RequestToolUseBlockCaller.

    RequestToolUseBlockCaller::equal

    RequestToolUseBlockCaller::from_json

    Decodes this tagged union from JSON.

    RequestToolUseBlockCaller::not_equal

    RequestToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchResultBlock

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

    Generated representation of RequestWebFetchResultBlock.

    RequestWebFetchResultBlock::equal

    RequestWebFetchResultBlock::from_json

    Decodes this value from JSON.

    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

    RequestWebFetchResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestWebFetchToolResultBlock::new

    Creates a RequestWebFetchToolResultBlock with omitted optional fields absent.

    RequestWebFetchToolResultBlock::not_equal

    RequestWebFetchToolResultBlock::to_json

    Encodes this value as JSON.

    RequestWebFetchToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestWebFetchToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestWebFetchToolResultBlockCacheControl::not_equal

    RequestWebFetchToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchToolResultBlockCaller

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

    Generated tagged union RequestWebFetchToolResultBlockCaller.

    RequestWebFetchToolResultBlockCaller::from_json

    Decodes this tagged union from JSON.

    RequestWebFetchToolResultBlockCaller::not_equal

    RequestWebFetchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchToolResultBlockContent

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

    Generated tagged union RequestWebFetchToolResultBlockContent.

    RequestWebFetchToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    RequestWebFetchToolResultBlockContent::not_equal

    RequestWebFetchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    RequestWebFetchToolResultError

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

    Generated representation of RequestWebFetchToolResultError.

    RequestWebFetchToolResultError::from_json

    Decodes this value from JSON.

    RequestWebFetchToolResultError::new

    Creates a RequestWebFetchToolResultError with omitted optional fields absent.

    RequestWebFetchToolResultError::not_equal

    RequestWebFetchToolResultError::to_json

    Encodes this value as JSON.

    RequestWebSearchResultBlock

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

    Generated representation of RequestWebSearchResultBlock.

    RequestWebSearchResultBlock::from_json

    Decodes this value from JSON.

    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

    RequestWebSearchResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    RequestWebSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    RequestWebSearchToolResultBlock::new

    Creates a RequestWebSearchToolResultBlock with omitted optional fields absent.

    RequestWebSearchToolResultBlock::not_equal

    RequestWebSearchToolResultBlock::to_json

    Encodes this value as JSON.

    RequestWebSearchToolResultBlockCacheControl

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

    Create a cache control breakpoint at this content block.

    RequestWebSearchToolResultBlockCacheControl::from_json

    Decodes this tagged union from JSON.

    RequestWebSearchToolResultBlockCacheControl::to_json

    Encodes this tagged union as JSON.

    RequestWebSearchToolResultBlockCaller

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

    Generated tagged union RequestWebSearchToolResultBlockCaller.

    RequestWebSearchToolResultBlockCaller::from_json

    Decodes this tagged union from JSON.

    RequestWebSearchToolResultBlockCaller::not_equal

    RequestWebSearchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    RequestWebSearchToolResultBlockContent

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

    RequestWebSearchToolResultError

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

    Generated representation of RequestWebSearchToolResultError.

    RequestWebSearchToolResultError::from_json

    Decodes this value from JSON.

    RequestWebSearchToolResultError::new

    Creates a RequestWebSearchToolResultError with omitted optional fields absent.

    RequestWebSearchToolResultError::not_equal

    RequestWebSearchToolResultError::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionOutputBlock

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

    Generated representation of ResponseBashCodeExecutionOutputBlock.

    ResponseBashCodeExecutionOutputBlock::from_json

    Decodes this value from JSON.

    ResponseBashCodeExecutionOutputBlock::new

    Creates a ResponseBashCodeExecutionOutputBlock with omitted optional fields absent.

    ResponseBashCodeExecutionOutputBlock::not_equal

    ResponseBashCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponseBashCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionToolResultBlock

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

    Generated representation of ResponseBashCodeExecutionToolResultBlock.

    ResponseBashCodeExecutionToolResultBlock::from_json

    Decodes this value from JSON.

    ResponseBashCodeExecutionToolResultBlock::new

    Creates a ResponseBashCodeExecutionToolResultBlock with omitted optional fields absent.

    ResponseBashCodeExecutionToolResultBlock::not_equal

    ResponseBashCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseBashCodeExecutionToolResultBlockContent

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

    Generated tagged union ResponseBashCodeExecutionToolResultBlockContent.

    ResponseBashCodeExecutionToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    ResponseBashCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseBashCodeExecutionToolResultError

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

    Generated representation of ResponseBashCodeExecutionToolResultError.

    ResponseBashCodeExecutionToolResultError::from_json

    Decodes this value from JSON.

    ResponseBashCodeExecutionToolResultError::new

    Creates a ResponseBashCodeExecutionToolResultError with omitted optional fields absent.

    ResponseBashCodeExecutionToolResultError::not_equal

    ResponseBashCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponseCharLocationCitation::to_json

    Encodes this value as JSON.

    ResponseCitationsConfig

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

    Generated representation of ResponseCitationsConfig.

    ResponseCitationsConfig::equal

    ResponseCitationsConfig::from_json

    Decodes this value from JSON.

    ResponseCitationsConfig::new

    Creates a ResponseCitationsConfig with omitted optional fields absent.

    ResponseCitationsConfig::not_equal

    ResponseCitationsConfig::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionOutputBlock

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

    Generated representation of ResponseCodeExecutionOutputBlock.

    ResponseCodeExecutionOutputBlock::from_json

    Decodes this value from JSON.

    ResponseCodeExecutionOutputBlock::new

    Creates a ResponseCodeExecutionOutputBlock with omitted optional fields absent.

    ResponseCodeExecutionOutputBlock::not_equal

    ResponseCodeExecutionOutputBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponseCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionToolResultBlock

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

    Generated representation of ResponseCodeExecutionToolResultBlock.

    ResponseCodeExecutionToolResultBlock::from_json

    Decodes this value from JSON.

    ResponseCodeExecutionToolResultBlock::new

    Creates a ResponseCodeExecutionToolResultBlock with omitted optional fields absent.

    ResponseCodeExecutionToolResultBlock::not_equal

    ResponseCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseCodeExecutionToolResultBlockContent

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

    Generated tagged union ResponseCodeExecutionToolResultBlockContent.

    ResponseCodeExecutionToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    ResponseCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseCodeExecutionToolResultError

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

    Generated representation of ResponseCodeExecutionToolResultError.

    ResponseCodeExecutionToolResultError::from_json

    Decodes this value from JSON.

    ResponseCodeExecutionToolResultError::new

    Creates a ResponseCodeExecutionToolResultError with omitted optional fields absent.

    ResponseCodeExecutionToolResultError::not_equal

    ResponseCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    ResponseContainerUploadBlock

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

    Response model for a file uploaded to the container.

    ResponseContainerUploadBlock::from_json

    Decodes this value from JSON.

    ResponseContainerUploadBlock::new

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

    Creates a ResponseContainerUploadBlock with omitted optional fields absent.

    ResponseContainerUploadBlock::not_equal

    ResponseContainerUploadBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponseContentBlockLocationCitation::to_json

    Encodes this value as JSON.

    ResponseDocumentBlock

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

    Generated representation of ResponseDocumentBlock.

    ResponseDocumentBlock::equal

    ResponseDocumentBlock::from_json

    Decodes this value from JSON.

    ResponseDocumentBlock::new

    Creates a ResponseDocumentBlock with omitted optional fields absent.

    ResponseDocumentBlock::not_equal

    ResponseDocumentBlock::to_json

    Encodes this value as JSON.

    ResponseDocumentBlockSource

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

    Generated tagged union ResponseDocumentBlockSource.

    ResponseDocumentBlockSource::from_json

    Decodes this tagged union from JSON.

    ResponseDocumentBlockSource::not_equal

    ResponseDocumentBlockSource::to_json

    Encodes this tagged union as JSON.

    ResponseEncryptedCodeExecutionResultBlock

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

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

    ResponseEncryptedCodeExecutionResultBlock::from_json

    Decodes this value from JSON.

    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

    ResponseEncryptedCodeExecutionResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponsePageLocationCitation::to_json

    Encodes this value as JSON.

    ResponseRedactedThinkingBlock

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

    Generated representation of ResponseRedactedThinkingBlock.

    ResponseRedactedThinkingBlock::from_json

    Decodes this value from JSON.

    ResponseRedactedThinkingBlock::new

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

    Creates a ResponseRedactedThinkingBlock with omitted optional fields absent.

    ResponseRedactedThinkingBlock::not_equal

    ResponseRedactedThinkingBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponseSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    ResponseServerToolUseBlock

    pub(all) struct ResponseServerToolUseBlock {
    caller : ResponseServerToolUseBlockCaller
    id : String
    input : Json
    name : ResponseServerToolUseBlockName
    type_ : String
    } derive(Eq,
    Debug
    )

    Generated representation of ResponseServerToolUseBlock.

    ResponseServerToolUseBlock::equal

    ResponseServerToolUseBlock::from_json

    Decodes this value from JSON.

    ResponseServerToolUseBlock::new

    Creates a ResponseServerToolUseBlock with omitted optional fields absent.

    ResponseServerToolUseBlock::not_equal

    ResponseServerToolUseBlock::to_json

    Encodes this value as JSON.

    ResponseServerToolUseBlockCaller

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

    Generated tagged union ResponseServerToolUseBlockCaller.

    ResponseServerToolUseBlockCaller::from_json

    Decodes this tagged union from JSON.

    ResponseServerToolUseBlockCaller::not_equal

    ResponseServerToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseServerToolUseBlockName

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

    Generated string enum ResponseServerToolUseBlockName.

    ResponseServerToolUseBlockName::from_json

    Decodes this string enum from JSON.

    ResponseServerToolUseBlockName::not_equal

    ResponseServerToolUseBlockName::to_json

    Encodes this string enum as JSON.

    ResponseTextBlock

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

    Generated representation of ResponseTextBlock.

    ResponseTextBlock::equal

    ResponseTextBlock::from_json

    Decodes this value from JSON.

    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

    ResponseTextBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    ResponseTextBlockCitationsItem::not_equal

    ResponseTextBlockCitationsItem::to_json

    Encodes this tagged union as JSON.

    ResponseTextEditorCodeExecutionCreateResultBlock

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

    Generated representation of ResponseTextEditorCodeExecutionCreateResultBlock.

    ResponseTextEditorCodeExecutionCreateResultBlock::from_json

    Decodes this value from JSON.

    ResponseTextEditorCodeExecutionCreateResultBlock::new

    Creates a ResponseTextEditorCodeExecutionCreateResultBlock with omitted optional fields absent.

    ResponseTextEditorCodeExecutionCreateResultBlock::to_json

    Encodes this value as JSON.

    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::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionToolResultBlock

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

    Generated representation of ResponseTextEditorCodeExecutionToolResultBlock.

    ResponseTextEditorCodeExecutionToolResultBlock::from_json

    Decodes this value from JSON.

    ResponseTextEditorCodeExecutionToolResultBlock::new

    Creates a ResponseTextEditorCodeExecutionToolResultBlock with omitted optional fields absent.

    ResponseTextEditorCodeExecutionToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionToolResultBlockContent

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

    Generated tagged union ResponseTextEditorCodeExecutionToolResultBlockContent.

    ResponseTextEditorCodeExecutionToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    ResponseTextEditorCodeExecutionToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseTextEditorCodeExecutionToolResultError

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

    Generated representation of ResponseTextEditorCodeExecutionToolResultError.

    ResponseTextEditorCodeExecutionToolResultError::from_json

    Decodes this value from JSON.

    ResponseTextEditorCodeExecutionToolResultError::new

    Creates a ResponseTextEditorCodeExecutionToolResultError with omitted optional fields absent.

    ResponseTextEditorCodeExecutionToolResultError::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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::to_json

    Encodes this value as JSON.

    ResponseTextEditorCodeExecutionViewResultBlockFileType

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

    Generated string enum ResponseTextEditorCodeExecutionViewResultBlockFileType.

    ResponseTextEditorCodeExecutionViewResultBlockFileType::from_json

    Decodes this string enum from JSON.

    ResponseTextEditorCodeExecutionViewResultBlockFileType::to_json

    Encodes this string enum as JSON.

    ResponseThinkingBlock

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

    Generated representation of ResponseThinkingBlock.

    ResponseThinkingBlock::equal

    ResponseThinkingBlock::from_json

    Decodes this value from JSON.

    ResponseThinkingBlock::new

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

    Creates a ResponseThinkingBlock with omitted optional fields absent.

    ResponseThinkingBlock::not_equal

    ResponseThinkingBlock::to_json

    Encodes this value as JSON.

    ResponseToolReferenceBlock

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

    Generated representation of ResponseToolReferenceBlock.

    ResponseToolReferenceBlock::equal

    ResponseToolReferenceBlock::from_json

    Decodes this value from JSON.

    ResponseToolReferenceBlock::new

    Creates a ResponseToolReferenceBlock with omitted optional fields absent.

    ResponseToolReferenceBlock::not_equal

    ResponseToolReferenceBlock::to_json

    Encodes this value as JSON.

    ResponseToolSearchToolResultBlock

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

    Generated representation of ResponseToolSearchToolResultBlock.

    ResponseToolSearchToolResultBlock::from_json

    Decodes this value from JSON.

    ResponseToolSearchToolResultBlock::new

    Creates a ResponseToolSearchToolResultBlock with omitted optional fields absent.

    ResponseToolSearchToolResultBlock::not_equal

    ResponseToolSearchToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseToolSearchToolResultBlockContent

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

    Generated tagged union ResponseToolSearchToolResultBlockContent.

    ResponseToolSearchToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    ResponseToolSearchToolResultBlockContent::not_equal

    ResponseToolSearchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseToolSearchToolResultError

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

    Generated representation of ResponseToolSearchToolResultError.

    ResponseToolSearchToolResultError::from_json

    Decodes this value from JSON.

    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

    ResponseToolSearchToolResultError::to_json

    Encodes this value as JSON.

    ResponseToolSearchToolSearchResultBlock

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

    Generated representation of ResponseToolSearchToolSearchResultBlock.

    ResponseToolSearchToolSearchResultBlock::from_json

    Decodes this value from JSON.

    ResponseToolSearchToolSearchResultBlock::new

    Creates a ResponseToolSearchToolSearchResultBlock with omitted optional fields absent.

    ResponseToolSearchToolSearchResultBlock::not_equal

    ResponseToolSearchToolSearchResultBlock::to_json

    Encodes this value as JSON.

    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

    ResponseToolUseBlock::from_json

    Decodes this value from JSON.

    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

    ResponseToolUseBlock::to_json

    Encodes this value as JSON.

    ResponseToolUseBlockCaller

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

    Generated tagged union ResponseToolUseBlockCaller.

    ResponseToolUseBlockCaller::equal

    ResponseToolUseBlockCaller::from_json

    Decodes this tagged union from JSON.

    ResponseToolUseBlockCaller::not_equal

    ResponseToolUseBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseWebFetchResultBlock

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

    Generated representation of ResponseWebFetchResultBlock.

    ResponseWebFetchResultBlock::from_json

    Decodes this value from JSON.

    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

    ResponseWebFetchResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebFetchToolResultBlock

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

    Generated representation of ResponseWebFetchToolResultBlock.

    ResponseWebFetchToolResultBlock::from_json

    Decodes this value from JSON.

    ResponseWebFetchToolResultBlock::new

    Creates a ResponseWebFetchToolResultBlock with omitted optional fields absent.

    ResponseWebFetchToolResultBlock::not_equal

    ResponseWebFetchToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebFetchToolResultBlockCaller

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

    Generated tagged union ResponseWebFetchToolResultBlockCaller.

    ResponseWebFetchToolResultBlockCaller::from_json

    Decodes this tagged union from JSON.

    ResponseWebFetchToolResultBlockCaller::not_equal

    ResponseWebFetchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseWebFetchToolResultBlockContent

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

    Generated tagged union ResponseWebFetchToolResultBlockContent.

    ResponseWebFetchToolResultBlockContent::from_json

    Decodes this tagged union from JSON.

    ResponseWebFetchToolResultBlockContent::not_equal

    ResponseWebFetchToolResultBlockContent::to_json

    Encodes this tagged union as JSON.

    ResponseWebFetchToolResultError

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

    Generated representation of ResponseWebFetchToolResultError.

    ResponseWebFetchToolResultError::from_json

    Decodes this value from JSON.

    ResponseWebFetchToolResultError::new

    Creates a ResponseWebFetchToolResultError with omitted optional fields absent.

    ResponseWebFetchToolResultError::not_equal

    ResponseWebFetchToolResultError::to_json

    Encodes this value as JSON.

    ResponseWebSearchResultBlock

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

    Generated representation of ResponseWebSearchResultBlock.

    ResponseWebSearchResultBlock::from_json

    Decodes this value from JSON.

    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

    ResponseWebSearchResultBlock::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ResponseWebSearchResultLocationCitation::to_json

    Encodes this value as JSON.

    ResponseWebSearchToolResultBlock

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

    Generated representation of ResponseWebSearchToolResultBlock.

    ResponseWebSearchToolResultBlock::from_json

    Decodes this value from JSON.

    ResponseWebSearchToolResultBlock::new

    Creates a ResponseWebSearchToolResultBlock with omitted optional fields absent.

    ResponseWebSearchToolResultBlock::not_equal

    ResponseWebSearchToolResultBlock::to_json

    Encodes this value as JSON.

    ResponseWebSearchToolResultBlockCaller

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

    Generated tagged union ResponseWebSearchToolResultBlockCaller.

    ResponseWebSearchToolResultBlockCaller::from_json

    Decodes this tagged union from JSON.

    ResponseWebSearchToolResultBlockCaller::not_equal

    ResponseWebSearchToolResultBlockCaller::to_json

    Encodes this tagged union as JSON.

    ResponseWebSearchToolResultBlockContent

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

    Generated untagged union ResponseWebSearchToolResultBlockContent.

    ResponseWebSearchToolResultBlockContent::from_json

    Decodes this union from JSON.

    ResponseWebSearchToolResultBlockContent::not_equal

    ResponseWebSearchToolResultBlockContent::to_json

    Encodes this union as JSON.

    ResponseWebSearchToolResultError

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

    Generated representation of ResponseWebSearchToolResultError.

    ResponseWebSearchToolResultError::from_json

    Decodes this value from JSON.

    ResponseWebSearchToolResultError::new

    Creates a ResponseWebSearchToolResultError with omitted optional fields absent.

    ResponseWebSearchToolResultError::not_equal

    ResponseWebSearchToolResultError::to_json

    Encodes this value as JSON.

    ServerToolCaller

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

    Tool invocation generated by a server-side tool.

    ServerToolCaller::equal

    ServerToolCaller::from_json

    Decodes this value from JSON.

    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

    ServerToolCaller::to_json

    fn ServerToolCaller::to_json(self : ServerToolCaller) -> Json

    Encodes this value as JSON.

    ServerToolCaller20260120

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

    Generated representation of ServerToolCaller20260120.

    ServerToolCaller20260120::equal

    ServerToolCaller20260120::from_json

    Decodes this value from JSON.

    ServerToolCaller20260120::new

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

    Creates a ServerToolCaller20260120 with omitted optional fields absent.

    ServerToolCaller20260120::not_equal

    ServerToolCaller20260120::to_json

    Encodes this value as JSON.

    ServerToolUsage

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

    Generated representation of ServerToolUsage.

    ServerToolUsage::equal

    ServerToolUsage::from_json

    Decodes this value from JSON.

    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

    ServerToolUsage::to_json

    fn ServerToolUsage::to_json(self : ServerToolUsage) -> Json

    Encodes this value as JSON.

    SignatureContentBlockDelta

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

    Generated representation of SignatureContentBlockDelta.

    SignatureContentBlockDelta::equal

    SignatureContentBlockDelta::from_json

    Decodes this value from JSON.

    SignatureContentBlockDelta::new

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

    Creates a SignatureContentBlockDelta with omitted optional fields absent.

    SignatureContentBlockDelta::not_equal

    SignatureContentBlockDelta::to_json

    Encodes this value as JSON.

    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 (request model).

    SkillParams::equal

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

    SkillParams::from_json

    Decodes this value from JSON.

    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

    SkillParams::to_json

    fn SkillParams::to_json(self : SkillParams) -> Json

    Encodes this value as JSON.

    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

    SkillParamsType::from_json

    Decodes this string enum from JSON.

    SkillParamsType::not_equal

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

    SkillParamsType::to_json

    fn SkillParamsType::to_json(self : SkillParamsType) -> Json

    Encodes this string enum as JSON.

    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

    StopReason::from_json

    Decodes this string enum from JSON.

    StopReason::not_equal

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

    StopReason::to_json

    fn StopReason::to_json(self : StopReason) -> Json

    Encodes this string enum as JSON.

    TextContentBlockDelta

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

    Generated representation of TextContentBlockDelta.

    TextContentBlockDelta::equal

    TextContentBlockDelta::from_json

    Decodes this value from JSON.

    TextContentBlockDelta::new

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

    Creates a TextContentBlockDelta with omitted optional fields absent.

    TextContentBlockDelta::not_equal

    TextContentBlockDelta::to_json

    Encodes this value as JSON.

    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

    TextEditor20250124::from_json

    Decodes this value from JSON.

    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

    TextEditor20250124::to_json

    Encodes this value as JSON.

    TextEditor20250124CacheControl

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

    Create a cache control breakpoint at this content block.

    TextEditor20250124CacheControl::from_json

    Decodes this tagged union from JSON.

    TextEditor20250124CacheControl::not_equal

    TextEditor20250124CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    TextEditor20250429::from_json

    Decodes this value from JSON.

    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

    TextEditor20250429::to_json

    Encodes this value as JSON.

    TextEditor20250429CacheControl

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

    Create a cache control breakpoint at this content block.

    TextEditor20250429CacheControl::from_json

    Decodes this tagged union from JSON.

    TextEditor20250429CacheControl::not_equal

    TextEditor20250429CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    TextEditor20250728::from_json

    Decodes this value from JSON.

    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

    TextEditor20250728::to_json

    Encodes this value as JSON.

    TextEditor20250728CacheControl

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

    Create a cache control breakpoint at this content block.

    TextEditor20250728CacheControl::from_json

    Decodes this tagged union from JSON.

    TextEditor20250728CacheControl::not_equal

    TextEditor20250728CacheControl::to_json

    Encodes this tagged union as JSON.

    TextEditorCodeExecutionToolResultErrorCode

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

    Generated string enum TextEditorCodeExecutionToolResultErrorCode.

    TextEditorCodeExecutionToolResultErrorCode::from_json

    Decodes this string enum from JSON.

    TextEditorCodeExecutionToolResultErrorCode::not_equal

    TextEditorCodeExecutionToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    ThinkingCapability

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

    Thinking capability details.

    ThinkingCapability::equal

    ThinkingCapability::from_json

    Decodes this value from JSON.

    ThinkingCapability::new

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

    Creates a ThinkingCapability with omitted optional fields absent.

    ThinkingCapability::not_equal

    ThinkingCapability::to_json

    Encodes this value as JSON.

    ThinkingConfigAdaptive

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

    Generated representation of ThinkingConfigAdaptive.

    ThinkingConfigAdaptive::equal

    ThinkingConfigAdaptive::from_json

    Decodes this value from JSON.

    ThinkingConfigAdaptive::new

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

    Creates a ThinkingConfigAdaptive with omitted optional fields absent.

    ThinkingConfigAdaptive::not_equal

    ThinkingConfigAdaptive::to_json

    Encodes this value as JSON.

    ThinkingConfigBetweenTools

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

    Generated representation of ThinkingConfigBetweenTools.

    ThinkingConfigBetweenTools::equal

    ThinkingConfigBetweenTools::from_json

    Decodes this value from JSON.

    ThinkingConfigBetweenTools::new

    Creates a ThinkingConfigBetweenTools with omitted optional fields absent.

    ThinkingConfigBetweenTools::not_equal

    ThinkingConfigBetweenTools::to_json

    Encodes this value as JSON.

    ThinkingConfigDisabled

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

    Generated representation of ThinkingConfigDisabled.

    ThinkingConfigDisabled::equal

    ThinkingConfigDisabled::from_json

    Decodes this value from JSON.

    ThinkingConfigDisabled::new

    Creates a ThinkingConfigDisabled with omitted optional fields absent.

    ThinkingConfigDisabled::not_equal

    ThinkingConfigDisabled::to_json

    Encodes this value as JSON.

    ThinkingConfigEnabled

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

    Generated representation of ThinkingConfigEnabled.

    ThinkingConfigEnabled::equal

    ThinkingConfigEnabled::from_json

    Decodes this value from JSON.

    ThinkingConfigEnabled::new

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

    Creates a ThinkingConfigEnabled with omitted optional fields absent.

    ThinkingConfigEnabled::not_equal

    ThinkingConfigEnabled::to_json

    Encodes this value as JSON.

    ThinkingConfigParam

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

    Configuration for enabling Claude's extended thinking. When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your max_tokens limit. See extended thinking for details.

    ThinkingConfigParam::equal

    ThinkingConfigParam::from_json

    Decodes this tagged union from JSON.

    ThinkingConfigParam::not_equal

    ThinkingConfigParam::to_json

    Encodes this tagged union as JSON.

    ThinkingContentBlockDelta

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

    Generated representation of ThinkingContentBlockDelta.

    ThinkingContentBlockDelta::equal

    ThinkingContentBlockDelta::from_json

    Decodes this value from JSON.

    ThinkingContentBlockDelta::new

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

    Creates a ThinkingContentBlockDelta with omitted optional fields absent.

    ThinkingContentBlockDelta::not_equal

    ThinkingContentBlockDelta::to_json

    Encodes this value as JSON.

    ThinkingDisplayMode

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

    Generated string enum ThinkingDisplayMode.

    ThinkingDisplayMode::equal

    ThinkingDisplayMode::from_json

    Decodes this string enum from JSON.

    ThinkingDisplayMode::not_equal

    ThinkingDisplayMode::to_json

    Encodes this string enum as JSON.

    ThinkingTypes

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

    Supported thinking type configurations.

    ThinkingTypes::equal

    ThinkingTypes::from_json

    Decodes this value from JSON.

    ThinkingTypes::new

    Creates a ThinkingTypes with omitted optional fields absent.

    ThinkingTypes::not_equal

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

    ThinkingTypes::to_json

    fn ThinkingTypes::to_json(self : ThinkingTypes) -> Json

    Encodes this value as JSON.

    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.
    impl ToJson for Tool

    Tool::equal

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

    Tool::from_json

    Decodes this value from JSON.

    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

    Tool::to_json

    fn Tool::to_json(self : Tool) -> Json

    Encodes this value as JSON.

    Tool::to_repr

    ToolCacheControl

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

    Create a cache control breakpoint at this content block.

    ToolCacheControl::equal

    ToolCacheControl::from_json

    Decodes this tagged union from JSON.

    ToolCacheControl::not_equal

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

    ToolCacheControl::to_json

    fn ToolCacheControl::to_json(self : ToolCacheControl) -> Json

    Encodes this tagged union as JSON.

    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

    ToolChoice::from_json

    Decodes this tagged union from JSON.

    ToolChoice::not_equal

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

    ToolChoice::to_json

    fn ToolChoice::to_json(self : ToolChoice) -> Json

    Encodes this tagged union as JSON.

    ToolChoiceAny

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

    The model will use any available tools.

    ToolChoiceAny::equal

    ToolChoiceAny::from_json

    Decodes this value from JSON.

    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

    ToolChoiceAny::to_json

    fn ToolChoiceAny::to_json(self : ToolChoiceAny) -> Json

    Encodes this value as JSON.

    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

    ToolChoiceAuto::from_json

    Decodes this value from JSON.

    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

    ToolChoiceAuto::to_json

    fn ToolChoiceAuto::to_json(self : ToolChoiceAuto) -> Json

    Encodes this value as JSON.

    ToolChoiceNone

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

    The model will not be allowed to use tools.

    ToolChoiceNone::equal

    ToolChoiceNone::from_json

    Decodes this value from JSON.

    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

    ToolChoiceNone::to_json

    fn ToolChoiceNone::to_json(self : ToolChoiceNone) -> Json

    Encodes this value as JSON.

    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

    ToolChoiceTool::from_json

    Decodes this value from JSON.

    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

    ToolChoiceTool::to_json

    fn ToolChoiceTool::to_json(self : ToolChoiceTool) -> Json

    Encodes this value as JSON.

    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

    ToolSearchToolBM2520251119::from_json

    Decodes this value from JSON.

    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

    ToolSearchToolBM2520251119::to_json

    Encodes this value as JSON.

    ToolSearchToolBM2520251119CacheControl

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

    ToolSearchToolBM2520251119Type

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

    Generated string enum ToolSearchToolBM2520251119Type.

    ToolSearchToolBM2520251119Type::from_json

    Decodes this string enum from JSON.

    ToolSearchToolBM2520251119Type::not_equal

    ToolSearchToolBM2520251119Type::to_json

    Encodes this string enum as JSON.

    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::from_json

    Decodes this value from JSON.

    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

    ToolSearchToolRegex20251119::to_json

    Encodes this value as JSON.

    ToolSearchToolRegex20251119CacheControl

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

    Create a cache control breakpoint at this content block.

    ToolSearchToolRegex20251119CacheControl::from_json

    Decodes this tagged union from JSON.

    ToolSearchToolRegex20251119CacheControl::not_equal

    ToolSearchToolRegex20251119CacheControl::to_json

    Encodes this tagged union as JSON.

    ToolSearchToolRegex20251119Type

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

    Generated string enum ToolSearchToolRegex20251119Type.

    ToolSearchToolRegex20251119Type::from_json

    Decodes this string enum from JSON.

    ToolSearchToolRegex20251119Type::not_equal

    ToolSearchToolRegex20251119Type::to_json

    Encodes this string enum as JSON.

    ToolSearchToolResultErrorCode

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

    Generated string enum ToolSearchToolResultErrorCode.

    ToolSearchToolResultErrorCode::from_json

    Decodes this string enum from JSON.

    ToolSearchToolResultErrorCode::not_equal

    ToolSearchToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    URLImageSource

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

    Generated representation of URLImageSource.

    URLImageSource::equal

    URLImageSource::from_json

    Decodes this value from JSON.

    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

    URLImageSource::to_json

    fn URLImageSource::to_json(self : URLImageSource) -> Json

    Encodes this value as JSON.

    URLPDFSource

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

    Generated representation of URLPDFSource.

    URLPDFSource::equal

    URLPDFSource::from_json

    Decodes this value from JSON.

    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

    URLPDFSource::to_json

    fn URLPDFSource::to_json(self : URLPDFSource) -> Json

    Encodes this value as JSON.

    Usage

    pub(all) struct Usage {
    cache_creation :
    Presence
    [CacheCreation]
    cache_creation_input_tokens :
    Presence
    [Int]
    cache_read_input_tokens :
    Presence
    [Int]
    inference_geo :
    Presence
    [String]
    input_tokens : Int
    output_tokens : Int
    output_tokens_details :
    Presence
    [OutputTokensDetails]
    server_tool_use :
    Presence
    [ServerToolUsage]
    service_tier :
    Presence
    [UsageServiceTier]
    } derive(Eq,
    Debug
    )

    Generated representation of Usage.
    impl ToJson for Usage

    Usage::equal

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

    Usage::from_json

    Decodes this value from JSON.

    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) -> Usage

    Creates a Usage with omitted optional fields absent.

    Usage::not_equal

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

    Usage::to_json

    fn Usage::to_json(self : Usage) -> Json

    Encodes this value as JSON.

    Usage::to_repr

    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

    UsageServiceTier::from_json

    Decodes this string enum from JSON.

    UsageServiceTier::not_equal

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

    UsageServiceTier::to_json

    fn UsageServiceTier::to_json(self : UsageServiceTier) -> Json

    Encodes this string enum as JSON.

    UserLocation

    Generated representation of UserLocation.

    UserLocation::equal

    UserLocation::from_json

    Decodes this value from JSON.

    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

    UserLocation::to_json

    fn UserLocation::to_json(self : UserLocation) -> Json

    Encodes this value as JSON.

    WebFetchTool20250910

    Generated representation of WebFetchTool20250910.

    WebFetchTool20250910::equal

    WebFetchTool20250910::from_json

    Decodes this value from JSON.

    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

    WebFetchTool20250910::to_json

    Encodes this value as JSON.

    WebFetchTool20250910CacheControl

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

    Create a cache control breakpoint at this content block.

    WebFetchTool20250910CacheControl::from_json

    Decodes this tagged union from JSON.

    WebFetchTool20250910CacheControl::not_equal

    WebFetchTool20250910CacheControl::to_json

    Encodes this tagged union as JSON.

    WebFetchTool20260209

    Generated representation of WebFetchTool20260209.

    WebFetchTool20260209::equal

    WebFetchTool20260209::from_json

    Decodes this value from JSON.

    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

    WebFetchTool20260209::to_json

    Encodes this value as JSON.

    WebFetchTool20260209CacheControl

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

    Create a cache control breakpoint at this content block.

    WebFetchTool20260209CacheControl::from_json

    Decodes this tagged union from JSON.

    WebFetchTool20260209CacheControl::not_equal

    WebFetchTool20260209CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    WebFetchTool20260309::from_json

    Decodes this value from JSON.

    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

    WebFetchTool20260309::to_json

    Encodes this value as JSON.

    WebFetchTool20260309CacheControl

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

    Create a cache control breakpoint at this content block.

    WebFetchTool20260309CacheControl::from_json

    Decodes this tagged union from JSON.

    WebFetchTool20260309CacheControl::not_equal

    WebFetchTool20260309CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    WebFetchTool20260318::from_json

    Decodes this value from JSON.

    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

    WebFetchTool20260318::to_json

    Encodes this value as JSON.

    WebFetchTool20260318CacheControl

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

    Create a cache control breakpoint at this content block.

    WebFetchTool20260318CacheControl::from_json

    Decodes this tagged union from JSON.

    WebFetchTool20260318CacheControl::not_equal

    WebFetchTool20260318CacheControl::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this string enum from JSON.

    WebFetchTool20260318ResponseInclusion::not_equal

    WebFetchTool20260318ResponseInclusion::to_json

    Encodes this string enum as JSON.

    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::from_json

    Decodes this string enum from JSON.

    WebFetchToolResultErrorCode::not_equal

    WebFetchToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    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

    WebFetchUrlSourceAll::from_json

    Decodes this value from JSON.

    WebFetchUrlSourceAll::new

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

    Creates a WebFetchUrlSourceAll with omitted optional fields absent.

    WebFetchUrlSourceAll::not_equal

    WebFetchUrlSourceAll::to_json

    Encodes this value as JSON.

    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

    WebFetchUrlSourceExcept::from_json

    Decodes this value from JSON.

    WebFetchUrlSourceExcept::new

    Creates a WebFetchUrlSourceExcept with omitted optional fields absent.

    WebFetchUrlSourceExcept::not_equal

    WebFetchUrlSourceExcept::to_json

    Encodes this value as JSON.

    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

    WebFetchUrlSourceNone::from_json

    Decodes this value from JSON.

    WebFetchUrlSourceNone::new

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

    Creates a WebFetchUrlSourceNone with omitted optional fields absent.

    WebFetchUrlSourceNone::not_equal

    WebFetchUrlSourceNone::to_json

    Encodes this value as JSON.

    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

    WebFetchUrlSourceOnly::from_json

    Decodes this value from JSON.

    WebFetchUrlSourceOnly::new

    Creates a WebFetchUrlSourceOnly with omitted optional fields absent.

    WebFetchUrlSourceOnly::not_equal

    WebFetchUrlSourceOnly::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this value from JSON.

    WebFetchUrlSourceToolReference::new

    Creates a WebFetchUrlSourceToolReference with omitted optional fields absent.

    WebFetchUrlSourceToolReference::not_equal

    WebFetchUrlSourceToolReference::to_json

    Encodes this value as JSON.

    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

    WebFetchUrlSources::from_json

    Decodes this value from JSON.

    WebFetchUrlSources::new

    Creates a WebFetchUrlSources with omitted optional fields absent.

    WebFetchUrlSources::not_equal

    WebFetchUrlSources::to_json

    Encodes this value as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    WebFetchUrlSourcesClientToolResults::not_equal

    WebFetchUrlSourcesClientToolResults::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    WebFetchUrlSourcesServerToolResults::not_equal

    WebFetchUrlSourcesServerToolResults::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this tagged union from JSON.

    WebFetchUrlSourcesUserInput::not_equal

    WebFetchUrlSourcesUserInput::to_json

    Encodes this tagged union as JSON.

    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

    WebSearchTool20250305::from_json

    Decodes this value from JSON.

    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

    WebSearchTool20250305::to_json

    Encodes this value as JSON.

    WebSearchTool20250305CacheControl

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

    Create a cache control breakpoint at this content block.

    WebSearchTool20250305CacheControl::from_json

    Decodes this tagged union from JSON.

    WebSearchTool20250305CacheControl::not_equal

    WebSearchTool20250305CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    WebSearchTool20260209::from_json

    Decodes this value from JSON.

    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

    WebSearchTool20260209::to_json

    Encodes this value as JSON.

    WebSearchTool20260209CacheControl

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

    Create a cache control breakpoint at this content block.

    WebSearchTool20260209CacheControl::from_json

    Decodes this tagged union from JSON.

    WebSearchTool20260209CacheControl::not_equal

    WebSearchTool20260209CacheControl::to_json

    Encodes this tagged union as JSON.

    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

    WebSearchTool20260318::from_json

    Decodes this value from JSON.

    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

    WebSearchTool20260318::to_json

    Encodes this value as JSON.

    WebSearchTool20260318CacheControl

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

    Create a cache control breakpoint at this content block.

    WebSearchTool20260318CacheControl::from_json

    Decodes this tagged union from JSON.

    WebSearchTool20260318CacheControl::not_equal

    WebSearchTool20260318CacheControl::to_json

    Encodes this tagged union as JSON.

    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::from_json

    Decodes this string enum from JSON.

    WebSearchTool20260318ResponseInclusion::not_equal

    WebSearchTool20260318ResponseInclusion::to_json

    Encodes this string enum as JSON.

    WebSearchToolResultErrorCode

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

    Generated string enum WebSearchToolResultErrorCode.

    WebSearchToolResultErrorCode::from_json

    Decodes this string enum from JSON.

    WebSearchToolResultErrorCode::not_equal

    WebSearchToolResultErrorCode::to_json

    Encodes this string enum as JSON.

    messages_count_tokens_post_decode

    fn messages_count_tokens_post_decode(response :
    Response
    ) -> CountMessageTokensResponse raise
    SdkError

    Decodes a successful messages_count_tokens_post response.

    messages_count_tokens_post_decode_json

    fn messages_count_tokens_post_decode_json(value : Json) -> CountMessageTokensResponse raise
    JsonDecodeError

    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

    fn messages_post_decode(response :
    Response
    ) -> Message raise
    SdkError

    Decodes a successful messages_post response.

    messages_post_decode_json

    fn messages_post_decode_json(value : Json) -> Message raise
    JsonDecodeError

    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

    fn models_get_decode_json(value : Json) -> ModelInfo raise
    JsonDecodeError

    Decodes a parsed successful models_get response.

    models_get_request

    fn models_get_request(model_id : String, anthropic_version? : String, anthropic_beta? : Array[String], x_api_key? : 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, anthropic_version? : String, anthropic_beta? : Array[String], x_api_key? : String, anthropic_workspace_id? : String) ->
    Request

    List Models