diff --git a/google/genai/_interactions/types/code_execution_call_content.py b/google/genai/_interactions/types/code_execution_call_content.py index 6d9c35ac9..af84a4837 100644 --- a/google/genai/_interactions/types/code_execution_call_content.py +++ b/google/genai/_interactions/types/code_execution_call_content.py @@ -15,6 +15,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from typing_extensions import Literal from .._models import BaseModel @@ -33,3 +34,6 @@ class CodeExecutionCallContent(BaseModel): """The arguments to pass to the code execution.""" type: Literal["code_execution_call"] + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/code_execution_call_content_param.py b/google/genai/_interactions/types/code_execution_call_content_param.py index 9e8bafa02..68b621045 100644 --- a/google/genai/_interactions/types/code_execution_call_content_param.py +++ b/google/genai/_interactions/types/code_execution_call_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .code_execution_call_arguments_param import CodeExecutionCallArgumentsParam __all__ = ["CodeExecutionCallContentParam"] @@ -34,3 +38,9 @@ class CodeExecutionCallContentParam(TypedDict, total=False): """The arguments to pass to the code execution.""" type: Required[Literal["code_execution_call"]] + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(CodeExecutionCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/code_execution_result_content_param.py b/google/genai/_interactions/types/code_execution_result_content_param.py index c6d7ca31e..cef894b4e 100644 --- a/google/genai/_interactions/types/code_execution_result_content_param.py +++ b/google/genai/_interactions/types/code_execution_result_content_param.py @@ -17,7 +17,12 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config __all__ = ["CodeExecutionResultContentParam"] @@ -36,5 +41,8 @@ class CodeExecutionResultContentParam(TypedDict, total=False): is_error: bool """Whether the code execution resulted in an error.""" - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(CodeExecutionResultContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/content_delta.py b/google/genai/_interactions/types/content_delta.py index c2365dd22..57e4859e4 100644 --- a/google/genai/_interactions/types/content_delta.py +++ b/google/genai/_interactions/types/content_delta.py @@ -160,6 +160,9 @@ class DeltaFunctionCall(BaseModel): type: Literal["function_call"] + signature: Optional[str] = None + """A signature hash for backend validation.""" + DeltaFunctionResultResultItemsItem: TypeAlias = Union[TextContent, ImageContent] @@ -197,6 +200,9 @@ class DeltaCodeExecutionCall(BaseModel): type: Literal["code_execution_call"] + signature: Optional[str] = None + """A signature hash for backend validation.""" + class DeltaCodeExecutionResult(BaseModel): call_id: str @@ -221,6 +227,9 @@ class DeltaURLContextCall(BaseModel): type: Literal["url_context_call"] + signature: Optional[str] = None + """A signature hash for backend validation.""" + class DeltaURLContextResult(BaseModel): call_id: str @@ -245,6 +254,9 @@ class DeltaGoogleSearchCall(BaseModel): type: Literal["google_search_call"] + signature: Optional[str] = None + """A signature hash for backend validation.""" + class DeltaGoogleSearchResult(BaseModel): call_id: str @@ -272,6 +284,9 @@ class DeltaMCPServerToolCall(BaseModel): type: Literal["mcp_server_tool_call"] + signature: Optional[str] = None + """A signature hash for backend validation.""" + DeltaMCPServerToolResultResultItemsItem: TypeAlias = Union[TextContent, ImageContent] @@ -306,6 +321,9 @@ class DeltaFileSearchCall(BaseModel): type: Literal["file_search_call"] + signature: Optional[str] = None + """A signature hash for backend validation.""" + class DeltaFileSearchResultResult(BaseModel): """The result of the File Search.""" @@ -341,6 +359,9 @@ class DeltaGoogleMapsCall(BaseModel): arguments: Optional[GoogleMapsCallArguments] = None """The arguments to pass to the Google Maps tool.""" + signature: Optional[str] = None + """A signature hash for backend validation.""" + class DeltaGoogleMapsResult(BaseModel): call_id: str diff --git a/google/genai/_interactions/types/file_search_call_content.py b/google/genai/_interactions/types/file_search_call_content.py index e22210913..1745e707a 100644 --- a/google/genai/_interactions/types/file_search_call_content.py +++ b/google/genai/_interactions/types/file_search_call_content.py @@ -15,6 +15,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from typing_extensions import Literal from .._models import BaseModel @@ -29,3 +30,6 @@ class FileSearchCallContent(BaseModel): """A unique ID for this specific tool call.""" type: Literal["file_search_call"] + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/file_search_call_content_param.py b/google/genai/_interactions/types/file_search_call_content_param.py index 7c2de00a0..ec98fab3a 100644 --- a/google/genai/_interactions/types/file_search_call_content_param.py +++ b/google/genai/_interactions/types/file_search_call_content_param.py @@ -17,7 +17,12 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config __all__ = ["FileSearchCallContentParam"] @@ -29,3 +34,9 @@ class FileSearchCallContentParam(TypedDict, total=False): """A unique ID for this specific tool call.""" type: Required[Literal["file_search_call"]] + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(FileSearchCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/file_search_result_content_param.py b/google/genai/_interactions/types/file_search_result_content_param.py index a891c0174..aed009075 100644 --- a/google/genai/_interactions/types/file_search_result_content_param.py +++ b/google/genai/_interactions/types/file_search_result_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Literal, Required, TypedDict +from typing import Union, Iterable +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config __all__ = ["FileSearchResultContentParam", "Result"] @@ -47,5 +51,8 @@ class FileSearchResultContentParam(TypedDict, total=False): result: Iterable[Result] """The results of the File Search.""" - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(FileSearchResultContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/function_call_content.py b/google/genai/_interactions/types/function_call_content.py index a6c0aeba2..b0e77d7e0 100644 --- a/google/genai/_interactions/types/function_call_content.py +++ b/google/genai/_interactions/types/function_call_content.py @@ -15,7 +15,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict +from typing import Dict, Optional from typing_extensions import Literal from .._models import BaseModel @@ -36,3 +36,6 @@ class FunctionCallContent(BaseModel): """The name of the tool to call.""" type: Literal["function_call"] + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/function_call_content_param.py b/google/genai/_interactions/types/function_call_content_param.py index d32d4e29e..032ea14e1 100644 --- a/google/genai/_interactions/types/function_call_content_param.py +++ b/google/genai/_interactions/types/function_call_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing import Dict -from typing_extensions import Literal, Required, TypedDict +from typing import Dict, Union +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config __all__ = ["FunctionCallContentParam"] @@ -36,3 +40,9 @@ class FunctionCallContentParam(TypedDict, total=False): """The name of the tool to call.""" type: Required[Literal["function_call"]] + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(FunctionCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/function_result_content_param.py b/google/genai/_interactions/types/function_result_content_param.py index 5ee8f2ec7..e7d2e8a3a 100644 --- a/google/genai/_interactions/types/function_result_content_param.py +++ b/google/genai/_interactions/types/function_result_content_param.py @@ -18,8 +18,11 @@ from __future__ import annotations from typing import Union, Iterable -from typing_extensions import Literal, Required, TypeAlias, TypedDict +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .text_content_param import TextContentParam from .image_content_param import ImageContentParam @@ -45,5 +48,8 @@ class FunctionResultContentParam(TypedDict, total=False): name: str """The name of the tool that was called.""" - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(FunctionResultContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/google_maps_call_content.py b/google/genai/_interactions/types/google_maps_call_content.py index 621ea66db..c0498962c 100644 --- a/google/genai/_interactions/types/google_maps_call_content.py +++ b/google/genai/_interactions/types/google_maps_call_content.py @@ -34,3 +34,6 @@ class GoogleMapsCallContent(BaseModel): arguments: Optional[GoogleMapsCallArguments] = None """The arguments to pass to the Google Maps tool.""" + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/google_maps_call_content_param.py b/google/genai/_interactions/types/google_maps_call_content_param.py index 2c717d42d..6e1fd5b47 100644 --- a/google/genai/_interactions/types/google_maps_call_content_param.py +++ b/google/genai/_interactions/types/google_maps_call_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .google_maps_call_arguments_param import GoogleMapsCallArgumentsParam __all__ = ["GoogleMapsCallContentParam"] @@ -34,3 +38,9 @@ class GoogleMapsCallContentParam(TypedDict, total=False): arguments: GoogleMapsCallArgumentsParam """The arguments to pass to the Google Maps tool.""" + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(GoogleMapsCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/google_maps_result_content_param.py b/google/genai/_interactions/types/google_maps_result_content_param.py index 90558e356..ffae22672 100644 --- a/google/genai/_interactions/types/google_maps_result_content_param.py +++ b/google/genai/_interactions/types/google_maps_result_content_param.py @@ -17,9 +17,12 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Literal, Required, TypedDict +from typing import Union, Iterable +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .google_maps_result_param import GoogleMapsResultParam __all__ = ["GoogleMapsResultContentParam"] @@ -36,5 +39,8 @@ class GoogleMapsResultContentParam(TypedDict, total=False): type: Required[Literal["google_maps_result"]] - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(GoogleMapsResultContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/google_search_call_content.py b/google/genai/_interactions/types/google_search_call_content.py index fa16e6318..bbda4edd0 100644 --- a/google/genai/_interactions/types/google_search_call_content.py +++ b/google/genai/_interactions/types/google_search_call_content.py @@ -37,3 +37,6 @@ class GoogleSearchCallContent(BaseModel): search_type: Optional[Literal["web_search", "image_search"]] = None """The type of search grounding enabled.""" + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/google_search_call_content_param.py b/google/genai/_interactions/types/google_search_call_content_param.py index f8ac6ee54..3508a6eed 100644 --- a/google/genai/_interactions/types/google_search_call_content_param.py +++ b/google/genai/_interactions/types/google_search_call_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .google_search_call_arguments_param import GoogleSearchCallArgumentsParam __all__ = ["GoogleSearchCallContentParam"] @@ -37,3 +41,9 @@ class GoogleSearchCallContentParam(TypedDict, total=False): search_type: Literal["web_search", "image_search"] """The type of search grounding enabled.""" + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(GoogleSearchCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/google_search_result_content_param.py b/google/genai/_interactions/types/google_search_result_content_param.py index 67fe65e0a..ac4cb4352 100644 --- a/google/genai/_interactions/types/google_search_result_content_param.py +++ b/google/genai/_interactions/types/google_search_result_content_param.py @@ -17,9 +17,12 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Literal, Required, TypedDict +from typing import Union, Iterable +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .google_search_result_param import GoogleSearchResultParam __all__ = ["GoogleSearchResultContentParam"] @@ -39,5 +42,8 @@ class GoogleSearchResultContentParam(TypedDict, total=False): is_error: bool """Whether the Google Search resulted in an error.""" - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(GoogleSearchResultContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/mcp_server_tool_call_content.py b/google/genai/_interactions/types/mcp_server_tool_call_content.py index af5eff8e4..c9c71858b 100644 --- a/google/genai/_interactions/types/mcp_server_tool_call_content.py +++ b/google/genai/_interactions/types/mcp_server_tool_call_content.py @@ -15,7 +15,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict +from typing import Dict, Optional from typing_extensions import Literal from .._models import BaseModel @@ -39,3 +39,6 @@ class MCPServerToolCallContent(BaseModel): """The name of the used MCP server.""" type: Literal["mcp_server_tool_call"] + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/mcp_server_tool_call_content_param.py b/google/genai/_interactions/types/mcp_server_tool_call_content_param.py index f9d444230..296c51396 100644 --- a/google/genai/_interactions/types/mcp_server_tool_call_content_param.py +++ b/google/genai/_interactions/types/mcp_server_tool_call_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing import Dict -from typing_extensions import Literal, Required, TypedDict +from typing import Dict, Union +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config __all__ = ["MCPServerToolCallContentParam"] @@ -39,3 +43,9 @@ class MCPServerToolCallContentParam(TypedDict, total=False): """The name of the used MCP server.""" type: Required[Literal["mcp_server_tool_call"]] + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(MCPServerToolCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/mcp_server_tool_result_content_param.py b/google/genai/_interactions/types/mcp_server_tool_result_content_param.py index 1ed1bd1df..b1239f32d 100644 --- a/google/genai/_interactions/types/mcp_server_tool_result_content_param.py +++ b/google/genai/_interactions/types/mcp_server_tool_result_content_param.py @@ -18,8 +18,11 @@ from __future__ import annotations from typing import Union, Iterable -from typing_extensions import Literal, Required, TypeAlias, TypedDict +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .text_content_param import TextContentParam from .image_content_param import ImageContentParam @@ -45,5 +48,8 @@ class MCPServerToolResultContentParam(TypedDict, total=False): server_name: str """The name of the used MCP server.""" - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(MCPServerToolResultContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/url_context_call_content.py b/google/genai/_interactions/types/url_context_call_content.py index 6e09535ef..243f87ad2 100644 --- a/google/genai/_interactions/types/url_context_call_content.py +++ b/google/genai/_interactions/types/url_context_call_content.py @@ -15,6 +15,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from typing_extensions import Literal from .._models import BaseModel @@ -33,3 +34,6 @@ class URLContextCallContent(BaseModel): """The arguments to pass to the URL context.""" type: Literal["url_context_call"] + + signature: Optional[str] = None + """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/url_context_call_content_param.py b/google/genai/_interactions/types/url_context_call_content_param.py index 628a3b31e..e7ae71d4e 100644 --- a/google/genai/_interactions/types/url_context_call_content_param.py +++ b/google/genai/_interactions/types/url_context_call_content_param.py @@ -17,8 +17,12 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .url_context_call_arguments_param import URLContextCallArgumentsParam __all__ = ["URLContextCallContentParam"] @@ -34,3 +38,9 @@ class URLContextCallContentParam(TypedDict, total=False): """The arguments to pass to the URL context.""" type: Required[Literal["url_context_call"]] + + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] + """A signature hash for backend validation.""" + + +set_pydantic_config(URLContextCallContentParam, {"arbitrary_types_allowed": True}) diff --git a/google/genai/_interactions/types/url_context_result_content_param.py b/google/genai/_interactions/types/url_context_result_content_param.py index 558f42581..a0c3ad36c 100644 --- a/google/genai/_interactions/types/url_context_result_content_param.py +++ b/google/genai/_interactions/types/url_context_result_content_param.py @@ -17,9 +17,12 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Literal, Required, TypedDict +from typing import Union, Iterable +from typing_extensions import Literal, Required, Annotated, TypedDict +from .._types import Base64FileInput +from .._utils import PropertyInfo +from .._models import set_pydantic_config from .url_context_result_param import URLContextResultParam __all__ = ["URLContextResultContentParam"] @@ -39,5 +42,8 @@ class URLContextResultContentParam(TypedDict, total=False): is_error: bool """Whether the URL context resulted in an error.""" - signature: str + signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] """A signature hash for backend validation.""" + + +set_pydantic_config(URLContextResultContentParam, {"arbitrary_types_allowed": True})