// 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        v4.25.7
// source: google/cloud/dialogflow/v2/conversation_event.proto

package dialogflowpb

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

	_ "google.golang.org/genproto/googleapis/api/annotations"
	status "google.golang.org/genproto/googleapis/rpc/status"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

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)
)

// Enumeration of the types of events available.
type ConversationEvent_Type int32

const (
	// Type not set.
	ConversationEvent_TYPE_UNSPECIFIED ConversationEvent_Type = 0
	// A new conversation has been opened. This is fired when a telephone call
	// is answered, or a conversation is created via the API.
	ConversationEvent_CONVERSATION_STARTED ConversationEvent_Type = 1
	// An existing conversation has closed. This is fired when a telephone call
	// is terminated, or a conversation is closed via the API.
	// The event is fired for every CompleteConversation call, even if the
	// conversation is already closed.
	ConversationEvent_CONVERSATION_FINISHED ConversationEvent_Type = 2
	// An existing conversation has received notification from Dialogflow that
	// human intervention is required.
	ConversationEvent_HUMAN_INTERVENTION_NEEDED ConversationEvent_Type = 3
	// An existing conversation has received a new message, either from API or
	// telephony. It is configured in
	// [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config]
	ConversationEvent_NEW_MESSAGE ConversationEvent_Type = 5
	// An existing conversation has received a new speech recognition result.
	// This is mainly for delivering intermediate transcripts. The notification
	// is configured in
	// [ConversationProfile.new_recognition_event_notification_config][].
	ConversationEvent_NEW_RECOGNITION_RESULT ConversationEvent_Type = 7
	// Unrecoverable error during a telephone call.
	//
	// In general non-recoverable errors only occur if something was
	// misconfigured in the ConversationProfile corresponding to the call. After
	// a non-recoverable error, Dialogflow may stop responding.
	//
	// We don't fire this event:
	//
	// * in an API call because we can directly return the error, or,
	// * when we can recover from an error.
	ConversationEvent_UNRECOVERABLE_ERROR ConversationEvent_Type = 4
)

// Enum value maps for ConversationEvent_Type.
var (
	ConversationEvent_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "CONVERSATION_STARTED",
		2: "CONVERSATION_FINISHED",
		3: "HUMAN_INTERVENTION_NEEDED",
		5: "NEW_MESSAGE",
		7: "NEW_RECOGNITION_RESULT",
		4: "UNRECOVERABLE_ERROR",
	}
	ConversationEvent_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED":          0,
		"CONVERSATION_STARTED":      1,
		"CONVERSATION_FINISHED":     2,
		"HUMAN_INTERVENTION_NEEDED": 3,
		"NEW_MESSAGE":               5,
		"NEW_RECOGNITION_RESULT":    7,
		"UNRECOVERABLE_ERROR":       4,
	}
)

func (x ConversationEvent_Type) Enum() *ConversationEvent_Type {
	p := new(ConversationEvent_Type)
	*p = x
	return p
}

func (x ConversationEvent_Type) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ConversationEvent_Type) Descriptor() protoreflect.EnumDescriptor {
	return file_google_cloud_dialogflow_v2_conversation_event_proto_enumTypes[0].Descriptor()
}

func (ConversationEvent_Type) Type() protoreflect.EnumType {
	return &file_google_cloud_dialogflow_v2_conversation_event_proto_enumTypes[0]
}

func (x ConversationEvent_Type) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ConversationEvent_Type.Descriptor instead.
func (ConversationEvent_Type) EnumDescriptor() ([]byte, []int) {
	return file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescGZIP(), []int{0, 0}
}

// Represents a notification sent to Pub/Sub subscribers for conversation
// lifecycle events.
type ConversationEvent struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The unique identifier of the conversation this notification
	// refers to.
	// Format: `projects/<Project ID>/conversations/<Conversation ID>`.
	Conversation string `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"`
	// The type of the event that this notification refers to.
	Type ConversationEvent_Type `protobuf:"varint,2,opt,name=type,proto3,enum=google.cloud.dialogflow.v2.ConversationEvent_Type" json:"type,omitempty"`
	// More detailed information about an error. Only set for type
	// UNRECOVERABLE_ERROR_IN_PHONE_CALL.
	ErrorStatus *status.Status `protobuf:"bytes,3,opt,name=error_status,json=errorStatus,proto3" json:"error_status,omitempty"`
	// Payload of conversation event.
	//
	// Types that are valid to be assigned to Payload:
	//
	//	*ConversationEvent_NewMessagePayload
	//	*ConversationEvent_NewRecognitionResultPayload
	Payload       isConversationEvent_Payload `protobuf_oneof:"payload"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ConversationEvent) ProtoMessage() {}

func (x *ConversationEvent) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_dialogflow_v2_conversation_event_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 ConversationEvent.ProtoReflect.Descriptor instead.
func (*ConversationEvent) Descriptor() ([]byte, []int) {
	return file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescGZIP(), []int{0}
}

func (x *ConversationEvent) GetConversation() string {
	if x != nil {
		return x.Conversation
	}
	return ""
}

func (x *ConversationEvent) GetType() ConversationEvent_Type {
	if x != nil {
		return x.Type
	}
	return ConversationEvent_TYPE_UNSPECIFIED
}

func (x *ConversationEvent) GetErrorStatus() *status.Status {
	if x != nil {
		return x.ErrorStatus
	}
	return nil
}

func (x *ConversationEvent) GetPayload() isConversationEvent_Payload {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *ConversationEvent) GetNewMessagePayload() *Message {
	if x != nil {
		if x, ok := x.Payload.(*ConversationEvent_NewMessagePayload); ok {
			return x.NewMessagePayload
		}
	}
	return nil
}

func (x *ConversationEvent) GetNewRecognitionResultPayload() *StreamingRecognitionResult {
	if x != nil {
		if x, ok := x.Payload.(*ConversationEvent_NewRecognitionResultPayload); ok {
			return x.NewRecognitionResultPayload
		}
	}
	return nil
}

type isConversationEvent_Payload interface {
	isConversationEvent_Payload()
}

type ConversationEvent_NewMessagePayload struct {
	// Payload of NEW_MESSAGE event.
	NewMessagePayload *Message `protobuf:"bytes,4,opt,name=new_message_payload,json=newMessagePayload,proto3,oneof"`
}

type ConversationEvent_NewRecognitionResultPayload struct {
	// Payload of NEW_RECOGNITION_RESULT event.
	NewRecognitionResultPayload *StreamingRecognitionResult `protobuf:"bytes,5,opt,name=new_recognition_result_payload,json=newRecognitionResultPayload,proto3,oneof"`
}

func (*ConversationEvent_NewMessagePayload) isConversationEvent_Payload() {}

func (*ConversationEvent_NewRecognitionResultPayload) isConversationEvent_Payload() {}

var File_google_cloud_dialogflow_v2_conversation_event_proto protoreflect.FileDescriptor

const file_google_cloud_dialogflow_v2_conversation_event_proto_rawDesc = "" +
	"\n" +
	"3google/cloud/dialogflow/v2/conversation_event.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/dialogflow/v2/participant.proto\x1a(google/cloud/dialogflow/v2/session.proto\x1a\x17google/rpc/status.proto\"\xd0\x04\n" +
	"\x11ConversationEvent\x12\"\n" +
	"\fconversation\x18\x01 \x01(\tR\fconversation\x12F\n" +
	"\x04type\x18\x02 \x01(\x0e22.google.cloud.dialogflow.v2.ConversationEvent.TypeR\x04type\x125\n" +
	"\ferror_status\x18\x03 \x01(\v2\x12.google.rpc.StatusR\verrorStatus\x12U\n" +
	"\x13new_message_payload\x18\x04 \x01(\v2#.google.cloud.dialogflow.v2.MessageH\x00R\x11newMessagePayload\x12}\n" +
	"\x1enew_recognition_result_payload\x18\x05 \x01(\v26.google.cloud.dialogflow.v2.StreamingRecognitionResultH\x00R\x1bnewRecognitionResultPayload\"\xb6\x01\n" +
	"\x04Type\x12\x14\n" +
	"\x10TYPE_UNSPECIFIED\x10\x00\x12\x18\n" +
	"\x14CONVERSATION_STARTED\x10\x01\x12\x19\n" +
	"\x15CONVERSATION_FINISHED\x10\x02\x12\x1d\n" +
	"\x19HUMAN_INTERVENTION_NEEDED\x10\x03\x12\x0f\n" +
	"\vNEW_MESSAGE\x10\x05\x12\x1a\n" +
	"\x16NEW_RECOGNITION_RESULT\x10\a\x12\x17\n" +
	"\x13UNRECOVERABLE_ERROR\x10\x04B\t\n" +
	"\apayloadB\x9c\x01\n" +
	"\x1ecom.google.cloud.dialogflow.v2B\x16ConversationEventProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xa2\x02\x02DF\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\x06proto3"

var (
	file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescOnce sync.Once
	file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescData []byte
)

func file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescGZIP() []byte {
	file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescOnce.Do(func() {
		file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_dialogflow_v2_conversation_event_proto_rawDesc), len(file_google_cloud_dialogflow_v2_conversation_event_proto_rawDesc)))
	})
	return file_google_cloud_dialogflow_v2_conversation_event_proto_rawDescData
}

var file_google_cloud_dialogflow_v2_conversation_event_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_google_cloud_dialogflow_v2_conversation_event_proto_goTypes = []any{
	(ConversationEvent_Type)(0),        // 0: google.cloud.dialogflow.v2.ConversationEvent.Type
	(*ConversationEvent)(nil),          // 1: google.cloud.dialogflow.v2.ConversationEvent
	(*status.Status)(nil),              // 2: google.rpc.Status
	(*Message)(nil),                    // 3: google.cloud.dialogflow.v2.Message
	(*StreamingRecognitionResult)(nil), // 4: google.cloud.dialogflow.v2.StreamingRecognitionResult
}
var file_google_cloud_dialogflow_v2_conversation_event_proto_depIdxs = []int32{
	0, // 0: google.cloud.dialogflow.v2.ConversationEvent.type:type_name -> google.cloud.dialogflow.v2.ConversationEvent.Type
	2, // 1: google.cloud.dialogflow.v2.ConversationEvent.error_status:type_name -> google.rpc.Status
	3, // 2: google.cloud.dialogflow.v2.ConversationEvent.new_message_payload:type_name -> google.cloud.dialogflow.v2.Message
	4, // 3: google.cloud.dialogflow.v2.ConversationEvent.new_recognition_result_payload:type_name -> google.cloud.dialogflow.v2.StreamingRecognitionResult
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_google_cloud_dialogflow_v2_conversation_event_proto_init() }
func file_google_cloud_dialogflow_v2_conversation_event_proto_init() {
	if File_google_cloud_dialogflow_v2_conversation_event_proto != nil {
		return
	}
	file_google_cloud_dialogflow_v2_participant_proto_init()
	file_google_cloud_dialogflow_v2_session_proto_init()
	file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes[0].OneofWrappers = []any{
		(*ConversationEvent_NewMessagePayload)(nil),
		(*ConversationEvent_NewRecognitionResultPayload)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_dialogflow_v2_conversation_event_proto_rawDesc), len(file_google_cloud_dialogflow_v2_conversation_event_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_dialogflow_v2_conversation_event_proto_goTypes,
		DependencyIndexes: file_google_cloud_dialogflow_v2_conversation_event_proto_depIdxs,
		EnumInfos:         file_google_cloud_dialogflow_v2_conversation_event_proto_enumTypes,
		MessageInfos:      file_google_cloud_dialogflow_v2_conversation_event_proto_msgTypes,
	}.Build()
	File_google_cloud_dialogflow_v2_conversation_event_proto = out.File
	file_google_cloud_dialogflow_v2_conversation_event_proto_goTypes = nil
	file_google_cloud_dialogflow_v2_conversation_event_proto_depIdxs = nil
}
