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

package admin

import (
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
	_ "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.ProtoPackageIsVersion3 // 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_91374f42b54eaaef, []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_91374f42b54eaaef, []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_91374f42b54eaaef, []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_91374f42b54eaaef, []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.v1beta2.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.v1beta2.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_91374f42b54eaaef, []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 (m *Index) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Index.Merge(m, 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_91374f42b54eaaef, []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 (m *Index_IndexField) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Index_IndexField.Merge(m, 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.v1beta2.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.v1beta2.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_OneofWrappers is for the internal use of the proto package.
func (*Index_IndexField) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*Index_IndexField_Order_)(nil),
		(*Index_IndexField_ArrayConfig_)(nil),
	}
}

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

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

var fileDescriptor_91374f42b54eaaef = []byte{
	// 545 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6b, 0xdb, 0x4c,
	0x10, 0xc6, 0x23, 0x39, 0x0a, 0xaf, 0xc7, 0x7e, 0x83, 0xba, 0x50, 0x2a, 0xd2, 0xb4, 0x18, 0xd1,
	0x83, 0x69, 0x41, 0x6a, 0x52, 0x28, 0x84, 0xb6, 0x07, 0x59, 0x5a, 0xdb, 0x82, 0x20, 0xc9, 0x2b,
	0xa7, 0xe0, 0x5e, 0xc4, 0xc6, 0x5a, 0x2b, 0x02, 0x5b, 0xeb, 0x48, 0x72, 0x68, 0xbe, 0x4e, 0xa1,
	0x97, 0x7e, 0xb0, 0x1e, 0xfa, 0x29, 0x8a, 0x56, 0xc2, 0x2e, 0xa1, 0x7f, 0x92, 0x8b, 0xd8, 0x91,
	0x9e, 0xe7, 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