
#nullable enable

namespace Google.Gemini
{
    /// <summary>
    /// Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. Next ID: 16
    /// </summary>
    public sealed partial class Tool
    {
        /// <summary>
        /// Tool to retrieve public web data for grounding, powered by Google.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("googleSearchRetrieval")]
        public global::Google.Gemini.GoogleSearchRetrieval? GoogleSearchRetrieval { get; set; }

        /// <summary>
        /// Optional. MCP Servers to connect to.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("mcpServers")]
        public global::System.Collections.Generic.IList<global::Google.Gemini.McpServer>? McpServers { get; set; }

        /// <summary>
        /// GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("googleSearch")]
        public global::Google.Gemini.GoogleSearch? GoogleSearch { get; set; }

        /// <summary>
        /// Tool to support URL context retrieval.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("urlContext")]
        public global::Google.Gemini.UrlContext? UrlContext { get; set; }

        /// <summary>
        /// The GoogleMaps Tool that provides geospatial context for the user's query.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("googleMaps")]
        public global::Google.Gemini.GoogleMaps? GoogleMaps { get; set; }

        /// <summary>
        /// Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role "function" generation context for the next model turn.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("functionDeclarations")]
        public global::System.Collections.Generic.IList<global::Google.Gemini.FunctionDeclaration>? FunctionDeclarations { get; set; }

        /// <summary>
        /// Computer Use tool type.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("computerUse")]
        public global::Google.Gemini.ComputerUse? ComputerUse { get; set; }

        /// <summary>
        /// Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("codeExecution")]
        public global::Google.Gemini.CodeExecution? CodeExecution { get; set; }

        /// <summary>
        /// The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.
        /// </summary>
        [global::System.Text.Json.Serialization.JsonPropertyName("fileSearch")]
        public global::Google.Gemini.FileSearch? FileSearch { get; set; }

        /// <summary>
        /// Additional properties that are not explicitly defined in the schema
        /// </summary>
        [global::System.Text.Json.Serialization.JsonExtensionData]
        public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

        /// <summary>
        /// Initializes a new instance of the <see cref="Tool" /> class.
        /// </summary>
        /// <param name="googleSearchRetrieval">
        /// Tool to retrieve public web data for grounding, powered by Google.
        /// </param>
        /// <param name="mcpServers">
        /// Optional. MCP Servers to connect to.
        /// </param>
        /// <param name="googleSearch">
        /// GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
        /// </param>
        /// <param name="urlContext">
        /// Tool to support URL context retrieval.
        /// </param>
        /// <param name="googleMaps">
        /// The GoogleMaps Tool that provides geospatial context for the user's query.
        /// </param>
        /// <param name="functionDeclarations">
        /// Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role "function" generation context for the next model turn.
        /// </param>
        /// <param name="computerUse">
        /// Computer Use tool type.
        /// </param>
        /// <param name="codeExecution">
        /// Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool.
        /// </param>
        /// <param name="fileSearch">
        /// The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.
        /// </param>
#if NET7_0_OR_GREATER
        [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
        public Tool(
            global::Google.Gemini.GoogleSearchRetrieval? googleSearchRetrieval,
            global::System.Collections.Generic.IList<global::Google.Gemini.McpServer>? mcpServers,
            global::Google.Gemini.GoogleSearch? googleSearch,
            global::Google.Gemini.UrlContext? urlContext,
            global::Google.Gemini.GoogleMaps? googleMaps,
            global::System.Collections.Generic.IList<global::Google.Gemini.FunctionDeclaration>? functionDeclarations,
            global::Google.Gemini.ComputerUse? computerUse,
            global::Google.Gemini.CodeExecution? codeExecution,
            global::Google.Gemini.FileSearch? fileSearch)
        {
            this.GoogleSearchRetrieval = googleSearchRetrieval;
            this.McpServers = mcpServers;
            this.GoogleSearch = googleSearch;
            this.UrlContext = urlContext;
            this.GoogleMaps = googleMaps;
            this.FunctionDeclarations = functionDeclarations;
            this.ComputerUse = computerUse;
            this.CodeExecution = codeExecution;
            this.FileSearch = fileSearch;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Tool" /> class.
        /// </summary>
        public Tool()
        {
        }

    }
}