From 8e5037424a4f40a3388d6a02a6907fe7f5c84493 Mon Sep 17 00:00:00 2001 From: Kaituo Huang Date: Wed, 4 Mar 2026 21:50:30 -0800 Subject: [PATCH] chore: update comments for required fields FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/googleapis/python-genai/pull/2108 from googleapis:release-please--branches--main 8f7cd3ee24392f8197f0a6aea6dc331fbaaaea4b PiperOrigin-RevId: 878827136 --- .../types/code_execution_call_content.py | 2 +- .../types/code_execution_call_content_param.py | 2 +- .../types/code_execution_result_content.py | 2 +- .../types/code_execution_result_content_param.py | 2 +- .../types/file_search_result_content.py | 2 +- .../types/file_search_result_content_param.py | 2 +- .../_interactions/types/function_call_content.py | 4 ++-- .../types/function_call_content_param.py | 4 ++-- .../types/google_search_call_content.py | 2 +- .../types/google_search_call_content_param.py | 2 +- .../types/google_search_result_content.py | 2 +- .../types/google_search_result_content_param.py | 2 +- google/genai/_interactions/types/interaction.py | 12 ++++++------ .../types/interaction_complete_event.py | 3 ++- .../types/mcp_server_tool_call_content.py | 6 +++--- .../types/mcp_server_tool_call_content_param.py | 6 +++--- google/genai/_interactions/types/text_content.py | 2 +- .../genai/_interactions/types/text_content_param.py | 2 +- .../_interactions/types/url_context_call_content.py | 2 +- .../types/url_context_call_content_param.py | 2 +- .../types/url_context_result_content.py | 2 +- .../types/url_context_result_content_param.py | 2 +- 22 files changed, 34 insertions(+), 33 deletions(-) diff --git a/google/genai/_interactions/types/code_execution_call_content.py b/google/genai/_interactions/types/code_execution_call_content.py index af84a4837..980cbee7b 100644 --- a/google/genai/_interactions/types/code_execution_call_content.py +++ b/google/genai/_interactions/types/code_execution_call_content.py @@ -31,7 +31,7 @@ class CodeExecutionCallContent(BaseModel): """A unique ID for this specific tool call.""" arguments: CodeExecutionCallArguments - """The arguments to pass to the code execution.""" + """Required. The arguments to pass to the code execution.""" type: Literal["code_execution_call"] 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 b0572012e..6c3e143d3 100644 --- a/google/genai/_interactions/types/code_execution_call_content_param.py +++ b/google/genai/_interactions/types/code_execution_call_content_param.py @@ -31,7 +31,7 @@ class CodeExecutionCallContentParam(TypedDict, total=False): """A unique ID for this specific tool call.""" arguments: Required[CodeExecutionCallArgumentsParam] - """The arguments to pass to the code execution.""" + """Required. The arguments to pass to the code execution.""" type: Required[Literal["code_execution_call"]] diff --git a/google/genai/_interactions/types/code_execution_result_content.py b/google/genai/_interactions/types/code_execution_result_content.py index 21fda9505..526390542 100644 --- a/google/genai/_interactions/types/code_execution_result_content.py +++ b/google/genai/_interactions/types/code_execution_result_content.py @@ -30,7 +30,7 @@ class CodeExecutionResultContent(BaseModel): """ID to match the ID from the code execution call block.""" result: str - """The output of the code execution.""" + """Required. The output of the code execution.""" type: Literal["code_execution_result"] 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..be6ccf1e4 100644 --- a/google/genai/_interactions/types/code_execution_result_content_param.py +++ b/google/genai/_interactions/types/code_execution_result_content_param.py @@ -29,7 +29,7 @@ class CodeExecutionResultContentParam(TypedDict, total=False): """ID to match the ID from the code execution call block.""" result: Required[str] - """The output of the code execution.""" + """Required. The output of the code execution.""" type: Required[Literal["code_execution_result"]] diff --git a/google/genai/_interactions/types/file_search_result_content.py b/google/genai/_interactions/types/file_search_result_content.py index be786f037..d5e3bb1e5 100644 --- a/google/genai/_interactions/types/file_search_result_content.py +++ b/google/genai/_interactions/types/file_search_result_content.py @@ -45,7 +45,7 @@ class FileSearchResultContent(BaseModel): type: Literal["file_search_result"] result: Optional[List[Result]] = None - """The results of the File Search.""" + """Required. The results of the File Search.""" signature: Optional[str] = None """A signature hash for backend validation.""" 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..7a60887fc 100644 --- a/google/genai/_interactions/types/file_search_result_content_param.py +++ b/google/genai/_interactions/types/file_search_result_content_param.py @@ -45,7 +45,7 @@ class FileSearchResultContentParam(TypedDict, total=False): type: Required[Literal["file_search_result"]] result: Iterable[Result] - """The results of the File Search.""" + """Required. The results of the File Search.""" signature: str """A signature hash for backend validation.""" diff --git a/google/genai/_interactions/types/function_call_content.py b/google/genai/_interactions/types/function_call_content.py index b0e77d7e0..b19c887b3 100644 --- a/google/genai/_interactions/types/function_call_content.py +++ b/google/genai/_interactions/types/function_call_content.py @@ -30,10 +30,10 @@ class FunctionCallContent(BaseModel): """A unique ID for this specific tool call.""" arguments: Dict[str, object] - """The arguments to pass to the function.""" + """Required. The arguments to pass to the function.""" name: str - """The name of the tool to call.""" + """Required. The name of the tool to call.""" type: Literal["function_call"] diff --git a/google/genai/_interactions/types/function_call_content_param.py b/google/genai/_interactions/types/function_call_content_param.py index 37d987c5b..b93181576 100644 --- a/google/genai/_interactions/types/function_call_content_param.py +++ b/google/genai/_interactions/types/function_call_content_param.py @@ -30,10 +30,10 @@ class FunctionCallContentParam(TypedDict, total=False): """A unique ID for this specific tool call.""" arguments: Required[Dict[str, object]] - """The arguments to pass to the function.""" + """Required. The arguments to pass to the function.""" name: Required[str] - """The name of the tool to call.""" + """Required. The name of the tool to call.""" type: Required[Literal["function_call"]] diff --git a/google/genai/_interactions/types/google_search_call_content.py b/google/genai/_interactions/types/google_search_call_content.py index bbda4edd0..e7f3a0be2 100644 --- a/google/genai/_interactions/types/google_search_call_content.py +++ b/google/genai/_interactions/types/google_search_call_content.py @@ -31,7 +31,7 @@ class GoogleSearchCallContent(BaseModel): """A unique ID for this specific tool call.""" arguments: GoogleSearchCallArguments - """The arguments to pass to Google Search.""" + """Required. The arguments to pass to Google Search.""" type: Literal["google_search_call"] 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 7720ab275..30f36545a 100644 --- a/google/genai/_interactions/types/google_search_call_content_param.py +++ b/google/genai/_interactions/types/google_search_call_content_param.py @@ -31,7 +31,7 @@ class GoogleSearchCallContentParam(TypedDict, total=False): """A unique ID for this specific tool call.""" arguments: Required[GoogleSearchCallArgumentsParam] - """The arguments to pass to Google Search.""" + """Required. The arguments to pass to Google Search.""" type: Required[Literal["google_search_call"]] diff --git a/google/genai/_interactions/types/google_search_result_content.py b/google/genai/_interactions/types/google_search_result_content.py index 98777018c..e4769551e 100644 --- a/google/genai/_interactions/types/google_search_result_content.py +++ b/google/genai/_interactions/types/google_search_result_content.py @@ -31,7 +31,7 @@ class GoogleSearchResultContent(BaseModel): """ID to match the ID from the google search call block.""" result: List[GoogleSearchResult] - """The results of the Google Search.""" + """Required. The results of the Google Search.""" type: Literal["google_search_result"] 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..ccc8c1a23 100644 --- a/google/genai/_interactions/types/google_search_result_content_param.py +++ b/google/genai/_interactions/types/google_search_result_content_param.py @@ -32,7 +32,7 @@ class GoogleSearchResultContentParam(TypedDict, total=False): """ID to match the ID from the google search call block.""" result: Required[Iterable[GoogleSearchResultParam]] - """The results of the Google Search.""" + """Required. The results of the Google Search.""" type: Required[Literal["google_search_result"]] diff --git a/google/genai/_interactions/types/interaction.py b/google/genai/_interactions/types/interaction.py index 2d4a187c4..19df77a40 100644 --- a/google/genai/_interactions/types/interaction.py +++ b/google/genai/_interactions/types/interaction.py @@ -82,22 +82,22 @@ class Interaction(BaseModel): """The Interaction resource.""" id: str - """Output only. A unique identifier for the interaction completion.""" + """Required. Output only. A unique identifier for the interaction completion.""" created: datetime - """Output only. + """Required. - The time at which the response was created in ISO 8601 format + Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). """ status: Literal["in_progress", "requires_action", "completed", "failed", "cancelled", "incomplete"] - """Output only. The status of the interaction.""" + """Required. Output only. The status of the interaction.""" updated: datetime - """Output only. + """Required. - The time at which the response was last updated in ISO 8601 format + Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). """ diff --git a/google/genai/_interactions/types/interaction_complete_event.py b/google/genai/_interactions/types/interaction_complete_event.py index b45a642f5..177aa73f7 100644 --- a/google/genai/_interactions/types/interaction_complete_event.py +++ b/google/genai/_interactions/types/interaction_complete_event.py @@ -28,7 +28,8 @@ class InteractionCompleteEvent(BaseModel): event_type: Literal["interaction.complete"] interaction: Interaction - """ + """Required. + The completed interaction with empty outputs to reduce the payload size. Use the preceding ContentDelta events for the actual output. """ 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 c9c71858b..c647e2174 100644 --- a/google/genai/_interactions/types/mcp_server_tool_call_content.py +++ b/google/genai/_interactions/types/mcp_server_tool_call_content.py @@ -30,13 +30,13 @@ class MCPServerToolCallContent(BaseModel): """A unique ID for this specific tool call.""" arguments: Dict[str, object] - """The JSON object of arguments for the function.""" + """Required. The JSON object of arguments for the function.""" name: str - """The name of the tool which was called.""" + """Required. The name of the tool which was called.""" server_name: str - """The name of the used MCP server.""" + """Required. The name of the used MCP server.""" type: Literal["mcp_server_tool_call"] 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 f105f965b..428e7e871 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 @@ -30,13 +30,13 @@ class MCPServerToolCallContentParam(TypedDict, total=False): """A unique ID for this specific tool call.""" arguments: Required[Dict[str, object]] - """The JSON object of arguments for the function.""" + """Required. The JSON object of arguments for the function.""" name: Required[str] - """The name of the tool which was called.""" + """Required. The name of the tool which was called.""" server_name: Required[str] - """The name of the used MCP server.""" + """Required. The name of the used MCP server.""" type: Required[Literal["mcp_server_tool_call"]] diff --git a/google/genai/_interactions/types/text_content.py b/google/genai/_interactions/types/text_content.py index d0b631f24..b753059e6 100644 --- a/google/genai/_interactions/types/text_content.py +++ b/google/genai/_interactions/types/text_content.py @@ -28,7 +28,7 @@ class TextContent(BaseModel): """A text content block.""" text: str - """The text content.""" + """Required. The text content.""" type: Literal["text"] diff --git a/google/genai/_interactions/types/text_content_param.py b/google/genai/_interactions/types/text_content_param.py index a9d5cfd7b..97eb9ebd7 100644 --- a/google/genai/_interactions/types/text_content_param.py +++ b/google/genai/_interactions/types/text_content_param.py @@ -29,7 +29,7 @@ class TextContentParam(TypedDict, total=False): """A text content block.""" text: Required[str] - """The text content.""" + """Required. The text content.""" type: Required[Literal["text"]] diff --git a/google/genai/_interactions/types/url_context_call_content.py b/google/genai/_interactions/types/url_context_call_content.py index 243f87ad2..36f1cfc58 100644 --- a/google/genai/_interactions/types/url_context_call_content.py +++ b/google/genai/_interactions/types/url_context_call_content.py @@ -31,7 +31,7 @@ class URLContextCallContent(BaseModel): """A unique ID for this specific tool call.""" arguments: URLContextCallArguments - """The arguments to pass to the URL context.""" + """Required. The arguments to pass to the URL context.""" type: Literal["url_context_call"] 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 ce9d3788e..be0e6a0b8 100644 --- a/google/genai/_interactions/types/url_context_call_content_param.py +++ b/google/genai/_interactions/types/url_context_call_content_param.py @@ -31,7 +31,7 @@ class URLContextCallContentParam(TypedDict, total=False): """A unique ID for this specific tool call.""" arguments: Required[URLContextCallArgumentsParam] - """The arguments to pass to the URL context.""" + """Required. The arguments to pass to the URL context.""" type: Required[Literal["url_context_call"]] diff --git a/google/genai/_interactions/types/url_context_result_content.py b/google/genai/_interactions/types/url_context_result_content.py index b4c9cbf5a..da9d86880 100644 --- a/google/genai/_interactions/types/url_context_result_content.py +++ b/google/genai/_interactions/types/url_context_result_content.py @@ -31,7 +31,7 @@ class URLContextResultContent(BaseModel): """ID to match the ID from the url context call block.""" result: List[URLContextResult] - """The results of the URL context.""" + """Required. The results of the URL context.""" type: Literal["url_context_result"] 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..387e6bec6 100644 --- a/google/genai/_interactions/types/url_context_result_content_param.py +++ b/google/genai/_interactions/types/url_context_result_content_param.py @@ -32,7 +32,7 @@ class URLContextResultContentParam(TypedDict, total=False): """ID to match the ID from the url context call block.""" result: Required[Iterable[URLContextResultParam]] - """The results of the URL context.""" + """Required. The results of the URL context.""" type: Required[Literal["url_context_result"]]