public static final class Index.Builder extends GeneratedMessageV3.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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Index.BuilderImplements
IndexOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllFields(Iterable<? extends Index.IndexField> values)
public Index.Builder addAllFields(Iterable<? extends Index.IndexField> values)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
values | Iterable<? extends com.google.firestore.admin.v1.Index.IndexField> |
Type | Description |
Index.Builder |
addFields(Index.IndexField value)
public Index.Builder addFields(Index.IndexField value)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
value | Index.IndexField |
Type | Description |
Index.Builder |
addFields(Index.IndexField.Builder builderForValue)
public Index.Builder addFields(Index.IndexField.Builder builderForValue)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
builderForValue | Index.IndexField.Builder |
Type | Description |
Index.Builder |
addFields(int index, Index.IndexField value)
public Index.Builder addFields(int index, Index.IndexField value)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
value | Index.IndexField |
Type | Description |
Index.Builder |
addFields(int index, Index.IndexField.Builder builderForValue)
public Index.Builder addFields(int index, Index.IndexField.Builder builderForValue)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
builderForValue | Index.IndexField.Builder |
Type | Description |
Index.Builder |
addFieldsBuilder()
public Index.IndexField.Builder addFieldsBuilder()
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Type | Description |
Index.IndexField.Builder |
addFieldsBuilder(int index)
public Index.IndexField.Builder addFieldsBuilder(int index)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
Type | Description |
Index.IndexField.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Index.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Index.Builder |
build()
public Index build()
Type | Description |
Index |
buildPartial()
public Index buildPartial()
Type | Description |
Index |
clear()
public Index.Builder clear()
Type | Description |
Index.Builder |
clearField(Descriptors.FieldDescriptor field)
public Index.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Index.Builder |
clearFields()
public Index.Builder clearFields()
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Type | Description |
Index.Builder |
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;
Type | Description |
Index.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Index.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Index.Builder |
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;
Type | Description |
Index.Builder | 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;
Type | Description |
Index.Builder | This builder for chaining. |
clone()
public Index.Builder clone()
Type | Description |
Index.Builder |
getDefaultInstanceForType()
public Index getDefaultInstanceForType()
Type | Description |
Index |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getFields(int index)
public Index.IndexField getFields(int index)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
Type | Description |
Index.IndexField |
getFieldsBuilder(int index)
public Index.IndexField.Builder getFieldsBuilder(int index)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
Type | Description |
Index.IndexField.Builder |
getFieldsBuilderList()
public List<Index.IndexField.Builder> getFieldsBuilderList()
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Type | Description |
List<Builder> |
getFieldsCount()
public int getFieldsCount()
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Type | Description |
int |
getFieldsList()
public List<Index.IndexField> getFieldsList()
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Type | Description |
List<IndexField> |
getFieldsOrBuilder(int index)
public Index.IndexFieldOrBuilder getFieldsOrBuilder(int index)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
Type | Description |
Index.IndexFieldOrBuilder |
getFieldsOrBuilderList()
public List<? extends Index.IndexFieldOrBuilder> getFieldsOrBuilderList()
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Type | Description |
List<? extends com.google.firestore.admin.v1.Index.IndexFieldOrBuilder> |
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;
Type | Description |
String | The name. |
getNameBytes()
public 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;
Type | Description |
ByteString | The bytes for name. |
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;
Type | Description |
Index.QueryScope | The queryScope. |
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;
Type | Description |
int | The enum numeric value on the wire for queryScope. |
getState()
public Index.State getState()
Output only. The serving state of the index.
.google.firestore.admin.v1.Index.State state = 4;
Type | Description |
Index.State | The state. |
getStateValue()
public int getStateValue()
Output only. The serving state of the index.
.google.firestore.admin.v1.Index.State state = 4;
Type | Description |
int | The enum numeric value on the wire for state. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(Index other)
public Index.Builder mergeFrom(Index other)
Name | Description |
other | Index |
Type | Description |
Index.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Index.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Index.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Index.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Index.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Index.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Index.Builder |
removeFields(int index)
public Index.Builder removeFields(int index)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
Type | Description |
Index.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Index.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Index.Builder |
setFields(int index, Index.IndexField value)
public Index.Builder setFields(int index, Index.IndexField value)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
value | Index.IndexField |
Type | Description |
Index.Builder |
setFields(int index, Index.IndexField.Builder builderForValue)
public Index.Builder setFields(int index, Index.IndexField.Builder builderForValue)
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.
repeated .google.firestore.admin.v1.Index.IndexField fields = 3;
Name | Description |
index | int |
builderForValue | Index.IndexField.Builder |
Type | Description |
Index.Builder |
setName(String value)
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;
Name | Description |
value | String The name to set. |
Type | Description |
Index.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public Index.Builder setNameBytes(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;
Name | Description |
value | ByteString The bytes for name to set. |
Type | Description |
Index.Builder | This builder for chaining. |
setQueryScope(Index.QueryScope value)
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;
Name | Description |
value | Index.QueryScope The queryScope to set. |
Type | Description |
Index.Builder | This builder for chaining. |
setQueryScopeValue(int value)
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;
Name | Description |
value | int The enum numeric value on the wire for queryScope to set. |
Type | Description |
Index.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Index.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Index.Builder |
setState(Index.State value)
public Index.Builder setState(Index.State value)
Output only. The serving state of the index.
.google.firestore.admin.v1.Index.State state = 4;
Name | Description |
value | Index.State The state to set. |
Type | Description |
Index.Builder | This builder for chaining. |
setStateValue(int value)
public Index.Builder setStateValue(int value)
Output only. The serving state of the index.
.google.firestore.admin.v1.Index.State state = 4;
Name | Description |
value | int The enum numeric value on the wire for state to set. |
Type | Description |
Index.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Index.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Index.Builder |