Class Index.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Index.Builder>
com.google.firestore.admin.v1.Index.Builder
All Implemented Interfaces:
IndexOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Index

public static final class Index.Builder extends com.google.protobuf.GeneratedMessage.Builder<Index.Builder> implements IndexOrBuilder
 Cloud Firestore indexes enable simple and complex queries against
 documents in a database.
 
Protobuf type google.firestore.admin.v1.Index
  • 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.Builder<Index.Builder>
    • clear

      public Index.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Index.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Index.Builder>
    • getDefaultInstanceForType

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

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

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

      public Index.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Index.Builder>
    • mergeFrom

      public Index.Builder mergeFrom(Index other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Index.Builder>
    • mergeFrom

      public Index.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Index.Builder>
      Throws:
      IOException
    • 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.
    • setName

      public Index.Builder setName(String value)
       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;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Index.Builder clearName()
       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;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Index.Builder setNameBytes(com.google.protobuf.ByteString value)
       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;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • 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.
    • setQueryScopeValue

      public Index.Builder setQueryScopeValue(int value)
       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;
      Parameters:
      value - The enum numeric value on the wire for queryScope to set.
      Returns:
      This builder for chaining.
    • 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.
    • setQueryScope

      public Index.Builder setQueryScope(Index.QueryScope value)
       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;
      Parameters:
      value - The queryScope to set.
      Returns:
      This builder for chaining.
    • clearQueryScope

      public Index.Builder clearQueryScope()
       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;
      Returns:
      This builder for chaining.
    • 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.
    • setApiScopeValue

      public Index.Builder setApiScopeValue(int value)
       The API scope supported by this index.
       
      .google.firestore.admin.v1.Index.ApiScope api_scope = 5;
      Parameters:
      value - The enum numeric value on the wire for apiScope to set.
      Returns:
      This builder for chaining.
    • 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.
    • setApiScope

      public Index.Builder setApiScope(Index.ApiScope value)
       The API scope supported by this index.
       
      .google.firestore.admin.v1.Index.ApiScope api_scope = 5;
      Parameters:
      value - The apiScope to set.
      Returns:
      This builder for chaining.
    • clearApiScope

      public Index.Builder clearApiScope()
       The API scope supported by this index.
       
      .google.firestore.admin.v1.Index.ApiScope api_scope = 5;
      Returns:
      This builder for chaining.
    • 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
    • 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
    • setFields

      public Index.Builder setFields(int index, Index.IndexField value)
       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;
    • setFields

      public Index.Builder setFields(int index, Index.IndexField.Builder builderForValue)
       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;
    • addFields

      public Index.Builder addFields(Index.IndexField value)
       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;
    • addFields

      public Index.Builder addFields(int index, Index.IndexField value)
       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;
    • addFields

      public Index.Builder addFields(Index.IndexField.Builder builderForValue)
       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;
    • addFields

      public Index.Builder addFields(int index, Index.IndexField.Builder builderForValue)
       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;
    • addAllFields

      public Index.Builder addAllFields(Iterable<? extends Index.IndexField> values)
       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;
    • clearFields

      public Index.Builder clearFields()
       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;
    • removeFields

      public Index.Builder removeFields(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;
    • getFieldsBuilder

      public Index.IndexField.Builder getFieldsBuilder(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;
    • 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
    • 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
    • addFieldsBuilder

      public Index.IndexField.Builder addFieldsBuilder()
       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;
    • addFieldsBuilder

      public Index.IndexField.Builder addFieldsBuilder(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;
    • getFieldsBuilderList

      public List<Index.IndexField.Builder> getFieldsBuilderList()
       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;
    • 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.
    • setStateValue

      public Index.Builder setStateValue(int value)
       Output only. The serving state of the index.
       
      .google.firestore.admin.v1.Index.State state = 4;
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • 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.
    • setState

      public Index.Builder setState(Index.State value)
       Output only. The serving state of the index.
       
      .google.firestore.admin.v1.Index.State state = 4;
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Index.Builder clearState()
       Output only. The serving state of the index.
       
      .google.firestore.admin.v1.Index.State state = 4;
      Returns:
      This builder for chaining.
    • 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.
    • setDensityValue

      public Index.Builder setDensityValue(int value)
       Immutable. The density configuration of the index.
       
      .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The enum numeric value on the wire for density to set.
      Returns:
      This builder for chaining.
    • 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.
    • setDensity

      public Index.Builder setDensity(Index.Density value)
       Immutable. The density configuration of the index.
       
      .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The density to set.
      Returns:
      This builder for chaining.
    • clearDensity

      public Index.Builder clearDensity()
       Immutable. The density configuration of the index.
       
      .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • 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.
    • setMultikey

      public Index.Builder setMultikey(boolean value)
       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];
      Parameters:
      value - The multikey to set.
      Returns:
      This builder for chaining.
    • clearMultikey

      public Index.Builder clearMultikey()
       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];
      Returns:
      This builder for chaining.
    • 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.
    • setShardCount

      public Index.Builder setShardCount(int value)
       Optional. The number of shards for the index.
       
      int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The shardCount to set.
      Returns:
      This builder for chaining.
    • clearShardCount

      public Index.Builder clearShardCount()
       Optional. The number of shards for the index.
       
      int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • 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.
    • setUnique

      public Index.Builder setUnique(boolean value)
       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];
      Parameters:
      value - The unique to set.
      Returns:
      This builder for chaining.
    • clearUnique

      public Index.Builder clearUnique()
       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];
      Returns:
      This builder for chaining.