Class Field.Builder

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

public static final class Field.Builder extends com.google.protobuf.GeneratedMessage.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
  • 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<Field.Builder>
    • clear

      public Field.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<Field.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<Field.Builder>
    • getDefaultInstanceForType

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

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

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

      public Field.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<Field.Builder>
    • mergeFrom

      public Field.Builder mergeFrom(Field other)
    • isInitialized

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

      public Field.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<Field.Builder>
      Throws:
      IOException
    • 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 can 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 can be quoted using `` ` `` (backtick). The only character that
       must 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:
       `` `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];
      Specified by:
      getName in interface FieldOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. A field name of the form:
       `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      
       A field path can 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 can be quoted using `` ` `` (backtick). The only character that
       must 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:
       `` `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];
      Specified by:
      getNameBytes in interface FieldOrBuilder
      Returns:
      The bytes for name.
    • setName

      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 can 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 can be quoted using `` ` `` (backtick). The only character that
       must 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:
       `` `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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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 can 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 can be quoted using `` ` `` (backtick). The only character that
       must 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:
       `` `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:
      This builder for chaining.
    • setNameBytes

      public Field.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. A field name of the form:
       `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
      
       A field path can 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 can be quoted using `` ` `` (backtick). The only character that
       must 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:
       `` `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];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasIndexConfig in interface FieldOrBuilder
      Returns:
      Whether the indexConfig field is set.
    • 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;
      Specified by:
      getIndexConfig in interface FieldOrBuilder
      Returns:
      The indexConfig.
    • setIndexConfig

      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;
    • setIndexConfig

      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;
    • mergeIndexConfig

      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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getIndexConfigOrBuilder in interface FieldOrBuilder
    • 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;
      Specified by:
      hasTtlConfig in interface FieldOrBuilder
      Returns:
      Whether the ttlConfig field is set.
    • 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;
      Specified by:
      getTtlConfig in interface FieldOrBuilder
      Returns:
      The ttlConfig.
    • setTtlConfig

      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;
    • setTtlConfig

      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;
    • mergeTtlConfig

      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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getTtlConfigOrBuilder in interface FieldOrBuilder