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

/*
	Package protocol is a generated protocol buffer package.

	It is generated from these files:
		message.proto

	It has these top-level messages:
		Profile
		SignedProfileOperation
		SignedServerMessage
		BackendMessage
		ClientMessage
		ClientReply
*/
package protocol

import proto "github.com/gogo/protobuf/proto"
import math "math"

// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb"

import io "io"
import fmt "fmt"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"

import bytes "bytes"

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

type ClientReply_Status int32

const (
	ClientReply_OK                    ClientReply_Status = 0
	ClientReply_REGISTRATION_DISABLED ClientReply_Status = 1
	ClientReply_INVITE_INVALID        ClientReply_Status = 2
	ClientReply_INVITE_USED           ClientReply_Status = 3
	ClientReply_NOT_AUTHORIZED        ClientReply_Status = 4
	ClientReply_NOT_A_LEADER          ClientReply_Status = 5
	ClientReply_TRY_AGAIN             ClientReply_Status = 6
)

var ClientReply_Status_name = map[int32]string{
	0: "OK",
	1: "REGISTRATION_DISABLED",
	2: "INVITE_INVALID",
	3: "INVITE_USED",
	4: "NOT_AUTHORIZED",
	5: "NOT_A_LEADER",
	6: "TRY_AGAIN",
}
var ClientReply_Status_value = map[string]int32{
	"OK": 0,
	"REGISTRATION_DISABLED": 1,
	"INVITE_INVALID":        2,
	"INVITE_USED":           3,
	"NOT_AUTHORIZED":        4,
	"NOT_A_LEADER":          5,
	"TRY_AGAIN":             6,
}

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

type Profile struct {
	SignatureKey     *Profile_PublicKey        `protobuf:"bytes,1,req" json:"SignatureKey,omitempty"`
	ExpirationTime   *uint64                   `protobuf:"varint,2,req" json:"ExpirationTime,omitempty"`
	Version          *uint64                   `protobuf:"varint,3,opt,def=0" json:"Version,omitempty"`
	XXX_extensions   map[int32]proto.Extension `json:"-"`
	XXX_unrecognized []byte                    `json:"-"`
}

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

var extRange_Profile = []proto.ExtensionRange{
	{4, 536870911},
}

func (*Profile) ExtensionRangeArray() []proto.ExtensionRange {
	return extRange_Profile
}
func (m *Profile) ExtensionMap() map[int32]proto.Extension {
	if m.XXX_extensions == nil {
		m.XXX_extensions = make(map[int32]proto.Extension)
	}
	return m.XXX_extensions
}

const Default_Profile_Version uint64 = 0

func (m *Profile) GetSignatureKey() *Profile_PublicKey {
	if m != nil {
		return m.SignatureKey
	}
	return nil
}

func (m *Profile) GetExpirationTime() uint64 {
	if m != nil && m.ExpirationTime != nil {
		return *m.ExpirationTime
	}
	return 0
}

func (m *Profile) GetVersion() uint64 {
	if m != nil && m.Version != nil {
		return *m.Version
	}
	return Default_Profile_Version
}

type Profile_PublicKey struct {
	Ed25519          []byte `protobuf:"bytes,1,opt,name=ed25519" json:"ed25519,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

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

func (m *Profile_PublicKey) GetEd25519() []byte {
	if m != nil {
		return m.Ed25519
	}
	return nil
}

type SignedProfileOperation struct {
	ProfileOperation    []byte `protobuf:"bytes,1,req" json:"ProfileOperation,omitempty"`
	NewProfileSignature []byte `protobuf:"bytes,2,req" json:"NewProfileSignature,omitempty"`
	OldProfileSignature []byte `protobuf:"bytes,3,opt" json:"OldProfileSignature,omitempty"`
	XXX_unrecognized    []byte `json:"-"`
}

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

func (m *SignedProfileOperation) GetProfileOperation() []byte {
	if m != nil {
		return m.ProfileOperation
	}
	return nil
}

func (m *SignedProfileOperation) GetNewProfileSignature() []byte {
	if m != nil {
		return m.NewProfileSignature
	}
	return nil
}

func (m *SignedProfileOperation) GetOldProfileSignature() []byte {
	if m != nil {
		return m.OldProfileSignature
	}
	return nil
}

type SignedProfileOperation_ProfileOperationT struct {
	Name             []byte `protobuf:"bytes,1,req" json:"Name,omitempty"`
	NewProfile       []byte `protobuf:"bytes,2,req" json:"NewProfile,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

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

func (m *SignedProfileOperation_ProfileOperationT) GetName() []byte {
	if m != nil {
		return m.Name
	}
	return nil
}

func (m *SignedProfileOperation_ProfileOperationT) GetNewProfile() []byte {
	if m != nil {
		return m.NewProfile
	}
	return nil
}

type SignedServerMessage struct {
	Message          []byte `protobuf:"bytes,1,req" json:"Message,omitempty"`
	Signature        []byte `protobuf:"bytes,2,req" json:"Signature,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

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

func (m *SignedServerMessage) GetMessage() []byte {
	if m != nil {
		return m.Message
	}
	return nil
}

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

type SignedServerMessage_ServerMessage struct {
	HashOfOperations []byte  `protobuf:"bytes,1,opt" json:"HashOfOperations,omitempty"`
	HashOfHashes     []byte  `protobuf:"bytes,2,opt" json:"HashOfHashes,omitempty"`
	Operations       []byte  `protobuf:"bytes,3,opt" json:"Operations,omitempty"`
	HashOfState      []byte  `protobuf:"bytes,4,opt" json:"HashOfState,omitempty"`
	Round            *uint64 `protobuf:"varint,10,req,name=round" json:"round,omitempty"`
	Server           *uint64 `protobuf:"varint,11,req,name=server" json:"server,omitempty"`
	Time             *uint64 `protobuf:"varint,12,req,name=time" json:"time,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

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

func (m *SignedServerMessage_ServerMessage) GetHashOfOperations() []byte {
	if m != nil {
		return m.HashOfOperations
	}
	return nil
}

func (m *SignedServerMessage_ServerMessage) GetHashOfHashes() []byte {
	if m != nil {
		return m.HashOfHashes
	}
	return nil
}

func (m *SignedServerMessage_ServerMessage) GetOperations() []byte {
	if m != nil {
		return m.Operations
	}
	return nil
}

func (m *SignedServerMessage_ServerMessage) GetHashOfState() []byte {
	if m != nil {
		return m.HashOfState
	}
	return nil
}

func (m *SignedServerMessage_ServerMessage) GetRound() uint64 {
	if m != nil && m.Round != nil {
		return *m.Round
	}
	return 0
}

func (m *SignedServerMessage_ServerMessage) GetServer() uint64 {
	if m != nil && m.Server != nil {
		return *m.Server
	}
	return 0
}

func (m *SignedServerMessage_ServerMessage) GetTime() uint64 {
	if m != nil && m.Time != nil {
		return *m.Time
	}
	return 0
}

type SignedServerMessage_ServerMessage_OperationsT struct {
	Seed              []byte                    `protobuf:"bytes,1,req" json:"Seed,omitempty"`
	Time              *uint64                   `protobuf:"varint,2,req,name=time" json:"time,omitempty"`
	ProfileOperations []*SignedProfileOperation `protobuf:"bytes,3,rep" json:"ProfileOperations,omitempty"`
	XXX_unrecognized  []byte                    `json:"-"`
}

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

func (m *SignedServerMessage_ServerMessage_OperationsT) GetSeed() []byte {
	if m != nil {
		return m.Seed
	}
	return nil
}

func (m *SignedServerMessage_ServerMessage_OperationsT) GetTime() uint64 {
	if m != nil && m.Time != nil {
		return *m.Time
	}
	return 0
}

func (m *SignedServerMessage_ServerMessage_OperationsT) GetProfileOperations() []*SignedProfileOperation {
	if m != nil {
		return m.ProfileOperations
	}
	return nil
}

type BackendMessage struct {
	SignedServerMessage *SignedServerMessage      `protobuf:"bytes,1,opt" json:"SignedServerMessage,omitempty"`
	Download            *BackendMessage_MessageID `protobuf:"bytes,2,opt" json:"Download,omitempty"`
	Subscribe           *bool                     `protobuf:"varint,3,opt,def=0" json:"Subscribe,omitempty"`
	XXX_unrecognized    []byte                    `json:"-"`
}

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

const Default_BackendMessage_Subscribe bool = false

func (m *BackendMessage) GetSignedServerMessage() *SignedServerMessage {
	if m != nil {
		return m.SignedServerMessage
	}
	return nil
}

func (m *BackendMessage) GetDownload() *BackendMessage_MessageID {
	if m != nil {
		return m.Download
	}
	return nil
}

func (m *BackendMessage) GetSubscribe() bool {
	if m != nil && m.Subscribe != nil {
		return *m.Subscribe
	}
	return Default_BackendMessage_Subscribe
}

type BackendMessage_MessageID struct {
	Round            *uint64  `protobuf:"varint,1,req,name=round" json:"round,omitempty"`
	Phase            []uint64 `protobuf:"varint,2,rep,packed,name=phase" json:"phase,omitempty"`
	Server           []uint64 `protobuf:"varint,3,rep,packed,name=server" json:"server,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

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

func (m *BackendMessage_MessageID) GetRound() uint64 {
	if m != nil && m.Round != nil {
		return *m.Round
	}
	return 0
}

func (m *BackendMessage_MessageID) GetPhase() []uint64 {
	if m != nil {
		return m.Phase
	}
	return nil
}

func (m *BackendMessage_MessageID) GetServer() []uint64 {
	if m != nil {
		return m.Server
	}
	return nil
}

type ClientMessage struct {
	PeekState        *bool                   `protobuf:"varint,1,opt" json:"PeekState,omitempty"`
	ResolveName      []byte                  `protobuf:"bytes,2,opt" json:"ResolveName,omitempty"`
	ModifyProfile    *SignedProfileOperation `protobuf:"bytes,3,opt" json:"ModifyProfile,omitempty"`
	InviteCode       []byte                  `protobuf:"bytes,4,opt" json:"InviteCode,omitempty"`
	PadReplyTo       *uint64                 `protobuf:"varint,11,opt" json:"PadReplyTo,omitempty"`
	XXX_unrecognized []byte                  `json:"-"`
}

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

func (m *ClientMessage) GetPeekState() bool {
	if m != nil && m.PeekState != nil {
		return *m.PeekState
	}
	return false
}

func (m *ClientMessage) GetResolveName() []byte {
	if m != nil {
		return m.ResolveName
	}
	return nil
}

func (m *ClientMessage) GetModifyProfile() *SignedProfileOperation {
	if m != nil {
		return m.ModifyProfile
	}
	return nil
}

func (m *ClientMessage) GetInviteCode() []byte {
	if m != nil {
		return m.InviteCode
	}
	return nil
}

func (m *ClientMessage) GetPadReplyTo() uint64 {
	if m != nil && m.PadReplyTo != nil {
		return *m.PadReplyTo
	}
	return 0
}

type ClientReply struct {
	StateConfirmations []*SignedServerMessage       `protobuf:"bytes,1,rep" json:"StateConfirmations,omitempty"`
	LookupNodes        []*ClientReply_MerklemapNode `protobuf:"bytes,2,rep" json:"LookupNodes,omitempty"`
	Status             *ClientReply_Status          `protobuf:"varint,3,opt,name=status,enum=protocol.ClientReply_Status,def=0" json:"status,omitempty"`
	XXX_unrecognized   []byte                       `json:"-"`
}

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

const Default_ClientReply_Status ClientReply_Status = ClientReply_OK

func (m *ClientReply) GetStateConfirmations() []*SignedServerMessage {
	if m != nil {
		return m.StateConfirmations
	}
	return nil
}

func (m *ClientReply) GetLookupNodes() []*ClientReply_MerklemapNode {
	if m != nil {
		return m.LookupNodes
	}
	return nil
}

func (m *ClientReply) GetStatus() ClientReply_Status {
	if m != nil && m.Status != nil {
		return *m.Status
	}
	return Default_ClientReply_Status
}

type ClientReply_MerklemapNode struct {
	SubstringBitsInLastByte *uint64 `protobuf:"varint,1,req" json:"SubstringBitsInLastByte,omitempty"`
	Substring               []byte  `protobuf:"bytes,2,req" json:"Substring,omitempty"`
	// exactly one of {LeftChildHash, RightChildHash, Value} must be present in a message on wire, all are used for hashing
	LeftChildHash    []byte `protobuf:"bytes,3,opt" json:"LeftChildHash,omitempty"`
	RightChildHash   []byte `protobuf:"bytes,4,opt" json:"RightChildHash,omitempty"`
	Value            []byte `protobuf:"bytes,5,opt" json:"Value,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

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

func (m *ClientReply_MerklemapNode) GetSubstringBitsInLastByte() uint64 {
	if m != nil && m.SubstringBitsInLastByte != nil {
		return *m.SubstringBitsInLastByte
	}
	return 0
}

func (m *ClientReply_MerklemapNode) GetSubstring() []byte {
	if m != nil {
		return m.Substring
	}
	return nil
}

func (m *ClientReply_MerklemapNode) GetLeftChildHash() []byte {
	if m != nil {
		return m.LeftChildHash
	}
	return nil
}

func (m *ClientReply_MerklemapNode) GetRightChildHash() []byte {
	if m != nil {
		return m.RightChildHash
	}
	return nil
}

func (m *ClientReply_MerklemapNode) GetValue() []byte {
	if m != nil {
		return m.Value
	}
	return nil
}

func init() {
	proto.RegisterEnum("protocol.ClientReply_Status", ClientReply_Status_name, ClientReply_Status_value)
}
func (m *Profile) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SignatureKey", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.SignatureKey == nil {
				m.SignatureKey = &Profile_PublicKey{}
			}
			if err := m.SignatureKey.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.ExpirationTime = &v
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Version = &v
		default:
			if (fieldNum >= 4) && (fieldNum < 536870912) {
				var sizeOfWire int
				for {
					sizeOfWire++
					wire >>= 7
					if wire == 0 {
						break
					}
				}
				index -= sizeOfWire
				skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
				if err != nil {
					return err
				}
				if (index + skippy) > l {
					return io.ErrUnexpectedEOF
				}
				if m.XXX_extensions == nil {
					m.XXX_extensions = make(map[int32]github_com_gogo_protobuf_proto.Extension)
				}
				m.XXX_extensions[int32(fieldNum)] = github_com_gogo_protobuf_proto.NewExtension(data[index : index+skippy])
				index += skippy
			} else {
				var sizeOfWire int
				for {
					sizeOfWire++
					wire >>= 7
					if wire == 0 {
						break
					}
				}
				index -= sizeOfWire
				skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
				if err != nil {
					return err
				}
				if (index + skippy) > l {
					return io.ErrUnexpectedEOF
				}
				m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
				index += skippy
			}
		}
	}
	return nil
}
func (m *Profile_PublicKey) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Ed25519 = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *SignedProfileOperation) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProfileOperation", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ProfileOperation = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field NewProfileSignature", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.NewProfileSignature = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field OldProfileSignature", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.OldProfileSignature = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *SignedProfileOperation_ProfileOperationT) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field NewProfile", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.NewProfile = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *SignedServerMessage) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Message = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Signature = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *SignedServerMessage_ServerMessage) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field HashOfOperations", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.HashOfOperations = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field HashOfHashes", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.HashOfHashes = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Operations = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field HashOfState", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.HashOfState = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 10:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Round = &v
		case 11:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Server = &v
		case 12:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Time = &v
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *SignedServerMessage_ServerMessage_OperationsT) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Seed = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Time = &v
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProfileOperations", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ProfileOperations = append(m.ProfileOperations, &SignedProfileOperation{})
			m.ProfileOperations[len(m.ProfileOperations)-1].Unmarshal(data[index:postIndex])
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *BackendMessage) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SignedServerMessage", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.SignedServerMessage == nil {
				m.SignedServerMessage = &SignedServerMessage{}
			}
			if err := m.SignedServerMessage.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Download", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Download == nil {
				m.Download = &BackendMessage_MessageID{}
			}
			if err := m.Download.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Subscribe", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			b := bool(v != 0)
			m.Subscribe = &b
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *BackendMessage_MessageID) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Round = &v
		case 2:
			if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if index >= l {
						return io.ErrUnexpectedEOF
					}
					b := data[index]
					index++
					packedLen |= (int(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				postIndex := index + packedLen
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				for index < postIndex {
					var v uint64
					for shift := uint(0); ; shift += 7 {
						if index >= l {
							return io.ErrUnexpectedEOF
						}
						b := data[index]
						index++
						v |= (uint64(b) & 0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.Phase = append(m.Phase, v)
				}
			} else if wireType == 0 {
				var v uint64
				for shift := uint(0); ; shift += 7 {
					if index >= l {
						return io.ErrUnexpectedEOF
					}
					b := data[index]
					index++
					v |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.Phase = append(m.Phase, v)
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType)
			}
		case 3:
			if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if index >= l {
						return io.ErrUnexpectedEOF
					}
					b := data[index]
					index++
					packedLen |= (int(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				postIndex := index + packedLen
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				for index < postIndex {
					var v uint64
					for shift := uint(0); ; shift += 7 {
						if index >= l {
							return io.ErrUnexpectedEOF
						}
						b := data[index]
						index++
						v |= (uint64(b) & 0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.Server = append(m.Server, v)
				}
			} else if wireType == 0 {
				var v uint64
				for shift := uint(0); ; shift += 7 {
					if index >= l {
						return io.ErrUnexpectedEOF
					}
					b := data[index]
					index++
					v |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.Server = append(m.Server, v)
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
			}
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *ClientMessage) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PeekState", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			b := bool(v != 0)
			m.PeekState = &b
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ResolveName", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ResolveName = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ModifyProfile", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ModifyProfile == nil {
				m.ModifyProfile = &SignedProfileOperation{}
			}
			if err := m.ModifyProfile.Unmarshal(data[index:postIndex]); err != nil {
				return err
			}
			index = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InviteCode", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.InviteCode = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 11:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PadReplyTo", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.PadReplyTo = &v
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *ClientReply) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field StateConfirmations", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.StateConfirmations = append(m.StateConfirmations, &SignedServerMessage{})
			m.StateConfirmations[len(m.StateConfirmations)-1].Unmarshal(data[index:postIndex])
			index = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LookupNodes", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.LookupNodes = append(m.LookupNodes, &ClientReply_MerklemapNode{})
			m.LookupNodes[len(m.LookupNodes)-1].Unmarshal(data[index:postIndex])
			index = postIndex
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
			}
			var v ClientReply_Status
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (ClientReply_Status(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Status = &v
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *ClientReply_MerklemapNode) Unmarshal(data []byte) error {
	l := len(data)
	index := 0
	for index < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if index >= l {
				return io.ErrUnexpectedEOF
			}
			b := data[index]
			index++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SubstringBitsInLastByte", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				v |= (uint64(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.SubstringBitsInLastByte = &v
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Substring", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Substring = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LeftChildHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.LeftChildHash = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RightChildHash", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RightChildHash = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if index >= l {
					return io.ErrUnexpectedEOF
				}
				b := data[index]
				index++
				byteLen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			postIndex := index + byteLen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Value = append([]byte{}, data[index:postIndex]...)
			index = postIndex
		default:
			var sizeOfWire int
			for {
				sizeOfWire++
				wire >>= 7
				if wire == 0 {
					break
				}
			}
			index -= sizeOfWire
			skippy, err := github_com_gogo_protobuf_proto.Skip(data[index:])
			if err != nil {
				return err
			}
			if (index + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.XXX_unrecognized = append(m.XXX_unrecognized, data[index:index+skippy]...)
			index += skippy
		}
	}
	return nil
}
func (m *Profile) Size() (n int) {
	var l int
	_ = l
	if m.SignatureKey != nil {
		l = m.SignatureKey.Size()
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.ExpirationTime != nil {
		n += 1 + sovMessage(uint64(*m.ExpirationTime))
	}
	if m.Version != nil {
		n += 1 + sovMessage(uint64(*m.Version))
	}
	if m.XXX_extensions != nil {
		n += github_com_gogo_protobuf_proto.SizeOfExtensionMap(m.XXX_extensions)
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *Profile_PublicKey) Size() (n int) {
	var l int
	_ = l
	if m.Ed25519 != nil {
		l = len(m.Ed25519)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *SignedProfileOperation) Size() (n int) {
	var l int
	_ = l
	if m.ProfileOperation != nil {
		l = len(m.ProfileOperation)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.NewProfileSignature != nil {
		l = len(m.NewProfileSignature)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.OldProfileSignature != nil {
		l = len(m.OldProfileSignature)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *SignedProfileOperation_ProfileOperationT) Size() (n int) {
	var l int
	_ = l
	if m.Name != nil {
		l = len(m.Name)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.NewProfile != nil {
		l = len(m.NewProfile)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *SignedServerMessage) Size() (n int) {
	var l int
	_ = l
	if m.Message != nil {
		l = len(m.Message)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Signature != nil {
		l = len(m.Signature)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *SignedServerMessage_ServerMessage) Size() (n int) {
	var l int
	_ = l
	if m.HashOfOperations != nil {
		l = len(m.HashOfOperations)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.HashOfHashes != nil {
		l = len(m.HashOfHashes)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Operations != nil {
		l = len(m.Operations)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.HashOfState != nil {
		l = len(m.HashOfState)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Round != nil {
		n += 1 + sovMessage(uint64(*m.Round))
	}
	if m.Server != nil {
		n += 1 + sovMessage(uint64(*m.Server))
	}
	if m.Time != nil {
		n += 1 + sovMessage(uint64(*m.Time))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *SignedServerMessage_ServerMessage_OperationsT) Size() (n int) {
	var l int
	_ = l
	if m.Seed != nil {
		l = len(m.Seed)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Time != nil {
		n += 1 + sovMessage(uint64(*m.Time))
	}
	if len(m.ProfileOperations) > 0 {
		for _, e := range m.ProfileOperations {
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *BackendMessage) Size() (n int) {
	var l int
	_ = l
	if m.SignedServerMessage != nil {
		l = m.SignedServerMessage.Size()
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Download != nil {
		l = m.Download.Size()
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Subscribe != nil {
		n += 2
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *BackendMessage_MessageID) Size() (n int) {
	var l int
	_ = l
	if m.Round != nil {
		n += 1 + sovMessage(uint64(*m.Round))
	}
	if len(m.Phase) > 0 {
		l = 0
		for _, e := range m.Phase {
			l += sovMessage(uint64(e))
		}
		n += 1 + sovMessage(uint64(l)) + l
	}
	if len(m.Server) > 0 {
		l = 0
		for _, e := range m.Server {
			l += sovMessage(uint64(e))
		}
		n += 1 + sovMessage(uint64(l)) + l
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *ClientMessage) Size() (n int) {
	var l int
	_ = l
	if m.PeekState != nil {
		n += 2
	}
	if m.ResolveName != nil {
		l = len(m.ResolveName)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.ModifyProfile != nil {
		l = m.ModifyProfile.Size()
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.InviteCode != nil {
		l = len(m.InviteCode)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.PadReplyTo != nil {
		n += 1 + sovMessage(uint64(*m.PadReplyTo))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *ClientReply) Size() (n int) {
	var l int
	_ = l
	if len(m.StateConfirmations) > 0 {
		for _, e := range m.StateConfirmations {
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	if len(m.LookupNodes) > 0 {
		for _, e := range m.LookupNodes {
			l = e.Size()
			n += 1 + l + sovMessage(uint64(l))
		}
	}
	if m.Status != nil {
		n += 1 + sovMessage(uint64(*m.Status))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func (m *ClientReply_MerklemapNode) Size() (n int) {
	var l int
	_ = l
	if m.SubstringBitsInLastByte != nil {
		n += 1 + sovMessage(uint64(*m.SubstringBitsInLastByte))
	}
	if m.Substring != nil {
		l = len(m.Substring)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.LeftChildHash != nil {
		l = len(m.LeftChildHash)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.RightChildHash != nil {
		l = len(m.RightChildHash)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.Value != nil {
		l = len(m.Value)
		n += 1 + l + sovMessage(uint64(l))
	}
	if m.XXX_unrecognized != nil {
		n += len(m.XXX_unrecognized)
	}
	return n
}

func sovMessage(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozMessage(x uint64) (n int) {
	return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func NewPopulatedProfile(r randyMessage, easy bool) *Profile {
	this := &Profile{}
	this.SignatureKey = NewPopulatedProfile_PublicKey(r, easy)
	v1 := uint64(r.Uint32())
	this.ExpirationTime = &v1
	if r.Intn(10) != 0 {
		v2 := uint64(r.Uint32())
		this.Version = &v2
	}
	if !easy && r.Intn(10) != 0 {
		l := r.Intn(5)
		for i := 0; i < l; i++ {
			fieldNumber := r.Intn(536870908) + 4
			wire := r.Intn(4)
			if wire == 3 {
				wire = 5
			}
			data := randFieldMessage(nil, r, fieldNumber, wire)
			github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), data)
		}
	}
	return this
}

func NewPopulatedProfile_PublicKey(r randyMessage, easy bool) *Profile_PublicKey {
	this := &Profile_PublicKey{}
	if r.Intn(10) != 0 {
		v3 := r.Intn(100)
		this.Ed25519 = make([]byte, v3)
		for i := 0; i < v3; i++ {
			this.Ed25519[i] = byte(r.Intn(256))
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 2)
	}
	return this
}

func NewPopulatedSignedProfileOperation(r randyMessage, easy bool) *SignedProfileOperation {
	this := &SignedProfileOperation{}
	v4 := r.Intn(100)
	this.ProfileOperation = make([]byte, v4)
	for i := 0; i < v4; i++ {
		this.ProfileOperation[i] = byte(r.Intn(256))
	}
	v5 := r.Intn(100)
	this.NewProfileSignature = make([]byte, v5)
	for i := 0; i < v5; i++ {
		this.NewProfileSignature[i] = byte(r.Intn(256))
	}
	if r.Intn(10) != 0 {
		v6 := r.Intn(100)
		this.OldProfileSignature = make([]byte, v6)
		for i := 0; i < v6; i++ {
			this.OldProfileSignature[i] = byte(r.Intn(256))
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 4)
	}
	return this
}

func NewPopulatedSignedProfileOperation_ProfileOperationT(r randyMessage, easy bool) *SignedProfileOperation_ProfileOperationT {
	this := &SignedProfileOperation_ProfileOperationT{}
	v7 := r.Intn(100)
	this.Name = make([]byte, v7)
	for i := 0; i < v7; i++ {
		this.Name[i] = byte(r.Intn(256))
	}
	v8 := r.Intn(100)
	this.NewProfile = make([]byte, v8)
	for i := 0; i < v8; i++ {
		this.NewProfile[i] = byte(r.Intn(256))
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 3)
	}
	return this
}

func NewPopulatedSignedServerMessage(r randyMessage, easy bool) *SignedServerMessage {
	this := &SignedServerMessage{}
	v9 := r.Intn(100)
	this.Message = make([]byte, v9)
	for i := 0; i < v9; i++ {
		this.Message[i] = byte(r.Intn(256))
	}
	v10 := r.Intn(100)
	this.Signature = make([]byte, v10)
	for i := 0; i < v10; i++ {
		this.Signature[i] = byte(r.Intn(256))
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 3)
	}
	return this
}

func NewPopulatedSignedServerMessage_ServerMessage(r randyMessage, easy bool) *SignedServerMessage_ServerMessage {
	this := &SignedServerMessage_ServerMessage{}
	if r.Intn(10) != 0 {
		v11 := r.Intn(100)
		this.HashOfOperations = make([]byte, v11)
		for i := 0; i < v11; i++ {
			this.HashOfOperations[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		v12 := r.Intn(100)
		this.HashOfHashes = make([]byte, v12)
		for i := 0; i < v12; i++ {
			this.HashOfHashes[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		v13 := r.Intn(100)
		this.Operations = make([]byte, v13)
		for i := 0; i < v13; i++ {
			this.Operations[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		v14 := r.Intn(100)
		this.HashOfState = make([]byte, v14)
		for i := 0; i < v14; i++ {
			this.HashOfState[i] = byte(r.Intn(256))
		}
	}
	v15 := uint64(r.Uint32())
	this.Round = &v15
	v16 := uint64(r.Uint32())
	this.Server = &v16
	v17 := uint64(r.Uint32())
	this.Time = &v17
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 13)
	}
	return this
}

func NewPopulatedSignedServerMessage_ServerMessage_OperationsT(r randyMessage, easy bool) *SignedServerMessage_ServerMessage_OperationsT {
	this := &SignedServerMessage_ServerMessage_OperationsT{}
	v18 := r.Intn(100)
	this.Seed = make([]byte, v18)
	for i := 0; i < v18; i++ {
		this.Seed[i] = byte(r.Intn(256))
	}
	v19 := uint64(r.Uint32())
	this.Time = &v19
	if r.Intn(10) != 0 {
		v20 := r.Intn(10)
		this.ProfileOperations = make([]*SignedProfileOperation, v20)
		for i := 0; i < v20; i++ {
			this.ProfileOperations[i] = NewPopulatedSignedProfileOperation(r, easy)
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 4)
	}
	return this
}

func NewPopulatedBackendMessage(r randyMessage, easy bool) *BackendMessage {
	this := &BackendMessage{}
	if r.Intn(10) != 0 {
		this.SignedServerMessage = NewPopulatedSignedServerMessage(r, easy)
	}
	if r.Intn(10) != 0 {
		this.Download = NewPopulatedBackendMessage_MessageID(r, easy)
	}
	if r.Intn(10) != 0 {
		v21 := bool(r.Intn(2) == 0)
		this.Subscribe = &v21
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 4)
	}
	return this
}

func NewPopulatedBackendMessage_MessageID(r randyMessage, easy bool) *BackendMessage_MessageID {
	this := &BackendMessage_MessageID{}
	v22 := uint64(r.Uint32())
	this.Round = &v22
	if r.Intn(10) != 0 {
		v23 := r.Intn(100)
		this.Phase = make([]uint64, v23)
		for i := 0; i < v23; i++ {
			this.Phase[i] = uint64(r.Uint32())
		}
	}
	if r.Intn(10) != 0 {
		v24 := r.Intn(100)
		this.Server = make([]uint64, v24)
		for i := 0; i < v24; i++ {
			this.Server[i] = uint64(r.Uint32())
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 4)
	}
	return this
}

func NewPopulatedClientMessage(r randyMessage, easy bool) *ClientMessage {
	this := &ClientMessage{}
	if r.Intn(10) != 0 {
		v25 := bool(r.Intn(2) == 0)
		this.PeekState = &v25
	}
	if r.Intn(10) != 0 {
		v26 := r.Intn(100)
		this.ResolveName = make([]byte, v26)
		for i := 0; i < v26; i++ {
			this.ResolveName[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		this.ModifyProfile = NewPopulatedSignedProfileOperation(r, easy)
	}
	if r.Intn(10) != 0 {
		v27 := r.Intn(100)
		this.InviteCode = make([]byte, v27)
		for i := 0; i < v27; i++ {
			this.InviteCode[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		v28 := uint64(r.Uint32())
		this.PadReplyTo = &v28
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 12)
	}
	return this
}

func NewPopulatedClientReply(r randyMessage, easy bool) *ClientReply {
	this := &ClientReply{}
	if r.Intn(10) != 0 {
		v29 := r.Intn(10)
		this.StateConfirmations = make([]*SignedServerMessage, v29)
		for i := 0; i < v29; i++ {
			this.StateConfirmations[i] = NewPopulatedSignedServerMessage(r, easy)
		}
	}
	if r.Intn(10) != 0 {
		v30 := r.Intn(10)
		this.LookupNodes = make([]*ClientReply_MerklemapNode, v30)
		for i := 0; i < v30; i++ {
			this.LookupNodes[i] = NewPopulatedClientReply_MerklemapNode(r, easy)
		}
	}
	if r.Intn(10) != 0 {
		v31 := ClientReply_Status([]int32{0, 1, 2, 3, 4, 5, 6}[r.Intn(7)])
		this.Status = &v31
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 4)
	}
	return this
}

func NewPopulatedClientReply_MerklemapNode(r randyMessage, easy bool) *ClientReply_MerklemapNode {
	this := &ClientReply_MerklemapNode{}
	v32 := uint64(r.Uint32())
	this.SubstringBitsInLastByte = &v32
	v33 := r.Intn(100)
	this.Substring = make([]byte, v33)
	for i := 0; i < v33; i++ {
		this.Substring[i] = byte(r.Intn(256))
	}
	if r.Intn(10) != 0 {
		v34 := r.Intn(100)
		this.LeftChildHash = make([]byte, v34)
		for i := 0; i < v34; i++ {
			this.LeftChildHash[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		v35 := r.Intn(100)
		this.RightChildHash = make([]byte, v35)
		for i := 0; i < v35; i++ {
			this.RightChildHash[i] = byte(r.Intn(256))
		}
	}
	if r.Intn(10) != 0 {
		v36 := r.Intn(100)
		this.Value = make([]byte, v36)
		for i := 0; i < v36; i++ {
			this.Value[i] = byte(r.Intn(256))
		}
	}
	if !easy && r.Intn(10) != 0 {
		this.XXX_unrecognized = randUnrecognizedMessage(r, 6)
	}
	return this
}

type randyMessage interface {
	Float32() float32
	Float64() float64
	Int63() int64
	Int31() int32
	Uint32() uint32
	Intn(n int) int
}

func randUTF8RuneMessage(r randyMessage) rune {
	return rune(r.Intn(126-43) + 43)
}
func randStringMessage(r randyMessage) string {
	v37 := r.Intn(100)
	tmps := make([]rune, v37)
	for i := 0; i < v37; i++ {
		tmps[i] = randUTF8RuneMessage(r)
	}
	return string(tmps)
}
func randUnrecognizedMessage(r randyMessage, maxFieldNumber int) (data []byte) {
	l := r.Intn(5)
	for i := 0; i < l; i++ {
		wire := r.Intn(4)
		if wire == 3 {
			wire = 5
		}
		fieldNumber := maxFieldNumber + r.Intn(100)
		data = randFieldMessage(data, r, fieldNumber, wire)
	}
	return data
}
func randFieldMessage(data []byte, r randyMessage, fieldNumber int, wire int) []byte {
	key := uint32(fieldNumber)<<3 | uint32(wire)
	switch wire {
	case 0:
		data = encodeVarintPopulateMessage(data, uint64(key))
		v38 := r.Int63()
		if r.Intn(2) == 0 {
			v38 *= -1
		}
		data = encodeVarintPopulateMessage(data, uint64(v38))
	case 1:
		data = encodeVarintPopulateMessage(data, uint64(key))
		data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
	case 2:
		data = encodeVarintPopulateMessage(data, uint64(key))
		ll := r.Intn(100)
		data = encodeVarintPopulateMessage(data, uint64(ll))
		for j := 0; j < ll; j++ {
			data = append(data, byte(r.Intn(256)))
		}
	default:
		data = encodeVarintPopulateMessage(data, uint64(key))
		data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
	}
	return data
}
func encodeVarintPopulateMessage(data []byte, v uint64) []byte {
	for v >= 1<<7 {
		data = append(data, uint8(uint64(v)&0x7f|0x80))
		v >>= 7
	}
	data = append(data, uint8(v))
	return data
}
func (m *Profile) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *Profile) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.SignatureKey != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(m.SignatureKey.Size()))
		n1, err := m.SignatureKey.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n1
	}
	if m.ExpirationTime != nil {
		data[i] = 0x10
		i++
		i = encodeVarintMessage(data, i, uint64(*m.ExpirationTime))
	}
	if m.Version != nil {
		data[i] = 0x18
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Version))
	}
	if len(m.XXX_extensions) > 0 {
		n, err := github_com_gogo_protobuf_proto.EncodeExtensionMap(m.XXX_extensions, data[i:])
		if err != nil {
			return 0, err
		}
		i += n
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *Profile_PublicKey) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *Profile_PublicKey) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Ed25519 != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Ed25519)))
		i += copy(data[i:], m.Ed25519)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *SignedProfileOperation) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *SignedProfileOperation) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.ProfileOperation != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.ProfileOperation)))
		i += copy(data[i:], m.ProfileOperation)
	}
	if m.NewProfileSignature != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.NewProfileSignature)))
		i += copy(data[i:], m.NewProfileSignature)
	}
	if m.OldProfileSignature != nil {
		data[i] = 0x1a
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.OldProfileSignature)))
		i += copy(data[i:], m.OldProfileSignature)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *SignedProfileOperation_ProfileOperationT) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *SignedProfileOperation_ProfileOperationT) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Name != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Name)))
		i += copy(data[i:], m.Name)
	}
	if m.NewProfile != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.NewProfile)))
		i += copy(data[i:], m.NewProfile)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *SignedServerMessage) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *SignedServerMessage) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Message != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Message)))
		i += copy(data[i:], m.Message)
	}
	if m.Signature != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Signature)))
		i += copy(data[i:], m.Signature)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *SignedServerMessage_ServerMessage) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *SignedServerMessage_ServerMessage) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.HashOfOperations != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.HashOfOperations)))
		i += copy(data[i:], m.HashOfOperations)
	}
	if m.HashOfHashes != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.HashOfHashes)))
		i += copy(data[i:], m.HashOfHashes)
	}
	if m.Operations != nil {
		data[i] = 0x1a
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Operations)))
		i += copy(data[i:], m.Operations)
	}
	if m.HashOfState != nil {
		data[i] = 0x22
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.HashOfState)))
		i += copy(data[i:], m.HashOfState)
	}
	if m.Round != nil {
		data[i] = 0x50
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Round))
	}
	if m.Server != nil {
		data[i] = 0x58
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Server))
	}
	if m.Time != nil {
		data[i] = 0x60
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Time))
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *SignedServerMessage_ServerMessage_OperationsT) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *SignedServerMessage_ServerMessage_OperationsT) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Seed != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Seed)))
		i += copy(data[i:], m.Seed)
	}
	if m.Time != nil {
		data[i] = 0x10
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Time))
	}
	if len(m.ProfileOperations) > 0 {
		for _, msg := range m.ProfileOperations {
			data[i] = 0x1a
			i++
			i = encodeVarintMessage(data, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *BackendMessage) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *BackendMessage) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.SignedServerMessage != nil {
		data[i] = 0xa
		i++
		i = encodeVarintMessage(data, i, uint64(m.SignedServerMessage.Size()))
		n2, err := m.SignedServerMessage.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n2
	}
	if m.Download != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(m.Download.Size()))
		n3, err := m.Download.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n3
	}
	if m.Subscribe != nil {
		data[i] = 0x18
		i++
		if *m.Subscribe {
			data[i] = 1
		} else {
			data[i] = 0
		}
		i++
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *BackendMessage_MessageID) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *BackendMessage_MessageID) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Round != nil {
		data[i] = 0x8
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Round))
	}
	if len(m.Phase) > 0 {
		data5 := make([]byte, len(m.Phase)*10)
		var j4 int
		for _, num := range m.Phase {
			for num >= 1<<7 {
				data5[j4] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j4++
			}
			data5[j4] = uint8(num)
			j4++
		}
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(j4))
		i += copy(data[i:], data5[:j4])
	}
	if len(m.Server) > 0 {
		data7 := make([]byte, len(m.Server)*10)
		var j6 int
		for _, num := range m.Server {
			for num >= 1<<7 {
				data7[j6] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j6++
			}
			data7[j6] = uint8(num)
			j6++
		}
		data[i] = 0x1a
		i++
		i = encodeVarintMessage(data, i, uint64(j6))
		i += copy(data[i:], data7[:j6])
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *ClientMessage) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *ClientMessage) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.PeekState != nil {
		data[i] = 0x8
		i++
		if *m.PeekState {
			data[i] = 1
		} else {
			data[i] = 0
		}
		i++
	}
	if m.ResolveName != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.ResolveName)))
		i += copy(data[i:], m.ResolveName)
	}
	if m.ModifyProfile != nil {
		data[i] = 0x1a
		i++
		i = encodeVarintMessage(data, i, uint64(m.ModifyProfile.Size()))
		n8, err := m.ModifyProfile.MarshalTo(data[i:])
		if err != nil {
			return 0, err
		}
		i += n8
	}
	if m.InviteCode != nil {
		data[i] = 0x22
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.InviteCode)))
		i += copy(data[i:], m.InviteCode)
	}
	if m.PadReplyTo != nil {
		data[i] = 0x58
		i++
		i = encodeVarintMessage(data, i, uint64(*m.PadReplyTo))
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *ClientReply) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *ClientReply) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.StateConfirmations) > 0 {
		for _, msg := range m.StateConfirmations {
			data[i] = 0xa
			i++
			i = encodeVarintMessage(data, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	if len(m.LookupNodes) > 0 {
		for _, msg := range m.LookupNodes {
			data[i] = 0x12
			i++
			i = encodeVarintMessage(data, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(data[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	if m.Status != nil {
		data[i] = 0x18
		i++
		i = encodeVarintMessage(data, i, uint64(*m.Status))
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func (m *ClientReply_MerklemapNode) Marshal() (data []byte, err error) {
	size := m.Size()
	data = make([]byte, size)
	n, err := m.MarshalTo(data)
	if err != nil {
		return nil, err
	}
	return data[:n], nil
}

func (m *ClientReply_MerklemapNode) MarshalTo(data []byte) (n int, err error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.SubstringBitsInLastByte != nil {
		data[i] = 0x8
		i++
		i = encodeVarintMessage(data, i, uint64(*m.SubstringBitsInLastByte))
	}
	if m.Substring != nil {
		data[i] = 0x12
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Substring)))
		i += copy(data[i:], m.Substring)
	}
	if m.LeftChildHash != nil {
		data[i] = 0x1a
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.LeftChildHash)))
		i += copy(data[i:], m.LeftChildHash)
	}
	if m.RightChildHash != nil {
		data[i] = 0x22
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.RightChildHash)))
		i += copy(data[i:], m.RightChildHash)
	}
	if m.Value != nil {
		data[i] = 0x2a
		i++
		i = encodeVarintMessage(data, i, uint64(len(m.Value)))
		i += copy(data[i:], m.Value)
	}
	if m.XXX_unrecognized != nil {
		i += copy(data[i:], m.XXX_unrecognized)
	}
	return i, nil
}

func encodeFixed64Message(data []byte, offset int, v uint64) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	data[offset+4] = uint8(v >> 32)
	data[offset+5] = uint8(v >> 40)
	data[offset+6] = uint8(v >> 48)
	data[offset+7] = uint8(v >> 56)
	return offset + 8
}
func encodeFixed32Message(data []byte, offset int, v uint32) int {
	data[offset] = uint8(v)
	data[offset+1] = uint8(v >> 8)
	data[offset+2] = uint8(v >> 16)
	data[offset+3] = uint8(v >> 24)
	return offset + 4
}
func encodeVarintMessage(data []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		data[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	data[offset] = uint8(v)
	return offset + 1
}
func (this *Profile) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*Profile)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.SignatureKey.Equal(that1.SignatureKey) {
		return false
	}
	if this.ExpirationTime != nil && that1.ExpirationTime != nil {
		if *this.ExpirationTime != *that1.ExpirationTime {
			return false
		}
	} else if this.ExpirationTime != nil {
		return false
	} else if that1.ExpirationTime != nil {
		return false
	}
	if this.Version != nil && that1.Version != nil {
		if *this.Version != *that1.Version {
			return false
		}
	} else if this.Version != nil {
		return false
	} else if that1.Version != nil {
		return false
	}
	for k, v := range this.XXX_extensions {
		if v2, ok := that1.XXX_extensions[k]; ok {
			if !v.Equal(&v2) {
				return false
			}
		} else {
			return false
		}
	}
	for k, _ := range that1.XXX_extensions {
		if _, ok := this.XXX_extensions[k]; !ok {
			return false
		}
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *Profile_PublicKey) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*Profile_PublicKey)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.Ed25519, that1.Ed25519) {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *SignedProfileOperation) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*SignedProfileOperation)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.ProfileOperation, that1.ProfileOperation) {
		return false
	}
	if !bytes.Equal(this.NewProfileSignature, that1.NewProfileSignature) {
		return false
	}
	if !bytes.Equal(this.OldProfileSignature, that1.OldProfileSignature) {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *SignedProfileOperation_ProfileOperationT) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*SignedProfileOperation_ProfileOperationT)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.Name, that1.Name) {
		return false
	}
	if !bytes.Equal(this.NewProfile, that1.NewProfile) {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *SignedServerMessage) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*SignedServerMessage)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.Message, that1.Message) {
		return false
	}
	if !bytes.Equal(this.Signature, that1.Signature) {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *SignedServerMessage_ServerMessage) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*SignedServerMessage_ServerMessage)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.HashOfOperations, that1.HashOfOperations) {
		return false
	}
	if !bytes.Equal(this.HashOfHashes, that1.HashOfHashes) {
		return false
	}
	if !bytes.Equal(this.Operations, that1.Operations) {
		return false
	}
	if !bytes.Equal(this.HashOfState, that1.HashOfState) {
		return false
	}
	if this.Round != nil && that1.Round != nil {
		if *this.Round != *that1.Round {
			return false
		}
	} else if this.Round != nil {
		return false
	} else if that1.Round != nil {
		return false
	}
	if this.Server != nil && that1.Server != nil {
		if *this.Server != *that1.Server {
			return false
		}
	} else if this.Server != nil {
		return false
	} else if that1.Server != nil {
		return false
	}
	if this.Time != nil && that1.Time != nil {
		if *this.Time != *that1.Time {
			return false
		}
	} else if this.Time != nil {
		return false
	} else if that1.Time != nil {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *SignedServerMessage_ServerMessage_OperationsT) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*SignedServerMessage_ServerMessage_OperationsT)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !bytes.Equal(this.Seed, that1.Seed) {
		return false
	}
	if this.Time != nil && that1.Time != nil {
		if *this.Time != *that1.Time {
			return false
		}
	} else if this.Time != nil {
		return false
	} else if that1.Time != nil {
		return false
	}
	if len(this.ProfileOperations) != len(that1.ProfileOperations) {
		return false
	}
	for i := range this.ProfileOperations {
		if !this.ProfileOperations[i].Equal(that1.ProfileOperations[i]) {
			return false
		}
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *BackendMessage) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*BackendMessage)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.SignedServerMessage.Equal(that1.SignedServerMessage) {
		return false
	}
	if !this.Download.Equal(that1.Download) {
		return false
	}
	if this.Subscribe != nil && that1.Subscribe != nil {
		if *this.Subscribe != *that1.Subscribe {
			return false
		}
	} else if this.Subscribe != nil {
		return false
	} else if that1.Subscribe != nil {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *BackendMessage_MessageID) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*BackendMessage_MessageID)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.Round != nil && that1.Round != nil {
		if *this.Round != *that1.Round {
			return false
		}
	} else if this.Round != nil {
		return false
	} else if that1.Round != nil {
		return false
	}
	if len(this.Phase) != len(that1.Phase) {
		return false
	}
	for i := range this.Phase {
		if this.Phase[i] != that1.Phase[i] {
			return false
		}
	}
	if len(this.Server) != len(that1.Server) {
		return false
	}
	for i := range this.Server {
		if this.Server[i] != that1.Server[i] {
			return false
		}
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *ClientMessage) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*ClientMessage)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.PeekState != nil && that1.PeekState != nil {
		if *this.PeekState != *that1.PeekState {
			return false
		}
	} else if this.PeekState != nil {
		return false
	} else if that1.PeekState != nil {
		return false
	}
	if !bytes.Equal(this.ResolveName, that1.ResolveName) {
		return false
	}
	if !this.ModifyProfile.Equal(that1.ModifyProfile) {
		return false
	}
	if !bytes.Equal(this.InviteCode, that1.InviteCode) {
		return false
	}
	if this.PadReplyTo != nil && that1.PadReplyTo != nil {
		if *this.PadReplyTo != *that1.PadReplyTo {
			return false
		}
	} else if this.PadReplyTo != nil {
		return false
	} else if that1.PadReplyTo != nil {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *ClientReply) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*ClientReply)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if len(this.StateConfirmations) != len(that1.StateConfirmations) {
		return false
	}
	for i := range this.StateConfirmations {
		if !this.StateConfirmations[i].Equal(that1.StateConfirmations[i]) {
			return false
		}
	}
	if len(this.LookupNodes) != len(that1.LookupNodes) {
		return false
	}
	for i := range this.LookupNodes {
		if !this.LookupNodes[i].Equal(that1.LookupNodes[i]) {
			return false
		}
	}
	if this.Status != nil && that1.Status != nil {
		if *this.Status != *that1.Status {
			return false
		}
	} else if this.Status != nil {
		return false
	} else if that1.Status != nil {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
func (this *ClientReply_MerklemapNode) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*ClientReply_MerklemapNode)
	if !ok {
		return false
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.SubstringBitsInLastByte != nil && that1.SubstringBitsInLastByte != nil {
		if *this.SubstringBitsInLastByte != *that1.SubstringBitsInLastByte {
			return false
		}
	} else if this.SubstringBitsInLastByte != nil {
		return false
	} else if that1.SubstringBitsInLastByte != nil {
		return false
	}
	if !bytes.Equal(this.Substring, that1.Substring) {
		return false
	}
	if !bytes.Equal(this.LeftChildHash, that1.LeftChildHash) {
		return false
	}
	if !bytes.Equal(this.RightChildHash, that1.RightChildHash) {
		return false
	}
	if !bytes.Equal(this.Value, that1.Value) {
		return false
	}
	if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
		return false
	}
	return true
}
