# pylint: disable=line-too-long,useless-suppression,too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=useless-super-delegation

import datetime
from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload

from .._utils.model_base import Model as _Model, rest_discriminator, rest_field
from ._enums import (
    AnnotationType,
    ApplyPatchFileOperationType,
    ApplyPatchOperationParamType,
    ComputerActionType,
    ContainerNetworkPolicyParamType,
    ContainerSkillType,
    CustomToolParamFormatType,
    FunctionAndCustomToolCallOutputType,
    FunctionShellCallEnvironmentType,
    FunctionShellCallItemParamEnvironmentType,
    FunctionShellCallOutputOutcomeParamType,
    FunctionShellCallOutputOutcomeType,
    FunctionShellToolParamEnvironmentType,
    ItemFieldType,
    ItemType,
    MemoryItemKind,
    MessageContentType,
    OpenApiAuthType,
    OutputContentType,
    OutputItemType,
    OutputMessageContentType,
    ResponseStreamEventType,
    TextResponseFormatConfigurationType,
    ToolChoiceParamType,
    ToolType,
)

if TYPE_CHECKING:
    from .. import _types, models as _models


class Tool(_Model):
    """A tool that can be used to generate a response.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    A2APreviewTool, ApplyPatchToolParam, AzureAISearchTool, AzureFunctionTool,
    BingCustomSearchPreviewTool, BingGroundingTool, BrowserAutomationPreviewTool,
    CaptureStructuredOutputsTool, CodeInterpreterTool, ComputerUsePreviewTool, CustomToolParam,
    MicrosoftFabricPreviewTool, FileSearchTool, FunctionTool, ImageGenTool, LocalShellToolParam,
    MCPTool, MemorySearchPreviewTool, OpenApiTool, SharepointPreviewTool, FunctionShellToolParam,
    WebSearchTool, WebSearchPreviewTool, WorkIQPreviewTool

    :ivar type: Required. Known values are: "function", "file_search", "computer_use_preview",
     "web_search", "mcp", "code_interpreter", "image_generation", "local_shell", "shell", "custom",
     "web_search_preview", "apply_patch", "a2a_preview", "bing_custom_search_preview",
     "browser_automation_preview", "fabric_dataagent_preview", "sharepoint_grounding_preview",
     "memory_search_preview", "work_iq_preview", "azure_ai_search", "azure_function",
     "bing_grounding", "capture_structured_outputs", and "openapi".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ToolType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"function\", \"file_search\", \"computer_use_preview\",
     \"web_search\", \"mcp\", \"code_interpreter\", \"image_generation\", \"local_shell\",
     \"shell\", \"custom\", \"web_search_preview\", \"apply_patch\", \"a2a_preview\",
     \"bing_custom_search_preview\", \"browser_automation_preview\", \"fabric_dataagent_preview\",
     \"sharepoint_grounding_preview\", \"memory_search_preview\", \"work_iq_preview\",
     \"azure_ai_search\", \"azure_function\", \"bing_grounding\", \"capture_structured_outputs\",
     and \"openapi\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class A2APreviewTool(Tool, discriminator="a2a_preview"):
    """An agent implementing the A2A protocol.

    :ivar type: The type of the tool. Always ``"a2a_preview``. Required. A2_A_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.A2_A_PREVIEW
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar base_url: Base URL of the agent.
    :vartype base_url: str
    :ivar agent_card_path: The path to the agent card relative to the ``base_url``. If not
     provided, defaults to  ``/.well-known/agent-card.json``.
    :vartype agent_card_path: str
    :ivar project_connection_id: The connection ID in the project for the A2A server. The
     connection stores authentication and other connection details needed to connect to the A2A
     server.
    :vartype project_connection_id: str
    """

    type: Literal[ToolType.A2_A_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the tool. Always ``\"a2a_preview``. Required. A2_A_PREVIEW."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    base_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Base URL of the agent."""
    agent_card_path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The path to the agent card relative to the ``base_url``. If not provided, defaults to
     ``/.well-known/agent-card.json``."""
    project_connection_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The connection ID in the project for the A2A server. The connection stores authentication and
     other connection details needed to connect to the A2A server."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        description: Optional[str] = None,
        base_url: Optional[str] = None,
        agent_card_path: Optional[str] = None,
        project_connection_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.A2_A_PREVIEW  # type: ignore


class OutputItem(_Model):
    """OutputItem.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    A2AToolCall, A2AToolCallOutput, OutputItemApplyPatchToolCall,
    OutputItemApplyPatchToolCallOutput, AzureAISearchToolCall, AzureAISearchToolCallOutput,
    AzureFunctionToolCall, AzureFunctionToolCallOutput, BingCustomSearchToolCall,
    BingCustomSearchToolCallOutput, BingGroundingToolCall, BingGroundingToolCallOutput,
    BrowserAutomationToolCall, BrowserAutomationToolCallOutput, OutputItemCodeInterpreterToolCall,
    OutputItemCompactionBody, OutputItemComputerToolCall, OutputItemComputerToolCallOutputResource,
    OutputItemCustomToolCall, OutputItemCustomToolCallOutput, FabricDataAgentToolCall,
    FabricDataAgentToolCallOutput, OutputItemFileSearchToolCall, OutputItemFunctionToolCall,
    FunctionToolCallOutputResource, OutputItemImageGenToolCall, OutputItemLocalShellToolCall,
    OutputItemLocalShellToolCallOutput, OutputItemMcpApprovalRequest,
    OutputItemMcpApprovalResponseResource, OutputItemMcpToolCall, OutputItemMcpListTools,
    MemorySearchToolCallItemResource, OutputItemMessage, OAuthConsentRequestOutputItem,
    OpenApiToolCall, OpenApiToolCallOutput, OutputItemOutputMessage, OutputItemReasoningItem,
    SharepointGroundingToolCall, SharepointGroundingToolCallOutput, OutputItemFunctionShellCall,
    OutputItemFunctionShellCallOutput, StructuredOutputsOutputItem, OutputItemWebSearchToolCall,
    WorkflowActionOutputItem

    :ivar type: Required. Known values are: "output_message", "file_search_call", "function_call",
     "web_search_call", "computer_call", "reasoning", "compaction", "image_generation_call",
     "code_interpreter_call", "local_shell_call", "shell_call", "shell_call_output",
     "apply_patch_call", "apply_patch_call_output", "mcp_call", "mcp_list_tools",
     "mcp_approval_request", "custom_tool_call", "message", "computer_call_output",
     "function_call_output", "local_shell_call_output", "mcp_approval_response",
     "custom_tool_call_output", "structured_outputs", "oauth_consent_request", "memory_search_call",
     "workflow_action", "a2a_preview_call", "a2a_preview_call_output", "bing_grounding_call",
     "bing_grounding_call_output", "sharepoint_grounding_preview_call",
     "sharepoint_grounding_preview_call_output", "azure_ai_search_call",
     "azure_ai_search_call_output", "bing_custom_search_preview_call",
     "bing_custom_search_preview_call_output", "openapi_call", "openapi_call_output",
     "browser_automation_preview_call", "browser_automation_preview_call_output",
     "fabric_dataagent_preview_call", "fabric_dataagent_preview_call_output", "azure_function_call",
     and "azure_function_call_output".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OutputItemType
    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"output_message\", \"file_search_call\", \"function_call\",
     \"web_search_call\", \"computer_call\", \"reasoning\", \"compaction\",
     \"image_generation_call\", \"code_interpreter_call\", \"local_shell_call\", \"shell_call\",
     \"shell_call_output\", \"apply_patch_call\", \"apply_patch_call_output\", \"mcp_call\",
     \"mcp_list_tools\", \"mcp_approval_request\", \"custom_tool_call\", \"message\",
     \"computer_call_output\", \"function_call_output\", \"local_shell_call_output\",
     \"mcp_approval_response\", \"custom_tool_call_output\", \"structured_outputs\",
     \"oauth_consent_request\", \"memory_search_call\", \"workflow_action\", \"a2a_preview_call\",
     \"a2a_preview_call_output\", \"bing_grounding_call\", \"bing_grounding_call_output\",
     \"sharepoint_grounding_preview_call\", \"sharepoint_grounding_preview_call_output\",
     \"azure_ai_search_call\", \"azure_ai_search_call_output\", \"bing_custom_search_preview_call\",
     \"bing_custom_search_preview_call_output\", \"openapi_call\", \"openapi_call_output\",
     \"browser_automation_preview_call\", \"browser_automation_preview_call_output\",
     \"fabric_dataagent_preview_call\", \"fabric_dataagent_preview_call_output\",
     \"azure_function_call\", and \"azure_function_call_output\"."""
    agent_reference: Optional["_models.AgentReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The agent that created the item."""
    response_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The response on which the item is created."""

    @overload
    def __init__(
        self,
        *,
        type: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class A2AToolCall(OutputItem, discriminator="a2a_preview_call"):
    """An A2A (Agent-to-Agent) tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. A2_A_PREVIEW_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.A2_A_PREVIEW_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the A2A agent card being called. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.A2_A_PREVIEW_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. A2_A_PREVIEW_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the A2A agent card being called. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.A2_A_PREVIEW_CALL  # type: ignore


class A2AToolCallOutput(OutputItem, discriminator="a2a_preview_call_output"):
    """The output of an A2A (Agent-to-Agent) tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. A2_A_PREVIEW_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.A2_A_PREVIEW_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the A2A agent card that was called. Required.
    :vartype name: str
    :ivar output: The output from the A2A tool call. Is one of the following types: {str: Any},
     str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.A2_A_PREVIEW_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. A2_A_PREVIEW_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the A2A agent card that was called. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the A2A tool call. Is one of the following types: {str: Any}, str, [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.A2_A_PREVIEW_CALL_OUTPUT  # type: ignore


class AgentReference(_Model):
    """AgentReference.

    :ivar type: Required. Default value is "agent_reference".
    :vartype type: str
    :ivar name: The name of the agent. Required.
    :vartype name: str
    :ivar version: The version identifier of the agent.
    :vartype version: str
    """

    type: Literal["agent_reference"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Default value is \"agent_reference\"."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the agent. Required."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The version identifier of the agent."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        version: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["agent_reference"] = "agent_reference"


class AISearchIndexResource(_Model):
    """A AI Search Index resource.

    :ivar project_connection_id: An index connection ID in an IndexResource attached to this agent.
    :vartype project_connection_id: str
    :ivar index_name: The name of an index in an IndexResource attached to this agent.
    :vartype index_name: str
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar query_type: Type of query in an AIIndexResource attached to this agent. Known values are:
     "simple", "semantic", "vector", "vector_simple_hybrid", and "vector_semantic_hybrid".
    :vartype query_type: str or
     ~azure.ai.agentserver.responses.models.models.AzureAISearchQueryType
    :ivar top_k: Number of documents to retrieve from search and present to the model.
    :vartype top_k: int
    :ivar filter: filter string for search resource. `Learn more here
     <https://learn.microsoft.com/azure/search/search-filters>`_.
    :vartype filter: str
    :ivar index_asset_id: Index asset id for search resource.
    :vartype index_asset_id: str
    """

    project_connection_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An index connection ID in an IndexResource attached to this agent."""
    index_name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of an index in an IndexResource attached to this agent."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    query_type: Optional[Union[str, "_models.AzureAISearchQueryType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Type of query in an AIIndexResource attached to this agent. Known values are: \"simple\",
     \"semantic\", \"vector\", \"vector_simple_hybrid\", and \"vector_semantic_hybrid\"."""
    top_k: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of documents to retrieve from search and present to the model."""
    filter: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """filter string for search resource. `Learn more here
     <https://learn.microsoft.com/azure/search/search-filters>`_."""
    index_asset_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Index asset id for search resource."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: Optional[str] = None,
        index_name: Optional[str] = None,
        name: Optional[str] = None,
        description: Optional[str] = None,
        query_type: Optional[Union[str, "_models.AzureAISearchQueryType"]] = None,
        top_k: Optional[int] = None,
        filter: Optional[str] = None,  # pylint: disable=redefined-builtin
        index_asset_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class Annotation(_Model):
    """An annotation that applies to a span of output text.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ContainerFileCitationBody, FileCitationBody, FilePath, UrlCitationBody

    :ivar type: Required. Known values are: "file_citation", "url_citation",
     "container_file_citation", and "file_path".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AnnotationType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"file_citation\", \"url_citation\", \"container_file_citation\",
     and \"file_path\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ApiErrorResponse(_Model):
    """Error response for API failures.

    :ivar error: Required.
    :vartype error: ~azure.ai.agentserver.responses.models.models.Error
    """

    error: "_models.Error" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        error: "_models.Error",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ApplyPatchFileOperation(_Model):
    """Apply patch operation.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ApplyPatchCreateFileOperation, ApplyPatchDeleteFileOperation, ApplyPatchUpdateFileOperation

    :ivar type: Required. Known values are: "create_file", "delete_file", and "update_file".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ApplyPatchFileOperationType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"create_file\", \"delete_file\", and \"update_file\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ApplyPatchCreateFileOperation(ApplyPatchFileOperation, discriminator="create_file"):
    """Apply patch create file operation.

    :ivar type: Create a new file with the provided diff. Required. CREATE_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CREATE_FILE
    :ivar path: Path of the file to create. Required.
    :vartype path: str
    :ivar diff: Diff to apply. Required.
    :vartype diff: str
    """

    type: Literal[ApplyPatchFileOperationType.CREATE_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Create a new file with the provided diff. Required. CREATE_FILE."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path of the file to create. Required."""
    diff: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Diff to apply. Required."""

    @overload
    def __init__(
        self,
        *,
        path: str,
        diff: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ApplyPatchFileOperationType.CREATE_FILE  # type: ignore


class ApplyPatchOperationParam(_Model):
    """Apply patch operation.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ApplyPatchCreateFileOperationParam, ApplyPatchDeleteFileOperationParam,
    ApplyPatchUpdateFileOperationParam

    :ivar type: Required. Known values are: "create_file", "delete_file", and "update_file".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.ApplyPatchOperationParamType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"create_file\", \"delete_file\", and \"update_file\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ApplyPatchCreateFileOperationParam(ApplyPatchOperationParam, discriminator="create_file"):
    """Apply patch create file operation.

    :ivar type: The operation type. Always ``create_file``. Required. CREATE_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CREATE_FILE
    :ivar path: Path of the file to create relative to the workspace root. Required.
    :vartype path: str
    :ivar diff: Unified diff content to apply when creating the file. Required.
    :vartype diff: str
    """

    type: Literal[ApplyPatchOperationParamType.CREATE_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The operation type. Always ``create_file``. Required. CREATE_FILE."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path of the file to create relative to the workspace root. Required."""
    diff: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unified diff content to apply when creating the file. Required."""

    @overload
    def __init__(
        self,
        *,
        path: str,
        diff: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ApplyPatchOperationParamType.CREATE_FILE  # type: ignore


class ApplyPatchDeleteFileOperation(ApplyPatchFileOperation, discriminator="delete_file"):
    """Apply patch delete file operation.

    :ivar type: Delete the specified file. Required. DELETE_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.DELETE_FILE
    :ivar path: Path of the file to delete. Required.
    :vartype path: str
    """

    type: Literal[ApplyPatchFileOperationType.DELETE_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Delete the specified file. Required. DELETE_FILE."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path of the file to delete. Required."""

    @overload
    def __init__(
        self,
        *,
        path: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ApplyPatchFileOperationType.DELETE_FILE  # type: ignore


class ApplyPatchDeleteFileOperationParam(ApplyPatchOperationParam, discriminator="delete_file"):
    """Apply patch delete file operation.

    :ivar type: The operation type. Always ``delete_file``. Required. DELETE_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.DELETE_FILE
    :ivar path: Path of the file to delete relative to the workspace root. Required.
    :vartype path: str
    """

    type: Literal[ApplyPatchOperationParamType.DELETE_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The operation type. Always ``delete_file``. Required. DELETE_FILE."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path of the file to delete relative to the workspace root. Required."""

    @overload
    def __init__(
        self,
        *,
        path: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ApplyPatchOperationParamType.DELETE_FILE  # type: ignore


class Item(_Model):
    """Content item used to generate a response.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ApplyPatchToolCallItemParam, ApplyPatchToolCallOutputItemParam, ItemCodeInterpreterToolCall,
    CompactionSummaryItemParam, ItemComputerToolCall, ComputerCallOutputItemParam,
    ItemCustomToolCall, ItemCustomToolCallOutput, ItemFileSearchToolCall, ItemFunctionToolCall,
    FunctionCallOutputItemParam, ItemImageGenToolCall, ItemReferenceParam, ItemLocalShellToolCall,
    ItemLocalShellToolCallOutput, ItemMcpApprovalRequest, MCPApprovalResponse, ItemMcpToolCall,
    ItemMcpListTools, MemorySearchToolCallItemParam, ItemMessage, ItemOutputMessage,
    ItemReasoningItem, FunctionShellCallItemParam, FunctionShellCallOutputItemParam,
    ItemWebSearchToolCall

    :ivar type: Required. Known values are: "message", "output_message", "file_search_call",
     "computer_call", "computer_call_output", "web_search_call", "function_call",
     "function_call_output", "reasoning", "compaction", "image_generation_call",
     "code_interpreter_call", "local_shell_call", "local_shell_call_output", "shell_call",
     "shell_call_output", "apply_patch_call", "apply_patch_call_output", "mcp_list_tools",
     "mcp_approval_request", "mcp_approval_response", "mcp_call", "custom_tool_call_output",
     "custom_tool_call", "item_reference", "structured_outputs", "oauth_consent_request",
     "memory_search_call", "workflow_action", "a2a_preview_call", "a2a_preview_call_output",
     "bing_grounding_call", "bing_grounding_call_output", "sharepoint_grounding_preview_call",
     "sharepoint_grounding_preview_call_output", "azure_ai_search_call",
     "azure_ai_search_call_output", "bing_custom_search_preview_call",
     "bing_custom_search_preview_call_output", "openapi_call", "openapi_call_output",
     "browser_automation_preview_call", "browser_automation_preview_call_output",
     "fabric_dataagent_preview_call", "fabric_dataagent_preview_call_output", "azure_function_call",
     and "azure_function_call_output".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ItemType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"message\", \"output_message\", \"file_search_call\",
     \"computer_call\", \"computer_call_output\", \"web_search_call\", \"function_call\",
     \"function_call_output\", \"reasoning\", \"compaction\", \"image_generation_call\",
     \"code_interpreter_call\", \"local_shell_call\", \"local_shell_call_output\", \"shell_call\",
     \"shell_call_output\", \"apply_patch_call\", \"apply_patch_call_output\", \"mcp_list_tools\",
     \"mcp_approval_request\", \"mcp_approval_response\", \"mcp_call\", \"custom_tool_call_output\",
     \"custom_tool_call\", \"item_reference\", \"structured_outputs\", \"oauth_consent_request\",
     \"memory_search_call\", \"workflow_action\", \"a2a_preview_call\", \"a2a_preview_call_output\",
     \"bing_grounding_call\", \"bing_grounding_call_output\", \"sharepoint_grounding_preview_call\",
     \"sharepoint_grounding_preview_call_output\", \"azure_ai_search_call\",
     \"azure_ai_search_call_output\", \"bing_custom_search_preview_call\",
     \"bing_custom_search_preview_call_output\", \"openapi_call\", \"openapi_call_output\",
     \"browser_automation_preview_call\", \"browser_automation_preview_call_output\",
     \"fabric_dataagent_preview_call\", \"fabric_dataagent_preview_call_output\",
     \"azure_function_call\", and \"azure_function_call_output\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ApplyPatchToolCallItemParam(Item, discriminator="apply_patch_call"):
    """Apply patch tool call.

    :ivar type: The type of the item. Always ``apply_patch_call``. Required. APPLY_PATCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH_CALL
    :ivar id:
    :vartype id: str
    :ivar call_id: The unique ID of the apply patch tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the apply patch tool call. One of ``in_progress`` or ``completed``.
     Required. Known values are: "in_progress" and "completed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ApplyPatchCallStatusParam
    :ivar operation: The specific create, delete, or update instruction for the apply_patch tool
     call. Required.
    :vartype operation: ~azure.ai.agentserver.responses.models.models.ApplyPatchOperationParam
    """

    type: Literal[ItemType.APPLY_PATCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``apply_patch_call``. Required. APPLY_PATCH_CALL."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call generated by the model. Required."""
    status: Union[str, "_models.ApplyPatchCallStatusParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the apply patch tool call. One of ``in_progress`` or ``completed``. Required.
     Known values are: \"in_progress\" and \"completed\"."""
    operation: "_models.ApplyPatchOperationParam" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The specific create, delete, or update instruction for the apply_patch tool call. Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ApplyPatchCallStatusParam"],
        operation: "_models.ApplyPatchOperationParam",
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.APPLY_PATCH_CALL  # type: ignore


class ApplyPatchToolCallOutputItemParam(Item, discriminator="apply_patch_call_output"):
    """Apply patch tool call output.

    :ivar type: The type of the item. Always ``apply_patch_call_output``. Required.
     APPLY_PATCH_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH_CALL_OUTPUT
    :ivar id:
    :vartype id: str
    :ivar call_id: The unique ID of the apply patch tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the apply patch tool call output. One of ``completed`` or
     ``failed``. Required. Known values are: "completed" and "failed".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.ApplyPatchCallOutputStatusParam
    :ivar output:
    :vartype output: str
    """

    type: Literal[ItemType.APPLY_PATCH_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``apply_patch_call_output``. Required. APPLY_PATCH_CALL_OUTPUT."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call generated by the model. Required."""
    status: Union[str, "_models.ApplyPatchCallOutputStatusParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the apply patch tool call output. One of ``completed`` or ``failed``. Required.
     Known values are: \"completed\" and \"failed\"."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ApplyPatchCallOutputStatusParam"],
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        output: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.APPLY_PATCH_CALL_OUTPUT  # type: ignore


class ApplyPatchToolParam(Tool, discriminator="apply_patch"):
    """Apply patch tool.

    :ivar type: The type of the tool. Always ``apply_patch``. Required. APPLY_PATCH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH
    """

    type: Literal[ToolType.APPLY_PATCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the tool. Always ``apply_patch``. Required. APPLY_PATCH."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.APPLY_PATCH  # type: ignore


class ApplyPatchUpdateFileOperation(ApplyPatchFileOperation, discriminator="update_file"):
    """Apply patch update file operation.

    :ivar type: Update an existing file with the provided diff. Required. UPDATE_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.UPDATE_FILE
    :ivar path: Path of the file to update. Required.
    :vartype path: str
    :ivar diff: Diff to apply. Required.
    :vartype diff: str
    """

    type: Literal[ApplyPatchFileOperationType.UPDATE_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Update an existing file with the provided diff. Required. UPDATE_FILE."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path of the file to update. Required."""
    diff: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Diff to apply. Required."""

    @overload
    def __init__(
        self,
        *,
        path: str,
        diff: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ApplyPatchFileOperationType.UPDATE_FILE  # type: ignore


class ApplyPatchUpdateFileOperationParam(ApplyPatchOperationParam, discriminator="update_file"):
    """Apply patch update file operation.

    :ivar type: The operation type. Always ``update_file``. Required. UPDATE_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.UPDATE_FILE
    :ivar path: Path of the file to update relative to the workspace root. Required.
    :vartype path: str
    :ivar diff: Unified diff content to apply to the existing file. Required.
    :vartype diff: str
    """

    type: Literal[ApplyPatchOperationParamType.UPDATE_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The operation type. Always ``update_file``. Required. UPDATE_FILE."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Path of the file to update relative to the workspace root. Required."""
    diff: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unified diff content to apply to the existing file. Required."""

    @overload
    def __init__(
        self,
        *,
        path: str,
        diff: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ApplyPatchOperationParamType.UPDATE_FILE  # type: ignore


class ApproximateLocation(_Model):
    """ApproximateLocation.

    :ivar type: The type of location approximation. Always ``approximate``. Required. Default value
     is "approximate".
    :vartype type: str
    :ivar country:
    :vartype country: str
    :ivar region:
    :vartype region: str
    :ivar city:
    :vartype city: str
    :ivar timezone:
    :vartype timezone: str
    """

    type: Literal["approximate"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of location approximation. Always ``approximate``. Required. Default value is
     \"approximate\"."""
    country: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    city: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        country: Optional[str] = None,
        region: Optional[str] = None,
        city: Optional[str] = None,
        timezone: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["approximate"] = "approximate"


class AutoCodeInterpreterToolParam(_Model):
    """Automatic Code Interpreter Tool Parameters.

    :ivar type: Always ``auto``. Required. Default value is "auto".
    :vartype type: str
    :ivar file_ids: An optional list of uploaded files to make available to your code.
    :vartype file_ids: list[str]
    :ivar memory_limit: Known values are: "1g", "4g", "16g", and "64g".
    :vartype memory_limit: str or
     ~azure.ai.agentserver.responses.models.models.ContainerMemoryLimit
    :ivar network_policy:
    :vartype network_policy:
     ~azure.ai.agentserver.responses.models.models.ContainerNetworkPolicyParam
    """

    type: Literal["auto"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Always ``auto``. Required. Default value is \"auto\"."""
    file_ids: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An optional list of uploaded files to make available to your code."""
    memory_limit: Optional[Union[str, "_models.ContainerMemoryLimit"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"1g\", \"4g\", \"16g\", and \"64g\"."""
    network_policy: Optional["_models.ContainerNetworkPolicyParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        file_ids: Optional[list[str]] = None,
        memory_limit: Optional[Union[str, "_models.ContainerMemoryLimit"]] = None,
        network_policy: Optional["_models.ContainerNetworkPolicyParam"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["auto"] = "auto"


class AzureAISearchTool(Tool, discriminator="azure_ai_search"):
    """The input definition information for an Azure AI search tool as used to configure an agent.

    :ivar type: The object type, which is always 'azure_ai_search'. Required. AZURE_AI_SEARCH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AZURE_AI_SEARCH
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar azure_ai_search: The azure ai search index resource. Required.
    :vartype azure_ai_search:
     ~azure.ai.agentserver.responses.models.models.AzureAISearchToolResource
    """

    type: Literal[ToolType.AZURE_AI_SEARCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'azure_ai_search'. Required. AZURE_AI_SEARCH."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    azure_ai_search: "_models.AzureAISearchToolResource" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The azure ai search index resource. Required."""

    @overload
    def __init__(
        self,
        *,
        azure_ai_search: "_models.AzureAISearchToolResource",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.AZURE_AI_SEARCH  # type: ignore


class AzureAISearchToolCall(OutputItem, discriminator="azure_ai_search_call"):
    """An Azure AI Search tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. AZURE_AI_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AZURE_AI_SEARCH_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.AZURE_AI_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. AZURE_AI_SEARCH_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.AZURE_AI_SEARCH_CALL  # type: ignore


class AzureAISearchToolCallOutput(OutputItem, discriminator="azure_ai_search_call_output"):
    """The output of an Azure AI Search tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. AZURE_AI_SEARCH_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AZURE_AI_SEARCH_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the Azure AI Search tool call. Is one of the following types:
     {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.AZURE_AI_SEARCH_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. AZURE_AI_SEARCH_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the Azure AI Search tool call. Is one of the following types: {str: Any}, str,
     [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.AZURE_AI_SEARCH_CALL_OUTPUT  # type: ignore


class AzureAISearchToolResource(_Model):
    """A set of index resources used by the ``azure_ai_search`` tool.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar indexes: The indices attached to this agent. There can be a maximum of 1 index resource
     attached to the agent. Required.
    :vartype indexes: list[~azure.ai.agentserver.responses.models.models.AISearchIndexResource]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    indexes: list["_models.AISearchIndexResource"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The indices attached to this agent. There can be a maximum of 1 index resource attached to the
     agent. Required."""

    @overload
    def __init__(
        self,
        *,
        indexes: list["_models.AISearchIndexResource"],
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AzureFunctionBinding(_Model):
    """The structure for keeping storage queue name and URI.

    :ivar type: The type of binding, which is always 'storage_queue'. Required. Default value is
     "storage_queue".
    :vartype type: str
    :ivar storage_queue: Storage queue. Required.
    :vartype storage_queue: ~azure.ai.agentserver.responses.models.models.AzureFunctionStorageQueue
    """

    type: Literal["storage_queue"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of binding, which is always 'storage_queue'. Required. Default value is
     \"storage_queue\"."""
    storage_queue: "_models.AzureFunctionStorageQueue" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Storage queue. Required."""

    @overload
    def __init__(
        self,
        *,
        storage_queue: "_models.AzureFunctionStorageQueue",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["storage_queue"] = "storage_queue"


class AzureFunctionDefinition(_Model):
    """The definition of Azure function.

    :ivar function: The definition of azure function and its parameters. Required.
    :vartype function:
     ~azure.ai.agentserver.responses.models.models.AzureFunctionDefinitionFunction
    :ivar input_binding: Input storage queue. The queue storage trigger runs a function as messages
     are added to it. Required.
    :vartype input_binding: ~azure.ai.agentserver.responses.models.models.AzureFunctionBinding
    :ivar output_binding: Output storage queue. The function writes output to this queue when the
     input items are processed. Required.
    :vartype output_binding: ~azure.ai.agentserver.responses.models.models.AzureFunctionBinding
    """

    function: "_models.AzureFunctionDefinitionFunction" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The definition of azure function and its parameters. Required."""
    input_binding: "_models.AzureFunctionBinding" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Input storage queue. The queue storage trigger runs a function as messages are added to it.
     Required."""
    output_binding: "_models.AzureFunctionBinding" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Output storage queue. The function writes output to this queue when the input items are
     processed. Required."""

    @overload
    def __init__(
        self,
        *,
        function: "_models.AzureFunctionDefinitionFunction",
        input_binding: "_models.AzureFunctionBinding",
        output_binding: "_models.AzureFunctionBinding",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AzureFunctionDefinitionFunction(_Model):
    """AzureFunctionDefinitionFunction.

    :ivar name: The name of the function to be called. Required.
    :vartype name: str
    :ivar description: A description of what the function does, used by the model to choose when
     and how to call the function.
    :vartype description: str
    :ivar parameters: The parameters the functions accepts, described as a JSON Schema object.
     Required.
    :vartype parameters: dict[str, any]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to be called. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description of what the function does, used by the model to choose when and how to call the
     function."""
    parameters: dict[str, Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The parameters the functions accepts, described as a JSON Schema object. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        parameters: dict[str, Any],
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AzureFunctionStorageQueue(_Model):
    """The structure for keeping storage queue name and URI.

    :ivar queue_service_endpoint: URI to the Azure Storage Queue service allowing you to manipulate
     a queue. Required.
    :vartype queue_service_endpoint: str
    :ivar queue_name: The name of an Azure function storage queue. Required.
    :vartype queue_name: str
    """

    queue_service_endpoint: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """URI to the Azure Storage Queue service allowing you to manipulate a queue. Required."""
    queue_name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of an Azure function storage queue. Required."""

    @overload
    def __init__(
        self,
        *,
        queue_service_endpoint: str,
        queue_name: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class AzureFunctionTool(Tool, discriminator="azure_function"):
    """The input definition information for an Azure Function Tool, as used to configure an Agent.

    :ivar type: The object type, which is always 'browser_automation'. Required. AZURE_FUNCTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AZURE_FUNCTION
    :ivar azure_function: The Azure Function Tool definition. Required.
    :vartype azure_function: ~azure.ai.agentserver.responses.models.models.AzureFunctionDefinition
    """

    type: Literal[ToolType.AZURE_FUNCTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'browser_automation'. Required. AZURE_FUNCTION."""
    azure_function: "_models.AzureFunctionDefinition" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Azure Function Tool definition. Required."""

    @overload
    def __init__(
        self,
        *,
        azure_function: "_models.AzureFunctionDefinition",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.AZURE_FUNCTION  # type: ignore


class AzureFunctionToolCall(OutputItem, discriminator="azure_function_call"):
    """An Azure Function tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. AZURE_FUNCTION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AZURE_FUNCTION_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the Azure Function being called. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.AZURE_FUNCTION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. AZURE_FUNCTION_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Azure Function being called. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.AZURE_FUNCTION_CALL  # type: ignore


class AzureFunctionToolCallOutput(OutputItem, discriminator="azure_function_call_output"):
    """The output of an Azure Function tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. AZURE_FUNCTION_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.AZURE_FUNCTION_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the Azure Function that was called. Required.
    :vartype name: str
    :ivar output: The output from the Azure Function tool call. Is one of the following types:
     {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.AZURE_FUNCTION_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. AZURE_FUNCTION_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the Azure Function that was called. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the Azure Function tool call. Is one of the following types: {str: Any}, str,
     [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.AZURE_FUNCTION_CALL_OUTPUT  # type: ignore


class BingCustomSearchConfiguration(_Model):
    """A bing custom search configuration.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connection_id: Project connection id for grounding with bing search. Required.
    :vartype project_connection_id: str
    :ivar instance_name: Name of the custom configuration instance given to config. Required.
    :vartype instance_name: str
    :ivar market: The market where the results come from.
    :vartype market: str
    :ivar set_lang: The language to use for user interface strings when calling Bing API.
    :vartype set_lang: str
    :ivar count: The number of search results to return in the bing api response.
    :vartype count: int
    :ivar freshness: Filter search results by a specific time range. See `accepted values here
     <https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters>`_.
    :vartype freshness: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Project connection id for grounding with bing search. Required."""
    instance_name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the custom configuration instance given to config. Required."""
    market: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The market where the results come from."""
    set_lang: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The language to use for user interface strings when calling Bing API."""
    count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The number of search results to return in the bing api response."""
    freshness: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Filter search results by a specific time range. See `accepted values here
     <https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters>`_."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
        instance_name: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
        market: Optional[str] = None,
        set_lang: Optional[str] = None,
        count: Optional[int] = None,
        freshness: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class BingCustomSearchPreviewTool(Tool, discriminator="bing_custom_search_preview"):
    """The input definition information for a Bing custom search tool as used to configure an agent.

    :ivar type: The object type, which is always 'bing_custom_search_preview'. Required.
     BING_CUSTOM_SEARCH_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.BING_CUSTOM_SEARCH_PREVIEW
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar bing_custom_search_preview: The bing custom search tool parameters. Required.
    :vartype bing_custom_search_preview:
     ~azure.ai.agentserver.responses.models.models.BingCustomSearchToolParameters
    """

    type: Literal[ToolType.BING_CUSTOM_SEARCH_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'bing_custom_search_preview'. Required.
     BING_CUSTOM_SEARCH_PREVIEW."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    bing_custom_search_preview: "_models.BingCustomSearchToolParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The bing custom search tool parameters. Required."""

    @overload
    def __init__(
        self,
        *,
        bing_custom_search_preview: "_models.BingCustomSearchToolParameters",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.BING_CUSTOM_SEARCH_PREVIEW  # type: ignore


class BingCustomSearchToolCall(OutputItem, discriminator="bing_custom_search_preview_call"):
    """A Bing custom search tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. BING_CUSTOM_SEARCH_PREVIEW_CALL.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.BING_CUSTOM_SEARCH_PREVIEW_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.BING_CUSTOM_SEARCH_PREVIEW_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. BING_CUSTOM_SEARCH_PREVIEW_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.BING_CUSTOM_SEARCH_PREVIEW_CALL  # type: ignore


class BingCustomSearchToolCallOutput(OutputItem, discriminator="bing_custom_search_preview_call_output"):
    """The output of a Bing custom search tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. BING_CUSTOM_SEARCH_PREVIEW_CALL_OUTPUT.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.BING_CUSTOM_SEARCH_PREVIEW_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the Bing custom search tool call. Is one of the following types:
     {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.BING_CUSTOM_SEARCH_PREVIEW_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. BING_CUSTOM_SEARCH_PREVIEW_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the Bing custom search tool call. Is one of the following types: {str: Any},
     str, [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.BING_CUSTOM_SEARCH_PREVIEW_CALL_OUTPUT  # type: ignore


class BingCustomSearchToolParameters(_Model):
    """The bing custom search tool parameters.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar search_configurations: The project connections attached to this tool. There can be a
     maximum of 1 connection resource attached to the tool. Required.
    :vartype search_configurations:
     list[~azure.ai.agentserver.responses.models.models.BingCustomSearchConfiguration]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    search_configurations: list["_models.BingCustomSearchConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The project connections attached to this tool. There can be a maximum of 1 connection resource
     attached to the tool. Required."""

    @overload
    def __init__(
        self,
        *,
        search_configurations: list["_models.BingCustomSearchConfiguration"],
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class BingGroundingSearchConfiguration(_Model):
    """Search configuration for Bing Grounding.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connection_id: Project connection id for grounding with bing search. Required.
    :vartype project_connection_id: str
    :ivar market: The market where the results come from.
    :vartype market: str
    :ivar set_lang: The language to use for user interface strings when calling Bing API.
    :vartype set_lang: str
    :ivar count: The number of search results to return in the bing api response.
    :vartype count: int
    :ivar freshness: Filter search results by a specific time range. See `accepted values here
     <https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters>`_.
    :vartype freshness: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Project connection id for grounding with bing search. Required."""
    market: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The market where the results come from."""
    set_lang: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The language to use for user interface strings when calling Bing API."""
    count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The number of search results to return in the bing api response."""
    freshness: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Filter search results by a specific time range. See `accepted values here
     <https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters>`_."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
        market: Optional[str] = None,
        set_lang: Optional[str] = None,
        count: Optional[int] = None,
        freshness: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class BingGroundingSearchToolParameters(_Model):
    """The bing grounding search tool parameters.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar search_configurations: The search configurations attached to this tool. There can be a
     maximum of 1 search configuration resource attached to the tool. Required.
    :vartype search_configurations:
     list[~azure.ai.agentserver.responses.models.models.BingGroundingSearchConfiguration]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    search_configurations: list["_models.BingGroundingSearchConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The search configurations attached to this tool. There can be a maximum of 1 search
     configuration resource attached to the tool. Required."""

    @overload
    def __init__(
        self,
        *,
        search_configurations: list["_models.BingGroundingSearchConfiguration"],
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class BingGroundingTool(Tool, discriminator="bing_grounding"):
    """The input definition information for a bing grounding search tool as used to configure an
    agent.

    :ivar type: The object type, which is always 'bing_grounding'. Required. BING_GROUNDING.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.BING_GROUNDING
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar bing_grounding: The bing grounding search tool parameters. Required.
    :vartype bing_grounding:
     ~azure.ai.agentserver.responses.models.models.BingGroundingSearchToolParameters
    """

    type: Literal[ToolType.BING_GROUNDING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'bing_grounding'. Required. BING_GROUNDING."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    bing_grounding: "_models.BingGroundingSearchToolParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The bing grounding search tool parameters. Required."""

    @overload
    def __init__(
        self,
        *,
        bing_grounding: "_models.BingGroundingSearchToolParameters",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.BING_GROUNDING  # type: ignore


class BingGroundingToolCall(OutputItem, discriminator="bing_grounding_call"):
    """A Bing grounding tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. BING_GROUNDING_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.BING_GROUNDING_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.BING_GROUNDING_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. BING_GROUNDING_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.BING_GROUNDING_CALL  # type: ignore


class BingGroundingToolCallOutput(OutputItem, discriminator="bing_grounding_call_output"):
    """The output of a Bing grounding tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. BING_GROUNDING_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.BING_GROUNDING_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the Bing grounding tool call. Is one of the following types:
     {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.BING_GROUNDING_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. BING_GROUNDING_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the Bing grounding tool call. Is one of the following types: {str: Any}, str,
     [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.BING_GROUNDING_CALL_OUTPUT  # type: ignore


class BrowserAutomationPreviewTool(Tool, discriminator="browser_automation_preview"):
    """The input definition information for a Browser Automation Tool, as used to configure an Agent.

    :ivar type: The object type, which is always 'browser_automation_preview'. Required.
     BROWSER_AUTOMATION_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.BROWSER_AUTOMATION_PREVIEW
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar browser_automation_preview: The Browser Automation Tool parameters. Required.
    :vartype browser_automation_preview:
     ~azure.ai.agentserver.responses.models.models.BrowserAutomationToolParameters
    """

    type: Literal[ToolType.BROWSER_AUTOMATION_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'browser_automation_preview'. Required.
     BROWSER_AUTOMATION_PREVIEW."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    browser_automation_preview: "_models.BrowserAutomationToolParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The Browser Automation Tool parameters. Required."""

    @overload
    def __init__(
        self,
        *,
        browser_automation_preview: "_models.BrowserAutomationToolParameters",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.BROWSER_AUTOMATION_PREVIEW  # type: ignore


class BrowserAutomationToolCall(OutputItem, discriminator="browser_automation_preview_call"):
    """A browser automation tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. BROWSER_AUTOMATION_PREVIEW_CALL.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.BROWSER_AUTOMATION_PREVIEW_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.BROWSER_AUTOMATION_PREVIEW_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. BROWSER_AUTOMATION_PREVIEW_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.BROWSER_AUTOMATION_PREVIEW_CALL  # type: ignore


class BrowserAutomationToolCallOutput(OutputItem, discriminator="browser_automation_preview_call_output"):
    """The output of a browser automation tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. BROWSER_AUTOMATION_PREVIEW_CALL_OUTPUT.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.BROWSER_AUTOMATION_PREVIEW_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the browser automation tool call. Is one of the following types:
     {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.BROWSER_AUTOMATION_PREVIEW_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. BROWSER_AUTOMATION_PREVIEW_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the browser automation tool call. Is one of the following types: {str: Any},
     str, [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.BROWSER_AUTOMATION_PREVIEW_CALL_OUTPUT  # type: ignore


class BrowserAutomationToolConnectionParameters(_Model):  # pylint: disable=name-too-long
    """Definition of input parameters for the connection used by the Browser Automation Tool.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connection_id: The ID of the project connection to your Azure Playwright
     resource. Required.
    :vartype project_connection_id: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the project connection to your Azure Playwright resource. Required."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class BrowserAutomationToolParameters(_Model):
    """Definition of input parameters for the Browser Automation Tool.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar connection: The project connection parameters associated with the Browser Automation
     Tool. Required.
    :vartype connection:
     ~azure.ai.agentserver.responses.models.models.BrowserAutomationToolConnectionParameters
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    connection: "_models.BrowserAutomationToolConnectionParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The project connection parameters associated with the Browser Automation Tool. Required."""

    @overload
    def __init__(
        self,
        *,
        connection: "_models.BrowserAutomationToolConnectionParameters",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class CaptureStructuredOutputsTool(Tool, discriminator="capture_structured_outputs"):
    """A tool for capturing structured outputs.

    :ivar type: The type of the tool. Always ``capture_structured_outputs``. Required.
     CAPTURE_STRUCTURED_OUTPUTS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CAPTURE_STRUCTURED_OUTPUTS
    :ivar outputs: The structured outputs to capture from the model. Required.
    :vartype outputs: ~azure.ai.agentserver.responses.models.models.StructuredOutputDefinition
    """

    type: Literal[ToolType.CAPTURE_STRUCTURED_OUTPUTS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the tool. Always ``capture_structured_outputs``. Required.
     CAPTURE_STRUCTURED_OUTPUTS."""
    outputs: "_models.StructuredOutputDefinition" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The structured outputs to capture from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        outputs: "_models.StructuredOutputDefinition",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.CAPTURE_STRUCTURED_OUTPUTS  # type: ignore


class MemoryItem(_Model):
    """A single memory item stored in the memory store, containing content and metadata.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ChatSummaryMemoryItem, UserProfileMemoryItem

    :ivar memory_id: The unique ID of the memory item. Required.
    :vartype memory_id: str
    :ivar updated_at: The last update time of the memory item. Required.
    :vartype updated_at: ~datetime.datetime
    :ivar scope: The namespace that logically groups and isolates memories, such as a user ID.
     Required.
    :vartype scope: str
    :ivar content: The content of the memory. Required.
    :vartype content: str
    :ivar kind: The kind of the memory item. Required. Known values are: "user_profile" and
     "chat_summary".
    :vartype kind: str or ~azure.ai.agentserver.responses.models.models.MemoryItemKind
    """

    __mapping__: dict[str, _Model] = {}
    memory_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the memory item. Required."""
    updated_at: datetime.datetime = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="unix-timestamp"
    )
    """The last update time of the memory item. Required."""
    scope: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace that logically groups and isolates memories, such as a user ID. Required."""
    content: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content of the memory. Required."""
    kind: str = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])
    """The kind of the memory item. Required. Known values are: \"user_profile\" and \"chat_summary\"."""

    @overload
    def __init__(
        self,
        *,
        memory_id: str,
        updated_at: datetime.datetime,
        scope: str,
        content: str,
        kind: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ChatSummaryMemoryItem(MemoryItem, discriminator="chat_summary"):
    """A memory item containing a summary extracted from conversations.

    :ivar memory_id: The unique ID of the memory item. Required.
    :vartype memory_id: str
    :ivar updated_at: The last update time of the memory item. Required.
    :vartype updated_at: ~datetime.datetime
    :ivar scope: The namespace that logically groups and isolates memories, such as a user ID.
     Required.
    :vartype scope: str
    :ivar content: The content of the memory. Required.
    :vartype content: str
    :ivar kind: The kind of the memory item. Required. Summary of chat conversations.
    :vartype kind: str or ~azure.ai.agentserver.responses.models.models.CHAT_SUMMARY
    """

    kind: Literal[MemoryItemKind.CHAT_SUMMARY] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The kind of the memory item. Required. Summary of chat conversations."""

    @overload
    def __init__(
        self,
        *,
        memory_id: str,
        updated_at: datetime.datetime,
        scope: str,
        content: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.kind = MemoryItemKind.CHAT_SUMMARY  # type: ignore


class ComputerAction(_Model):
    """ComputerAction.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ClickParam, DoubleClickAction, DragParam, KeyPressAction, MoveParam, ScreenshotParam,
    ScrollParam, TypeParam, WaitParam

    :ivar type: Required. Known values are: "click", "double_click", "drag", "keypress", "move",
     "screenshot", "scroll", "type", and "wait".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ComputerActionType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"click\", \"double_click\", \"drag\", \"keypress\", \"move\",
     \"screenshot\", \"scroll\", \"type\", and \"wait\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ClickParam(ComputerAction, discriminator="click"):
    """Click.

    :ivar type: Specifies the event type. For a click action, this property is always ``click``.
     Required. CLICK.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CLICK
    :ivar button: Indicates which mouse button was pressed during the click. One of ``left``,
     ``right``, ``wheel``, ``back``, or ``forward``. Required. Known values are: "left", "right",
     "wheel", "back", and "forward".
    :vartype button: str or ~azure.ai.agentserver.responses.models.models.ClickButtonType
    :ivar x: The x-coordinate where the click occurred. Required.
    :vartype x: int
    :ivar y: The y-coordinate where the click occurred. Required.
    :vartype y: int
    """

    type: Literal[ComputerActionType.CLICK] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a click action, this property is always ``click``. Required.
     CLICK."""
    button: Union[str, "_models.ClickButtonType"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Indicates which mouse button was pressed during the click. One of ``left``, ``right``,
     ``wheel``, ``back``, or ``forward``. Required. Known values are: \"left\", \"right\",
     \"wheel\", \"back\", and \"forward\"."""
    x: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The x-coordinate where the click occurred. Required."""
    y: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The y-coordinate where the click occurred. Required."""

    @overload
    def __init__(
        self,
        *,
        button: Union[str, "_models.ClickButtonType"],
        x: int,
        y: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.CLICK  # type: ignore


class CodeInterpreterOutputImage(_Model):
    """Code interpreter output image.

    :ivar type: The type of the output. Always ``image``. Required. Default value is "image".
    :vartype type: str
    :ivar url: The URL of the image output from the code interpreter. Required.
    :vartype url: str
    """

    type: Literal["image"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the output. Always ``image``. Required. Default value is \"image\"."""
    url: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the image output from the code interpreter. Required."""

    @overload
    def __init__(
        self,
        *,
        url: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["image"] = "image"


class CodeInterpreterOutputLogs(_Model):
    """Code interpreter output logs.

    :ivar type: The type of the output. Always ``logs``. Required. Default value is "logs".
    :vartype type: str
    :ivar logs: The logs output from the code interpreter. Required.
    :vartype logs: str
    """

    type: Literal["logs"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the output. Always ``logs``. Required. Default value is \"logs\"."""
    logs: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The logs output from the code interpreter. Required."""

    @overload
    def __init__(
        self,
        *,
        logs: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["logs"] = "logs"


class CodeInterpreterTool(Tool, discriminator="code_interpreter"):
    """Code interpreter.

    :ivar type: The type of the code interpreter tool. Always ``code_interpreter``. Required.
     CODE_INTERPRETER.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CODE_INTERPRETER
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar container: The code interpreter container. Can be a container ID or an object that
     specifies uploaded file IDs to make available to your code, along with an optional
     ``memory_limit`` setting. If not provided, the service assumes auto. Is either a str type or a
     AutoCodeInterpreterToolParam type.
    :vartype container: str or
     ~azure.ai.agentserver.responses.models.models.AutoCodeInterpreterToolParam
    """

    type: Literal[ToolType.CODE_INTERPRETER] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the code interpreter tool. Always ``code_interpreter``. Required. CODE_INTERPRETER."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    container: Optional[Union[str, "_models.AutoCodeInterpreterToolParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The code interpreter container. Can be a container ID or an object that specifies uploaded file
     IDs to make available to your code, along with an optional ``memory_limit`` setting. If not
     provided, the service assumes auto. Is either a str type or a AutoCodeInterpreterToolParam
     type."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        description: Optional[str] = None,
        container: Optional[Union[str, "_models.AutoCodeInterpreterToolParam"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.CODE_INTERPRETER  # type: ignore


class CompactionSummaryItemParam(Item, discriminator="compaction"):
    """Compaction item.

    :ivar id:
    :vartype id: str
    :ivar type: The type of the item. Always ``compaction``. Required. COMPACTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPACTION
    :ivar encrypted_content: The encrypted content of the compaction summary. Required.
    :vartype encrypted_content: str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    type: Literal[ItemType.COMPACTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``compaction``. Required. COMPACTION."""
    encrypted_content: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The encrypted content of the compaction summary. Required."""

    @overload
    def __init__(
        self,
        *,
        encrypted_content: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.COMPACTION  # type: ignore


class CompactResource(_Model):
    """The compacted response object.

    :ivar id: The unique identifier for the compacted response. Required.
    :vartype id: str
    :ivar object: The object type. Always ``response.compaction``. Required. Default value is
     "response.compaction".
    :vartype object: str
    :ivar output: The compacted list of output items. Required.
    :vartype output: list[~azure.ai.agentserver.responses.models.models.ItemField]
    :ivar created_at: Unix timestamp (in seconds) when the compacted conversation was created.
     Required.
    :vartype created_at: ~datetime.datetime
    :ivar usage: Token accounting for the compaction pass, including cached, reasoning, and total
     tokens. Required.
    :vartype usage: ~azure.ai.agentserver.responses.models.models.ResponseUsage
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier for the compacted response. Required."""
    object: Literal["response.compaction"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The object type. Always ``response.compaction``. Required. Default value is
     \"response.compaction\"."""
    output: list["_models.ItemField"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The compacted list of output items. Required."""
    created_at: datetime.datetime = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="unix-timestamp"
    )
    """Unix timestamp (in seconds) when the compacted conversation was created. Required."""
    usage: "_models.ResponseUsage" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Token accounting for the compaction pass, including cached, reasoning, and total tokens.
     Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        output: list["_models.ItemField"],
        created_at: datetime.datetime,
        usage: "_models.ResponseUsage",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.object: Literal["response.compaction"] = "response.compaction"


class ComparisonFilter(_Model):
    """Comparison Filter.

    :ivar type: Specifies the comparison operator: ``eq``, ``ne``, ``gt``, ``gte``, ``lt``,
     ``lte``, ``in``, ``nin``.

     * `eq`: equals
     * `ne`: not equal
     * `gt`: greater than
     * `gte`: greater than or equal
     * `lt`: less than
     * `lte`: less than or equal
     * `in`: in
     * `nin`: not in. Required. Is one of the following types: Literal["eq"], Literal["ne"],
       Literal["gt"], Literal["gte"], Literal["lt"], Literal["lte"]
    :vartype type: str or str or str or str or str or str
    :ivar key: The key to compare against the value. Required.
    :vartype key: str
    :ivar value: The value to compare against the attribute key; supports string, number, or
     boolean types. Required. Is one of the following types: str, int, bool, [Union[str, int]]
    :vartype value: str or int or bool or list[str or int]
    """

    type: Literal["eq", "ne", "gt", "gte", "lt", "lte"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Specifies the comparison operator: ``eq``, ``ne``, ``gt``, ``gte``, ``lt``, ``lte``, ``in``,
      ``nin``.
 
      * `eq`: equals
      * `ne`: not equal
      * `gt`: greater than
      * `gte`: greater than or equal
      * `lt`: less than
      * `lte`: less than or equal
      * `in`: in
      * `nin`: not in. Required. Is one of the following types: Literal[\"eq\"],
        Literal[\"ne\"], Literal[\"gt\"], Literal[\"gte\"], Literal[\"lt\"], Literal[\"lte\"]"""
    key: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The key to compare against the value. Required."""
    value: Union[str, int, bool, list[Union[str, int]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The value to compare against the attribute key; supports string, number, or boolean types.
     Required. Is one of the following types: str, int, bool, [Union[str, int]]"""

    @overload
    def __init__(
        self,
        *,
        type: Literal["eq", "ne", "gt", "gte", "lt", "lte"],
        key: str,
        value: Union[str, int, bool, list[Union[str, int]]],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class CompoundFilter(_Model):
    """Compound Filter.

    :ivar type: Type of operation: ``and`` or ``or``. Required. Is either a Literal["and"] type or
     a Literal["or"] type.
    :vartype type: str or str
    :ivar filters: Array of filters to combine. Items can be ``ComparisonFilter`` or
     ``CompoundFilter``. Required.
    :vartype filters: list[~azure.ai.agentserver.responses.models.models.ComparisonFilter or any]
    """

    type: Literal["and", "or"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Type of operation: ``and`` or ``or``. Required. Is either a Literal[\"and\"] type or a
     Literal[\"or\"] type."""
    filters: list[Union["_models.ComparisonFilter", Any]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Array of filters to combine. Items can be ``ComparisonFilter`` or ``CompoundFilter``. Required."""

    @overload
    def __init__(
        self,
        *,
        type: Literal["and", "or"],
        filters: list[Union["_models.ComparisonFilter", Any]],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ComputerCallOutputItemParam(Item, discriminator="computer_call_output"):
    """Computer tool call output.

    :ivar id:
    :vartype id: str
    :ivar call_id: The ID of the computer tool call that produced the output. Required.
    :vartype call_id: str
    :ivar type: The type of the computer tool call output. Always ``computer_call_output``.
     Required. COMPUTER_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_CALL_OUTPUT
    :ivar output: Required.
    :vartype output: ~azure.ai.agentserver.responses.models.models.ComputerScreenshotImage
    :ivar acknowledged_safety_checks:
    :vartype acknowledged_safety_checks:
     list[~azure.ai.agentserver.responses.models.models.ComputerCallSafetyCheckParam]
    :ivar status: Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.FunctionCallItemStatus
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the computer tool call that produced the output. Required."""
    type: Literal[ItemType.COMPUTER_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer tool call output. Always ``computer_call_output``. Required.
     COMPUTER_CALL_OUTPUT."""
    output: "_models.ComputerScreenshotImage" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    acknowledged_safety_checks: Optional[list["_models.ComputerCallSafetyCheckParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    status: Optional[Union[str, "_models.FunctionCallItemStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: "_models.ComputerScreenshotImage",
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        acknowledged_safety_checks: Optional[list["_models.ComputerCallSafetyCheckParam"]] = None,
        status: Optional[Union[str, "_models.FunctionCallItemStatus"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.COMPUTER_CALL_OUTPUT  # type: ignore


class ComputerCallSafetyCheckParam(_Model):
    """A pending safety check for the computer call.

    :ivar id: The ID of the pending safety check. Required.
    :vartype id: str
    :ivar code:
    :vartype code: str
    :ivar message:
    :vartype message: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the pending safety check. Required."""
    code: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        code: Optional[str] = None,
        message: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MessageContent(_Model):
    """A content part that makes up an input or output item.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ComputerScreenshotContent, MessageContentInputFileContent, MessageContentInputImageContent,
    MessageContentInputTextContent, MessageContentOutputTextContent,
    MessageContentReasoningTextContent, MessageContentRefusalContent, SummaryTextContent,
    TextContent

    :ivar type: Required. Known values are: "input_text", "output_text", "text", "summary_text",
     "reasoning_text", "refusal", "input_image", "computer_screenshot", and "input_file".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MessageContentType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"input_text\", \"output_text\", \"text\", \"summary_text\",
     \"reasoning_text\", \"refusal\", \"input_image\", \"computer_screenshot\", and \"input_file\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ComputerScreenshotContent(MessageContent, discriminator="computer_screenshot"):
    """Computer screenshot.

    :ivar type: Specifies the event type. For a computer screenshot, this property is always set to
     ``computer_screenshot``. Required. COMPUTER_SCREENSHOT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_SCREENSHOT
    :ivar image_url: Required.
    :vartype image_url: str
    :ivar file_id: Required.
    :vartype file_id: str
    """

    type: Literal[MessageContentType.COMPUTER_SCREENSHOT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a computer screenshot, this property is always set to
     ``computer_screenshot``. Required. COMPUTER_SCREENSHOT."""
    image_url: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    file_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        image_url: str,
        file_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.COMPUTER_SCREENSHOT  # type: ignore


class ComputerScreenshotImage(_Model):
    """A computer screenshot image used with the computer use tool.

    :ivar type: Specifies the event type. For a computer screenshot, this property is always set to
     ``computer_screenshot``. Required. Default value is "computer_screenshot".
    :vartype type: str
    :ivar image_url: The URL of the screenshot image.
    :vartype image_url: str
    :ivar file_id: The identifier of an uploaded file that contains the screenshot.
    :vartype file_id: str
    """

    type: Literal["computer_screenshot"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Specifies the event type. For a computer screenshot, this property is always set to
     ``computer_screenshot``. Required. Default value is \"computer_screenshot\"."""
    image_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the screenshot image."""
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identifier of an uploaded file that contains the screenshot."""

    @overload
    def __init__(
        self,
        *,
        image_url: Optional[str] = None,
        file_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["computer_screenshot"] = "computer_screenshot"


class ComputerUsePreviewTool(Tool, discriminator="computer_use_preview"):
    """Computer use preview.

    :ivar type: The type of the computer use tool. Always ``computer_use_preview``. Required.
     COMPUTER_USE_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_USE_PREVIEW
    :ivar environment: The type of computer environment to control. Required. Known values are:
     "windows", "mac", "linux", "ubuntu", and "browser".
    :vartype environment: str or ~azure.ai.agentserver.responses.models.models.ComputerEnvironment
    :ivar display_width: The width of the computer display. Required.
    :vartype display_width: int
    :ivar display_height: The height of the computer display. Required.
    :vartype display_height: int
    """

    type: Literal[ToolType.COMPUTER_USE_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer use tool. Always ``computer_use_preview``. Required.
     COMPUTER_USE_PREVIEW."""
    environment: Union[str, "_models.ComputerEnvironment"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The type of computer environment to control. Required. Known values are: \"windows\", \"mac\",
     \"linux\", \"ubuntu\", and \"browser\"."""
    display_width: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The width of the computer display. Required."""
    display_height: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The height of the computer display. Required."""

    @overload
    def __init__(
        self,
        *,
        environment: Union[str, "_models.ComputerEnvironment"],
        display_width: int,
        display_height: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.COMPUTER_USE_PREVIEW  # type: ignore


class FunctionShellToolParamEnvironment(_Model):
    """FunctionShellToolParamEnvironment.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ContainerAutoParam, FunctionShellToolParamEnvironmentContainerReferenceParam,
    FunctionShellToolParamEnvironmentLocalEnvironmentParam

    :ivar type: Required. Known values are: "container_auto", "local", and "container_reference".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellToolParamEnvironmentType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"container_auto\", \"local\", and \"container_reference\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ContainerAutoParam(FunctionShellToolParamEnvironment, discriminator="container_auto"):
    """ContainerAutoParam.

    :ivar type: Automatically creates a container for this request. Required. CONTAINER_AUTO.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CONTAINER_AUTO
    :ivar file_ids: An optional list of uploaded files to make available to your code.
    :vartype file_ids: list[str]
    :ivar memory_limit: Known values are: "1g", "4g", "16g", and "64g".
    :vartype memory_limit: str or
     ~azure.ai.agentserver.responses.models.models.ContainerMemoryLimit
    :ivar skills: An optional list of skills referenced by id or inline data.
    :vartype skills: list[~azure.ai.agentserver.responses.models.models.ContainerSkill]
    :ivar network_policy:
    :vartype network_policy:
     ~azure.ai.agentserver.responses.models.models.ContainerNetworkPolicyParam
    """

    type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_AUTO] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Automatically creates a container for this request. Required. CONTAINER_AUTO."""
    file_ids: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An optional list of uploaded files to make available to your code."""
    memory_limit: Optional[Union[str, "_models.ContainerMemoryLimit"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"1g\", \"4g\", \"16g\", and \"64g\"."""
    skills: Optional[list["_models.ContainerSkill"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An optional list of skills referenced by id or inline data."""
    network_policy: Optional["_models.ContainerNetworkPolicyParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        file_ids: Optional[list[str]] = None,
        memory_limit: Optional[Union[str, "_models.ContainerMemoryLimit"]] = None,
        skills: Optional[list["_models.ContainerSkill"]] = None,
        network_policy: Optional["_models.ContainerNetworkPolicyParam"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellToolParamEnvironmentType.CONTAINER_AUTO  # type: ignore


class ContainerFileCitationBody(Annotation, discriminator="container_file_citation"):
    """Container file citation.

    :ivar type: The type of the container file citation. Always ``container_file_citation``.
     Required. CONTAINER_FILE_CITATION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CONTAINER_FILE_CITATION
    :ivar container_id: The ID of the container file. Required.
    :vartype container_id: str
    :ivar file_id: The ID of the file. Required.
    :vartype file_id: str
    :ivar start_index: The index of the first character of the container file citation in the
     message. Required.
    :vartype start_index: int
    :ivar end_index: The index of the last character of the container file citation in the message.
     Required.
    :vartype end_index: int
    :ivar filename: The filename of the container file cited. Required.
    :vartype filename: str
    """

    type: Literal[AnnotationType.CONTAINER_FILE_CITATION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the container file citation. Always ``container_file_citation``. Required.
     CONTAINER_FILE_CITATION."""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the container file. Required."""
    file_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the file. Required."""
    start_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the first character of the container file citation in the message. Required."""
    end_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the last character of the container file citation in the message. Required."""
    filename: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The filename of the container file cited. Required."""

    @overload
    def __init__(
        self,
        *,
        container_id: str,
        file_id: str,
        start_index: int,
        end_index: int,
        filename: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = AnnotationType.CONTAINER_FILE_CITATION  # type: ignore


class ContainerNetworkPolicyParam(_Model):
    """Network access policy for the container.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ContainerNetworkPolicyAllowlistParam, ContainerNetworkPolicyDisabledParam

    :ivar type: Required. Known values are: "disabled" and "allowlist".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.ContainerNetworkPolicyParamType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"disabled\" and \"allowlist\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ContainerNetworkPolicyAllowlistParam(ContainerNetworkPolicyParam, discriminator="allowlist"):
    """ContainerNetworkPolicyAllowlistParam.

    :ivar type: Allow outbound network access only to specified domains. Always ``allowlist``.
     Required. ALLOWLIST.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ALLOWLIST
    :ivar allowed_domains: A list of allowed domains when type is ``allowlist``. Required.
    :vartype allowed_domains: list[str]
    :ivar domain_secrets: Optional domain-scoped secrets for allowlisted domains.
    :vartype domain_secrets:
     list[~azure.ai.agentserver.responses.models.models.ContainerNetworkPolicyDomainSecretParam]
    """

    type: Literal[ContainerNetworkPolicyParamType.ALLOWLIST] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Allow outbound network access only to specified domains. Always ``allowlist``. Required.
     ALLOWLIST."""
    allowed_domains: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of allowed domains when type is ``allowlist``. Required."""
    domain_secrets: Optional[list["_models.ContainerNetworkPolicyDomainSecretParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional domain-scoped secrets for allowlisted domains."""

    @overload
    def __init__(
        self,
        *,
        allowed_domains: list[str],
        domain_secrets: Optional[list["_models.ContainerNetworkPolicyDomainSecretParam"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ContainerNetworkPolicyParamType.ALLOWLIST  # type: ignore


class ContainerNetworkPolicyDisabledParam(ContainerNetworkPolicyParam, discriminator="disabled"):
    """ContainerNetworkPolicyDisabledParam.

    :ivar type: Disable outbound network access. Always ``disabled``. Required. DISABLED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.DISABLED
    """

    type: Literal[ContainerNetworkPolicyParamType.DISABLED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Disable outbound network access. Always ``disabled``. Required. DISABLED."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ContainerNetworkPolicyParamType.DISABLED  # type: ignore


class ContainerNetworkPolicyDomainSecretParam(_Model):
    """ContainerNetworkPolicyDomainSecretParam.

    :ivar domain: The domain associated with the secret. Required.
    :vartype domain: str
    :ivar name: The name of the secret to inject for the domain. Required.
    :vartype name: str
    :ivar value: The secret value to inject for the domain. Required.
    :vartype value: str
    """

    domain: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The domain associated with the secret. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the secret to inject for the domain. Required."""
    value: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The secret value to inject for the domain. Required."""

    @overload
    def __init__(
        self,
        *,
        domain: str,
        name: str,
        value: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallEnvironment(_Model):
    """FunctionShellCallEnvironment.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ContainerReferenceResource, LocalEnvironmentResource

    :ivar type: Required. Known values are: "local" and "container_reference".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallEnvironmentType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"local\" and \"container_reference\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ContainerReferenceResource(FunctionShellCallEnvironment, discriminator="container_reference"):
    """Container Reference.

    :ivar type: The environment type. Always ``container_reference``. Required.
     CONTAINER_REFERENCE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CONTAINER_REFERENCE
    :ivar container_id: Required.
    :vartype container_id: str
    """

    type: Literal[FunctionShellCallEnvironmentType.CONTAINER_REFERENCE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The environment type. Always ``container_reference``. Required. CONTAINER_REFERENCE."""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        container_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallEnvironmentType.CONTAINER_REFERENCE  # type: ignore


class ContainerSkill(_Model):
    """ContainerSkill.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    InlineSkillParam, SkillReferenceParam

    :ivar type: Required. Known values are: "skill_reference" and "inline".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ContainerSkillType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"skill_reference\" and \"inline\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ContextManagementParam(_Model):
    """ContextManagementParam.

    :ivar type: The context management entry type. Currently only 'compaction' is supported.
     Required.
    :vartype type: str
    :ivar compact_threshold:
    :vartype compact_threshold: int
    """

    type: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The context management entry type. Currently only 'compaction' is supported. Required."""
    compact_threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        type: str,
        compact_threshold: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ConversationParam_2(_Model):
    """Conversation object.

    :ivar id: The unique ID of the conversation. Required.
    :vartype id: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the conversation. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ConversationReference(_Model):
    """Conversation.

    :ivar id: The unique ID of the conversation that this response was associated with. Required.
    :vartype id: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the conversation that this response was associated with. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class CoordParam(_Model):
    """Coordinate.

    :ivar x: The x-coordinate. Required.
    :vartype x: int
    :ivar y: The y-coordinate. Required.
    :vartype y: int
    """

    x: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The x-coordinate. Required."""
    y: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The y-coordinate. Required."""

    @overload
    def __init__(
        self,
        *,
        x: int,
        y: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class CreateResponse(_Model):
    """CreateResponse.

    :ivar metadata:
    :vartype metadata: ~azure.ai.agentserver.responses.models.models.Metadata
    :ivar top_logprobs:
    :vartype top_logprobs: int
    :ivar temperature:
    :vartype temperature: int
    :ivar top_p:
    :vartype top_p: int
    :ivar user: This field is being replaced by ``safety_identifier`` and ``prompt_cache_key``. Use
     ``prompt_cache_key`` instead to maintain caching optimizations. A stable identifier for your
     end-users. Used to boost cache hit rates by better bucketing similar requests and  to help
     OpenAI detect and prevent abuse. `Learn more
     </docs/guides/safety-best-practices#safety-identifiers>`_.
    :vartype user: str
    :ivar safety_identifier: A stable identifier used to help detect users of your application that
     may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies
     each user. We recommend hashing their username or email address, in order to avoid sending us
     any identifying information. `Learn more
     </docs/guides/safety-best-practices#safety-identifiers>`_.
    :vartype safety_identifier: str
    :ivar prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your
     cache hit rates. Replaces the ``user`` field. `Learn more </docs/guides/prompt-caching>`_.
    :vartype prompt_cache_key: str
    :ivar service_tier: Is one of the following types: Literal["auto"], Literal["default"],
     Literal["flex"], Literal["scale"], Literal["priority"]
    :vartype service_tier: str or str or str or str or str
    :ivar prompt_cache_retention: Is either a Literal["in-memory"] type or a Literal["24h"] type.
    :vartype prompt_cache_retention: str or str
    :ivar previous_response_id:
    :vartype previous_response_id: str
    :ivar model: The model deployment to use for the creation of this response.
    :vartype model: str
    :ivar reasoning:
    :vartype reasoning: ~azure.ai.agentserver.responses.models.models.Reasoning
    :ivar background:
    :vartype background: bool
    :ivar max_output_tokens:
    :vartype max_output_tokens: int
    :ivar max_tool_calls:
    :vartype max_tool_calls: int
    :ivar text:
    :vartype text: ~azure.ai.agentserver.responses.models.models.ResponseTextParam
    :ivar tools:
    :vartype tools: list[~azure.ai.agentserver.responses.models.models.Tool]
    :ivar tool_choice: Is either a Union[str, "_models.ToolChoiceOptions"] type or a
     ToolChoiceParam type.
    :vartype tool_choice: str or ~azure.ai.agentserver.responses.models.models.ToolChoiceOptions or
     ~azure.ai.agentserver.responses.models.models.ToolChoiceParam
    :ivar prompt:
    :vartype prompt: ~azure.ai.agentserver.responses.models.models.Prompt
    :ivar truncation: Is either a Literal["auto"] type or a Literal["disabled"] type.
    :vartype truncation: str or str
    :ivar input: Is either a str type or a [Item] type.
    :vartype input: str or list[~azure.ai.agentserver.responses.models.models.Item]
    :ivar include:
    :vartype include: list[str or ~azure.ai.agentserver.responses.models.models.IncludeEnum]
    :ivar parallel_tool_calls:
    :vartype parallel_tool_calls: bool
    :ivar store:
    :vartype store: bool
    :ivar instructions:
    :vartype instructions: str
    :ivar stream:
    :vartype stream: bool
    :ivar stream_options:
    :vartype stream_options: ~azure.ai.agentserver.responses.models.models.ResponseStreamOptions
    :ivar conversation: Is either a str type or a ConversationParam_2 type.
    :vartype conversation: str or ~azure.ai.agentserver.responses.models.models.ConversationParam_2
    :ivar context_management: Context management configuration for this request.
    :vartype context_management:
     list[~azure.ai.agentserver.responses.models.models.ContextManagementParam]
    :ivar agent_reference: The agent to use for generating the response.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar structured_inputs: The structured inputs to the response that can participate in prompt
     template substitution or tool argument bindings.
    :vartype structured_inputs: dict[str, any]
    """

    metadata: Optional["_models.Metadata"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    top_logprobs: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    temperature: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    top_p: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    user: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This field is being replaced by ``safety_identifier`` and ``prompt_cache_key``. Use
     ``prompt_cache_key`` instead to maintain caching optimizations. A stable identifier for your
     end-users. Used to boost cache hit rates by better bucketing similar requests and  to help
     OpenAI detect and prevent abuse. `Learn more
     </docs/guides/safety-best-practices#safety-identifiers>`_."""
    safety_identifier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A stable identifier used to help detect users of your application that may be violating
     OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We
     recommend hashing their username or email address, in order to avoid sending us any identifying
     information. `Learn more </docs/guides/safety-best-practices#safety-identifiers>`_."""
    prompt_cache_key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Used by OpenAI to cache responses for similar requests to optimize your cache hit rates.
     Replaces the ``user`` field. `Learn more </docs/guides/prompt-caching>`_."""
    service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"auto\"], Literal[\"default\"], Literal[\"flex\"],
     Literal[\"scale\"], Literal[\"priority\"]"""
    prompt_cache_retention: Optional[Literal["in-memory", "24h"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Literal[\"in-memory\"] type or a Literal[\"24h\"] type."""
    previous_response_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    model: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The model deployment to use for the creation of this response."""
    reasoning: Optional["_models.Reasoning"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    background: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    max_output_tokens: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    max_tool_calls: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    text: Optional["_models.ResponseTextParam"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    tools: Optional[list["_models.Tool"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    tool_choice: Optional[Union[str, "_models.ToolChoiceOptions", "_models.ToolChoiceParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Union[str, \"_models.ToolChoiceOptions\"] type or a ToolChoiceParam type."""
    prompt: Optional["_models.Prompt"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    truncation: Optional[Literal["auto", "disabled"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Literal[\"auto\"] type or a Literal[\"disabled\"] type."""
    input: Optional["_types.InputParam"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is either a str type or a [Item] type."""
    include: Optional[list[Union[str, "_models.IncludeEnum"]]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    parallel_tool_calls: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    store: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    instructions: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    stream: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    stream_options: Optional["_models.ResponseStreamOptions"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    conversation: Optional["_types.ConversationParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a str type or a ConversationParam_2 type."""
    context_management: Optional[list["_models.ContextManagementParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Context management configuration for this request."""
    agent_reference: Optional["_models.AgentReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The agent to use for generating the response."""
    structured_inputs: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The structured inputs to the response that can participate in prompt template substitution or
     tool argument bindings."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        metadata: Optional["_models.Metadata"] = None,
        top_logprobs: Optional[int] = None,
        temperature: Optional[int] = None,
        top_p: Optional[int] = None,
        user: Optional[str] = None,
        safety_identifier: Optional[str] = None,
        prompt_cache_key: Optional[str] = None,
        service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] = None,
        prompt_cache_retention: Optional[Literal["in-memory", "24h"]] = None,
        previous_response_id: Optional[str] = None,
        model: Optional[str] = None,
        reasoning: Optional["_models.Reasoning"] = None,
        background: Optional[bool] = None,
        max_output_tokens: Optional[int] = None,
        max_tool_calls: Optional[int] = None,
        text: Optional["_models.ResponseTextParam"] = None,
        tools: Optional[list["_models.Tool"]] = None,
        tool_choice: Optional[Union[str, "_models.ToolChoiceOptions", "_models.ToolChoiceParam"]] = None,
        prompt: Optional["_models.Prompt"] = None,
        truncation: Optional[Literal["auto", "disabled"]] = None,
        input: Optional["_types.InputParam"] = None,
        include: Optional[list[Union[str, "_models.IncludeEnum"]]] = None,
        parallel_tool_calls: Optional[bool] = None,
        store: Optional[bool] = None,
        instructions: Optional[str] = None,
        stream: Optional[bool] = None,
        stream_options: Optional["_models.ResponseStreamOptions"] = None,
        conversation: Optional["_types.ConversationParam"] = None,
        context_management: Optional[list["_models.ContextManagementParam"]] = None,
        agent_reference: Optional["_models.AgentReference"] = None,
        structured_inputs: Optional[dict[str, Any]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class CustomToolParamFormat(_Model):
    """The input format for the custom tool. Default is unconstrained text.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    CustomGrammarFormatParam, CustomTextFormatParam

    :ivar type: Required. Known values are: "text" and "grammar".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CustomToolParamFormatType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"text\" and \"grammar\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class CustomGrammarFormatParam(CustomToolParamFormat, discriminator="grammar"):
    """Grammar format.

    :ivar type: Grammar format. Always ``grammar``. Required. GRAMMAR.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.GRAMMAR
    :ivar syntax: The syntax of the grammar definition. One of ``lark`` or ``regex``. Required.
     Known values are: "lark" and "regex".
    :vartype syntax: str or ~azure.ai.agentserver.responses.models.models.GrammarSyntax1
    :ivar definition: The grammar definition. Required.
    :vartype definition: str
    """

    type: Literal[CustomToolParamFormatType.GRAMMAR] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Grammar format. Always ``grammar``. Required. GRAMMAR."""
    syntax: Union[str, "_models.GrammarSyntax1"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The syntax of the grammar definition. One of ``lark`` or ``regex``. Required. Known values are:
     \"lark\" and \"regex\"."""
    definition: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The grammar definition. Required."""

    @overload
    def __init__(
        self,
        *,
        syntax: Union[str, "_models.GrammarSyntax1"],
        definition: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = CustomToolParamFormatType.GRAMMAR  # type: ignore


class CustomTextFormatParam(CustomToolParamFormat, discriminator="text"):
    """Text format.

    :ivar type: Unconstrained text format. Always ``text``. Required. TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.TEXT
    """

    type: Literal[CustomToolParamFormatType.TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Unconstrained text format. Always ``text``. Required. TEXT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = CustomToolParamFormatType.TEXT  # type: ignore


class CustomToolParam(Tool, discriminator="custom"):
    """Custom tool.

    :ivar type: The type of the custom tool. Always ``custom``. Required. CUSTOM.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM
    :ivar name: The name of the custom tool, used to identify it in tool calls. Required.
    :vartype name: str
    :ivar description: Optional description of the custom tool, used to provide more context.
    :vartype description: str
    :ivar format: The input format for the custom tool. Default is unconstrained text.
    :vartype format: ~azure.ai.agentserver.responses.models.models.CustomToolParamFormat
    """

    type: Literal[ToolType.CUSTOM] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool. Always ``custom``. Required. CUSTOM."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom tool, used to identify it in tool calls. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional description of the custom tool, used to provide more context."""
    format: Optional["_models.CustomToolParamFormat"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The input format for the custom tool. Default is unconstrained text."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        description: Optional[str] = None,
        format: Optional["_models.CustomToolParamFormat"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.CUSTOM  # type: ignore


class DeleteResponseResult(_Model):
    """The result of a delete response operation.

    :ivar id: The operation ID. Required.
    :vartype id: str
    :ivar deleted: Always return true. Required. Default value is True.
    :vartype deleted: bool
    :ivar object: Required. Default value is "response".
    :vartype object: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The operation ID. Required."""
    deleted: Literal[True] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Always return true. Required. Default value is True."""
    object: Literal["response"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Default value is \"response\"."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.deleted: Literal[True] = True
        self.object: Literal["response"] = "response"


class DoubleClickAction(ComputerAction, discriminator="double_click"):
    """DoubleClick.

    :ivar type: Specifies the event type. For a double click action, this property is always set to
     ``double_click``. Required. DOUBLE_CLICK.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.DOUBLE_CLICK
    :ivar x: The x-coordinate where the double click occurred. Required.
    :vartype x: int
    :ivar y: The y-coordinate where the double click occurred. Required.
    :vartype y: int
    """

    type: Literal[ComputerActionType.DOUBLE_CLICK] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a double click action, this property is always set to
     ``double_click``. Required. DOUBLE_CLICK."""
    x: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The x-coordinate where the double click occurred. Required."""
    y: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The y-coordinate where the double click occurred. Required."""

    @overload
    def __init__(
        self,
        *,
        x: int,
        y: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.DOUBLE_CLICK  # type: ignore


class DragParam(ComputerAction, discriminator="drag"):
    """Drag.

    :ivar type: Specifies the event type. For a drag action, this property is always set to
     ``drag``. Required. DRAG.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.DRAG
    :ivar path: An array of coordinates representing the path of the drag action. Coordinates will
     appear as an array of objects, eg

     .. code-block::

        [
          { x: 100, y: 200 },
          { x: 200, y: 300 }
        ]. Required.
    :vartype path: list[~azure.ai.agentserver.responses.models.models.CoordParam]
    """

    type: Literal[ComputerActionType.DRAG] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a drag action, this property is always set to ``drag``. Required.
     DRAG."""
    path: list["_models.CoordParam"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An array of coordinates representing the path of the drag action. Coordinates will appear as an
     array of objects, eg
     
     .. code-block::
     
        [
          { x: 100, y: 200 },
          { x: 200, y: 300 }
        ]. Required."""

    @overload
    def __init__(
        self,
        *,
        path: list["_models.CoordParam"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.DRAG  # type: ignore


class Error(_Model):
    """Error.

    :ivar code: Required.
    :vartype code: str
    :ivar message: Required.
    :vartype message: str
    :ivar param:
    :vartype param: str
    :ivar type:
    :vartype type: str
    :ivar details:
    :vartype details: list[~azure.ai.agentserver.responses.models.models.Error]
    :ivar additional_info:
    :vartype additional_info: dict[str, any]
    :ivar debug_info:
    :vartype debug_info: dict[str, any]
    """

    code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    param: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    details: Optional[list["_models.Error"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    additional_info: Optional[dict[str, Any]] = rest_field(
        name="additionalInfo", visibility=["read", "create", "update", "delete", "query"]
    )
    debug_info: Optional[dict[str, Any]] = rest_field(
        name="debugInfo", visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        code: str,
        message: str,
        param: Optional[str] = None,
        type: Optional[str] = None,
        details: Optional[list["_models.Error"]] = None,
        additional_info: Optional[dict[str, Any]] = None,
        debug_info: Optional[dict[str, Any]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FabricDataAgentToolCall(OutputItem, discriminator="fabric_dataagent_preview_call"):
    """A Fabric data agent tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. FABRIC_DATAAGENT_PREVIEW_CALL.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FABRIC_DATAAGENT_PREVIEW_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.FABRIC_DATAAGENT_PREVIEW_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. FABRIC_DATAAGENT_PREVIEW_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.FABRIC_DATAAGENT_PREVIEW_CALL  # type: ignore


class FabricDataAgentToolCallOutput(OutputItem, discriminator="fabric_dataagent_preview_call_output"):
    """The output of a Fabric data agent tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. FABRIC_DATAAGENT_PREVIEW_CALL_OUTPUT.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FABRIC_DATAAGENT_PREVIEW_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the Fabric data agent tool call. Is one of the following types:
     {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.FABRIC_DATAAGENT_PREVIEW_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. FABRIC_DATAAGENT_PREVIEW_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the Fabric data agent tool call. Is one of the following types: {str: Any},
     str, [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.FABRIC_DATAAGENT_PREVIEW_CALL_OUTPUT  # type: ignore


class FabricDataAgentToolParameters(_Model):
    """The fabric data agent tool parameters.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connections: The project connections attached to this tool. There can be a
     maximum of 1 connection resource attached to the tool.
    :vartype project_connections:
     list[~azure.ai.agentserver.responses.models.models.ToolProjectConnection]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connections: Optional[list["_models.ToolProjectConnection"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The project connections attached to this tool. There can be a maximum of 1 connection resource
     attached to the tool."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        description: Optional[str] = None,
        project_connections: Optional[list["_models.ToolProjectConnection"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FileCitationBody(Annotation, discriminator="file_citation"):
    """File citation.

    :ivar type: The type of the file citation. Always ``file_citation``. Required. FILE_CITATION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_CITATION
    :ivar file_id: The ID of the file. Required.
    :vartype file_id: str
    :ivar index: The index of the file in the list of files. Required.
    :vartype index: int
    :ivar filename: The filename of the file cited. Required.
    :vartype filename: str
    """

    type: Literal[AnnotationType.FILE_CITATION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the file citation. Always ``file_citation``. Required. FILE_CITATION."""
    file_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the file. Required."""
    index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the file in the list of files. Required."""
    filename: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The filename of the file cited. Required."""

    @overload
    def __init__(
        self,
        *,
        file_id: str,
        index: int,
        filename: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = AnnotationType.FILE_CITATION  # type: ignore


class FilePath(Annotation, discriminator="file_path"):
    """File path.

    :ivar type: The type of the file path. Always ``file_path``. Required. FILE_PATH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_PATH
    :ivar file_id: The ID of the file. Required.
    :vartype file_id: str
    :ivar index: The index of the file in the list of files. Required.
    :vartype index: int
    """

    type: Literal[AnnotationType.FILE_PATH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the file path. Always ``file_path``. Required. FILE_PATH."""
    file_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the file. Required."""
    index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the file in the list of files. Required."""

    @overload
    def __init__(
        self,
        *,
        file_id: str,
        index: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = AnnotationType.FILE_PATH  # type: ignore


class FileSearchTool(Tool, discriminator="file_search"):
    """File search.

    :ivar type: The type of the file search tool. Always ``file_search``. Required. FILE_SEARCH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_SEARCH
    :ivar vector_store_ids: The IDs of the vector stores to search. Required.
    :vartype vector_store_ids: list[str]
    :ivar max_num_results: The maximum number of results to return. This number should be between 1
     and 50 inclusive.
    :vartype max_num_results: int
    :ivar ranking_options: Ranking options for search.
    :vartype ranking_options: ~azure.ai.agentserver.responses.models.models.RankingOptions
    :ivar filters: Is either a ComparisonFilter type or a CompoundFilter type.
    :vartype filters: ~azure.ai.agentserver.responses.models.models.ComparisonFilter or
     ~azure.ai.agentserver.responses.models.models.CompoundFilter
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    """

    type: Literal[ToolType.FILE_SEARCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the file search tool. Always ``file_search``. Required. FILE_SEARCH."""
    vector_store_ids: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The IDs of the vector stores to search. Required."""
    max_num_results: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The maximum number of results to return. This number should be between 1 and 50 inclusive."""
    ranking_options: Optional["_models.RankingOptions"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Ranking options for search."""
    filters: Optional["_types.Filters"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Is either a ComparisonFilter type or a CompoundFilter type."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""

    @overload
    def __init__(
        self,
        *,
        vector_store_ids: list[str],
        max_num_results: Optional[int] = None,
        ranking_options: Optional["_models.RankingOptions"] = None,
        filters: Optional["_types.Filters"] = None,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.FILE_SEARCH  # type: ignore


class FileSearchToolCallResults(_Model):
    """FileSearchToolCallResults.

    :ivar file_id:
    :vartype file_id: str
    :ivar text:
    :vartype text: str
    :ivar filename:
    :vartype filename: str
    :ivar attributes:
    :vartype attributes: ~azure.ai.agentserver.responses.models.models.VectorStoreFileAttributes
    :ivar score:
    :vartype score: float
    """

    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    filename: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    attributes: Optional["_models.VectorStoreFileAttributes"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    score: Optional[float] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        file_id: Optional[str] = None,
        text: Optional[str] = None,
        filename: Optional[str] = None,
        attributes: Optional["_models.VectorStoreFileAttributes"] = None,
        score: Optional[float] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionAndCustomToolCallOutput(_Model):
    """FunctionAndCustomToolCallOutput.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    FunctionAndCustomToolCallOutputInputFileContent,
    FunctionAndCustomToolCallOutputInputImageContent,
    FunctionAndCustomToolCallOutputInputTextContent

    :ivar type: Required. Known values are: "input_text", "input_image", and "input_file".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FunctionAndCustomToolCallOutputType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"input_text\", \"input_image\", and \"input_file\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionAndCustomToolCallOutputInputFileContent(
    FunctionAndCustomToolCallOutput, discriminator="input_file"
):  # pylint: disable=name-too-long
    """Input file.

    :ivar type: The type of the input item. Always ``input_file``. Required. INPUT_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INPUT_FILE
    :ivar file_id:
    :vartype file_id: str
    :ivar filename: The name of the file to be sent to the model.
    :vartype filename: str
    :ivar file_url: The URL of the file to be sent to the model.
    :vartype file_url: str
    :ivar file_data: The content of the file to be sent to the model.
    :vartype file_data: str
    """

    type: Literal[FunctionAndCustomToolCallOutputType.INPUT_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the input item. Always ``input_file``. Required. INPUT_FILE."""
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    filename: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the file to be sent to the model."""
    file_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the file to be sent to the model."""
    file_data: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content of the file to be sent to the model."""

    @overload
    def __init__(
        self,
        *,
        file_id: Optional[str] = None,
        filename: Optional[str] = None,
        file_url: Optional[str] = None,
        file_data: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionAndCustomToolCallOutputType.INPUT_FILE  # type: ignore


class FunctionAndCustomToolCallOutputInputImageContent(
    FunctionAndCustomToolCallOutput, discriminator="input_image"
):  # pylint: disable=name-too-long
    """Input image.

    :ivar type: The type of the input item. Always ``input_image``. Required. INPUT_IMAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INPUT_IMAGE
    :ivar image_url:
    :vartype image_url: str
    :ivar file_id:
    :vartype file_id: str
    :ivar detail: The detail level of the image to be sent to the model. One of ``high``, ``low``,
     or ``auto``. Defaults to ``auto``. Required. Known values are: "low", "high", and "auto".
    :vartype detail: str or ~azure.ai.agentserver.responses.models.models.ImageDetail
    """

    type: Literal[FunctionAndCustomToolCallOutputType.INPUT_IMAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the input item. Always ``input_image``. Required. INPUT_IMAGE."""
    image_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    detail: Union[str, "_models.ImageDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The detail level of the image to be sent to the model. One of ``high``, ``low``, or ``auto``.
     Defaults to ``auto``. Required. Known values are: \"low\", \"high\", and \"auto\"."""

    @overload
    def __init__(
        self,
        *,
        detail: Union[str, "_models.ImageDetail"],
        image_url: Optional[str] = None,
        file_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionAndCustomToolCallOutputType.INPUT_IMAGE  # type: ignore


class FunctionAndCustomToolCallOutputInputTextContent(
    FunctionAndCustomToolCallOutput, discriminator="input_text"
):  # pylint: disable=name-too-long
    """Input text.

    :ivar type: The type of the input item. Always ``input_text``. Required. INPUT_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INPUT_TEXT
    :ivar text: The text input to the model. Required.
    :vartype text: str
    """

    type: Literal[FunctionAndCustomToolCallOutputType.INPUT_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the input item. Always ``input_text``. Required. INPUT_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text input to the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionAndCustomToolCallOutputType.INPUT_TEXT  # type: ignore


class FunctionCallOutputItemParam(Item, discriminator="function_call_output"):
    """Function tool call output.

    :ivar id:
    :vartype id: str
    :ivar call_id: The unique ID of the function tool call generated by the model. Required.
    :vartype call_id: str
    :ivar type: The type of the function tool call output. Always ``function_call_output``.
     Required. FUNCTION_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION_CALL_OUTPUT
    :ivar output: Text, image, or file output of the function tool call. Required. Is either a str
     type or a [Union["_models.InputTextContentParam", "_models.InputImageContentParamAutoParam",
     "_models.InputFileContentParam"]] type.
    :vartype output: str or
     list[~azure.ai.agentserver.responses.models.models.InputTextContentParam or
     ~azure.ai.agentserver.responses.models.models.InputImageContentParamAutoParam or
     ~azure.ai.agentserver.responses.models.models.InputFileContentParam]
    :ivar status: Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.FunctionCallItemStatus
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call generated by the model. Required."""
    type: Literal[ItemType.FUNCTION_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool call output. Always ``function_call_output``. Required.
     FUNCTION_CALL_OUTPUT."""
    output: Union[
        str,
        list[
            Union[
                "_models.InputTextContentParam",
                "_models.InputImageContentParamAutoParam",
                "_models.InputFileContentParam",
            ]
        ],
    ] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Text, image, or file output of the function tool call. Required. Is either a str type or a
     [Union[\"_models.InputTextContentParam\", \"_models.InputImageContentParamAutoParam\",
     \"_models.InputFileContentParam\"]] type."""
    status: Optional[Union[str, "_models.FunctionCallItemStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: Union[
            str,
            list[
                Union[
                    "_models.InputTextContentParam",
                    "_models.InputImageContentParamAutoParam",
                    "_models.InputFileContentParam",
                ]
            ],
        ],
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Union[str, "_models.FunctionCallItemStatus"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.FUNCTION_CALL_OUTPUT  # type: ignore


class FunctionShellAction(_Model):
    """Shell exec action.

    :ivar commands: Required.
    :vartype commands: list[str]
    :ivar timeout_ms: Required.
    :vartype timeout_ms: int
    :ivar max_output_length: Required.
    :vartype max_output_length: int
    """

    commands: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    timeout_ms: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    max_output_length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        commands: list[str],
        timeout_ms: int,
        max_output_length: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellActionParam(_Model):
    """Shell action.

    :ivar commands: Ordered shell commands for the execution environment to run. Required.
    :vartype commands: list[str]
    :ivar timeout_ms:
    :vartype timeout_ms: int
    :ivar max_output_length:
    :vartype max_output_length: int
    """

    commands: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Ordered shell commands for the execution environment to run. Required."""
    timeout_ms: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    max_output_length: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        commands: list[str],
        timeout_ms: Optional[int] = None,
        max_output_length: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallItemParam(Item, discriminator="shell_call"):
    """Shell tool call.

    :ivar id:
    :vartype id: str
    :ivar call_id: The unique ID of the shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar type: The type of the item. Always ``shell_call``. Required. SHELL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL_CALL
    :ivar action: The shell commands and limits that describe how to run the tool call. Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.FunctionShellActionParam
    :ivar status: Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallItemStatus
    :ivar environment:
    :vartype environment:
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallItemParamEnvironment
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call generated by the model. Required."""
    type: Literal[ItemType.SHELL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``shell_call``. Required. SHELL_CALL."""
    action: "_models.FunctionShellActionParam" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The shell commands and limits that describe how to run the tool call. Required."""
    status: Optional[Union[str, "_models.FunctionShellCallItemStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""
    environment: Optional["_models.FunctionShellCallItemParamEnvironment"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        action: "_models.FunctionShellActionParam",
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Union[str, "_models.FunctionShellCallItemStatus"]] = None,
        environment: Optional["_models.FunctionShellCallItemParamEnvironment"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.SHELL_CALL  # type: ignore


class FunctionShellCallItemParamEnvironment(_Model):
    """The environment to execute the shell commands in.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    FunctionShellCallItemParamEnvironmentContainerReferenceParam,
    FunctionShellCallItemParamEnvironmentLocalEnvironmentParam

    :ivar type: Required. Known values are: "local" and "container_reference".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallItemParamEnvironmentType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"local\" and \"container_reference\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallItemParamEnvironmentContainerReferenceParam(
    FunctionShellCallItemParamEnvironment, discriminator="container_reference"
):  # pylint: disable=name-too-long
    """FunctionShellCallItemParamEnvironmentContainerReferenceParam.

    :ivar type: References a container created with the /v1/containers endpoint. Required.
     CONTAINER_REFERENCE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CONTAINER_REFERENCE
    :ivar container_id: The ID of the referenced container. Required.
    :vartype container_id: str
    """

    type: Literal[FunctionShellCallItemParamEnvironmentType.CONTAINER_REFERENCE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """References a container created with the /v1/containers endpoint. Required. CONTAINER_REFERENCE."""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the referenced container. Required."""

    @overload
    def __init__(
        self,
        *,
        container_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallItemParamEnvironmentType.CONTAINER_REFERENCE  # type: ignore


class FunctionShellCallItemParamEnvironmentLocalEnvironmentParam(
    FunctionShellCallItemParamEnvironment, discriminator="local"
):  # pylint: disable=name-too-long
    """FunctionShellCallItemParamEnvironmentLocalEnvironmentParam.

    :ivar type: Use a local computer environment. Required. LOCAL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL
    :ivar skills: An optional list of skills.
    :vartype skills: list[~azure.ai.agentserver.responses.models.models.LocalSkillParam]
    """

    type: Literal[FunctionShellCallItemParamEnvironmentType.LOCAL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Use a local computer environment. Required. LOCAL."""
    skills: Optional[list["_models.LocalSkillParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An optional list of skills."""

    @overload
    def __init__(
        self,
        *,
        skills: Optional[list["_models.LocalSkillParam"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallItemParamEnvironmentType.LOCAL  # type: ignore


class FunctionShellCallOutputContent(_Model):
    """Shell call output content.

    :ivar stdout: The standard output that was captured. Required.
    :vartype stdout: str
    :ivar stderr: The standard error output that was captured. Required.
    :vartype stderr: str
    :ivar outcome: Shell call outcome. Required.
    :vartype outcome: ~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputOutcome
    :ivar created_by: The identifier of the actor that created the item.
    :vartype created_by: str
    """

    stdout: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The standard output that was captured. Required."""
    stderr: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The standard error output that was captured. Required."""
    outcome: "_models.FunctionShellCallOutputOutcome" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Shell call outcome. Required."""
    created_by: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identifier of the actor that created the item."""

    @overload
    def __init__(
        self,
        *,
        stdout: str,
        stderr: str,
        outcome: "_models.FunctionShellCallOutputOutcome",
        created_by: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallOutputContentParam(_Model):
    """Shell output content.

    :ivar stdout: Captured stdout output for the shell call. Required.
    :vartype stdout: str
    :ivar stderr: Captured stderr output for the shell call. Required.
    :vartype stderr: str
    :ivar outcome: The exit or timeout outcome associated with this shell call. Required.
    :vartype outcome:
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputOutcomeParam
    """

    stdout: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Captured stdout output for the shell call. Required."""
    stderr: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Captured stderr output for the shell call. Required."""
    outcome: "_models.FunctionShellCallOutputOutcomeParam" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The exit or timeout outcome associated with this shell call. Required."""

    @overload
    def __init__(
        self,
        *,
        stdout: str,
        stderr: str,
        outcome: "_models.FunctionShellCallOutputOutcomeParam",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallOutputOutcome(_Model):
    """Shell call outcome.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    FunctionShellCallOutputExitOutcome, FunctionShellCallOutputTimeoutOutcome

    :ivar type: Required. Known values are: "timeout" and "exit".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputOutcomeType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"timeout\" and \"exit\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallOutputExitOutcome(FunctionShellCallOutputOutcome, discriminator="exit"):
    """Shell call exit outcome.

    :ivar type: The outcome type. Always ``exit``. Required. EXIT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.EXIT
    :ivar exit_code: Exit code from the shell process. Required.
    :vartype exit_code: int
    """

    type: Literal[FunctionShellCallOutputOutcomeType.EXIT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The outcome type. Always ``exit``. Required. EXIT."""
    exit_code: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Exit code from the shell process. Required."""

    @overload
    def __init__(
        self,
        *,
        exit_code: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallOutputOutcomeType.EXIT  # type: ignore


class FunctionShellCallOutputOutcomeParam(_Model):
    """Shell call outcome.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    FunctionShellCallOutputExitOutcomeParam, FunctionShellCallOutputTimeoutOutcomeParam

    :ivar type: Required. Known values are: "timeout" and "exit".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputOutcomeParamType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"timeout\" and \"exit\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionShellCallOutputExitOutcomeParam(FunctionShellCallOutputOutcomeParam, discriminator="exit"):
    """Shell call exit outcome.

    :ivar type: The outcome type. Always ``exit``. Required. EXIT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.EXIT
    :ivar exit_code: The exit code returned by the shell process. Required.
    :vartype exit_code: int
    """

    type: Literal[FunctionShellCallOutputOutcomeParamType.EXIT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The outcome type. Always ``exit``. Required. EXIT."""
    exit_code: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The exit code returned by the shell process. Required."""

    @overload
    def __init__(
        self,
        *,
        exit_code: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallOutputOutcomeParamType.EXIT  # type: ignore


class FunctionShellCallOutputItemParam(Item, discriminator="shell_call_output"):
    """Shell tool call output.

    :ivar id:
    :vartype id: str
    :ivar call_id: The unique ID of the shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar type: The type of the item. Always ``shell_call_output``. Required. SHELL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL_CALL_OUTPUT
    :ivar output: Captured chunks of stdout and stderr output, along with their associated
     outcomes. Required.
    :vartype output:
     list[~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputContentParam]
    :ivar status: Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallItemStatus
    :ivar max_output_length:
    :vartype max_output_length: int
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call generated by the model. Required."""
    type: Literal[ItemType.SHELL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``shell_call_output``. Required. SHELL_CALL_OUTPUT."""
    output: list["_models.FunctionShellCallOutputContentParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Captured chunks of stdout and stderr output, along with their associated outcomes. Required."""
    status: Optional[Union[str, "_models.FunctionShellCallItemStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""
    max_output_length: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: list["_models.FunctionShellCallOutputContentParam"],
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Union[str, "_models.FunctionShellCallItemStatus"]] = None,
        max_output_length: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.SHELL_CALL_OUTPUT  # type: ignore


class FunctionShellCallOutputTimeoutOutcome(FunctionShellCallOutputOutcome, discriminator="timeout"):
    """Shell call timeout outcome.

    :ivar type: The outcome type. Always ``timeout``. Required. TIMEOUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.TIMEOUT
    """

    type: Literal[FunctionShellCallOutputOutcomeType.TIMEOUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The outcome type. Always ``timeout``. Required. TIMEOUT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallOutputOutcomeType.TIMEOUT  # type: ignore


class FunctionShellCallOutputTimeoutOutcomeParam(
    FunctionShellCallOutputOutcomeParam, discriminator="timeout"
):  # pylint: disable=name-too-long
    """Shell call timeout outcome.

    :ivar type: The outcome type. Always ``timeout``. Required. TIMEOUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.TIMEOUT
    """

    type: Literal[FunctionShellCallOutputOutcomeParamType.TIMEOUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The outcome type. Always ``timeout``. Required. TIMEOUT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallOutputOutcomeParamType.TIMEOUT  # type: ignore


class FunctionShellToolParam(Tool, discriminator="shell"):
    """Shell tool.

    :ivar type: The type of the shell tool. Always ``shell``. Required. SHELL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL
    :ivar environment:
    :vartype environment:
     ~azure.ai.agentserver.responses.models.models.FunctionShellToolParamEnvironment
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    """

    type: Literal[ToolType.SHELL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the shell tool. Always ``shell``. Required. SHELL."""
    environment: Optional["_models.FunctionShellToolParamEnvironment"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""

    @overload
    def __init__(
        self,
        *,
        environment: Optional["_models.FunctionShellToolParamEnvironment"] = None,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.SHELL  # type: ignore


class FunctionShellToolParamEnvironmentContainerReferenceParam(
    FunctionShellToolParamEnvironment, discriminator="container_reference"
):  # pylint: disable=name-too-long
    """FunctionShellToolParamEnvironmentContainerReferenceParam.

    :ivar type: References a container created with the /v1/containers endpoint. Required.
     CONTAINER_REFERENCE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CONTAINER_REFERENCE
    :ivar container_id: The ID of the referenced container. Required.
    :vartype container_id: str
    """

    type: Literal[FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """References a container created with the /v1/containers endpoint. Required. CONTAINER_REFERENCE."""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the referenced container. Required."""

    @overload
    def __init__(
        self,
        *,
        container_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellToolParamEnvironmentType.CONTAINER_REFERENCE  # type: ignore


class FunctionShellToolParamEnvironmentLocalEnvironmentParam(
    FunctionShellToolParamEnvironment, discriminator="local"
):  # pylint: disable=name-too-long
    """FunctionShellToolParamEnvironmentLocalEnvironmentParam.

    :ivar type: Use a local computer environment. Required. LOCAL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL
    :ivar skills: An optional list of skills.
    :vartype skills: list[~azure.ai.agentserver.responses.models.models.LocalSkillParam]
    """

    type: Literal[FunctionShellToolParamEnvironmentType.LOCAL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Use a local computer environment. Required. LOCAL."""
    skills: Optional[list["_models.LocalSkillParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An optional list of skills."""

    @overload
    def __init__(
        self,
        *,
        skills: Optional[list["_models.LocalSkillParam"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellToolParamEnvironmentType.LOCAL  # type: ignore


class FunctionTool(Tool, discriminator="function"):
    """Function.

    :ivar type: The type of the function tool. Always ``function``. Required. FUNCTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION
    :ivar name: The name of the function to call. Required.
    :vartype name: str
    :ivar description:
    :vartype description: str
    :ivar parameters: Required.
    :vartype parameters: dict[str, any]
    :ivar strict: Required.
    :vartype strict: bool
    """

    type: Literal[ToolType.FUNCTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool. Always ``function``. Required. FUNCTION."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to call. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    parameters: dict[str, Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    strict: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        parameters: dict[str, Any],
        strict: bool,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.FUNCTION  # type: ignore


class ItemField(_Model):
    """An item representing a message, tool call, tool output, reasoning, or other response element.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ItemFieldApplyPatchToolCall, ItemFieldApplyPatchToolCallOutput,
    ItemFieldCodeInterpreterToolCall, ItemFieldCompactionBody, ItemFieldComputerToolCall,
    ItemFieldComputerToolCallOutputResource, ItemFieldCustomToolCall,
    ItemFieldCustomToolCallOutput, ItemFieldFileSearchToolCall, ItemFieldFunctionToolCall,
    FunctionToolCallOutput, ItemFieldImageGenToolCall, ItemFieldLocalShellToolCall,
    ItemFieldLocalShellToolCallOutput, ItemFieldMcpApprovalRequest,
    ItemFieldMcpApprovalResponseResource, ItemFieldMcpToolCall, ItemFieldMcpListTools,
    ItemFieldMessage, ItemFieldReasoningItem, ItemFieldFunctionShellCall,
    ItemFieldFunctionShellCallOutput, ItemFieldWebSearchToolCall

    :ivar type: Required. Known values are: "message", "function_call", "function_call_output",
     "file_search_call", "web_search_call", "image_generation_call", "computer_call",
     "computer_call_output", "reasoning", "compaction", "code_interpreter_call", "local_shell_call",
     "local_shell_call_output", "shell_call", "shell_call_output", "apply_patch_call",
     "apply_patch_call_output", "mcp_list_tools", "mcp_approval_request", "mcp_approval_response",
     "mcp_call", "custom_tool_call", and "custom_tool_call_output".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ItemFieldType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"message\", \"function_call\", \"function_call_output\",
     \"file_search_call\", \"web_search_call\", \"image_generation_call\", \"computer_call\",
     \"computer_call_output\", \"reasoning\", \"compaction\", \"code_interpreter_call\",
     \"local_shell_call\", \"local_shell_call_output\", \"shell_call\", \"shell_call_output\",
     \"apply_patch_call\", \"apply_patch_call_output\", \"mcp_list_tools\",
     \"mcp_approval_request\", \"mcp_approval_response\", \"mcp_call\", \"custom_tool_call\", and
     \"custom_tool_call_output\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class FunctionToolCallOutput(ItemField, discriminator="function_call_output"):
    """Function tool call output.

    :ivar id: The unique ID of the function tool call output. Populated when this item is returned
     via API.
    :vartype id: str
    :ivar type: The type of the function tool call output. Always ``function_call_output``.
     Required. FUNCTION_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION_CALL_OUTPUT
    :ivar call_id: The unique ID of the function tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the function call generated by your code. Can be a string or an
     list of output content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput]
     type.
    :vartype output: str or
     list[~azure.ai.agentserver.responses.models.models.FunctionAndCustomToolCallOutput]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call output. Populated when this item is returned via API."""
    type: Literal[ItemFieldType.FUNCTION_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool call output. Always ``function_call_output``. Required.
     FUNCTION_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call generated by the model. Required."""
    output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the function call generated by your code. Can be a string or an list of output
     content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput] type."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]],
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.FUNCTION_CALL_OUTPUT  # type: ignore


class FunctionToolCallOutputResource(OutputItem, discriminator="function_call_output"):
    """FunctionToolCallOutputResource.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar id: The unique ID of the function tool call output. Populated when this item is returned
     via API.
    :vartype id: str
    :ivar type: The type of the function tool call output. Always ``function_call_output``.
     Required. FUNCTION_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION_CALL_OUTPUT
    :ivar call_id: The unique ID of the function tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the function call generated by your code. Can be a string or an
     list of output content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput]
     type.
    :vartype output: str or
     list[~azure.ai.agentserver.responses.models.models.FunctionAndCustomToolCallOutput]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call output. Populated when this item is returned via API."""
    type: Literal[OutputItemType.FUNCTION_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool call output. Always ``function_call_output``. Required.
     FUNCTION_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call generated by the model. Required."""
    output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the function call generated by your code. Can be a string or an list of output
     content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput] type."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.FUNCTION_CALL_OUTPUT  # type: ignore


class HybridSearchOptions(_Model):
    """HybridSearchOptions.

    :ivar embedding_weight: The weight of the embedding in the reciprocal ranking fusion. Required.
    :vartype embedding_weight: int
    :ivar text_weight: The weight of the text in the reciprocal ranking fusion. Required.
    :vartype text_weight: int
    """

    embedding_weight: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The weight of the embedding in the reciprocal ranking fusion. Required."""
    text_weight: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The weight of the text in the reciprocal ranking fusion. Required."""

    @overload
    def __init__(
        self,
        *,
        embedding_weight: int,
        text_weight: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ImageGenTool(Tool, discriminator="image_generation"):
    """Image generation tool.

    :ivar type: The type of the image generation tool. Always ``image_generation``. Required.
     IMAGE_GENERATION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.IMAGE_GENERATION
    :ivar model: Is one of the following types: Literal["gpt-image-1"],
     Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str
    :vartype model: str or str or str or str
    :ivar quality: The quality of the generated image. One of ``low``, ``medium``, ``high``, or
     ``auto``. Default: ``auto``. Is one of the following types: Literal["low"], Literal["medium"],
     Literal["high"], Literal["auto"]
    :vartype quality: str or str or str or str
    :ivar size: The size of the generated image. One of ``1024x1024``, ``1024x1536``,
     ``1536x1024``, or ``auto``. Default: ``auto``. Is one of the following types:
     Literal["1024x1024"], Literal["1024x1536"], Literal["1536x1024"], Literal["auto"]
    :vartype size: str or str or str or str
    :ivar output_format: The output format of the generated image. One of ``png``, ``webp``, or
     ``jpeg``. Default: ``png``. Is one of the following types: Literal["png"], Literal["webp"],
     Literal["jpeg"]
    :vartype output_format: str or str or str
    :ivar output_compression: Compression level for the output image. Default: 100.
    :vartype output_compression: int
    :ivar moderation: Moderation level for the generated image. Default: ``auto``. Is either a
     Literal["auto"] type or a Literal["low"] type.
    :vartype moderation: str or str
    :ivar background: Background type for the generated image. One of ``transparent``, ``opaque``,
     or ``auto``. Default: ``auto``. Is one of the following types: Literal["transparent"],
     Literal["opaque"], Literal["auto"]
    :vartype background: str or str or str
    :ivar input_fidelity: Known values are: "high" and "low".
    :vartype input_fidelity: str or ~azure.ai.agentserver.responses.models.models.InputFidelity
    :ivar input_image_mask: Optional mask for inpainting. Contains ``image_url`` (string, optional)
     and ``file_id`` (string, optional).
    :vartype input_image_mask:
     ~azure.ai.agentserver.responses.models.models.ImageGenToolInputImageMask
    :ivar partial_images: Number of partial images to generate in streaming mode, from 0 (default
     value) to 3.
    :vartype partial_images: int
    :ivar action: Whether to generate a new image or edit an existing image. Default: ``auto``.
     Known values are: "generate", "edit", and "auto".
    :vartype action: str or ~azure.ai.agentserver.responses.models.models.ImageGenActionEnum
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    """

    type: Literal[ToolType.IMAGE_GENERATION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the image generation tool. Always ``image_generation``. Required. IMAGE_GENERATION."""
    model: Optional[Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str]] = (
        rest_field(visibility=["read", "create", "update", "delete", "query"])
    )
    """Is one of the following types: Literal[\"gpt-image-1\"], Literal[\"gpt-image-1-mini\"],
     Literal[\"gpt-image-1.5\"], str"""
    quality: Optional[Literal["low", "medium", "high", "auto"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The quality of the generated image. One of ``low``, ``medium``, ``high``, or ``auto``. Default:
     ``auto``. Is one of the following types: Literal[\"low\"], Literal[\"medium\"],
     Literal[\"high\"], Literal[\"auto\"]"""
    size: Optional[Literal["1024x1024", "1024x1536", "1536x1024", "auto"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The size of the generated image. One of ``1024x1024``, ``1024x1536``, ``1536x1024``, or
     ``auto``. Default: ``auto``. Is one of the following types: Literal[\"1024x1024\"],
     Literal[\"1024x1536\"], Literal[\"1536x1024\"], Literal[\"auto\"]"""
    output_format: Optional[Literal["png", "webp", "jpeg"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output format of the generated image. One of ``png``, ``webp``, or ``jpeg``. Default:
     ``png``. Is one of the following types: Literal[\"png\"], Literal[\"webp\"], Literal[\"jpeg\"]"""
    output_compression: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Compression level for the output image. Default: 100."""
    moderation: Optional[Literal["auto", "low"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Moderation level for the generated image. Default: ``auto``. Is either a Literal[\"auto\"] type
     or a Literal[\"low\"] type."""
    background: Optional[Literal["transparent", "opaque", "auto"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Background type for the generated image. One of ``transparent``, ``opaque``, or ``auto``.
     Default: ``auto``. Is one of the following types: Literal[\"transparent\"],
     Literal[\"opaque\"], Literal[\"auto\"]"""
    input_fidelity: Optional[Union[str, "_models.InputFidelity"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"high\" and \"low\"."""
    input_image_mask: Optional["_models.ImageGenToolInputImageMask"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Optional mask for inpainting. Contains ``image_url`` (string, optional) and ``file_id``
     (string, optional)."""
    partial_images: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Number of partial images to generate in streaming mode, from 0 (default value) to 3."""
    action: Optional[Union[str, "_models.ImageGenActionEnum"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Whether to generate a new image or edit an existing image. Default: ``auto``. Known values are:
     \"generate\", \"edit\", and \"auto\"."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""

    @overload
    def __init__(
        self,
        *,
        model: Optional[
            Union[Literal["gpt-image-1"], Literal["gpt-image-1-mini"], Literal["gpt-image-1.5"], str]
        ] = None,
        quality: Optional[Literal["low", "medium", "high", "auto"]] = None,
        size: Optional[Literal["1024x1024", "1024x1536", "1536x1024", "auto"]] = None,
        output_format: Optional[Literal["png", "webp", "jpeg"]] = None,
        output_compression: Optional[int] = None,
        moderation: Optional[Literal["auto", "low"]] = None,
        background: Optional[Literal["transparent", "opaque", "auto"]] = None,
        input_fidelity: Optional[Union[str, "_models.InputFidelity"]] = None,
        input_image_mask: Optional["_models.ImageGenToolInputImageMask"] = None,
        partial_images: Optional[int] = None,
        action: Optional[Union[str, "_models.ImageGenActionEnum"]] = None,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.IMAGE_GENERATION  # type: ignore


class ImageGenToolInputImageMask(_Model):
    """ImageGenToolInputImageMask.

    :ivar image_url:
    :vartype image_url: str
    :ivar file_id:
    :vartype file_id: str
    """

    image_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        image_url: Optional[str] = None,
        file_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class InlineSkillParam(ContainerSkill, discriminator="inline"):
    """InlineSkillParam.

    :ivar type: Defines an inline skill for this request. Required. INLINE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INLINE
    :ivar name: The name of the skill. Required.
    :vartype name: str
    :ivar description: The description of the skill. Required.
    :vartype description: str
    :ivar source: Inline skill payload. Required.
    :vartype source: ~azure.ai.agentserver.responses.models.models.InlineSkillSourceParam
    """

    type: Literal[ContainerSkillType.INLINE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Defines an inline skill for this request. Required. INLINE."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the skill. Required."""
    description: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the skill. Required."""
    source: "_models.InlineSkillSourceParam" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Inline skill payload. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        description: str,
        source: "_models.InlineSkillSourceParam",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ContainerSkillType.INLINE  # type: ignore


class InlineSkillSourceParam(_Model):
    """Inline skill payload.

    :ivar type: The type of the inline skill source. Must be ``base64``. Required. Default value is
     "base64".
    :vartype type: str
    :ivar media_type: The media type of the inline skill payload. Must be ``application/zip``.
     Required. Default value is "application/zip".
    :vartype media_type: str
    :ivar data: Base64-encoded skill zip bundle. Required.
    :vartype data: str
    """

    type: Literal["base64"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the inline skill source. Must be ``base64``. Required. Default value is \"base64\"."""
    media_type: Literal["application/zip"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The media type of the inline skill payload. Must be ``application/zip``. Required. Default
     value is \"application/zip\"."""
    data: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Base64-encoded skill zip bundle. Required."""

    @overload
    def __init__(
        self,
        *,
        data: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["base64"] = "base64"
        self.media_type: Literal["application/zip"] = "application/zip"


class InputFileContent(_Model):
    """Input file.

    :ivar type: The type of the input item. Always ``input_file``. Required. Default value is
     "input_file".
    :vartype type: str
    :ivar file_id:
    :vartype file_id: str
    :ivar filename: The name of the file to be sent to the model.
    :vartype filename: str
    :ivar file_url: The URL of the file to be sent to the model.
    :vartype file_url: str
    :ivar file_data: The content of the file to be sent to the model.
    :vartype file_data: str
    """

    type: Literal["input_file"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the input item. Always ``input_file``. Required. Default value is \"input_file\"."""
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    filename: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the file to be sent to the model."""
    file_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the file to be sent to the model."""
    file_data: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content of the file to be sent to the model."""

    @overload
    def __init__(
        self,
        *,
        file_id: Optional[str] = None,
        filename: Optional[str] = None,
        file_url: Optional[str] = None,
        file_data: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["input_file"] = "input_file"


class InputFileContentParam(_Model):
    """Input file.

    :ivar type: The type of the input item. Always ``input_file``. Required. Default value is
     "input_file".
    :vartype type: str
    :ivar file_id:
    :vartype file_id: str
    :ivar filename:
    :vartype filename: str
    :ivar file_data:
    :vartype file_data: str
    :ivar file_url:
    :vartype file_url: str
    """

    type: Literal["input_file"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the input item. Always ``input_file``. Required. Default value is \"input_file\"."""
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    filename: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_data: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        file_id: Optional[str] = None,
        filename: Optional[str] = None,
        file_data: Optional[str] = None,
        file_url: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["input_file"] = "input_file"


class InputImageContent(_Model):
    """Input image.

    :ivar type: The type of the input item. Always ``input_image``. Required. Default value is
     "input_image".
    :vartype type: str
    :ivar image_url:
    :vartype image_url: str
    :ivar file_id:
    :vartype file_id: str
    :ivar detail: The detail level of the image to be sent to the model. One of ``high``, ``low``,
     or ``auto``. Defaults to ``auto``. Required. Known values are: "low", "high", and "auto".
    :vartype detail: str or ~azure.ai.agentserver.responses.models.models.ImageDetail
    """

    type: Literal["input_image"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the input item. Always ``input_image``. Required. Default value is \"input_image\"."""
    image_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    detail: Union[str, "_models.ImageDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The detail level of the image to be sent to the model. One of ``high``, ``low``, or ``auto``.
     Defaults to ``auto``. Required. Known values are: \"low\", \"high\", and \"auto\"."""

    @overload
    def __init__(
        self,
        *,
        detail: Union[str, "_models.ImageDetail"],
        image_url: Optional[str] = None,
        file_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["input_image"] = "input_image"


class InputImageContentParamAutoParam(_Model):
    """Input image.

    :ivar type: The type of the input item. Always ``input_image``. Required. Default value is
     "input_image".
    :vartype type: str
    :ivar image_url:
    :vartype image_url: str
    :ivar file_id:
    :vartype file_id: str
    :ivar detail: Known values are: "low", "high", and "auto".
    :vartype detail: str or ~azure.ai.agentserver.responses.models.models.DetailEnum
    """

    type: Literal["input_image"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the input item. Always ``input_image``. Required. Default value is \"input_image\"."""
    image_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    detail: Optional[Union[str, "_models.DetailEnum"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Known values are: \"low\", \"high\", and \"auto\"."""

    @overload
    def __init__(
        self,
        *,
        image_url: Optional[str] = None,
        file_id: Optional[str] = None,
        detail: Optional[Union[str, "_models.DetailEnum"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["input_image"] = "input_image"


class InputTextContent(_Model):
    """Input text.

    :ivar type: The type of the input item. Always ``input_text``. Required. Default value is
     "input_text".
    :vartype type: str
    :ivar text: The text input to the model. Required.
    :vartype text: str
    """

    type: Literal["input_text"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the input item. Always ``input_text``. Required. Default value is \"input_text\"."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text input to the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["input_text"] = "input_text"


class InputTextContentParam(_Model):
    """Input text.

    :ivar type: The type of the input item. Always ``input_text``. Required. Default value is
     "input_text".
    :vartype type: str
    :ivar text: The text input to the model. Required.
    :vartype text: str
    """

    type: Literal["input_text"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the input item. Always ``input_text``. Required. Default value is \"input_text\"."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text input to the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["input_text"] = "input_text"


class ItemCodeInterpreterToolCall(Item, discriminator="code_interpreter_call"):
    """Code interpreter tool call.

    :ivar type: The type of the code interpreter tool call. Always ``code_interpreter_call``.
     Required. CODE_INTERPRETER_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CODE_INTERPRETER_CALL
    :ivar id: The unique ID of the code interpreter tool call. Required.
    :vartype id: str
    :ivar status: The status of the code interpreter tool call. Valid values are ``in_progress``,
     ``completed``, ``incomplete``, ``interpreting``, and ``failed``. Required. Is one of the
     following types: Literal["in_progress"], Literal["completed"], Literal["incomplete"],
     Literal["interpreting"], Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar container_id: The ID of the container used to run the code. Required.
    :vartype container_id: str
    :ivar code: Required.
    :vartype code: str
    :ivar outputs: Required.
    :vartype outputs: list[~azure.ai.agentserver.responses.models.models.CodeInterpreterOutputLogs
     or ~azure.ai.agentserver.responses.models.models.CodeInterpreterOutputImage]
    """

    type: Literal[ItemType.CODE_INTERPRETER_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the code interpreter tool call. Always ``code_interpreter_call``. Required.
     CODE_INTERPRETER_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the code interpreter tool call. Required."""
    status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the code interpreter tool call. Valid values are ``in_progress``, ``completed``,
     ``incomplete``, ``interpreting``, and ``failed``. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"],
     Literal[\"interpreting\"], Literal[\"failed\"]"""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the container used to run the code. Required."""
    code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    outputs: list[Union["_models.CodeInterpreterOutputLogs", "_models.CodeInterpreterOutputImage"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"],
        container_id: str,
        code: str,
        outputs: list[Union["_models.CodeInterpreterOutputLogs", "_models.CodeInterpreterOutputImage"]],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.CODE_INTERPRETER_CALL  # type: ignore


class ItemComputerToolCall(Item, discriminator="computer_call"):
    """Computer tool call.

    :ivar type: The type of the computer call. Always ``computer_call``. Required. COMPUTER_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_CALL
    :ivar id: The unique ID of the computer call. Required.
    :vartype id: str
    :ivar call_id: An identifier used when responding to the tool call with output. Required.
    :vartype call_id: str
    :ivar action: Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.ComputerAction
    :ivar pending_safety_checks: The pending safety checks for the computer call. Required.
    :vartype pending_safety_checks:
     list[~azure.ai.agentserver.responses.models.models.ComputerCallSafetyCheckParam]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemType.COMPUTER_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer call. Always ``computer_call``. Required. COMPUTER_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the computer call. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier used when responding to the tool call with output. Required."""
    action: "_models.ComputerAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    pending_safety_checks: list["_models.ComputerCallSafetyCheckParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The pending safety checks for the computer call. Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.ComputerAction",
        pending_safety_checks: list["_models.ComputerCallSafetyCheckParam"],
        status: Literal["in_progress", "completed", "incomplete"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.COMPUTER_CALL  # type: ignore


class ItemCustomToolCall(Item, discriminator="custom_tool_call"):
    """Custom tool call.

    :ivar type: The type of the custom tool call. Always ``custom_tool_call``. Required.
     CUSTOM_TOOL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM_TOOL_CALL
    :ivar id: The unique ID of the custom tool call in the OpenAI platform.
    :vartype id: str
    :ivar call_id: An identifier used to map this custom tool call to a tool call output. Required.
    :vartype call_id: str
    :ivar name: The name of the custom tool being called. Required.
    :vartype name: str
    :ivar input: The input for the custom tool call generated by the model. Required.
    :vartype input: str
    """

    type: Literal[ItemType.CUSTOM_TOOL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool call. Always ``custom_tool_call``. Required. CUSTOM_TOOL_CALL."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the custom tool call in the OpenAI platform."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier used to map this custom tool call to a tool call output. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom tool being called. Required."""
    input: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The input for the custom tool call generated by the model. Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        input: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.CUSTOM_TOOL_CALL  # type: ignore


class ItemCustomToolCallOutput(Item, discriminator="custom_tool_call_output"):
    """Custom tool call output.

    :ivar type: The type of the custom tool call output. Always ``custom_tool_call_output``.
     Required. CUSTOM_TOOL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM_TOOL_CALL_OUTPUT
    :ivar id: The unique ID of the custom tool call output in the OpenAI platform.
    :vartype id: str
    :ivar call_id: The call ID, used to map this custom tool call output to a custom tool call.
     Required.
    :vartype call_id: str
    :ivar output: The output from the custom tool call generated by your code. Can be a string or
     an list of output content. Required. Is either a str type or a
     [FunctionAndCustomToolCallOutput] type.
    :vartype output: str or
     list[~azure.ai.agentserver.responses.models.models.FunctionAndCustomToolCallOutput]
    """

    type: Literal[ItemType.CUSTOM_TOOL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool call output. Always ``custom_tool_call_output``. Required.
     CUSTOM_TOOL_CALL_OUTPUT."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the custom tool call output in the OpenAI platform."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The call ID, used to map this custom tool call output to a custom tool call. Required."""
    output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the custom tool call generated by your code. Can be a string or an list of
     output content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput] type."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]],
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.CUSTOM_TOOL_CALL_OUTPUT  # type: ignore


class ItemFieldApplyPatchToolCall(ItemField, discriminator="apply_patch_call"):
    """Apply patch tool call.

    :ivar type: The type of the item. Always ``apply_patch_call``. Required. APPLY_PATCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH_CALL
    :ivar id: The unique ID of the apply patch tool call. Populated when this item is returned via
     API. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the apply patch tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the apply patch tool call. One of ``in_progress`` or ``completed``.
     Required. Known values are: "in_progress" and "completed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ApplyPatchCallStatus
    :ivar operation: Apply patch operation. Required.
    :vartype operation: ~azure.ai.agentserver.responses.models.models.ApplyPatchFileOperation
    :ivar created_by: The ID of the entity that created this tool call.
    :vartype created_by: str
    """

    type: Literal[ItemFieldType.APPLY_PATCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``apply_patch_call``. Required. APPLY_PATCH_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call. Populated when this item is returned via API.
     Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call generated by the model. Required."""
    status: Union[str, "_models.ApplyPatchCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the apply patch tool call. One of ``in_progress`` or ``completed``. Required.
     Known values are: \"in_progress\" and \"completed\"."""
    operation: "_models.ApplyPatchFileOperation" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Apply patch operation. Required."""
    created_by: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the entity that created this tool call."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        status: Union[str, "_models.ApplyPatchCallStatus"],
        operation: "_models.ApplyPatchFileOperation",
        created_by: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.APPLY_PATCH_CALL  # type: ignore


class ItemFieldApplyPatchToolCallOutput(ItemField, discriminator="apply_patch_call_output"):
    """Apply patch tool call output.

    :ivar type: The type of the item. Always ``apply_patch_call_output``. Required.
     APPLY_PATCH_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH_CALL_OUTPUT
    :ivar id: The unique ID of the apply patch tool call output. Populated when this item is
     returned via API. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the apply patch tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the apply patch tool call output. One of ``completed`` or
     ``failed``. Required. Known values are: "completed" and "failed".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.ApplyPatchCallOutputStatus
    :ivar output:
    :vartype output: str
    :ivar created_by: The ID of the entity that created this tool call output.
    :vartype created_by: str
    """

    type: Literal[ItemFieldType.APPLY_PATCH_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``apply_patch_call_output``. Required. APPLY_PATCH_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call output. Populated when this item is returned via
     API. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call generated by the model. Required."""
    status: Union[str, "_models.ApplyPatchCallOutputStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the apply patch tool call output. One of ``completed`` or ``failed``. Required.
     Known values are: \"completed\" and \"failed\"."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    created_by: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the entity that created this tool call output."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        status: Union[str, "_models.ApplyPatchCallOutputStatus"],
        output: Optional[str] = None,
        created_by: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.APPLY_PATCH_CALL_OUTPUT  # type: ignore


class ItemFieldCodeInterpreterToolCall(ItemField, discriminator="code_interpreter_call"):
    """Code interpreter tool call.

    :ivar type: The type of the code interpreter tool call. Always ``code_interpreter_call``.
     Required. CODE_INTERPRETER_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CODE_INTERPRETER_CALL
    :ivar id: The unique ID of the code interpreter tool call. Required.
    :vartype id: str
    :ivar status: The status of the code interpreter tool call. Valid values are ``in_progress``,
     ``completed``, ``incomplete``, ``interpreting``, and ``failed``. Required. Is one of the
     following types: Literal["in_progress"], Literal["completed"], Literal["incomplete"],
     Literal["interpreting"], Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar container_id: The ID of the container used to run the code. Required.
    :vartype container_id: str
    :ivar code: Required.
    :vartype code: str
    :ivar outputs: Required.
    :vartype outputs: list[~azure.ai.agentserver.responses.models.models.CodeInterpreterOutputLogs
     or ~azure.ai.agentserver.responses.models.models.CodeInterpreterOutputImage]
    """

    type: Literal[ItemFieldType.CODE_INTERPRETER_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the code interpreter tool call. Always ``code_interpreter_call``. Required.
     CODE_INTERPRETER_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the code interpreter tool call. Required."""
    status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the code interpreter tool call. Valid values are ``in_progress``, ``completed``,
     ``incomplete``, ``interpreting``, and ``failed``. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"],
     Literal[\"interpreting\"], Literal[\"failed\"]"""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the container used to run the code. Required."""
    code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    outputs: list[Union["_models.CodeInterpreterOutputLogs", "_models.CodeInterpreterOutputImage"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"],
        container_id: str,
        code: str,
        outputs: list[Union["_models.CodeInterpreterOutputLogs", "_models.CodeInterpreterOutputImage"]],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.CODE_INTERPRETER_CALL  # type: ignore


class ItemFieldCompactionBody(ItemField, discriminator="compaction"):
    """Compaction item.

    :ivar type: The type of the item. Always ``compaction``. Required. COMPACTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPACTION
    :ivar id: The unique ID of the compaction item. Required.
    :vartype id: str
    :ivar encrypted_content: The encrypted content that was produced by compaction. Required.
    :vartype encrypted_content: str
    :ivar created_by: The identifier of the actor that created the item.
    :vartype created_by: str
    """

    type: Literal[ItemFieldType.COMPACTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``compaction``. Required. COMPACTION."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the compaction item. Required."""
    encrypted_content: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The encrypted content that was produced by compaction. Required."""
    created_by: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identifier of the actor that created the item."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        encrypted_content: str,
        created_by: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.COMPACTION  # type: ignore


class ItemFieldComputerToolCall(ItemField, discriminator="computer_call"):
    """Computer tool call.

    :ivar type: The type of the computer call. Always ``computer_call``. Required. COMPUTER_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_CALL
    :ivar id: The unique ID of the computer call. Required.
    :vartype id: str
    :ivar call_id: An identifier used when responding to the tool call with output. Required.
    :vartype call_id: str
    :ivar action: Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.ComputerAction
    :ivar pending_safety_checks: The pending safety checks for the computer call. Required.
    :vartype pending_safety_checks:
     list[~azure.ai.agentserver.responses.models.models.ComputerCallSafetyCheckParam]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemFieldType.COMPUTER_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer call. Always ``computer_call``. Required. COMPUTER_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the computer call. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier used when responding to the tool call with output. Required."""
    action: "_models.ComputerAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    pending_safety_checks: list["_models.ComputerCallSafetyCheckParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The pending safety checks for the computer call. Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.ComputerAction",
        pending_safety_checks: list["_models.ComputerCallSafetyCheckParam"],
        status: Literal["in_progress", "completed", "incomplete"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.COMPUTER_CALL  # type: ignore


class ItemFieldComputerToolCallOutputResource(ItemField, discriminator="computer_call_output"):
    """ItemFieldComputerToolCallOutputResource.

    :ivar type: The type of the computer tool call output. Always ``computer_call_output``.
     Required. COMPUTER_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_CALL_OUTPUT
    :ivar id: The ID of the computer tool call output.
    :vartype id: str
    :ivar call_id: The ID of the computer tool call that produced the output. Required.
    :vartype call_id: str
    :ivar acknowledged_safety_checks: The safety checks reported by the API that have been
     acknowledged by the developer.
    :vartype acknowledged_safety_checks:
     list[~azure.ai.agentserver.responses.models.models.ComputerCallSafetyCheckParam]
    :ivar output: Required.
    :vartype output: ~azure.ai.agentserver.responses.models.models.ComputerScreenshotImage
    :ivar status: The status of the message input. One of ``in_progress``, ``completed``, or
     ``incomplete``. Populated when input items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemFieldType.COMPUTER_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer tool call output. Always ``computer_call_output``. Required.
     COMPUTER_CALL_OUTPUT."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the computer tool call output."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the computer tool call that produced the output. Required."""
    acknowledged_safety_checks: Optional[list["_models.ComputerCallSafetyCheckParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The safety checks reported by the API that have been acknowledged by the developer."""
    output: "_models.ComputerScreenshotImage" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the message input. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when input items are returned via API. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: "_models.ComputerScreenshotImage",
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        acknowledged_safety_checks: Optional[list["_models.ComputerCallSafetyCheckParam"]] = None,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.COMPUTER_CALL_OUTPUT  # type: ignore


class ItemFieldCustomToolCall(ItemField, discriminator="custom_tool_call"):
    """Custom tool call.

    :ivar type: The type of the custom tool call. Always ``custom_tool_call``. Required.
     CUSTOM_TOOL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM_TOOL_CALL
    :ivar id: The unique ID of the custom tool call in the OpenAI platform.
    :vartype id: str
    :ivar call_id: An identifier used to map this custom tool call to a tool call output. Required.
    :vartype call_id: str
    :ivar name: The name of the custom tool being called. Required.
    :vartype name: str
    :ivar input: The input for the custom tool call generated by the model. Required.
    :vartype input: str
    """

    type: Literal[ItemFieldType.CUSTOM_TOOL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool call. Always ``custom_tool_call``. Required. CUSTOM_TOOL_CALL."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the custom tool call in the OpenAI platform."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier used to map this custom tool call to a tool call output. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom tool being called. Required."""
    input: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The input for the custom tool call generated by the model. Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        input: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.CUSTOM_TOOL_CALL  # type: ignore


class ItemFieldCustomToolCallOutput(ItemField, discriminator="custom_tool_call_output"):
    """Custom tool call output.

    :ivar type: The type of the custom tool call output. Always ``custom_tool_call_output``.
     Required. CUSTOM_TOOL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM_TOOL_CALL_OUTPUT
    :ivar id: The unique ID of the custom tool call output in the OpenAI platform.
    :vartype id: str
    :ivar call_id: The call ID, used to map this custom tool call output to a custom tool call.
     Required.
    :vartype call_id: str
    :ivar output: The output from the custom tool call generated by your code. Can be a string or
     an list of output content. Required. Is either a str type or a
     [FunctionAndCustomToolCallOutput] type.
    :vartype output: str or
     list[~azure.ai.agentserver.responses.models.models.FunctionAndCustomToolCallOutput]
    """

    type: Literal[ItemFieldType.CUSTOM_TOOL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool call output. Always ``custom_tool_call_output``. Required.
     CUSTOM_TOOL_CALL_OUTPUT."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the custom tool call output in the OpenAI platform."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The call ID, used to map this custom tool call output to a custom tool call. Required."""
    output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the custom tool call generated by your code. Can be a string or an list of
     output content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput] type."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]],
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.CUSTOM_TOOL_CALL_OUTPUT  # type: ignore


class ItemFieldFileSearchToolCall(ItemField, discriminator="file_search_call"):
    """File search tool call.

    :ivar id: The unique ID of the file search tool call. Required.
    :vartype id: str
    :ivar type: The type of the file search tool call. Always ``file_search_call``. Required.
     FILE_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_SEARCH_CALL
    :ivar status: The status of the file search tool call. One of ``in_progress``, ``searching``,
     ``incomplete`` or ``failed``,. Required. Is one of the following types: Literal["in_progress"],
     Literal["searching"], Literal["completed"], Literal["incomplete"], Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar queries: The queries used to search for files. Required.
    :vartype queries: list[str]
    :ivar results:
    :vartype results: list[~azure.ai.agentserver.responses.models.models.FileSearchToolCallResults]
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the file search tool call. Required."""
    type: Literal[ItemFieldType.FILE_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the file search tool call. Always ``file_search_call``. Required. FILE_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "incomplete", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the file search tool call. One of ``in_progress``, ``searching``, ``incomplete``
     or ``failed``,. Required. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"searching\"], Literal[\"completed\"], Literal[\"incomplete\"], Literal[\"failed\"]"""
    queries: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The queries used to search for files. Required."""
    results: Optional[list["_models.FileSearchToolCallResults"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "searching", "completed", "incomplete", "failed"],
        queries: list[str],
        results: Optional[list["_models.FileSearchToolCallResults"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.FILE_SEARCH_CALL  # type: ignore


class ItemFieldFunctionShellCall(ItemField, discriminator="shell_call"):
    """Shell tool call.

    :ivar type: The type of the item. Always ``shell_call``. Required. SHELL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL_CALL
    :ivar id: The unique ID of the shell tool call. Populated when this item is returned via API.
     Required.
    :vartype id: str
    :ivar call_id: The unique ID of the shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar action: The shell commands and limits that describe how to run the tool call. Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.FunctionShellAction
    :ivar status: The status of the shell call. One of ``in_progress``, ``completed``, or
     ``incomplete``. Required. Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.LocalShellCallStatus
    :ivar environment: Required.
    :vartype environment:
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallEnvironment
    :ivar created_by: The ID of the entity that created this tool call.
    :vartype created_by: str
    """

    type: Literal[ItemFieldType.SHELL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``shell_call``. Required. SHELL_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call. Populated when this item is returned via API. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call generated by the model. Required."""
    action: "_models.FunctionShellAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The shell commands and limits that describe how to run the tool call. Required."""
    status: Union[str, "_models.LocalShellCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the shell call. One of ``in_progress``, ``completed``, or ``incomplete``.
     Required. Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""
    environment: "_models.FunctionShellCallEnvironment" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""
    created_by: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the entity that created this tool call."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.FunctionShellAction",
        status: Union[str, "_models.LocalShellCallStatus"],
        environment: "_models.FunctionShellCallEnvironment",
        created_by: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.SHELL_CALL  # type: ignore


class ItemFieldFunctionShellCallOutput(ItemField, discriminator="shell_call_output"):
    """Shell call output.

    :ivar type: The type of the shell call output. Always ``shell_call_output``. Required.
     SHELL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL_CALL_OUTPUT
    :ivar id: The unique ID of the shell call output. Populated when this item is returned via API.
     Required.
    :vartype id: str
    :ivar call_id: The unique ID of the shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the shell call output. One of ``in_progress``, ``completed``, or
     ``incomplete``. Required. Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.LocalShellCallOutputStatusEnum
    :ivar output: An array of shell call output contents. Required.
    :vartype output:
     list[~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputContent]
    :ivar max_output_length: Required.
    :vartype max_output_length: int
    :ivar created_by: The identifier of the actor that created the item.
    :vartype created_by: str
    """

    type: Literal[ItemFieldType.SHELL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the shell call output. Always ``shell_call_output``. Required. SHELL_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell call output. Populated when this item is returned via API. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call generated by the model. Required."""
    status: Union[str, "_models.LocalShellCallOutputStatusEnum"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the shell call output. One of ``in_progress``, ``completed``, or ``incomplete``.
     Required. Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""
    output: list["_models.FunctionShellCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of shell call output contents. Required."""
    max_output_length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    created_by: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The identifier of the actor that created the item."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        status: Union[str, "_models.LocalShellCallOutputStatusEnum"],
        output: list["_models.FunctionShellCallOutputContent"],
        max_output_length: int,
        created_by: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.SHELL_CALL_OUTPUT  # type: ignore


class ItemFieldFunctionToolCall(ItemField, discriminator="function_call"):
    """Function tool call.

    :ivar id: The unique ID of the function tool call.
    :vartype id: str
    :ivar type: The type of the function tool call. Always ``function_call``. Required.
     FUNCTION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION_CALL
    :ivar call_id: The unique ID of the function tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the function to run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments to pass to the function. Required.
    :vartype arguments: str
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call."""
    type: Literal[ItemFieldType.FUNCTION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool call. Always ``function_call``. Required. FUNCTION_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the function. Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        arguments: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.FUNCTION_CALL  # type: ignore


class ItemFieldImageGenToolCall(ItemField, discriminator="image_generation_call"):
    """Image generation call.

    :ivar type: The type of the image generation call. Always ``image_generation_call``. Required.
     IMAGE_GENERATION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.IMAGE_GENERATION_CALL
    :ivar id: The unique ID of the image generation call. Required.
    :vartype id: str
    :ivar status: The status of the image generation call. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["generating"], Literal["failed"]
    :vartype status: str or str or str or str
    :ivar result: Required.
    :vartype result: str
    """

    type: Literal[ItemFieldType.IMAGE_GENERATION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the image generation call. Always ``image_generation_call``. Required.
     IMAGE_GENERATION_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the image generation call. Required."""
    status: Literal["in_progress", "completed", "generating", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the image generation call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"generating\"], Literal[\"failed\"]"""
    result: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "completed", "generating", "failed"],
        result: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.IMAGE_GENERATION_CALL  # type: ignore


class ItemFieldLocalShellToolCall(ItemField, discriminator="local_shell_call"):
    """Local shell call.

    :ivar type: The type of the local shell call. Always ``local_shell_call``. Required.
     LOCAL_SHELL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL_CALL
    :ivar id: The unique ID of the local shell call. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the local shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar action: Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.LocalShellExecAction
    :ivar status: The status of the local shell call. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemFieldType.LOCAL_SHELL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell call. Always ``local_shell_call``. Required. LOCAL_SHELL_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell call. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell tool call generated by the model. Required."""
    action: "_models.LocalShellExecAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the local shell call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.LocalShellExecAction",
        status: Literal["in_progress", "completed", "incomplete"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.LOCAL_SHELL_CALL  # type: ignore


class ItemFieldLocalShellToolCallOutput(ItemField, discriminator="local_shell_call_output"):
    """Local shell call output.

    :ivar type: The type of the local shell tool call output. Always ``local_shell_call_output``.
     Required. LOCAL_SHELL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL_CALL_OUTPUT
    :ivar id: The unique ID of the local shell tool call generated by the model. Required.
    :vartype id: str
    :ivar output: A JSON string of the output of the local shell tool call. Required.
    :vartype output: str
    :ivar status: Is one of the following types: Literal["in_progress"], Literal["completed"],
     Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemFieldType.LOCAL_SHELL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell tool call output. Always ``local_shell_call_output``. Required.
     LOCAL_SHELL_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell tool call generated by the model. Required."""
    output: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the output of the local shell tool call. Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"in_progress\"], Literal[\"completed\"],
     Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        output: str,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.LOCAL_SHELL_CALL_OUTPUT  # type: ignore


class ItemFieldMcpApprovalRequest(ItemField, discriminator="mcp_approval_request"):
    """MCP approval request.

    :ivar type: The type of the item. Always ``mcp_approval_request``. Required.
     MCP_APPROVAL_REQUEST.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_APPROVAL_REQUEST
    :ivar id: The unique ID of the approval request. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server making the request. Required.
    :vartype server_label: str
    :ivar name: The name of the tool to run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of arguments for the tool. Required.
    :vartype arguments: str
    """

    type: Literal[ItemFieldType.MCP_APPROVAL_REQUEST] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_approval_request``. Required. MCP_APPROVAL_REQUEST."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the approval request. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server making the request. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool to run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of arguments for the tool. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        name: str,
        arguments: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.MCP_APPROVAL_REQUEST  # type: ignore


class ItemFieldMcpApprovalResponseResource(ItemField, discriminator="mcp_approval_response"):
    """MCP approval response.

    :ivar type: The type of the item. Always ``mcp_approval_response``. Required.
     MCP_APPROVAL_RESPONSE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_APPROVAL_RESPONSE
    :ivar id: The unique ID of the approval response. Required.
    :vartype id: str
    :ivar approval_request_id: The ID of the approval request being answered. Required.
    :vartype approval_request_id: str
    :ivar approve: Whether the request was approved. Required.
    :vartype approve: bool
    :ivar reason:
    :vartype reason: str
    """

    type: Literal[ItemFieldType.MCP_APPROVAL_RESPONSE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_approval_response``. Required. MCP_APPROVAL_RESPONSE."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the approval response. Required."""
    approval_request_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the approval request being answered. Required."""
    approve: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether the request was approved. Required."""
    reason: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        approval_request_id: str,
        approve: bool,
        reason: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.MCP_APPROVAL_RESPONSE  # type: ignore


class ItemFieldMcpListTools(ItemField, discriminator="mcp_list_tools"):
    """MCP list tools.

    :ivar type: The type of the item. Always ``mcp_list_tools``. Required. MCP_LIST_TOOLS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_LIST_TOOLS
    :ivar id: The unique ID of the list. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server. Required.
    :vartype server_label: str
    :ivar tools: The tools available on the server. Required.
    :vartype tools: list[~azure.ai.agentserver.responses.models.models.MCPListToolsTool]
    :ivar error:
    :vartype error: str
    """

    type: Literal[ItemFieldType.MCP_LIST_TOOLS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_list_tools``. Required. MCP_LIST_TOOLS."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the list. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server. Required."""
    tools: list["_models.MCPListToolsTool"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The tools available on the server. Required."""
    error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        tools: list["_models.MCPListToolsTool"],
        error: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.MCP_LIST_TOOLS  # type: ignore


class ItemFieldMcpToolCall(ItemField, discriminator="mcp_call"):
    """MCP tool call.

    :ivar type: The type of the item. Always ``mcp_call``. Required. MCP_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_CALL
    :ivar id: The unique ID of the tool call. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server running the tool. Required.
    :vartype server_label: str
    :ivar name: The name of the tool that was run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments passed to the tool. Required.
    :vartype arguments: str
    :ivar output:
    :vartype output: str
    :ivar error:
    :vartype error: dict[str, any]
    :ivar status: The status of the tool call. One of ``in_progress``, ``completed``,
     ``incomplete``, ``calling``, or ``failed``. Known values are: "in_progress", "completed",
     "incomplete", "calling", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.MCPToolCallStatus
    :ivar approval_request_id:
    :vartype approval_request_id: str
    """

    type: Literal[ItemFieldType.MCP_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_call``. Required. MCP_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server running the tool. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool that was run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments passed to the tool. Required."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    error: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    status: Optional[Union[str, "_models.MCPToolCallStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. One of ``in_progress``, ``completed``, ``incomplete``,
     ``calling``, or ``failed``. Known values are: \"in_progress\", \"completed\", \"incomplete\",
     \"calling\", and \"failed\"."""
    approval_request_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        name: str,
        arguments: str,
        output: Optional[str] = None,
        error: Optional[dict[str, Any]] = None,
        status: Optional[Union[str, "_models.MCPToolCallStatus"]] = None,
        approval_request_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.MCP_CALL  # type: ignore


class ItemFieldMessage(ItemField, discriminator="message"):
    """Message.

    :ivar type: The type of the message. Always set to ``message``. Required. MESSAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MESSAGE
    :ivar id: The unique ID of the message. Required.
    :vartype id: str
    :ivar status: The status of item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Required. Known values are: "in_progress",
     "completed", and "incomplete".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.MessageStatus
    :ivar role: The role of the message. One of ``unknown``, ``user``, ``assistant``, ``system``,
     ``critic``, ``discriminator``, ``developer``, or ``tool``. Required. Known values are:
     "unknown", "user", "assistant", "system", "critic", "discriminator", "developer", and "tool".
    :vartype role: str or ~azure.ai.agentserver.responses.models.models.MessageRole
    :ivar content: The content of the message. Required.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.MessageContent]
    """

    type: Literal[ItemFieldType.MESSAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the message. Always set to ``message``. Required. MESSAGE."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the message. Required."""
    status: Union[str, "_models.MessageStatus"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The status of item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated when
     items are returned via API. Required. Known values are: \"in_progress\", \"completed\", and
     \"incomplete\"."""
    role: Union[str, "_models.MessageRole"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role of the message. One of ``unknown``, ``user``, ``assistant``, ``system``, ``critic``,
     ``discriminator``, ``developer``, or ``tool``. Required. Known values are: \"unknown\",
     \"user\", \"assistant\", \"system\", \"critic\", \"discriminator\", \"developer\", and
     \"tool\"."""
    content: list["_models.MessageContent"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content of the message. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Union[str, "_models.MessageStatus"],
        role: Union[str, "_models.MessageRole"],
        content: list["_models.MessageContent"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.MESSAGE  # type: ignore


class ItemFieldReasoningItem(ItemField, discriminator="reasoning"):
    """Reasoning.

    :ivar type: The type of the object. Always ``reasoning``. Required. REASONING.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REASONING
    :ivar id: The unique identifier of the reasoning content. Required.
    :vartype id: str
    :ivar encrypted_content:
    :vartype encrypted_content: str
    :ivar summary: Reasoning summary content. Required.
    :vartype summary: list[~azure.ai.agentserver.responses.models.models.SummaryTextContent]
    :ivar content: Reasoning text content.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.ReasoningTextContent]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemFieldType.REASONING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the object. Always ``reasoning``. Required. REASONING."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the reasoning content. Required."""
    encrypted_content: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    summary: list["_models.SummaryTextContent"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Reasoning summary content. Required."""
    content: Optional[list["_models.ReasoningTextContent"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Reasoning text content."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        summary: list["_models.SummaryTextContent"],
        encrypted_content: Optional[str] = None,
        content: Optional[list["_models.ReasoningTextContent"]] = None,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.REASONING  # type: ignore


class ItemFieldWebSearchToolCall(ItemField, discriminator="web_search_call"):
    """Web search tool call.

    :ivar id: The unique ID of the web search tool call. Required.
    :vartype id: str
    :ivar type: The type of the web search tool call. Always ``web_search_call``. Required.
     WEB_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WEB_SEARCH_CALL
    :ivar status: The status of the web search tool call. Required. Is one of the following types:
     Literal["in_progress"], Literal["searching"], Literal["completed"], Literal["failed"]
    :vartype status: str or str or str or str
    :ivar action: An object describing the specific action taken in this web search call. Includes
     details on how the model used the web (search, open_page, find_in_page). Required. Is one of
     the following types: WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind
    :vartype action: ~azure.ai.agentserver.responses.models.models.WebSearchActionSearch or
     ~azure.ai.agentserver.responses.models.models.WebSearchActionOpenPage or
     ~azure.ai.agentserver.responses.models.models.WebSearchActionFind
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the web search tool call. Required."""
    type: Literal[ItemFieldType.WEB_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the web search tool call. Always ``web_search_call``. Required. WEB_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the web search tool call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"searching\"], Literal[\"completed\"], Literal[\"failed\"]"""
    action: Union["_models.WebSearchActionSearch", "_models.WebSearchActionOpenPage", "_models.WebSearchActionFind"] = (
        rest_field(visibility=["read", "create", "update", "delete", "query"])
    )
    """An object describing the specific action taken in this web search call. Includes details on how
     the model used the web (search, open_page, find_in_page). Required. Is one of the following
     types: WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "searching", "completed", "failed"],
        action: Union[
            "_models.WebSearchActionSearch", "_models.WebSearchActionOpenPage", "_models.WebSearchActionFind"
        ],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemFieldType.WEB_SEARCH_CALL  # type: ignore


class ItemFileSearchToolCall(Item, discriminator="file_search_call"):
    """File search tool call.

    :ivar id: The unique ID of the file search tool call. Required.
    :vartype id: str
    :ivar type: The type of the file search tool call. Always ``file_search_call``. Required.
     FILE_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_SEARCH_CALL
    :ivar status: The status of the file search tool call. One of ``in_progress``, ``searching``,
     ``incomplete`` or ``failed``,. Required. Is one of the following types: Literal["in_progress"],
     Literal["searching"], Literal["completed"], Literal["incomplete"], Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar queries: The queries used to search for files. Required.
    :vartype queries: list[str]
    :ivar results:
    :vartype results: list[~azure.ai.agentserver.responses.models.models.FileSearchToolCallResults]
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the file search tool call. Required."""
    type: Literal[ItemType.FILE_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the file search tool call. Always ``file_search_call``. Required. FILE_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "incomplete", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the file search tool call. One of ``in_progress``, ``searching``, ``incomplete``
     or ``failed``,. Required. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"searching\"], Literal[\"completed\"], Literal[\"incomplete\"], Literal[\"failed\"]"""
    queries: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The queries used to search for files. Required."""
    results: Optional[list["_models.FileSearchToolCallResults"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "searching", "completed", "incomplete", "failed"],
        queries: list[str],
        results: Optional[list["_models.FileSearchToolCallResults"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.FILE_SEARCH_CALL  # type: ignore


class ItemFunctionToolCall(Item, discriminator="function_call"):
    """Function tool call.

    :ivar id: The unique ID of the function tool call.
    :vartype id: str
    :ivar type: The type of the function tool call. Always ``function_call``. Required.
     FUNCTION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION_CALL
    :ivar call_id: The unique ID of the function tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the function to run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments to pass to the function. Required.
    :vartype arguments: str
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call."""
    type: Literal[ItemType.FUNCTION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool call. Always ``function_call``. Required. FUNCTION_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the function. Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        arguments: str,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.FUNCTION_CALL  # type: ignore


class ItemImageGenToolCall(Item, discriminator="image_generation_call"):
    """Image generation call.

    :ivar type: The type of the image generation call. Always ``image_generation_call``. Required.
     IMAGE_GENERATION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.IMAGE_GENERATION_CALL
    :ivar id: The unique ID of the image generation call. Required.
    :vartype id: str
    :ivar status: The status of the image generation call. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["generating"], Literal["failed"]
    :vartype status: str or str or str or str
    :ivar result: Required.
    :vartype result: str
    """

    type: Literal[ItemType.IMAGE_GENERATION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the image generation call. Always ``image_generation_call``. Required.
     IMAGE_GENERATION_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the image generation call. Required."""
    status: Literal["in_progress", "completed", "generating", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the image generation call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"generating\"], Literal[\"failed\"]"""
    result: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "completed", "generating", "failed"],
        result: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.IMAGE_GENERATION_CALL  # type: ignore


class ItemLocalShellToolCall(Item, discriminator="local_shell_call"):
    """Local shell call.

    :ivar type: The type of the local shell call. Always ``local_shell_call``. Required.
     LOCAL_SHELL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL_CALL
    :ivar id: The unique ID of the local shell call. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the local shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar action: Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.LocalShellExecAction
    :ivar status: The status of the local shell call. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemType.LOCAL_SHELL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell call. Always ``local_shell_call``. Required. LOCAL_SHELL_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell call. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell tool call generated by the model. Required."""
    action: "_models.LocalShellExecAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the local shell call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.LocalShellExecAction",
        status: Literal["in_progress", "completed", "incomplete"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.LOCAL_SHELL_CALL  # type: ignore


class ItemLocalShellToolCallOutput(Item, discriminator="local_shell_call_output"):
    """Local shell call output.

    :ivar type: The type of the local shell tool call output. Always ``local_shell_call_output``.
     Required. LOCAL_SHELL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL_CALL_OUTPUT
    :ivar id: The unique ID of the local shell tool call generated by the model. Required.
    :vartype id: str
    :ivar output: A JSON string of the output of the local shell tool call. Required.
    :vartype output: str
    :ivar status: Is one of the following types: Literal["in_progress"], Literal["completed"],
     Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemType.LOCAL_SHELL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell tool call output. Always ``local_shell_call_output``. Required.
     LOCAL_SHELL_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell tool call generated by the model. Required."""
    output: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the output of the local shell tool call. Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"in_progress\"], Literal[\"completed\"],
     Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        output: str,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.LOCAL_SHELL_CALL_OUTPUT  # type: ignore


class ItemMcpApprovalRequest(Item, discriminator="mcp_approval_request"):
    """MCP approval request.

    :ivar type: The type of the item. Always ``mcp_approval_request``. Required.
     MCP_APPROVAL_REQUEST.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_APPROVAL_REQUEST
    :ivar id: The unique ID of the approval request. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server making the request. Required.
    :vartype server_label: str
    :ivar name: The name of the tool to run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of arguments for the tool. Required.
    :vartype arguments: str
    """

    type: Literal[ItemType.MCP_APPROVAL_REQUEST] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_approval_request``. Required. MCP_APPROVAL_REQUEST."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the approval request. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server making the request. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool to run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of arguments for the tool. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        name: str,
        arguments: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.MCP_APPROVAL_REQUEST  # type: ignore


class ItemMcpListTools(Item, discriminator="mcp_list_tools"):
    """MCP list tools.

    :ivar type: The type of the item. Always ``mcp_list_tools``. Required. MCP_LIST_TOOLS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_LIST_TOOLS
    :ivar id: The unique ID of the list. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server. Required.
    :vartype server_label: str
    :ivar tools: The tools available on the server. Required.
    :vartype tools: list[~azure.ai.agentserver.responses.models.models.MCPListToolsTool]
    :ivar error:
    :vartype error: str
    """

    type: Literal[ItemType.MCP_LIST_TOOLS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_list_tools``. Required. MCP_LIST_TOOLS."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the list. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server. Required."""
    tools: list["_models.MCPListToolsTool"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The tools available on the server. Required."""
    error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        tools: list["_models.MCPListToolsTool"],
        error: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.MCP_LIST_TOOLS  # type: ignore


class ItemMcpToolCall(Item, discriminator="mcp_call"):
    """MCP tool call.

    :ivar type: The type of the item. Always ``mcp_call``. Required. MCP_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_CALL
    :ivar id: The unique ID of the tool call. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server running the tool. Required.
    :vartype server_label: str
    :ivar name: The name of the tool that was run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments passed to the tool. Required.
    :vartype arguments: str
    :ivar output:
    :vartype output: str
    :ivar error:
    :vartype error: dict[str, any]
    :ivar status: The status of the tool call. One of ``in_progress``, ``completed``,
     ``incomplete``, ``calling``, or ``failed``. Known values are: "in_progress", "completed",
     "incomplete", "calling", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.MCPToolCallStatus
    :ivar approval_request_id:
    :vartype approval_request_id: str
    """

    type: Literal[ItemType.MCP_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_call``. Required. MCP_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server running the tool. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool that was run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments passed to the tool. Required."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    error: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    status: Optional[Union[str, "_models.MCPToolCallStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. One of ``in_progress``, ``completed``, ``incomplete``,
     ``calling``, or ``failed``. Known values are: \"in_progress\", \"completed\", \"incomplete\",
     \"calling\", and \"failed\"."""
    approval_request_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        name: str,
        arguments: str,
        output: Optional[str] = None,
        error: Optional[dict[str, Any]] = None,
        status: Optional[Union[str, "_models.MCPToolCallStatus"]] = None,
        approval_request_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.MCP_CALL  # type: ignore


class ItemMessage(Item, discriminator="message"):
    """Message.

    :ivar type: The type of the message. Always set to ``message``. Required. MESSAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MESSAGE
    :ivar role: The role of the message. One of ``unknown``, ``user``, ``assistant``, ``system``,
     ``critic``, ``discriminator``, ``developer``, or ``tool``. Required. Known values are:
     "unknown", "user", "assistant", "system", "critic", "discriminator", "developer", and "tool".
    :vartype role: str or ~azure.ai.agentserver.responses.models.models.MessageRole
    :ivar content: Required. Is either a str type or a [MessageContent] type.
    :vartype content: str or list[~azure.ai.agentserver.responses.models.models.MessageContent]
    """

    type: Literal[ItemType.MESSAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the message. Always set to ``message``. Required. MESSAGE."""
    role: Union[str, "_models.MessageRole"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role of the message. One of ``unknown``, ``user``, ``assistant``, ``system``, ``critic``,
     ``discriminator``, ``developer``, or ``tool``. Required. Known values are: \"unknown\",
     \"user\", \"assistant\", \"system\", \"critic\", \"discriminator\", \"developer\", and
     \"tool\"."""
    content: Union[str, list["_models.MessageContent"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Is either a str type or a [MessageContent] type."""

    @overload
    def __init__(
        self,
        *,
        role: Union[str, "_models.MessageRole"],
        content: Union[str, list["_models.MessageContent"]],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.MESSAGE  # type: ignore


class ItemOutputMessage(Item, discriminator="output_message"):
    """Output message.

    :ivar id: The unique ID of the output message. Required.
    :vartype id: str
    :ivar type: The type of the output message. Always ``message``. Required. OUTPUT_MESSAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OUTPUT_MESSAGE
    :ivar role: The role of the output message. Always ``assistant``. Required. Default value is
     "assistant".
    :vartype role: str
    :ivar content: The content of the output message. Required.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.OutputMessageContent]
    :ivar status: The status of the message input. One of ``in_progress``, ``completed``, or
     ``incomplete``. Populated when input items are returned via API. Required. Is one of the
     following types: Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the output message. Required."""
    type: Literal[ItemType.OUTPUT_MESSAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the output message. Always ``message``. Required. OUTPUT_MESSAGE."""
    role: Literal["assistant"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role of the output message. Always ``assistant``. Required. Default value is \"assistant\"."""
    content: list["_models.OutputMessageContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The content of the output message. Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the message input. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when input items are returned via API. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        content: list["_models.OutputMessageContent"],
        status: Literal["in_progress", "completed", "incomplete"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.OUTPUT_MESSAGE  # type: ignore
        self.role: Literal["assistant"] = "assistant"


class ItemReasoningItem(Item, discriminator="reasoning"):
    """Reasoning.

    :ivar type: The type of the object. Always ``reasoning``. Required. REASONING.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REASONING
    :ivar id: The unique identifier of the reasoning content. Required.
    :vartype id: str
    :ivar encrypted_content:
    :vartype encrypted_content: str
    :ivar summary: Reasoning summary content. Required.
    :vartype summary: list[~azure.ai.agentserver.responses.models.models.SummaryTextContent]
    :ivar content: Reasoning text content.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.ReasoningTextContent]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[ItemType.REASONING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the object. Always ``reasoning``. Required. REASONING."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the reasoning content. Required."""
    encrypted_content: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    summary: list["_models.SummaryTextContent"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Reasoning summary content. Required."""
    content: Optional[list["_models.ReasoningTextContent"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Reasoning text content."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        summary: list["_models.SummaryTextContent"],
        encrypted_content: Optional[str] = None,
        content: Optional[list["_models.ReasoningTextContent"]] = None,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.REASONING  # type: ignore


class ItemReferenceParam(Item, discriminator="item_reference"):
    """Item reference.

    :ivar type: The type of item to reference. Always ``item_reference``. Required. ITEM_REFERENCE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ITEM_REFERENCE
    :ivar id: The ID of the item to reference. Required.
    :vartype id: str
    """

    type: Literal[ItemType.ITEM_REFERENCE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of item to reference. Always ``item_reference``. Required. ITEM_REFERENCE."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item to reference. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.ITEM_REFERENCE  # type: ignore


class ItemWebSearchToolCall(Item, discriminator="web_search_call"):
    """Web search tool call.

    :ivar id: The unique ID of the web search tool call. Required.
    :vartype id: str
    :ivar type: The type of the web search tool call. Always ``web_search_call``. Required.
     WEB_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WEB_SEARCH_CALL
    :ivar status: The status of the web search tool call. Required. Is one of the following types:
     Literal["in_progress"], Literal["searching"], Literal["completed"], Literal["failed"]
    :vartype status: str or str or str or str
    :ivar action: An object describing the specific action taken in this web search call. Includes
     details on how the model used the web (search, open_page, find_in_page). Required. Is one of
     the following types: WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind
    :vartype action: ~azure.ai.agentserver.responses.models.models.WebSearchActionSearch or
     ~azure.ai.agentserver.responses.models.models.WebSearchActionOpenPage or
     ~azure.ai.agentserver.responses.models.models.WebSearchActionFind
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the web search tool call. Required."""
    type: Literal[ItemType.WEB_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the web search tool call. Always ``web_search_call``. Required. WEB_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the web search tool call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"searching\"], Literal[\"completed\"], Literal[\"failed\"]"""
    action: Union["_models.WebSearchActionSearch", "_models.WebSearchActionOpenPage", "_models.WebSearchActionFind"] = (
        rest_field(visibility=["read", "create", "update", "delete", "query"])
    )
    """An object describing the specific action taken in this web search call. Includes details on how
     the model used the web (search, open_page, find_in_page). Required. Is one of the following
     types: WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "searching", "completed", "failed"],
        action: Union[
            "_models.WebSearchActionSearch", "_models.WebSearchActionOpenPage", "_models.WebSearchActionFind"
        ],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.WEB_SEARCH_CALL  # type: ignore


class KeyPressAction(ComputerAction, discriminator="keypress"):
    """KeyPress.

    :ivar type: Specifies the event type. For a keypress action, this property is always set to
     ``keypress``. Required. KEYPRESS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.KEYPRESS
    :ivar keys_property: The combination of keys the model is requesting to be pressed. This is an
     array of strings, each representing a key. Required.
    :vartype keys_property: list[str]
    """

    type: Literal[ComputerActionType.KEYPRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a keypress action, this property is always set to ``keypress``.
     Required. KEYPRESS."""
    keys_property: list[str] = rest_field(
        name="keys", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="keys"
    )
    """The combination of keys the model is requesting to be pressed. This is an array of strings,
     each representing a key. Required."""

    @overload
    def __init__(
        self,
        *,
        keys_property: list[str],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.KEYPRESS  # type: ignore


class LocalEnvironmentResource(FunctionShellCallEnvironment, discriminator="local"):
    """Local Environment.

    :ivar type: The environment type. Always ``local``. Required. LOCAL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL
    """

    type: Literal[FunctionShellCallEnvironmentType.LOCAL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The environment type. Always ``local``. Required. LOCAL."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = FunctionShellCallEnvironmentType.LOCAL  # type: ignore


class LocalShellExecAction(_Model):
    """Local shell exec action.

    :ivar type: The type of the local shell action. Always ``exec``. Required. Default value is
     "exec".
    :vartype type: str
    :ivar command: The command to run. Required.
    :vartype command: list[str]
    :ivar timeout_ms:
    :vartype timeout_ms: int
    :ivar working_directory:
    :vartype working_directory: str
    :ivar env: Environment variables to set for the command. Required.
    :vartype env: dict[str, str]
    :ivar user:
    :vartype user: str
    """

    type: Literal["exec"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the local shell action. Always ``exec``. Required. Default value is \"exec\"."""
    command: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The command to run. Required."""
    timeout_ms: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    working_directory: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    env: dict[str, str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Environment variables to set for the command. Required."""
    user: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        command: list[str],
        env: dict[str, str],
        timeout_ms: Optional[int] = None,
        working_directory: Optional[str] = None,
        user: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["exec"] = "exec"


class LocalShellToolParam(Tool, discriminator="local_shell"):
    """Local shell tool.

    :ivar type: The type of the local shell tool. Always ``local_shell``. Required. LOCAL_SHELL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    """

    type: Literal[ToolType.LOCAL_SHELL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell tool. Always ``local_shell``. Required. LOCAL_SHELL."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.LOCAL_SHELL  # type: ignore


class LocalSkillParam(_Model):
    """LocalSkillParam.

    :ivar name: The name of the skill. Required.
    :vartype name: str
    :ivar description: The description of the skill. Required.
    :vartype description: str
    :ivar path: The path to the directory containing the skill. Required.
    :vartype path: str
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the skill. Required."""
    description: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The description of the skill. Required."""
    path: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The path to the directory containing the skill. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        description: str,
        path: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class LogProb(_Model):
    """Log probability.

    :ivar token: Required.
    :vartype token: str
    :ivar logprob: Required.
    :vartype logprob: int
    :ivar bytes: Required.
    :vartype bytes: list[int]
    :ivar top_logprobs: Required.
    :vartype top_logprobs: list[~azure.ai.agentserver.responses.models.models.TopLogProb]
    """

    token: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    logprob: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    bytes: list[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    top_logprobs: list["_models.TopLogProb"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        token: str,
        logprob: int,
        bytes: list[int],
        top_logprobs: list["_models.TopLogProb"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MCPApprovalResponse(Item, discriminator="mcp_approval_response"):
    """MCP approval response.

    :ivar type: The type of the item. Always ``mcp_approval_response``. Required.
     MCP_APPROVAL_RESPONSE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_APPROVAL_RESPONSE
    :ivar id:
    :vartype id: str
    :ivar approval_request_id: The ID of the approval request being answered. Required.
    :vartype approval_request_id: str
    :ivar approve: Whether the request was approved. Required.
    :vartype approve: bool
    :ivar reason:
    :vartype reason: str
    """

    type: Literal[ItemType.MCP_APPROVAL_RESPONSE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_approval_response``. Required. MCP_APPROVAL_RESPONSE."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    approval_request_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the approval request being answered. Required."""
    approve: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether the request was approved. Required."""
    reason: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        approval_request_id: str,
        approve: bool,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        reason: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.MCP_APPROVAL_RESPONSE  # type: ignore


class MCPListToolsTool(_Model):
    """MCP list tools tool.

    :ivar name: The name of the tool. Required.
    :vartype name: str
    :ivar description:
    :vartype description: str
    :ivar input_schema: The JSON schema describing the tool's input. Required.
    :vartype input_schema:
     ~azure.ai.agentserver.responses.models.models.MCPListToolsToolInputSchema
    :ivar annotations:
    :vartype annotations: ~azure.ai.agentserver.responses.models.models.MCPListToolsToolAnnotations
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    input_schema: "_models.MCPListToolsToolInputSchema" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The JSON schema describing the tool's input. Required."""
    annotations: Optional["_models.MCPListToolsToolAnnotations"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        name: str,
        input_schema: "_models.MCPListToolsToolInputSchema",
        description: Optional[str] = None,
        annotations: Optional["_models.MCPListToolsToolAnnotations"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MCPListToolsToolAnnotations(_Model):
    """MCPListToolsToolAnnotations."""


class MCPListToolsToolInputSchema(_Model):
    """MCPListToolsToolInputSchema."""


class MCPTool(Tool, discriminator="mcp"):
    """MCP tool.

    :ivar type: The type of the MCP tool. Always ``mcp``. Required. MCP.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP
    :ivar server_label: A label for this MCP server, used to identify it in tool calls. Required.
    :vartype server_label: str
    :ivar server_url: The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be
     provided.
    :vartype server_url: str
    :ivar connector_id: Identifier for service connectors, like those available in ChatGPT. One of
     ``server_url`` or ``connector_id`` must be provided. Learn more about service connectors `here
     </docs/guides/tools-remote-mcp#connectors>`_. Currently supported ``connector_id`` values are:

     * Dropbox: `connector_dropbox`
     * Gmail: `connector_gmail`
     * Google Calendar: `connector_googlecalendar`
     * Google Drive: `connector_googledrive`
     * Microsoft Teams: `connector_microsoftteams`
     * Outlook Calendar: `connector_outlookcalendar`
     * Outlook Email: `connector_outlookemail`
     * SharePoint: `connector_sharepoint`. Is one of the following types:
       Literal["connector_dropbox"], Literal["connector_gmail"], Literal["connector_googlecalendar"],
       Literal["connector_googledrive"], Literal["connector_microsoftteams"],
       Literal["connector_outlookcalendar"], Literal["connector_outlookemail"],
       Literal["connector_sharepoint"]
    :vartype connector_id: str or str or str or str or str or str or str or str
    :ivar authorization: An OAuth access token that can be used with a remote MCP server, either
     with a custom MCP server URL or a service connector. Your application must handle the OAuth
     authorization flow and provide the token here.
    :vartype authorization: str
    :ivar server_description: Optional description of the MCP server, used to provide more context.
    :vartype server_description: str
    :ivar headers:
    :vartype headers: dict[str, str]
    :ivar allowed_tools: Is either a [str] type or a MCPToolFilter type.
    :vartype allowed_tools: list[str] or
     ~azure.ai.agentserver.responses.models.models.MCPToolFilter
    :ivar require_approval: Is one of the following types: MCPToolRequireApproval,
     Literal["always"], Literal["never"]
    :vartype require_approval: ~azure.ai.agentserver.responses.models.models.MCPToolRequireApproval
     or str or str
    :ivar project_connection_id: The connection ID in the project for the MCP server. The
     connection stores authentication and other connection details needed to connect to the MCP
     server.
    :vartype project_connection_id: str
    """

    type: Literal[ToolType.MCP] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the MCP tool. Always ``mcp``. Required. MCP."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A label for this MCP server, used to identify it in tool calls. Required."""
    server_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL for the MCP server. One of ``server_url`` or ``connector_id`` must be provided."""
    connector_id: Optional[
        Literal[
            "connector_dropbox",
            "connector_gmail",
            "connector_googlecalendar",
            "connector_googledrive",
            "connector_microsoftteams",
            "connector_outlookcalendar",
            "connector_outlookemail",
            "connector_sharepoint",
        ]
    ] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Identifier for service connectors, like those available in ChatGPT. One of ``server_url`` or
      ``connector_id`` must be provided. Learn more about service connectors `here
      </docs/guides/tools-remote-mcp#connectors>`_. Currently supported ``connector_id`` values are:
 
      * Dropbox: `connector_dropbox`
      * Gmail: `connector_gmail`
      * Google Calendar: `connector_googlecalendar`
      * Google Drive: `connector_googledrive`
      * Microsoft Teams: `connector_microsoftteams`
      * Outlook Calendar: `connector_outlookcalendar`
      * Outlook Email: `connector_outlookemail`
      * SharePoint: `connector_sharepoint`. Is one of the following types:
        Literal[\"connector_dropbox\"], Literal[\"connector_gmail\"],
        Literal[\"connector_googlecalendar\"], Literal[\"connector_googledrive\"],
        Literal[\"connector_microsoftteams\"], Literal[\"connector_outlookcalendar\"],
        Literal[\"connector_outlookemail\"], Literal[\"connector_sharepoint\"]"""
    authorization: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An OAuth access token that can be used with a remote MCP server, either with a custom MCP
     server URL or a service connector. Your application must handle the OAuth authorization flow
     and provide the token here."""
    server_description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional description of the MCP server, used to provide more context."""
    headers: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    allowed_tools: Optional[Union[list[str], "_models.MCPToolFilter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a [str] type or a MCPToolFilter type."""
    require_approval: Optional[Union["_models.MCPToolRequireApproval", Literal["always"], Literal["never"]]] = (
        rest_field(visibility=["read", "create", "update", "delete", "query"])
    )
    """Is one of the following types: MCPToolRequireApproval, Literal[\"always\"], Literal[\"never\"]"""
    project_connection_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The connection ID in the project for the MCP server. The connection stores authentication and
     other connection details needed to connect to the MCP server."""

    @overload
    def __init__(
        self,
        *,
        server_label: str,
        server_url: Optional[str] = None,
        connector_id: Optional[
            Literal[
                "connector_dropbox",
                "connector_gmail",
                "connector_googlecalendar",
                "connector_googledrive",
                "connector_microsoftteams",
                "connector_outlookcalendar",
                "connector_outlookemail",
                "connector_sharepoint",
            ]
        ] = None,
        authorization: Optional[str] = None,
        server_description: Optional[str] = None,
        headers: Optional[dict[str, str]] = None,
        allowed_tools: Optional[Union[list[str], "_models.MCPToolFilter"]] = None,
        require_approval: Optional[Union["_models.MCPToolRequireApproval", Literal["always"], Literal["never"]]] = None,
        project_connection_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.MCP  # type: ignore


class MCPToolFilter(_Model):
    """MCP tool filter.

    :ivar tool_names: MCP allowed tools.
    :vartype tool_names: list[str]
    :ivar read_only: Indicates whether or not a tool modifies data or is read-only. If an MCP
     server is `annotated with `readOnlyHint`
     <https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint>`_,
     it will match this filter.
    :vartype read_only: bool
    """

    tool_names: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """MCP allowed tools."""
    read_only: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Indicates whether or not a tool modifies data or is read-only. If an MCP server is `annotated
     with `readOnlyHint`
     <https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint>`_,
     it will match this filter."""

    @overload
    def __init__(
        self,
        *,
        tool_names: Optional[list[str]] = None,
        read_only: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MCPToolRequireApproval(_Model):
    """MCPToolRequireApproval.

    :ivar always:
    :vartype always: ~azure.ai.agentserver.responses.models.models.MCPToolFilter
    :ivar never:
    :vartype never: ~azure.ai.agentserver.responses.models.models.MCPToolFilter
    """

    always: Optional["_models.MCPToolFilter"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    never: Optional["_models.MCPToolFilter"] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        always: Optional["_models.MCPToolFilter"] = None,
        never: Optional["_models.MCPToolFilter"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MemorySearchItem(_Model):
    """A retrieved memory item from memory search.

    :ivar memory_item: Retrieved memory item. Required.
    :vartype memory_item: ~azure.ai.agentserver.responses.models.models.MemoryItem
    """

    memory_item: "_models.MemoryItem" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Retrieved memory item. Required."""

    @overload
    def __init__(
        self,
        *,
        memory_item: "_models.MemoryItem",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MemorySearchOptions(_Model):
    """Memory search options.

    :ivar max_memories: Maximum number of memory items to return.
    :vartype max_memories: int
    """

    max_memories: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Maximum number of memory items to return."""

    @overload
    def __init__(
        self,
        *,
        max_memories: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class MemorySearchPreviewTool(Tool, discriminator="memory_search_preview"):
    """A tool for integrating memories into the agent.

    :ivar type: The type of the tool. Always ``memory_search_preview``. Required.
     MEMORY_SEARCH_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MEMORY_SEARCH_PREVIEW
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar memory_store_name: The name of the memory store to use. Required.
    :vartype memory_store_name: str
    :ivar scope: The namespace used to group and isolate memories, such as a user ID. Limits which
     memories can be retrieved or updated. Use special variable ``{{$userId}}`` to scope memories to
     the current signed-in user. Required.
    :vartype scope: str
    :ivar search_options: Options for searching the memory store.
    :vartype search_options: ~azure.ai.agentserver.responses.models.models.MemorySearchOptions
    :ivar update_delay: Time to wait before updating memories after inactivity (seconds). Default
     300.
    :vartype update_delay: int
    """

    type: Literal[ToolType.MEMORY_SEARCH_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the tool. Always ``memory_search_preview``. Required. MEMORY_SEARCH_PREVIEW."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    memory_store_name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the memory store to use. Required."""
    scope: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The namespace used to group and isolate memories, such as a user ID. Limits which memories can
     be retrieved or updated. Use special variable ``{{$userId}}`` to scope memories to the current
     signed-in user. Required."""
    search_options: Optional["_models.MemorySearchOptions"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Options for searching the memory store."""
    update_delay: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Time to wait before updating memories after inactivity (seconds). Default 300."""

    @overload
    def __init__(
        self,
        *,
        memory_store_name: str,
        scope: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
        search_options: Optional["_models.MemorySearchOptions"] = None,
        update_delay: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.MEMORY_SEARCH_PREVIEW  # type: ignore


class MemorySearchToolCallItemParam(Item, discriminator="memory_search_call"):
    """MemorySearchToolCallItemParam.

    :ivar type: Required. MEMORY_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MEMORY_SEARCH_CALL
    :ivar results: The results returned from the memory search.
    :vartype results: list[~azure.ai.agentserver.responses.models.models.MemorySearchItem]
    """

    type: Literal[ItemType.MEMORY_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. MEMORY_SEARCH_CALL."""
    results: Optional[list["_models.MemorySearchItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The results returned from the memory search."""

    @overload
    def __init__(
        self,
        *,
        results: Optional[list["_models.MemorySearchItem"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ItemType.MEMORY_SEARCH_CALL  # type: ignore


class MemorySearchToolCallItemResource(OutputItem, discriminator="memory_search_call"):
    """MemorySearchToolCallItemResource.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. MEMORY_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MEMORY_SEARCH_CALL
    :ivar status: The status of the memory search tool call. One of ``in_progress``, ``searching``,
     ``completed``, ``incomplete`` or ``failed``,. Required. Is one of the following types:
     Literal["in_progress"], Literal["searching"], Literal["completed"], Literal["incomplete"],
     Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar results: The results returned from the memory search.
    :vartype results: list[~azure.ai.agentserver.responses.models.models.MemorySearchItem]
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.MEMORY_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. MEMORY_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "incomplete", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the memory search tool call. One of ``in_progress``, ``searching``,
     ``completed``, ``incomplete`` or ``failed``,. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"searching\"], Literal[\"completed\"],
     Literal[\"incomplete\"], Literal[\"failed\"]"""
    results: Optional[list["_models.MemorySearchItem"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The results returned from the memory search."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        status: Literal["in_progress", "searching", "completed", "incomplete", "failed"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        results: Optional[list["_models.MemorySearchItem"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.MEMORY_SEARCH_CALL  # type: ignore


class MessageContentInputFileContent(MessageContent, discriminator="input_file"):
    """Input file.

    :ivar type: The type of the input item. Always ``input_file``. Required. INPUT_FILE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INPUT_FILE
    :ivar file_id:
    :vartype file_id: str
    :ivar filename: The name of the file to be sent to the model.
    :vartype filename: str
    :ivar file_url: The URL of the file to be sent to the model.
    :vartype file_url: str
    :ivar file_data: The content of the file to be sent to the model.
    :vartype file_data: str
    """

    type: Literal[MessageContentType.INPUT_FILE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the input item. Always ``input_file``. Required. INPUT_FILE."""
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    filename: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the file to be sent to the model."""
    file_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the file to be sent to the model."""
    file_data: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content of the file to be sent to the model."""

    @overload
    def __init__(
        self,
        *,
        file_id: Optional[str] = None,
        filename: Optional[str] = None,
        file_url: Optional[str] = None,
        file_data: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.INPUT_FILE  # type: ignore


class MessageContentInputImageContent(MessageContent, discriminator="input_image"):
    """Input image.

    :ivar type: The type of the input item. Always ``input_image``. Required. INPUT_IMAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INPUT_IMAGE
    :ivar image_url:
    :vartype image_url: str
    :ivar file_id:
    :vartype file_id: str
    :ivar detail: The detail level of the image to be sent to the model. One of ``high``, ``low``,
     or ``auto``. Defaults to ``auto``. Required. Known values are: "low", "high", and "auto".
    :vartype detail: str or ~azure.ai.agentserver.responses.models.models.ImageDetail
    """

    type: Literal[MessageContentType.INPUT_IMAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the input item. Always ``input_image``. Required. INPUT_IMAGE."""
    image_url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    file_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    detail: Union[str, "_models.ImageDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The detail level of the image to be sent to the model. One of ``high``, ``low``, or ``auto``.
     Defaults to ``auto``. Required. Known values are: \"low\", \"high\", and \"auto\"."""

    @overload
    def __init__(
        self,
        *,
        detail: Union[str, "_models.ImageDetail"],
        image_url: Optional[str] = None,
        file_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.INPUT_IMAGE  # type: ignore


class MessageContentInputTextContent(MessageContent, discriminator="input_text"):
    """Input text.

    :ivar type: The type of the input item. Always ``input_text``. Required. INPUT_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.INPUT_TEXT
    :ivar text: The text input to the model. Required.
    :vartype text: str
    """

    type: Literal[MessageContentType.INPUT_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the input item. Always ``input_text``. Required. INPUT_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text input to the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.INPUT_TEXT  # type: ignore


class MessageContentOutputTextContent(MessageContent, discriminator="output_text"):
    """Output text.

    :ivar type: The type of the output text. Always ``output_text``. Required. OUTPUT_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OUTPUT_TEXT
    :ivar text: The text output from the model. Required.
    :vartype text: str
    :ivar annotations: The annotations of the text output. Required.
    :vartype annotations: list[~azure.ai.agentserver.responses.models.models.Annotation]
    :ivar logprobs: Required.
    :vartype logprobs: list[~azure.ai.agentserver.responses.models.models.LogProb]
    """

    type: Literal[MessageContentType.OUTPUT_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the output text. Always ``output_text``. Required. OUTPUT_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text output from the model. Required."""
    annotations: list["_models.Annotation"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The annotations of the text output. Required."""
    logprobs: list["_models.LogProb"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
        annotations: list["_models.Annotation"],
        logprobs: list["_models.LogProb"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.OUTPUT_TEXT  # type: ignore


class MessageContentReasoningTextContent(MessageContent, discriminator="reasoning_text"):
    """Reasoning text.

    :ivar type: The type of the reasoning text. Always ``reasoning_text``. Required.
     REASONING_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REASONING_TEXT
    :ivar text: The reasoning text from the model. Required.
    :vartype text: str
    """

    type: Literal[MessageContentType.REASONING_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the reasoning text. Always ``reasoning_text``. Required. REASONING_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The reasoning text from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.REASONING_TEXT  # type: ignore


class MessageContentRefusalContent(MessageContent, discriminator="refusal"):
    """Refusal.

    :ivar type: The type of the refusal. Always ``refusal``. Required. REFUSAL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REFUSAL
    :ivar refusal: The refusal explanation from the model. Required.
    :vartype refusal: str
    """

    type: Literal[MessageContentType.REFUSAL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the refusal. Always ``refusal``. Required. REFUSAL."""
    refusal: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The refusal explanation from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        refusal: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.REFUSAL  # type: ignore


class Metadata(_Model):
    """Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
    additional information about the object in a structured format, and querying for objects via
    API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are
    strings with a maximum length of 512 characters.

    """


class MicrosoftFabricPreviewTool(Tool, discriminator="fabric_dataagent_preview"):
    """The input definition information for a Microsoft Fabric tool as used to configure an agent.

    :ivar type: The object type, which is always 'fabric_dataagent_preview'. Required.
     FABRIC_DATAAGENT_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FABRIC_DATAAGENT_PREVIEW
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar fabric_dataagent_preview: The fabric data agent tool parameters. Required.
    :vartype fabric_dataagent_preview:
     ~azure.ai.agentserver.responses.models.models.FabricDataAgentToolParameters
    """

    type: Literal[ToolType.FABRIC_DATAAGENT_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'fabric_dataagent_preview'. Required.
     FABRIC_DATAAGENT_PREVIEW."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    fabric_dataagent_preview: "_models.FabricDataAgentToolParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The fabric data agent tool parameters. Required."""

    @overload
    def __init__(
        self,
        *,
        fabric_dataagent_preview: "_models.FabricDataAgentToolParameters",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.FABRIC_DATAAGENT_PREVIEW  # type: ignore


class MoveParam(ComputerAction, discriminator="move"):
    """Move.

    :ivar type: Specifies the event type. For a move action, this property is always set to
     ``move``. Required. MOVE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MOVE
    :ivar x: The x-coordinate to move to. Required.
    :vartype x: int
    :ivar y: The y-coordinate to move to. Required.
    :vartype y: int
    """

    type: Literal[ComputerActionType.MOVE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a move action, this property is always set to ``move``. Required.
     MOVE."""
    x: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The x-coordinate to move to. Required."""
    y: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The y-coordinate to move to. Required."""

    @overload
    def __init__(
        self,
        *,
        x: int,
        y: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.MOVE  # type: ignore


class OAuthConsentRequestOutputItem(OutputItem, discriminator="oauth_consent_request"):
    """Request from the service for the user to perform OAuth consent.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar id: Required.
    :vartype id: str
    :ivar type: Required. OAUTH_CONSENT_REQUEST.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OAUTH_CONSENT_REQUEST
    :ivar consent_link: The link the user can use to perform OAuth consent. Required.
    :vartype consent_link: str
    :ivar server_label: The server label for the OAuth consent request. Required.
    :vartype server_label: str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    type: Literal[OutputItemType.OAUTH_CONSENT_REQUEST] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. OAUTH_CONSENT_REQUEST."""
    consent_link: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The link the user can use to perform OAuth consent. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The server label for the OAuth consent request. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        consent_link: str,
        server_label: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.OAUTH_CONSENT_REQUEST  # type: ignore


class OpenApiAuthDetails(_Model):
    """authentication details for OpenApiFunctionDefinition.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    OpenApiAnonymousAuthDetails, OpenApiManagedAuthDetails, OpenApiProjectConnectionAuthDetails

    :ivar type: The type of authentication, must be anonymous/project_connection/managed_identity.
     Required. Known values are: "anonymous", "project_connection", and "managed_identity".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OpenApiAuthType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """The type of authentication, must be anonymous/project_connection/managed_identity. Required.
     Known values are: \"anonymous\", \"project_connection\", and \"managed_identity\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OpenApiAnonymousAuthDetails(OpenApiAuthDetails, discriminator="anonymous"):
    """Security details for OpenApi anonymous authentication.

    :ivar type: The object type, which is always 'anonymous'. Required. ANONYMOUS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ANONYMOUS
    """

    type: Literal[OpenApiAuthType.ANONYMOUS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'anonymous'. Required. ANONYMOUS."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OpenApiAuthType.ANONYMOUS  # type: ignore


class OpenApiFunctionDefinition(_Model):
    """The input definition information for an openapi function.

    :ivar name: The name of the function to be called. Required.
    :vartype name: str
    :ivar description: A description of what the function does, used by the model to choose when
     and how to call the function.
    :vartype description: str
    :ivar spec: The openapi function shape, described as a JSON Schema object. Required.
    :vartype spec: dict[str, any]
    :ivar auth: Open API authentication details. Required.
    :vartype auth: ~azure.ai.agentserver.responses.models.models.OpenApiAuthDetails
    :ivar default_params: List of OpenAPI spec parameters that will use user-provided defaults.
    :vartype default_params: list[str]
    :ivar functions: List of function definitions used by OpenApi tool.
    :vartype functions:
     list[~azure.ai.agentserver.responses.models.models.OpenApiFunctionDefinitionFunction]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to be called. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description of what the function does, used by the model to choose when and how to call the
     function."""
    spec: dict[str, Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The openapi function shape, described as a JSON Schema object. Required."""
    auth: "_models.OpenApiAuthDetails" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Open API authentication details. Required."""
    default_params: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """List of OpenAPI spec parameters that will use user-provided defaults."""
    functions: Optional[list["_models.OpenApiFunctionDefinitionFunction"]] = rest_field(visibility=["read"])
    """List of function definitions used by OpenApi tool."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        spec: dict[str, Any],
        auth: "_models.OpenApiAuthDetails",
        description: Optional[str] = None,
        default_params: Optional[list[str]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OpenApiFunctionDefinitionFunction(_Model):
    """OpenApiFunctionDefinitionFunction.

    :ivar name: The name of the function to be called. Required.
    :vartype name: str
    :ivar description: A description of what the function does, used by the model to choose when
     and how to call the function.
    :vartype description: str
    :ivar parameters: The parameters the functions accepts, described as a JSON Schema object.
     Required.
    :vartype parameters: dict[str, any]
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to be called. Required."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description of what the function does, used by the model to choose when and how to call the
     function."""
    parameters: dict[str, Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The parameters the functions accepts, described as a JSON Schema object. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        parameters: dict[str, Any],
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OpenApiManagedAuthDetails(OpenApiAuthDetails, discriminator="managed_identity"):
    """Security details for OpenApi managed_identity authentication.

    :ivar type: The object type, which is always 'managed_identity'. Required. MANAGED_IDENTITY.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MANAGED_IDENTITY
    :ivar security_scheme: Connection auth security details. Required.
    :vartype security_scheme:
     ~azure.ai.agentserver.responses.models.models.OpenApiManagedSecurityScheme
    """

    type: Literal[OpenApiAuthType.MANAGED_IDENTITY] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'managed_identity'. Required. MANAGED_IDENTITY."""
    security_scheme: "_models.OpenApiManagedSecurityScheme" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Connection auth security details. Required."""

    @overload
    def __init__(
        self,
        *,
        security_scheme: "_models.OpenApiManagedSecurityScheme",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OpenApiAuthType.MANAGED_IDENTITY  # type: ignore


class OpenApiManagedSecurityScheme(_Model):
    """Security scheme for OpenApi managed_identity authentication.

    :ivar audience: Authentication scope for managed_identity auth type. Required.
    :vartype audience: str
    """

    audience: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Authentication scope for managed_identity auth type. Required."""

    @overload
    def __init__(
        self,
        *,
        audience: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OpenApiProjectConnectionAuthDetails(OpenApiAuthDetails, discriminator="project_connection"):
    """Security details for OpenApi project connection authentication.

    :ivar type: The object type, which is always 'project_connection'. Required.
     PROJECT_CONNECTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.PROJECT_CONNECTION
    :ivar security_scheme: Project connection auth security details. Required.
    :vartype security_scheme:
     ~azure.ai.agentserver.responses.models.models.OpenApiProjectConnectionSecurityScheme
    """

    type: Literal[OpenApiAuthType.PROJECT_CONNECTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'project_connection'. Required. PROJECT_CONNECTION."""
    security_scheme: "_models.OpenApiProjectConnectionSecurityScheme" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Project connection auth security details. Required."""

    @overload
    def __init__(
        self,
        *,
        security_scheme: "_models.OpenApiProjectConnectionSecurityScheme",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OpenApiAuthType.PROJECT_CONNECTION  # type: ignore


class OpenApiProjectConnectionSecurityScheme(_Model):
    """Security scheme for OpenApi managed_identity authentication.

    :ivar project_connection_id: Project connection id for Project Connection auth type. Required.
    :vartype project_connection_id: str
    """

    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Project connection id for Project Connection auth type. Required."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OpenApiTool(Tool, discriminator="openapi"):
    """The input definition information for an OpenAPI tool as used to configure an agent.

    :ivar type: The object type, which is always 'openapi'. Required. OPENAPI.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OPENAPI
    :ivar openapi: The openapi function definition. Required.
    :vartype openapi: ~azure.ai.agentserver.responses.models.models.OpenApiFunctionDefinition
    """

    type: Literal[ToolType.OPENAPI] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'openapi'. Required. OPENAPI."""
    openapi: "_models.OpenApiFunctionDefinition" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The openapi function definition. Required."""

    @overload
    def __init__(
        self,
        *,
        openapi: "_models.OpenApiFunctionDefinition",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.OPENAPI  # type: ignore


class OpenApiToolCall(OutputItem, discriminator="openapi_call"):
    """An OpenAPI tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. OPENAPI_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OPENAPI_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the OpenAPI operation being called. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.OPENAPI_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. OPENAPI_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the OpenAPI operation being called. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.OPENAPI_CALL  # type: ignore


class OpenApiToolCallOutput(OutputItem, discriminator="openapi_call_output"):
    """The output of an OpenAPI tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. OPENAPI_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OPENAPI_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the OpenAPI operation that was called. Required.
    :vartype name: str
    :ivar output: The output from the OpenAPI tool call. Is one of the following types: {str: Any},
     str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.OPENAPI_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. OPENAPI_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the OpenAPI operation that was called. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the OpenAPI tool call. Is one of the following types: {str: Any}, str, [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.OPENAPI_CALL_OUTPUT  # type: ignore


class OutputContent(_Model):
    """OutputContent.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    OutputContentOutputTextContent, OutputContentReasoningTextContent, OutputContentRefusalContent

    :ivar type: Required. Known values are: "output_text", "refusal", and "reasoning_text".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OutputContentType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"output_text\", \"refusal\", and \"reasoning_text\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OutputContentOutputTextContent(OutputContent, discriminator="output_text"):
    """Output text.

    :ivar type: The type of the output text. Always ``output_text``. Required. OUTPUT_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OUTPUT_TEXT
    :ivar text: The text output from the model. Required.
    :vartype text: str
    :ivar annotations: The annotations of the text output. Required.
    :vartype annotations: list[~azure.ai.agentserver.responses.models.models.Annotation]
    :ivar logprobs: Required.
    :vartype logprobs: list[~azure.ai.agentserver.responses.models.models.LogProb]
    """

    type: Literal[OutputContentType.OUTPUT_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the output text. Always ``output_text``. Required. OUTPUT_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text output from the model. Required."""
    annotations: list["_models.Annotation"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The annotations of the text output. Required."""
    logprobs: list["_models.LogProb"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
        annotations: list["_models.Annotation"],
        logprobs: list["_models.LogProb"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputContentType.OUTPUT_TEXT  # type: ignore


class OutputContentReasoningTextContent(OutputContent, discriminator="reasoning_text"):
    """Reasoning text.

    :ivar type: The type of the reasoning text. Always ``reasoning_text``. Required.
     REASONING_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REASONING_TEXT
    :ivar text: The reasoning text from the model. Required.
    :vartype text: str
    """

    type: Literal[OutputContentType.REASONING_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the reasoning text. Always ``reasoning_text``. Required. REASONING_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The reasoning text from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputContentType.REASONING_TEXT  # type: ignore


class OutputContentRefusalContent(OutputContent, discriminator="refusal"):
    """Refusal.

    :ivar type: The type of the refusal. Always ``refusal``. Required. REFUSAL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REFUSAL
    :ivar refusal: The refusal explanation from the model. Required.
    :vartype refusal: str
    """

    type: Literal[OutputContentType.REFUSAL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the refusal. Always ``refusal``. Required. REFUSAL."""
    refusal: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The refusal explanation from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        refusal: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputContentType.REFUSAL  # type: ignore


class OutputItemApplyPatchToolCall(OutputItem, discriminator="apply_patch_call"):
    """Apply patch tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``apply_patch_call``. Required. APPLY_PATCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH_CALL
    :ivar id: The unique ID of the apply patch tool call. Populated when this item is returned via
     API. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the apply patch tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the apply patch tool call. One of ``in_progress`` or ``completed``.
     Required. Known values are: "in_progress" and "completed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ApplyPatchCallStatus
    :ivar operation: Apply patch operation. Required.
    :vartype operation: ~azure.ai.agentserver.responses.models.models.ApplyPatchFileOperation
    """

    type: Literal[OutputItemType.APPLY_PATCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``apply_patch_call``. Required. APPLY_PATCH_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call. Populated when this item is returned via API.
     Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call generated by the model. Required."""
    status: Union[str, "_models.ApplyPatchCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the apply patch tool call. One of ``in_progress`` or ``completed``. Required.
     Known values are: \"in_progress\" and \"completed\"."""
    operation: "_models.ApplyPatchFileOperation" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Apply patch operation. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        status: Union[str, "_models.ApplyPatchCallStatus"],
        operation: "_models.ApplyPatchFileOperation",
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.APPLY_PATCH_CALL  # type: ignore


class OutputItemApplyPatchToolCallOutput(OutputItem, discriminator="apply_patch_call_output"):
    """Apply patch tool call output.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``apply_patch_call_output``. Required.
     APPLY_PATCH_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH_CALL_OUTPUT
    :ivar id: The unique ID of the apply patch tool call output. Populated when this item is
     returned via API. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the apply patch tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the apply patch tool call output. One of ``completed`` or
     ``failed``. Required. Known values are: "completed" and "failed".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.ApplyPatchCallOutputStatus
    :ivar output:
    :vartype output: str
    """

    type: Literal[OutputItemType.APPLY_PATCH_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``apply_patch_call_output``. Required. APPLY_PATCH_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call output. Populated when this item is returned via
     API. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the apply patch tool call generated by the model. Required."""
    status: Union[str, "_models.ApplyPatchCallOutputStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the apply patch tool call output. One of ``completed`` or ``failed``. Required.
     Known values are: \"completed\" and \"failed\"."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        status: Union[str, "_models.ApplyPatchCallOutputStatus"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.APPLY_PATCH_CALL_OUTPUT  # type: ignore


class OutputItemCodeInterpreterToolCall(OutputItem, discriminator="code_interpreter_call"):
    """Code interpreter tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the code interpreter tool call. Always ``code_interpreter_call``.
     Required. CODE_INTERPRETER_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CODE_INTERPRETER_CALL
    :ivar id: The unique ID of the code interpreter tool call. Required.
    :vartype id: str
    :ivar status: The status of the code interpreter tool call. Valid values are ``in_progress``,
     ``completed``, ``incomplete``, ``interpreting``, and ``failed``. Required. Is one of the
     following types: Literal["in_progress"], Literal["completed"], Literal["incomplete"],
     Literal["interpreting"], Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar container_id: The ID of the container used to run the code. Required.
    :vartype container_id: str
    :ivar code: Required.
    :vartype code: str
    :ivar outputs: Required.
    :vartype outputs: list[~azure.ai.agentserver.responses.models.models.CodeInterpreterOutputLogs
     or ~azure.ai.agentserver.responses.models.models.CodeInterpreterOutputImage]
    """

    type: Literal[OutputItemType.CODE_INTERPRETER_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the code interpreter tool call. Always ``code_interpreter_call``. Required.
     CODE_INTERPRETER_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the code interpreter tool call. Required."""
    status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the code interpreter tool call. Valid values are ``in_progress``, ``completed``,
     ``incomplete``, ``interpreting``, and ``failed``. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"],
     Literal[\"interpreting\"], Literal[\"failed\"]"""
    container_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the container used to run the code. Required."""
    code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    outputs: list[Union["_models.CodeInterpreterOutputLogs", "_models.CodeInterpreterOutputImage"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"],
        container_id: str,
        code: str,
        outputs: list[Union["_models.CodeInterpreterOutputLogs", "_models.CodeInterpreterOutputImage"]],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.CODE_INTERPRETER_CALL  # type: ignore


class OutputItemCompactionBody(OutputItem, discriminator="compaction"):
    """Compaction item.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``compaction``. Required. COMPACTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPACTION
    :ivar id: The unique ID of the compaction item. Required.
    :vartype id: str
    :ivar encrypted_content: The encrypted content that was produced by compaction. Required.
    :vartype encrypted_content: str
    """

    type: Literal[OutputItemType.COMPACTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``compaction``. Required. COMPACTION."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the compaction item. Required."""
    encrypted_content: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The encrypted content that was produced by compaction. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        encrypted_content: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.COMPACTION  # type: ignore


class OutputItemComputerToolCall(OutputItem, discriminator="computer_call"):
    """Computer tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the computer call. Always ``computer_call``. Required. COMPUTER_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_CALL
    :ivar id: The unique ID of the computer call. Required.
    :vartype id: str
    :ivar call_id: An identifier used when responding to the tool call with output. Required.
    :vartype call_id: str
    :ivar action: Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.ComputerAction
    :ivar pending_safety_checks: The pending safety checks for the computer call. Required.
    :vartype pending_safety_checks:
     list[~azure.ai.agentserver.responses.models.models.ComputerCallSafetyCheckParam]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[OutputItemType.COMPUTER_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer call. Always ``computer_call``. Required. COMPUTER_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the computer call. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier used when responding to the tool call with output. Required."""
    action: "_models.ComputerAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    pending_safety_checks: list["_models.ComputerCallSafetyCheckParam"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The pending safety checks for the computer call. Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.ComputerAction",
        pending_safety_checks: list["_models.ComputerCallSafetyCheckParam"],
        status: Literal["in_progress", "completed", "incomplete"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.COMPUTER_CALL  # type: ignore


class OutputItemComputerToolCallOutputResource(OutputItem, discriminator="computer_call_output"):
    """OutputItemComputerToolCallOutputResource.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the computer tool call output. Always ``computer_call_output``.
     Required. COMPUTER_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_CALL_OUTPUT
    :ivar id: The ID of the computer tool call output.
    :vartype id: str
    :ivar call_id: The ID of the computer tool call that produced the output. Required.
    :vartype call_id: str
    :ivar acknowledged_safety_checks: The safety checks reported by the API that have been
     acknowledged by the developer.
    :vartype acknowledged_safety_checks:
     list[~azure.ai.agentserver.responses.models.models.ComputerCallSafetyCheckParam]
    :ivar output: Required.
    :vartype output: ~azure.ai.agentserver.responses.models.models.ComputerScreenshotImage
    :ivar status: The status of the message input. One of ``in_progress``, ``completed``, or
     ``incomplete``. Populated when input items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[OutputItemType.COMPUTER_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the computer tool call output. Always ``computer_call_output``. Required.
     COMPUTER_CALL_OUTPUT."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the computer tool call output."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the computer tool call that produced the output. Required."""
    acknowledged_safety_checks: Optional[list["_models.ComputerCallSafetyCheckParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The safety checks reported by the API that have been acknowledged by the developer."""
    output: "_models.ComputerScreenshotImage" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the message input. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when input items are returned via API. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: "_models.ComputerScreenshotImage",
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        acknowledged_safety_checks: Optional[list["_models.ComputerCallSafetyCheckParam"]] = None,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.COMPUTER_CALL_OUTPUT  # type: ignore


class OutputItemCustomToolCall(OutputItem, discriminator="custom_tool_call"):
    """Custom tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the custom tool call. Always ``custom_tool_call``. Required.
     CUSTOM_TOOL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM_TOOL_CALL
    :ivar id: The unique ID of the custom tool call in the OpenAI platform.
    :vartype id: str
    :ivar call_id: An identifier used to map this custom tool call to a tool call output. Required.
    :vartype call_id: str
    :ivar name: The name of the custom tool being called. Required.
    :vartype name: str
    :ivar input: The input for the custom tool call generated by the model. Required.
    :vartype input: str
    """

    type: Literal[OutputItemType.CUSTOM_TOOL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool call. Always ``custom_tool_call``. Required. CUSTOM_TOOL_CALL."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the custom tool call in the OpenAI platform."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An identifier used to map this custom tool call to a tool call output. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom tool being called. Required."""
    input: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The input for the custom tool call generated by the model. Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        input: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.CUSTOM_TOOL_CALL  # type: ignore


class OutputItemCustomToolCallOutput(OutputItem, discriminator="custom_tool_call_output"):
    """Custom tool call output.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the custom tool call output. Always ``custom_tool_call_output``.
     Required. CUSTOM_TOOL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM_TOOL_CALL_OUTPUT
    :ivar id: The unique ID of the custom tool call output in the OpenAI platform.
    :vartype id: str
    :ivar call_id: The call ID, used to map this custom tool call output to a custom tool call.
     Required.
    :vartype call_id: str
    :ivar output: The output from the custom tool call generated by your code. Can be a string or
     an list of output content. Required. Is either a str type or a
     [FunctionAndCustomToolCallOutput] type.
    :vartype output: str or
     list[~azure.ai.agentserver.responses.models.models.FunctionAndCustomToolCallOutput]
    """

    type: Literal[OutputItemType.CUSTOM_TOOL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the custom tool call output. Always ``custom_tool_call_output``. Required.
     CUSTOM_TOOL_CALL_OUTPUT."""
    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the custom tool call output in the OpenAI platform."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The call ID, used to map this custom tool call output to a custom tool call. Required."""
    output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the custom tool call generated by your code. Can be a string or an list of
     output content. Required. Is either a str type or a [FunctionAndCustomToolCallOutput] type."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        output: Union[str, list["_models.FunctionAndCustomToolCallOutput"]],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.CUSTOM_TOOL_CALL_OUTPUT  # type: ignore


class OutputItemFileSearchToolCall(OutputItem, discriminator="file_search_call"):
    """File search tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar id: The unique ID of the file search tool call. Required.
    :vartype id: str
    :ivar type: The type of the file search tool call. Always ``file_search_call``. Required.
     FILE_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_SEARCH_CALL
    :ivar status: The status of the file search tool call. One of ``in_progress``, ``searching``,
     ``incomplete`` or ``failed``,. Required. Is one of the following types: Literal["in_progress"],
     Literal["searching"], Literal["completed"], Literal["incomplete"], Literal["failed"]
    :vartype status: str or str or str or str or str
    :ivar queries: The queries used to search for files. Required.
    :vartype queries: list[str]
    :ivar results:
    :vartype results: list[~azure.ai.agentserver.responses.models.models.FileSearchToolCallResults]
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the file search tool call. Required."""
    type: Literal[OutputItemType.FILE_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the file search tool call. Always ``file_search_call``. Required. FILE_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "incomplete", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the file search tool call. One of ``in_progress``, ``searching``, ``incomplete``
     or ``failed``,. Required. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"searching\"], Literal[\"completed\"], Literal[\"incomplete\"], Literal[\"failed\"]"""
    queries: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The queries used to search for files. Required."""
    results: Optional[list["_models.FileSearchToolCallResults"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "searching", "completed", "incomplete", "failed"],
        queries: list[str],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        results: Optional[list["_models.FileSearchToolCallResults"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.FILE_SEARCH_CALL  # type: ignore


class OutputItemFunctionShellCall(OutputItem, discriminator="shell_call"):
    """Shell tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``shell_call``. Required. SHELL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL_CALL
    :ivar id: The unique ID of the shell tool call. Populated when this item is returned via API.
     Required.
    :vartype id: str
    :ivar call_id: The unique ID of the shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar action: The shell commands and limits that describe how to run the tool call. Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.FunctionShellAction
    :ivar status: The status of the shell call. One of ``in_progress``, ``completed``, or
     ``incomplete``. Required. Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.LocalShellCallStatus
    :ivar environment: Required.
    :vartype environment:
     ~azure.ai.agentserver.responses.models.models.FunctionShellCallEnvironment
    """

    type: Literal[OutputItemType.SHELL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``shell_call``. Required. SHELL_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call. Populated when this item is returned via API. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call generated by the model. Required."""
    action: "_models.FunctionShellAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The shell commands and limits that describe how to run the tool call. Required."""
    status: Union[str, "_models.LocalShellCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the shell call. One of ``in_progress``, ``completed``, or ``incomplete``.
     Required. Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""
    environment: "_models.FunctionShellCallEnvironment" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.FunctionShellAction",
        status: Union[str, "_models.LocalShellCallStatus"],
        environment: "_models.FunctionShellCallEnvironment",
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.SHELL_CALL  # type: ignore


class OutputItemFunctionShellCallOutput(OutputItem, discriminator="shell_call_output"):
    """Shell call output.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the shell call output. Always ``shell_call_output``. Required.
     SHELL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL_CALL_OUTPUT
    :ivar id: The unique ID of the shell call output. Populated when this item is returned via API.
     Required.
    :vartype id: str
    :ivar call_id: The unique ID of the shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar status: The status of the shell call output. One of ``in_progress``, ``completed``, or
     ``incomplete``. Required. Known values are: "in_progress", "completed", and "incomplete".
    :vartype status: str or
     ~azure.ai.agentserver.responses.models.models.LocalShellCallOutputStatusEnum
    :ivar output: An array of shell call output contents. Required.
    :vartype output:
     list[~azure.ai.agentserver.responses.models.models.FunctionShellCallOutputContent]
    :ivar max_output_length: Required.
    :vartype max_output_length: int
    """

    type: Literal[OutputItemType.SHELL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the shell call output. Always ``shell_call_output``. Required. SHELL_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell call output. Populated when this item is returned via API. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the shell tool call generated by the model. Required."""
    status: Union[str, "_models.LocalShellCallOutputStatusEnum"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the shell call output. One of ``in_progress``, ``completed``, or ``incomplete``.
     Required. Known values are: \"in_progress\", \"completed\", and \"incomplete\"."""
    output: list["_models.FunctionShellCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """An array of shell call output contents. Required."""
    max_output_length: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        status: Union[str, "_models.LocalShellCallOutputStatusEnum"],
        output: list["_models.FunctionShellCallOutputContent"],
        max_output_length: int,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.SHELL_CALL_OUTPUT  # type: ignore


class OutputItemFunctionToolCall(OutputItem, discriminator="function_call"):
    """Function tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar id: The unique ID of the function tool call.
    :vartype id: str
    :ivar type: The type of the function tool call. Always ``function_call``. Required.
     FUNCTION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION_CALL
    :ivar call_id: The unique ID of the function tool call generated by the model. Required.
    :vartype call_id: str
    :ivar name: The name of the function to run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments to pass to the function. Required.
    :vartype arguments: str
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call."""
    type: Literal[OutputItemType.FUNCTION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the function tool call. Always ``function_call``. Required. FUNCTION_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the function tool call generated by the model. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the function. Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        name: str,
        arguments: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        id: Optional[str] = None,  # pylint: disable=redefined-builtin
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.FUNCTION_CALL  # type: ignore


class OutputItemImageGenToolCall(OutputItem, discriminator="image_generation_call"):
    """Image generation call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the image generation call. Always ``image_generation_call``. Required.
     IMAGE_GENERATION_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.IMAGE_GENERATION_CALL
    :ivar id: The unique ID of the image generation call. Required.
    :vartype id: str
    :ivar status: The status of the image generation call. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["generating"], Literal["failed"]
    :vartype status: str or str or str or str
    :ivar result: Required.
    :vartype result: str
    """

    type: Literal[OutputItemType.IMAGE_GENERATION_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the image generation call. Always ``image_generation_call``. Required.
     IMAGE_GENERATION_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the image generation call. Required."""
    status: Literal["in_progress", "completed", "generating", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the image generation call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"generating\"], Literal[\"failed\"]"""
    result: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "completed", "generating", "failed"],
        result: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.IMAGE_GENERATION_CALL  # type: ignore


class OutputItemLocalShellToolCall(OutputItem, discriminator="local_shell_call"):
    """Local shell call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the local shell call. Always ``local_shell_call``. Required.
     LOCAL_SHELL_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL_CALL
    :ivar id: The unique ID of the local shell call. Required.
    :vartype id: str
    :ivar call_id: The unique ID of the local shell tool call generated by the model. Required.
    :vartype call_id: str
    :ivar action: Required.
    :vartype action: ~azure.ai.agentserver.responses.models.models.LocalShellExecAction
    :ivar status: The status of the local shell call. Required. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[OutputItemType.LOCAL_SHELL_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell call. Always ``local_shell_call``. Required. LOCAL_SHELL_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell call. Required."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell tool call generated by the model. Required."""
    action: "_models.LocalShellExecAction" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the local shell call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        call_id: str,
        action: "_models.LocalShellExecAction",
        status: Literal["in_progress", "completed", "incomplete"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.LOCAL_SHELL_CALL  # type: ignore


class OutputItemLocalShellToolCallOutput(OutputItem, discriminator="local_shell_call_output"):
    """Local shell call output.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the local shell tool call output. Always ``local_shell_call_output``.
     Required. LOCAL_SHELL_CALL_OUTPUT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.LOCAL_SHELL_CALL_OUTPUT
    :ivar id: The unique ID of the local shell tool call generated by the model. Required.
    :vartype id: str
    :ivar output: A JSON string of the output of the local shell tool call. Required.
    :vartype output: str
    :ivar status: Is one of the following types: Literal["in_progress"], Literal["completed"],
     Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[OutputItemType.LOCAL_SHELL_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the local shell tool call output. Always ``local_shell_call_output``. Required.
     LOCAL_SHELL_CALL_OUTPUT."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the local shell tool call generated by the model. Required."""
    output: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the output of the local shell tool call. Required."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"in_progress\"], Literal[\"completed\"],
     Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        output: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.LOCAL_SHELL_CALL_OUTPUT  # type: ignore


class OutputItemMcpApprovalRequest(OutputItem, discriminator="mcp_approval_request"):
    """MCP approval request.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``mcp_approval_request``. Required.
     MCP_APPROVAL_REQUEST.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_APPROVAL_REQUEST
    :ivar id: The unique ID of the approval request. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server making the request. Required.
    :vartype server_label: str
    :ivar name: The name of the tool to run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of arguments for the tool. Required.
    :vartype arguments: str
    """

    type: Literal[OutputItemType.MCP_APPROVAL_REQUEST] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_approval_request``. Required. MCP_APPROVAL_REQUEST."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the approval request. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server making the request. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool to run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of arguments for the tool. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        name: str,
        arguments: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.MCP_APPROVAL_REQUEST  # type: ignore


class OutputItemMcpApprovalResponseResource(OutputItem, discriminator="mcp_approval_response"):
    """MCP approval response.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``mcp_approval_response``. Required.
     MCP_APPROVAL_RESPONSE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_APPROVAL_RESPONSE
    :ivar id: The unique ID of the approval response. Required.
    :vartype id: str
    :ivar approval_request_id: The ID of the approval request being answered. Required.
    :vartype approval_request_id: str
    :ivar approve: Whether the request was approved. Required.
    :vartype approve: bool
    :ivar reason:
    :vartype reason: str
    """

    type: Literal[OutputItemType.MCP_APPROVAL_RESPONSE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_approval_response``. Required. MCP_APPROVAL_RESPONSE."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the approval response. Required."""
    approval_request_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the approval request being answered. Required."""
    approve: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether the request was approved. Required."""
    reason: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        approval_request_id: str,
        approve: bool,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        reason: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.MCP_APPROVAL_RESPONSE  # type: ignore


class OutputItemMcpListTools(OutputItem, discriminator="mcp_list_tools"):
    """MCP list tools.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``mcp_list_tools``. Required. MCP_LIST_TOOLS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_LIST_TOOLS
    :ivar id: The unique ID of the list. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server. Required.
    :vartype server_label: str
    :ivar tools: The tools available on the server. Required.
    :vartype tools: list[~azure.ai.agentserver.responses.models.models.MCPListToolsTool]
    :ivar error:
    :vartype error: str
    """

    type: Literal[OutputItemType.MCP_LIST_TOOLS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_list_tools``. Required. MCP_LIST_TOOLS."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the list. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server. Required."""
    tools: list["_models.MCPListToolsTool"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The tools available on the server. Required."""
    error: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        tools: list["_models.MCPListToolsTool"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        error: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.MCP_LIST_TOOLS  # type: ignore


class OutputItemMcpToolCall(OutputItem, discriminator="mcp_call"):
    """MCP tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the item. Always ``mcp_call``. Required. MCP_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP_CALL
    :ivar id: The unique ID of the tool call. Required.
    :vartype id: str
    :ivar server_label: The label of the MCP server running the tool. Required.
    :vartype server_label: str
    :ivar name: The name of the tool that was run. Required.
    :vartype name: str
    :ivar arguments: A JSON string of the arguments passed to the tool. Required.
    :vartype arguments: str
    :ivar output:
    :vartype output: str
    :ivar error:
    :vartype error: dict[str, any]
    :ivar status: The status of the tool call. One of ``in_progress``, ``completed``,
     ``incomplete``, ``calling``, or ``failed``. Known values are: "in_progress", "completed",
     "incomplete", "calling", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.MCPToolCallStatus
    :ivar approval_request_id:
    :vartype approval_request_id: str
    """

    type: Literal[OutputItemType.MCP_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the item. Always ``mcp_call``. Required. MCP_CALL."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call. Required."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server running the tool. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the tool that was run. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments passed to the tool. Required."""
    output: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    error: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    status: Optional[Union[str, "_models.MCPToolCallStatus"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. One of ``in_progress``, ``completed``, ``incomplete``,
     ``calling``, or ``failed``. Known values are: \"in_progress\", \"completed\", \"incomplete\",
     \"calling\", and \"failed\"."""
    approval_request_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        server_label: str,
        name: str,
        arguments: str,
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional[str] = None,
        error: Optional[dict[str, Any]] = None,
        status: Optional[Union[str, "_models.MCPToolCallStatus"]] = None,
        approval_request_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.MCP_CALL  # type: ignore


class OutputItemMessage(OutputItem, discriminator="message"):
    """Message.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the message. Always set to ``message``. Required. MESSAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MESSAGE
    :ivar id: The unique ID of the message. Required.
    :vartype id: str
    :ivar status: The status of item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Required. Known values are: "in_progress",
     "completed", and "incomplete".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.MessageStatus
    :ivar role: The role of the message. One of ``unknown``, ``user``, ``assistant``, ``system``,
     ``critic``, ``discriminator``, ``developer``, or ``tool``. Required. Known values are:
     "unknown", "user", "assistant", "system", "critic", "discriminator", "developer", and "tool".
    :vartype role: str or ~azure.ai.agentserver.responses.models.models.MessageRole
    :ivar content: The content of the message. Required.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.MessageContent]
    """

    type: Literal[OutputItemType.MESSAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the message. Always set to ``message``. Required. MESSAGE."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the message. Required."""
    status: Union[str, "_models.MessageStatus"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The status of item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated when
     items are returned via API. Required. Known values are: \"in_progress\", \"completed\", and
     \"incomplete\"."""
    role: Union[str, "_models.MessageRole"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role of the message. One of ``unknown``, ``user``, ``assistant``, ``system``, ``critic``,
     ``discriminator``, ``developer``, or ``tool``. Required. Known values are: \"unknown\",
     \"user\", \"assistant\", \"system\", \"critic\", \"discriminator\", \"developer\", and
     \"tool\"."""
    content: list["_models.MessageContent"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content of the message. Required."""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Union[str, "_models.MessageStatus"],
        role: Union[str, "_models.MessageRole"],
        content: list["_models.MessageContent"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.MESSAGE  # type: ignore


class OutputItemOutputMessage(OutputItem, discriminator="output_message"):
    """Output message.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar id: The unique ID of the output message. Required.
    :vartype id: str
    :ivar type: The type of the output message. Always ``message``. Required. OUTPUT_MESSAGE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OUTPUT_MESSAGE
    :ivar role: The role of the output message. Always ``assistant``. Required. Default value is
     "assistant".
    :vartype role: str
    :ivar content: The content of the output message. Required.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.OutputMessageContent]
    :ivar status: The status of the message input. One of ``in_progress``, ``completed``, or
     ``incomplete``. Populated when input items are returned via API. Required. Is one of the
     following types: Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the output message. Required."""
    type: Literal[OutputItemType.OUTPUT_MESSAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the output message. Always ``message``. Required. OUTPUT_MESSAGE."""
    role: Literal["assistant"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The role of the output message. Always ``assistant``. Required. Default value is \"assistant\"."""
    content: list["_models.OutputMessageContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The content of the output message. Required."""
    status: Literal["in_progress", "completed", "incomplete"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the message input. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when input items are returned via API. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        content: list["_models.OutputMessageContent"],
        status: Literal["in_progress", "completed", "incomplete"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.OUTPUT_MESSAGE  # type: ignore
        self.role: Literal["assistant"] = "assistant"


class OutputItemReasoningItem(OutputItem, discriminator="reasoning"):
    """Reasoning.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: The type of the object. Always ``reasoning``. Required. REASONING.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REASONING
    :ivar id: The unique identifier of the reasoning content. Required.
    :vartype id: str
    :ivar encrypted_content:
    :vartype encrypted_content: str
    :ivar summary: Reasoning summary content. Required.
    :vartype summary: list[~azure.ai.agentserver.responses.models.models.SummaryTextContent]
    :ivar content: Reasoning text content.
    :vartype content: list[~azure.ai.agentserver.responses.models.models.ReasoningTextContent]
    :ivar status: The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``.
     Populated when items are returned via API. Is one of the following types:
     Literal["in_progress"], Literal["completed"], Literal["incomplete"]
    :vartype status: str or str or str
    """

    type: Literal[OutputItemType.REASONING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the object. Always ``reasoning``. Required. REASONING."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the reasoning content. Required."""
    encrypted_content: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    summary: list["_models.SummaryTextContent"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Reasoning summary content. Required."""
    content: Optional[list["_models.ReasoningTextContent"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Reasoning text content."""
    status: Optional[Literal["in_progress", "completed", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the item. One of ``in_progress``, ``completed``, or ``incomplete``. Populated
     when items are returned via API. Is one of the following types: Literal[\"in_progress\"],
     Literal[\"completed\"], Literal[\"incomplete\"]"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        summary: list["_models.SummaryTextContent"],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        encrypted_content: Optional[str] = None,
        content: Optional[list["_models.ReasoningTextContent"]] = None,
        status: Optional[Literal["in_progress", "completed", "incomplete"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.REASONING  # type: ignore


class OutputItemWebSearchToolCall(OutputItem, discriminator="web_search_call"):
    """Web search tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar id: The unique ID of the web search tool call. Required.
    :vartype id: str
    :ivar type: The type of the web search tool call. Always ``web_search_call``. Required.
     WEB_SEARCH_CALL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WEB_SEARCH_CALL
    :ivar status: The status of the web search tool call. Required. Is one of the following types:
     Literal["in_progress"], Literal["searching"], Literal["completed"], Literal["failed"]
    :vartype status: str or str or str or str
    :ivar action: An object describing the specific action taken in this web search call. Includes
     details on how the model used the web (search, open_page, find_in_page). Required. Is one of
     the following types: WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind
    :vartype action: ~azure.ai.agentserver.responses.models.models.WebSearchActionSearch or
     ~azure.ai.agentserver.responses.models.models.WebSearchActionOpenPage or
     ~azure.ai.agentserver.responses.models.models.WebSearchActionFind
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the web search tool call. Required."""
    type: Literal[OutputItemType.WEB_SEARCH_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the web search tool call. Always ``web_search_call``. Required. WEB_SEARCH_CALL."""
    status: Literal["in_progress", "searching", "completed", "failed"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the web search tool call. Required. Is one of the following types:
     Literal[\"in_progress\"], Literal[\"searching\"], Literal[\"completed\"], Literal[\"failed\"]"""
    action: Union["_models.WebSearchActionSearch", "_models.WebSearchActionOpenPage", "_models.WebSearchActionFind"] = (
        rest_field(visibility=["read", "create", "update", "delete", "query"])
    )
    """An object describing the specific action taken in this web search call. Includes details on how
     the model used the web (search, open_page, find_in_page). Required. Is one of the following
     types: WebSearchActionSearch, WebSearchActionOpenPage, WebSearchActionFind"""

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        status: Literal["in_progress", "searching", "completed", "failed"],
        action: Union[
            "_models.WebSearchActionSearch", "_models.WebSearchActionOpenPage", "_models.WebSearchActionFind"
        ],
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.WEB_SEARCH_CALL  # type: ignore


class OutputMessageContent(_Model):
    """OutputMessageContent.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    OutputMessageContentOutputTextContent, OutputMessageContentRefusalContent

    :ivar type: Required. Known values are: "output_text" and "refusal".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OutputMessageContentType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"output_text\" and \"refusal\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class OutputMessageContentOutputTextContent(OutputMessageContent, discriminator="output_text"):
    """Output text.

    :ivar type: The type of the output text. Always ``output_text``. Required. OUTPUT_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.OUTPUT_TEXT
    :ivar text: The text output from the model. Required.
    :vartype text: str
    :ivar annotations: The annotations of the text output. Required.
    :vartype annotations: list[~azure.ai.agentserver.responses.models.models.Annotation]
    :ivar logprobs: Required.
    :vartype logprobs: list[~azure.ai.agentserver.responses.models.models.LogProb]
    """

    type: Literal[OutputMessageContentType.OUTPUT_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the output text. Always ``output_text``. Required. OUTPUT_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text output from the model. Required."""
    annotations: list["_models.Annotation"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The annotations of the text output. Required."""
    logprobs: list["_models.LogProb"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
        annotations: list["_models.Annotation"],
        logprobs: list["_models.LogProb"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputMessageContentType.OUTPUT_TEXT  # type: ignore


class OutputMessageContentRefusalContent(OutputMessageContent, discriminator="refusal"):
    """Refusal.

    :ivar type: The type of the refusal. Always ``refusal``. Required. REFUSAL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.REFUSAL
    :ivar refusal: The refusal explanation from the model. Required.
    :vartype refusal: str
    """

    type: Literal[OutputMessageContentType.REFUSAL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the refusal. Always ``refusal``. Required. REFUSAL."""
    refusal: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The refusal explanation from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        refusal: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputMessageContentType.REFUSAL  # type: ignore


class Prompt(_Model):
    """Reference to a prompt template and its variables. `Learn more
    </docs/guides/text?api-mode=responses#reusable-prompts>`_.

    :ivar id: The unique identifier of the prompt template to use. Required.
    :vartype id: str
    :ivar version:
    :vartype version: str
    :ivar variables:
    :vartype variables: ~azure.ai.agentserver.responses.models.models.ResponsePromptVariables
    """

    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the prompt template to use. Required."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    variables: Optional["_models.ResponsePromptVariables"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )

    @overload
    def __init__(
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        version: Optional[str] = None,
        variables: Optional["_models.ResponsePromptVariables"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class RankingOptions(_Model):
    """RankingOptions.

    :ivar ranker: The ranker to use for the file search. Known values are: "auto" and
     "default-2024-11-15".
    :vartype ranker: str or ~azure.ai.agentserver.responses.models.models.RankerVersionType
    :ivar score_threshold: The score threshold for the file search, a number between 0 and 1.
     Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer
     results.
    :vartype score_threshold: int
    :ivar hybrid_search: Weights that control how reciprocal rank fusion balances semantic
     embedding matches versus sparse keyword matches when hybrid search is enabled.
    :vartype hybrid_search: ~azure.ai.agentserver.responses.models.models.HybridSearchOptions
    """

    ranker: Optional[Union[str, "_models.RankerVersionType"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The ranker to use for the file search. Known values are: \"auto\" and \"default-2024-11-15\"."""
    score_threshold: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will
     attempt to return only the most relevant results, but may return fewer results."""
    hybrid_search: Optional["_models.HybridSearchOptions"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Weights that control how reciprocal rank fusion balances semantic embedding matches versus
     sparse keyword matches when hybrid search is enabled."""

    @overload
    def __init__(
        self,
        *,
        ranker: Optional[Union[str, "_models.RankerVersionType"]] = None,
        score_threshold: Optional[int] = None,
        hybrid_search: Optional["_models.HybridSearchOptions"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class Reasoning(_Model):
    """Reasoning.

    :ivar effort: Is one of the following types: Literal["none"], Literal["minimal"],
     Literal["low"], Literal["medium"], Literal["high"], Literal["xhigh"]
    :vartype effort: str or str or str or str or str or str
    :ivar summary: Is one of the following types: Literal["auto"], Literal["concise"],
     Literal["detailed"]
    :vartype summary: str or str or str
    :ivar generate_summary: Is one of the following types: Literal["auto"], Literal["concise"],
     Literal["detailed"]
    :vartype generate_summary: str or str or str
    """

    effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"none\"], Literal[\"minimal\"], Literal[\"low\"],
     Literal[\"medium\"], Literal[\"high\"], Literal[\"xhigh\"]"""
    summary: Optional[Literal["auto", "concise", "detailed"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]"""
    generate_summary: Optional[Literal["auto", "concise", "detailed"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"auto\"], Literal[\"concise\"], Literal[\"detailed\"]"""

    @overload
    def __init__(
        self,
        *,
        effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] = None,
        summary: Optional[Literal["auto", "concise", "detailed"]] = None,
        generate_summary: Optional[Literal["auto", "concise", "detailed"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ReasoningTextContent(_Model):
    """Reasoning text.

    :ivar type: The type of the reasoning text. Always ``reasoning_text``. Required. Default value
     is "reasoning_text".
    :vartype type: str
    :ivar text: The reasoning text from the model. Required.
    :vartype text: str
    """

    type: Literal["reasoning_text"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of the reasoning text. Always ``reasoning_text``. Required. Default value is
     \"reasoning_text\"."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The reasoning text from the model. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["reasoning_text"] = "reasoning_text"


class ResponseStreamEvent(_Model):
    """ResponseStreamEvent.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ResponseErrorEvent, ResponseAudioDeltaEvent, ResponseAudioDoneEvent,
    ResponseAudioTranscriptDeltaEvent, ResponseAudioTranscriptDoneEvent,
    ResponseCodeInterpreterCallCompletedEvent, ResponseCodeInterpreterCallInProgressEvent,
    ResponseCodeInterpreterCallInterpretingEvent, ResponseCodeInterpreterCallCodeDeltaEvent,
    ResponseCodeInterpreterCallCodeDoneEvent, ResponseCompletedEvent,
    ResponseContentPartAddedEvent, ResponseContentPartDoneEvent, ResponseCreatedEvent,
    ResponseCustomToolCallInputDeltaEvent, ResponseCustomToolCallInputDoneEvent,
    ResponseFailedEvent, ResponseFileSearchCallCompletedEvent,
    ResponseFileSearchCallInProgressEvent, ResponseFileSearchCallSearchingEvent,
    ResponseFunctionCallArgumentsDeltaEvent, ResponseFunctionCallArgumentsDoneEvent,
    ResponseImageGenCallCompletedEvent, ResponseImageGenCallGeneratingEvent,
    ResponseImageGenCallInProgressEvent, ResponseImageGenCallPartialImageEvent,
    ResponseInProgressEvent, ResponseIncompleteEvent, ResponseMCPCallCompletedEvent,
    ResponseMCPCallFailedEvent, ResponseMCPCallInProgressEvent, ResponseMCPCallArgumentsDeltaEvent,
    ResponseMCPCallArgumentsDoneEvent, ResponseMCPListToolsCompletedEvent,
    ResponseMCPListToolsFailedEvent, ResponseMCPListToolsInProgressEvent,
    ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent,
    ResponseOutputTextAnnotationAddedEvent, ResponseTextDeltaEvent, ResponseTextDoneEvent,
    ResponseQueuedEvent, ResponseReasoningSummaryPartAddedEvent,
    ResponseReasoningSummaryPartDoneEvent, ResponseReasoningSummaryTextDeltaEvent,
    ResponseReasoningSummaryTextDoneEvent, ResponseReasoningTextDeltaEvent,
    ResponseReasoningTextDoneEvent, ResponseRefusalDeltaEvent, ResponseRefusalDoneEvent,
    ResponseWebSearchCallCompletedEvent, ResponseWebSearchCallInProgressEvent,
    ResponseWebSearchCallSearchingEvent

    :ivar type: Required. Known values are: "response.audio.delta", "response.audio.done",
     "response.audio.transcript.delta", "response.audio.transcript.done",
     "response.code_interpreter_call_code.delta", "response.code_interpreter_call_code.done",
     "response.code_interpreter_call.completed", "response.code_interpreter_call.in_progress",
     "response.code_interpreter_call.interpreting", "response.completed",
     "response.content_part.added", "response.content_part.done", "response.created", "error",
     "response.file_search_call.completed", "response.file_search_call.in_progress",
     "response.file_search_call.searching", "response.function_call_arguments.delta",
     "response.function_call_arguments.done", "response.in_progress", "response.failed",
     "response.incomplete", "response.output_item.added", "response.output_item.done",
     "response.reasoning_summary_part.added", "response.reasoning_summary_part.done",
     "response.reasoning_summary_text.delta", "response.reasoning_summary_text.done",
     "response.reasoning_text.delta", "response.reasoning_text.done", "response.refusal.delta",
     "response.refusal.done", "response.output_text.delta", "response.output_text.done",
     "response.web_search_call.completed", "response.web_search_call.in_progress",
     "response.web_search_call.searching", "response.image_generation_call.completed",
     "response.image_generation_call.generating", "response.image_generation_call.in_progress",
     "response.image_generation_call.partial_image", "response.mcp_call_arguments.delta",
     "response.mcp_call_arguments.done", "response.mcp_call.completed", "response.mcp_call.failed",
     "response.mcp_call.in_progress", "response.mcp_list_tools.completed",
     "response.mcp_list_tools.failed", "response.mcp_list_tools.in_progress",
     "response.output_text.annotation.added", "response.queued",
     "response.custom_tool_call_input.delta", and "response.custom_tool_call_input.done".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ResponseStreamEventType
    :ivar sequence_number: Required.
    :vartype sequence_number: int
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"response.audio.delta\", \"response.audio.done\",
     \"response.audio.transcript.delta\", \"response.audio.transcript.done\",
     \"response.code_interpreter_call_code.delta\", \"response.code_interpreter_call_code.done\",
     \"response.code_interpreter_call.completed\", \"response.code_interpreter_call.in_progress\",
     \"response.code_interpreter_call.interpreting\", \"response.completed\",
     \"response.content_part.added\", \"response.content_part.done\", \"response.created\",
     \"error\", \"response.file_search_call.completed\", \"response.file_search_call.in_progress\",
     \"response.file_search_call.searching\", \"response.function_call_arguments.delta\",
     \"response.function_call_arguments.done\", \"response.in_progress\", \"response.failed\",
     \"response.incomplete\", \"response.output_item.added\", \"response.output_item.done\",
     \"response.reasoning_summary_part.added\", \"response.reasoning_summary_part.done\",
     \"response.reasoning_summary_text.delta\", \"response.reasoning_summary_text.done\",
     \"response.reasoning_text.delta\", \"response.reasoning_text.done\",
     \"response.refusal.delta\", \"response.refusal.done\", \"response.output_text.delta\",
     \"response.output_text.done\", \"response.web_search_call.completed\",
     \"response.web_search_call.in_progress\", \"response.web_search_call.searching\",
     \"response.image_generation_call.completed\", \"response.image_generation_call.generating\",
     \"response.image_generation_call.in_progress\",
     \"response.image_generation_call.partial_image\", \"response.mcp_call_arguments.delta\",
     \"response.mcp_call_arguments.done\", \"response.mcp_call.completed\",
     \"response.mcp_call.failed\", \"response.mcp_call.in_progress\",
     \"response.mcp_list_tools.completed\", \"response.mcp_list_tools.failed\",
     \"response.mcp_list_tools.in_progress\", \"response.output_text.annotation.added\",
     \"response.queued\", \"response.custom_tool_call_input.delta\", and
     \"response.custom_tool_call_input.done\"."""
    sequence_number: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        type: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseAudioDeltaEvent(ResponseStreamEvent, discriminator="response.audio.delta"):
    """Emitted when there is a partial audio response.

    :ivar type: The type of the event. Always ``response.audio.delta``. Required.
     RESPONSE_AUDIO_DELTA.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_AUDIO_DELTA
    :ivar sequence_number: A sequence number for this chunk of the stream response. Required.
    :vartype sequence_number: int
    :ivar delta: A chunk of Base64 encoded response audio bytes. Required.
    :vartype delta: bytes
    """

    type: Literal[ResponseStreamEventType.RESPONSE_AUDIO_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.audio.delta``. Required. RESPONSE_AUDIO_DELTA."""
    delta: bytes = rest_field(visibility=["read", "create", "update", "delete", "query"], format="base64")
    """A chunk of Base64 encoded response audio bytes. Required."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
        delta: bytes,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_AUDIO_DELTA  # type: ignore


class ResponseAudioDoneEvent(ResponseStreamEvent, discriminator="response.audio.done"):
    """Emitted when the audio response is complete.

    :ivar type: The type of the event. Always ``response.audio.done``. Required.
     RESPONSE_AUDIO_DONE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_AUDIO_DONE
    :ivar sequence_number: The sequence number of the delta. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_AUDIO_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.audio.done``. Required. RESPONSE_AUDIO_DONE."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_AUDIO_DONE  # type: ignore


class ResponseAudioTranscriptDeltaEvent(ResponseStreamEvent, discriminator="response.audio.transcript.delta"):
    """Emitted when there is a partial transcript of audio.

    :ivar type: The type of the event. Always ``response.audio.transcript.delta``. Required.
     RESPONSE_AUDIO_TRANSCRIPT_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_AUDIO_TRANSCRIPT_DELTA
    :ivar delta: The partial transcript of the audio response. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_AUDIO_TRANSCRIPT_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.audio.transcript.delta``. Required.
     RESPONSE_AUDIO_TRANSCRIPT_DELTA."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The partial transcript of the audio response. Required."""

    @overload
    def __init__(
        self,
        *,
        delta: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_AUDIO_TRANSCRIPT_DELTA  # type: ignore


class ResponseAudioTranscriptDoneEvent(ResponseStreamEvent, discriminator="response.audio.transcript.done"):
    """Emitted when the full audio transcript is completed.

    :ivar type: The type of the event. Always ``response.audio.transcript.done``. Required.
     RESPONSE_AUDIO_TRANSCRIPT_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_AUDIO_TRANSCRIPT_DONE
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_AUDIO_TRANSCRIPT_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.audio.transcript.done``. Required.
     RESPONSE_AUDIO_TRANSCRIPT_DONE."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_AUDIO_TRANSCRIPT_DONE  # type: ignore


class ResponseCodeInterpreterCallCodeDeltaEvent(
    ResponseStreamEvent, discriminator="response.code_interpreter_call_code.delta"
):  # pylint: disable=name-too-long
    """Emitted when a partial code snippet is streamed by the code interpreter.

    :ivar type: The type of the event. Always ``response.code_interpreter_call_code.delta``.
     Required. RESPONSE_CODE_INTERPRETER_CALL_CODE_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CODE_INTERPRETER_CALL_CODE_DELTA
    :ivar output_index: The index of the output item in the response for which the code is being
     streamed. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the code interpreter tool call item. Required.
    :vartype item_id: str
    :ivar delta: The partial code snippet being streamed by the code interpreter. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number of this event, used to order streaming events.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_CODE_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.code_interpreter_call_code.delta``. Required.
     RESPONSE_CODE_INTERPRETER_CALL_CODE_DELTA."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response for which the code is being streamed. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the code interpreter tool call item. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The partial code snippet being streamed by the code interpreter. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        delta: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_CODE_DELTA  # type: ignore


class ResponseCodeInterpreterCallCodeDoneEvent(
    ResponseStreamEvent, discriminator="response.code_interpreter_call_code.done"
):
    """Emitted when the code snippet is finalized by the code interpreter.

    :ivar type: The type of the event. Always ``response.code_interpreter_call_code.done``.
     Required. RESPONSE_CODE_INTERPRETER_CALL_CODE_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CODE_INTERPRETER_CALL_CODE_DONE
    :ivar output_index: The index of the output item in the response for which the code is
     finalized. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the code interpreter tool call item. Required.
    :vartype item_id: str
    :ivar code: The final code snippet output by the code interpreter. Required.
    :vartype code: str
    :ivar sequence_number: The sequence number of this event, used to order streaming events.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_CODE_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.code_interpreter_call_code.done``. Required.
     RESPONSE_CODE_INTERPRETER_CALL_CODE_DONE."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response for which the code is finalized. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the code interpreter tool call item. Required."""
    code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The final code snippet output by the code interpreter. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        code: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_CODE_DONE  # type: ignore


class ResponseCodeInterpreterCallCompletedEvent(
    ResponseStreamEvent, discriminator="response.code_interpreter_call.completed"
):  # pylint: disable=name-too-long
    """Emitted when the code interpreter call is completed.

    :ivar type: The type of the event. Always ``response.code_interpreter_call.completed``.
     Required. RESPONSE_CODE_INTERPRETER_CALL_COMPLETED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CODE_INTERPRETER_CALL_COMPLETED
    :ivar output_index: The index of the output item in the response for which the code interpreter
     call is completed. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the code interpreter tool call item. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of this event, used to order streaming events.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.code_interpreter_call.completed``. Required.
     RESPONSE_CODE_INTERPRETER_CALL_COMPLETED."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response for which the code interpreter call is completed.
     Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the code interpreter tool call item. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_COMPLETED  # type: ignore


class ResponseCodeInterpreterCallInProgressEvent(
    ResponseStreamEvent, discriminator="response.code_interpreter_call.in_progress"
):  # pylint: disable=name-too-long
    """Emitted when a code interpreter call is in progress.

    :ivar type: The type of the event. Always ``response.code_interpreter_call.in_progress``.
     Required. RESPONSE_CODE_INTERPRETER_CALL_IN_PROGRESS.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CODE_INTERPRETER_CALL_IN_PROGRESS
    :ivar output_index: The index of the output item in the response for which the code interpreter
     call is in progress. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the code interpreter tool call item. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of this event, used to order streaming events.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.code_interpreter_call.in_progress``. Required.
     RESPONSE_CODE_INTERPRETER_CALL_IN_PROGRESS."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response for which the code interpreter call is in
     progress. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the code interpreter tool call item. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_IN_PROGRESS  # type: ignore


class ResponseCodeInterpreterCallInterpretingEvent(
    ResponseStreamEvent, discriminator="response.code_interpreter_call.interpreting"
):  # pylint: disable=name-too-long
    """Emitted when the code interpreter is actively interpreting the code snippet.

    :ivar type: The type of the event. Always ``response.code_interpreter_call.interpreting``.
     Required. RESPONSE_CODE_INTERPRETER_CALL_INTERPRETING.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CODE_INTERPRETER_CALL_INTERPRETING
    :ivar output_index: The index of the output item in the response for which the code interpreter
     is interpreting code. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the code interpreter tool call item. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of this event, used to order streaming events.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_INTERPRETING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.code_interpreter_call.interpreting``. Required.
     RESPONSE_CODE_INTERPRETER_CALL_INTERPRETING."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response for which the code interpreter is interpreting
     code. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the code interpreter tool call item. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CODE_INTERPRETER_CALL_INTERPRETING  # type: ignore


class ResponseCompletedEvent(ResponseStreamEvent, discriminator="response.completed"):
    """Emitted when the model response is complete.

    :ivar type: The type of the event. Always ``response.completed``. Required. RESPONSE_COMPLETED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_COMPLETED
    :ivar response: Properties of the completed response. Required.
    :vartype response: ~azure.ai.agentserver.responses.models.models.ResponseObject
    :ivar sequence_number: The sequence number for this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.completed``. Required. RESPONSE_COMPLETED."""
    response: "_models.ResponseObject" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Properties of the completed response. Required."""

    @overload
    def __init__(
        self,
        *,
        response: "_models.ResponseObject",
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_COMPLETED  # type: ignore


class ResponseContentPartAddedEvent(ResponseStreamEvent, discriminator="response.content_part.added"):
    """Emitted when a new content part is added.

    :ivar type: The type of the event. Always ``response.content_part.added``. Required.
     RESPONSE_CONTENT_PART_ADDED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_CONTENT_PART_ADDED
    :ivar item_id: The ID of the output item that the content part was added to. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the content part was added to. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part that was added. Required.
    :vartype content_index: int
    :ivar part: The content part that was added. Required.
    :vartype part: ~azure.ai.agentserver.responses.models.models.OutputContent
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CONTENT_PART_ADDED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.content_part.added``. Required.
     RESPONSE_CONTENT_PART_ADDED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the content part was added to. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the content part was added to. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part that was added. Required."""
    part: "_models.OutputContent" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content part that was added. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        part: "_models.OutputContent",
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CONTENT_PART_ADDED  # type: ignore


class ResponseContentPartDoneEvent(ResponseStreamEvent, discriminator="response.content_part.done"):
    """Emitted when a content part is done.

    :ivar type: The type of the event. Always ``response.content_part.done``. Required.
     RESPONSE_CONTENT_PART_DONE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_CONTENT_PART_DONE
    :ivar item_id: The ID of the output item that the content part was added to. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the content part was added to. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part that is done. Required.
    :vartype content_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar part: The content part that is done. Required.
    :vartype part: ~azure.ai.agentserver.responses.models.models.OutputContent
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CONTENT_PART_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.content_part.done``. Required.
     RESPONSE_CONTENT_PART_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the content part was added to. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the content part was added to. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part that is done. Required."""
    part: "_models.OutputContent" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The content part that is done. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        sequence_number: int,
        part: "_models.OutputContent",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CONTENT_PART_DONE  # type: ignore


class ResponseCreatedEvent(ResponseStreamEvent, discriminator="response.created"):
    """An event that is emitted when a response is created.

    :ivar type: The type of the event. Always ``response.created``. Required. RESPONSE_CREATED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_CREATED
    :ivar response: The response that was created. Required.
    :vartype response: ~azure.ai.agentserver.responses.models.models.ResponseObject
    :ivar sequence_number: The sequence number for this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CREATED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.created``. Required. RESPONSE_CREATED."""
    response: "_models.ResponseObject" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The response that was created. Required."""

    @overload
    def __init__(
        self,
        *,
        response: "_models.ResponseObject",
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CREATED  # type: ignore


class ResponseCustomToolCallInputDeltaEvent(ResponseStreamEvent, discriminator="response.custom_tool_call_input.delta"):
    """ResponseCustomToolCallInputDelta.

    :ivar type: The event type identifier. Required. RESPONSE_CUSTOM_TOOL_CALL_INPUT_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CUSTOM_TOOL_CALL_INPUT_DELTA
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar output_index: The index of the output this delta applies to. Required.
    :vartype output_index: int
    :ivar item_id: Unique identifier for the API item associated with this event. Required.
    :vartype item_id: str
    :ivar delta: The incremental input data (delta) for the custom tool call. Required.
    :vartype delta: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CUSTOM_TOOL_CALL_INPUT_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The event type identifier. Required. RESPONSE_CUSTOM_TOOL_CALL_INPUT_DELTA."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output this delta applies to. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique identifier for the API item associated with this event. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The incremental input data (delta) for the custom tool call. Required."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
        output_index: int,
        item_id: str,
        delta: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CUSTOM_TOOL_CALL_INPUT_DELTA  # type: ignore


class ResponseCustomToolCallInputDoneEvent(ResponseStreamEvent, discriminator="response.custom_tool_call_input.done"):
    """ResponseCustomToolCallInputDone.

    :ivar type: The event type identifier. Required. RESPONSE_CUSTOM_TOOL_CALL_INPUT_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_CUSTOM_TOOL_CALL_INPUT_DONE
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar output_index: The index of the output this event applies to. Required.
    :vartype output_index: int
    :ivar item_id: Unique identifier for the API item associated with this event. Required.
    :vartype item_id: str
    :ivar input: The complete input data for the custom tool call. Required.
    :vartype input: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_CUSTOM_TOOL_CALL_INPUT_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The event type identifier. Required. RESPONSE_CUSTOM_TOOL_CALL_INPUT_DONE."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output this event applies to. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique identifier for the API item associated with this event. Required."""
    input: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The complete input data for the custom tool call. Required."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
        output_index: int,
        item_id: str,
        input: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_CUSTOM_TOOL_CALL_INPUT_DONE  # type: ignore


class ResponseErrorEvent(ResponseStreamEvent, discriminator="error"):
    """Emitted when an error occurs.

    :ivar type: The type of the event. Always ``error``. Required. ERROR.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ERROR
    :ivar code: Required.
    :vartype code: str
    :ivar message: The error message. Required.
    :vartype message: str
    :ivar param: Required.
    :vartype param: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.ERROR] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``error``. Required. ERROR."""
    code: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The error message. Required."""
    param: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        code: str,
        message: str,
        param: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.ERROR  # type: ignore


class ResponseErrorInfo(_Model):
    """An error object returned when the model fails to generate a Response.

    :ivar code: Required. Known values are: "server_error", "rate_limit_exceeded",
     "invalid_prompt", "vector_store_timeout", "invalid_image", "invalid_image_format",
     "invalid_base64_image", "invalid_image_url", "image_too_large", "image_too_small",
     "image_parse_error", "image_content_policy_violation", "invalid_image_mode",
     "image_file_too_large", "unsupported_image_media_type", "empty_image_file",
     "failed_to_download_image", and "image_file_not_found".
    :vartype code: str or ~azure.ai.agentserver.responses.models.models.ResponseErrorCode
    :ivar message: A human-readable description of the error. Required.
    :vartype message: str
    """

    code: Union[str, "_models.ResponseErrorCode"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Known values are: \"server_error\", \"rate_limit_exceeded\", \"invalid_prompt\",
     \"vector_store_timeout\", \"invalid_image\", \"invalid_image_format\",
     \"invalid_base64_image\", \"invalid_image_url\", \"image_too_large\", \"image_too_small\",
     \"image_parse_error\", \"image_content_policy_violation\", \"invalid_image_mode\",
     \"image_file_too_large\", \"unsupported_image_media_type\", \"empty_image_file\",
     \"failed_to_download_image\", and \"image_file_not_found\"."""
    message: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A human-readable description of the error. Required."""

    @overload
    def __init__(
        self,
        *,
        code: Union[str, "_models.ResponseErrorCode"],
        message: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseFailedEvent(ResponseStreamEvent, discriminator="response.failed"):
    """An event that is emitted when a response fails.

    :ivar type: The type of the event. Always ``response.failed``. Required. RESPONSE_FAILED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_FAILED
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar response: The response that failed. Required.
    :vartype response: ~azure.ai.agentserver.responses.models.models.ResponseObject
    """

    type: Literal[ResponseStreamEventType.RESPONSE_FAILED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.failed``. Required. RESPONSE_FAILED."""
    response: "_models.ResponseObject" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The response that failed. Required."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
        response: "_models.ResponseObject",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_FAILED  # type: ignore


class ResponseFileSearchCallCompletedEvent(ResponseStreamEvent, discriminator="response.file_search_call.completed"):
    """Emitted when a file search call is completed (results found).

    :ivar type: The type of the event. Always ``response.file_search_call.completed``. Required.
     RESPONSE_FILE_SEARCH_CALL_COMPLETED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_FILE_SEARCH_CALL_COMPLETED
    :ivar output_index: The index of the output item that the file search call is initiated.
     Required.
    :vartype output_index: int
    :ivar item_id: The ID of the output item that the file search call is initiated. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_FILE_SEARCH_CALL_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.file_search_call.completed``. Required.
     RESPONSE_FILE_SEARCH_CALL_COMPLETED."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the file search call is initiated. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the file search call is initiated. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_FILE_SEARCH_CALL_COMPLETED  # type: ignore


class ResponseFileSearchCallInProgressEvent(ResponseStreamEvent, discriminator="response.file_search_call.in_progress"):
    """Emitted when a file search call is initiated.

    :ivar type: The type of the event. Always ``response.file_search_call.in_progress``. Required.
     RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS
    :ivar output_index: The index of the output item that the file search call is initiated.
     Required.
    :vartype output_index: int
    :ivar item_id: The ID of the output item that the file search call is initiated. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.file_search_call.in_progress``. Required.
     RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the file search call is initiated. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the file search call is initiated. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_FILE_SEARCH_CALL_IN_PROGRESS  # type: ignore


class ResponseFileSearchCallSearchingEvent(ResponseStreamEvent, discriminator="response.file_search_call.searching"):
    """Emitted when a file search is currently searching.

    :ivar type: The type of the event. Always ``response.file_search_call.searching``. Required.
     RESPONSE_FILE_SEARCH_CALL_SEARCHING.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_FILE_SEARCH_CALL_SEARCHING
    :ivar output_index: The index of the output item that the file search call is searching.
     Required.
    :vartype output_index: int
    :ivar item_id: The ID of the output item that the file search call is initiated. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_FILE_SEARCH_CALL_SEARCHING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.file_search_call.searching``. Required.
     RESPONSE_FILE_SEARCH_CALL_SEARCHING."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the file search call is searching. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the file search call is initiated. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_FILE_SEARCH_CALL_SEARCHING  # type: ignore


class ResponseFormatJsonSchemaSchema(_Model):
    """JSON schema."""


class ResponseFunctionCallArgumentsDeltaEvent(
    ResponseStreamEvent, discriminator="response.function_call_arguments.delta"
):
    """Emitted when there is a partial function-call arguments delta.

    :ivar type: The type of the event. Always ``response.function_call_arguments.delta``. Required.
     RESPONSE_FUNCTION_CALL_ARGUMENTS_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_FUNCTION_CALL_ARGUMENTS_DELTA
    :ivar item_id: The ID of the output item that the function-call arguments delta is added to.
     Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the function-call arguments delta is
     added to. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar delta: The function-call arguments delta that is added. Required.
    :vartype delta: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.function_call_arguments.delta``. Required.
     RESPONSE_FUNCTION_CALL_ARGUMENTS_DELTA."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the function-call arguments delta is added to. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the function-call arguments delta is added to. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The function-call arguments delta that is added. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        sequence_number: int,
        delta: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DELTA  # type: ignore


class ResponseFunctionCallArgumentsDoneEvent(
    ResponseStreamEvent, discriminator="response.function_call_arguments.done"
):
    """Emitted when function-call arguments are finalized.

    :ivar type: Required. RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE
    :ivar item_id: The ID of the item. Required.
    :vartype item_id: str
    :ivar name: The name of the function that was called. Required.
    :vartype name: str
    :ivar output_index: The index of the output item. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar arguments: The function-call arguments. Required.
    :vartype arguments: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item. Required."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function that was called. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The function-call arguments. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        name: str,
        output_index: int,
        sequence_number: int,
        arguments: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE  # type: ignore


class ResponseImageGenCallCompletedEvent(ResponseStreamEvent, discriminator="response.image_generation_call.completed"):
    """ResponseImageGenCallCompletedEvent.

    :ivar type: The type of the event. Always 'response.image_generation_call.completed'. Required.
     RESPONSE_IMAGE_GENERATION_CALL_COMPLETED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_IMAGE_GENERATION_CALL_COMPLETED
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar item_id: The unique identifier of the image generation item being processed. Required.
    :vartype item_id: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.image_generation_call.completed'. Required.
     RESPONSE_IMAGE_GENERATION_CALL_COMPLETED."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the image generation item being processed. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        sequence_number: int,
        item_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_COMPLETED  # type: ignore


class ResponseImageGenCallGeneratingEvent(
    ResponseStreamEvent, discriminator="response.image_generation_call.generating"
):
    """ResponseImageGenCallGeneratingEvent.

    :ivar type: The type of the event. Always 'response.image_generation_call.generating'.
     Required. RESPONSE_IMAGE_GENERATION_CALL_GENERATING.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_IMAGE_GENERATION_CALL_GENERATING
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the image generation item being processed. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of the image generation item being processed.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_GENERATING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.image_generation_call.generating'. Required.
     RESPONSE_IMAGE_GENERATION_CALL_GENERATING."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the image generation item being processed. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_GENERATING  # type: ignore


class ResponseImageGenCallInProgressEvent(
    ResponseStreamEvent, discriminator="response.image_generation_call.in_progress"
):
    """ResponseImageGenCallInProgressEvent.

    :ivar type: The type of the event. Always 'response.image_generation_call.in_progress'.
     Required. RESPONSE_IMAGE_GENERATION_CALL_IN_PROGRESS.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_IMAGE_GENERATION_CALL_IN_PROGRESS
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the image generation item being processed. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of the image generation item being processed.
     Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.image_generation_call.in_progress'. Required.
     RESPONSE_IMAGE_GENERATION_CALL_IN_PROGRESS."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the image generation item being processed. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_IN_PROGRESS  # type: ignore


class ResponseImageGenCallPartialImageEvent(
    ResponseStreamEvent, discriminator="response.image_generation_call.partial_image"
):
    """ResponseImageGenCallPartialImageEvent.

    :ivar type: The type of the event. Always 'response.image_generation_call.partial_image'.
     Required. RESPONSE_IMAGE_GENERATION_CALL_PARTIAL_IMAGE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_IMAGE_GENERATION_CALL_PARTIAL_IMAGE
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the image generation item being processed. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of the image generation item being processed.
     Required.
    :vartype sequence_number: int
    :ivar partial_image_index: 0-based index for the partial image (backend is 1-based, but this is
     0-based for the user). Required.
    :vartype partial_image_index: int
    :ivar partial_image_b64: Base64-encoded partial image data, suitable for rendering as an image.
     Required.
    :vartype partial_image_b64: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_PARTIAL_IMAGE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.image_generation_call.partial_image'. Required.
     RESPONSE_IMAGE_GENERATION_CALL_PARTIAL_IMAGE."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the image generation item being processed. Required."""
    partial_image_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """0-based index for the partial image (backend is 1-based, but this is 0-based for the user).
     Required."""
    partial_image_b64: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Base64-encoded partial image data, suitable for rendering as an image. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
        partial_image_index: int,
        partial_image_b64: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_IMAGE_GENERATION_CALL_PARTIAL_IMAGE  # type: ignore


class ResponseIncompleteDetails(_Model):
    """ResponseIncompleteDetails.

    :ivar reason: Is either a Literal["max_output_tokens"] type or a Literal["content_filter"]
     type.
    :vartype reason: str or str
    """

    reason: Optional[Literal["max_output_tokens", "content_filter"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Literal[\"max_output_tokens\"] type or a Literal[\"content_filter\"] type."""

    @overload
    def __init__(
        self,
        *,
        reason: Optional[Literal["max_output_tokens", "content_filter"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseIncompleteEvent(ResponseStreamEvent, discriminator="response.incomplete"):
    """An event that is emitted when a response finishes as incomplete.

    :ivar type: The type of the event. Always ``response.incomplete``. Required.
     RESPONSE_INCOMPLETE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_INCOMPLETE
    :ivar response: The response that was incomplete. Required.
    :vartype response: ~azure.ai.agentserver.responses.models.models.ResponseObject
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_INCOMPLETE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.incomplete``. Required. RESPONSE_INCOMPLETE."""
    response: "_models.ResponseObject" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The response that was incomplete. Required."""

    @overload
    def __init__(
        self,
        *,
        response: "_models.ResponseObject",
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_INCOMPLETE  # type: ignore


class ResponseInProgressEvent(ResponseStreamEvent, discriminator="response.in_progress"):
    """Emitted when the response is in progress.

    :ivar type: The type of the event. Always ``response.in_progress``. Required.
     RESPONSE_IN_PROGRESS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_IN_PROGRESS
    :ivar response: The response that is in progress. Required.
    :vartype response: ~azure.ai.agentserver.responses.models.models.ResponseObject
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.in_progress``. Required. RESPONSE_IN_PROGRESS."""
    response: "_models.ResponseObject" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The response that is in progress. Required."""

    @overload
    def __init__(
        self,
        *,
        response: "_models.ResponseObject",
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_IN_PROGRESS  # type: ignore


class ResponseLogProb(_Model):
    """A logprob is the logarithmic probability that the model assigns to producing a particular token
    at a given position in the sequence. Less-negative (higher) logprob values indicate greater
    model confidence in that token choice.

    :ivar token: A possible text token. Required.
    :vartype token: str
    :ivar logprob: The log probability of this token. Required.
    :vartype logprob: int
    :ivar top_logprobs: The log probability of the top 20 most likely tokens.
    :vartype top_logprobs:
     list[~azure.ai.agentserver.responses.models.models.ResponseLogProbTopLogprobs]
    """

    token: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A possible text token. Required."""
    logprob: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The log probability of this token. Required."""
    top_logprobs: Optional[list["_models.ResponseLogProbTopLogprobs"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The log probability of the top 20 most likely tokens."""

    @overload
    def __init__(
        self,
        *,
        token: str,
        logprob: int,
        top_logprobs: Optional[list["_models.ResponseLogProbTopLogprobs"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseLogProbTopLogprobs(_Model):
    """ResponseLogProbTopLogprobs.

    :ivar token:
    :vartype token: str
    :ivar logprob:
    :vartype logprob: int
    """

    token: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    logprob: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        token: Optional[str] = None,
        logprob: Optional[int] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseMCPCallArgumentsDeltaEvent(ResponseStreamEvent, discriminator="response.mcp_call_arguments.delta"):
    """ResponseMCPCallArgumentsDeltaEvent.

    :ivar type: The type of the event. Always 'response.mcp_call_arguments.delta'. Required.
     RESPONSE_MCP_CALL_ARGUMENTS_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_CALL_ARGUMENTS_DELTA
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the MCP tool call item being processed. Required.
    :vartype item_id: str
    :ivar delta: A JSON string containing the partial update to the arguments for the MCP tool
     call. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_CALL_ARGUMENTS_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_call_arguments.delta'. Required.
     RESPONSE_MCP_CALL_ARGUMENTS_DELTA."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the MCP tool call item being processed. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string containing the partial update to the arguments for the MCP tool call. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        delta: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_CALL_ARGUMENTS_DELTA  # type: ignore


class ResponseMCPCallArgumentsDoneEvent(ResponseStreamEvent, discriminator="response.mcp_call_arguments.done"):
    """ResponseMCPCallArgumentsDoneEvent.

    :ivar type: The type of the event. Always 'response.mcp_call_arguments.done'. Required.
     RESPONSE_MCP_CALL_ARGUMENTS_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_CALL_ARGUMENTS_DONE
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the MCP tool call item being processed. Required.
    :vartype item_id: str
    :ivar arguments: A JSON string containing the finalized arguments for the MCP tool call.
     Required.
    :vartype arguments: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_CALL_ARGUMENTS_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_call_arguments.done'. Required.
     RESPONSE_MCP_CALL_ARGUMENTS_DONE."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the MCP tool call item being processed. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string containing the finalized arguments for the MCP tool call. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        arguments: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_CALL_ARGUMENTS_DONE  # type: ignore


class ResponseMCPCallCompletedEvent(ResponseStreamEvent, discriminator="response.mcp_call.completed"):
    """ResponseMCPCallCompletedEvent.

    :ivar type: The type of the event. Always 'response.mcp_call.completed'. Required.
     RESPONSE_MCP_CALL_COMPLETED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_CALL_COMPLETED
    :ivar item_id: The ID of the MCP tool call item that completed. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that completed. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_CALL_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_call.completed'. Required.
     RESPONSE_MCP_CALL_COMPLETED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the MCP tool call item that completed. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that completed. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_CALL_COMPLETED  # type: ignore


class ResponseMCPCallFailedEvent(ResponseStreamEvent, discriminator="response.mcp_call.failed"):
    """ResponseMCPCallFailedEvent.

    :ivar type: The type of the event. Always 'response.mcp_call.failed'. Required.
     RESPONSE_MCP_CALL_FAILED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_CALL_FAILED
    :ivar item_id: The ID of the MCP tool call item that failed. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that failed. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_CALL_FAILED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_call.failed'. Required. RESPONSE_MCP_CALL_FAILED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the MCP tool call item that failed. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that failed. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_CALL_FAILED  # type: ignore


class ResponseMCPCallInProgressEvent(ResponseStreamEvent, discriminator="response.mcp_call.in_progress"):
    """ResponseMCPCallInProgressEvent.

    :ivar type: The type of the event. Always 'response.mcp_call.in_progress'. Required.
     RESPONSE_MCP_CALL_IN_PROGRESS.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_CALL_IN_PROGRESS
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar item_id: The unique identifier of the MCP tool call item being processed. Required.
    :vartype item_id: str
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_CALL_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_call.in_progress'. Required.
     RESPONSE_MCP_CALL_IN_PROGRESS."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the MCP tool call item being processed. Required."""

    @overload
    def __init__(
        self,
        *,
        sequence_number: int,
        output_index: int,
        item_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_CALL_IN_PROGRESS  # type: ignore


class ResponseMCPListToolsCompletedEvent(ResponseStreamEvent, discriminator="response.mcp_list_tools.completed"):
    """ResponseMCPListToolsCompletedEvent.

    :ivar type: The type of the event. Always 'response.mcp_list_tools.completed'. Required.
     RESPONSE_MCP_LIST_TOOLS_COMPLETED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_LIST_TOOLS_COMPLETED
    :ivar item_id: The ID of the MCP tool call item that produced this output. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that was processed. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_LIST_TOOLS_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_list_tools.completed'. Required.
     RESPONSE_MCP_LIST_TOOLS_COMPLETED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the MCP tool call item that produced this output. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that was processed. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_LIST_TOOLS_COMPLETED  # type: ignore


class ResponseMCPListToolsFailedEvent(ResponseStreamEvent, discriminator="response.mcp_list_tools.failed"):
    """ResponseMCPListToolsFailedEvent.

    :ivar type: The type of the event. Always 'response.mcp_list_tools.failed'. Required.
     RESPONSE_MCP_LIST_TOOLS_FAILED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_LIST_TOOLS_FAILED
    :ivar item_id: The ID of the MCP tool call item that failed. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that failed. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_LIST_TOOLS_FAILED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_list_tools.failed'. Required.
     RESPONSE_MCP_LIST_TOOLS_FAILED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the MCP tool call item that failed. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that failed. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_LIST_TOOLS_FAILED  # type: ignore


class ResponseMCPListToolsInProgressEvent(ResponseStreamEvent, discriminator="response.mcp_list_tools.in_progress"):
    """ResponseMCPListToolsInProgressEvent.

    :ivar type: The type of the event. Always 'response.mcp_list_tools.in_progress'. Required.
     RESPONSE_MCP_LIST_TOOLS_IN_PROGRESS.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_MCP_LIST_TOOLS_IN_PROGRESS
    :ivar item_id: The ID of the MCP tool call item that is being processed. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that is being processed. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_MCP_LIST_TOOLS_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.mcp_list_tools.in_progress'. Required.
     RESPONSE_MCP_LIST_TOOLS_IN_PROGRESS."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the MCP tool call item that is being processed. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that is being processed. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_MCP_LIST_TOOLS_IN_PROGRESS  # type: ignore


class ResponseObject(_Model):
    """The response object.

    :ivar metadata:
    :vartype metadata: ~azure.ai.agentserver.responses.models.models.Metadata
    :ivar top_logprobs:
    :vartype top_logprobs: int
    :ivar temperature:
    :vartype temperature: int
    :ivar top_p:
    :vartype top_p: int
    :ivar user: This field is being replaced by ``safety_identifier`` and ``prompt_cache_key``. Use
     ``prompt_cache_key`` instead to maintain caching optimizations. A stable identifier for your
     end-users. Used to boost cache hit rates by better bucketing similar requests and  to help
     OpenAI detect and prevent abuse. `Learn more
     </docs/guides/safety-best-practices#safety-identifiers>`_.
    :vartype user: str
    :ivar safety_identifier: A stable identifier used to help detect users of your application that
     may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies
     each user. We recommend hashing their username or email address, in order to avoid sending us
     any identifying information. `Learn more
     </docs/guides/safety-best-practices#safety-identifiers>`_.
    :vartype safety_identifier: str
    :ivar prompt_cache_key: Used by OpenAI to cache responses for similar requests to optimize your
     cache hit rates. Replaces the ``user`` field. `Learn more </docs/guides/prompt-caching>`_.
    :vartype prompt_cache_key: str
    :ivar service_tier: Is one of the following types: Literal["auto"], Literal["default"],
     Literal["flex"], Literal["scale"], Literal["priority"]
    :vartype service_tier: str or str or str or str or str
    :ivar prompt_cache_retention: Is either a Literal["in-memory"] type or a Literal["24h"] type.
    :vartype prompt_cache_retention: str or str
    :ivar previous_response_id:
    :vartype previous_response_id: str
    :ivar model: The model deployment to use for the creation of this response.
    :vartype model: str
    :ivar reasoning:
    :vartype reasoning: ~azure.ai.agentserver.responses.models.models.Reasoning
    :ivar background:
    :vartype background: bool
    :ivar max_output_tokens:
    :vartype max_output_tokens: int
    :ivar max_tool_calls:
    :vartype max_tool_calls: int
    :ivar text:
    :vartype text: ~azure.ai.agentserver.responses.models.models.ResponseTextParam
    :ivar tools:
    :vartype tools: list[~azure.ai.agentserver.responses.models.models.Tool]
    :ivar tool_choice: Is either a Union[str, "_models.ToolChoiceOptions"] type or a
     ToolChoiceParam type.
    :vartype tool_choice: str or ~azure.ai.agentserver.responses.models.models.ToolChoiceOptions or
     ~azure.ai.agentserver.responses.models.models.ToolChoiceParam
    :ivar prompt:
    :vartype prompt: ~azure.ai.agentserver.responses.models.models.Prompt
    :ivar truncation: Is either a Literal["auto"] type or a Literal["disabled"] type.
    :vartype truncation: str or str
    :ivar id: Unique identifier for this Response. Required.
    :vartype id: str
    :ivar object: The object type of this resource - always set to ``response``. Required. Default
     value is "response".
    :vartype object: str
    :ivar status: The status of the response generation. One of ``completed``, ``failed``,
     ``in_progress``, ``cancelled``, ``queued``, or ``incomplete``. Is one of the following types:
     Literal["completed"], Literal["failed"], Literal["in_progress"], Literal["cancelled"],
     Literal["queued"], Literal["incomplete"]
    :vartype status: str or str or str or str or str or str
    :ivar created_at: Unix timestamp (in seconds) of when this Response was created. Required.
    :vartype created_at: ~datetime.datetime
    :ivar completed_at:
    :vartype completed_at: ~datetime.datetime
    :ivar error: Required.
    :vartype error: ~azure.ai.agentserver.responses.models.models.ResponseErrorInfo
    :ivar incomplete_details: Required.
    :vartype incomplete_details:
     ~azure.ai.agentserver.responses.models.models.ResponseIncompleteDetails
    :ivar output: An array of content items generated by the model.

     * The length and order of items in the `output` array is dependent
     on the model's response.
     * Rather than accessing the first item in the `output` array and
     assuming it's an `assistant` message with the content generated by
     the model, you might consider using the `output_text` property where
     supported in SDKs. Required.
    :vartype output: list[~azure.ai.agentserver.responses.models.models.OutputItem]
    :ivar instructions: Required. Is either a str type or a [Item] type.
    :vartype instructions: str or list[~azure.ai.agentserver.responses.models.models.Item]
    :ivar output_text:
    :vartype output_text: str
    :ivar usage:
    :vartype usage: ~azure.ai.agentserver.responses.models.models.ResponseUsage
    :ivar parallel_tool_calls: Whether to allow the model to run tool calls in parallel. Required.
    :vartype parallel_tool_calls: bool
    :ivar conversation:
    :vartype conversation: ~azure.ai.agentserver.responses.models.models.ConversationReference
    :ivar agent_reference: The agent used for this response. Required.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    """

    metadata: Optional["_models.Metadata"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    top_logprobs: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    temperature: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    top_p: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    user: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """This field is being replaced by ``safety_identifier`` and ``prompt_cache_key``. Use
     ``prompt_cache_key`` instead to maintain caching optimizations. A stable identifier for your
     end-users. Used to boost cache hit rates by better bucketing similar requests and  to help
     OpenAI detect and prevent abuse. `Learn more
     </docs/guides/safety-best-practices#safety-identifiers>`_."""
    safety_identifier: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A stable identifier used to help detect users of your application that may be violating
     OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We
     recommend hashing their username or email address, in order to avoid sending us any identifying
     information. `Learn more </docs/guides/safety-best-practices#safety-identifiers>`_."""
    prompt_cache_key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Used by OpenAI to cache responses for similar requests to optimize your cache hit rates.
     Replaces the ``user`` field. `Learn more </docs/guides/prompt-caching>`_."""
    service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"auto\"], Literal[\"default\"], Literal[\"flex\"],
     Literal[\"scale\"], Literal[\"priority\"]"""
    prompt_cache_retention: Optional[Literal["in-memory", "24h"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Literal[\"in-memory\"] type or a Literal[\"24h\"] type."""
    previous_response_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    model: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The model deployment to use for the creation of this response."""
    reasoning: Optional["_models.Reasoning"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    background: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    max_output_tokens: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    max_tool_calls: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    text: Optional["_models.ResponseTextParam"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    tools: Optional[list["_models.Tool"]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    tool_choice: Optional[Union[str, "_models.ToolChoiceOptions", "_models.ToolChoiceParam"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Union[str, \"_models.ToolChoiceOptions\"] type or a ToolChoiceParam type."""
    prompt: Optional["_models.Prompt"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    truncation: Optional[Literal["auto", "disabled"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is either a Literal[\"auto\"] type or a Literal[\"disabled\"] type."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique identifier for this Response. Required."""
    object: Literal["response"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The object type of this resource - always set to ``response``. Required. Default value is
     \"response\"."""
    status: Optional[Literal["completed", "failed", "in_progress", "cancelled", "queued", "incomplete"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the response generation. One of ``completed``, ``failed``, ``in_progress``,
     ``cancelled``, ``queued``, or ``incomplete``. Is one of the following types:
     Literal[\"completed\"], Literal[\"failed\"], Literal[\"in_progress\"], Literal[\"cancelled\"],
     Literal[\"queued\"], Literal[\"incomplete\"]"""
    created_at: datetime.datetime = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="unix-timestamp"
    )
    """Unix timestamp (in seconds) of when this Response was created. Required."""
    completed_at: Optional[datetime.datetime] = rest_field(
        visibility=["read", "create", "update", "delete", "query"], format="unix-timestamp"
    )
    error: "_models.ResponseErrorInfo" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    incomplete_details: "_models.ResponseIncompleteDetails" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""
    output: list["_models.OutputItem"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """An array of content items generated by the model.
 
      * The length and order of items in the `output` array is dependent
      on the model's response.
      * Rather than accessing the first item in the `output` array and
      assuming it's an `assistant` message with the content generated by
      the model, you might consider using the `output_text` property where
      supported in SDKs. Required."""
    instructions: Union[str, list["_models.Item"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required. Is either a str type or a [Item] type."""
    output_text: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    usage: Optional["_models.ResponseUsage"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    parallel_tool_calls: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether to allow the model to run tool calls in parallel. Required."""
    conversation: Optional["_models.ConversationReference"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    agent_reference: "_models.AgentReference" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The agent used for this response. Required."""

    @overload
    def __init__(  # pylint: disable=too-many-locals
        self,
        *,
        id: str,  # pylint: disable=redefined-builtin
        created_at: datetime.datetime,
        error: "_models.ResponseErrorInfo",
        incomplete_details: "_models.ResponseIncompleteDetails",
        output: list["_models.OutputItem"],
        instructions: Union[str, list["_models.Item"]],
        parallel_tool_calls: bool,
        agent_reference: "_models.AgentReference",
        metadata: Optional["_models.Metadata"] = None,
        top_logprobs: Optional[int] = None,
        temperature: Optional[int] = None,
        top_p: Optional[int] = None,
        user: Optional[str] = None,
        safety_identifier: Optional[str] = None,
        prompt_cache_key: Optional[str] = None,
        service_tier: Optional[Literal["auto", "default", "flex", "scale", "priority"]] = None,
        prompt_cache_retention: Optional[Literal["in-memory", "24h"]] = None,
        previous_response_id: Optional[str] = None,
        model: Optional[str] = None,
        reasoning: Optional["_models.Reasoning"] = None,
        background: Optional[bool] = None,
        max_output_tokens: Optional[int] = None,
        max_tool_calls: Optional[int] = None,
        text: Optional["_models.ResponseTextParam"] = None,
        tools: Optional[list["_models.Tool"]] = None,
        tool_choice: Optional[Union[str, "_models.ToolChoiceOptions", "_models.ToolChoiceParam"]] = None,
        prompt: Optional["_models.Prompt"] = None,
        truncation: Optional[Literal["auto", "disabled"]] = None,
        status: Optional[Literal["completed", "failed", "in_progress", "cancelled", "queued", "incomplete"]] = None,
        completed_at: Optional[datetime.datetime] = None,
        output_text: Optional[str] = None,
        usage: Optional["_models.ResponseUsage"] = None,
        conversation: Optional["_models.ConversationReference"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.object: Literal["response"] = "response"


class ResponseOutputItemAddedEvent(ResponseStreamEvent, discriminator="response.output_item.added"):
    """Emitted when a new output item is added.

    :ivar type: The type of the event. Always ``response.output_item.added``. Required.
     RESPONSE_OUTPUT_ITEM_ADDED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_OUTPUT_ITEM_ADDED
    :ivar output_index: The index of the output item that was added. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar item: The output item that was added. Required.
    :vartype item: ~azure.ai.agentserver.responses.models.models.OutputItem
    """

    type: Literal[ResponseStreamEventType.RESPONSE_OUTPUT_ITEM_ADDED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.output_item.added``. Required.
     RESPONSE_OUTPUT_ITEM_ADDED."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that was added. Required."""
    item: "_models.OutputItem" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The output item that was added. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        sequence_number: int,
        item: "_models.OutputItem",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_OUTPUT_ITEM_ADDED  # type: ignore


class ResponseOutputItemDoneEvent(ResponseStreamEvent, discriminator="response.output_item.done"):
    """Emitted when an output item is marked done.

    :ivar type: The type of the event. Always ``response.output_item.done``. Required.
     RESPONSE_OUTPUT_ITEM_DONE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_OUTPUT_ITEM_DONE
    :ivar output_index: The index of the output item that was marked done. Required.
    :vartype output_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar item: The output item that was marked done. Required.
    :vartype item: ~azure.ai.agentserver.responses.models.models.OutputItem
    """

    type: Literal[ResponseStreamEventType.RESPONSE_OUTPUT_ITEM_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.output_item.done``. Required.
     RESPONSE_OUTPUT_ITEM_DONE."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that was marked done. Required."""
    item: "_models.OutputItem" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The output item that was marked done. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        sequence_number: int,
        item: "_models.OutputItem",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_OUTPUT_ITEM_DONE  # type: ignore


class ResponseOutputTextAnnotationAddedEvent(
    ResponseStreamEvent, discriminator="response.output_text.annotation.added"
):
    """ResponseOutputTextAnnotationAddedEvent.

    :ivar type: The type of the event. Always 'response.output_text.annotation.added'. Required.
     RESPONSE_OUTPUT_TEXT_ANNOTATION_ADDED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_OUTPUT_TEXT_ANNOTATION_ADDED
    :ivar item_id: The unique identifier of the item to which the annotation is being added.
     Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item in the response's output array. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part within the output item. Required.
    :vartype content_index: int
    :ivar annotation_index: The index of the annotation within the content part. Required.
    :vartype annotation_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar annotation: The annotation object being added. (See annotation schema for details.).
     Required.
    :vartype annotation: ~azure.ai.agentserver.responses.models.models.Annotation
    """

    type: Literal[ResponseStreamEventType.RESPONSE_OUTPUT_TEXT_ANNOTATION_ADDED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.output_text.annotation.added'. Required.
     RESPONSE_OUTPUT_TEXT_ANNOTATION_ADDED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique identifier of the item to which the annotation is being added. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item in the response's output array. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part within the output item. Required."""
    annotation_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the annotation within the content part. Required."""
    annotation: "_models.Annotation" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The annotation object being added. (See annotation schema for details.). Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        annotation_index: int,
        sequence_number: int,
        annotation: "_models.Annotation",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_OUTPUT_TEXT_ANNOTATION_ADDED  # type: ignore


class ResponsePromptVariables(_Model):
    """Prompt Variables."""


class ResponseQueuedEvent(ResponseStreamEvent, discriminator="response.queued"):
    """ResponseQueuedEvent.

    :ivar type: The type of the event. Always 'response.queued'. Required. RESPONSE_QUEUED.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_QUEUED
    :ivar response: The full response object that is queued. Required.
    :vartype response: ~azure.ai.agentserver.responses.models.models.ResponseObject
    :ivar sequence_number: The sequence number for this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_QUEUED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always 'response.queued'. Required. RESPONSE_QUEUED."""
    response: "_models.ResponseObject" = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The full response object that is queued. Required."""

    @overload
    def __init__(
        self,
        *,
        response: "_models.ResponseObject",
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_QUEUED  # type: ignore


class ResponseReasoningSummaryPartAddedEvent(
    ResponseStreamEvent, discriminator="response.reasoning_summary_part.added"
):
    """Emitted when a new reasoning summary part is added.

    :ivar type: The type of the event. Always ``response.reasoning_summary_part.added``. Required.
     RESPONSE_REASONING_SUMMARY_PART_ADDED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_REASONING_SUMMARY_PART_ADDED
    :ivar item_id: The ID of the item this summary part is associated with. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item this summary part is associated with.
     Required.
    :vartype output_index: int
    :ivar summary_index: The index of the summary part within the reasoning summary. Required.
    :vartype summary_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar part: The summary part that was added. Required.
    :vartype part:
     ~azure.ai.agentserver.responses.models.models.ResponseReasoningSummaryPartAddedEventPart
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_PART_ADDED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.reasoning_summary_part.added``. Required.
     RESPONSE_REASONING_SUMMARY_PART_ADDED."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item this summary part is associated with. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item this summary part is associated with. Required."""
    summary_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the summary part within the reasoning summary. Required."""
    part: "_models.ResponseReasoningSummaryPartAddedEventPart" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The summary part that was added. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        summary_index: int,
        sequence_number: int,
        part: "_models.ResponseReasoningSummaryPartAddedEventPart",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_PART_ADDED  # type: ignore


class ResponseReasoningSummaryPartAddedEventPart(_Model):  # pylint: disable=name-too-long
    """ResponseReasoningSummaryPartAddedEventPart.

    :ivar type: Required. Default value is "summary_text".
    :vartype type: str
    :ivar text: Required.
    :vartype text: str
    """

    type: Literal["summary_text"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Default value is \"summary_text\"."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["summary_text"] = "summary_text"


class ResponseReasoningSummaryPartDoneEvent(ResponseStreamEvent, discriminator="response.reasoning_summary_part.done"):
    """Emitted when a reasoning summary part is completed.

    :ivar type: The type of the event. Always ``response.reasoning_summary_part.done``. Required.
     RESPONSE_REASONING_SUMMARY_PART_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_REASONING_SUMMARY_PART_DONE
    :ivar item_id: The ID of the item this summary part is associated with. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item this summary part is associated with.
     Required.
    :vartype output_index: int
    :ivar summary_index: The index of the summary part within the reasoning summary. Required.
    :vartype summary_index: int
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    :ivar part: The completed summary part. Required.
    :vartype part:
     ~azure.ai.agentserver.responses.models.models.ResponseReasoningSummaryPartDoneEventPart
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_PART_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.reasoning_summary_part.done``. Required.
     RESPONSE_REASONING_SUMMARY_PART_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item this summary part is associated with. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item this summary part is associated with. Required."""
    summary_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the summary part within the reasoning summary. Required."""
    part: "_models.ResponseReasoningSummaryPartDoneEventPart" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The completed summary part. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        summary_index: int,
        sequence_number: int,
        part: "_models.ResponseReasoningSummaryPartDoneEventPart",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_PART_DONE  # type: ignore


class ResponseReasoningSummaryPartDoneEventPart(_Model):  # pylint: disable=name-too-long
    """ResponseReasoningSummaryPartDoneEventPart.

    :ivar type: Required. Default value is "summary_text".
    :vartype type: str
    :ivar text: Required.
    :vartype text: str
    """

    type: Literal["summary_text"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Default value is \"summary_text\"."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["summary_text"] = "summary_text"


class ResponseReasoningSummaryTextDeltaEvent(
    ResponseStreamEvent, discriminator="response.reasoning_summary_text.delta"
):
    """Emitted when a delta is added to a reasoning summary text.

    :ivar type: The type of the event. Always ``response.reasoning_summary_text.delta``. Required.
     RESPONSE_REASONING_SUMMARY_TEXT_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_REASONING_SUMMARY_TEXT_DELTA
    :ivar item_id: The ID of the item this summary text delta is associated with. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item this summary text delta is associated with.
     Required.
    :vartype output_index: int
    :ivar summary_index: The index of the summary part within the reasoning summary. Required.
    :vartype summary_index: int
    :ivar delta: The text delta that was added to the summary. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_TEXT_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.reasoning_summary_text.delta``. Required.
     RESPONSE_REASONING_SUMMARY_TEXT_DELTA."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item this summary text delta is associated with. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item this summary text delta is associated with. Required."""
    summary_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the summary part within the reasoning summary. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text delta that was added to the summary. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        summary_index: int,
        delta: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_TEXT_DELTA  # type: ignore


class ResponseReasoningSummaryTextDoneEvent(ResponseStreamEvent, discriminator="response.reasoning_summary_text.done"):
    """Emitted when a reasoning summary text is completed.

    :ivar type: The type of the event. Always ``response.reasoning_summary_text.done``. Required.
     RESPONSE_REASONING_SUMMARY_TEXT_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_REASONING_SUMMARY_TEXT_DONE
    :ivar item_id: The ID of the item this summary text is associated with. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item this summary text is associated with.
     Required.
    :vartype output_index: int
    :ivar summary_index: The index of the summary part within the reasoning summary. Required.
    :vartype summary_index: int
    :ivar text: The full text of the completed reasoning summary. Required.
    :vartype text: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_TEXT_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.reasoning_summary_text.done``. Required.
     RESPONSE_REASONING_SUMMARY_TEXT_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item this summary text is associated with. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item this summary text is associated with. Required."""
    summary_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the summary part within the reasoning summary. Required."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The full text of the completed reasoning summary. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        summary_index: int,
        text: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REASONING_SUMMARY_TEXT_DONE  # type: ignore


class ResponseReasoningTextDeltaEvent(ResponseStreamEvent, discriminator="response.reasoning_text.delta"):
    """Emitted when a delta is added to a reasoning text.

    :ivar type: The type of the event. Always ``response.reasoning_text.delta``. Required.
     RESPONSE_REASONING_TEXT_DELTA.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_REASONING_TEXT_DELTA
    :ivar item_id: The ID of the item this reasoning text delta is associated with. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item this reasoning text delta is associated with.
     Required.
    :vartype output_index: int
    :ivar content_index: The index of the reasoning content part this delta is associated with.
     Required.
    :vartype content_index: int
    :ivar delta: The text delta that was added to the reasoning content. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REASONING_TEXT_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.reasoning_text.delta``. Required.
     RESPONSE_REASONING_TEXT_DELTA."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item this reasoning text delta is associated with. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item this reasoning text delta is associated with. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the reasoning content part this delta is associated with. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text delta that was added to the reasoning content. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        delta: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REASONING_TEXT_DELTA  # type: ignore


class ResponseReasoningTextDoneEvent(ResponseStreamEvent, discriminator="response.reasoning_text.done"):
    """Emitted when a reasoning text is completed.

    :ivar type: The type of the event. Always ``response.reasoning_text.done``. Required.
     RESPONSE_REASONING_TEXT_DONE.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_REASONING_TEXT_DONE
    :ivar item_id: The ID of the item this reasoning text is associated with. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item this reasoning text is associated with.
     Required.
    :vartype output_index: int
    :ivar content_index: The index of the reasoning content part. Required.
    :vartype content_index: int
    :ivar text: The full text of the completed reasoning content. Required.
    :vartype text: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REASONING_TEXT_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.reasoning_text.done``. Required.
     RESPONSE_REASONING_TEXT_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the item this reasoning text is associated with. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item this reasoning text is associated with. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the reasoning content part. Required."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The full text of the completed reasoning content. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        text: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REASONING_TEXT_DONE  # type: ignore


class ResponseRefusalDeltaEvent(ResponseStreamEvent, discriminator="response.refusal.delta"):
    """Emitted when there is a partial refusal text.

    :ivar type: The type of the event. Always ``response.refusal.delta``. Required.
     RESPONSE_REFUSAL_DELTA.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_REFUSAL_DELTA
    :ivar item_id: The ID of the output item that the refusal text is added to. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the refusal text is added to. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part that the refusal text is added to. Required.
    :vartype content_index: int
    :ivar delta: The refusal text that is added. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REFUSAL_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.refusal.delta``. Required. RESPONSE_REFUSAL_DELTA."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the refusal text is added to. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the refusal text is added to. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part that the refusal text is added to. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The refusal text that is added. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        delta: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REFUSAL_DELTA  # type: ignore


class ResponseRefusalDoneEvent(ResponseStreamEvent, discriminator="response.refusal.done"):
    """Emitted when refusal text is finalized.

    :ivar type: The type of the event. Always ``response.refusal.done``. Required.
     RESPONSE_REFUSAL_DONE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_REFUSAL_DONE
    :ivar item_id: The ID of the output item that the refusal text is finalized. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the refusal text is finalized. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part that the refusal text is finalized.
     Required.
    :vartype content_index: int
    :ivar refusal: The refusal text that is finalized. Required.
    :vartype refusal: str
    :ivar sequence_number: The sequence number of this event. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_REFUSAL_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.refusal.done``. Required. RESPONSE_REFUSAL_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the refusal text is finalized. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the refusal text is finalized. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part that the refusal text is finalized. Required."""
    refusal: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The refusal text that is finalized. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        refusal: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_REFUSAL_DONE  # type: ignore


class ResponseStreamOptions(_Model):
    """Options for streaming responses. Only set this when you set ``stream: true``.

    :ivar include_obfuscation: When true, stream obfuscation will be enabled. Stream obfuscation
     adds random characters to an ``obfuscation`` field on streaming delta events to normalize
     payload sizes as a mitigation to certain side-channel attacks. These obfuscation fields are
     included by default, but add a small amount of overhead to the data stream. You can set
     ``include_obfuscation`` to false to optimize for bandwidth if you trust the network links
     between your application and the OpenAI API.
    :vartype include_obfuscation: bool
    """

    include_obfuscation: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an
     ``obfuscation`` field on streaming delta events to normalize payload sizes as a mitigation to
     certain side-channel attacks. These obfuscation fields are included by default, but add a small
     amount of overhead to the data stream. You can set ``include_obfuscation`` to false to optimize
     for bandwidth if you trust the network links between your application and the OpenAI API."""

    @overload
    def __init__(
        self,
        *,
        include_obfuscation: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseTextDeltaEvent(ResponseStreamEvent, discriminator="response.output_text.delta"):
    """Emitted when there is an additional text delta.

    :ivar type: The type of the event. Always ``response.output_text.delta``. Required.
     RESPONSE_OUTPUT_TEXT_DELTA.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_OUTPUT_TEXT_DELTA
    :ivar item_id: The ID of the output item that the text delta was added to. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the text delta was added to. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part that the text delta was added to. Required.
    :vartype content_index: int
    :ivar delta: The text delta that was added. Required.
    :vartype delta: str
    :ivar sequence_number: The sequence number for this event. Required.
    :vartype sequence_number: int
    :ivar logprobs: The log probabilities of the tokens in the delta. Required.
    :vartype logprobs: list[~azure.ai.agentserver.responses.models.models.ResponseLogProb]
    """

    type: Literal[ResponseStreamEventType.RESPONSE_OUTPUT_TEXT_DELTA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.output_text.delta``. Required.
     RESPONSE_OUTPUT_TEXT_DELTA."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the text delta was added to. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the text delta was added to. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part that the text delta was added to. Required."""
    delta: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text delta that was added. Required."""
    logprobs: list["_models.ResponseLogProb"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The log probabilities of the tokens in the delta. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        delta: str,
        sequence_number: int,
        logprobs: list["_models.ResponseLogProb"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_OUTPUT_TEXT_DELTA  # type: ignore


class ResponseTextDoneEvent(ResponseStreamEvent, discriminator="response.output_text.done"):
    """Emitted when text content is finalized.

    :ivar type: The type of the event. Always ``response.output_text.done``. Required.
     RESPONSE_OUTPUT_TEXT_DONE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.RESPONSE_OUTPUT_TEXT_DONE
    :ivar item_id: The ID of the output item that the text content is finalized. Required.
    :vartype item_id: str
    :ivar output_index: The index of the output item that the text content is finalized. Required.
    :vartype output_index: int
    :ivar content_index: The index of the content part that the text content is finalized.
     Required.
    :vartype content_index: int
    :ivar text: The text content that is finalized. Required.
    :vartype text: str
    :ivar sequence_number: The sequence number for this event. Required.
    :vartype sequence_number: int
    :ivar logprobs: The log probabilities of the tokens in the delta. Required.
    :vartype logprobs: list[~azure.ai.agentserver.responses.models.models.ResponseLogProb]
    """

    type: Literal[ResponseStreamEventType.RESPONSE_OUTPUT_TEXT_DONE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.output_text.done``. Required.
     RESPONSE_OUTPUT_TEXT_DONE."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the output item that the text content is finalized. Required."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the text content is finalized. Required."""
    content_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the content part that the text content is finalized. Required."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text content that is finalized. Required."""
    logprobs: list["_models.ResponseLogProb"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The log probabilities of the tokens in the delta. Required."""

    @overload
    def __init__(
        self,
        *,
        item_id: str,
        output_index: int,
        content_index: int,
        text: str,
        sequence_number: int,
        logprobs: list["_models.ResponseLogProb"],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_OUTPUT_TEXT_DONE  # type: ignore


class ResponseTextParam(_Model):
    """Configuration options for a text response from the model. Can be plain
    text or structured JSON data. Learn more:

    * [Text inputs and outputs](/docs/guides/text)
    * [Structured Outputs](/docs/guides/structured-outputs).

    :ivar format:
    :vartype format: ~azure.ai.agentserver.responses.models.models.TextResponseFormatConfiguration
    :ivar verbosity: Is one of the following types: Literal["low"], Literal["medium"],
     Literal["high"]
    :vartype verbosity: str or str or str
    """

    format: Optional["_models.TextResponseFormatConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    verbosity: Optional[Literal["low", "medium", "high"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Is one of the following types: Literal[\"low\"], Literal[\"medium\"], Literal[\"high\"]"""

    @overload
    def __init__(
        self,
        *,
        format: Optional["_models.TextResponseFormatConfiguration"] = None,
        verbosity: Optional[Literal["low", "medium", "high"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseUsage(_Model):
    """Represents token usage details including input tokens, output tokens, a breakdown of output
    tokens, and the total tokens used.

    :ivar input_tokens: The number of input tokens. Required.
    :vartype input_tokens: int
    :ivar input_tokens_details: A detailed breakdown of the input tokens. Required.
    :vartype input_tokens_details:
     ~azure.ai.agentserver.responses.models.models.ResponseUsageInputTokensDetails
    :ivar output_tokens: The number of output tokens. Required.
    :vartype output_tokens: int
    :ivar output_tokens_details: A detailed breakdown of the output tokens. Required.
    :vartype output_tokens_details:
     ~azure.ai.agentserver.responses.models.models.ResponseUsageOutputTokensDetails
    :ivar total_tokens: The total number of tokens used. Required.
    :vartype total_tokens: int
    """

    input_tokens: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The number of input tokens. Required."""
    input_tokens_details: "_models.ResponseUsageInputTokensDetails" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A detailed breakdown of the input tokens. Required."""
    output_tokens: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The number of output tokens. Required."""
    output_tokens_details: "_models.ResponseUsageOutputTokensDetails" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """A detailed breakdown of the output tokens. Required."""
    total_tokens: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The total number of tokens used. Required."""

    @overload
    def __init__(
        self,
        *,
        input_tokens: int,
        input_tokens_details: "_models.ResponseUsageInputTokensDetails",
        output_tokens: int,
        output_tokens_details: "_models.ResponseUsageOutputTokensDetails",
        total_tokens: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseUsageInputTokensDetails(_Model):
    """ResponseUsageInputTokensDetails.

    :ivar cached_tokens: Required.
    :vartype cached_tokens: int
    """

    cached_tokens: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        cached_tokens: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseUsageOutputTokensDetails(_Model):
    """ResponseUsageOutputTokensDetails.

    :ivar reasoning_tokens: Required.
    :vartype reasoning_tokens: int
    """

    reasoning_tokens: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        reasoning_tokens: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class ResponseWebSearchCallCompletedEvent(ResponseStreamEvent, discriminator="response.web_search_call.completed"):
    """Emitted when a web search call is completed.

    :ivar type: The type of the event. Always ``response.web_search_call.completed``. Required.
     RESPONSE_WEB_SEARCH_CALL_COMPLETED.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_WEB_SEARCH_CALL_COMPLETED
    :ivar output_index: The index of the output item that the web search call is associated with.
     Required.
    :vartype output_index: int
    :ivar item_id: Unique ID for the output item associated with the web search call. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of the web search call being processed. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_WEB_SEARCH_CALL_COMPLETED] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.web_search_call.completed``. Required.
     RESPONSE_WEB_SEARCH_CALL_COMPLETED."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the web search call is associated with. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique ID for the output item associated with the web search call. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_WEB_SEARCH_CALL_COMPLETED  # type: ignore


class ResponseWebSearchCallInProgressEvent(ResponseStreamEvent, discriminator="response.web_search_call.in_progress"):
    """Emitted when a web search call is initiated.

    :ivar type: The type of the event. Always ``response.web_search_call.in_progress``. Required.
     RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS
    :ivar output_index: The index of the output item that the web search call is associated with.
     Required.
    :vartype output_index: int
    :ivar item_id: Unique ID for the output item associated with the web search call. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of the web search call being processed. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.web_search_call.in_progress``. Required.
     RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the web search call is associated with. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique ID for the output item associated with the web search call. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_WEB_SEARCH_CALL_IN_PROGRESS  # type: ignore


class ResponseWebSearchCallSearchingEvent(ResponseStreamEvent, discriminator="response.web_search_call.searching"):
    """Emitted when a web search call is executing.

    :ivar type: The type of the event. Always ``response.web_search_call.searching``. Required.
     RESPONSE_WEB_SEARCH_CALL_SEARCHING.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.RESPONSE_WEB_SEARCH_CALL_SEARCHING
    :ivar output_index: The index of the output item that the web search call is associated with.
     Required.
    :vartype output_index: int
    :ivar item_id: Unique ID for the output item associated with the web search call. Required.
    :vartype item_id: str
    :ivar sequence_number: The sequence number of the web search call being processed. Required.
    :vartype sequence_number: int
    """

    type: Literal[ResponseStreamEventType.RESPONSE_WEB_SEARCH_CALL_SEARCHING] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the event. Always ``response.web_search_call.searching``. Required.
     RESPONSE_WEB_SEARCH_CALL_SEARCHING."""
    output_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the output item that the web search call is associated with. Required."""
    item_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique ID for the output item associated with the web search call. Required."""

    @overload
    def __init__(
        self,
        *,
        output_index: int,
        item_id: str,
        sequence_number: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ResponseStreamEventType.RESPONSE_WEB_SEARCH_CALL_SEARCHING  # type: ignore


class ScreenshotParam(ComputerAction, discriminator="screenshot"):
    """Screenshot.

    :ivar type: Specifies the event type. For a screenshot action, this property is always set to
     ``screenshot``. Required. SCREENSHOT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SCREENSHOT
    """

    type: Literal[ComputerActionType.SCREENSHOT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a screenshot action, this property is always set to
     ``screenshot``. Required. SCREENSHOT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.SCREENSHOT  # type: ignore


class ScrollParam(ComputerAction, discriminator="scroll"):
    """Scroll.

    :ivar type: Specifies the event type. For a scroll action, this property is always set to
     ``scroll``. Required. SCROLL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SCROLL
    :ivar x: The x-coordinate where the scroll occurred. Required.
    :vartype x: int
    :ivar y: The y-coordinate where the scroll occurred. Required.
    :vartype y: int
    :ivar scroll_x: The horizontal scroll distance. Required.
    :vartype scroll_x: int
    :ivar scroll_y: The vertical scroll distance. Required.
    :vartype scroll_y: int
    """

    type: Literal[ComputerActionType.SCROLL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a scroll action, this property is always set to ``scroll``.
     Required. SCROLL."""
    x: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The x-coordinate where the scroll occurred. Required."""
    y: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The y-coordinate where the scroll occurred. Required."""
    scroll_x: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The horizontal scroll distance. Required."""
    scroll_y: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The vertical scroll distance. Required."""

    @overload
    def __init__(
        self,
        *,
        x: int,
        y: int,
        scroll_x: int,
        scroll_y: int,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.SCROLL  # type: ignore


class SharepointGroundingToolCall(OutputItem, discriminator="sharepoint_grounding_preview_call"):
    """A SharePoint grounding tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. SHAREPOINT_GROUNDING_PREVIEW_CALL.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.SHAREPOINT_GROUNDING_PREVIEW_CALL
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar arguments: A JSON string of the arguments to pass to the tool. Required.
    :vartype arguments: str
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.SHAREPOINT_GROUNDING_PREVIEW_CALL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. SHAREPOINT_GROUNDING_PREVIEW_CALL."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    arguments: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A JSON string of the arguments to pass to the tool. Required."""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        arguments: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.SHAREPOINT_GROUNDING_PREVIEW_CALL  # type: ignore


class SharepointGroundingToolCallOutput(OutputItem, discriminator="sharepoint_grounding_preview_call_output"):
    """The output of a SharePoint grounding tool call.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. SHAREPOINT_GROUNDING_PREVIEW_CALL_OUTPUT.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.SHAREPOINT_GROUNDING_PREVIEW_CALL_OUTPUT
    :ivar call_id: The unique ID of the tool call generated by the model. Required.
    :vartype call_id: str
    :ivar output: The output from the SharePoint grounding tool call. Is one of the following
     types: {str: Any}, str, [Any]
    :vartype output: dict[str, any] or str or list[any]
    :ivar status: The status of the tool call. Required. Known values are: "in_progress",
     "completed", "incomplete", and "failed".
    :vartype status: str or ~azure.ai.agentserver.responses.models.models.ToolCallStatus
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.SHAREPOINT_GROUNDING_PREVIEW_CALL_OUTPUT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. SHAREPOINT_GROUNDING_PREVIEW_CALL_OUTPUT."""
    call_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The unique ID of the tool call generated by the model. Required."""
    output: Optional["_types.ToolCallOutputContent"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The output from the SharePoint grounding tool call. Is one of the following types: {str: Any},
     str, [Any]"""
    status: Union[str, "_models.ToolCallStatus"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The status of the tool call. Required. Known values are: \"in_progress\", \"completed\",
     \"incomplete\", and \"failed\"."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        call_id: str,
        status: Union[str, "_models.ToolCallStatus"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        output: Optional["_types.ToolCallOutputContent"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.SHAREPOINT_GROUNDING_PREVIEW_CALL_OUTPUT  # type: ignore


class SharepointGroundingToolParameters(_Model):
    """The sharepoint grounding tool parameters.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connections: The project connections attached to this tool. There can be a
     maximum of 1 connection resource attached to the tool.
    :vartype project_connections:
     list[~azure.ai.agentserver.responses.models.models.ToolProjectConnection]
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connections: Optional[list["_models.ToolProjectConnection"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The project connections attached to this tool. There can be a maximum of 1 connection resource
     attached to the tool."""

    @overload
    def __init__(
        self,
        *,
        name: Optional[str] = None,
        description: Optional[str] = None,
        project_connections: Optional[list["_models.ToolProjectConnection"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SharepointPreviewTool(Tool, discriminator="sharepoint_grounding_preview"):
    """The input definition information for a sharepoint tool as used to configure an agent.

    :ivar type: The object type, which is always 'sharepoint_grounding_preview'. Required.
     SHAREPOINT_GROUNDING_PREVIEW.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.SHAREPOINT_GROUNDING_PREVIEW
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar sharepoint_grounding_preview: The sharepoint grounding tool parameters. Required.
    :vartype sharepoint_grounding_preview:
     ~azure.ai.agentserver.responses.models.models.SharepointGroundingToolParameters
    """

    type: Literal[ToolType.SHAREPOINT_GROUNDING_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'sharepoint_grounding_preview'. Required.
     SHAREPOINT_GROUNDING_PREVIEW."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    sharepoint_grounding_preview: "_models.SharepointGroundingToolParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The sharepoint grounding tool parameters. Required."""

    @overload
    def __init__(
        self,
        *,
        sharepoint_grounding_preview: "_models.SharepointGroundingToolParameters",
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.SHAREPOINT_GROUNDING_PREVIEW  # type: ignore


class SkillReferenceParam(ContainerSkill, discriminator="skill_reference"):
    """SkillReferenceParam.

    :ivar type: References a skill created with the /v1/skills endpoint. Required. SKILL_REFERENCE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SKILL_REFERENCE
    :ivar skill_id: The ID of the referenced skill. Required.
    :vartype skill_id: str
    :ivar version: Optional skill version. Use a positive integer or 'latest'. Omit for default.
    :vartype version: str
    """

    type: Literal[ContainerSkillType.SKILL_REFERENCE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """References a skill created with the /v1/skills endpoint. Required. SKILL_REFERENCE."""
    skill_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the referenced skill. Required."""
    version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional skill version. Use a positive integer or 'latest'. Omit for default."""

    @overload
    def __init__(
        self,
        *,
        skill_id: str,
        version: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ContainerSkillType.SKILL_REFERENCE  # type: ignore


class ToolChoiceParam(_Model):
    """How the model should select which tool (or tools) to use when generating a response. See the
    ``tools`` parameter to see how to specify which tools the model can call.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    ToolChoiceAllowed, SpecificApplyPatchParam, ToolChoiceCodeInterpreter,
    ToolChoiceComputerUsePreview, ToolChoiceCustom, ToolChoiceFileSearch, ToolChoiceFunction,
    ToolChoiceImageGeneration, ToolChoiceMCP, SpecificFunctionShellParam,
    ToolChoiceWebSearchPreview, ToolChoiceWebSearchPreview20250311

    :ivar type: Required. Known values are: "allowed_tools", "function", "mcp", "custom",
     "apply_patch", "shell", "file_search", "web_search_preview", "computer_use_preview",
     "web_search_preview_2025_03_11", "image_generation", and "code_interpreter".
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ToolChoiceParamType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"allowed_tools\", \"function\", \"mcp\", \"custom\",
     \"apply_patch\", \"shell\", \"file_search\", \"web_search_preview\", \"computer_use_preview\",
     \"web_search_preview_2025_03_11\", \"image_generation\", and \"code_interpreter\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class SpecificApplyPatchParam(ToolChoiceParam, discriminator="apply_patch"):
    """Specific apply patch tool choice.

    :ivar type: The tool to call. Always ``apply_patch``. Required. APPLY_PATCH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.APPLY_PATCH
    """

    type: Literal[ToolChoiceParamType.APPLY_PATCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The tool to call. Always ``apply_patch``. Required. APPLY_PATCH."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.APPLY_PATCH  # type: ignore


class SpecificFunctionShellParam(ToolChoiceParam, discriminator="shell"):
    """Specific shell tool choice.

    :ivar type: The tool to call. Always ``shell``. Required. SHELL.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SHELL
    """

    type: Literal[ToolChoiceParamType.SHELL] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The tool to call. Always ``shell``. Required. SHELL."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.SHELL  # type: ignore


class StructuredOutputDefinition(_Model):
    """A structured output that can be produced by the agent.

    :ivar name: The name of the structured output. Required.
    :vartype name: str
    :ivar description: A description of the output to emit. Used by the model to determine when to
     emit the output. Required.
    :vartype description: str
    :ivar schema: The JSON schema for the structured output. Required.
    :vartype schema: dict[str, any]
    :ivar strict: Whether to enforce strict validation. Default ``true``. Required.
    :vartype strict: bool
    """

    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the structured output. Required."""
    description: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description of the output to emit. Used by the model to determine when to emit the output.
     Required."""
    schema: dict[str, Any] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The JSON schema for the structured output. Required."""
    strict: bool = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Whether to enforce strict validation. Default ``true``. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
        description: str,
        schema: dict[str, Any],
        strict: bool,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class StructuredOutputsOutputItem(OutputItem, discriminator="structured_outputs"):
    """StructuredOutputsOutputItem.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. STRUCTURED_OUTPUTS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.STRUCTURED_OUTPUTS
    :ivar output: The structured output captured during the response. Required.
    :vartype output: any
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.STRUCTURED_OUTPUTS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. STRUCTURED_OUTPUTS."""
    output: Any = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The structured output captured during the response. Required."""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        output: Any,
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.STRUCTURED_OUTPUTS  # type: ignore


class SummaryTextContent(MessageContent, discriminator="summary_text"):
    """Summary text.

    :ivar type: The type of the object. Always ``summary_text``. Required. SUMMARY_TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.SUMMARY_TEXT
    :ivar text: A summary of the reasoning output from the model so far. Required.
    :vartype text: str
    """

    type: Literal[MessageContentType.SUMMARY_TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the object. Always ``summary_text``. Required. SUMMARY_TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A summary of the reasoning output from the model so far. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.SUMMARY_TEXT  # type: ignore


class TextContent(MessageContent, discriminator="text"):
    """Text Content.

    :ivar type: Required. TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.TEXT
    :ivar text: Required.
    :vartype text: str
    """

    type: Literal[MessageContentType.TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. TEXT."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = MessageContentType.TEXT  # type: ignore


class TextResponseFormatConfiguration(_Model):
    """An object specifying the format that the model must output. Configuring ``{ "type":
    "json_schema" }`` enables Structured Outputs, which ensures the model will match your supplied
    JSON schema. Learn more in the `Structured Outputs guide </docs/guides/structured-outputs>`_.
    The default format is ``{ "type": "text" }`` with no additional options. *Not recommended for
    gpt-4o and newer models:** Setting to ``{ "type": "json_object" }`` enables the older JSON
    mode, which ensures the message the model generates is valid JSON. Using ``json_schema`` is
    preferred for models that support it.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    TextResponseFormatConfigurationResponseFormatJsonObject, TextResponseFormatJsonSchema,
    TextResponseFormatConfigurationResponseFormatText

    :ivar type: Required. Known values are: "text", "json_schema", and "json_object".
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.TextResponseFormatConfigurationType
    """

    __mapping__: dict[str, _Model] = {}
    type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])
    """Required. Known values are: \"text\", \"json_schema\", and \"json_object\"."""

    @overload
    def __init__(
        self,
        *,
        type: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class TextResponseFormatConfigurationResponseFormatJsonObject(
    TextResponseFormatConfiguration, discriminator="json_object"
):  # pylint: disable=name-too-long
    """JSON object.

    :ivar type: The type of response format being defined. Always ``json_object``. Required.
     JSON_OBJECT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.JSON_OBJECT
    """

    type: Literal[TextResponseFormatConfigurationType.JSON_OBJECT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of response format being defined. Always ``json_object``. Required. JSON_OBJECT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = TextResponseFormatConfigurationType.JSON_OBJECT  # type: ignore


class TextResponseFormatConfigurationResponseFormatText(
    TextResponseFormatConfiguration, discriminator="text"
):  # pylint: disable=name-too-long
    """Text.

    :ivar type: The type of response format being defined. Always ``text``. Required. TEXT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.TEXT
    """

    type: Literal[TextResponseFormatConfigurationType.TEXT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of response format being defined. Always ``text``. Required. TEXT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = TextResponseFormatConfigurationType.TEXT  # type: ignore


class TextResponseFormatJsonSchema(TextResponseFormatConfiguration, discriminator="json_schema"):
    """JSON schema.

    :ivar type: The type of response format being defined. Always ``json_schema``. Required.
     JSON_SCHEMA.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.JSON_SCHEMA
    :ivar description: A description of what the response format is for, used by the model to
     determine how to respond in the format.
    :vartype description: str
    :ivar name: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and
     dashes, with a maximum length of 64. Required.
    :vartype name: str
    :ivar schema: Required.
    :vartype schema: ~azure.ai.agentserver.responses.models.models.ResponseFormatJsonSchemaSchema
    :ivar strict:
    :vartype strict: bool
    """

    type: Literal[TextResponseFormatConfigurationType.JSON_SCHEMA] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of response format being defined. Always ``json_schema``. Required. JSON_SCHEMA."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A description of what the response format is for, used by the model to determine how to respond
     in the format."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with
     a maximum length of 64. Required."""
    schema: "_models.ResponseFormatJsonSchemaSchema" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Required."""
    strict: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        name: str,
        schema: "_models.ResponseFormatJsonSchemaSchema",
        description: Optional[str] = None,
        strict: Optional[bool] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = TextResponseFormatConfigurationType.JSON_SCHEMA  # type: ignore


class ToolChoiceAllowed(ToolChoiceParam, discriminator="allowed_tools"):
    """Allowed tools.

    :ivar type: Allowed tool configuration type. Always ``allowed_tools``. Required. ALLOWED_TOOLS.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.ALLOWED_TOOLS
    :ivar mode: Constrains the tools available to the model to a pre-defined set. ``auto`` allows
     the model to pick from among the allowed tools and generate a message. ``required`` requires
     the model to call one or more of the allowed tools. Required. Is either a Literal["auto"] type
     or a Literal["required"] type.
    :vartype mode: str or str
    :ivar tools: A list of tool definitions that the model should be allowed to call. For the
     Responses API, the list of tool definitions might look like:

     .. code-block:: json

        [
          { "type": "function", "name": "get_weather" },
          { "type": "mcp", "server_label": "deepwiki" },
          { "type": "image_generation" }
        ]. Required.
    :vartype tools: list[dict[str, any]]
    """

    type: Literal[ToolChoiceParamType.ALLOWED_TOOLS] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Allowed tool configuration type. Always ``allowed_tools``. Required. ALLOWED_TOOLS."""
    mode: Literal["auto", "required"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Constrains the tools available to the model to a pre-defined set. ``auto`` allows the model to
     pick from among the allowed tools and generate a message. ``required`` requires the model to
     call one or more of the allowed tools. Required. Is either a Literal[\"auto\"] type or a
     Literal[\"required\"] type."""
    tools: list[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A list of tool definitions that the model should be allowed to call. For the Responses API, the
     list of tool definitions might look like:
     
     .. code-block:: json
     
        [
          { \"type\": \"function\", \"name\": \"get_weather\" },
          { \"type\": \"mcp\", \"server_label\": \"deepwiki\" },
          { \"type\": \"image_generation\" }
        ]. Required."""

    @overload
    def __init__(
        self,
        *,
        mode: Literal["auto", "required"],
        tools: list[dict[str, Any]],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.ALLOWED_TOOLS  # type: ignore


class ToolChoiceCodeInterpreter(ToolChoiceParam, discriminator="code_interpreter"):
    """Indicates that the model should use a built-in tool to generate a response. `Learn more about
    built-in tools <https://platform.openai.com/docs/guides/tools>`_.

    :ivar type: Required. CODE_INTERPRETER.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CODE_INTERPRETER
    """

    type: Literal[ToolChoiceParamType.CODE_INTERPRETER] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. CODE_INTERPRETER."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.CODE_INTERPRETER  # type: ignore


class ToolChoiceComputerUsePreview(ToolChoiceParam, discriminator="computer_use_preview"):
    """Indicates that the model should use a built-in tool to generate a response. `Learn more about
    built-in tools <https://platform.openai.com/docs/guides/tools>`_.

    :ivar type: Required. COMPUTER_USE_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.COMPUTER_USE_PREVIEW
    """

    type: Literal[ToolChoiceParamType.COMPUTER_USE_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. COMPUTER_USE_PREVIEW."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.COMPUTER_USE_PREVIEW  # type: ignore


class ToolChoiceCustom(ToolChoiceParam, discriminator="custom"):
    """Custom tool.

    :ivar type: For custom tool calling, the type is always ``custom``. Required. CUSTOM.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.CUSTOM
    :ivar name: The name of the custom tool to call. Required.
    :vartype name: str
    """

    type: Literal[ToolChoiceParamType.CUSTOM] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """For custom tool calling, the type is always ``custom``. Required. CUSTOM."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the custom tool to call. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.CUSTOM  # type: ignore


class ToolChoiceFileSearch(ToolChoiceParam, discriminator="file_search"):
    """Indicates that the model should use a built-in tool to generate a response. `Learn more about
    built-in tools <https://platform.openai.com/docs/guides/tools>`_.

    :ivar type: Required. FILE_SEARCH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FILE_SEARCH
    """

    type: Literal[ToolChoiceParamType.FILE_SEARCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. FILE_SEARCH."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.FILE_SEARCH  # type: ignore


class ToolChoiceFunction(ToolChoiceParam, discriminator="function"):
    """Function tool.

    :ivar type: For function calling, the type is always ``function``. Required. FUNCTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.FUNCTION
    :ivar name: The name of the function to call. Required.
    :vartype name: str
    """

    type: Literal[ToolChoiceParamType.FUNCTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """For function calling, the type is always ``function``. Required. FUNCTION."""
    name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The name of the function to call. Required."""

    @overload
    def __init__(
        self,
        *,
        name: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.FUNCTION  # type: ignore


class ToolChoiceImageGeneration(ToolChoiceParam, discriminator="image_generation"):
    """Indicates that the model should use a built-in tool to generate a response. `Learn more about
    built-in tools <https://platform.openai.com/docs/guides/tools>`_.

    :ivar type: Required. IMAGE_GENERATION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.IMAGE_GENERATION
    """

    type: Literal[ToolChoiceParamType.IMAGE_GENERATION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. IMAGE_GENERATION."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.IMAGE_GENERATION  # type: ignore


class ToolChoiceMCP(ToolChoiceParam, discriminator="mcp"):
    """MCP tool.

    :ivar type: For MCP tools, the type is always ``mcp``. Required. MCP.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.MCP
    :ivar server_label: The label of the MCP server to use. Required.
    :vartype server_label: str
    :ivar name:
    :vartype name: str
    """

    type: Literal[ToolChoiceParamType.MCP] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """For MCP tools, the type is always ``mcp``. Required. MCP."""
    server_label: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The label of the MCP server to use. Required."""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        server_label: str,
        name: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.MCP  # type: ignore


class ToolChoiceWebSearchPreview(ToolChoiceParam, discriminator="web_search_preview"):
    """Indicates that the model should use a built-in tool to generate a response. `Learn more about
    built-in tools <https://platform.openai.com/docs/guides/tools>`_.

    :ivar type: Required. WEB_SEARCH_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WEB_SEARCH_PREVIEW
    """

    type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. WEB_SEARCH_PREVIEW."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.WEB_SEARCH_PREVIEW  # type: ignore


class ToolChoiceWebSearchPreview20250311(ToolChoiceParam, discriminator="web_search_preview_2025_03_11"):
    """Indicates that the model should use a built-in tool to generate a response. `Learn more about
    built-in tools <https://platform.openai.com/docs/guides/tools>`_.

    :ivar type: Required. WEB_SEARCH_PREVIEW2025_03_11.
    :vartype type: str or
     ~azure.ai.agentserver.responses.models.models.WEB_SEARCH_PREVIEW2025_03_11
    """

    type: Literal[ToolChoiceParamType.WEB_SEARCH_PREVIEW2025_03_11] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. WEB_SEARCH_PREVIEW2025_03_11."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolChoiceParamType.WEB_SEARCH_PREVIEW2025_03_11  # type: ignore


class ToolProjectConnection(_Model):
    """A project connection resource.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connection_id: A project connection in a ToolProjectConnectionList attached to
     this tool. Required.
    :vartype project_connection_id: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """A project connection in a ToolProjectConnectionList attached to this tool. Required."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class TopLogProb(_Model):
    """Top log probability.

    :ivar token: Required.
    :vartype token: str
    :ivar logprob: Required.
    :vartype logprob: int
    :ivar bytes: Required.
    :vartype bytes: list[int]
    """

    token: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    logprob: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""
    bytes: list[int] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        token: str,
        logprob: int,
        bytes: list[int],
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class TypeParam(ComputerAction, discriminator="type"):
    """Type.

    :ivar type: Specifies the event type. For a type action, this property is always set to
     ``type``. Required. TYPE.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.TYPE
    :ivar text: The text to type. Required.
    :vartype text: str
    """

    type: Literal[ComputerActionType.TYPE] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a type action, this property is always set to ``type``. Required.
     TYPE."""
    text: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The text to type. Required."""

    @overload
    def __init__(
        self,
        *,
        text: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.TYPE  # type: ignore


class UrlCitationBody(Annotation, discriminator="url_citation"):
    """URL citation.

    :ivar type: The type of the URL citation. Always ``url_citation``. Required. URL_CITATION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.URL_CITATION
    :ivar url: The URL of the web resource. Required.
    :vartype url: str
    :ivar start_index: The index of the first character of the URL citation in the message.
     Required.
    :vartype start_index: int
    :ivar end_index: The index of the last character of the URL citation in the message. Required.
    :vartype end_index: int
    :ivar title: The title of the web resource. Required.
    :vartype title: str
    """

    type: Literal[AnnotationType.URL_CITATION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the URL citation. Always ``url_citation``. Required. URL_CITATION."""
    url: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the web resource. Required."""
    start_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the first character of the URL citation in the message. Required."""
    end_index: int = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The index of the last character of the URL citation in the message. Required."""
    title: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The title of the web resource. Required."""

    @overload
    def __init__(
        self,
        *,
        url: str,
        start_index: int,
        end_index: int,
        title: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = AnnotationType.URL_CITATION  # type: ignore


class UserProfileMemoryItem(MemoryItem, discriminator="user_profile"):
    """A memory item specifically containing user profile information extracted from conversations,
    such as preferences, interests, and personal details.

    :ivar memory_id: The unique ID of the memory item. Required.
    :vartype memory_id: str
    :ivar updated_at: The last update time of the memory item. Required.
    :vartype updated_at: ~datetime.datetime
    :ivar scope: The namespace that logically groups and isolates memories, such as a user ID.
     Required.
    :vartype scope: str
    :ivar content: The content of the memory. Required.
    :vartype content: str
    :ivar kind: The kind of the memory item. Required. User profile information extracted from
     conversations.
    :vartype kind: str or ~azure.ai.agentserver.responses.models.models.USER_PROFILE
    """

    kind: Literal[MemoryItemKind.USER_PROFILE] = rest_discriminator(name="kind", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The kind of the memory item. Required. User profile information extracted from conversations."""

    @overload
    def __init__(
        self,
        *,
        memory_id: str,
        updated_at: datetime.datetime,
        scope: str,
        content: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.kind = MemoryItemKind.USER_PROFILE  # type: ignore


class VectorStoreFileAttributes(_Model):
    """Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
    additional information about the object in a structured format, and querying for objects via
    API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are
    strings with a maximum length of 512 characters, booleans, or numbers.

    """


class WaitParam(ComputerAction, discriminator="wait"):
    """Wait.

    :ivar type: Specifies the event type. For a wait action, this property is always set to
     ``wait``. Required. WAIT.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WAIT
    """

    type: Literal[ComputerActionType.WAIT] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Specifies the event type. For a wait action, this property is always set to ``wait``. Required.
     WAIT."""

    @overload
    def __init__(
        self,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ComputerActionType.WAIT  # type: ignore


class WebSearchActionFind(_Model):
    """Find action.

    :ivar type: The action type. Required. Default value is "find_in_page".
    :vartype type: str
    :ivar url: The URL of the page searched for the pattern. Required.
    :vartype url: str
    :ivar pattern: The pattern or text to search for within the page. Required.
    :vartype pattern: str
    """

    type: Literal["find_in_page"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The action type. Required. Default value is \"find_in_page\"."""
    url: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL of the page searched for the pattern. Required."""
    pattern: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The pattern or text to search for within the page. Required."""

    @overload
    def __init__(
        self,
        *,
        url: str,
        pattern: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["find_in_page"] = "find_in_page"


class WebSearchActionOpenPage(_Model):
    """Open page action.

    :ivar type: The action type. Required. Default value is "open_page".
    :vartype type: str
    :ivar url: The URL opened by the model.
    :vartype url: str
    """

    type: Literal["open_page"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The action type. Required. Default value is \"open_page\"."""
    url: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The URL opened by the model."""

    @overload
    def __init__(
        self,
        *,
        url: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["open_page"] = "open_page"


class WebSearchActionSearch(_Model):
    """Search action.

    :ivar type: The action type. Required. Default value is "search".
    :vartype type: str
    :ivar query: [DEPRECATED] The search query. Required.
    :vartype query: str
    :ivar queries: Search queries.
    :vartype queries: list[str]
    :ivar sources: Web search sources.
    :vartype sources:
     list[~azure.ai.agentserver.responses.models.models.WebSearchActionSearchSources]
    """

    type: Literal["search"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The action type. Required. Default value is \"search\"."""
    query: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """[DEPRECATED] The search query. Required."""
    queries: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Search queries."""
    sources: Optional[list["_models.WebSearchActionSearchSources"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Web search sources."""

    @overload
    def __init__(
        self,
        *,
        query: str,
        queries: Optional[list[str]] = None,
        sources: Optional[list["_models.WebSearchActionSearchSources"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["search"] = "search"


class WebSearchActionSearchSources(_Model):
    """WebSearchActionSearchSources.

    :ivar type: Required. Default value is "url".
    :vartype type: str
    :ivar url: Required.
    :vartype url: str
    """

    type: Literal["url"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required. Default value is \"url\"."""
    url: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        url: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["url"] = "url"


class WebSearchApproximateLocation(_Model):
    """Web search approximate location.

    :ivar type: The type of location approximation. Always ``approximate``. Required. Default value
     is "approximate".
    :vartype type: str
    :ivar country:
    :vartype country: str
    :ivar region:
    :vartype region: str
    :ivar city:
    :vartype city: str
    :ivar timezone:
    :vartype timezone: str
    """

    type: Literal["approximate"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The type of location approximation. Always ``approximate``. Required. Default value is
     \"approximate\"."""
    country: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    region: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    city: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        country: Optional[str] = None,
        region: Optional[str] = None,
        city: Optional[str] = None,
        timezone: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type: Literal["approximate"] = "approximate"


class WebSearchConfiguration(_Model):
    """A web search configuration for bing custom search.

    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar project_connection_id: Project connection id for grounding with bing custom search.
     Required.
    :vartype project_connection_id: str
    :ivar instance_name: Name of the custom configuration instance given to config. Required.
    :vartype instance_name: str
    """

    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Project connection id for grounding with bing custom search. Required."""
    instance_name: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Name of the custom configuration instance given to config. Required."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
        instance_name: str,
        name: Optional[str] = None,
        description: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class WebSearchPreviewTool(Tool, discriminator="web_search_preview"):
    """Web search preview.

    :ivar type: The type of the web search tool. One of ``web_search_preview`` or
     ``web_search_preview_2025_03_11``. Required. WEB_SEARCH_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WEB_SEARCH_PREVIEW
    :ivar user_location:
    :vartype user_location: ~azure.ai.agentserver.responses.models.models.ApproximateLocation
    :ivar search_context_size: High level guidance for the amount of context window space to use
     for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Known
     values are: "low", "medium", and "high".
    :vartype search_context_size: str or
     ~azure.ai.agentserver.responses.models.models.SearchContextSize
    """

    type: Literal[ToolType.WEB_SEARCH_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the web search tool. One of ``web_search_preview`` or
     ``web_search_preview_2025_03_11``. Required. WEB_SEARCH_PREVIEW."""
    user_location: Optional["_models.ApproximateLocation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    search_context_size: Optional[Union[str, "_models.SearchContextSize"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """High level guidance for the amount of context window space to use for the search. One of
     ``low``, ``medium``, or ``high``. ``medium`` is the default. Known values are: \"low\",
     \"medium\", and \"high\"."""

    @overload
    def __init__(
        self,
        *,
        user_location: Optional["_models.ApproximateLocation"] = None,
        search_context_size: Optional[Union[str, "_models.SearchContextSize"]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.WEB_SEARCH_PREVIEW  # type: ignore


class WebSearchTool(Tool, discriminator="web_search"):
    """Web search.

    :ivar type: The type of the web search tool. One of ``web_search`` or
     ``web_search_2025_08_26``. Required. WEB_SEARCH.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WEB_SEARCH
    :ivar filters:
    :vartype filters: ~azure.ai.agentserver.responses.models.models.WebSearchToolFilters
    :ivar user_location:
    :vartype user_location:
     ~azure.ai.agentserver.responses.models.models.WebSearchApproximateLocation
    :ivar search_context_size: High level guidance for the amount of context window space to use
     for the search. One of ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of
     the following types: Literal["low"], Literal["medium"], Literal["high"]
    :vartype search_context_size: str or str or str
    :ivar name: Optional user-defined name for this tool or configuration.
    :vartype name: str
    :ivar description: Optional user-defined description for this tool or configuration.
    :vartype description: str
    :ivar custom_search_configuration: The project connections attached to this tool. There can be
     a maximum of 1 connection resource attached to the tool.
    :vartype custom_search_configuration:
     ~azure.ai.agentserver.responses.models.models.WebSearchConfiguration
    """

    type: Literal[ToolType.WEB_SEARCH] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The type of the web search tool. One of ``web_search`` or ``web_search_2025_08_26``. Required.
     WEB_SEARCH."""
    filters: Optional["_models.WebSearchToolFilters"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    user_location: Optional["_models.WebSearchApproximateLocation"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    search_context_size: Optional[Literal["low", "medium", "high"]] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """High level guidance for the amount of context window space to use for the search. One of
     ``low``, ``medium``, or ``high``. ``medium`` is the default. Is one of the following types:
     Literal[\"low\"], Literal[\"medium\"], Literal[\"high\"]"""
    name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined name for this tool or configuration."""
    description: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Optional user-defined description for this tool or configuration."""
    custom_search_configuration: Optional["_models.WebSearchConfiguration"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The project connections attached to this tool. There can be a maximum of 1 connection resource
     attached to the tool."""

    @overload
    def __init__(
        self,
        *,
        filters: Optional["_models.WebSearchToolFilters"] = None,
        user_location: Optional["_models.WebSearchApproximateLocation"] = None,
        search_context_size: Optional[Literal["low", "medium", "high"]] = None,
        name: Optional[str] = None,
        description: Optional[str] = None,
        custom_search_configuration: Optional["_models.WebSearchConfiguration"] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.WEB_SEARCH  # type: ignore


class WebSearchToolFilters(_Model):
    """WebSearchToolFilters.

    :ivar allowed_domains:
    :vartype allowed_domains: list[str]
    """

    allowed_domains: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])

    @overload
    def __init__(
        self,
        *,
        allowed_domains: Optional[list[str]] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)


class WorkflowActionOutputItem(OutputItem, discriminator="workflow_action"):
    """WorkflowActionOutputItem.

    :ivar agent_reference: The agent that created the item.
    :vartype agent_reference: ~azure.ai.agentserver.responses.models.models.AgentReference
    :ivar response_id: The response on which the item is created.
    :vartype response_id: str
    :ivar type: Required. WORKFLOW_ACTION.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WORKFLOW_ACTION
    :ivar kind: The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent'). Required.
    :vartype kind: str
    :ivar action_id: Unique identifier for the action. Required.
    :vartype action_id: str
    :ivar parent_action_id: ID of the parent action if this is a nested action.
    :vartype parent_action_id: str
    :ivar previous_action_id: ID of the previous action if this action follows another.
    :vartype previous_action_id: str
    :ivar status: Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled').
     Required. Is one of the following types: Literal["completed"], Literal["failed"],
     Literal["in_progress"], Literal["cancelled"]
    :vartype status: str or str or str or str
    :ivar id: Required.
    :vartype id: str
    """

    type: Literal[OutputItemType.WORKFLOW_ACTION] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """Required. WORKFLOW_ACTION."""
    kind: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent'). Required."""
    action_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Unique identifier for the action. Required."""
    parent_action_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """ID of the parent action if this is a nested action."""
    previous_action_id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """ID of the previous action if this action follows another."""
    status: Literal["completed", "failed", "in_progress", "cancelled"] = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled'). Required. Is
     one of the following types: Literal[\"completed\"], Literal[\"failed\"],
     Literal[\"in_progress\"], Literal[\"cancelled\"]"""
    id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """Required."""

    @overload
    def __init__(
        self,
        *,
        kind: str,
        action_id: str,
        status: Literal["completed", "failed", "in_progress", "cancelled"],
        id: str,  # pylint: disable=redefined-builtin
        agent_reference: Optional["_models.AgentReference"] = None,
        response_id: Optional[str] = None,
        parent_action_id: Optional[str] = None,
        previous_action_id: Optional[str] = None,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = OutputItemType.WORKFLOW_ACTION  # type: ignore


class WorkIQPreviewTool(Tool, discriminator="work_iq_preview"):
    """A WorkIQ server-side tool.

    :ivar type: The object type, which is always 'work_iq_preview'. Required. WORK_IQ_PREVIEW.
    :vartype type: str or ~azure.ai.agentserver.responses.models.models.WORK_IQ_PREVIEW
    :ivar work_iq_preview: The WorkIQ tool parameters. Required.
    :vartype work_iq_preview:
     ~azure.ai.agentserver.responses.models.models.WorkIQPreviewToolParameters
    """

    type: Literal[ToolType.WORK_IQ_PREVIEW] = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"])  # type: ignore
    """The object type, which is always 'work_iq_preview'. Required. WORK_IQ_PREVIEW."""
    work_iq_preview: "_models.WorkIQPreviewToolParameters" = rest_field(
        visibility=["read", "create", "update", "delete", "query"]
    )
    """The WorkIQ tool parameters. Required."""

    @overload
    def __init__(
        self,
        *,
        work_iq_preview: "_models.WorkIQPreviewToolParameters",
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
        self.type = ToolType.WORK_IQ_PREVIEW  # type: ignore


class WorkIQPreviewToolParameters(_Model):
    """The WorkIQ tool parameters.

    :ivar project_connection_id: The ID of the WorkIQ project connection. Required.
    :vartype project_connection_id: str
    """

    project_connection_id: str = rest_field(visibility=["read", "create", "update", "delete", "query"])
    """The ID of the WorkIQ project connection. Required."""

    @overload
    def __init__(
        self,
        *,
        project_connection_id: str,
    ) -> None: ...

    @overload
    def __init__(self, mapping: Mapping[str, Any]) -> None:
        """
        :param mapping: raw JSON to initialize the model.
        :type mapping: Mapping[str, Any]
        """

    def __init__(self, *args: Any, **kwargs: Any) -> None:
        super().__init__(*args, **kwargs)
