// 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
//
//     http://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.

syntax = "proto3";

package google.cloud.dialogflow.v2beta1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/v2beta1/tool.proto";

option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1";
option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb";
option java_multiple_files = true;
option java_outer_classname = "ToolsetProto";
option java_package = "com.google.cloud.dialogflow.v2beta1";
option objc_class_prefix = "DF";
option (google.api.resource_definition) = {
  type: "ces.googleapis.com/Toolset"
  pattern: "projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}"
};

// A tool that is created from a toolset.
message ToolsetTool {
  // Required. The name of the toolset to retrieve the schema for.
  // Format:
  // `projects/{project}/locations/{location}/apps/{app}/toolsets/{toolset}`
  string toolset = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = { type: "ces.googleapis.com/Toolset" }
  ];

  // Optional. The operationId field of the OpenAPI endpoint. The operationId
  // must be present in the toolset's definition.
  string operation_id = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Indicates whether the tool requires human confirmation.
  Tool.ConfirmationRequirement confirmation_requirement = 3
      [(google.api.field_behavior) = OPTIONAL];
}
