Class Field.Builder (3.6.0)

public static final class Field.Builder extends GeneratedMessageV3.Builder<Field.Builder> implements FieldOrBuilder

Represents a single field in the database. Fields are grouped by their "Collection Group", which represent all collections in the database with the same id.

Protobuf type google.firestore.admin.v1.Field

Implements

FieldOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Field.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Field.Builder
Overrides

build()

public Field build()
Returns
TypeDescription
Field

buildPartial()

public Field buildPartial()
Returns
TypeDescription
Field

clear()

public Field.Builder clear()
Returns
TypeDescription
Field.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Field.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Field.Builder
Overrides

clearIndexConfig()

public Field.Builder clearIndexConfig()

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Returns
TypeDescription
Field.Builder

clearName()

public Field.Builder clearName()

Required. A field name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path} A field path may be a simple field name, e.g. address or a path to fields within map_value , e.g. address.city, or a special field path. The only valid special field is , which represents any field. Field paths may be quoted using (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: , ., (backtick), [, ], as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) \address.city\ represents a field named address.city, not the map key city in the field address. \\ represents a field named , not any field. A special Field contains the default indexing settings for all fields. This field's resource name is: projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/* Indexes defined on this Field will be applied to all fields which do not have their own Field index configuration.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Field.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Field.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Field.Builder
Overrides

clearTtlConfig()

public Field.Builder clearTtlConfig()

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Returns
TypeDescription
Field.Builder

clone()

public Field.Builder clone()
Returns
TypeDescription
Field.Builder
Overrides

getDefaultInstanceForType()

public Field getDefaultInstanceForType()
Returns
TypeDescription
Field

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIndexConfig()

public Field.IndexConfig getIndexConfig()

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Returns
TypeDescription
Field.IndexConfig

The indexConfig.

getIndexConfigBuilder()

public Field.IndexConfig.Builder getIndexConfigBuilder()

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Returns
TypeDescription
Field.IndexConfig.Builder

getIndexConfigOrBuilder()

public Field.IndexConfigOrBuilder getIndexConfigOrBuilder()

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Returns
TypeDescription
Field.IndexConfigOrBuilder

getName()

public String getName()

Required. A field name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path} A field path may be a simple field name, e.g. address or a path to fields within map_value , e.g. address.city, or a special field path. The only valid special field is , which represents any field. Field paths may be quoted using (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: , ., (backtick), [, ], as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) \address.city\ represents a field named address.city, not the map key city in the field address. \\ represents a field named , not any field. A special Field contains the default indexing settings for all fields. This field's resource name is: projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/* Indexes defined on this Field will be applied to all fields which do not have their own Field index configuration.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. A field name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path} A field path may be a simple field name, e.g. address or a path to fields within map_value , e.g. address.city, or a special field path. The only valid special field is , which represents any field. Field paths may be quoted using (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: , ., (backtick), [, ], as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) \address.city\ represents a field named address.city, not the map key city in the field address. \\ represents a field named , not any field. A special Field contains the default indexing settings for all fields. This field's resource name is: projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/* Indexes defined on this Field will be applied to all fields which do not have their own Field index configuration.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for name.

getTtlConfig()

public Field.TtlConfig getTtlConfig()

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Returns
TypeDescription
Field.TtlConfig

The ttlConfig.

getTtlConfigBuilder()

public Field.TtlConfig.Builder getTtlConfigBuilder()

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Returns
TypeDescription
Field.TtlConfig.Builder

getTtlConfigOrBuilder()

public Field.TtlConfigOrBuilder getTtlConfigOrBuilder()

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Returns
TypeDescription
Field.TtlConfigOrBuilder

hasIndexConfig()

public boolean hasIndexConfig()

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Returns
TypeDescription
boolean

Whether the indexConfig field is set.

hasTtlConfig()

public boolean hasTtlConfig()

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Returns
TypeDescription
boolean

Whether the ttlConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Field other)

public Field.Builder mergeFrom(Field other)
Parameter
NameDescription
otherField
Returns
TypeDescription
Field.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Field.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Field.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Field.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Field.Builder
Overrides

mergeIndexConfig(Field.IndexConfig value)

public Field.Builder mergeIndexConfig(Field.IndexConfig value)

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Parameter
NameDescription
valueField.IndexConfig
Returns
TypeDescription
Field.Builder

mergeTtlConfig(Field.TtlConfig value)

public Field.Builder mergeTtlConfig(Field.TtlConfig value)

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Parameter
NameDescription
valueField.TtlConfig
Returns
TypeDescription
Field.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Field.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Field.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Field.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Field.Builder
Overrides

setIndexConfig(Field.IndexConfig value)

public Field.Builder setIndexConfig(Field.IndexConfig value)

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Parameter
NameDescription
valueField.IndexConfig
Returns
TypeDescription
Field.Builder

setIndexConfig(Field.IndexConfig.Builder builderForValue)

public Field.Builder setIndexConfig(Field.IndexConfig.Builder builderForValue)

The index configuration for this field. If unset, field indexing will revert to the configuration defined by the ancestor_field. To explicitly remove all indexes for this field, specify an index config with an empty list of indexes.

.google.firestore.admin.v1.Field.IndexConfig index_config = 2;

Parameter
NameDescription
builderForValueField.IndexConfig.Builder
Returns
TypeDescription
Field.Builder

setName(String value)

public Field.Builder setName(String value)

Required. A field name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path} A field path may be a simple field name, e.g. address or a path to fields within map_value , e.g. address.city, or a special field path. The only valid special field is , which represents any field. Field paths may be quoted using (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: , ., (backtick), [, ], as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) \address.city\ represents a field named address.city, not the map key city in the field address. \\ represents a field named , not any field. A special Field contains the default indexing settings for all fields. This field's resource name is: projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/* Indexes defined on this Field will be applied to all fields which do not have their own Field index configuration.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Field.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Field.Builder setNameBytes(ByteString value)

Required. A field name of the form projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path} A field path may be a simple field name, e.g. address or a path to fields within map_value , e.g. address.city, or a special field path. The only valid special field is , which represents any field. Field paths may be quoted using (backtick). The only character that needs to be escaped within a quoted field path is the backtick character itself, escaped using a backslash. Special characters in field paths that must be quoted include: , ., (backtick), [, ], as well as any ascii symbolic characters. Examples: (Note: Comments here are written in markdown syntax, so there is an additional layer of backticks to represent a code block) \address.city\ represents a field named address.city, not the map key city in the field address. \\ represents a field named , not any field. A special Field contains the default indexing settings for all fields. This field's resource name is: projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/* Indexes defined on this Field will be applied to all fields which do not have their own Field index configuration.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Field.Builder

This builder for chaining.

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

public Field.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Field.Builder
Overrides

setTtlConfig(Field.TtlConfig value)

public Field.Builder setTtlConfig(Field.TtlConfig value)

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Parameter
NameDescription
valueField.TtlConfig
Returns
TypeDescription
Field.Builder

setTtlConfig(Field.TtlConfig.Builder builderForValue)

public Field.Builder setTtlConfig(Field.TtlConfig.Builder builderForValue)

The TTL configuration for this Field. Setting or unsetting this will enable or disable the TTL for documents that have this Field.

.google.firestore.admin.v1.Field.TtlConfig ttl_config = 3;

Parameter
NameDescription
builderForValueField.TtlConfig.Builder
Returns
TypeDescription
Field.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Field.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Field.Builder
Overrides