// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: v1/headers.proto

package v1

import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

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

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

type CallResponseHeaders_Status int32

const (
	CallResponseHeaders_OK             CallResponseHeaders_Status = 0
	CallResponseHeaders_ERROR          CallResponseHeaders_Status = 1
	CallResponseHeaders_UNKNOWN        CallResponseHeaders_Status = 2
	CallResponseHeaders_CANCELED       CallResponseHeaders_Status = 3
	CallResponseHeaders_NOT_FOUND      CallResponseHeaders_Status = 4
	CallResponseHeaders_ALREADY_EXISTS CallResponseHeaders_Status = 5
	CallResponseHeaders_UNAUTHORIZED   CallResponseHeaders_Status = 6
	CallResponseHeaders_FORBIDDEN      CallResponseHeaders_Status = 7
	CallResponseHeaders_CONFLICT       CallResponseHeaders_Status = 8
	CallResponseHeaders_INVALID        CallResponseHeaders_Status = 9
	CallResponseHeaders_UNAVAILABLE    CallResponseHeaders_Status = 10
	CallResponseHeaders_NOT_SUPPORTED  CallResponseHeaders_Status = 11
	CallResponseHeaders_TIMEOUT        CallResponseHeaders_Status = 12
	CallResponseHeaders_INTERNAL       CallResponseHeaders_Status = 13
	CallResponseHeaders_FAULT          CallResponseHeaders_Status = 14
)

var CallResponseHeaders_Status_name = map[int32]string{
	0:  "OK",
	1:  "ERROR",
	2:  "UNKNOWN",
	3:  "CANCELED",
	4:  "NOT_FOUND",
	5:  "ALREADY_EXISTS",
	6:  "UNAUTHORIZED",
	7:  "FORBIDDEN",
	8:  "CONFLICT",
	9:  "INVALID",
	10: "UNAVAILABLE",
	11: "NOT_SUPPORTED",
	12: "TIMEOUT",
	13: "INTERNAL",
	14: "FAULT",
}

var CallResponseHeaders_Status_value = map[string]int32{
	"OK":             0,
	"ERROR":          1,
	"UNKNOWN":        2,
	"CANCELED":       3,
	"NOT_FOUND":      4,
	"ALREADY_EXISTS": 5,
	"UNAUTHORIZED":   6,
	"FORBIDDEN":      7,
	"CONFLICT":       8,
	"INVALID":        9,
	"UNAVAILABLE":    10,
	"NOT_SUPPORTED":  11,
	"TIMEOUT":        12,
	"INTERNAL":       13,
	"FAULT":          14,
}

func (x CallResponseHeaders_Status) String() string {
	return proto.EnumName(CallResponseHeaders_Status_name, int32(x))
}

func (CallResponseHeaders_Status) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{7, 0}
}

type PartitionRequestHeaders struct {
	PartitionID PartitionID `protobuf:"varint,1,opt,name=partition_id,json=partitionId,proto3,casttype=PartitionID" json:"partition_id,omitempty"`
}

func (m *PartitionRequestHeaders) Reset()         { *m = PartitionRequestHeaders{} }
func (m *PartitionRequestHeaders) String() string { return proto.CompactTextString(m) }
func (*PartitionRequestHeaders) ProtoMessage()    {}
func (*PartitionRequestHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{0}
}
func (m *PartitionRequestHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PartitionRequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PartitionRequestHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PartitionRequestHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PartitionRequestHeaders.Merge(m, src)
}
func (m *PartitionRequestHeaders) XXX_Size() int {
	return m.Size()
}
func (m *PartitionRequestHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_PartitionRequestHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_PartitionRequestHeaders proto.InternalMessageInfo

func (m *PartitionRequestHeaders) GetPartitionID() PartitionID {
	if m != nil {
		return m.PartitionID
	}
	return 0
}

type PartitionResponseHeaders struct {
	Index Index `protobuf:"varint,1,opt,name=index,proto3,casttype=Index" json:"index,omitempty"`
}

func (m *PartitionResponseHeaders) Reset()         { *m = PartitionResponseHeaders{} }
func (m *PartitionResponseHeaders) String() string { return proto.CompactTextString(m) }
func (*PartitionResponseHeaders) ProtoMessage()    {}
func (*PartitionResponseHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{1}
}
func (m *PartitionResponseHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PartitionResponseHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PartitionResponseHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PartitionResponseHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PartitionResponseHeaders.Merge(m, src)
}
func (m *PartitionResponseHeaders) XXX_Size() int {
	return m.Size()
}
func (m *PartitionResponseHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_PartitionResponseHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_PartitionResponseHeaders proto.InternalMessageInfo

func (m *PartitionResponseHeaders) GetIndex() Index {
	if m != nil {
		return m.Index
	}
	return 0
}

type SessionRequestHeaders struct {
	PartitionRequestHeaders `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
	SessionID               SessionID `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3,casttype=SessionID" json:"session_id,omitempty"`
}

func (m *SessionRequestHeaders) Reset()         { *m = SessionRequestHeaders{} }
func (m *SessionRequestHeaders) String() string { return proto.CompactTextString(m) }
func (*SessionRequestHeaders) ProtoMessage()    {}
func (*SessionRequestHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{2}
}
func (m *SessionRequestHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *SessionRequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_SessionRequestHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *SessionRequestHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SessionRequestHeaders.Merge(m, src)
}
func (m *SessionRequestHeaders) XXX_Size() int {
	return m.Size()
}
func (m *SessionRequestHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_SessionRequestHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_SessionRequestHeaders proto.InternalMessageInfo

func (m *SessionRequestHeaders) GetSessionID() SessionID {
	if m != nil {
		return m.SessionID
	}
	return 0
}

type SessionResponseHeaders struct {
	PartitionResponseHeaders `protobuf:"bytes,1,opt,name=partition,proto3,embedded=partition" json:"partition"`
}

func (m *SessionResponseHeaders) Reset()         { *m = SessionResponseHeaders{} }
func (m *SessionResponseHeaders) String() string { return proto.CompactTextString(m) }
func (*SessionResponseHeaders) ProtoMessage()    {}
func (*SessionResponseHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{3}
}
func (m *SessionResponseHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *SessionResponseHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_SessionResponseHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *SessionResponseHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SessionResponseHeaders.Merge(m, src)
}
func (m *SessionResponseHeaders) XXX_Size() int {
	return m.Size()
}
func (m *SessionResponseHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_SessionResponseHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_SessionResponseHeaders proto.InternalMessageInfo

type PrimitiveRequestHeaders struct {
	SessionRequestHeaders `protobuf:"bytes,1,opt,name=session,proto3,embedded=session" json:"session"`
	PrimitiveID           PrimitiveID `protobuf:"varint,2,opt,name=primitive_id,json=primitiveId,proto3,casttype=PrimitiveID" json:"primitive_id,omitempty"`
}

func (m *PrimitiveRequestHeaders) Reset()         { *m = PrimitiveRequestHeaders{} }
func (m *PrimitiveRequestHeaders) String() string { return proto.CompactTextString(m) }
func (*PrimitiveRequestHeaders) ProtoMessage()    {}
func (*PrimitiveRequestHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{4}
}
func (m *PrimitiveRequestHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PrimitiveRequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PrimitiveRequestHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PrimitiveRequestHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PrimitiveRequestHeaders.Merge(m, src)
}
func (m *PrimitiveRequestHeaders) XXX_Size() int {
	return m.Size()
}
func (m *PrimitiveRequestHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_PrimitiveRequestHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_PrimitiveRequestHeaders proto.InternalMessageInfo

func (m *PrimitiveRequestHeaders) GetPrimitiveID() PrimitiveID {
	if m != nil {
		return m.PrimitiveID
	}
	return 0
}

type PrimitiveResponseHeaders struct {
	SessionResponseHeaders `protobuf:"bytes,1,opt,name=primitive,proto3,embedded=primitive" json:"primitive"`
}

func (m *PrimitiveResponseHeaders) Reset()         { *m = PrimitiveResponseHeaders{} }
func (m *PrimitiveResponseHeaders) String() string { return proto.CompactTextString(m) }
func (*PrimitiveResponseHeaders) ProtoMessage()    {}
func (*PrimitiveResponseHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{5}
}
func (m *PrimitiveResponseHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PrimitiveResponseHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PrimitiveResponseHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *PrimitiveResponseHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PrimitiveResponseHeaders.Merge(m, src)
}
func (m *PrimitiveResponseHeaders) XXX_Size() int {
	return m.Size()
}
func (m *PrimitiveResponseHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_PrimitiveResponseHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_PrimitiveResponseHeaders proto.InternalMessageInfo

type CallRequestHeaders struct {
	PrimitiveRequestHeaders `protobuf:"bytes,1,opt,name=primitive,proto3,embedded=primitive" json:"primitive"`
}

func (m *CallRequestHeaders) Reset()         { *m = CallRequestHeaders{} }
func (m *CallRequestHeaders) String() string { return proto.CompactTextString(m) }
func (*CallRequestHeaders) ProtoMessage()    {}
func (*CallRequestHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{6}
}
func (m *CallRequestHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *CallRequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_CallRequestHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *CallRequestHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CallRequestHeaders.Merge(m, src)
}
func (m *CallRequestHeaders) XXX_Size() int {
	return m.Size()
}
func (m *CallRequestHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_CallRequestHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_CallRequestHeaders proto.InternalMessageInfo

type CallResponseHeaders struct {
	PrimitiveResponseHeaders `protobuf:"bytes,1,opt,name=session,proto3,embedded=session" json:"session"`
	Status                   CallResponseHeaders_Status `protobuf:"varint,2,opt,name=status,proto3,enum=atomix.protocols.rsm.v1.CallResponseHeaders_Status" json:"status,omitempty"`
	Message                  string                     `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
}

func (m *CallResponseHeaders) Reset()         { *m = CallResponseHeaders{} }
func (m *CallResponseHeaders) String() string { return proto.CompactTextString(m) }
func (*CallResponseHeaders) ProtoMessage()    {}
func (*CallResponseHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{7}
}
func (m *CallResponseHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *CallResponseHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_CallResponseHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *CallResponseHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_CallResponseHeaders.Merge(m, src)
}
func (m *CallResponseHeaders) XXX_Size() int {
	return m.Size()
}
func (m *CallResponseHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_CallResponseHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_CallResponseHeaders proto.InternalMessageInfo

func (m *CallResponseHeaders) GetStatus() CallResponseHeaders_Status {
	if m != nil {
		return m.Status
	}
	return CallResponseHeaders_OK
}

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

type ProposalRequestHeaders struct {
	CallRequestHeaders `protobuf:"bytes,1,opt,name=operation,proto3,embedded=operation" json:"operation"`
	SequenceNum        SequenceNum `protobuf:"varint,2,opt,name=sequence_num,json=sequenceNum,proto3,casttype=SequenceNum" json:"sequence_num,omitempty"`
}

func (m *ProposalRequestHeaders) Reset()         { *m = ProposalRequestHeaders{} }
func (m *ProposalRequestHeaders) String() string { return proto.CompactTextString(m) }
func (*ProposalRequestHeaders) ProtoMessage()    {}
func (*ProposalRequestHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{8}
}
func (m *ProposalRequestHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *ProposalRequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_ProposalRequestHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *ProposalRequestHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ProposalRequestHeaders.Merge(m, src)
}
func (m *ProposalRequestHeaders) XXX_Size() int {
	return m.Size()
}
func (m *ProposalRequestHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_ProposalRequestHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_ProposalRequestHeaders proto.InternalMessageInfo

func (m *ProposalRequestHeaders) GetSequenceNum() SequenceNum {
	if m != nil {
		return m.SequenceNum
	}
	return 0
}

type ProposalResponseHeaders struct {
	CallResponseHeaders `protobuf:"bytes,1,opt,name=operation,proto3,embedded=operation" json:"operation"`
	OutputSequenceNum   SequenceNum `protobuf:"varint,2,opt,name=output_sequence_num,json=outputSequenceNum,proto3,casttype=SequenceNum" json:"output_sequence_num,omitempty"`
}

func (m *ProposalResponseHeaders) Reset()         { *m = ProposalResponseHeaders{} }
func (m *ProposalResponseHeaders) String() string { return proto.CompactTextString(m) }
func (*ProposalResponseHeaders) ProtoMessage()    {}
func (*ProposalResponseHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{9}
}
func (m *ProposalResponseHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *ProposalResponseHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_ProposalResponseHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *ProposalResponseHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ProposalResponseHeaders.Merge(m, src)
}
func (m *ProposalResponseHeaders) XXX_Size() int {
	return m.Size()
}
func (m *ProposalResponseHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_ProposalResponseHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_ProposalResponseHeaders proto.InternalMessageInfo

func (m *ProposalResponseHeaders) GetOutputSequenceNum() SequenceNum {
	if m != nil {
		return m.OutputSequenceNum
	}
	return 0
}

type QueryRequestHeaders struct {
	CallRequestHeaders `protobuf:"bytes,1,opt,name=operation,proto3,embedded=operation" json:"operation"`
	SequenceNum        SequenceNum `protobuf:"varint,2,opt,name=sequence_num,json=sequenceNum,proto3,casttype=SequenceNum" json:"sequence_num,omitempty"`
	MaxReceivedIndex   Index       `protobuf:"varint,3,opt,name=max_received_index,json=maxReceivedIndex,proto3,casttype=Index" json:"max_received_index,omitempty"`
}

func (m *QueryRequestHeaders) Reset()         { *m = QueryRequestHeaders{} }
func (m *QueryRequestHeaders) String() string { return proto.CompactTextString(m) }
func (*QueryRequestHeaders) ProtoMessage()    {}
func (*QueryRequestHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{10}
}
func (m *QueryRequestHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryRequestHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryRequestHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryRequestHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryRequestHeaders.Merge(m, src)
}
func (m *QueryRequestHeaders) XXX_Size() int {
	return m.Size()
}
func (m *QueryRequestHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryRequestHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_QueryRequestHeaders proto.InternalMessageInfo

func (m *QueryRequestHeaders) GetSequenceNum() SequenceNum {
	if m != nil {
		return m.SequenceNum
	}
	return 0
}

func (m *QueryRequestHeaders) GetMaxReceivedIndex() Index {
	if m != nil {
		return m.MaxReceivedIndex
	}
	return 0
}

type QueryResponseHeaders struct {
	CallResponseHeaders `protobuf:"bytes,1,opt,name=operation,proto3,embedded=operation" json:"operation"`
}

func (m *QueryResponseHeaders) Reset()         { *m = QueryResponseHeaders{} }
func (m *QueryResponseHeaders) String() string { return proto.CompactTextString(m) }
func (*QueryResponseHeaders) ProtoMessage()    {}
func (*QueryResponseHeaders) Descriptor() ([]byte, []int) {
	return fileDescriptor_cf11571d5467f3d4, []int{11}
}
func (m *QueryResponseHeaders) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryResponseHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryResponseHeaders.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryResponseHeaders) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryResponseHeaders.Merge(m, src)
}
func (m *QueryResponseHeaders) XXX_Size() int {
	return m.Size()
}
func (m *QueryResponseHeaders) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryResponseHeaders.DiscardUnknown(m)
}

var xxx_messageInfo_QueryResponseHeaders proto.InternalMessageInfo

func init() {
	proto.RegisterEnum("atomix.protocols.rsm.v1.CallResponseHeaders_Status", CallResponseHeaders_Status_name, CallResponseHeaders_Status_value)
	proto.RegisterType((*PartitionRequestHeaders)(nil), "atomix.protocols.rsm.v1.PartitionRequestHeaders")
	proto.RegisterType((*PartitionResponseHeaders)(nil), "atomix.protocols.rsm.v1.PartitionResponseHeaders")
	proto.RegisterType((*SessionRequestHeaders)(nil), "atomix.protocols.rsm.v1.SessionRequestHeaders")
	proto.RegisterType((*SessionResponseHeaders)(nil), "atomix.protocols.rsm.v1.SessionResponseHeaders")
	proto.RegisterType((*PrimitiveRequestHeaders)(nil), "atomix.protocols.rsm.v1.PrimitiveRequestHeaders")
	proto.RegisterType((*PrimitiveResponseHeaders)(nil), "atomix.protocols.rsm.v1.PrimitiveResponseHeaders")
	proto.RegisterType((*CallRequestHeaders)(nil), "atomix.protocols.rsm.v1.CallRequestHeaders")
	proto.RegisterType((*CallResponseHeaders)(nil), "atomix.protocols.rsm.v1.CallResponseHeaders")
	proto.RegisterType((*ProposalRequestHeaders)(nil), "atomix.protocols.rsm.v1.ProposalRequestHeaders")
	proto.RegisterType((*ProposalResponseHeaders)(nil), "atomix.protocols.rsm.v1.ProposalResponseHeaders")
	proto.RegisterType((*QueryRequestHeaders)(nil), "atomix.protocols.rsm.v1.QueryRequestHeaders")
	proto.RegisterType((*QueryResponseHeaders)(nil), "atomix.protocols.rsm.v1.QueryResponseHeaders")
}

func init() { proto.RegisterFile("v1/headers.proto", fileDescriptor_cf11571d5467f3d4) }

var fileDescriptor_cf11571d5467f3d4 = []byte{
	// 775 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcd, 0x6e, 0xe2, 0x56,
	0x14, 0xc6, 0x61, 0x80, 0xf8, 0x18, 0x32, 0x77, 0x6e, 0xa6, 0x13, 0x34, 0x0b, 0x18, 0x79, 0x35,
	0x52, 0x2b, 0x52, 0x32, 0x8b, 0xaa, 0xea, 0xa2, 0x32, 0xd8, 0x28, 0x56, 0x5c, 0x9b, 0x5e, 0xec,
	0xfc, 0x54, 0x95, 0x90, 0x1b, 0xae, 0x52, 0x4b, 0x18, 0x53, 0x5f, 0x83, 0xe8, 0x5b, 0xf4, 0x15,
	0xba, 0xef, 0xa2, 0x9b, 0xbe, 0x43, 0x96, 0xd9, 0xb5, 0x2b, 0x5a, 0x91, 0xb7, 0xc8, 0xaa, 0xf2,
	0x2f, 0x3f, 0x81, 0x26, 0xdd, 0x54, 0xdd, 0x71, 0x0e, 0xe7, 0x7c, 0xdf, 0x77, 0xce, 0xfd, 0x8e,
	0x0c, 0x68, 0xda, 0x3c, 0xfe, 0x9e, 0xda, 0x03, 0xea, 0xb3, 0xc6, 0xd8, 0xf7, 0x02, 0x0f, 0x1f,
	0xd9, 0x81, 0xe7, 0x3a, 0xb3, 0x38, 0xba, 0xf6, 0x86, 0xac, 0xe1, 0x33, 0xb7, 0x31, 0x6d, 0xbe,
	0x7d, 0x7d, 0xe3, 0xdd, 0x78, 0x51, 0xf6, 0x38, 0xfc, 0x15, 0x17, 0x88, 0xdf, 0xc2, 0x51, 0xd7,
	0xf6, 0x03, 0x27, 0x70, 0xbc, 0x11, 0xa1, 0x3f, 0x4c, 0x28, 0x0b, 0x4e, 0x63, 0x3c, 0x2c, 0x41,
	0x79, 0x9c, 0xfe, 0xd5, 0x77, 0x06, 0x55, 0xee, 0x1d, 0xf7, 0xbe, 0xd2, 0xaa, 0x2d, 0xe6, 0x75,
	0x21, 0x6b, 0x51, 0xe5, 0x87, 0xf5, 0x90, 0x08, 0x59, 0x8f, 0x3a, 0x10, 0xbf, 0x80, 0xea, 0x0a,
	0x3a, 0x1b, 0x7b, 0x23, 0x46, 0x53, 0xf8, 0x3a, 0x14, 0x9c, 0xd1, 0x80, 0xce, 0x22, 0xdc, 0x17,
	0x2d, 0xfe, 0x61, 0x5e, 0x2f, 0xa8, 0x61, 0x82, 0xc4, 0x79, 0xf1, 0x17, 0x0e, 0x3e, 0xea, 0x51,
	0xc6, 0x1e, 0x2b, 0xbb, 0x04, 0x3e, 0x63, 0x89, 0xda, 0x85, 0x93, 0x4f, 0x1b, 0x3b, 0xe6, 0x6e,
	0xec, 0x18, 0xaf, 0xb5, 0x7f, 0x3b, 0xaf, 0xe7, 0xee, 0xe6, 0x75, 0x8e, 0x2c, 0xc1, 0xf0, 0xe7,
	0x00, 0x2c, 0xa6, 0x0c, 0x27, 0xde, 0x8b, 0x94, 0xbd, 0x5d, 0xcc, 0xeb, 0x7c, 0x22, 0x24, 0x9a,
	0x77, 0x19, 0x10, 0x3e, 0xa9, 0x56, 0x07, 0x22, 0x83, 0x37, 0x99, 0xda, 0xf5, 0x49, 0xaf, 0x1e,
	0xcb, 0x6d, 0x3e, 0x47, 0xee, 0x1a, 0xca, 0x56, 0xbd, 0xe2, 0xaf, 0x1c, 0x1c, 0x75, 0x7d, 0xc7,
	0x75, 0x02, 0x67, 0x4a, 0x37, 0xb6, 0x44, 0xa0, 0x94, 0xa8, 0x4b, 0x48, 0x1b, 0x3b, 0x49, 0xb7,
	0xae, 0x79, 0x85, 0x31, 0x05, 0x8a, 0x3c, 0x91, 0xd2, 0x2d, 0x37, 0x14, 0x7b, 0x22, 0xcd, 0x27,
	0x9e, 0x58, 0x86, 0x44, 0xc8, 0x7a, 0xa2, 0x3d, 0x55, 0x57, 0x14, 0xaf, 0x6f, 0xea, 0x02, 0xf8,
	0xac, 0x34, 0x11, 0x7d, 0xfc, 0xb4, 0xe8, 0xdd, 0x7b, 0x4a, 0xb1, 0xc4, 0x11, 0xe0, 0xb6, 0x3d,
	0x1c, 0x6e, 0xf1, 0xd1, 0x06, 0xdd, 0x3f, 0xf8, 0x68, 0xfb, 0x9a, 0xb7, 0xf3, 0xfd, 0x96, 0x87,
	0xc3, 0x98, 0x70, 0x7d, 0x40, 0x6b, 0xf3, 0x4d, 0x9a, 0xcf, 0xe1, 0xdb, 0x35, 0x60, 0xf6, 0x2c,
	0x67, 0x50, 0x64, 0x81, 0x1d, 0x4c, 0x58, 0xf4, 0x20, 0x07, 0x27, 0x1f, 0x76, 0xa2, 0x6e, 0x11,
	0xd5, 0xe8, 0x45, 0xad, 0x24, 0x81, 0xc0, 0x55, 0x28, 0xb9, 0x94, 0x31, 0xfb, 0x86, 0x56, 0xf3,
	0xef, 0xb8, 0xf7, 0x3c, 0x49, 0x43, 0xf1, 0x4f, 0x0e, 0x8a, 0x71, 0x31, 0x2e, 0xc2, 0x9e, 0x71,
	0x86, 0x72, 0x98, 0x87, 0x82, 0x42, 0x88, 0x41, 0x10, 0x87, 0x05, 0x28, 0x59, 0xfa, 0x99, 0x6e,
	0x5c, 0xe8, 0x68, 0x0f, 0x97, 0x61, 0xbf, 0x2d, 0xe9, 0x6d, 0x45, 0x53, 0x64, 0x94, 0xc7, 0x15,
	0xe0, 0x75, 0xc3, 0xec, 0x77, 0x0c, 0x4b, 0x97, 0xd1, 0x0b, 0x8c, 0xe1, 0x40, 0xd2, 0x88, 0x22,
	0xc9, 0x57, 0x7d, 0xe5, 0x52, 0xed, 0x99, 0x3d, 0x54, 0xc0, 0x08, 0xca, 0x96, 0x2e, 0x59, 0xe6,
	0xa9, 0x41, 0xd4, 0x6f, 0x14, 0x19, 0x15, 0xc3, 0xa6, 0x8e, 0x41, 0x5a, 0xaa, 0x2c, 0x2b, 0x3a,
	0x2a, 0x45, 0x88, 0x86, 0xde, 0xd1, 0xd4, 0xb6, 0x89, 0xf6, 0x43, 0x32, 0x55, 0x3f, 0x97, 0x34,
	0x55, 0x46, 0x3c, 0x7e, 0x09, 0x82, 0xa5, 0x4b, 0xe7, 0x92, 0xaa, 0x49, 0x2d, 0x4d, 0x41, 0x80,
	0x5f, 0x41, 0x25, 0xe4, 0xeb, 0x59, 0xdd, 0xae, 0x41, 0x4c, 0x45, 0x46, 0x42, 0xd8, 0x60, 0xaa,
	0x5f, 0x29, 0x86, 0x65, 0xa2, 0x72, 0x88, 0xa5, 0xea, 0xa6, 0x42, 0x74, 0x49, 0x43, 0x95, 0x70,
	0x86, 0x8e, 0x64, 0x69, 0x26, 0x3a, 0x10, 0x7f, 0xe6, 0xe0, 0x4d, 0xd7, 0xf7, 0xc6, 0x1e, 0xb3,
	0x37, 0xcd, 0xd2, 0x03, 0xde, 0x1b, 0x53, 0xdf, 0x5e, 0xb9, 0xe2, 0x8f, 0x9f, 0x58, 0xf3, 0x2e,
	0x9f, 0x64, 0x38, 0xf8, 0x04, 0xca, 0x2c, 0x2c, 0x1b, 0x5d, 0xd3, 0xfe, 0x68, 0xe2, 0x26, 0xf7,
	0xf4, 0x32, 0x3c, 0xa0, 0x5e, 0x92, 0xd7, 0x27, 0x2e, 0x11, 0xd8, 0x32, 0x48, 0x6e, 0x3e, 0xd5,
	0xb8, 0xee, 0x2f, 0xf3, 0xb1, 0xc8, 0x4f, 0xfe, 0x8d, 0x17, 0xb6, 0xab, 0xfc, 0x12, 0x0e, 0xbd,
	0x49, 0x30, 0x9e, 0x04, 0xfd, 0xe7, 0x88, 0x7d, 0x15, 0xd7, 0xae, 0xa4, 0xc4, 0xdf, 0x39, 0x38,
	0xfc, 0x7a, 0x42, 0xfd, 0x1f, 0xff, 0xa7, 0x3b, 0xc5, 0x9f, 0x01, 0x76, 0xed, 0x59, 0xdf, 0xa7,
	0xd7, 0xd4, 0x99, 0xd2, 0x41, 0x3f, 0xfe, 0x32, 0xe5, 0x37, 0xbf, 0x4c, 0xc8, 0xb5, 0x67, 0x24,
	0xa9, 0x89, 0x32, 0xe2, 0x10, 0x5e, 0x27, 0x83, 0xfd, 0x07, 0x0f, 0xd1, 0xaa, 0xde, 0x2e, 0x6a,
	0xdc, 0xdd, 0xa2, 0xc6, 0xfd, 0xb5, 0xa8, 0x71, 0x3f, 0xdd, 0xd7, 0x72, 0x77, 0xf7, 0xb5, 0xdc,
	0x1f, 0xf7, 0xb5, 0xdc, 0x77, 0xc5, 0x08, 0xf4, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xce,
	0x7d, 0x20, 0x1b, 0x11, 0x08, 0x00, 0x00,
}

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

func (m *PartitionRequestHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PartitionRequestHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.PartitionID != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.PartitionID))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *PartitionResponseHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PartitionResponseHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Index != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.Index))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *SessionRequestHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *SessionRequestHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.SessionID != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.SessionID))
		i--
		dAtA[i] = 0x10
	}
	{
		size, err := m.PartitionRequestHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *SessionResponseHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *SessionResponseHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.PartitionResponseHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *PrimitiveRequestHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PrimitiveRequestHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.PrimitiveID != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.PrimitiveID))
		i--
		dAtA[i] = 0x10
	}
	{
		size, err := m.SessionRequestHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *PrimitiveResponseHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PrimitiveResponseHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.SessionResponseHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *CallRequestHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *CallRequestHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.PrimitiveRequestHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *CallResponseHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *CallResponseHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Message) > 0 {
		i -= len(m.Message)
		copy(dAtA[i:], m.Message)
		i = encodeVarintHeaders(dAtA, i, uint64(len(m.Message)))
		i--
		dAtA[i] = 0x1a
	}
	if m.Status != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.Status))
		i--
		dAtA[i] = 0x10
	}
	{
		size, err := m.PrimitiveResponseHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *ProposalRequestHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ProposalRequestHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.SequenceNum != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.SequenceNum))
		i--
		dAtA[i] = 0x10
	}
	{
		size, err := m.CallRequestHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *ProposalResponseHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ProposalResponseHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.OutputSequenceNum != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.OutputSequenceNum))
		i--
		dAtA[i] = 0x10
	}
	{
		size, err := m.CallResponseHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *QueryRequestHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryRequestHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.MaxReceivedIndex != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.MaxReceivedIndex))
		i--
		dAtA[i] = 0x18
	}
	if m.SequenceNum != 0 {
		i = encodeVarintHeaders(dAtA, i, uint64(m.SequenceNum))
		i--
		dAtA[i] = 0x10
	}
	{
		size, err := m.CallRequestHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *QueryResponseHeaders) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryResponseHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.CallResponseHeaders.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintHeaders(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

func encodeVarintHeaders(dAtA []byte, offset int, v uint64) int {
	offset -= sovHeaders(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *PartitionRequestHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.PartitionID != 0 {
		n += 1 + sovHeaders(uint64(m.PartitionID))
	}
	return n
}

func (m *PartitionResponseHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Index != 0 {
		n += 1 + sovHeaders(uint64(m.Index))
	}
	return n
}

func (m *SessionRequestHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.PartitionRequestHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	if m.SessionID != 0 {
		n += 1 + sovHeaders(uint64(m.SessionID))
	}
	return n
}

func (m *SessionResponseHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.PartitionResponseHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	return n
}

func (m *PrimitiveRequestHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.SessionRequestHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	if m.PrimitiveID != 0 {
		n += 1 + sovHeaders(uint64(m.PrimitiveID))
	}
	return n
}

func (m *PrimitiveResponseHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.SessionResponseHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	return n
}

func (m *CallRequestHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.PrimitiveRequestHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	return n
}

func (m *CallResponseHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.PrimitiveResponseHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	if m.Status != 0 {
		n += 1 + sovHeaders(uint64(m.Status))
	}
	l = len(m.Message)
	if l > 0 {
		n += 1 + l + sovHeaders(uint64(l))
	}
	return n
}

func (m *ProposalRequestHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.CallRequestHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	if m.SequenceNum != 0 {
		n += 1 + sovHeaders(uint64(m.SequenceNum))
	}
	return n
}

func (m *ProposalResponseHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.CallResponseHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	if m.OutputSequenceNum != 0 {
		n += 1 + sovHeaders(uint64(m.OutputSequenceNum))
	}
	return n
}

func (m *QueryRequestHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.CallRequestHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	if m.SequenceNum != 0 {
		n += 1 + sovHeaders(uint64(m.SequenceNum))
	}
	if m.MaxReceivedIndex != 0 {
		n += 1 + sovHeaders(uint64(m.MaxReceivedIndex))
	}
	return n
}

func (m *QueryResponseHeaders) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.CallResponseHeaders.Size()
	n += 1 + l + sovHeaders(uint64(l))
	return n
}

func sovHeaders(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozHeaders(x uint64) (n int) {
	return sovHeaders(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *PartitionRequestHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: PartitionRequestHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PartitionRequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PartitionID", wireType)
			}
			m.PartitionID = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.PartitionID |= PartitionID(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PartitionResponseHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: PartitionResponseHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PartitionResponseHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
			}
			m.Index = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Index |= Index(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SessionRequestHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: SessionRequestHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SessionRequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PartitionRequestHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.PartitionRequestHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType)
			}
			m.SessionID = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SessionID |= SessionID(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SessionResponseHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: SessionResponseHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SessionResponseHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PartitionResponseHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.PartitionResponseHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PrimitiveRequestHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: PrimitiveRequestHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PrimitiveRequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SessionRequestHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SessionRequestHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrimitiveID", wireType)
			}
			m.PrimitiveID = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.PrimitiveID |= PrimitiveID(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PrimitiveResponseHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: PrimitiveResponseHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PrimitiveResponseHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SessionResponseHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SessionResponseHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *CallRequestHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: CallRequestHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: CallRequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrimitiveRequestHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.PrimitiveRequestHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *CallResponseHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: CallResponseHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: CallResponseHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PrimitiveResponseHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.PrimitiveResponseHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
			}
			m.Status = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Status |= CallResponseHeaders_Status(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Message = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ProposalRequestHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: ProposalRequestHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ProposalRequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CallRequestHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.CallRequestHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SequenceNum", wireType)
			}
			m.SequenceNum = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SequenceNum |= SequenceNum(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ProposalResponseHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: ProposalResponseHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ProposalResponseHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CallResponseHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.CallResponseHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field OutputSequenceNum", wireType)
			}
			m.OutputSequenceNum = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.OutputSequenceNum |= SequenceNum(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryRequestHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryRequestHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryRequestHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CallRequestHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.CallRequestHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SequenceNum", wireType)
			}
			m.SequenceNum = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SequenceNum |= SequenceNum(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field MaxReceivedIndex", wireType)
			}
			m.MaxReceivedIndex = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.MaxReceivedIndex |= Index(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryResponseHeaders) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowHeaders
			}
			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)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryResponseHeaders: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryResponseHeaders: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CallResponseHeaders", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthHeaders
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthHeaders
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.CallResponseHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipHeaders(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthHeaders
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipHeaders(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowHeaders
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowHeaders
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthHeaders
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupHeaders
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthHeaders
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthHeaders        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHeaders          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHeaders = fmt.Errorf("proto: unexpected end of group")
)
