Class Index

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.firestore.admin.v1.Index
All Implemented Interfaces:
IndexOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Index extends com.google.protobuf.GeneratedMessage implements IndexOrBuilder
 Cloud Firestore indexes enable simple and complex queries against
 documents in a database.
 
Protobuf type google.firestore.admin.v1.Index
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    API Scope defines the APIs (Firestore Native, or Firestore in Datastore Mode) that are supported for queries.
    static final class 
    Cloud Firestore indexes enable simple and complex queries against documents in a database.
    static enum 
    The density configuration for the index.
    static final class 
    A field in an index.
    static interface 
     
    static enum 
    Query Scope defines the scope at which a query is run.
    static enum 
    The state of an index.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    The API scope supported by this index.
    int
    The API scope supported by this index.
    static Index
     
     
    Immutable.
    int
    Immutable.
    static final com.google.protobuf.Descriptors.Descriptor
     
    getFields(int index)
    The fields supported by this index.
    int
    The fields supported by this index.
    The fields supported by this index.
    getFieldsOrBuilder(int index)
    The fields supported by this index.
    The fields supported by this index.
    boolean
    Optional.
    Output only.
    com.google.protobuf.ByteString
    Output only.
    com.google.protobuf.Parser<Index>
     
    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.
    int
    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.
    int
     
    int
    Optional.
    Output only.
    int
    Output only.
    boolean
    Optional.
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(Index prototype)
     
     
    protected Index.Builder
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static Index
     
    static Index
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Index
    parseFrom(byte[] data)
     
    static Index
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Index
    parseFrom(com.google.protobuf.ByteString data)
     
    static Index
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Index
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Index
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Index
     
    static Index
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Index
     
    static Index
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Index>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String getName()
       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.
       
      string name = 1;
      Specified by:
      getName in interface IndexOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       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.
       
      string name = 1;
      Specified by:
      getNameBytes in interface IndexOrBuilder
      Returns:
      The bytes for name.
    • getQueryScopeValue

      public int getQueryScopeValue()
       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.
       
      .google.firestore.admin.v1.Index.QueryScope query_scope = 2;
      Specified by:
      getQueryScopeValue in interface IndexOrBuilder
      Returns:
      The enum numeric value on the wire for queryScope.
    • getQueryScope

      public Index.QueryScope getQueryScope()
       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.
       
      .google.firestore.admin.v1.Index.QueryScope query_scope = 2;
      Specified by:
      getQueryScope in interface IndexOrBuilder
      Returns:
      The queryScope.
    • getApiScopeValue

      public int getApiScopeValue()
       The API scope supported by this index.
       
      .google.firestore.admin.v1.Index.ApiScope api_scope = 5;
      Specified by:
      getApiScopeValue in interface IndexOrBuilder
      Returns:
      The enum numeric value on the wire for apiScope.
    • getApiScope

      public Index.ApiScope getApiScope()
       The API scope supported by this index.
       
      .google.firestore.admin.v1.Index.ApiScope api_scope = 5;
      Specified by:
      getApiScope in interface IndexOrBuilder
      Returns:
      The apiScope.
    • getFieldsList

      public List<Index.IndexField> getFieldsList()
       The fields supported by this index.
      
       For composite indexes, this requires a minimum of 2 and a maximum of 100
       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.
       
      repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
      Specified by:
      getFieldsList in interface IndexOrBuilder
    • getFieldsOrBuilderList

      public List<? extends Index.IndexFieldOrBuilder> getFieldsOrBuilderList()
       The fields supported by this index.
      
       For composite indexes, this requires a minimum of 2 and a maximum of 100
       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.
       
      repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
      Specified by:
      getFieldsOrBuilderList in interface IndexOrBuilder
    • getFieldsCount

      public int getFieldsCount()
       The fields supported by this index.
      
       For composite indexes, this requires a minimum of 2 and a maximum of 100
       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.
       
      repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
      Specified by:
      getFieldsCount in interface IndexOrBuilder
    • getFields

      public Index.IndexField getFields(int index)
       The fields supported by this index.
      
       For composite indexes, this requires a minimum of 2 and a maximum of 100
       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.
       
      repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
      Specified by:
      getFields in interface IndexOrBuilder
    • getFieldsOrBuilder

      public Index.IndexFieldOrBuilder getFieldsOrBuilder(int index)
       The fields supported by this index.
      
       For composite indexes, this requires a minimum of 2 and a maximum of 100
       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.
       
      repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
      Specified by:
      getFieldsOrBuilder in interface IndexOrBuilder
    • getStateValue

      public int getStateValue()
       Output only. The serving state of the index.
       
      .google.firestore.admin.v1.Index.State state = 4;
      Specified by:
      getStateValue in interface IndexOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • getState

      public Index.State getState()
       Output only. The serving state of the index.
       
      .google.firestore.admin.v1.Index.State state = 4;
      Specified by:
      getState in interface IndexOrBuilder
      Returns:
      The state.
    • getDensityValue

      public int getDensityValue()
       Immutable. The density configuration of the index.
       
      .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getDensityValue in interface IndexOrBuilder
      Returns:
      The enum numeric value on the wire for density.
    • getDensity

      public Index.Density getDensity()
       Immutable. The density configuration of the index.
       
      .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getDensity in interface IndexOrBuilder
      Returns:
      The density.
    • getMultikey

      public boolean getMultikey()
       Optional. Whether the index is multikey. By default, the index is not
       multikey. For non-multikey indexes, none of the paths in the index
       definition reach or traverse an array, except via an explicit array index.
       For multikey indexes, at most one of the paths in the index definition
       reach or traverse an array, except via an explicit array index. Violations
       will result in errors.
      
       Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope.
       
      bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMultikey in interface IndexOrBuilder
      Returns:
      The multikey.
    • getShardCount

      public int getShardCount()
       Optional. The number of shards for the index.
       
      int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getShardCount in interface IndexOrBuilder
      Returns:
      The shardCount.
    • getUnique

      public boolean getUnique()
       Optional. Whether it is an unique index. Unique index ensures all values
       for the indexed field(s) are unique across documents.
       
      bool unique = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUnique in interface IndexOrBuilder
      Returns:
      The unique.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Index parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Index parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Index parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Index parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Index parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Index parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Index parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Index parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Index parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Index parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Index parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Index parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Index.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Index.Builder newBuilder()
    • newBuilder

      public static Index.Builder newBuilder(Index prototype)
    • toBuilder

      public Index.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Index.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Index getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Index> parser()
    • getParserForType

      public com.google.protobuf.Parser<Index> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Index getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder