// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.2
// source: p2p/host/autonat/pb/autonat.proto

package pb

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

const (
	Message_DIAL          Message_MessageType = 0
	Message_DIAL_RESPONSE Message_MessageType = 1
)

// Enum value maps for Message_MessageType.
var (
	Message_MessageType_name = map[int32]string{
		0: "DIAL",
		1: "DIAL_RESPONSE",
	}
	Message_MessageType_value = map[string]int32{
		"DIAL":          0,
		"DIAL_RESPONSE": 1,
	}
)

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

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

func (Message_MessageType) Descriptor() protoreflect.EnumDescriptor {
	return file_p2p_host_autonat_pb_autonat_proto_enumTypes[0].Descriptor()
}

func (Message_MessageType) Type() protoreflect.EnumType {
	return &file_p2p_host_autonat_pb_autonat_proto_enumTypes[0]
}

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

// Deprecated: Do not use.
func (x *Message_MessageType) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = Message_MessageType(num)
	return nil
}

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

type Message_ResponseStatus int32

const (
	Message_OK               Message_ResponseStatus = 0
	Message_E_DIAL_ERROR     Message_ResponseStatus = 100
	Message_E_DIAL_REFUSED   Message_ResponseStatus = 101
	Message_E_BAD_REQUEST    Message_ResponseStatus = 200
	Message_E_INTERNAL_ERROR Message_ResponseStatus = 300
)

// Enum value maps for Message_ResponseStatus.
var (
	Message_ResponseStatus_name = map[int32]string{
		0:   "OK",
		100: "E_DIAL_ERROR",
		101: "E_DIAL_REFUSED",
		200: "E_BAD_REQUEST",
		300: "E_INTERNAL_ERROR",
	}
	Message_ResponseStatus_value = map[string]int32{
		"OK":               0,
		"E_DIAL_ERROR":     100,
		"E_DIAL_REFUSED":   101,
		"E_BAD_REQUEST":    200,
		"E_INTERNAL_ERROR": 300,
	}
)

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

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

func (Message_ResponseStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_p2p_host_autonat_pb_autonat_proto_enumTypes[1].Descriptor()
}

func (Message_ResponseStatus) Type() protoreflect.EnumType {
	return &file_p2p_host_autonat_pb_autonat_proto_enumTypes[1]
}

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

// Deprecated: Do not use.
func (x *Message_ResponseStatus) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = Message_ResponseStatus(num)
	return nil
}

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

type Message struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Type          *Message_MessageType   `protobuf:"varint,1,opt,name=type,enum=autonat.pb.Message_MessageType" json:"type,omitempty"`
	Dial          *Message_Dial          `protobuf:"bytes,2,opt,name=dial" json:"dial,omitempty"`
	DialResponse  *Message_DialResponse  `protobuf:"bytes,3,opt,name=dialResponse" json:"dialResponse,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

func (x *Message) GetType() Message_MessageType {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return Message_DIAL
}

func (x *Message) GetDial() *Message_Dial {
	if x != nil {
		return x.Dial
	}
	return nil
}

func (x *Message) GetDialResponse() *Message_DialResponse {
	if x != nil {
		return x.DialResponse
	}
	return nil
}

type Message_PeerInfo struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Id            []byte                 `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Addrs         [][]byte               `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Message_PeerInfo) ProtoMessage() {}

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

func (x *Message_PeerInfo) GetId() []byte {
	if x != nil {
		return x.Id
	}
	return nil
}

func (x *Message_PeerInfo) GetAddrs() [][]byte {
	if x != nil {
		return x.Addrs
	}
	return nil
}

type Message_Dial struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Peer          *Message_PeerInfo      `protobuf:"bytes,1,opt,name=peer" json:"peer,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Message_Dial) ProtoMessage() {}

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

func (x *Message_Dial) GetPeer() *Message_PeerInfo {
	if x != nil {
		return x.Peer
	}
	return nil
}

type Message_DialResponse struct {
	state         protoimpl.MessageState  `protogen:"open.v1"`
	Status        *Message_ResponseStatus `protobuf:"varint,1,opt,name=status,enum=autonat.pb.Message_ResponseStatus" json:"status,omitempty"`
	StatusText    *string                 `protobuf:"bytes,2,opt,name=statusText" json:"statusText,omitempty"`
	Addr          []byte                  `protobuf:"bytes,3,opt,name=addr" json:"addr,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Message_DialResponse) ProtoMessage() {}

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

func (x *Message_DialResponse) GetStatus() Message_ResponseStatus {
	if x != nil && x.Status != nil {
		return *x.Status
	}
	return Message_OK
}

func (x *Message_DialResponse) GetStatusText() string {
	if x != nil && x.StatusText != nil {
		return *x.StatusText
	}
	return ""
}

func (x *Message_DialResponse) GetAddr() []byte {
	if x != nil {
		return x.Addr
	}
	return nil
}

var File_p2p_host_autonat_pb_autonat_proto protoreflect.FileDescriptor

const file_p2p_host_autonat_pb_autonat_proto_rawDesc = "" +
	"\n" +
	"!p2p/host/autonat/pb/autonat.proto\x12\n" +
	"autonat.pb\"\xb5\x04\n" +
	"\aMessage\x123\n" +
	"\x04type\x18\x01 \x01(\x0e2\x1f.autonat.pb.Message.MessageTypeR\x04type\x12,\n" +
	"\x04dial\x18\x02 \x01(\v2\x18.autonat.pb.Message.DialR\x04dial\x12D\n" +
	"\fdialResponse\x18\x03 \x01(\v2 .autonat.pb.Message.DialResponseR\fdialResponse\x1a0\n" +
	"\bPeerInfo\x12\x0e\n" +
	"\x02id\x18\x01 \x01(\fR\x02id\x12\x14\n" +
	"\x05addrs\x18\x02 \x03(\fR\x05addrs\x1a8\n" +
	"\x04Dial\x120\n" +
	"\x04peer\x18\x01 \x01(\v2\x1c.autonat.pb.Message.PeerInfoR\x04peer\x1a~\n" +
	"\fDialResponse\x12:\n" +
	"\x06status\x18\x01 \x01(\x0e2\".autonat.pb.Message.ResponseStatusR\x06status\x12\x1e\n" +
	"\n" +
	"statusText\x18\x02 \x01(\tR\n" +
	"statusText\x12\x12\n" +
	"\x04addr\x18\x03 \x01(\fR\x04addr\"*\n" +
	"\vMessageType\x12\b\n" +
	"\x04DIAL\x10\x00\x12\x11\n" +
	"\rDIAL_RESPONSE\x10\x01\"i\n" +
	"\x0eResponseStatus\x12\x06\n" +
	"\x02OK\x10\x00\x12\x10\n" +
	"\fE_DIAL_ERROR\x10d\x12\x12\n" +
	"\x0eE_DIAL_REFUSED\x10e\x12\x12\n" +
	"\rE_BAD_REQUEST\x10\xc8\x01\x12\x15\n" +
	"\x10E_INTERNAL_ERROR\x10\xac\x02B1Z/github.com/libp2p/go-libp2p/p2p/host/autonat/pb"

var (
	file_p2p_host_autonat_pb_autonat_proto_rawDescOnce sync.Once
	file_p2p_host_autonat_pb_autonat_proto_rawDescData []byte
)

func file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP() []byte {
	file_p2p_host_autonat_pb_autonat_proto_rawDescOnce.Do(func() {
		file_p2p_host_autonat_pb_autonat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_p2p_host_autonat_pb_autonat_proto_rawDesc), len(file_p2p_host_autonat_pb_autonat_proto_rawDesc)))
	})
	return file_p2p_host_autonat_pb_autonat_proto_rawDescData
}

var file_p2p_host_autonat_pb_autonat_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_p2p_host_autonat_pb_autonat_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_p2p_host_autonat_pb_autonat_proto_goTypes = []any{
	(Message_MessageType)(0),     // 0: autonat.pb.Message.MessageType
	(Message_ResponseStatus)(0),  // 1: autonat.pb.Message.ResponseStatus
	(*Message)(nil),              // 2: autonat.pb.Message
	(*Message_PeerInfo)(nil),     // 3: autonat.pb.Message.PeerInfo
	(*Message_Dial)(nil),         // 4: autonat.pb.Message.Dial
	(*Message_DialResponse)(nil), // 5: autonat.pb.Message.DialResponse
}
var file_p2p_host_autonat_pb_autonat_proto_depIdxs = []int32{
	0, // 0: autonat.pb.Message.type:type_name -> autonat.pb.Message.MessageType
	4, // 1: autonat.pb.Message.dial:type_name -> autonat.pb.Message.Dial
	5, // 2: autonat.pb.Message.dialResponse:type_name -> autonat.pb.Message.DialResponse
	3, // 3: autonat.pb.Message.Dial.peer:type_name -> autonat.pb.Message.PeerInfo
	1, // 4: autonat.pb.Message.DialResponse.status:type_name -> autonat.pb.Message.ResponseStatus
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_p2p_host_autonat_pb_autonat_proto_init() }
func file_p2p_host_autonat_pb_autonat_proto_init() {
	if File_p2p_host_autonat_pb_autonat_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_p2p_host_autonat_pb_autonat_proto_rawDesc), len(file_p2p_host_autonat_pb_autonat_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_p2p_host_autonat_pb_autonat_proto_goTypes,
		DependencyIndexes: file_p2p_host_autonat_pb_autonat_proto_depIdxs,
		EnumInfos:         file_p2p_host_autonat_pb_autonat_proto_enumTypes,
		MessageInfos:      file_p2p_host_autonat_pb_autonat_proto_msgTypes,
	}.Build()
	File_p2p_host_autonat_pb_autonat_proto = out.File
	file_p2p_host_autonat_pb_autonat_proto_goTypes = nil
	file_p2p_host_autonat_pb_autonat_proto_depIdxs = nil
}
