// Code generated by protoc-gen-gogo.
// source: relay.proto
// DO NOT EDIT!

/*
Package relay_pb is a generated protocol buffer package.

It is generated from these files:
	relay.proto

It has these top-level messages:
	CircuitRelay
*/
package relay_pb

import proto "github.com/ipfs/fs-repo-migrations/fs-repo-6-to-7/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

type CircuitRelay_Status int32

const (
	CircuitRelay_SUCCESS                    CircuitRelay_Status = 100
	CircuitRelay_HOP_SRC_ADDR_TOO_LONG      CircuitRelay_Status = 220
	CircuitRelay_HOP_DST_ADDR_TOO_LONG      CircuitRelay_Status = 221
	CircuitRelay_HOP_SRC_MULTIADDR_INVALID  CircuitRelay_Status = 250
	CircuitRelay_HOP_DST_MULTIADDR_INVALID  CircuitRelay_Status = 251
	CircuitRelay_HOP_NO_CONN_TO_DST         CircuitRelay_Status = 260
	CircuitRelay_HOP_CANT_DIAL_DST          CircuitRelay_Status = 261
	CircuitRelay_HOP_CANT_OPEN_DST_STREAM   CircuitRelay_Status = 262
	CircuitRelay_HOP_CANT_SPEAK_RELAY       CircuitRelay_Status = 270
	CircuitRelay_HOP_CANT_RELAY_TO_SELF     CircuitRelay_Status = 280
	CircuitRelay_STOP_SRC_ADDR_TOO_LONG     CircuitRelay_Status = 320
	CircuitRelay_STOP_DST_ADDR_TOO_LONG     CircuitRelay_Status = 321
	CircuitRelay_STOP_SRC_MULTIADDR_INVALID CircuitRelay_Status = 350
	CircuitRelay_STOP_DST_MULTIADDR_INVALID CircuitRelay_Status = 351
	CircuitRelay_STOP_RELAY_REFUSED         CircuitRelay_Status = 390
	CircuitRelay_MALFORMED_MESSAGE          CircuitRelay_Status = 400
)

var CircuitRelay_Status_name = map[int32]string{
	100: "SUCCESS",
	220: "HOP_SRC_ADDR_TOO_LONG",
	221: "HOP_DST_ADDR_TOO_LONG",
	250: "HOP_SRC_MULTIADDR_INVALID",
	251: "HOP_DST_MULTIADDR_INVALID",
	260: "HOP_NO_CONN_TO_DST",
	261: "HOP_CANT_DIAL_DST",
	262: "HOP_CANT_OPEN_DST_STREAM",
	270: "HOP_CANT_SPEAK_RELAY",
	280: "HOP_CANT_RELAY_TO_SELF",
	320: "STOP_SRC_ADDR_TOO_LONG",
	321: "STOP_DST_ADDR_TOO_LONG",
	350: "STOP_SRC_MULTIADDR_INVALID",
	351: "STOP_DST_MULTIADDR_INVALID",
	390: "STOP_RELAY_REFUSED",
	400: "MALFORMED_MESSAGE",
}
var CircuitRelay_Status_value = map[string]int32{
	"SUCCESS":                    100,
	"HOP_SRC_ADDR_TOO_LONG":      220,
	"HOP_DST_ADDR_TOO_LONG":      221,
	"HOP_SRC_MULTIADDR_INVALID":  250,
	"HOP_DST_MULTIADDR_INVALID":  251,
	"HOP_NO_CONN_TO_DST":         260,
	"HOP_CANT_DIAL_DST":          261,
	"HOP_CANT_OPEN_DST_STREAM":   262,
	"HOP_CANT_SPEAK_RELAY":       270,
	"HOP_CANT_RELAY_TO_SELF":     280,
	"STOP_SRC_ADDR_TOO_LONG":     320,
	"STOP_DST_ADDR_TOO_LONG":     321,
	"STOP_SRC_MULTIADDR_INVALID": 350,
	"STOP_DST_MULTIADDR_INVALID": 351,
	"STOP_RELAY_REFUSED":         390,
	"MALFORMED_MESSAGE":          400,
}

func (x CircuitRelay_Status) Enum() *CircuitRelay_Status {
	p := new(CircuitRelay_Status)
	*p = x
	return p
}
func (x CircuitRelay_Status) String() string {
	return proto.EnumName(CircuitRelay_Status_name, int32(x))
}
func (x *CircuitRelay_Status) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(CircuitRelay_Status_value, data, "CircuitRelay_Status")
	if err != nil {
		return err
	}
	*x = CircuitRelay_Status(value)
	return nil
}

type CircuitRelay_Type int32

const (
	CircuitRelay_HOP     CircuitRelay_Type = 1
	CircuitRelay_STOP    CircuitRelay_Type = 2
	CircuitRelay_STATUS  CircuitRelay_Type = 3
	CircuitRelay_CAN_HOP CircuitRelay_Type = 4
)

var CircuitRelay_Type_name = map[int32]string{
	1: "HOP",
	2: "STOP",
	3: "STATUS",
	4: "CAN_HOP",
}
var CircuitRelay_Type_value = map[string]int32{
	"HOP":     1,
	"STOP":    2,
	"STATUS":  3,
	"CAN_HOP": 4,
}

func (x CircuitRelay_Type) Enum() *CircuitRelay_Type {
	p := new(CircuitRelay_Type)
	*p = x
	return p
}
func (x CircuitRelay_Type) String() string {
	return proto.EnumName(CircuitRelay_Type_name, int32(x))
}
func (x *CircuitRelay_Type) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(CircuitRelay_Type_value, data, "CircuitRelay_Type")
	if err != nil {
		return err
	}
	*x = CircuitRelay_Type(value)
	return nil
}

type CircuitRelay struct {
	Type             *CircuitRelay_Type   `protobuf:"varint,1,opt,name=type,enum=relay.pb.CircuitRelay_Type" json:"type,omitempty"`
	SrcPeer          *CircuitRelay_Peer   `protobuf:"bytes,2,opt,name=srcPeer" json:"srcPeer,omitempty"`
	DstPeer          *CircuitRelay_Peer   `protobuf:"bytes,3,opt,name=dstPeer" json:"dstPeer,omitempty"`
	Code             *CircuitRelay_Status `protobuf:"varint,4,opt,name=code,enum=relay.pb.CircuitRelay_Status" json:"code,omitempty"`
	XXX_unrecognized []byte               `json:"-"`
}

func (m *CircuitRelay) Reset()         { *m = CircuitRelay{} }
func (m *CircuitRelay) String() string { return proto.CompactTextString(m) }
func (*CircuitRelay) ProtoMessage()    {}

func (m *CircuitRelay) GetType() CircuitRelay_Type {
	if m != nil && m.Type != nil {
		return *m.Type
	}
	return CircuitRelay_HOP
}

func (m *CircuitRelay) GetSrcPeer() *CircuitRelay_Peer {
	if m != nil {
		return m.SrcPeer
	}
	return nil
}

func (m *CircuitRelay) GetDstPeer() *CircuitRelay_Peer {
	if m != nil {
		return m.DstPeer
	}
	return nil
}

func (m *CircuitRelay) GetCode() CircuitRelay_Status {
	if m != nil && m.Code != nil {
		return *m.Code
	}
	return CircuitRelay_SUCCESS
}

type CircuitRelay_Peer struct {
	Id               []byte   `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
	Addrs            [][]byte `protobuf:"bytes,2,rep,name=addrs" json:"addrs,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (m *CircuitRelay_Peer) Reset()         { *m = CircuitRelay_Peer{} }
func (m *CircuitRelay_Peer) String() string { return proto.CompactTextString(m) }
func (*CircuitRelay_Peer) ProtoMessage()    {}

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

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

func init() {
	proto.RegisterType((*CircuitRelay)(nil), "relay.pb.CircuitRelay")
	proto.RegisterType((*CircuitRelay_Peer)(nil), "relay.pb.CircuitRelay.Peer")
	proto.RegisterEnum("relay.pb.CircuitRelay_Status", CircuitRelay_Status_name, CircuitRelay_Status_value)
	proto.RegisterEnum("relay.pb.CircuitRelay_Type", CircuitRelay_Type_name, CircuitRelay_Type_value)
}
