// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.7
// 	protoc        v5.29.3
// source: core/capabilities/remote/types/messages.proto

package types

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

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

type Error int32

const (
	Error_OK                   Error = 0
	Error_VALIDATION_FAILED    Error = 1
	Error_CAPABILITY_NOT_FOUND Error = 2
	Error_INVALID_REQUEST      Error = 3
	Error_TIMEOUT              Error = 4
	Error_INTERNAL_ERROR       Error = 5
)

// Enum value maps for Error.
var (
	Error_name = map[int32]string{
		0: "OK",
		1: "VALIDATION_FAILED",
		2: "CAPABILITY_NOT_FOUND",
		3: "INVALID_REQUEST",
		4: "TIMEOUT",
		5: "INTERNAL_ERROR",
	}
	Error_value = map[string]int32{
		"OK":                   0,
		"VALIDATION_FAILED":    1,
		"CAPABILITY_NOT_FOUND": 2,
		"INVALID_REQUEST":      3,
		"TIMEOUT":              4,
		"INTERNAL_ERROR":       5,
	}
)

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

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

func (Error) Descriptor() protoreflect.EnumDescriptor {
	return file_core_capabilities_remote_types_messages_proto_enumTypes[0].Descriptor()
}

func (Error) Type() protoreflect.EnumType {
	return &file_core_capabilities_remote_types_messages_proto_enumTypes[0]
}

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

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

type Message struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Signature     []byte                 `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	Body          []byte                 `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // proto-encoded MessageBody to sign
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Message) ProtoMessage() {}

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

func (x *Message) GetSignature() []byte {
	if x != nil {
		return x.Signature
	}
	return nil
}

func (x *Message) GetBody() []byte {
	if x != nil {
		return x.Body
	}
	return nil
}

type MessageBody struct {
	state        protoimpl.MessageState `protogen:"open.v1"`
	Version      uint32                 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Sender       []byte                 `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	Receiver     []byte                 `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	Timestamp    int64                  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	MessageId    []byte                 `protobuf:"bytes,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // scoped to sender
	CapabilityId string                 `protobuf:"bytes,6,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"`
	Method       string                 `protobuf:"bytes,9,opt,name=method,proto3" json:"method,omitempty"` // Capability API method ("RegisterTrigger", "Execute", etc)
	Error        Error                  `protobuf:"varint,10,opt,name=error,proto3,enum=remote.Error" json:"error,omitempty"`
	ErrorMsg     string                 `protobuf:"bytes,11,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"`
	// payload contains a CapabilityRequest or CapabilityResponse
	Payload []byte `protobuf:"bytes,12,opt,name=payload,proto3" json:"payload,omitempty"`
	// Types that are valid to be assigned to Metadata:
	//
	//	*MessageBody_TriggerRegistrationMetadata
	//	*MessageBody_TriggerEventMetadata
	Metadata         isMessageBody_Metadata `protobuf_oneof:"metadata"`
	CapabilityDonId  uint32                 `protobuf:"varint,15,opt,name=capability_don_id,json=capabilityDonId,proto3" json:"capability_don_id,omitempty"`
	CallerDonId      uint32                 `protobuf:"varint,16,opt,name=caller_don_id,json=callerDonId,proto3" json:"caller_don_id,omitempty"`
	CapabilityMethod string                 `protobuf:"bytes,17,opt,name=capability_method,json=capabilityMethod,proto3" json:"capability_method,omitempty"` // method name defined by the capability (empty for legacy "v1" calls)
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*MessageBody) ProtoMessage() {}

func (x *MessageBody) ProtoReflect() protoreflect.Message {
	mi := &file_core_capabilities_remote_types_messages_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 MessageBody.ProtoReflect.Descriptor instead.
func (*MessageBody) Descriptor() ([]byte, []int) {
	return file_core_capabilities_remote_types_messages_proto_rawDescGZIP(), []int{1}
}

func (x *MessageBody) GetVersion() uint32 {
	if x != nil {
		return x.Version
	}
	return 0
}

func (x *MessageBody) GetSender() []byte {
	if x != nil {
		return x.Sender
	}
	return nil
}

func (x *MessageBody) GetReceiver() []byte {
	if x != nil {
		return x.Receiver
	}
	return nil
}

func (x *MessageBody) GetTimestamp() int64 {
	if x != nil {
		return x.Timestamp
	}
	return 0
}

func (x *MessageBody) GetMessageId() []byte {
	if x != nil {
		return x.MessageId
	}
	return nil
}

func (x *MessageBody) GetCapabilityId() string {
	if x != nil {
		return x.CapabilityId
	}
	return ""
}

func (x *MessageBody) GetMethod() string {
	if x != nil {
		return x.Method
	}
	return ""
}

func (x *MessageBody) GetError() Error {
	if x != nil {
		return x.Error
	}
	return Error_OK
}

func (x *MessageBody) GetErrorMsg() string {
	if x != nil {
		return x.ErrorMsg
	}
	return ""
}

func (x *MessageBody) GetPayload() []byte {
	if x != nil {
		return x.Payload
	}
	return nil
}

func (x *MessageBody) GetMetadata() isMessageBody_Metadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

func (x *MessageBody) GetTriggerRegistrationMetadata() *TriggerRegistrationMetadata {
	if x != nil {
		if x, ok := x.Metadata.(*MessageBody_TriggerRegistrationMetadata); ok {
			return x.TriggerRegistrationMetadata
		}
	}
	return nil
}

func (x *MessageBody) GetTriggerEventMetadata() *TriggerEventMetadata {
	if x != nil {
		if x, ok := x.Metadata.(*MessageBody_TriggerEventMetadata); ok {
			return x.TriggerEventMetadata
		}
	}
	return nil
}

func (x *MessageBody) GetCapabilityDonId() uint32 {
	if x != nil {
		return x.CapabilityDonId
	}
	return 0
}

func (x *MessageBody) GetCallerDonId() uint32 {
	if x != nil {
		return x.CallerDonId
	}
	return 0
}

func (x *MessageBody) GetCapabilityMethod() string {
	if x != nil {
		return x.CapabilityMethod
	}
	return ""
}

type isMessageBody_Metadata interface {
	isMessageBody_Metadata()
}

type MessageBody_TriggerRegistrationMetadata struct {
	TriggerRegistrationMetadata *TriggerRegistrationMetadata `protobuf:"bytes,13,opt,name=trigger_registration_metadata,json=triggerRegistrationMetadata,proto3,oneof"`
}

type MessageBody_TriggerEventMetadata struct {
	TriggerEventMetadata *TriggerEventMetadata `protobuf:"bytes,14,opt,name=trigger_event_metadata,json=triggerEventMetadata,proto3,oneof"`
}

func (*MessageBody_TriggerRegistrationMetadata) isMessageBody_Metadata() {}

func (*MessageBody_TriggerEventMetadata) isMessageBody_Metadata() {}

type TriggerRegistrationMetadata struct {
	state               protoimpl.MessageState `protogen:"open.v1"`
	LastReceivedEventId string                 `protobuf:"bytes,1,opt,name=last_received_event_id,json=lastReceivedEventId,proto3" json:"last_received_event_id,omitempty"`
	unknownFields       protoimpl.UnknownFields
	sizeCache           protoimpl.SizeCache
}

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

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

func (*TriggerRegistrationMetadata) ProtoMessage() {}

func (x *TriggerRegistrationMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_core_capabilities_remote_types_messages_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 TriggerRegistrationMetadata.ProtoReflect.Descriptor instead.
func (*TriggerRegistrationMetadata) Descriptor() ([]byte, []int) {
	return file_core_capabilities_remote_types_messages_proto_rawDescGZIP(), []int{2}
}

func (x *TriggerRegistrationMetadata) GetLastReceivedEventId() string {
	if x != nil {
		return x.LastReceivedEventId
	}
	return ""
}

type TriggerEventMetadata struct {
	state          protoimpl.MessageState `protogen:"open.v1"`
	TriggerEventId string                 `protobuf:"bytes,1,opt,name=trigger_event_id,json=triggerEventId,proto3" json:"trigger_event_id,omitempty"`
	WorkflowIds    []string               `protobuf:"bytes,2,rep,name=workflow_ids,json=workflowIds,proto3" json:"workflow_ids,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *TriggerEventMetadata) Reset() {
	*x = TriggerEventMetadata{}
	mi := &file_core_capabilities_remote_types_messages_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*TriggerEventMetadata) ProtoMessage() {}

func (x *TriggerEventMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_core_capabilities_remote_types_messages_proto_msgTypes[3]
	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 TriggerEventMetadata.ProtoReflect.Descriptor instead.
func (*TriggerEventMetadata) Descriptor() ([]byte, []int) {
	return file_core_capabilities_remote_types_messages_proto_rawDescGZIP(), []int{3}
}

func (x *TriggerEventMetadata) GetTriggerEventId() string {
	if x != nil {
		return x.TriggerEventId
	}
	return ""
}

func (x *TriggerEventMetadata) GetWorkflowIds() []string {
	if x != nil {
		return x.WorkflowIds
	}
	return nil
}

var File_core_capabilities_remote_types_messages_proto protoreflect.FileDescriptor

const file_core_capabilities_remote_types_messages_proto_rawDesc = "" +
	"\n" +
	"-core/capabilities/remote/types/messages.proto\x12\x06remote\";\n" +
	"\aMessage\x12\x1c\n" +
	"\tsignature\x18\x01 \x01(\fR\tsignature\x12\x12\n" +
	"\x04body\x18\x02 \x01(\fR\x04body\"\x86\x05\n" +
	"\vMessageBody\x12\x18\n" +
	"\aversion\x18\x01 \x01(\rR\aversion\x12\x16\n" +
	"\x06sender\x18\x02 \x01(\fR\x06sender\x12\x1a\n" +
	"\breceiver\x18\x03 \x01(\fR\breceiver\x12\x1c\n" +
	"\ttimestamp\x18\x04 \x01(\x03R\ttimestamp\x12\x1d\n" +
	"\n" +
	"message_id\x18\x05 \x01(\fR\tmessageId\x12#\n" +
	"\rcapability_id\x18\x06 \x01(\tR\fcapabilityId\x12\x16\n" +
	"\x06method\x18\t \x01(\tR\x06method\x12#\n" +
	"\x05error\x18\n" +
	" \x01(\x0e2\r.remote.ErrorR\x05error\x12\x1a\n" +
	"\berrorMsg\x18\v \x01(\tR\berrorMsg\x12\x18\n" +
	"\apayload\x18\f \x01(\fR\apayload\x12i\n" +
	"\x1dtrigger_registration_metadata\x18\r \x01(\v2#.remote.TriggerRegistrationMetadataH\x00R\x1btriggerRegistrationMetadata\x12T\n" +
	"\x16trigger_event_metadata\x18\x0e \x01(\v2\x1c.remote.TriggerEventMetadataH\x00R\x14triggerEventMetadata\x12*\n" +
	"\x11capability_don_id\x18\x0f \x01(\rR\x0fcapabilityDonId\x12\"\n" +
	"\rcaller_don_id\x18\x10 \x01(\rR\vcallerDonId\x12+\n" +
	"\x11capability_method\x18\x11 \x01(\tR\x10capabilityMethodB\n" +
	"\n" +
	"\bmetadataJ\x04\b\a\x10\bJ\x04\b\b\x10\t\"R\n" +
	"\x1bTriggerRegistrationMetadata\x123\n" +
	"\x16last_received_event_id\x18\x01 \x01(\tR\x13lastReceivedEventId\"c\n" +
	"\x14TriggerEventMetadata\x12(\n" +
	"\x10trigger_event_id\x18\x01 \x01(\tR\x0etriggerEventId\x12!\n" +
	"\fworkflow_ids\x18\x02 \x03(\tR\vworkflowIds*v\n" +
	"\x05Error\x12\x06\n" +
	"\x02OK\x10\x00\x12\x15\n" +
	"\x11VALIDATION_FAILED\x10\x01\x12\x18\n" +
	"\x14CAPABILITY_NOT_FOUND\x10\x02\x12\x13\n" +
	"\x0fINVALID_REQUEST\x10\x03\x12\v\n" +
	"\aTIMEOUT\x10\x04\x12\x12\n" +
	"\x0eINTERNAL_ERROR\x10\x05B Z\x1ecore/capabilities/remote/typesb\x06proto3"

var (
	file_core_capabilities_remote_types_messages_proto_rawDescOnce sync.Once
	file_core_capabilities_remote_types_messages_proto_rawDescData []byte
)

func file_core_capabilities_remote_types_messages_proto_rawDescGZIP() []byte {
	file_core_capabilities_remote_types_messages_proto_rawDescOnce.Do(func() {
		file_core_capabilities_remote_types_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_core_capabilities_remote_types_messages_proto_rawDesc), len(file_core_capabilities_remote_types_messages_proto_rawDesc)))
	})
	return file_core_capabilities_remote_types_messages_proto_rawDescData
}

var file_core_capabilities_remote_types_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_core_capabilities_remote_types_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_core_capabilities_remote_types_messages_proto_goTypes = []any{
	(Error)(0),                          // 0: remote.Error
	(*Message)(nil),                     // 1: remote.Message
	(*MessageBody)(nil),                 // 2: remote.MessageBody
	(*TriggerRegistrationMetadata)(nil), // 3: remote.TriggerRegistrationMetadata
	(*TriggerEventMetadata)(nil),        // 4: remote.TriggerEventMetadata
}
var file_core_capabilities_remote_types_messages_proto_depIdxs = []int32{
	0, // 0: remote.MessageBody.error:type_name -> remote.Error
	3, // 1: remote.MessageBody.trigger_registration_metadata:type_name -> remote.TriggerRegistrationMetadata
	4, // 2: remote.MessageBody.trigger_event_metadata:type_name -> remote.TriggerEventMetadata
	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_core_capabilities_remote_types_messages_proto_init() }
func file_core_capabilities_remote_types_messages_proto_init() {
	if File_core_capabilities_remote_types_messages_proto != nil {
		return
	}
	file_core_capabilities_remote_types_messages_proto_msgTypes[1].OneofWrappers = []any{
		(*MessageBody_TriggerRegistrationMetadata)(nil),
		(*MessageBody_TriggerEventMetadata)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_core_capabilities_remote_types_messages_proto_rawDesc), len(file_core_capabilities_remote_types_messages_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_core_capabilities_remote_types_messages_proto_goTypes,
		DependencyIndexes: file_core_capabilities_remote_types_messages_proto_depIdxs,
		EnumInfos:         file_core_capabilities_remote_types_messages_proto_enumTypes,
		MessageInfos:      file_core_capabilities_remote_types_messages_proto_msgTypes,
	}.Build()
	File_core_capabilities_remote_types_messages_proto = out.File
	file_core_capabilities_remote_types_messages_proto_goTypes = nil
	file_core_capabilities_remote_types_messages_proto_depIdxs = nil
}
