// 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.
//
// Protobuf representation of the UniquePosition class.

// If you change or add any fields in this file, update proto_visitors.h and
// potentially proto_enum_conversions.{h, cc}.

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

// A UniquePosition is a string of bytes.
//
// Unique positions are unique per-item, since they are guaranteed to end with a
// fixed-length suffix that is unique per-item.  The position string may not end
// with a '\0' byte.
//
// Prior to the suffix is a series of arbitrary bytes of arbitrary length.
// Items under the same parent are positioned relative to each other by a
// lexicographic comparison of their UniquePosition values.
type UniquePosition struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// The uncompressed string of bytes representing the position.
	//
	// Deprecated.  See history note above.
	//
	// Deprecated: Marked as deprecated in unique_position.proto.
	Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
	// The client may choose to write a compressed position to this field instead
	// of populating the 'value' above.  If it chooses to use compression, the
	// 'value' field above must be empty.  The position value will be compressed
	// with gzip and stored in the compressed_value field.  The position's
	// uncompressed length must be specified and written to the
	// uncompressed_length field.
	//
	// Deprecated.  See history note above.
	//
	// Deprecated: Marked as deprecated in unique_position.proto.
	CompressedValue []byte `protobuf:"bytes,2,opt,name=compressed_value,json=compressedValue" json:"compressed_value,omitempty"`
	// Deprecated: Marked as deprecated in unique_position.proto.
	UncompressedLength *uint64 `protobuf:"varint,3,opt,name=uncompressed_length,json=uncompressedLength" json:"uncompressed_length,omitempty"`
	// This encoding uses compression scheme designed especially for unique
	// positions.  It has the property that X < Y precisely when Compressed(X) <
	// Compressed(Y), which is very useful when the most common operation is to
	// compare these positions against each other.  Their values may remain
	// compressed in memory.
	//
	// The compression scheme is implemented and documented in
	// sync/core_impl/base/unique_position.cc.
	//
	// As of M30, this is the preferred encoding.  Newer clients may continue to
	// populate the 'value' and 'compressed_value' fields to ensure backwards
	// compatibility, but they will always try to read from this field first.
	CustomCompressedV1 []byte `protobuf:"bytes,4,opt,name=custom_compressed_v1,json=customCompressedV1" json:"custom_compressed_v1,omitempty"`
}

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

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

func (*UniquePosition) ProtoMessage() {}

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

// Deprecated: Marked as deprecated in unique_position.proto.
func (x *UniquePosition) GetValue() []byte {
	if x != nil {
		return x.Value
	}
	return nil
}

// Deprecated: Marked as deprecated in unique_position.proto.
func (x *UniquePosition) GetCompressedValue() []byte {
	if x != nil {
		return x.CompressedValue
	}
	return nil
}

// Deprecated: Marked as deprecated in unique_position.proto.
func (x *UniquePosition) GetUncompressedLength() uint64 {
	if x != nil && x.UncompressedLength != nil {
		return *x.UncompressedLength
	}
	return 0
}

func (x *UniquePosition) GetCustomCompressedV1() []byte {
	if x != nil {
		return x.CustomCompressedV1
	}
	return nil
}

var File_unique_position_proto protoreflect.FileDescriptor

var file_unique_position_proto_rawDesc = []byte{
	0x0a, 0x15, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
	0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x70, 0x62,
	0x22, 0xc0, 0x01, 0x0a, 0x0e, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74,
	0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01,
	0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2d, 0x0a,
	0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75,
	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d,
	0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x33, 0x0a, 0x13,
	0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e,
	0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x75,
	0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74,
	0x68, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x70,
	0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x76, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52,
	0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65,
	0x64, 0x56, 0x31, 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_unique_position_proto_rawDescOnce sync.Once
	file_unique_position_proto_rawDescData = file_unique_position_proto_rawDesc
)

func file_unique_position_proto_rawDescGZIP() []byte {
	file_unique_position_proto_rawDescOnce.Do(func() {
		file_unique_position_proto_rawDescData = protoimpl.X.CompressGZIP(file_unique_position_proto_rawDescData)
	})
	return file_unique_position_proto_rawDescData
}

var file_unique_position_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_unique_position_proto_goTypes = []interface{}{
	(*UniquePosition)(nil), // 0: sync_pb.UniquePosition
}
var file_unique_position_proto_depIdxs = []int32{
	0, // [0:0] is the sub-list for method output_type
	0, // [0:0] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_unique_position_proto_init() }
func file_unique_position_proto_init() {
	if File_unique_position_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_unique_position_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*UniquePosition); 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_unique_position_proto_rawDesc,
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_unique_position_proto_goTypes,
		DependencyIndexes: file_unique_position_proto_depIdxs,
		MessageInfos:      file_unique_position_proto_msgTypes,
	}.Build()
	File_unique_position_proto = out.File
	file_unique_position_proto_rawDesc = nil
	file_unique_position_proto_goTypes = nil
	file_unique_position_proto_depIdxs = nil
}
