// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/admin/v1/index.proto

package admin // import "google.golang.org/genproto/googleapis/firestore/admin/v1"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"

// 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.ProtoPackageIsVersion2 // please upgrade the proto package

// Query Scope defines the scope at which a query is run. This is specified on
// a StructuredQuery's `from` field.
type Index_QueryScope int32

const (
	// The query scope is unspecified. Not a valid option.
	Index_QUERY_SCOPE_UNSPECIFIED Index_QueryScope = 0
	// Indexes with a collection query scope specified allow queries
	// against a collection that is the child of a specific document, specified
	// at query time, and that has the collection id specified by the index.
	Index_COLLECTION Index_QueryScope = 1
)

var Index_QueryScope_name = map[int32]string{
	0: "QUERY_SCOPE_UNSPECIFIED",
	1: "COLLECTION",
}
var Index_QueryScope_value = map[string]int32{
	"QUERY_SCOPE_UNSPECIFIED": 0,
	"COLLECTION":              1,
}

func (x Index_QueryScope) String() string {
	return proto.EnumName(Index_QueryScope_name, int32(x))
}
func (Index_QueryScope) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_index_fbb0c9a5fe3b28a1, []int{0, 0}
}

// The state of an index. During index creation, an index will be in the
// `CREATING` state. If the index is created successfully, it will transition
// to the `READY` state. If the index creation encounters a problem, the index
// will transition to the `NEEDS_REPAIR` state.
type Index_State int32

const (
	// The state is unspecified.
	Index_STATE_UNSPECIFIED Index_State = 0
	// The index is being created.
	// There is an active long-running operation for the index.
	// The index is updated when writing a document.
	// Some index data may exist.
	Index_CREATING Index_State = 1
	// The index is ready to be used.
	// The index is updated when writing a document.
	// The index is fully populated from all stored documents it applies to.
	Index_READY Index_State = 2
	// The index was being created, but something went wrong.
	// There is no active long-running operation for the index,
	// and the most recently finished long-running operation failed.
	// The index is not updated when writing a document.
	// Some index data may exist.
	// Use the google.longrunning.Operations API to determine why the operation
	// that last attempted to create this index failed, then re-create the
	// index.
	Index_NEEDS_REPAIR Index_State = 3
)

var Index_State_name = map[int32]string{
	0: "STATE_UNSPECIFIED",
	1: "CREATING",
	2: "READY",
	3: "NEEDS_REPAIR",
}
var Index_State_value = map[string]int32{
	"STATE_UNSPECIFIED": 0,
	"CREATING":          1,
	"READY":             2,
	"NEEDS_REPAIR":      3,
}

func (x Index_State) String() string {
	return proto.EnumName(Index_State_name, int32(x))
}
func (Index_State) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_index_fbb0c9a5fe3b28a1, []int{0, 1}
}

// The supported orderings.
type Index_IndexField_Order int32

const (
	// The ordering is unspecified. Not a valid option.
	Index_IndexField_ORDER_UNSPECIFIED Index_IndexField_Order = 0
	// The field is ordered by ascending field value.
	Index_IndexField_ASCENDING Index_IndexField_Order = 1
	// The field is ordered by descending field value.
	Index_IndexField_DESCENDING Index_IndexField_Order = 2
)

var Index_IndexField_Order_name = map[int32]string{
	0: "ORDER_UNSPECIFIED",
	1: "ASCENDING",
	2: "DESCENDING",
}
var Index_IndexField_Order_value = map[string]int32{
	"ORDER_UNSPECIFIED": 0,
	"ASCENDING":         1,
	"DESCENDING":        2,
}

func (x Index_IndexField_Order) String() string {
	return proto.EnumName(Index_IndexField_Order_name, int32(x))
}
func (Index_IndexField_Order) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_index_fbb0c9a5fe3b28a1, []int{0, 0, 0}
}

// The supported array value configurations.
type Index_IndexField_ArrayConfig int32

const (
	// The index does not support additional array queries.
	Index_IndexField_ARRAY_CONFIG_UNSPECIFIED Index_IndexField_ArrayConfig = 0
	// The index supports array containment queries.
	Index_IndexField_CONTAINS Index_IndexField_ArrayConfig = 1
)

var Index_IndexField_ArrayConfig_name = map[int32]string{
	0: "ARRAY_CONFIG_UNSPECIFIED",
	1: "CONTAINS",
}
var Index_IndexField_ArrayConfig_value = map[string]int32{
	"ARRAY_CONFIG_UNSPECIFIED": 0,
	"CONTAINS":                 1,
}

func (x Index_IndexField_ArrayConfig) String() string {
	return proto.EnumName(Index_IndexField_ArrayConfig_name, int32(x))
}
func (Index_IndexField_ArrayConfig) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_index_fbb0c9a5fe3b28a1, []int{0, 0, 1}
}

// Cloud Firestore indexes enable simple and complex queries against
// documents in a database.
type Index struct {
	// Output only.
	// A server defined name for this index.
	// The form of this name for composite indexes will be:
	// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
	// For single field indexes, this field will be empty.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Indexes with a collection query scope specified allow queries
	// against a collection that is the child of a specific document, specified at
	// query time, and that has the same collection id.
	//
	// Indexes with a collection group query scope specified allow queries against
	// all collections descended from a specific document, specified at query
	// time, and that have the same collection id as this index.
	QueryScope Index_QueryScope `protobuf:"varint,2,opt,name=query_scope,json=queryScope,proto3,enum=google.firestore.admin.v1.Index_QueryScope" json:"query_scope,omitempty"`
	// The fields supported by this index.
	//
	// For composite indexes, this is always 2 or more fields.
	// The last field entry is always for the field path `__name__`. If, on
	// creation, `__name__` was not specified as the last field, it will be added
	// automatically with the same direction as that of the last field defined. If
	// the final field in a composite index is not directional, the `__name__`
	// will be ordered ASCENDING (unless explicitly specified).
	//
	// For single field indexes, this will always be exactly one entry with a
	// field path equal to the field path of the associated field.
	Fields []*Index_IndexField `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty"`
	// Output only.
	// The serving state of the index.
	State                Index_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.firestore.admin.v1.Index_State" json:"state,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (m *Index) Reset()         { *m = Index{} }
func (m *Index) String() string { return proto.CompactTextString(m) }
func (*Index) ProtoMessage()    {}
func (*Index) Descriptor() ([]byte, []int) {
	return fileDescriptor_index_fbb0c9a5fe3b28a1, []int{0}
}
func (m *Index) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Index.Unmarshal(m, b)
}
func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Index.Marshal(b, m, deterministic)
}
func (dst *Index) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Index.Merge(dst, src)
}
func (m *Index) XXX_Size() int {
	return xxx_messageInfo_Index.Size(m)
}
func (m *Index) XXX_DiscardUnknown() {
	xxx_messageInfo_Index.DiscardUnknown(m)
}

var xxx_messageInfo_Index proto.InternalMessageInfo

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

func (m *Index) GetQueryScope() Index_QueryScope {
	if m != nil {
		return m.QueryScope
	}
	return Index_QUERY_SCOPE_UNSPECIFIED
}

func (m *Index) GetFields() []*Index_IndexField {
	if m != nil {
		return m.Fields
	}
	return nil
}

func (m *Index) GetState() Index_State {
	if m != nil {
		return m.State
	}
	return Index_STATE_UNSPECIFIED
}

// A field in an index.
// The field_path describes which field is indexed, the value_mode describes
// how the field value is indexed.
type Index_IndexField struct {
	// Can be __name__.
	// For single field indexes, this must match the name of the field or may
	// be omitted.
	FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath,proto3" json:"field_path,omitempty"`
	// How the field value is indexed.
	//
	// Types that are valid to be assigned to ValueMode:
	//	*Index_IndexField_Order_
	//	*Index_IndexField_ArrayConfig_
	ValueMode            isIndex_IndexField_ValueMode `protobuf_oneof:"value_mode"`
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

func (m *Index_IndexField) Reset()         { *m = Index_IndexField{} }
func (m *Index_IndexField) String() string { return proto.CompactTextString(m) }
func (*Index_IndexField) ProtoMessage()    {}
func (*Index_IndexField) Descriptor() ([]byte, []int) {
	return fileDescriptor_index_fbb0c9a5fe3b28a1, []int{0, 0}
}
func (m *Index_IndexField) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Index_IndexField.Unmarshal(m, b)
}
func (m *Index_IndexField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Index_IndexField.Marshal(b, m, deterministic)
}
func (dst *Index_IndexField) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Index_IndexField.Merge(dst, src)
}
func (m *Index_IndexField) XXX_Size() int {
	return xxx_messageInfo_Index_IndexField.Size(m)
}
func (m *Index_IndexField) XXX_DiscardUnknown() {
	xxx_messageInfo_Index_IndexField.DiscardUnknown(m)
}

var xxx_messageInfo_Index_IndexField proto.InternalMessageInfo

func (m *Index_IndexField) GetFieldPath() string {
	if m != nil {
		return m.FieldPath
	}
	return ""
}

type isIndex_IndexField_ValueMode interface {
	isIndex_IndexField_ValueMode()
}

type Index_IndexField_Order_ struct {
	Order Index_IndexField_Order `protobuf:"varint,2,opt,name=order,proto3,enum=google.firestore.admin.v1.Index_IndexField_Order,oneof"`
}

type Index_IndexField_ArrayConfig_ struct {
	ArrayConfig Index_IndexField_ArrayConfig `protobuf:"varint,3,opt,name=array_config,json=arrayConfig,proto3,enum=google.firestore.admin.v1.Index_IndexField_ArrayConfig,oneof"`
}

func (*Index_IndexField_Order_) isIndex_IndexField_ValueMode() {}

func (*Index_IndexField_ArrayConfig_) isIndex_IndexField_ValueMode() {}

func (m *Index_IndexField) GetValueMode() isIndex_IndexField_ValueMode {
	if m != nil {
		return m.ValueMode
	}
	return nil
}

func (m *Index_IndexField) GetOrder() Index_IndexField_Order {
	if x, ok := m.GetValueMode().(*Index_IndexField_Order_); ok {
		return x.Order
	}
	return Index_IndexField_ORDER_UNSPECIFIED
}

func (m *Index_IndexField) GetArrayConfig() Index_IndexField_ArrayConfig {
	if x, ok := m.GetValueMode().(*Index_IndexField_ArrayConfig_); ok {
		return x.ArrayConfig
	}
	return Index_IndexField_ARRAY_CONFIG_UNSPECIFIED
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*Index_IndexField) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _Index_IndexField_OneofMarshaler, _Index_IndexField_OneofUnmarshaler, _Index_IndexField_OneofSizer, []interface{}{
		(*Index_IndexField_Order_)(nil),
		(*Index_IndexField_ArrayConfig_)(nil),
	}
}

func _Index_IndexField_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*Index_IndexField)
	// value_mode
	switch x := m.ValueMode.(type) {
	case *Index_IndexField_Order_:
		b.EncodeVarint(2<<3 | proto.WireVarint)
		b.EncodeVarint(uint64(x.Order))
	case *Index_IndexField_ArrayConfig_:
		b.EncodeVarint(3<<3 | proto.WireVarint)
		b.EncodeVarint(uint64(x.ArrayConfig))
	case nil:
	default:
		return fmt.Errorf("Index_IndexField.ValueMode has unexpected type %T", x)
	}
	return nil
}

func _Index_IndexField_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*Index_IndexField)
	switch tag {
	case 2: // value_mode.order
		if wire != proto.WireVarint {
			return true, proto.ErrInternalBadWireType
		}
		x, err := b.DecodeVarint()
		m.ValueMode = &Index_IndexField_Order_{Index_IndexField_Order(x)}
		return true, err
	case 3: // value_mode.array_config
		if wire != proto.WireVarint {
			return true, proto.ErrInternalBadWireType
		}
		x, err := b.DecodeVarint()
		m.ValueMode = &Index_IndexField_ArrayConfig_{Index_IndexField_ArrayConfig(x)}
		return true, err
	default:
		return false, nil
	}
}

func _Index_IndexField_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*Index_IndexField)
	// value_mode
	switch x := m.ValueMode.(type) {
	case *Index_IndexField_Order_:
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(x.Order))
	case *Index_IndexField_ArrayConfig_:
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(x.ArrayConfig))
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

func init() {
	proto.RegisterType((*Index)(nil), "google.firestore.admin.v1.Index")
	proto.RegisterType((*Index_IndexField)(nil), "google.firestore.admin.v1.Index.IndexField")
	proto.RegisterEnum("google.firestore.admin.v1.Index_QueryScope", Index_QueryScope_name, Index_QueryScope_value)
	proto.RegisterEnum("google.firestore.admin.v1.Index_State", Index_State_name, Index_State_value)
	proto.RegisterEnum("google.firestore.admin.v1.Index_IndexField_Order", Index_IndexField_Order_name, Index_IndexField_Order_value)
	proto.RegisterEnum("google.firestore.admin.v1.Index_IndexField_ArrayConfig", Index_IndexField_ArrayConfig_name, Index_IndexField_ArrayConfig_value)
}

func init() {
	proto.RegisterFile("google/firestore/admin/v1/index.proto", fileDescriptor_index_fbb0c9a5fe3b28a1)
}

var fileDescriptor_index_fbb0c9a5fe3b28a1 = []byte{
	// 554 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xdf, 0x6a, 0xdb, 0x30,
	0x14, 0xc6, 0x6b, 0xa7, 0x2e, 0xcb, 0x49, 0x56, 0x3c, 0xc1, 0x98, 0xd7, 0xb5, 0xac, 0x04, 0x36,
	0x02, 0x03, 0x9b, 0x6c, 0x17, 0xa3, 0xec, 0x0f, 0x38, 0xb6, 0x92, 0x1a, 0x82, 0xed, 0xca, 0x69,
	0x21, 0x23, 0x60, 0xb4, 0x58, 0x71, 0x0d, 0x89, 0x95, 0xda, 0x4e, 0x58, 0x5f, 0x67, 0x97, 0x7b,
	0x82, 0x3d, 0xc3, 0xee, 0x76, 0xbf, 0x87, 0x19, 0x96, 0xb3, 0x64, 0x94, 0x96, 0xad, 0x37, 0xe6,
	0xc8, 0xfe, 0xbe, 0xdf, 0xa7, 0x63, 0xe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