Class Index.Builder (2.30.0)

publicstaticfinalclass Index.BuilderextendsGeneratedMessageV3.Builder<Index.Builder>implementsIndexOrBuilder

Datastore composite index definition.

Protobuf type google.datastore.admin.v1.Index

Implements

IndexOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllProperties(Iterable<? extends Index.IndexedProperty> values)

publicIndex.BuilderaddAllProperties(Iterable<?extendsIndex.IndexedProperty>values)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.datastore.admin.v1.Index.IndexedProperty>
Returns
Type Description
Index.Builder

addProperties(Index.IndexedProperty value)

publicIndex.BuilderaddProperties(Index.IndexedPropertyvalue)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Index.IndexedProperty
Returns
Type Description
Index.Builder

addProperties(Index.IndexedProperty.Builder builderForValue)

publicIndex.BuilderaddProperties(Index.IndexedProperty.BuilderbuilderForValue)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Index.IndexedProperty.Builder
Returns
Type Description
Index.Builder

addProperties(int index, Index.IndexedProperty value)

publicIndex.BuilderaddProperties(intindex,Index.IndexedPropertyvalue)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value Index.IndexedProperty
Returns
Type Description
Index.Builder

addProperties(int index, Index.IndexedProperty.Builder builderForValue)

publicIndex.BuilderaddProperties(intindex,Index.IndexedProperty.BuilderbuilderForValue)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue Index.IndexedProperty.Builder
Returns
Type Description
Index.Builder

addPropertiesBuilder()

publicIndex.IndexedProperty.BuilderaddPropertiesBuilder()

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Index.IndexedProperty.Builder

addPropertiesBuilder(int index)

publicIndex.IndexedProperty.BuilderaddPropertiesBuilder(intindex)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Index.IndexedProperty.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicIndex.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Index.Builder
Overrides

build()

publicIndexbuild()
Returns
Type Description
Index

buildPartial()

publicIndexbuildPartial()
Returns
Type Description
Index

clear()

publicIndex.Builderclear()
Returns
Type Description
Index.Builder
Overrides

clearAncestor()

publicIndex.BuilderclearAncestor()

Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Index.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicIndex.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Index.Builder
Overrides

clearIndexId()

publicIndex.BuilderclearIndexId()

Output only. The resource ID of the index.

string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Index.Builder

This builder for chaining.

clearKind()

publicIndex.BuilderclearKind()

Required. The entity kind to which this index applies.

string kind = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Index.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicIndex.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Index.Builder
Overrides

clearProjectId()

publicIndex.BuilderclearProjectId()

Output only. Project ID.

string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Index.Builder

This builder for chaining.

clearProperties()

publicIndex.BuilderclearProperties()

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Index.Builder

clearState()

publicIndex.BuilderclearState()

Output only. The state of the index.

.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Index.Builder

This builder for chaining.

clone()

publicIndex.Builderclone()
Returns
Type Description
Index.Builder
Overrides

getAncestor()

publicIndex.AncestorModegetAncestor()

Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Index.AncestorMode

The ancestor.

getAncestorValue()

publicintgetAncestorValue()

Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for ancestor.

getDefaultInstanceForType()

publicIndexgetDefaultInstanceForType()
Returns
Type Description
Index

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getIndexId()

publicStringgetIndexId()

Output only. The resource ID of the index.

string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The indexId.

getIndexIdBytes()

publicByteStringgetIndexIdBytes()

Output only. The resource ID of the index.

string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for indexId.

getKind()

publicStringgetKind()

Required. The entity kind to which this index applies.

string kind = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The kind.

getKindBytes()

publicByteStringgetKindBytes()

Required. The entity kind to which this index applies.

string kind = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for kind.

getProjectId()

publicStringgetProjectId()

Output only. Project ID.

string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The projectId.

getProjectIdBytes()

publicByteStringgetProjectIdBytes()

Output only. Project ID.

string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for projectId.

getProperties(int index)

publicIndex.IndexedPropertygetProperties(intindex)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Index.IndexedProperty

getPropertiesBuilder(int index)

publicIndex.IndexedProperty.BuildergetPropertiesBuilder(intindex)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Index.IndexedProperty.Builder

getPropertiesBuilderList()

publicList<Index.IndexedProperty.Builder>getPropertiesBuilderList()

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getPropertiesCount()

publicintgetPropertiesCount()

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getPropertiesList()

publicList<Index.IndexedProperty>getPropertiesList()

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<IndexedProperty>

getPropertiesOrBuilder(int index)

publicIndex.IndexedPropertyOrBuildergetPropertiesOrBuilder(intindex)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Index.IndexedPropertyOrBuilder

getPropertiesOrBuilderList()

publicList<?extendsIndex.IndexedPropertyOrBuilder>getPropertiesOrBuilderList()

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.datastore.admin.v1.Index.IndexedPropertyOrBuilder>

getState()

publicIndex.StategetState()

Output only. The state of the index.

.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Index.State

The state.

getStateValue()

publicintgetStateValue()

Output only. The state of the index.

.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Index other)

publicIndex.BuildermergeFrom(Indexother)
Parameter
Name Description
other Index
Returns
Type Description
Index.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicIndex.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Index.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicIndex.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Index.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalIndex.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Index.Builder
Overrides

removeProperties(int index)

publicIndex.BuilderremoveProperties(intindex)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Index.Builder

setAncestor(Index.AncestorMode value)

publicIndex.BuildersetAncestor(Index.AncestorModevalue)

Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Index.AncestorMode

The ancestor to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setAncestorValue(int value)

publicIndex.BuildersetAncestorValue(intvalue)

Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.

.google.datastore.admin.v1.Index.AncestorMode ancestor = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for ancestor to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicIndex.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Index.Builder
Overrides

setIndexId(String value)

publicIndex.BuildersetIndexId(Stringvalue)

Output only. The resource ID of the index.

string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The indexId to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setIndexIdBytes(ByteString value)

publicIndex.BuildersetIndexIdBytes(ByteStringvalue)

Output only. The resource ID of the index.

string index_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for indexId to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setKind(String value)

publicIndex.BuildersetKind(Stringvalue)

Required. The entity kind to which this index applies.

string kind = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setKindBytes(ByteString value)

publicIndex.BuildersetKindBytes(ByteStringvalue)

Required. The entity kind to which this index applies.

string kind = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setProjectId(String value)

publicIndex.BuildersetProjectId(Stringvalue)

Output only. Project ID.

string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The projectId to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setProjectIdBytes(ByteString value)

publicIndex.BuildersetProjectIdBytes(ByteStringvalue)

Output only. Project ID.

string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for projectId to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setProperties(int index, Index.IndexedProperty value)

publicIndex.BuildersetProperties(intindex,Index.IndexedPropertyvalue)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value Index.IndexedProperty
Returns
Type Description
Index.Builder

setProperties(int index, Index.IndexedProperty.Builder builderForValue)

publicIndex.BuildersetProperties(intindex,Index.IndexedProperty.BuilderbuilderForValue)

Required. An ordered sequence of property names and their index attributes.

Requires:

  • A maximum of 100 properties.

repeated .google.datastore.admin.v1.Index.IndexedProperty properties = 6 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue Index.IndexedProperty.Builder
Returns
Type Description
Index.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicIndex.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Index.Builder
Overrides

setState(Index.State value)

publicIndex.BuildersetState(Index.Statevalue)

Output only. The state of the index.

.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Index.State

The state to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setStateValue(int value)

publicIndex.BuildersetStateValue(intvalue)

Output only. The state of the index.

.google.datastore.admin.v1.Index.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
Index.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalIndex.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Index.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.