// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import GoogleCloudWkt

/// Message describing McpTool object
public struct McpTool: Codable, Equatable, GoogleCloudWkt._AnyPackable,
  Sendable
{
  /// Identifier. The resource name of the McpTool.
  /// Format:
  /// `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`.
  /// Example:
  /// projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job
  /// for 1p
  /// projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza
  /// for 2p
  public var name: Swift.String = Swift.String()

  /// Optional. A human-readable name for the tool, suitable for display.
  public var displayName: Swift.String = Swift.String()

  /// A human-readable description of the tool's functionality.
  public var description: Swift.String = Swift.String()

  /// Automatically populated reference to MCP Server. Helpful when multiple
  /// tools are requested across different MCP Servers.
  public var mcpServerUrls: [Swift.String] = []

  /// A JSON Schema object defining the expected parameters for invoking the
  /// tool.
  public var inputSchema: GoogleCloudWkt.Struct? = nil

  /// Optional. A JSON Schema object defining the expected structure of the
  /// tool's output.
  public var outputSchema: GoogleCloudWkt.Struct? = nil

  /// Optional key-value object that allows developers to provide additional
  /// information regarding tool properties, behavior, and usage best practices.
  /// Annotations or tags to facilitate semantic search across tools ("semantic
  /// tags") are not in the MVP scope. When implemented, the first set of
  /// supported annotations will likely be the standard, predefined annotations
  /// from the open-source MCP spec. These include:
  ///   - title: A human-readable title for the tool, useful for UI display.
  ///   - readOnlyHint: If true, indicates the tool does not modify its
  ///   environment.
  ///   - destructiveHint: If true, the tool may perform destructive updates
  ///   (only meaningful when readOnlyHint is false).
  ///   - idempotentHint: If true, calling the tool repeatedly with the same
  ///   arguments has no additional effect (only meaningful when readOnlyHint is
  ///   false).
  ///   - openWorldHint: If true, the tool may interact with an "open world" of
  ///   external entities.
  public var annotations: GoogleCloudWkt.Struct? = nil

  /// Initialize a new instance of `McpTool`.
  public init() {}

  /// Use `config` to return a new instance of this object, with some fields updated.
  ///
  /// Commonly used to initialize the value, for example:
  ///
  /// ```
  /// let value = McpTool().with { $0.name = ... }
  /// ```
  public func with(_ config: (inout Self) throws -> Swift.Void) rethrows -> Self {
    var copy = self
    try config(&copy)
    return copy
  }

  public static var _anyTypeUrl: Swift.String {
    return "type.googleapis.com/google.cloud.apiregistry.v1.McpTool"
  }
  public init(fromAny any: GoogleCloudWkt.`Any`) throws {
    self = try GoogleCloudWkt._slowAnyDeserialize(Self.self, from: any)
  }
  public func _pack() throws -> GoogleCloudWkt.Struct {
    return try GoogleCloudWkt._slowAnySerialize(message: self)
  }
}
