Class: Google::Cloud::Firestore::V1::Target

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/firestore/v1/firestore.rb

Overview

A specification of a set of documents to listen to.

Defined Under Namespace

Classes: DocumentsTarget, QueryTarget

Instance Attribute Summary collapse

Instance Attribute Details

#documents::Google::Cloud::Firestore::V1::Target::DocumentsTarget

Returns A target specified by a set of document names.

Returns:



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#expected_count::Google::Protobuf::Int32Value

Returns 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.

Returns:

  • (::Google::Protobuf::Int32Value)

    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.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#once::Boolean

Returns If the target should be removed once it is current and consistent.

Returns:

  • (::Boolean)

    If the target should be removed once it is current and consistent.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#query::Google::Cloud::Firestore::V1::Target::QueryTarget

Returns A target specified by a query.

Returns:



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#read_time::Google::Protobuf::Timestamp

Returns Start listening after a specific read_time.

The client must know the state of matching documents at this time.

Returns:

  • (::Google::Protobuf::Timestamp)

    Start listening after a specific read_time.

    The client must know the state of matching documents at this time.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#resume_token::String

Returns A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

Returns:

  • (::String)

    A resume token from a prior TargetChange for an identical target.

    Using a resume token with a different target is unsupported and may fail.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#target_id::Integer

Returns 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.

Returns:

  • (::Integer)

    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.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
# File 'proto_docs/google/firestore/v1/firestore.rb', line 781

class Target
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A target specified by a set of documents names.
  # @!attribute [rw] documents
  #   @return [::Array<::String>]
  #     The names of the documents to retrieve. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     The request will fail if any of the document is not a child resource of
  #     the given `database`. Duplicate names will be elided.
  class DocumentsTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A target specified by a query.
  # @!attribute [rw] parent
  #   @return [::String]
  #     The parent resource name. In the format:
  #     `projects/{project_id}/databases/{database_id}/documents` or
  #     `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
  #     For example:
  #     `projects/my-project/databases/my-database/documents` or
  #     `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
  # @!attribute [rw] structured_query
  #   @return [::Google::Cloud::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end