Class Target.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
com.google.firestore.v1.Target.Builder
All Implemented Interfaces:
TargetOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Target

public static final class Target.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder> implements TargetOrBuilder
 A specification of a set of documents to listen to.
 
Protobuf type google.firestore.v1.Target
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • clear

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

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

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

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

      public Target.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • setField

      public Target.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • clearField

      public Target.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • clearOneof

      public Target.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • setRepeatedField

      public Target.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • addRepeatedField

      public Target.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • mergeFrom

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

      public Target.Builder mergeFrom(Target other)
    • isInitialized

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

      public Target.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<Target.Builder>
      Throws:
      IOException
    • getTargetTypeCase

      public Target.TargetTypeCase getTargetTypeCase()
      Specified by:
      getTargetTypeCase in interface TargetOrBuilder
    • clearTargetType

      public Target.Builder clearTargetType()
    • getResumeTypeCase

      public Target.ResumeTypeCase getResumeTypeCase()
      Specified by:
      getResumeTypeCase in interface TargetOrBuilder
    • clearResumeType

      public Target.Builder clearResumeType()
    • hasQuery

      public boolean hasQuery()
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
      Specified by:
      hasQuery in interface TargetOrBuilder
      Returns:
      Whether the query field is set.
    • getQuery

      public Target.QueryTarget getQuery()
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
      Specified by:
      getQuery in interface TargetOrBuilder
      Returns:
      The query.
    • setQuery

      public Target.Builder setQuery(Target.QueryTarget value)
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
    • setQuery

      public Target.Builder setQuery(Target.QueryTarget.Builder builderForValue)
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
    • mergeQuery

      public Target.Builder mergeQuery(Target.QueryTarget value)
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
    • clearQuery

      public Target.Builder clearQuery()
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
    • getQueryBuilder

      public Target.QueryTarget.Builder getQueryBuilder()
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
    • getQueryOrBuilder

      public Target.QueryTargetOrBuilder getQueryOrBuilder()
       A target specified by a query.
       
      .google.firestore.v1.Target.QueryTarget query = 2;
      Specified by:
      getQueryOrBuilder in interface TargetOrBuilder
    • hasDocuments

      public boolean hasDocuments()
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
      Specified by:
      hasDocuments in interface TargetOrBuilder
      Returns:
      Whether the documents field is set.
    • getDocuments

      public Target.DocumentsTarget getDocuments()
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
      Specified by:
      getDocuments in interface TargetOrBuilder
      Returns:
      The documents.
    • setDocuments

      public Target.Builder setDocuments(Target.DocumentsTarget value)
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
    • setDocuments

      public Target.Builder setDocuments(Target.DocumentsTarget.Builder builderForValue)
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
    • mergeDocuments

      public Target.Builder mergeDocuments(Target.DocumentsTarget value)
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
    • clearDocuments

      public Target.Builder clearDocuments()
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
    • getDocumentsBuilder

      public Target.DocumentsTarget.Builder getDocumentsBuilder()
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
    • getDocumentsOrBuilder

      public Target.DocumentsTargetOrBuilder getDocumentsOrBuilder()
       A target specified by a set of document names.
       
      .google.firestore.v1.Target.DocumentsTarget documents = 3;
      Specified by:
      getDocumentsOrBuilder in interface TargetOrBuilder
    • hasResumeToken

      public boolean hasResumeToken()
       A resume token from a prior
       [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      
       Using a resume token with a different target is unsupported and may fail.
       
      bytes resume_token = 4;
      Specified by:
      hasResumeToken in interface TargetOrBuilder
      Returns:
      Whether the resumeToken field is set.
    • getResumeToken

      public com.google.protobuf.ByteString getResumeToken()
       A resume token from a prior
       [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      
       Using a resume token with a different target is unsupported and may fail.
       
      bytes resume_token = 4;
      Specified by:
      getResumeToken in interface TargetOrBuilder
      Returns:
      The resumeToken.
    • setResumeToken

      public Target.Builder setResumeToken(com.google.protobuf.ByteString value)
       A resume token from a prior
       [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      
       Using a resume token with a different target is unsupported and may fail.
       
      bytes resume_token = 4;
      Parameters:
      value - The resumeToken to set.
      Returns:
      This builder for chaining.
    • clearResumeToken

      public Target.Builder clearResumeToken()
       A resume token from a prior
       [TargetChange][google.firestore.v1.TargetChange] for an identical target.
      
       Using a resume token with a different target is unsupported and may fail.
       
      bytes resume_token = 4;
      Returns:
      This builder for chaining.
    • hasReadTime

      public boolean hasReadTime()
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
      Specified by:
      hasReadTime in interface TargetOrBuilder
      Returns:
      Whether the readTime field is set.
    • getReadTime

      public com.google.protobuf.Timestamp getReadTime()
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
      Specified by:
      getReadTime in interface TargetOrBuilder
      Returns:
      The readTime.
    • setReadTime

      public Target.Builder setReadTime(com.google.protobuf.Timestamp value)
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
    • setReadTime

      public Target.Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
    • mergeReadTime

      public Target.Builder mergeReadTime(com.google.protobuf.Timestamp value)
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
    • clearReadTime

      public Target.Builder clearReadTime()
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
    • getReadTimeBuilder

      public com.google.protobuf.Timestamp.Builder getReadTimeBuilder()
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
    • getReadTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder()
       Start listening after a specific `read_time`.
      
       The client must know the state of matching documents at this time.
       
      .google.protobuf.Timestamp read_time = 11;
      Specified by:
      getReadTimeOrBuilder in interface TargetOrBuilder
    • getTargetId

      public int getTargetId()
       The target ID that identifies the target on the stream. Must be a positive
       number and non-zero.
      
       If `target_id` is 0 (or unspecified), the server will assign an ID for this
       target and return that in a `TargetChange::ADD` event. Once a target with
       `target_id=0` is added, all subsequent targets must also have
       `target_id=0`. If an `AddTarget` request with `target_id != 0` is
       sent to the server after a target with `target_id=0` is added, the server
       will immediately send a response with a `TargetChange::Remove` event.
      
       Note that if the client sends multiple `AddTarget` requests
       without an ID, the order of IDs returned in `TargetChage.target_ids` are
       undefined. Therefore, clients should provide a target ID instead of relying
       on the server to assign one.
      
       If `target_id` is non-zero, there must not be an existing active target on
       this stream with the same ID.
       
      int32 target_id = 5;
      Specified by:
      getTargetId in interface TargetOrBuilder
      Returns:
      The targetId.
    • setTargetId

      public Target.Builder setTargetId(int value)
       The target ID that identifies the target on the stream. Must be a positive
       number and non-zero.
      
       If `target_id` is 0 (or unspecified), the server will assign an ID for this
       target and return that in a `TargetChange::ADD` event. Once a target with
       `target_id=0` is added, all subsequent targets must also have
       `target_id=0`. If an `AddTarget` request with `target_id != 0` is
       sent to the server after a target with `target_id=0` is added, the server
       will immediately send a response with a `TargetChange::Remove` event.
      
       Note that if the client sends multiple `AddTarget` requests
       without an ID, the order of IDs returned in `TargetChage.target_ids` are
       undefined. Therefore, clients should provide a target ID instead of relying
       on the server to assign one.
      
       If `target_id` is non-zero, there must not be an existing active target on
       this stream with the same ID.
       
      int32 target_id = 5;
      Parameters:
      value - The targetId to set.
      Returns:
      This builder for chaining.
    • clearTargetId

      public Target.Builder clearTargetId()
       The target ID that identifies the target on the stream. Must be a positive
       number and non-zero.
      
       If `target_id` is 0 (or unspecified), the server will assign an ID for this
       target and return that in a `TargetChange::ADD` event. Once a target with
       `target_id=0` is added, all subsequent targets must also have
       `target_id=0`. If an `AddTarget` request with `target_id != 0` is
       sent to the server after a target with `target_id=0` is added, the server
       will immediately send a response with a `TargetChange::Remove` event.
      
       Note that if the client sends multiple `AddTarget` requests
       without an ID, the order of IDs returned in `TargetChage.target_ids` are
       undefined. Therefore, clients should provide a target ID instead of relying
       on the server to assign one.
      
       If `target_id` is non-zero, there must not be an existing active target on
       this stream with the same ID.
       
      int32 target_id = 5;
      Returns:
      This builder for chaining.
    • getOnce

      public boolean getOnce()
       If the target should be removed once it is current and consistent.
       
      bool once = 6;
      Specified by:
      getOnce in interface TargetOrBuilder
      Returns:
      The once.
    • setOnce

      public Target.Builder setOnce(boolean value)
       If the target should be removed once it is current and consistent.
       
      bool once = 6;
      Parameters:
      value - The once to set.
      Returns:
      This builder for chaining.
    • clearOnce

      public Target.Builder clearOnce()
       If the target should be removed once it is current and consistent.
       
      bool once = 6;
      Returns:
      This builder for chaining.
    • hasExpectedCount

      public boolean hasExpectedCount()
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
      Specified by:
      hasExpectedCount in interface TargetOrBuilder
      Returns:
      Whether the expectedCount field is set.
    • getExpectedCount

      public com.google.protobuf.Int32Value getExpectedCount()
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
      Specified by:
      getExpectedCount in interface TargetOrBuilder
      Returns:
      The expectedCount.
    • setExpectedCount

      public Target.Builder setExpectedCount(com.google.protobuf.Int32Value value)
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
    • setExpectedCount

      public Target.Builder setExpectedCount(com.google.protobuf.Int32Value.Builder builderForValue)
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
    • mergeExpectedCount

      public Target.Builder mergeExpectedCount(com.google.protobuf.Int32Value value)
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
    • clearExpectedCount

      public Target.Builder clearExpectedCount()
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
    • getExpectedCountBuilder

      public com.google.protobuf.Int32Value.Builder getExpectedCountBuilder()
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
    • getExpectedCountOrBuilder

      public com.google.protobuf.Int32ValueOrBuilder getExpectedCountOrBuilder()
       The number of documents that last matched the query at the resume token or
       read time.
      
       This value is only relevant when a `resume_type` is provided. This value
       being present and greater than zero signals that the client wants
       `ExistenceFilter.unchanged_names` to be included in the response.
       
      .google.protobuf.Int32Value expected_count = 12;
      Specified by:
      getExpectedCountOrBuilder in interface TargetOrBuilder
    • setUnknownFields

      public final Target.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
    • mergeUnknownFields

      public final Target.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>