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.

Note: The following fields are mutually exclusive: documents, query. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Firestore::V1::Target::DocumentsTarget)

    A target specified by a set of document names.

    Note: The following fields are mutually exclusive: documents, query. If a field in that set is populated, all other fields in the set will automatically be cleared.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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.

Note: The following fields are mutually exclusive: query, documents. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Cloud::Firestore::V1::Target::QueryTarget)

    A target specified by a query.

    Note: The following fields are mutually exclusive: query, documents. If a field in that set is populated, all other fields in the set will automatically be cleared.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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.

Note: The following fields are mutually exclusive: read_time, resume_token. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

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

    Start listening after a specific read_time.

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

    Note: The following fields are mutually exclusive: read_time, resume_token. If a field in that set is populated, all other fields in the set will automatically be cleared.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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.

Note: The following fields are mutually exclusive: resume_token, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.

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.

    Note: The following fields are mutually exclusive: resume_token, read_time. If a field in that set is populated, all other fields in the set will automatically be cleared.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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.



833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'proto_docs/google/firestore/v1/firestore.rb', line 833

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