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

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v6.33.2
// source: google/cloud/dialogflow/cx/v3/tool_call.proto

package cxpb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	structpb "google.golang.org/protobuf/types/known/structpb"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Represents a call of a specific tool's action with the specified inputs.
type ToolCall struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
	// this call. Format:
	// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
	Tool string `protobuf:"bytes,1,opt,name=tool,proto3" json:"tool,omitempty"`
	// Required. The name of the tool's action associated with this call.
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// Optional. The action's input parameters.
	InputParameters *structpb.Struct `protobuf:"bytes,3,opt,name=input_parameters,json=inputParameters,proto3" json:"input_parameters,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *ToolCall) Reset() {
	*x = ToolCall{}
	mi := &file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ToolCall) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ToolCall) ProtoMessage() {}

func (x *ToolCall) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ToolCall.ProtoReflect.Descriptor instead.
func (*ToolCall) Descriptor() ([]byte, []int) {
	return file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescGZIP(), []int{0}
}

func (x *ToolCall) GetTool() string {
	if x != nil {
		return x.Tool
	}
	return ""
}

func (x *ToolCall) GetAction() string {
	if x != nil {
		return x.Action
	}
	return ""
}

func (x *ToolCall) GetInputParameters() *structpb.Struct {
	if x != nil {
		return x.InputParameters
	}
	return nil
}

// The result of calling a tool's action that has been executed by the client.
type ToolCallResult struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The [tool][google.cloud.dialogflow.cx.v3.Tool] associated with
	// this call. Format:
	// `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.
	Tool string `protobuf:"bytes,1,opt,name=tool,proto3" json:"tool,omitempty"`
	// Required. The name of the tool's action associated with this call.
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// The tool call's result.
	//
	// Types that are valid to be assigned to Result:
	//
	//	*ToolCallResult_Error_
	//	*ToolCallResult_OutputParameters
	Result        isToolCallResult_Result `protobuf_oneof:"result"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ToolCallResult) Reset() {
	*x = ToolCallResult{}
	mi := &file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ToolCallResult) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ToolCallResult) ProtoMessage() {}

func (x *ToolCallResult) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ToolCallResult.ProtoReflect.Descriptor instead.
func (*ToolCallResult) Descriptor() ([]byte, []int) {
	return file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescGZIP(), []int{1}
}

func (x *ToolCallResult) GetTool() string {
	if x != nil {
		return x.Tool
	}
	return ""
}

func (x *ToolCallResult) GetAction() string {
	if x != nil {
		return x.Action
	}
	return ""
}

func (x *ToolCallResult) GetResult() isToolCallResult_Result {
	if x != nil {
		return x.Result
	}
	return nil
}

func (x *ToolCallResult) GetError() *ToolCallResult_Error {
	if x != nil {
		if x, ok := x.Result.(*ToolCallResult_Error_); ok {
			return x.Error
		}
	}
	return nil
}

func (x *ToolCallResult) GetOutputParameters() *structpb.Struct {
	if x != nil {
		if x, ok := x.Result.(*ToolCallResult_OutputParameters); ok {
			return x.OutputParameters
		}
	}
	return nil
}

type isToolCallResult_Result interface {
	isToolCallResult_Result()
}

type ToolCallResult_Error_ struct {
	// The tool call's error.
	Error *ToolCallResult_Error `protobuf:"bytes,3,opt,name=error,proto3,oneof"`
}

type ToolCallResult_OutputParameters struct {
	// The tool call's output parameters.
	OutputParameters *structpb.Struct `protobuf:"bytes,4,opt,name=output_parameters,json=outputParameters,proto3,oneof"`
}

func (*ToolCallResult_Error_) isToolCallResult_Result() {}

func (*ToolCallResult_OutputParameters) isToolCallResult_Result() {}

// An error produced by the tool call.
type ToolCallResult_Error struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Optional. The error message of the function.
	Message       string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ToolCallResult_Error) Reset() {
	*x = ToolCallResult_Error{}
	mi := &file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ToolCallResult_Error) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ToolCallResult_Error) ProtoMessage() {}

func (x *ToolCallResult_Error) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ToolCallResult_Error.ProtoReflect.Descriptor instead.
func (*ToolCallResult_Error) Descriptor() ([]byte, []int) {
	return file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescGZIP(), []int{1, 0}
}

func (x *ToolCallResult_Error) GetMessage() string {
	if x != nil {
		return x.Message
	}
	return ""
}

var File_google_cloud_dialogflow_cx_v3_tool_call_proto protoreflect.FileDescriptor

const file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDesc = "" +
	"\n" +
	"-google/cloud/dialogflow/cx/v3/tool_call.proto\x12\x1dgoogle.cloud.dialogflow.cx.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xac\x01\n" +
	"\bToolCall\x12:\n" +
	"\x04tool\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" +
	"\x1edialogflow.googleapis.com/ToolR\x04tool\x12\x1b\n" +
	"\x06action\x18\x02 \x01(\tB\x03\xe0A\x02R\x06action\x12G\n" +
	"\x10input_parameters\x18\x03 \x01(\v2\x17.google.protobuf.StructB\x03\xe0A\x01R\x0finputParameters\"\xb0\x02\n" +
	"\x0eToolCallResult\x12:\n" +
	"\x04tool\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" +
	"\x1edialogflow.googleapis.com/ToolR\x04tool\x12\x1b\n" +
	"\x06action\x18\x02 \x01(\tB\x03\xe0A\x02R\x06action\x12K\n" +
	"\x05error\x18\x03 \x01(\v23.google.cloud.dialogflow.cx.v3.ToolCallResult.ErrorH\x00R\x05error\x12F\n" +
	"\x11output_parameters\x18\x04 \x01(\v2\x17.google.protobuf.StructH\x00R\x10outputParameters\x1a&\n" +
	"\x05Error\x12\x1d\n" +
	"\amessage\x18\x01 \x01(\tB\x03\xe0A\x01R\amessageB\b\n" +
	"\x06resultB\xb0\x01\n" +
	"!com.google.cloud.dialogflow.cx.v3B\rToolCallProtoP\x01Z1cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb\xa2\x02\x02DF\xaa\x02\x1dGoogle.Cloud.Dialogflow.Cx.V3\xea\x02!Google::Cloud::Dialogflow::CX::V3b\x06proto3"

var (
	file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescOnce sync.Once
	file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescData []byte
)

func file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescGZIP() []byte {
	file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescOnce.Do(func() {
		file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDesc), len(file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDesc)))
	})
	return file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDescData
}

var file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_google_cloud_dialogflow_cx_v3_tool_call_proto_goTypes = []any{
	(*ToolCall)(nil),             // 0: google.cloud.dialogflow.cx.v3.ToolCall
	(*ToolCallResult)(nil),       // 1: google.cloud.dialogflow.cx.v3.ToolCallResult
	(*ToolCallResult_Error)(nil), // 2: google.cloud.dialogflow.cx.v3.ToolCallResult.Error
	(*structpb.Struct)(nil),      // 3: google.protobuf.Struct
}
var file_google_cloud_dialogflow_cx_v3_tool_call_proto_depIdxs = []int32{
	3, // 0: google.cloud.dialogflow.cx.v3.ToolCall.input_parameters:type_name -> google.protobuf.Struct
	2, // 1: google.cloud.dialogflow.cx.v3.ToolCallResult.error:type_name -> google.cloud.dialogflow.cx.v3.ToolCallResult.Error
	3, // 2: google.cloud.dialogflow.cx.v3.ToolCallResult.output_parameters:type_name -> google.protobuf.Struct
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_google_cloud_dialogflow_cx_v3_tool_call_proto_init() }
func file_google_cloud_dialogflow_cx_v3_tool_call_proto_init() {
	if File_google_cloud_dialogflow_cx_v3_tool_call_proto != nil {
		return
	}
	file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes[1].OneofWrappers = []any{
		(*ToolCallResult_Error_)(nil),
		(*ToolCallResult_OutputParameters)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDesc), len(file_google_cloud_dialogflow_cx_v3_tool_call_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_dialogflow_cx_v3_tool_call_proto_goTypes,
		DependencyIndexes: file_google_cloud_dialogflow_cx_v3_tool_call_proto_depIdxs,
		MessageInfos:      file_google_cloud_dialogflow_cx_v3_tool_call_proto_msgTypes,
	}.Build()
	File_google_cloud_dialogflow_cx_v3_tool_call_proto = out.File
	file_google_cloud_dialogflow_cx_v3_tool_call_proto_goTypes = nil
	file_google_cloud_dialogflow_cx_v3_tool_call_proto_depIdxs = nil
}
