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

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/firestore/v1/doc/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

#documentsGoogle::Firestore::V1::Target::DocumentsTarget

Returns A target specified by a set of document names.

Returns:



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb', line 456

class Target
  # 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; 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::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget; end
end

#oncetrue, false

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

Returns:

  • (true, false)

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



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb', line 456

class Target
  # 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; 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::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget; end
end

#queryGoogle::Firestore::V1::Target::QueryTarget

Returns A target specified by a query.

Returns:



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb', line 456

class Target
  # 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; 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::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget; end
end

#read_timeGoogle::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.



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb', line 456

class Target
  # 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; 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::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget; end
end

#resume_tokenString

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.



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb', line 456

class Target
  # 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; 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::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget; end
end

#target_idInteger

Returns A client provided target ID.

If not set, the server will assign an ID for the target.

Used for resuming a target without changing IDs. The IDs can either be client-assigned or be server-assigned in a previous stream. All targets with client provided IDs must be added before adding a target that needs a server-assigned id.

Returns:

  • (Integer)

    A client provided target ID.

    If not set, the server will assign an ID for the target.

    Used for resuming a target without changing IDs. The IDs can either be client-assigned or be server-assigned in a previous stream. All targets with client provided IDs must be added before adding a target that needs a server-assigned id.



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
# File 'lib/google/cloud/firestore/v1/doc/google/firestore/v1/firestore.rb', line 456

class Target
  # 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; 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::Firestore::V1::StructuredQuery]
  #     A structured query.
  class QueryTarget; end
end