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

package v1

import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	_ "github.com/gogo/protobuf/types"
	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 Failure_Status int32

const (
	Failure_UNKNOWN        Failure_Status = 0
	Failure_ERROR          Failure_Status = 1
	Failure_CANCELED       Failure_Status = 2
	Failure_NOT_FOUND      Failure_Status = 3
	Failure_ALREADY_EXISTS Failure_Status = 4
	Failure_UNAUTHORIZED   Failure_Status = 5
	Failure_FORBIDDEN      Failure_Status = 6
	Failure_CONFLICT       Failure_Status = 7
	Failure_INVALID        Failure_Status = 8
	Failure_UNAVAILABLE    Failure_Status = 9
	Failure_NOT_SUPPORTED  Failure_Status = 10
	Failure_TIMEOUT        Failure_Status = 11
	Failure_FAULT          Failure_Status = 12
	Failure_INTERNAL       Failure_Status = 13
)

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

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

func (x Failure_Status) String() string {
	return proto.EnumName(Failure_Status_name, int32(x))
}

func (Failure_Status) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_a084f7f80381e1dd, []int{8, 0}
}

type CreatePrimitiveInput struct {
	PrimitiveSpec `protobuf:"bytes,1,opt,name=spec,proto3,embedded=spec" json:"spec"`
}

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

var xxx_messageInfo_CreatePrimitiveInput proto.InternalMessageInfo

type CreatePrimitiveOutput struct {
	PrimitiveID PrimitiveID `protobuf:"varint,1,opt,name=primitive_id,json=primitiveId,proto3,casttype=PrimitiveID" json:"primitive_id,omitempty"`
}

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

var xxx_messageInfo_CreatePrimitiveOutput proto.InternalMessageInfo

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

type ClosePrimitiveInput struct {
	PrimitiveID PrimitiveID `protobuf:"varint,1,opt,name=primitive_id,json=primitiveId,proto3,casttype=PrimitiveID" json:"primitive_id,omitempty"`
}

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

var xxx_messageInfo_ClosePrimitiveInput proto.InternalMessageInfo

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

type ClosePrimitiveOutput struct {
}

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

var xxx_messageInfo_ClosePrimitiveOutput proto.InternalMessageInfo

type PrimitiveProposalInput struct {
	PrimitiveID PrimitiveID `protobuf:"varint,1,opt,name=primitive_id,json=primitiveId,proto3,casttype=PrimitiveID" json:"primitive_id,omitempty"`
	Payload     []byte      `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

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

var xxx_messageInfo_PrimitiveProposalInput proto.InternalMessageInfo

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

func (m *PrimitiveProposalInput) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

type PrimitiveProposalOutput struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}

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

var xxx_messageInfo_PrimitiveProposalOutput proto.InternalMessageInfo

func (m *PrimitiveProposalOutput) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

type PrimitiveQueryInput struct {
	PrimitiveID PrimitiveID `protobuf:"varint,1,opt,name=primitive_id,json=primitiveId,proto3,casttype=PrimitiveID" json:"primitive_id,omitempty"`
	Payload     []byte      `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

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

var xxx_messageInfo_PrimitiveQueryInput proto.InternalMessageInfo

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

func (m *PrimitiveQueryInput) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

type PrimitiveQueryOutput struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}

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

var xxx_messageInfo_PrimitiveQueryOutput proto.InternalMessageInfo

func (m *PrimitiveQueryOutput) GetPayload() []byte {
	if m != nil {
		return m.Payload
	}
	return nil
}

type Failure struct {
	Status  Failure_Status `protobuf:"varint,1,opt,name=status,proto3,enum=atomix.protocols.rsm.v1.Failure_Status" json:"status,omitempty"`
	Message string         `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

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

var xxx_messageInfo_Failure proto.InternalMessageInfo

func (m *Failure) GetStatus() Failure_Status {
	if m != nil {
		return m.Status
	}
	return Failure_UNKNOWN
}

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

type PrimitiveSnapshot struct {
	PrimitiveID PrimitiveID   `protobuf:"varint,1,opt,name=primitive_id,json=primitiveId,proto3,casttype=PrimitiveID" json:"primitive_id,omitempty"`
	Spec        PrimitiveSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec"`
}

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

var xxx_messageInfo_PrimitiveSnapshot proto.InternalMessageInfo

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

func (m *PrimitiveSnapshot) GetSpec() PrimitiveSpec {
	if m != nil {
		return m.Spec
	}
	return PrimitiveSpec{}
}

type PrimitiveType struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	APIVersion string `protobuf:"bytes,2,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"`
}

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

var xxx_messageInfo_PrimitiveType proto.InternalMessageInfo

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

func (m *PrimitiveType) GetAPIVersion() string {
	if m != nil {
		return m.APIVersion
	}
	return ""
}

type PrimitiveName struct {
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}

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

var xxx_messageInfo_PrimitiveName proto.InternalMessageInfo

func (m *PrimitiveName) GetNamespace() string {
	if m != nil {
		return m.Namespace
	}
	return ""
}

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

type PrimitiveSpec struct {
	Type          PrimitiveType `protobuf:"bytes,1,opt,name=type,proto3" json:"type"`
	PrimitiveName `protobuf:"bytes,2,opt,name=name,proto3,embedded=name" json:"name"`
}

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

var xxx_messageInfo_PrimitiveSpec proto.InternalMessageInfo

func (m *PrimitiveSpec) GetType() PrimitiveType {
	if m != nil {
		return m.Type
	}
	return PrimitiveType{}
}

func init() {
	proto.RegisterEnum("atomix.protocols.rsm.v1.Failure_Status", Failure_Status_name, Failure_Status_value)
	proto.RegisterType((*CreatePrimitiveInput)(nil), "atomix.protocols.rsm.v1.CreatePrimitiveInput")
	proto.RegisterType((*CreatePrimitiveOutput)(nil), "atomix.protocols.rsm.v1.CreatePrimitiveOutput")
	proto.RegisterType((*ClosePrimitiveInput)(nil), "atomix.protocols.rsm.v1.ClosePrimitiveInput")
	proto.RegisterType((*ClosePrimitiveOutput)(nil), "atomix.protocols.rsm.v1.ClosePrimitiveOutput")
	proto.RegisterType((*PrimitiveProposalInput)(nil), "atomix.protocols.rsm.v1.PrimitiveProposalInput")
	proto.RegisterType((*PrimitiveProposalOutput)(nil), "atomix.protocols.rsm.v1.PrimitiveProposalOutput")
	proto.RegisterType((*PrimitiveQueryInput)(nil), "atomix.protocols.rsm.v1.PrimitiveQueryInput")
	proto.RegisterType((*PrimitiveQueryOutput)(nil), "atomix.protocols.rsm.v1.PrimitiveQueryOutput")
	proto.RegisterType((*Failure)(nil), "atomix.protocols.rsm.v1.Failure")
	proto.RegisterType((*PrimitiveSnapshot)(nil), "atomix.protocols.rsm.v1.PrimitiveSnapshot")
	proto.RegisterType((*PrimitiveType)(nil), "atomix.protocols.rsm.v1.PrimitiveType")
	proto.RegisterType((*PrimitiveName)(nil), "atomix.protocols.rsm.v1.PrimitiveName")
	proto.RegisterType((*PrimitiveSpec)(nil), "atomix.protocols.rsm.v1.PrimitiveSpec")
}

func init() { proto.RegisterFile("v1/primitive.proto", fileDescriptor_a084f7f80381e1dd) }

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

func (this *PrimitiveType) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*PrimitiveType)
	if !ok {
		that2, ok := that.(PrimitiveType)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Name != that1.Name {
		return false
	}
	if this.APIVersion != that1.APIVersion {
		return false
	}
	return true
}
func (this *PrimitiveName) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*PrimitiveName)
	if !ok {
		that2, ok := that.(PrimitiveName)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.Namespace != that1.Namespace {
		return false
	}
	if this.Name != that1.Name {
		return false
	}
	return true
}
func (this *PrimitiveSpec) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*PrimitiveSpec)
	if !ok {
		that2, ok := that.(PrimitiveSpec)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !this.Type.Equal(&that1.Type) {
		return false
	}
	if !this.PrimitiveName.Equal(&that1.PrimitiveName) {
		return false
	}
	return true
}
func (m *CreatePrimitiveInput) 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 *CreatePrimitiveInput) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

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

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

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

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

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

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

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

func (m *PrimitiveProposalInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Payload) > 0 {
		i -= len(m.Payload)
		copy(dAtA[i:], m.Payload)
		i = encodeVarintPrimitive(dAtA, i, uint64(len(m.Payload)))
		i--
		dAtA[i] = 0x12
	}
	if m.PrimitiveID != 0 {
		i = encodeVarintPrimitive(dAtA, i, uint64(m.PrimitiveID))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

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

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

func (m *PrimitiveQueryInput) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Payload) > 0 {
		i -= len(m.Payload)
		copy(dAtA[i:], m.Payload)
		i = encodeVarintPrimitive(dAtA, i, uint64(len(m.Payload)))
		i--
		dAtA[i] = 0x12
	}
	if m.PrimitiveID != 0 {
		i = encodeVarintPrimitive(dAtA, i, uint64(m.PrimitiveID))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

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

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

func (m *Failure) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Message) > 0 {
		i -= len(m.Message)
		copy(dAtA[i:], m.Message)
		i = encodeVarintPrimitive(dAtA, i, uint64(len(m.Message)))
		i--
		dAtA[i] = 0x12
	}
	if m.Status != 0 {
		i = encodeVarintPrimitive(dAtA, i, uint64(m.Status))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

func (m *PrimitiveSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintPrimitive(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x12
	if m.PrimitiveID != 0 {
		i = encodeVarintPrimitive(dAtA, i, uint64(m.PrimitiveID))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

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

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

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

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

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

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

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

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

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

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

func (m *PrimitiveProposalInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.PrimitiveID != 0 {
		n += 1 + sovPrimitive(uint64(m.PrimitiveID))
	}
	l = len(m.Payload)
	if l > 0 {
		n += 1 + l + sovPrimitive(uint64(l))
	}
	return n
}

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

func (m *PrimitiveQueryInput) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.PrimitiveID != 0 {
		n += 1 + sovPrimitive(uint64(m.PrimitiveID))
	}
	l = len(m.Payload)
	if l > 0 {
		n += 1 + l + sovPrimitive(uint64(l))
	}
	return n
}

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

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

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

func (m *PrimitiveType) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovPrimitive(uint64(l))
	}
	l = len(m.APIVersion)
	if l > 0 {
		n += 1 + l + sovPrimitive(uint64(l))
	}
	return n
}

func (m *PrimitiveName) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Namespace)
	if l > 0 {
		n += 1 + l + sovPrimitive(uint64(l))
	}
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovPrimitive(uint64(l))
	}
	return n
}

func (m *PrimitiveSpec) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Type.Size()
	n += 1 + l + sovPrimitive(uint64(l))
	l = m.PrimitiveName.Size()
	n += 1 + l + sovPrimitive(uint64(l))
	return n
}

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

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

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

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

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

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

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

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

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

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

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *PrimitiveType) 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 ErrIntOverflowPrimitive
			}
			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: PrimitiveType: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: PrimitiveType: 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 ErrIntOverflowPrimitive
				}
				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 ErrInvalidLengthPrimitive
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPrimitive
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowPrimitive
				}
				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 ErrInvalidLengthPrimitive
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthPrimitive
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.APIVersion = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipPrimitive(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthPrimitive
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

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

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

var (
	ErrInvalidLengthPrimitive        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPrimitive          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPrimitive = fmt.Errorf("proto: unexpected end of group")
)
