// Copyright 2024 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.31.0
// 	protoc        v4.25.3
// source: rpcreplay.proto

package rpcreplay

import (
	reflect "reflect"
	sync "sync"

	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	anypb "google.golang.org/protobuf/types/known/anypb"
)

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

const (
	Entry_TYPE_UNSPECIFIED Entry_Kind = 0
	// A unary request.
	// method: the full name of the method
	// message: the request proto
	// is_error: false
	// ref_index: 0
	Entry_REQUEST Entry_Kind = 1
	// A unary response.
	// method: the full name of the method
	// message:
	//
	//	if is_error: a google.rpc.Status proto
	//	else:        the response proto
	//
	// ref_index: index in the sequence of Entries of matching request (1-based)
	Entry_RESPONSE Entry_Kind = 2
	// A method that creates a stream.
	// method: the full name of the method
	// message:
	//
	//	if is_error: a google.rpc.Status proto
	//	else:        nil
	//
	// ref_index: 0
	Entry_CREATE_STREAM Entry_Kind = 3
	// A call to Send on the client returned by a stream-creating method.
	// method: unset
	// message: the proto being sent
	// is_error: false
	// ref_index: index of matching CREATE_STREAM entry (1-based)
	Entry_SEND Entry_Kind = 4 // message sent on stream
	// A call to Recv on the client returned by a stream-creating method.
	// method: unset
	// message:
	//
	//	if is_error: a google.rpc.Status proto, or nil on EOF
	//	else:        the received message
	//
	// ref_index: index of matching CREATE_STREAM entry
	Entry_RECV Entry_Kind = 5 // message received from stream
)

// Enum value maps for Entry_Kind.
var (
	Entry_Kind_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "REQUEST",
		2: "RESPONSE",
		3: "CREATE_STREAM",
		4: "SEND",
		5: "RECV",
	}
	Entry_Kind_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"REQUEST":          1,
		"RESPONSE":         2,
		"CREATE_STREAM":    3,
		"SEND":             4,
		"RECV":             5,
	}
)

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

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

func (Entry_Kind) Descriptor() protoreflect.EnumDescriptor {
	return file_rpcreplay_proto_enumTypes[0].Descriptor()
}

func (Entry_Kind) Type() protoreflect.EnumType {
	return &file_rpcreplay_proto_enumTypes[0]
}

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

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

// An Entry represents a single RPC activity, typically a request or response.
type Entry struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Kind     Entry_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=rpcreplay.Entry_Kind" json:"kind,omitempty"`
	Method   string     `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`                      // method name
	Message  *anypb.Any `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`                    // request, response or error status
	IsError  bool       `protobuf:"varint,4,opt,name=is_error,json=isError,proto3" json:"is_error,omitempty"`    // was response an error?
	RefIndex int32      `protobuf:"varint,5,opt,name=ref_index,json=refIndex,proto3" json:"ref_index,omitempty"` // for RESPONSE, index of matching request;
}

func (x *Entry) Reset() {
	*x = Entry{}
	if protoimpl.UnsafeEnabled {
		mi := &file_rpcreplay_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

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

func (*Entry) ProtoMessage() {}

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

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

func (x *Entry) GetKind() Entry_Kind {
	if x != nil {
		return x.Kind
	}
	return Entry_TYPE_UNSPECIFIED
}

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

func (x *Entry) GetMessage() *anypb.Any {
	if x != nil {
		return x.Message
	}
	return nil
}

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

func (x *Entry) GetRefIndex() int32 {
	if x != nil {
		return x.RefIndex
	}
	return 0
}

var File_rpcreplay_proto protoreflect.FileDescriptor

var file_rpcreplay_proto_rawDesc = []byte{
	0x0a, 0x0f, 0x72, 0x70, 0x63, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x12, 0x09, 0x72, 0x70, 0x63, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x1a, 0x19, 0x67, 0x6f,
	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e,
	0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x02, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72,
	0x79, 0x12, 0x29, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
	0x15, 0x2e, 0x72, 0x70, 0x63, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x2e, 0x45, 0x6e, 0x74, 0x72,
	0x79, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06,
	0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65,
	0x74, 0x68, 0x6f, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73,
	0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72,
	0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12,
	0x1b, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01,
	0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x5e, 0x0a, 0x04,
	0x4b, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,
	0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45,
	0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x50, 0x4f,
	0x4e, 0x53, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f,
	0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4e, 0x44,
	0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x43, 0x56, 0x10, 0x05, 0x42, 0x2f, 0x5a, 0x2d,
	0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
	0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x06, 0x70,
	0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_rpcreplay_proto_rawDescOnce sync.Once
	file_rpcreplay_proto_rawDescData = file_rpcreplay_proto_rawDesc
)

func file_rpcreplay_proto_rawDescGZIP() []byte {
	file_rpcreplay_proto_rawDescOnce.Do(func() {
		file_rpcreplay_proto_rawDescData = protoimpl.X.CompressGZIP(file_rpcreplay_proto_rawDescData)
	})
	return file_rpcreplay_proto_rawDescData
}

var file_rpcreplay_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_rpcreplay_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_rpcreplay_proto_goTypes = []interface{}{
	(Entry_Kind)(0),   // 0: rpcreplay.Entry.Kind
	(*Entry)(nil),     // 1: rpcreplay.Entry
	(*anypb.Any)(nil), // 2: google.protobuf.Any
}
var file_rpcreplay_proto_depIdxs = []int32{
	0, // 0: rpcreplay.Entry.kind:type_name -> rpcreplay.Entry.Kind
	2, // 1: rpcreplay.Entry.message:type_name -> google.protobuf.Any
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_rpcreplay_proto_init() }
func file_rpcreplay_proto_init() {
	if File_rpcreplay_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_rpcreplay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*Entry); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_rpcreplay_proto_rawDesc,
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_rpcreplay_proto_goTypes,
		DependencyIndexes: file_rpcreplay_proto_depIdxs,
		EnumInfos:         file_rpcreplay_proto_enumTypes,
		MessageInfos:      file_rpcreplay_proto_msgTypes,
	}.Build()
	File_rpcreplay_proto = out.File
	file_rpcreplay_proto_rawDesc = nil
	file_rpcreplay_proto_goTypes = nil
	file_rpcreplay_proto_depIdxs = nil
}
