// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Sync protocol for persisting the loopback server state to disk.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.31.0
// 	protoc        v3.6.1
// source: loopback_server.proto

package sync_pb

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Entity type mapping to one of the subclasses of LoopbackServerEntity.
type LoopbackServerEntity_Type int32

const (
	LoopbackServerEntity_UNKNOWN   LoopbackServerEntity_Type = 0
	LoopbackServerEntity_BOOKMARK  LoopbackServerEntity_Type = 1
	LoopbackServerEntity_PERMANENT LoopbackServerEntity_Type = 2
	LoopbackServerEntity_TOMBSTONE LoopbackServerEntity_Type = 3
	LoopbackServerEntity_UNIQUE    LoopbackServerEntity_Type = 4
)

// Enum value maps for LoopbackServerEntity_Type.
var (
	LoopbackServerEntity_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "BOOKMARK",
		2: "PERMANENT",
		3: "TOMBSTONE",
		4: "UNIQUE",
	}
	LoopbackServerEntity_Type_value = map[string]int32{
		"UNKNOWN":   0,
		"BOOKMARK":  1,
		"PERMANENT": 2,
		"TOMBSTONE": 3,
		"UNIQUE":    4,
	}
)

func (x LoopbackServerEntity_Type) Enum() *LoopbackServerEntity_Type {
	p := new(LoopbackServerEntity_Type)
	*p = x
	return p
}

func (x LoopbackServerEntity_Type) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (LoopbackServerEntity_Type) Descriptor() protoreflect.EnumDescriptor {
	return file_loopback_server_proto_enumTypes[0].Descriptor()
}

func (LoopbackServerEntity_Type) Type() protoreflect.EnumType {
	return &file_loopback_server_proto_enumTypes[0]
}

func (x LoopbackServerEntity_Type) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *LoopbackServerEntity_Type) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = LoopbackServerEntity_Type(num)
	return nil
}

// Deprecated: Use LoopbackServerEntity_Type.Descriptor instead.
func (LoopbackServerEntity_Type) EnumDescriptor() ([]byte, []int) {
	return file_loopback_server_proto_rawDescGZIP(), []int{0, 0}
}

// Serialization of the LoopbackServerEntity and its ancestors.
type LoopbackServerEntity struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	Type      *LoopbackServerEntity_Type `protobuf:"varint,1,opt,name=type,enum=sync_pb.LoopbackServerEntity_Type" json:"type,omitempty"`
	Entity    *SyncEntity                `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"`
	ModelType *int64                     `protobuf:"varint,3,opt,name=model_type,json=modelType" json:"model_type,omitempty"`
}

func (x *LoopbackServerEntity) Reset() {
	*x = LoopbackServerEntity{}
	if protoimpl.UnsafeEnabled {
		mi := &file_loopback_server_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *LoopbackServerEntity) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*LoopbackServerEntity) ProtoMessage() {}

func (x *LoopbackServerEntity) ProtoReflect() protoreflect.Message {
	mi := &file_loopback_server_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use LoopbackServerEntity.ProtoReflect.Descriptor instead.
func (*LoopbackServerEntity) Descriptor() ([]byte, []int) {
	return file_loopback_server_proto_rawDescGZIP(), []int{0}
}

func (x *LoopbackServerEntity) GetType() LoopbackServerEntity_Type {
	if x != nil && x.Type != nil {
		return *x.Type
	}
	return LoopbackServerEntity_UNKNOWN
}

func (x *LoopbackServerEntity) GetEntity() *SyncEntity {
	if x != nil {
		return x.Entity
	}
	return nil
}

func (x *LoopbackServerEntity) GetModelType() int64 {
	if x != nil && x.ModelType != nil {
		return *x.ModelType
	}
	return 0
}

// Contains the loopback server state.
type LoopbackServerProto struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// The protocol buffer format version.
	Version       *int64                  `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	StoreBirthday *int64                  `protobuf:"varint,2,opt,name=store_birthday,json=storeBirthday" json:"store_birthday,omitempty"`
	Entities      []*LoopbackServerEntity `protobuf:"bytes,3,rep,name=entities" json:"entities,omitempty"`
	// All Keystore keys known to the server.
	KeystoreKeys [][]byte `protobuf:"bytes,4,rep,name=keystore_keys,json=keystoreKeys" json:"keystore_keys,omitempty"`
	// The last entity ID that was assigned to an entity.
	LastVersionAssigned *int64 `protobuf:"varint,5,opt,name=last_version_assigned,json=lastVersionAssigned" json:"last_version_assigned,omitempty"`
}

func (x *LoopbackServerProto) Reset() {
	*x = LoopbackServerProto{}
	if protoimpl.UnsafeEnabled {
		mi := &file_loopback_server_proto_msgTypes[1]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *LoopbackServerProto) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*LoopbackServerProto) ProtoMessage() {}

func (x *LoopbackServerProto) ProtoReflect() protoreflect.Message {
	mi := &file_loopback_server_proto_msgTypes[1]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use LoopbackServerProto.ProtoReflect.Descriptor instead.
func (*LoopbackServerProto) Descriptor() ([]byte, []int) {
	return file_loopback_server_proto_rawDescGZIP(), []int{1}
}

func (x *LoopbackServerProto) GetVersion() int64 {
	if x != nil && x.Version != nil {
		return *x.Version
	}
	return 0
}

func (x *LoopbackServerProto) GetStoreBirthday() int64 {
	if x != nil && x.StoreBirthday != nil {
		return *x.StoreBirthday
	}
	return 0
}

func (x *LoopbackServerProto) GetEntities() []*LoopbackServerEntity {
	if x != nil {
		return x.Entities
	}
	return nil
}

func (x *LoopbackServerProto) GetKeystoreKeys() [][]byte {
	if x != nil {
		return x.KeystoreKeys
	}
	return nil
}

func (x *LoopbackServerProto) GetLastVersionAssigned() int64 {
	if x != nil && x.LastVersionAssigned != nil {
		return *x.LastVersionAssigned
	}
	return 0
}

var File_loopback_server_proto protoreflect.FileDescriptor

var file_loopback_server_proto_rawDesc = []byte{
	0x0a, 0x15, 0x6c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65,
	0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x70, 0x62,
	0x1a, 0x11, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b,
	0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, 0x04,
	0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x73, 0x79, 0x6e,
	0x63, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x72,
	0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04,
	0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x70, 0x62, 0x2e, 0x53,
	0x79, 0x6e, 0x63, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74,
	0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65,
	0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
	0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x4f, 0x4f, 0x4b, 0x4d, 0x41, 0x52,
	0x4b, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x45, 0x52, 0x4d, 0x41, 0x4e, 0x45, 0x4e, 0x54,
	0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10,
	0x03, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x10, 0x04, 0x22, 0xea, 0x01,
	0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
	0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
	0x25, 0x0a, 0x0e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61,
	0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x69,
	0x72, 0x74, 0x68, 0x64, 0x61, 0x79, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69,
	0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x5f,
	0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65,
	0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65,
	0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x6b, 0x65,
	0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f,
	0x72, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x76,
	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18,
	0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69,
	0x6f, 0x6e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x36, 0x0a, 0x25, 0x6f, 0x72,
	0x67, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x6f,
	0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
	0x63, 0x6f, 0x6c, 0x48, 0x03, 0x50, 0x01, 0x5a, 0x09, 0x2e, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x5f,
	0x70, 0x62,
}

var (
	file_loopback_server_proto_rawDescOnce sync.Once
	file_loopback_server_proto_rawDescData = file_loopback_server_proto_rawDesc
)

func file_loopback_server_proto_rawDescGZIP() []byte {
	file_loopback_server_proto_rawDescOnce.Do(func() {
		file_loopback_server_proto_rawDescData = protoimpl.X.CompressGZIP(file_loopback_server_proto_rawDescData)
	})
	return file_loopback_server_proto_rawDescData
}

var file_loopback_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_loopback_server_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_loopback_server_proto_goTypes = []interface{}{
	(LoopbackServerEntity_Type)(0), // 0: sync_pb.LoopbackServerEntity.Type
	(*LoopbackServerEntity)(nil),   // 1: sync_pb.LoopbackServerEntity
	(*LoopbackServerProto)(nil),    // 2: sync_pb.LoopbackServerProto
	(*SyncEntity)(nil),             // 3: sync_pb.SyncEntity
}
var file_loopback_server_proto_depIdxs = []int32{
	0, // 0: sync_pb.LoopbackServerEntity.type:type_name -> sync_pb.LoopbackServerEntity.Type
	3, // 1: sync_pb.LoopbackServerEntity.entity:type_name -> sync_pb.SyncEntity
	1, // 2: sync_pb.LoopbackServerProto.entities:type_name -> sync_pb.LoopbackServerEntity
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_loopback_server_proto_init() }
func file_loopback_server_proto_init() {
	if File_loopback_server_proto != nil {
		return
	}
	file_sync_entity_proto_init()
	if !protoimpl.UnsafeEnabled {
		file_loopback_server_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*LoopbackServerEntity); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_loopback_server_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*LoopbackServerProto); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_loopback_server_proto_rawDesc,
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_loopback_server_proto_goTypes,
		DependencyIndexes: file_loopback_server_proto_depIdxs,
		EnumInfos:         file_loopback_server_proto_enumTypes,
		MessageInfos:      file_loopback_server_proto_msgTypes,
	}.Build()
	File_loopback_server_proto = out.File
	file_loopback_server_proto_rawDesc = nil
	file_loopback_server_proto_goTypes = nil
	file_loopback_server_proto_depIdxs = nil
}
