// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.31.0
// 	protoc        v3.6.1
// source: bookmark_model_metadata.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)
)

// Corresponds to a single bookmark id/metadata pair.
type BookmarkMetadata struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// Bookmark local id.
	Id *int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	// Bookmarks sync metadata.
	Metadata *EntityMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata,omitempty"`
}

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

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

func (*BookmarkMetadata) ProtoMessage() {}

func (x *BookmarkMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_bookmark_model_metadata_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 BookmarkMetadata.ProtoReflect.Descriptor instead.
func (*BookmarkMetadata) Descriptor() ([]byte, []int) {
	return file_bookmark_model_metadata_proto_rawDescGZIP(), []int{0}
}

func (x *BookmarkMetadata) GetId() int64 {
	if x != nil && x.Id != nil {
		return *x.Id
	}
	return 0
}

func (x *BookmarkMetadata) GetMetadata() *EntityMetadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

// Sync proto to carry the sync metadata for the bookmarks model. It is used for
// persisting and loading sync metadata from disk.
type BookmarkModelMetadata struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// Bookmark global metadata.
	ModelTypeState *ModelTypeState `protobuf:"bytes,1,opt,name=model_type_state,json=modelTypeState" json:"model_type_state,omitempty"`
	// A set of all bookmarks metadata.
	BookmarksMetadata []*BookmarkMetadata `protobuf:"bytes,2,rep,name=bookmarks_metadata,json=bookmarksMetadata" json:"bookmarks_metadata,omitempty"`
	// Indicates whether the reupload of bookmarks has been triggered such that
	// they include fields like |type|, |unique_position| and |parent_guid|, which
	// means that their sequence number has been increased (independently of
	// whether the commit has succeeded or even started).
	// TODO(crbug.com/1232951): remove this code when most of bookmarks are
	// reuploaded.
	BookmarksHierarchyFieldsReuploaded *bool `protobuf:"varint,6,opt,name=bookmarks_hierarchy_fields_reuploaded,json=bookmarksHierarchyFieldsReuploaded" json:"bookmarks_hierarchy_fields_reuploaded,omitempty"`
	// Number of remote updates that were ignored because the parent folder could
	// not be determined since sync (bookmark sync) started (since initial sync,
	// including initial sync itself). Note that this excludes updates
	// representing changes (moves) to existing/tracked bookmarks (i.e. the parent
	// folder used to be known, but the new one specified in the update isn't).
	//
	// Only a minority of users should have a non-zero value, due to a) corrupt
	// data, reasons unknown; or b) permanent folders that were unsupported at the
	// time the update was received (either for the permanent folder itself or for
	// descendants). The absence of this field should be interpreted as 'unknown',
	// which roughly means the counter wasn't supported by the browser -M77 or
	// below- at the time sync was enabled (it also means, it will remain
	// 'unknown' until initial sync is exercised, e.g. sync disabled and
	// reenabled).
	NumIgnoredUpdatesDueToMissingParent *int64 `protobuf:"varint,7,opt,name=num_ignored_updates_due_to_missing_parent,json=numIgnoredUpdatesDueToMissingParent" json:"num_ignored_updates_due_to_missing_parent,omitempty"`
	// See field above. Among such ignored updates, this field tracks which was
	// the highest server version. This may be useful -in the future- to get a
	// sense of "time" (or, since versions are opaque to the client, at least a
	// notion of ordering with respect to other updates). The absence of this
	// field should be interpreted as 'unknown' and does not distinguish the
	// case between a) no updates ignored; and b) field wasn't supported at the
	// time the last update was ignored. To distinguish between these two, the
	// field above can be used.
	MaxVersionAmongIgnoredUpdatesDueToMissingParent *int64 `protobuf:"varint,8,opt,name=max_version_among_ignored_updates_due_to_missing_parent,json=maxVersionAmongIgnoredUpdatesDueToMissingParent" json:"max_version_among_ignored_updates_due_to_missing_parent,omitempty"`
	// Indicates whether the count of remote updates during the latest initial
	// merge exceeded the bookmark limit. This field is mutually exclusive to all
	// the other fields and is managed completely by the processor.
	LastInitialMergeRemoteUpdatesExceededLimit *bool `protobuf:"varint,9,opt,name=last_initial_merge_remote_updates_exceeded_limit,json=lastInitialMergeRemoteUpdatesExceededLimit" json:"last_initial_merge_remote_updates_exceeded_limit,omitempty"`
}

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

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

func (*BookmarkModelMetadata) ProtoMessage() {}

func (x *BookmarkModelMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_bookmark_model_metadata_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 BookmarkModelMetadata.ProtoReflect.Descriptor instead.
func (*BookmarkModelMetadata) Descriptor() ([]byte, []int) {
	return file_bookmark_model_metadata_proto_rawDescGZIP(), []int{1}
}

func (x *BookmarkModelMetadata) GetModelTypeState() *ModelTypeState {
	if x != nil {
		return x.ModelTypeState
	}
	return nil
}

func (x *BookmarkModelMetadata) GetBookmarksMetadata() []*BookmarkMetadata {
	if x != nil {
		return x.BookmarksMetadata
	}
	return nil
}

func (x *BookmarkModelMetadata) GetBookmarksHierarchyFieldsReuploaded() bool {
	if x != nil && x.BookmarksHierarchyFieldsReuploaded != nil {
		return *x.BookmarksHierarchyFieldsReuploaded
	}
	return false
}

func (x *BookmarkModelMetadata) GetNumIgnoredUpdatesDueToMissingParent() int64 {
	if x != nil && x.NumIgnoredUpdatesDueToMissingParent != nil {
		return *x.NumIgnoredUpdatesDueToMissingParent
	}
	return 0
}

func (x *BookmarkModelMetadata) GetMaxVersionAmongIgnoredUpdatesDueToMissingParent() int64 {
	if x != nil && x.MaxVersionAmongIgnoredUpdatesDueToMissingParent != nil {
		return *x.MaxVersionAmongIgnoredUpdatesDueToMissingParent
	}
	return 0
}

func (x *BookmarkModelMetadata) GetLastInitialMergeRemoteUpdatesExceededLimit() bool {
	if x != nil && x.LastInitialMergeRemoteUpdatesExceededLimit != nil {
		return *x.LastInitialMergeRemoteUpdatesExceededLimit
	}
	return false
}

var File_bookmark_model_metadata_proto protoreflect.FileDescriptor

var file_bookmark_model_metadata_proto_rawDesc = []byte{
	0x0a, 0x1d, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
	0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
	0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x70, 0x62, 0x1a, 0x16, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f,
	0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
	0x1a, 0x15, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
	0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x10, 0x42, 0x6f, 0x6f, 0x6b, 0x6d,
	0x61, 0x72, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69,
	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x6d,
	0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
	0x73, 0x79, 0x6e, 0x63, 0x5f, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x65,
	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
	0x22, 0xb9, 0x04, 0x0a, 0x15, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x4d, 0x6f, 0x64,
	0x65, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x10, 0x6d, 0x6f,
	0x64, 0x65, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x70, 0x62, 0x2e, 0x4d,
	0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x6d,
	0x6f, 0x64, 0x65, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a,
	0x12, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
	0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x79, 0x6e, 0x63,
	0x5f, 0x70, 0x62, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x4d, 0x65, 0x74, 0x61,
	0x64, 0x61, 0x74, 0x61, 0x52, 0x11, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x4d,
	0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x25, 0x62, 0x6f, 0x6f, 0x6b, 0x6d,
	0x61, 0x72, 0x6b, 0x73, 0x5f, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79, 0x5f, 0x66,
	0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x72, 0x65, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64,
	0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x62, 0x6f, 0x6f, 0x6b, 0x6d, 0x61, 0x72, 0x6b,
	0x73, 0x48, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73,
	0x52, 0x65, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x29, 0x6e, 0x75,
	0x6d, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
	0x73, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67,
	0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x23, 0x6e,
	0x75, 0x6d, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73,
	0x44, 0x75, 0x65, 0x54, 0x6f, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x65,
	0x6e, 0x74, 0x12, 0x70, 0x0a, 0x37, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
	0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f,
	0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6d,
	0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20,
	0x01, 0x28, 0x03, 0x52, 0x2f, 0x6d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x41,
	0x6d, 0x6f, 0x6e, 0x67, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74,
	0x65, 0x73, 0x44, 0x75, 0x65, 0x54, 0x6f, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x61,
	0x72, 0x65, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x30, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x69,
	0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74,
	0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64,
	0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x2a,
	0x6c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x65, 0x72, 0x67, 0x65,
	0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x45, 0x78, 0x63,
	0x65, 0x65, 0x64, 0x65, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04,
	0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 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_bookmark_model_metadata_proto_rawDescOnce sync.Once
	file_bookmark_model_metadata_proto_rawDescData = file_bookmark_model_metadata_proto_rawDesc
)

func file_bookmark_model_metadata_proto_rawDescGZIP() []byte {
	file_bookmark_model_metadata_proto_rawDescOnce.Do(func() {
		file_bookmark_model_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_bookmark_model_metadata_proto_rawDescData)
	})
	return file_bookmark_model_metadata_proto_rawDescData
}

var file_bookmark_model_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_bookmark_model_metadata_proto_goTypes = []interface{}{
	(*BookmarkMetadata)(nil),      // 0: sync_pb.BookmarkMetadata
	(*BookmarkModelMetadata)(nil), // 1: sync_pb.BookmarkModelMetadata
	(*EntityMetadata)(nil),        // 2: sync_pb.EntityMetadata
	(*ModelTypeState)(nil),        // 3: sync_pb.ModelTypeState
}
var file_bookmark_model_metadata_proto_depIdxs = []int32{
	2, // 0: sync_pb.BookmarkMetadata.metadata:type_name -> sync_pb.EntityMetadata
	3, // 1: sync_pb.BookmarkModelMetadata.model_type_state:type_name -> sync_pb.ModelTypeState
	0, // 2: sync_pb.BookmarkModelMetadata.bookmarks_metadata:type_name -> sync_pb.BookmarkMetadata
	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_bookmark_model_metadata_proto_init() }
func file_bookmark_model_metadata_proto_init() {
	if File_bookmark_model_metadata_proto != nil {
		return
	}
	file_model_type_state_proto_init()
	file_entity_metadata_proto_init()
	if !protoimpl.UnsafeEnabled {
		file_bookmark_model_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*BookmarkMetadata); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_bookmark_model_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*BookmarkModelMetadata); 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_bookmark_model_metadata_proto_rawDesc,
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_bookmark_model_metadata_proto_goTypes,
		DependencyIndexes: file_bookmark_model_metadata_proto_depIdxs,
		MessageInfos:      file_bookmark_model_metadata_proto_msgTypes,
	}.Build()
	File_bookmark_model_metadata_proto = out.File
	file_bookmark_model_metadata_proto_rawDesc = nil
	file_bookmark_model_metadata_proto_goTypes = nil
	file_bookmark_model_metadata_proto_depIdxs = nil
}
