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

package v1

import (
	context "context"
	fmt "fmt"
	github_com_atomix_atomix_protocols_rsm_api_v1 "github.com/atomix/atomix/protocols/rsm/api/v1"
	v1 "github.com/atomix/atomix/protocols/rsm/api/v1"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	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 EnterRequest struct {
	Headers     *v1.ProposalRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*EnterInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *EnterRequest) Reset()         { *m = EnterRequest{} }
func (m *EnterRequest) String() string { return proto.CompactTextString(m) }
func (*EnterRequest) ProtoMessage()    {}
func (*EnterRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{0}
}
func (m *EnterRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EnterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EnterRequest.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 *EnterRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EnterRequest.Merge(m, src)
}
func (m *EnterRequest) XXX_Size() int {
	return m.Size()
}
func (m *EnterRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_EnterRequest.DiscardUnknown(m)
}

var xxx_messageInfo_EnterRequest proto.InternalMessageInfo

func (m *EnterRequest) GetHeaders() *v1.ProposalRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type EnterResponse struct {
	Headers      *v1.ProposalResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*EnterOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *EnterResponse) Reset()         { *m = EnterResponse{} }
func (m *EnterResponse) String() string { return proto.CompactTextString(m) }
func (*EnterResponse) ProtoMessage()    {}
func (*EnterResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{1}
}
func (m *EnterResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EnterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EnterResponse.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 *EnterResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EnterResponse.Merge(m, src)
}
func (m *EnterResponse) XXX_Size() int {
	return m.Size()
}
func (m *EnterResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_EnterResponse.DiscardUnknown(m)
}

var xxx_messageInfo_EnterResponse proto.InternalMessageInfo

func (m *EnterResponse) GetHeaders() *v1.ProposalResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type WithdrawRequest struct {
	Headers        *v1.ProposalRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*WithdrawInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *WithdrawRequest) Reset()         { *m = WithdrawRequest{} }
func (m *WithdrawRequest) String() string { return proto.CompactTextString(m) }
func (*WithdrawRequest) ProtoMessage()    {}
func (*WithdrawRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{2}
}
func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WithdrawRequest.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 *WithdrawRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WithdrawRequest.Merge(m, src)
}
func (m *WithdrawRequest) XXX_Size() int {
	return m.Size()
}
func (m *WithdrawRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_WithdrawRequest.DiscardUnknown(m)
}

var xxx_messageInfo_WithdrawRequest proto.InternalMessageInfo

func (m *WithdrawRequest) GetHeaders() *v1.ProposalRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type WithdrawResponse struct {
	Headers         *v1.ProposalResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*WithdrawOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *WithdrawResponse) Reset()         { *m = WithdrawResponse{} }
func (m *WithdrawResponse) String() string { return proto.CompactTextString(m) }
func (*WithdrawResponse) ProtoMessage()    {}
func (*WithdrawResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{3}
}
func (m *WithdrawResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WithdrawResponse.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 *WithdrawResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WithdrawResponse.Merge(m, src)
}
func (m *WithdrawResponse) XXX_Size() int {
	return m.Size()
}
func (m *WithdrawResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_WithdrawResponse.DiscardUnknown(m)
}

var xxx_messageInfo_WithdrawResponse proto.InternalMessageInfo

func (m *WithdrawResponse) GetHeaders() *v1.ProposalResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type AnointRequest struct {
	Headers      *v1.ProposalRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*AnointInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *AnointRequest) Reset()         { *m = AnointRequest{} }
func (m *AnointRequest) String() string { return proto.CompactTextString(m) }
func (*AnointRequest) ProtoMessage()    {}
func (*AnointRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{4}
}
func (m *AnointRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *AnointRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_AnointRequest.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 *AnointRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AnointRequest.Merge(m, src)
}
func (m *AnointRequest) XXX_Size() int {
	return m.Size()
}
func (m *AnointRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_AnointRequest.DiscardUnknown(m)
}

var xxx_messageInfo_AnointRequest proto.InternalMessageInfo

func (m *AnointRequest) GetHeaders() *v1.ProposalRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type AnointResponse struct {
	Headers       *v1.ProposalResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*AnointOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *AnointResponse) Reset()         { *m = AnointResponse{} }
func (m *AnointResponse) String() string { return proto.CompactTextString(m) }
func (*AnointResponse) ProtoMessage()    {}
func (*AnointResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{5}
}
func (m *AnointResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *AnointResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_AnointResponse.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 *AnointResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AnointResponse.Merge(m, src)
}
func (m *AnointResponse) XXX_Size() int {
	return m.Size()
}
func (m *AnointResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_AnointResponse.DiscardUnknown(m)
}

var xxx_messageInfo_AnointResponse proto.InternalMessageInfo

func (m *AnointResponse) GetHeaders() *v1.ProposalResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type PromoteRequest struct {
	Headers       *v1.ProposalRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*PromoteInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *PromoteRequest) Reset()         { *m = PromoteRequest{} }
func (m *PromoteRequest) String() string { return proto.CompactTextString(m) }
func (*PromoteRequest) ProtoMessage()    {}
func (*PromoteRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{6}
}
func (m *PromoteRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PromoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PromoteRequest.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 *PromoteRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PromoteRequest.Merge(m, src)
}
func (m *PromoteRequest) XXX_Size() int {
	return m.Size()
}
func (m *PromoteRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_PromoteRequest.DiscardUnknown(m)
}

var xxx_messageInfo_PromoteRequest proto.InternalMessageInfo

func (m *PromoteRequest) GetHeaders() *v1.ProposalRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type PromoteResponse struct {
	Headers        *v1.ProposalResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*PromoteOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *PromoteResponse) Reset()         { *m = PromoteResponse{} }
func (m *PromoteResponse) String() string { return proto.CompactTextString(m) }
func (*PromoteResponse) ProtoMessage()    {}
func (*PromoteResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{7}
}
func (m *PromoteResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PromoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PromoteResponse.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 *PromoteResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PromoteResponse.Merge(m, src)
}
func (m *PromoteResponse) XXX_Size() int {
	return m.Size()
}
func (m *PromoteResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_PromoteResponse.DiscardUnknown(m)
}

var xxx_messageInfo_PromoteResponse proto.InternalMessageInfo

func (m *PromoteResponse) GetHeaders() *v1.ProposalResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type DemoteRequest struct {
	Headers      *v1.ProposalRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*DemoteInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *DemoteRequest) Reset()         { *m = DemoteRequest{} }
func (m *DemoteRequest) String() string { return proto.CompactTextString(m) }
func (*DemoteRequest) ProtoMessage()    {}
func (*DemoteRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{8}
}
func (m *DemoteRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DemoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DemoteRequest.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 *DemoteRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DemoteRequest.Merge(m, src)
}
func (m *DemoteRequest) XXX_Size() int {
	return m.Size()
}
func (m *DemoteRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_DemoteRequest.DiscardUnknown(m)
}

var xxx_messageInfo_DemoteRequest proto.InternalMessageInfo

func (m *DemoteRequest) GetHeaders() *v1.ProposalRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type DemoteResponse struct {
	Headers       *v1.ProposalResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*DemoteOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *DemoteResponse) Reset()         { *m = DemoteResponse{} }
func (m *DemoteResponse) String() string { return proto.CompactTextString(m) }
func (*DemoteResponse) ProtoMessage()    {}
func (*DemoteResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{9}
}
func (m *DemoteResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DemoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DemoteResponse.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 *DemoteResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DemoteResponse.Merge(m, src)
}
func (m *DemoteResponse) XXX_Size() int {
	return m.Size()
}
func (m *DemoteResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_DemoteResponse.DiscardUnknown(m)
}

var xxx_messageInfo_DemoteResponse proto.InternalMessageInfo

func (m *DemoteResponse) GetHeaders() *v1.ProposalResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type EvictRequest struct {
	Headers     *v1.ProposalRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*EvictInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *EvictRequest) Reset()         { *m = EvictRequest{} }
func (m *EvictRequest) String() string { return proto.CompactTextString(m) }
func (*EvictRequest) ProtoMessage()    {}
func (*EvictRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{10}
}
func (m *EvictRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EvictRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EvictRequest.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 *EvictRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EvictRequest.Merge(m, src)
}
func (m *EvictRequest) XXX_Size() int {
	return m.Size()
}
func (m *EvictRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_EvictRequest.DiscardUnknown(m)
}

var xxx_messageInfo_EvictRequest proto.InternalMessageInfo

func (m *EvictRequest) GetHeaders() *v1.ProposalRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type EvictResponse struct {
	Headers      *v1.ProposalResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*EvictOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *EvictResponse) Reset()         { *m = EvictResponse{} }
func (m *EvictResponse) String() string { return proto.CompactTextString(m) }
func (*EvictResponse) ProtoMessage()    {}
func (*EvictResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{11}
}
func (m *EvictResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EvictResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EvictResponse.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 *EvictResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EvictResponse.Merge(m, src)
}
func (m *EvictResponse) XXX_Size() int {
	return m.Size()
}
func (m *EvictResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_EvictResponse.DiscardUnknown(m)
}

var xxx_messageInfo_EvictResponse proto.InternalMessageInfo

func (m *EvictResponse) GetHeaders() *v1.ProposalResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type GetTermRequest struct {
	Headers       *v1.QueryRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*GetTermInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *GetTermRequest) Reset()         { *m = GetTermRequest{} }
func (m *GetTermRequest) String() string { return proto.CompactTextString(m) }
func (*GetTermRequest) ProtoMessage()    {}
func (*GetTermRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{12}
}
func (m *GetTermRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GetTermRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GetTermRequest.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 *GetTermRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetTermRequest.Merge(m, src)
}
func (m *GetTermRequest) XXX_Size() int {
	return m.Size()
}
func (m *GetTermRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_GetTermRequest.DiscardUnknown(m)
}

var xxx_messageInfo_GetTermRequest proto.InternalMessageInfo

func (m *GetTermRequest) GetHeaders() *v1.QueryRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type GetTermResponse struct {
	Headers        *v1.QueryResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*GetTermOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *GetTermResponse) Reset()         { *m = GetTermResponse{} }
func (m *GetTermResponse) String() string { return proto.CompactTextString(m) }
func (*GetTermResponse) ProtoMessage()    {}
func (*GetTermResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{13}
}
func (m *GetTermResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GetTermResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GetTermResponse.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 *GetTermResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetTermResponse.Merge(m, src)
}
func (m *GetTermResponse) XXX_Size() int {
	return m.Size()
}
func (m *GetTermResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_GetTermResponse.DiscardUnknown(m)
}

var xxx_messageInfo_GetTermResponse proto.InternalMessageInfo

func (m *GetTermResponse) GetHeaders() *v1.QueryResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type WatchRequest struct {
	Headers     *v1.QueryRequestHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*WatchInput `protobuf:"bytes,2,opt,name=input,proto3,embedded=input" json:"input,omitempty"`
}

func (m *WatchRequest) Reset()         { *m = WatchRequest{} }
func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
func (*WatchRequest) ProtoMessage()    {}
func (*WatchRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{14}
}
func (m *WatchRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WatchRequest.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 *WatchRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WatchRequest.Merge(m, src)
}
func (m *WatchRequest) XXX_Size() int {
	return m.Size()
}
func (m *WatchRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_WatchRequest.DiscardUnknown(m)
}

var xxx_messageInfo_WatchRequest proto.InternalMessageInfo

func (m *WatchRequest) GetHeaders() *v1.QueryRequestHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type WatchResponse struct {
	Headers      *v1.QueryResponseHeaders `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"`
	*WatchOutput `protobuf:"bytes,2,opt,name=output,proto3,embedded=output" json:"output,omitempty"`
}

func (m *WatchResponse) Reset()         { *m = WatchResponse{} }
func (m *WatchResponse) String() string { return proto.CompactTextString(m) }
func (*WatchResponse) ProtoMessage()    {}
func (*WatchResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{15}
}
func (m *WatchResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WatchResponse.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 *WatchResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WatchResponse.Merge(m, src)
}
func (m *WatchResponse) XXX_Size() int {
	return m.Size()
}
func (m *WatchResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_WatchResponse.DiscardUnknown(m)
}

var xxx_messageInfo_WatchResponse proto.InternalMessageInfo

func (m *WatchResponse) GetHeaders() *v1.QueryResponseHeaders {
	if m != nil {
		return m.Headers
	}
	return nil
}

type LeaderElectionSnapshot struct {
	Term       github_com_atomix_atomix_protocols_rsm_api_v1.Index `protobuf:"varint,1,opt,name=term,proto3,casttype=github.com/atomix/atomix/protocols/rsm/api/v1.Index" json:"term,omitempty"`
	Leader     *LeaderElectionCandidate                            `protobuf:"bytes,2,opt,name=leader,proto3" json:"leader,omitempty"`
	Candidates []LeaderElectionCandidate                           `protobuf:"bytes,3,rep,name=candidates,proto3" json:"candidates"`
}

func (m *LeaderElectionSnapshot) Reset()         { *m = LeaderElectionSnapshot{} }
func (m *LeaderElectionSnapshot) String() string { return proto.CompactTextString(m) }
func (*LeaderElectionSnapshot) ProtoMessage()    {}
func (*LeaderElectionSnapshot) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{16}
}
func (m *LeaderElectionSnapshot) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *LeaderElectionSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_LeaderElectionSnapshot.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 *LeaderElectionSnapshot) XXX_Merge(src proto.Message) {
	xxx_messageInfo_LeaderElectionSnapshot.Merge(m, src)
}
func (m *LeaderElectionSnapshot) XXX_Size() int {
	return m.Size()
}
func (m *LeaderElectionSnapshot) XXX_DiscardUnknown() {
	xxx_messageInfo_LeaderElectionSnapshot.DiscardUnknown(m)
}

var xxx_messageInfo_LeaderElectionSnapshot proto.InternalMessageInfo

func (m *LeaderElectionSnapshot) GetTerm() github_com_atomix_atomix_protocols_rsm_api_v1.Index {
	if m != nil {
		return m.Term
	}
	return 0
}

func (m *LeaderElectionSnapshot) GetLeader() *LeaderElectionCandidate {
	if m != nil {
		return m.Leader
	}
	return nil
}

func (m *LeaderElectionSnapshot) GetCandidates() []LeaderElectionCandidate {
	if m != nil {
		return m.Candidates
	}
	return nil
}

type LeaderElectionCandidate struct {
	Name      string                                                  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	SessionID github_com_atomix_atomix_protocols_rsm_api_v1.SessionID `protobuf:"varint,2,opt,name=session_id,json=sessionId,proto3,casttype=github.com/atomix/atomix/protocols/rsm/api/v1.SessionID" json:"session_id,omitempty"`
}

func (m *LeaderElectionCandidate) Reset()         { *m = LeaderElectionCandidate{} }
func (m *LeaderElectionCandidate) String() string { return proto.CompactTextString(m) }
func (*LeaderElectionCandidate) ProtoMessage()    {}
func (*LeaderElectionCandidate) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{17}
}
func (m *LeaderElectionCandidate) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *LeaderElectionCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_LeaderElectionCandidate.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 *LeaderElectionCandidate) XXX_Merge(src proto.Message) {
	xxx_messageInfo_LeaderElectionCandidate.Merge(m, src)
}
func (m *LeaderElectionCandidate) XXX_Size() int {
	return m.Size()
}
func (m *LeaderElectionCandidate) XXX_DiscardUnknown() {
	xxx_messageInfo_LeaderElectionCandidate.DiscardUnknown(m)
}

var xxx_messageInfo_LeaderElectionCandidate proto.InternalMessageInfo

func (m *LeaderElectionCandidate) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

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

type LeaderElectionInput struct {
	// Types that are valid to be assigned to Input:
	//	*LeaderElectionInput_Enter
	//	*LeaderElectionInput_Withdraw
	//	*LeaderElectionInput_Anoint
	//	*LeaderElectionInput_Promote
	//	*LeaderElectionInput_Demote
	//	*LeaderElectionInput_Evict
	//	*LeaderElectionInput_GetTerm
	//	*LeaderElectionInput_Watch
	Input isLeaderElectionInput_Input `protobuf_oneof:"input"`
}

func (m *LeaderElectionInput) Reset()         { *m = LeaderElectionInput{} }
func (m *LeaderElectionInput) String() string { return proto.CompactTextString(m) }
func (*LeaderElectionInput) ProtoMessage()    {}
func (*LeaderElectionInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{18}
}
func (m *LeaderElectionInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *LeaderElectionInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_LeaderElectionInput.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 *LeaderElectionInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_LeaderElectionInput.Merge(m, src)
}
func (m *LeaderElectionInput) XXX_Size() int {
	return m.Size()
}
func (m *LeaderElectionInput) XXX_DiscardUnknown() {
	xxx_messageInfo_LeaderElectionInput.DiscardUnknown(m)
}

var xxx_messageInfo_LeaderElectionInput proto.InternalMessageInfo

type isLeaderElectionInput_Input interface {
	isLeaderElectionInput_Input()
	MarshalTo([]byte) (int, error)
	Size() int
}

type LeaderElectionInput_Enter struct {
	Enter *EnterInput `protobuf:"bytes,1,opt,name=enter,proto3,oneof" json:"enter,omitempty"`
}
type LeaderElectionInput_Withdraw struct {
	Withdraw *WithdrawInput `protobuf:"bytes,2,opt,name=withdraw,proto3,oneof" json:"withdraw,omitempty"`
}
type LeaderElectionInput_Anoint struct {
	Anoint *AnointInput `protobuf:"bytes,3,opt,name=anoint,proto3,oneof" json:"anoint,omitempty"`
}
type LeaderElectionInput_Promote struct {
	Promote *PromoteInput `protobuf:"bytes,4,opt,name=promote,proto3,oneof" json:"promote,omitempty"`
}
type LeaderElectionInput_Demote struct {
	Demote *DemoteInput `protobuf:"bytes,8,opt,name=demote,proto3,oneof" json:"demote,omitempty"`
}
type LeaderElectionInput_Evict struct {
	Evict *EvictInput `protobuf:"bytes,5,opt,name=evict,proto3,oneof" json:"evict,omitempty"`
}
type LeaderElectionInput_GetTerm struct {
	GetTerm *GetTermInput `protobuf:"bytes,6,opt,name=get_term,json=getTerm,proto3,oneof" json:"get_term,omitempty"`
}
type LeaderElectionInput_Watch struct {
	Watch *WatchInput `protobuf:"bytes,7,opt,name=watch,proto3,oneof" json:"watch,omitempty"`
}

func (*LeaderElectionInput_Enter) isLeaderElectionInput_Input()    {}
func (*LeaderElectionInput_Withdraw) isLeaderElectionInput_Input() {}
func (*LeaderElectionInput_Anoint) isLeaderElectionInput_Input()   {}
func (*LeaderElectionInput_Promote) isLeaderElectionInput_Input()  {}
func (*LeaderElectionInput_Demote) isLeaderElectionInput_Input()   {}
func (*LeaderElectionInput_Evict) isLeaderElectionInput_Input()    {}
func (*LeaderElectionInput_GetTerm) isLeaderElectionInput_Input()  {}
func (*LeaderElectionInput_Watch) isLeaderElectionInput_Input()    {}

func (m *LeaderElectionInput) GetInput() isLeaderElectionInput_Input {
	if m != nil {
		return m.Input
	}
	return nil
}

func (m *LeaderElectionInput) GetEnter() *EnterInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Enter); ok {
		return x.Enter
	}
	return nil
}

func (m *LeaderElectionInput) GetWithdraw() *WithdrawInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Withdraw); ok {
		return x.Withdraw
	}
	return nil
}

func (m *LeaderElectionInput) GetAnoint() *AnointInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Anoint); ok {
		return x.Anoint
	}
	return nil
}

func (m *LeaderElectionInput) GetPromote() *PromoteInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Promote); ok {
		return x.Promote
	}
	return nil
}

func (m *LeaderElectionInput) GetDemote() *DemoteInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Demote); ok {
		return x.Demote
	}
	return nil
}

func (m *LeaderElectionInput) GetEvict() *EvictInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Evict); ok {
		return x.Evict
	}
	return nil
}

func (m *LeaderElectionInput) GetGetTerm() *GetTermInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_GetTerm); ok {
		return x.GetTerm
	}
	return nil
}

func (m *LeaderElectionInput) GetWatch() *WatchInput {
	if x, ok := m.GetInput().(*LeaderElectionInput_Watch); ok {
		return x.Watch
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*LeaderElectionInput) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*LeaderElectionInput_Enter)(nil),
		(*LeaderElectionInput_Withdraw)(nil),
		(*LeaderElectionInput_Anoint)(nil),
		(*LeaderElectionInput_Promote)(nil),
		(*LeaderElectionInput_Demote)(nil),
		(*LeaderElectionInput_Evict)(nil),
		(*LeaderElectionInput_GetTerm)(nil),
		(*LeaderElectionInput_Watch)(nil),
	}
}

type LeaderElectionOutput struct {
	// Types that are valid to be assigned to Output:
	//	*LeaderElectionOutput_Enter
	//	*LeaderElectionOutput_Withdraw
	//	*LeaderElectionOutput_Anoint
	//	*LeaderElectionOutput_Promote
	//	*LeaderElectionOutput_Demote
	//	*LeaderElectionOutput_Evict
	//	*LeaderElectionOutput_GetTerm
	//	*LeaderElectionOutput_Watch
	Output isLeaderElectionOutput_Output `protobuf_oneof:"output"`
}

func (m *LeaderElectionOutput) Reset()         { *m = LeaderElectionOutput{} }
func (m *LeaderElectionOutput) String() string { return proto.CompactTextString(m) }
func (*LeaderElectionOutput) ProtoMessage()    {}
func (*LeaderElectionOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{19}
}
func (m *LeaderElectionOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *LeaderElectionOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_LeaderElectionOutput.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 *LeaderElectionOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_LeaderElectionOutput.Merge(m, src)
}
func (m *LeaderElectionOutput) XXX_Size() int {
	return m.Size()
}
func (m *LeaderElectionOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_LeaderElectionOutput.DiscardUnknown(m)
}

var xxx_messageInfo_LeaderElectionOutput proto.InternalMessageInfo

type isLeaderElectionOutput_Output interface {
	isLeaderElectionOutput_Output()
	MarshalTo([]byte) (int, error)
	Size() int
}

type LeaderElectionOutput_Enter struct {
	Enter *EnterOutput `protobuf:"bytes,1,opt,name=enter,proto3,oneof" json:"enter,omitempty"`
}
type LeaderElectionOutput_Withdraw struct {
	Withdraw *WithdrawOutput `protobuf:"bytes,2,opt,name=withdraw,proto3,oneof" json:"withdraw,omitempty"`
}
type LeaderElectionOutput_Anoint struct {
	Anoint *AnointOutput `protobuf:"bytes,3,opt,name=anoint,proto3,oneof" json:"anoint,omitempty"`
}
type LeaderElectionOutput_Promote struct {
	Promote *PromoteOutput `protobuf:"bytes,4,opt,name=promote,proto3,oneof" json:"promote,omitempty"`
}
type LeaderElectionOutput_Demote struct {
	Demote *DemoteOutput `protobuf:"bytes,8,opt,name=demote,proto3,oneof" json:"demote,omitempty"`
}
type LeaderElectionOutput_Evict struct {
	Evict *EvictOutput `protobuf:"bytes,5,opt,name=evict,proto3,oneof" json:"evict,omitempty"`
}
type LeaderElectionOutput_GetTerm struct {
	GetTerm *GetTermOutput `protobuf:"bytes,6,opt,name=get_term,json=getTerm,proto3,oneof" json:"get_term,omitempty"`
}
type LeaderElectionOutput_Watch struct {
	Watch *WatchOutput `protobuf:"bytes,7,opt,name=watch,proto3,oneof" json:"watch,omitempty"`
}

func (*LeaderElectionOutput_Enter) isLeaderElectionOutput_Output()    {}
func (*LeaderElectionOutput_Withdraw) isLeaderElectionOutput_Output() {}
func (*LeaderElectionOutput_Anoint) isLeaderElectionOutput_Output()   {}
func (*LeaderElectionOutput_Promote) isLeaderElectionOutput_Output()  {}
func (*LeaderElectionOutput_Demote) isLeaderElectionOutput_Output()   {}
func (*LeaderElectionOutput_Evict) isLeaderElectionOutput_Output()    {}
func (*LeaderElectionOutput_GetTerm) isLeaderElectionOutput_Output()  {}
func (*LeaderElectionOutput_Watch) isLeaderElectionOutput_Output()    {}

func (m *LeaderElectionOutput) GetOutput() isLeaderElectionOutput_Output {
	if m != nil {
		return m.Output
	}
	return nil
}

func (m *LeaderElectionOutput) GetEnter() *EnterOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Enter); ok {
		return x.Enter
	}
	return nil
}

func (m *LeaderElectionOutput) GetWithdraw() *WithdrawOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Withdraw); ok {
		return x.Withdraw
	}
	return nil
}

func (m *LeaderElectionOutput) GetAnoint() *AnointOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Anoint); ok {
		return x.Anoint
	}
	return nil
}

func (m *LeaderElectionOutput) GetPromote() *PromoteOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Promote); ok {
		return x.Promote
	}
	return nil
}

func (m *LeaderElectionOutput) GetDemote() *DemoteOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Demote); ok {
		return x.Demote
	}
	return nil
}

func (m *LeaderElectionOutput) GetEvict() *EvictOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Evict); ok {
		return x.Evict
	}
	return nil
}

func (m *LeaderElectionOutput) GetGetTerm() *GetTermOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_GetTerm); ok {
		return x.GetTerm
	}
	return nil
}

func (m *LeaderElectionOutput) GetWatch() *WatchOutput {
	if x, ok := m.GetOutput().(*LeaderElectionOutput_Watch); ok {
		return x.Watch
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*LeaderElectionOutput) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*LeaderElectionOutput_Enter)(nil),
		(*LeaderElectionOutput_Withdraw)(nil),
		(*LeaderElectionOutput_Anoint)(nil),
		(*LeaderElectionOutput_Promote)(nil),
		(*LeaderElectionOutput_Demote)(nil),
		(*LeaderElectionOutput_Evict)(nil),
		(*LeaderElectionOutput_GetTerm)(nil),
		(*LeaderElectionOutput_Watch)(nil),
	}
}

type EnterInput struct {
	Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
}

func (m *EnterInput) Reset()         { *m = EnterInput{} }
func (m *EnterInput) String() string { return proto.CompactTextString(m) }
func (*EnterInput) ProtoMessage()    {}
func (*EnterInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{20}
}
func (m *EnterInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EnterInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EnterInput.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 *EnterInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EnterInput.Merge(m, src)
}
func (m *EnterInput) XXX_Size() int {
	return m.Size()
}
func (m *EnterInput) XXX_DiscardUnknown() {
	xxx_messageInfo_EnterInput.DiscardUnknown(m)
}

var xxx_messageInfo_EnterInput proto.InternalMessageInfo

func (m *EnterInput) GetCandidate() string {
	if m != nil {
		return m.Candidate
	}
	return ""
}

type EnterOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *EnterOutput) Reset()         { *m = EnterOutput{} }
func (m *EnterOutput) String() string { return proto.CompactTextString(m) }
func (*EnterOutput) ProtoMessage()    {}
func (*EnterOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{21}
}
func (m *EnterOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EnterOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EnterOutput.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 *EnterOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EnterOutput.Merge(m, src)
}
func (m *EnterOutput) XXX_Size() int {
	return m.Size()
}
func (m *EnterOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_EnterOutput.DiscardUnknown(m)
}

var xxx_messageInfo_EnterOutput proto.InternalMessageInfo

func (m *EnterOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type WithdrawInput struct {
	Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
}

func (m *WithdrawInput) Reset()         { *m = WithdrawInput{} }
func (m *WithdrawInput) String() string { return proto.CompactTextString(m) }
func (*WithdrawInput) ProtoMessage()    {}
func (*WithdrawInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{22}
}
func (m *WithdrawInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WithdrawInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WithdrawInput.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 *WithdrawInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WithdrawInput.Merge(m, src)
}
func (m *WithdrawInput) XXX_Size() int {
	return m.Size()
}
func (m *WithdrawInput) XXX_DiscardUnknown() {
	xxx_messageInfo_WithdrawInput.DiscardUnknown(m)
}

var xxx_messageInfo_WithdrawInput proto.InternalMessageInfo

func (m *WithdrawInput) GetCandidate() string {
	if m != nil {
		return m.Candidate
	}
	return ""
}

type WithdrawOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *WithdrawOutput) Reset()         { *m = WithdrawOutput{} }
func (m *WithdrawOutput) String() string { return proto.CompactTextString(m) }
func (*WithdrawOutput) ProtoMessage()    {}
func (*WithdrawOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{23}
}
func (m *WithdrawOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WithdrawOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WithdrawOutput.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 *WithdrawOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WithdrawOutput.Merge(m, src)
}
func (m *WithdrawOutput) XXX_Size() int {
	return m.Size()
}
func (m *WithdrawOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_WithdrawOutput.DiscardUnknown(m)
}

var xxx_messageInfo_WithdrawOutput proto.InternalMessageInfo

func (m *WithdrawOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type AnointInput struct {
	Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
}

func (m *AnointInput) Reset()         { *m = AnointInput{} }
func (m *AnointInput) String() string { return proto.CompactTextString(m) }
func (*AnointInput) ProtoMessage()    {}
func (*AnointInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{24}
}
func (m *AnointInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *AnointInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_AnointInput.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 *AnointInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AnointInput.Merge(m, src)
}
func (m *AnointInput) XXX_Size() int {
	return m.Size()
}
func (m *AnointInput) XXX_DiscardUnknown() {
	xxx_messageInfo_AnointInput.DiscardUnknown(m)
}

var xxx_messageInfo_AnointInput proto.InternalMessageInfo

func (m *AnointInput) GetCandidate() string {
	if m != nil {
		return m.Candidate
	}
	return ""
}

type AnointOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *AnointOutput) Reset()         { *m = AnointOutput{} }
func (m *AnointOutput) String() string { return proto.CompactTextString(m) }
func (*AnointOutput) ProtoMessage()    {}
func (*AnointOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{25}
}
func (m *AnointOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *AnointOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_AnointOutput.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 *AnointOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AnointOutput.Merge(m, src)
}
func (m *AnointOutput) XXX_Size() int {
	return m.Size()
}
func (m *AnointOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_AnointOutput.DiscardUnknown(m)
}

var xxx_messageInfo_AnointOutput proto.InternalMessageInfo

func (m *AnointOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type PromoteInput struct {
	Candidate string `protobuf:"bytes,2,opt,name=candidate,proto3" json:"candidate,omitempty"`
}

func (m *PromoteInput) Reset()         { *m = PromoteInput{} }
func (m *PromoteInput) String() string { return proto.CompactTextString(m) }
func (*PromoteInput) ProtoMessage()    {}
func (*PromoteInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{26}
}
func (m *PromoteInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PromoteInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PromoteInput.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 *PromoteInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PromoteInput.Merge(m, src)
}
func (m *PromoteInput) XXX_Size() int {
	return m.Size()
}
func (m *PromoteInput) XXX_DiscardUnknown() {
	xxx_messageInfo_PromoteInput.DiscardUnknown(m)
}

var xxx_messageInfo_PromoteInput proto.InternalMessageInfo

func (m *PromoteInput) GetCandidate() string {
	if m != nil {
		return m.Candidate
	}
	return ""
}

type PromoteOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *PromoteOutput) Reset()         { *m = PromoteOutput{} }
func (m *PromoteOutput) String() string { return proto.CompactTextString(m) }
func (*PromoteOutput) ProtoMessage()    {}
func (*PromoteOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{27}
}
func (m *PromoteOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *PromoteOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_PromoteOutput.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 *PromoteOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_PromoteOutput.Merge(m, src)
}
func (m *PromoteOutput) XXX_Size() int {
	return m.Size()
}
func (m *PromoteOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_PromoteOutput.DiscardUnknown(m)
}

var xxx_messageInfo_PromoteOutput proto.InternalMessageInfo

func (m *PromoteOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type DemoteInput struct {
	Candidate string `protobuf:"bytes,2,opt,name=candidate,proto3" json:"candidate,omitempty"`
}

func (m *DemoteInput) Reset()         { *m = DemoteInput{} }
func (m *DemoteInput) String() string { return proto.CompactTextString(m) }
func (*DemoteInput) ProtoMessage()    {}
func (*DemoteInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{28}
}
func (m *DemoteInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DemoteInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DemoteInput.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 *DemoteInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DemoteInput.Merge(m, src)
}
func (m *DemoteInput) XXX_Size() int {
	return m.Size()
}
func (m *DemoteInput) XXX_DiscardUnknown() {
	xxx_messageInfo_DemoteInput.DiscardUnknown(m)
}

var xxx_messageInfo_DemoteInput proto.InternalMessageInfo

func (m *DemoteInput) GetCandidate() string {
	if m != nil {
		return m.Candidate
	}
	return ""
}

type DemoteOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *DemoteOutput) Reset()         { *m = DemoteOutput{} }
func (m *DemoteOutput) String() string { return proto.CompactTextString(m) }
func (*DemoteOutput) ProtoMessage()    {}
func (*DemoteOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{29}
}
func (m *DemoteOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *DemoteOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_DemoteOutput.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 *DemoteOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_DemoteOutput.Merge(m, src)
}
func (m *DemoteOutput) XXX_Size() int {
	return m.Size()
}
func (m *DemoteOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_DemoteOutput.DiscardUnknown(m)
}

var xxx_messageInfo_DemoteOutput proto.InternalMessageInfo

func (m *DemoteOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type EvictInput struct {
	Candidate string `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
}

func (m *EvictInput) Reset()         { *m = EvictInput{} }
func (m *EvictInput) String() string { return proto.CompactTextString(m) }
func (*EvictInput) ProtoMessage()    {}
func (*EvictInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{30}
}
func (m *EvictInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EvictInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EvictInput.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 *EvictInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EvictInput.Merge(m, src)
}
func (m *EvictInput) XXX_Size() int {
	return m.Size()
}
func (m *EvictInput) XXX_DiscardUnknown() {
	xxx_messageInfo_EvictInput.DiscardUnknown(m)
}

var xxx_messageInfo_EvictInput proto.InternalMessageInfo

func (m *EvictInput) GetCandidate() string {
	if m != nil {
		return m.Candidate
	}
	return ""
}

type EvictOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *EvictOutput) Reset()         { *m = EvictOutput{} }
func (m *EvictOutput) String() string { return proto.CompactTextString(m) }
func (*EvictOutput) ProtoMessage()    {}
func (*EvictOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{31}
}
func (m *EvictOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *EvictOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_EvictOutput.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 *EvictOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_EvictOutput.Merge(m, src)
}
func (m *EvictOutput) XXX_Size() int {
	return m.Size()
}
func (m *EvictOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_EvictOutput.DiscardUnknown(m)
}

var xxx_messageInfo_EvictOutput proto.InternalMessageInfo

func (m *EvictOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type GetTermInput struct {
}

func (m *GetTermInput) Reset()         { *m = GetTermInput{} }
func (m *GetTermInput) String() string { return proto.CompactTextString(m) }
func (*GetTermInput) ProtoMessage()    {}
func (*GetTermInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{32}
}
func (m *GetTermInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GetTermInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GetTermInput.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 *GetTermInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetTermInput.Merge(m, src)
}
func (m *GetTermInput) XXX_Size() int {
	return m.Size()
}
func (m *GetTermInput) XXX_DiscardUnknown() {
	xxx_messageInfo_GetTermInput.DiscardUnknown(m)
}

var xxx_messageInfo_GetTermInput proto.InternalMessageInfo

type GetTermOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *GetTermOutput) Reset()         { *m = GetTermOutput{} }
func (m *GetTermOutput) String() string { return proto.CompactTextString(m) }
func (*GetTermOutput) ProtoMessage()    {}
func (*GetTermOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{33}
}
func (m *GetTermOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GetTermOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GetTermOutput.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 *GetTermOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GetTermOutput.Merge(m, src)
}
func (m *GetTermOutput) XXX_Size() int {
	return m.Size()
}
func (m *GetTermOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_GetTermOutput.DiscardUnknown(m)
}

var xxx_messageInfo_GetTermOutput proto.InternalMessageInfo

func (m *GetTermOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type WatchInput struct {
}

func (m *WatchInput) Reset()         { *m = WatchInput{} }
func (m *WatchInput) String() string { return proto.CompactTextString(m) }
func (*WatchInput) ProtoMessage()    {}
func (*WatchInput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{34}
}
func (m *WatchInput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WatchInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WatchInput.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 *WatchInput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WatchInput.Merge(m, src)
}
func (m *WatchInput) XXX_Size() int {
	return m.Size()
}
func (m *WatchInput) XXX_DiscardUnknown() {
	xxx_messageInfo_WatchInput.DiscardUnknown(m)
}

var xxx_messageInfo_WatchInput proto.InternalMessageInfo

type WatchOutput struct {
	Term Term `protobuf:"bytes,1,opt,name=term,proto3" json:"term"`
}

func (m *WatchOutput) Reset()         { *m = WatchOutput{} }
func (m *WatchOutput) String() string { return proto.CompactTextString(m) }
func (*WatchOutput) ProtoMessage()    {}
func (*WatchOutput) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{35}
}
func (m *WatchOutput) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *WatchOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_WatchOutput.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 *WatchOutput) XXX_Merge(src proto.Message) {
	xxx_messageInfo_WatchOutput.Merge(m, src)
}
func (m *WatchOutput) XXX_Size() int {
	return m.Size()
}
func (m *WatchOutput) XXX_DiscardUnknown() {
	xxx_messageInfo_WatchOutput.DiscardUnknown(m)
}

var xxx_messageInfo_WatchOutput proto.InternalMessageInfo

func (m *WatchOutput) GetTerm() Term {
	if m != nil {
		return m.Term
	}
	return Term{}
}

type Term struct {
	Leader     string                                              `protobuf:"bytes,1,opt,name=leader,proto3" json:"leader,omitempty"`
	Candidates []string                                            `protobuf:"bytes,2,rep,name=candidates,proto3" json:"candidates,omitempty"`
	Index      github_com_atomix_atomix_protocols_rsm_api_v1.Index `protobuf:"varint,3,opt,name=index,proto3,casttype=github.com/atomix/atomix/protocols/rsm/api/v1.Index" json:"index,omitempty"`
}

func (m *Term) Reset()         { *m = Term{} }
func (m *Term) String() string { return proto.CompactTextString(m) }
func (*Term) ProtoMessage()    {}
func (*Term) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2de2df50622c3d, []int{36}
}
func (m *Term) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Term) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Term.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 *Term) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Term.Merge(m, src)
}
func (m *Term) XXX_Size() int {
	return m.Size()
}
func (m *Term) XXX_DiscardUnknown() {
	xxx_messageInfo_Term.DiscardUnknown(m)
}

var xxx_messageInfo_Term proto.InternalMessageInfo

func (m *Term) GetLeader() string {
	if m != nil {
		return m.Leader
	}
	return ""
}

func (m *Term) GetCandidates() []string {
	if m != nil {
		return m.Candidates
	}
	return nil
}

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

func init() {
	proto.RegisterType((*EnterRequest)(nil), "atomix.protocols.rsm.election.v1.EnterRequest")
	proto.RegisterType((*EnterResponse)(nil), "atomix.protocols.rsm.election.v1.EnterResponse")
	proto.RegisterType((*WithdrawRequest)(nil), "atomix.protocols.rsm.election.v1.WithdrawRequest")
	proto.RegisterType((*WithdrawResponse)(nil), "atomix.protocols.rsm.election.v1.WithdrawResponse")
	proto.RegisterType((*AnointRequest)(nil), "atomix.protocols.rsm.election.v1.AnointRequest")
	proto.RegisterType((*AnointResponse)(nil), "atomix.protocols.rsm.election.v1.AnointResponse")
	proto.RegisterType((*PromoteRequest)(nil), "atomix.protocols.rsm.election.v1.PromoteRequest")
	proto.RegisterType((*PromoteResponse)(nil), "atomix.protocols.rsm.election.v1.PromoteResponse")
	proto.RegisterType((*DemoteRequest)(nil), "atomix.protocols.rsm.election.v1.DemoteRequest")
	proto.RegisterType((*DemoteResponse)(nil), "atomix.protocols.rsm.election.v1.DemoteResponse")
	proto.RegisterType((*EvictRequest)(nil), "atomix.protocols.rsm.election.v1.EvictRequest")
	proto.RegisterType((*EvictResponse)(nil), "atomix.protocols.rsm.election.v1.EvictResponse")
	proto.RegisterType((*GetTermRequest)(nil), "atomix.protocols.rsm.election.v1.GetTermRequest")
	proto.RegisterType((*GetTermResponse)(nil), "atomix.protocols.rsm.election.v1.GetTermResponse")
	proto.RegisterType((*WatchRequest)(nil), "atomix.protocols.rsm.election.v1.WatchRequest")
	proto.RegisterType((*WatchResponse)(nil), "atomix.protocols.rsm.election.v1.WatchResponse")
	proto.RegisterType((*LeaderElectionSnapshot)(nil), "atomix.protocols.rsm.election.v1.LeaderElectionSnapshot")
	proto.RegisterType((*LeaderElectionCandidate)(nil), "atomix.protocols.rsm.election.v1.LeaderElectionCandidate")
	proto.RegisterType((*LeaderElectionInput)(nil), "atomix.protocols.rsm.election.v1.LeaderElectionInput")
	proto.RegisterType((*LeaderElectionOutput)(nil), "atomix.protocols.rsm.election.v1.LeaderElectionOutput")
	proto.RegisterType((*EnterInput)(nil), "atomix.protocols.rsm.election.v1.EnterInput")
	proto.RegisterType((*EnterOutput)(nil), "atomix.protocols.rsm.election.v1.EnterOutput")
	proto.RegisterType((*WithdrawInput)(nil), "atomix.protocols.rsm.election.v1.WithdrawInput")
	proto.RegisterType((*WithdrawOutput)(nil), "atomix.protocols.rsm.election.v1.WithdrawOutput")
	proto.RegisterType((*AnointInput)(nil), "atomix.protocols.rsm.election.v1.AnointInput")
	proto.RegisterType((*AnointOutput)(nil), "atomix.protocols.rsm.election.v1.AnointOutput")
	proto.RegisterType((*PromoteInput)(nil), "atomix.protocols.rsm.election.v1.PromoteInput")
	proto.RegisterType((*PromoteOutput)(nil), "atomix.protocols.rsm.election.v1.PromoteOutput")
	proto.RegisterType((*DemoteInput)(nil), "atomix.protocols.rsm.election.v1.DemoteInput")
	proto.RegisterType((*DemoteOutput)(nil), "atomix.protocols.rsm.election.v1.DemoteOutput")
	proto.RegisterType((*EvictInput)(nil), "atomix.protocols.rsm.election.v1.EvictInput")
	proto.RegisterType((*EvictOutput)(nil), "atomix.protocols.rsm.election.v1.EvictOutput")
	proto.RegisterType((*GetTermInput)(nil), "atomix.protocols.rsm.election.v1.GetTermInput")
	proto.RegisterType((*GetTermOutput)(nil), "atomix.protocols.rsm.election.v1.GetTermOutput")
	proto.RegisterType((*WatchInput)(nil), "atomix.protocols.rsm.election.v1.WatchInput")
	proto.RegisterType((*WatchOutput)(nil), "atomix.protocols.rsm.election.v1.WatchOutput")
	proto.RegisterType((*Term)(nil), "atomix.protocols.rsm.election.v1.Term")
}

func init() { proto.RegisterFile("election/v1/election.proto", fileDescriptor_1e2de2df50622c3d) }

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

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// LeaderElectionClient is the client API for LeaderElection service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type LeaderElectionClient interface {
	// Enter enters the leader election
	Enter(ctx context.Context, in *EnterRequest, opts ...grpc.CallOption) (*EnterResponse, error)
	// Withdraw withdraws a candidate from the leader election
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error)
	// Anoint anoints a candidate leader
	Anoint(ctx context.Context, in *AnointRequest, opts ...grpc.CallOption) (*AnointResponse, error)
	// Promote promotes a candidate
	Promote(ctx context.Context, in *PromoteRequest, opts ...grpc.CallOption) (*PromoteResponse, error)
	// Demote demotes a candidate
	Demote(ctx context.Context, in *DemoteRequest, opts ...grpc.CallOption) (*DemoteResponse, error)
	// Evict evicts a candidate from the election
	Evict(ctx context.Context, in *EvictRequest, opts ...grpc.CallOption) (*EvictResponse, error)
	// GetTerm gets the current leadership term
	GetTerm(ctx context.Context, in *GetTermRequest, opts ...grpc.CallOption) (*GetTermResponse, error)
	// Watch watches the election for events
	Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (LeaderElection_WatchClient, error)
}

type leaderElectionClient struct {
	cc *grpc.ClientConn
}

func NewLeaderElectionClient(cc *grpc.ClientConn) LeaderElectionClient {
	return &leaderElectionClient{cc}
}

func (c *leaderElectionClient) Enter(ctx context.Context, in *EnterRequest, opts ...grpc.CallOption) (*EnterResponse, error) {
	out := new(EnterResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/Enter", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*WithdrawResponse, error) {
	out := new(WithdrawResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/Withdraw", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) Anoint(ctx context.Context, in *AnointRequest, opts ...grpc.CallOption) (*AnointResponse, error) {
	out := new(AnointResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/Anoint", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) Promote(ctx context.Context, in *PromoteRequest, opts ...grpc.CallOption) (*PromoteResponse, error) {
	out := new(PromoteResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/Promote", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) Demote(ctx context.Context, in *DemoteRequest, opts ...grpc.CallOption) (*DemoteResponse, error) {
	out := new(DemoteResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/Demote", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) Evict(ctx context.Context, in *EvictRequest, opts ...grpc.CallOption) (*EvictResponse, error) {
	out := new(EvictResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/Evict", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) GetTerm(ctx context.Context, in *GetTermRequest, opts ...grpc.CallOption) (*GetTermResponse, error) {
	out := new(GetTermResponse)
	err := c.cc.Invoke(ctx, "/atomix.protocols.rsm.election.v1.LeaderElection/GetTerm", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *leaderElectionClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (LeaderElection_WatchClient, error) {
	stream, err := c.cc.NewStream(ctx, &_LeaderElection_serviceDesc.Streams[0], "/atomix.protocols.rsm.election.v1.LeaderElection/Watch", opts...)
	if err != nil {
		return nil, err
	}
	x := &leaderElectionWatchClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type LeaderElection_WatchClient interface {
	Recv() (*WatchResponse, error)
	grpc.ClientStream
}

type leaderElectionWatchClient struct {
	grpc.ClientStream
}

func (x *leaderElectionWatchClient) Recv() (*WatchResponse, error) {
	m := new(WatchResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// LeaderElectionServer is the server API for LeaderElection service.
type LeaderElectionServer interface {
	// Enter enters the leader election
	Enter(context.Context, *EnterRequest) (*EnterResponse, error)
	// Withdraw withdraws a candidate from the leader election
	Withdraw(context.Context, *WithdrawRequest) (*WithdrawResponse, error)
	// Anoint anoints a candidate leader
	Anoint(context.Context, *AnointRequest) (*AnointResponse, error)
	// Promote promotes a candidate
	Promote(context.Context, *PromoteRequest) (*PromoteResponse, error)
	// Demote demotes a candidate
	Demote(context.Context, *DemoteRequest) (*DemoteResponse, error)
	// Evict evicts a candidate from the election
	Evict(context.Context, *EvictRequest) (*EvictResponse, error)
	// GetTerm gets the current leadership term
	GetTerm(context.Context, *GetTermRequest) (*GetTermResponse, error)
	// Watch watches the election for events
	Watch(*WatchRequest, LeaderElection_WatchServer) error
}

// UnimplementedLeaderElectionServer can be embedded to have forward compatible implementations.
type UnimplementedLeaderElectionServer struct {
}

func (*UnimplementedLeaderElectionServer) Enter(ctx context.Context, req *EnterRequest) (*EnterResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Enter not implemented")
}
func (*UnimplementedLeaderElectionServer) Withdraw(ctx context.Context, req *WithdrawRequest) (*WithdrawResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented")
}
func (*UnimplementedLeaderElectionServer) Anoint(ctx context.Context, req *AnointRequest) (*AnointResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Anoint not implemented")
}
func (*UnimplementedLeaderElectionServer) Promote(ctx context.Context, req *PromoteRequest) (*PromoteResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Promote not implemented")
}
func (*UnimplementedLeaderElectionServer) Demote(ctx context.Context, req *DemoteRequest) (*DemoteResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Demote not implemented")
}
func (*UnimplementedLeaderElectionServer) Evict(ctx context.Context, req *EvictRequest) (*EvictResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Evict not implemented")
}
func (*UnimplementedLeaderElectionServer) GetTerm(ctx context.Context, req *GetTermRequest) (*GetTermResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTerm not implemented")
}
func (*UnimplementedLeaderElectionServer) Watch(req *WatchRequest, srv LeaderElection_WatchServer) error {
	return status.Errorf(codes.Unimplemented, "method Watch not implemented")
}

func RegisterLeaderElectionServer(s *grpc.Server, srv LeaderElectionServer) {
	s.RegisterService(&_LeaderElection_serviceDesc, srv)
}

func _LeaderElection_Enter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EnterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).Enter(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/Enter",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).Enter(ctx, req.(*EnterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_Withdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(WithdrawRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).Withdraw(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/Withdraw",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).Withdraw(ctx, req.(*WithdrawRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_Anoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AnointRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).Anoint(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/Anoint",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).Anoint(ctx, req.(*AnointRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_Promote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PromoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).Promote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/Promote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).Promote(ctx, req.(*PromoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_Demote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DemoteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).Demote(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/Demote",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).Demote(ctx, req.(*DemoteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_Evict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EvictRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).Evict(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/Evict",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).Evict(ctx, req.(*EvictRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_GetTerm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTermRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LeaderElectionServer).GetTerm(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/atomix.protocols.rsm.election.v1.LeaderElection/GetTerm",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LeaderElectionServer).GetTerm(ctx, req.(*GetTermRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LeaderElection_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(WatchRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(LeaderElectionServer).Watch(m, &leaderElectionWatchServer{stream})
}

type LeaderElection_WatchServer interface {
	Send(*WatchResponse) error
	grpc.ServerStream
}

type leaderElectionWatchServer struct {
	grpc.ServerStream
}

func (x *leaderElectionWatchServer) Send(m *WatchResponse) error {
	return x.ServerStream.SendMsg(m)
}

var _LeaderElection_serviceDesc = grpc.ServiceDesc{
	ServiceName: "atomix.protocols.rsm.election.v1.LeaderElection",
	HandlerType: (*LeaderElectionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Enter",
			Handler:    _LeaderElection_Enter_Handler,
		},
		{
			MethodName: "Withdraw",
			Handler:    _LeaderElection_Withdraw_Handler,
		},
		{
			MethodName: "Anoint",
			Handler:    _LeaderElection_Anoint_Handler,
		},
		{
			MethodName: "Promote",
			Handler:    _LeaderElection_Promote_Handler,
		},
		{
			MethodName: "Demote",
			Handler:    _LeaderElection_Demote_Handler,
		},
		{
			MethodName: "Evict",
			Handler:    _LeaderElection_Evict_Handler,
		},
		{
			MethodName: "GetTerm",
			Handler:    _LeaderElection_GetTerm_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _LeaderElection_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "election/v1/election.proto",
}

func (m *EnterRequest) 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 *EnterRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *EnterResponse) 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 *EnterResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *WithdrawRequest) 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 *WithdrawRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *WithdrawResponse) 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 *WithdrawResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *AnointRequest) 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 *AnointRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *AnointResponse) 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 *AnointResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *PromoteRequest) 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 *PromoteRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *PromoteResponse) 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 *PromoteResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *DemoteRequest) 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 *DemoteRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *DemoteResponse) 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 *DemoteResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *EvictRequest) 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 *EvictRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *EvictResponse) 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 *EvictResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *GetTermRequest) 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 *GetTermRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *GetTermResponse) 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 *GetTermResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *WatchRequest) 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 *WatchRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *WatchResponse) 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 *WatchResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *LeaderElectionSnapshot) 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 *LeaderElectionSnapshot) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidates) > 0 {
		for iNdEx := len(m.Candidates) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Candidates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintElection(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x1a
		}
	}
	if m.Leader != nil {
		{
			size, err := m.Leader.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if m.Term != 0 {
		i = encodeVarintElection(dAtA, i, uint64(m.Term))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *LeaderElectionCandidate) 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 *LeaderElectionCandidate) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionCandidate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.SessionID != 0 {
		i = encodeVarintElection(dAtA, i, uint64(m.SessionID))
		i--
		dAtA[i] = 0x10
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *LeaderElectionInput) 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 *LeaderElectionInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Input != nil {
		{
			size := m.Input.Size()
			i -= size
			if _, err := m.Input.MarshalTo(dAtA[i:]); err != nil {
				return 0, err
			}
		}
	}
	return len(dAtA) - i, nil
}

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

func (m *LeaderElectionInput_Enter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Enter != nil {
		{
			size, err := m.Enter.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_Withdraw) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_Withdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Withdraw != nil {
		{
			size, err := m.Withdraw.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_Anoint) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_Anoint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Anoint != nil {
		{
			size, err := m.Anoint.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x1a
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_Promote) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_Promote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Promote != nil {
		{
			size, err := m.Promote.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x22
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_Evict) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_Evict) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Evict != nil {
		{
			size, err := m.Evict.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x2a
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_GetTerm) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_GetTerm) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.GetTerm != nil {
		{
			size, err := m.GetTerm.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x32
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_Watch) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_Watch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Watch != nil {
		{
			size, err := m.Watch.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x3a
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionInput_Demote) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionInput_Demote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Demote != nil {
		{
			size, err := m.Demote.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x42
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput) 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 *LeaderElectionOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Output != nil {
		{
			size := m.Output.Size()
			i -= size
			if _, err := m.Output.MarshalTo(dAtA[i:]); err != nil {
				return 0, err
			}
		}
	}
	return len(dAtA) - i, nil
}

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

func (m *LeaderElectionOutput_Enter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Enter != nil {
		{
			size, err := m.Enter.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_Withdraw) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_Withdraw) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Withdraw != nil {
		{
			size, err := m.Withdraw.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_Anoint) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_Anoint) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Anoint != nil {
		{
			size, err := m.Anoint.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x1a
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_Promote) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_Promote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Promote != nil {
		{
			size, err := m.Promote.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x22
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_Evict) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_Evict) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Evict != nil {
		{
			size, err := m.Evict.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x2a
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_GetTerm) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_GetTerm) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.GetTerm != nil {
		{
			size, err := m.GetTerm.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x32
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_Watch) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_Watch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Watch != nil {
		{
			size, err := m.Watch.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x3a
	}
	return len(dAtA) - i, nil
}
func (m *LeaderElectionOutput_Demote) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *LeaderElectionOutput_Demote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Demote != nil {
		{
			size, err := m.Demote.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintElection(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x42
	}
	return len(dAtA) - i, nil
}
func (m *EnterInput) 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 *EnterInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *EnterInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidate) > 0 {
		i -= len(m.Candidate)
		copy(dAtA[i:], m.Candidate)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Candidate)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *EnterOutput) 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 *EnterOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *WithdrawInput) 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 *WithdrawInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *WithdrawInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidate) > 0 {
		i -= len(m.Candidate)
		copy(dAtA[i:], m.Candidate)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Candidate)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *WithdrawOutput) 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 *WithdrawOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *AnointInput) 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 *AnointInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *AnointInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidate) > 0 {
		i -= len(m.Candidate)
		copy(dAtA[i:], m.Candidate)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Candidate)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *AnointOutput) 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 *AnointOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *PromoteInput) 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 *PromoteInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *PromoteInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidate) > 0 {
		i -= len(m.Candidate)
		copy(dAtA[i:], m.Candidate)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Candidate)))
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}

func (m *PromoteOutput) 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 *PromoteOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *DemoteInput) 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 *DemoteInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *DemoteInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidate) > 0 {
		i -= len(m.Candidate)
		copy(dAtA[i:], m.Candidate)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Candidate)))
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}

func (m *DemoteOutput) 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 *DemoteOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *EvictInput) 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 *EvictInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *EvictInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Candidate) > 0 {
		i -= len(m.Candidate)
		copy(dAtA[i:], m.Candidate)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Candidate)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *EvictOutput) 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 *EvictOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *GetTermInput) 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 *GetTermInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GetTermInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *GetTermOutput) 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 *GetTermOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *WatchInput) 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 *WatchInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *WatchInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *WatchOutput) 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 *WatchOutput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *Term) 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 *Term) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Term) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Index != 0 {
		i = encodeVarintElection(dAtA, i, uint64(m.Index))
		i--
		dAtA[i] = 0x18
	}
	if len(m.Candidates) > 0 {
		for iNdEx := len(m.Candidates) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.Candidates[iNdEx])
			copy(dAtA[i:], m.Candidates[iNdEx])
			i = encodeVarintElection(dAtA, i, uint64(len(m.Candidates[iNdEx])))
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.Leader) > 0 {
		i -= len(m.Leader)
		copy(dAtA[i:], m.Leader)
		i = encodeVarintElection(dAtA, i, uint64(len(m.Leader)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *EnterResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.EnterOutput != nil {
		l = m.EnterOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *WithdrawRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.WithdrawInput != nil {
		l = m.WithdrawInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *WithdrawResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.WithdrawOutput != nil {
		l = m.WithdrawOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *AnointRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.AnointInput != nil {
		l = m.AnointInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *AnointResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.AnointOutput != nil {
		l = m.AnointOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *PromoteRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.PromoteInput != nil {
		l = m.PromoteInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *PromoteResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.PromoteOutput != nil {
		l = m.PromoteOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *DemoteRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.DemoteInput != nil {
		l = m.DemoteInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *DemoteResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.DemoteOutput != nil {
		l = m.DemoteOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *EvictRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.EvictInput != nil {
		l = m.EvictInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *EvictResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.EvictOutput != nil {
		l = m.EvictOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *GetTermRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.GetTermInput != nil {
		l = m.GetTermInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *GetTermResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.GetTermOutput != nil {
		l = m.GetTermOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *WatchRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.WatchInput != nil {
		l = m.WatchInput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *WatchResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Headers != nil {
		l = m.Headers.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if m.WatchOutput != nil {
		l = m.WatchOutput.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *LeaderElectionSnapshot) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Term != 0 {
		n += 1 + sovElection(uint64(m.Term))
	}
	if m.Leader != nil {
		l = m.Leader.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	if len(m.Candidates) > 0 {
		for _, e := range m.Candidates {
			l = e.Size()
			n += 1 + l + sovElection(uint64(l))
		}
	}
	return n
}

func (m *LeaderElectionCandidate) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	if m.SessionID != 0 {
		n += 1 + sovElection(uint64(m.SessionID))
	}
	return n
}

func (m *LeaderElectionInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Input != nil {
		n += m.Input.Size()
	}
	return n
}

func (m *LeaderElectionInput_Enter) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Enter != nil {
		l = m.Enter.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_Withdraw) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Withdraw != nil {
		l = m.Withdraw.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_Anoint) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Anoint != nil {
		l = m.Anoint.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_Promote) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Promote != nil {
		l = m.Promote.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_Evict) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Evict != nil {
		l = m.Evict.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_GetTerm) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.GetTerm != nil {
		l = m.GetTerm.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_Watch) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Watch != nil {
		l = m.Watch.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionInput_Demote) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Demote != nil {
		l = m.Demote.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Output != nil {
		n += m.Output.Size()
	}
	return n
}

func (m *LeaderElectionOutput_Enter) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Enter != nil {
		l = m.Enter.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_Withdraw) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Withdraw != nil {
		l = m.Withdraw.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_Anoint) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Anoint != nil {
		l = m.Anoint.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_Promote) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Promote != nil {
		l = m.Promote.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_Evict) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Evict != nil {
		l = m.Evict.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_GetTerm) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.GetTerm != nil {
		l = m.GetTerm.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_Watch) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Watch != nil {
		l = m.Watch.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *LeaderElectionOutput_Demote) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Demote != nil {
		l = m.Demote.Size()
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}
func (m *EnterInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Candidate)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *EnterOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *WithdrawInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Candidate)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *WithdrawOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *AnointInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Candidate)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *AnointOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *PromoteInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Candidate)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *PromoteOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *DemoteInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Candidate)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *DemoteOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *EvictInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Candidate)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	return n
}

func (m *EvictOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *GetTermInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *GetTermOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *WatchInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *WatchOutput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Term.Size()
	n += 1 + l + sovElection(uint64(l))
	return n
}

func (m *Term) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Leader)
	if l > 0 {
		n += 1 + l + sovElection(uint64(l))
	}
	if len(m.Candidates) > 0 {
		for _, s := range m.Candidates {
			l = len(s)
			n += 1 + l + sovElection(uint64(l))
		}
	}
	if m.Index != 0 {
		n += 1 + sovElection(uint64(m.Index))
	}
	return n
}

func sovElection(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozElection(x uint64) (n int) {
	return sovElection(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *EnterRequest) 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 ErrIntOverflowElection
			}
			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: EnterRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EnterRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Headers", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Headers == nil {
				m.Headers = &v1.ProposalRequestHeaders{}
			}
			if err := m.Headers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EnterInput", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.EnterInput == nil {
				m.EnterInput = &EnterInput{}
			}
			if err := m.EnterInput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LeaderElectionSnapshot) 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 ErrIntOverflowElection
			}
			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: LeaderElectionSnapshot: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LeaderElectionSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
			}
			m.Term = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Term |= github_com_atomix_atomix_protocols_rsm_api_v1.Index(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Leader == nil {
				m.Leader = &LeaderElectionCandidate{}
			}
			if err := m.Leader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidates", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidates = append(m.Candidates, LeaderElectionCandidate{})
			if err := m.Candidates[len(m.Candidates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LeaderElectionCandidate) 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 ErrIntOverflowElection
			}
			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: LeaderElectionCandidate: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LeaderElectionCandidate: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			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 ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SessionID |= github_com_atomix_atomix_protocols_rsm_api_v1.SessionID(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LeaderElectionInput) 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 ErrIntOverflowElection
			}
			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: LeaderElectionInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LeaderElectionInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Enter", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &EnterInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Enter{v}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Withdraw", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &WithdrawInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Withdraw{v}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Anoint", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &AnointInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Anoint{v}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Promote", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &PromoteInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Promote{v}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Evict", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &EvictInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Evict{v}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GetTerm", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &GetTermInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_GetTerm{v}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &WatchInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Watch{v}
			iNdEx = postIndex
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Demote", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &DemoteInput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Input = &LeaderElectionInput_Demote{v}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *LeaderElectionOutput) 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 ErrIntOverflowElection
			}
			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: LeaderElectionOutput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: LeaderElectionOutput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Enter", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &EnterOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Enter{v}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Withdraw", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &WithdrawOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Withdraw{v}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Anoint", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &AnointOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Anoint{v}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Promote", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &PromoteOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Promote{v}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Evict", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &EvictOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Evict{v}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field GetTerm", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &GetTermOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_GetTerm{v}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &WatchOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Watch{v}
			iNdEx = postIndex
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Demote", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthElection
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &DemoteOutput{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Output = &LeaderElectionOutput_Demote{v}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *EnterInput) 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 ErrIntOverflowElection
			}
			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: EnterInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EnterInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *WithdrawInput) 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 ErrIntOverflowElection
			}
			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: WithdrawInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: WithdrawInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *AnointInput) 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 ErrIntOverflowElection
			}
			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: AnointInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: AnointInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PromoteInput) 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 ErrIntOverflowElection
			}
			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: PromoteInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PromoteInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *DemoteInput) 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 ErrIntOverflowElection
			}
			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: DemoteInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: DemoteInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *EvictInput) 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 ErrIntOverflowElection
			}
			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: EvictInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: EvictInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GetTermInput) 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 ErrIntOverflowElection
			}
			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: GetTermInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GetTermInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *WatchInput) 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 ErrIntOverflowElection
			}
			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: WatchInput: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: WatchInput: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Term) 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 ErrIntOverflowElection
			}
			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: Term: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Term: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Leader = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Candidates", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowElection
				}
				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 ErrInvalidLengthElection
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthElection
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Candidates = append(m.Candidates, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 3:
			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 ErrIntOverflowElection
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Index |= github_com_atomix_atomix_protocols_rsm_api_v1.Index(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipElection(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthElection
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipElection(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, ErrIntOverflowElection
			}
			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, ErrIntOverflowElection
				}
				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, ErrIntOverflowElection
				}
				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, ErrInvalidLengthElection
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupElection
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthElection
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthElection        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowElection          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupElection = fmt.Errorf("proto: unexpected end of group")
)
