// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v4.25.2
// source: customprotocol/customprotocol.proto

package customprotocol

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_Kind int32

const (
	Error_Unknown Error_Kind = 0
	Error_Grpc    Error_Kind = 1
)

// Enum value maps for Error_Kind.
var (
	Error_Kind_name = map[int32]string{
		0: "Unknown",
		1: "Grpc",
	}
	Error_Kind_value = map[string]int32{
		"Unknown": 0,
		"Grpc":    1,
	}
)

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

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

func (Error_Kind) Descriptor() protoreflect.EnumDescriptor {
	return file_customprotocol_customprotocol_proto_enumTypes[0].Descriptor()
}

func (Error_Kind) Type() protoreflect.EnumType {
	return &file_customprotocol_customprotocol_proto_enumTypes[0]
}

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

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

// NOTE: The same structure is used for both Request and Response
type Message struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Meta          *Meta                  `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Body          *Body                  `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Message) Reset() {
	*x = Message{}
	mi := &file_customprotocol_customprotocol_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_customprotocol_customprotocol_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_customprotocol_customprotocol_proto_rawDescGZIP(), []int{0}
}

func (x *Message) GetMeta() *Meta {
	if x != nil {
		return x.Meta
	}
	return nil
}

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

type Meta struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// NOTE: This field can be used for debug or ux research purposes.
	TraceId string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// NOTE: This identifier can be used to mark logical channel or stream. For
	// example when we establish a stream, we also need to route user requests
	// to stored (cached) streams. The same is applied when used with chunks/etc.
	ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// NOTE: This is a name of route this message delivered to/from.
	RouteName string `protobuf:"bytes,3,opt,name=route_name,json=routeName,proto3" json:"route_name,omitempty"`
	// NOTE: Should be true if sender handler is terminating
	IsTerminated bool `protobuf:"varint,4,opt,name=is_terminated,json=isTerminated,proto3" json:"is_terminated,omitempty"`
	// NOTE: Indicates that outgoing message is not ready yet. Polling request
	// must be repeated after poll_delay_ms (see below).
	IsNotReady bool `protobuf:"varint,5,opt,name=is_not_ready,json=isNotReady,proto3" json:"is_not_ready,omitempty"`
	// NOTE: Error (handler or internal) occured, its details serialized to body
	IsError bool     `protobuf:"varint,6,opt,name=is_error,json=isError,proto3" json:"is_error,omitempty"`
	Errors  []*Error `protobuf:"bytes,7,rep,name=errors,proto3" json:"errors,omitempty"`
	// NOTE: Server will use this field to notify the client on what time it
	// should wait before doing next poll request.
	PollDelayMs int64 `protobuf:"varint,8,opt,name=poll_delay_ms,json=pollDelayMs,proto3" json:"poll_delay_ms,omitempty"`
	// NOTE: When sent from backend, this flag means that there are no messages
	// in outgoing channel. Combined with `is_terminated` flag this one can be
	// used to prevent further polling/closing requests.
	IsEmpty bool `protobuf:"varint,9,opt,name=is_empty,json=isEmpty,proto3" json:"is_empty,omitempty"`
	// NOTE: This fields are useful for organizing page navigation or data
	// transfer in similar manner
	LastDatumId   string `protobuf:"bytes,100,opt,name=last_datum_id,json=lastDatumId,proto3" json:"last_datum_id,omitempty"`
	NextDatumId   string `protobuf:"bytes,101,opt,name=next_datum_id,json=nextDatumId,proto3" json:"next_datum_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Meta) ProtoMessage() {}

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

func (x *Meta) GetTraceId() string {
	if x != nil {
		return x.TraceId
	}
	return ""
}

func (x *Meta) GetChannelId() string {
	if x != nil {
		return x.ChannelId
	}
	return ""
}

func (x *Meta) GetRouteName() string {
	if x != nil {
		return x.RouteName
	}
	return ""
}

func (x *Meta) GetIsTerminated() bool {
	if x != nil {
		return x.IsTerminated
	}
	return false
}

func (x *Meta) GetIsNotReady() bool {
	if x != nil {
		return x.IsNotReady
	}
	return false
}

func (x *Meta) GetIsError() bool {
	if x != nil {
		return x.IsError
	}
	return false
}

func (x *Meta) GetErrors() []*Error {
	if x != nil {
		return x.Errors
	}
	return nil
}

func (x *Meta) GetPollDelayMs() int64 {
	if x != nil {
		return x.PollDelayMs
	}
	return 0
}

func (x *Meta) GetIsEmpty() bool {
	if x != nil {
		return x.IsEmpty
	}
	return false
}

func (x *Meta) GetLastDatumId() string {
	if x != nil {
		return x.LastDatumId
	}
	return ""
}

func (x *Meta) GetNextDatumId() string {
	if x != nil {
		return x.NextDatumId
	}
	return ""
}

type Error struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Kind          Error_Kind             `protobuf:"varint,1,opt,name=kind,proto3,enum=customprotocol.Error_Kind" json:"kind,omitempty"`
	Code          uint32                 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	Message       string                 `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Error) ProtoMessage() {}

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

func (x *Error) GetKind() Error_Kind {
	if x != nil {
		return x.Kind
	}
	return Error_Unknown
}

func (x *Error) GetCode() uint32 {
	if x != nil {
		return x.Code
	}
	return 0
}

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

type Body struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Content       []byte                 `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Body) ProtoMessage() {}

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

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

var File_customprotocol_customprotocol_proto protoreflect.FileDescriptor

const file_customprotocol_customprotocol_proto_rawDesc = "" +
	"\n" +
	"#customprotocol/customprotocol.proto\x12\x0ecustomprotocol\"]\n" +
	"\aMessage\x12(\n" +
	"\x04meta\x18\x01 \x01(\v2\x14.customprotocol.MetaR\x04meta\x12(\n" +
	"\x04body\x18\x02 \x01(\v2\x14.customprotocol.BodyR\x04body\"\xf7\x02\n" +
	"\x04Meta\x12\x19\n" +
	"\btrace_id\x18\x01 \x01(\tR\atraceId\x12\x1d\n" +
	"\n" +
	"channel_id\x18\x02 \x01(\tR\tchannelId\x12\x1d\n" +
	"\n" +
	"route_name\x18\x03 \x01(\tR\trouteName\x12#\n" +
	"\ris_terminated\x18\x04 \x01(\bR\fisTerminated\x12 \n" +
	"\fis_not_ready\x18\x05 \x01(\bR\n" +
	"isNotReady\x12\x19\n" +
	"\bis_error\x18\x06 \x01(\bR\aisError\x12-\n" +
	"\x06errors\x18\a \x03(\v2\x15.customprotocol.ErrorR\x06errors\x12\"\n" +
	"\rpoll_delay_ms\x18\b \x01(\x03R\vpollDelayMs\x12\x19\n" +
	"\bis_empty\x18\t \x01(\bR\aisEmpty\x12\"\n" +
	"\rlast_datum_id\x18d \x01(\tR\vlastDatumId\x12\"\n" +
	"\rnext_datum_id\x18e \x01(\tR\vnextDatumId\"\x84\x01\n" +
	"\x05Error\x12.\n" +
	"\x04kind\x18\x01 \x01(\x0e2\x1a.customprotocol.Error.KindR\x04kind\x12\x12\n" +
	"\x04code\x18\x02 \x01(\rR\x04code\x12\x18\n" +
	"\amessage\x18\x03 \x01(\tR\amessage\"\x1d\n" +
	"\x04Kind\x12\v\n" +
	"\aUnknown\x10\x00\x12\b\n" +
	"\x04Grpc\x10\x01\" \n" +
	"\x04Body\x12\x18\n" +
	"\acontent\x18\x01 \x01(\fR\acontentb\x06proto3"

var (
	file_customprotocol_customprotocol_proto_rawDescOnce sync.Once
	file_customprotocol_customprotocol_proto_rawDescData []byte
)

func file_customprotocol_customprotocol_proto_rawDescGZIP() []byte {
	file_customprotocol_customprotocol_proto_rawDescOnce.Do(func() {
		file_customprotocol_customprotocol_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_customprotocol_customprotocol_proto_rawDesc), len(file_customprotocol_customprotocol_proto_rawDesc)))
	})
	return file_customprotocol_customprotocol_proto_rawDescData
}

var file_customprotocol_customprotocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_customprotocol_customprotocol_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_customprotocol_customprotocol_proto_goTypes = []any{
	(Error_Kind)(0), // 0: customprotocol.Error.Kind
	(*Message)(nil), // 1: customprotocol.Message
	(*Meta)(nil),    // 2: customprotocol.Meta
	(*Error)(nil),   // 3: customprotocol.Error
	(*Body)(nil),    // 4: customprotocol.Body
}
var file_customprotocol_customprotocol_proto_depIdxs = []int32{
	2, // 0: customprotocol.Message.meta:type_name -> customprotocol.Meta
	4, // 1: customprotocol.Message.body:type_name -> customprotocol.Body
	3, // 2: customprotocol.Meta.errors:type_name -> customprotocol.Error
	0, // 3: customprotocol.Error.kind:type_name -> customprotocol.Error.Kind
	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_customprotocol_customprotocol_proto_init() }
func file_customprotocol_customprotocol_proto_init() {
	if File_customprotocol_customprotocol_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_customprotocol_customprotocol_proto_rawDesc), len(file_customprotocol_customprotocol_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_customprotocol_customprotocol_proto_goTypes,
		DependencyIndexes: file_customprotocol_customprotocol_proto_depIdxs,
		EnumInfos:         file_customprotocol_customprotocol_proto_enumTypes,
		MessageInfos:      file_customprotocol_customprotocol_proto_msgTypes,
	}.Build()
	File_customprotocol_customprotocol_proto = out.File
	file_customprotocol_customprotocol_proto_goTypes = nil
	file_customprotocol_customprotocol_proto_depIdxs = nil
}
