Class: Google::Cloud::Firestore::V1::TargetChange

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

Overview

Targets being watched have changed.

Defined Under Namespace

Modules: TargetChangeType

Instance Attribute Summary collapse

Instance Attribute Details

#cause::Google::Rpc::Status

Returns The error that resulted in this change, if applicable.

Returns:



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'proto_docs/google/firestore/v1/firestore.rb', line 990

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

  # The type of change.
  module TargetChangeType
    # No change has occurred. Used only to send an updated `resume_token`.
    NO_CHANGE = 0

    # The targets have been added.
    ADD = 1

    # The targets have been removed.
    REMOVE = 2

    # The targets reflect all changes committed before the targets were added
    # to the stream.
    #
    # This will be sent after or with a `read_time` that is greater than or
    # equal to the time at which the targets were added.
    #
    # Listeners can wait for this change if read-after-write semantics
    # are desired.
    CURRENT = 3

    # The targets have been reset, and a new initial state for the targets
    # will be returned in subsequent changes.
    #
    # After the initial state is complete, `CURRENT` will be returned even
    # if the target was previously indicated to be `CURRENT`.
    RESET = 4
  end
end

#read_time::Google::Protobuf::Timestamp

Returns The consistent read_time for the given target_ids (omitted when the target_ids are not at a consistent snapshot).

The stream is guaranteed to send a read_time with target_ids empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not).

For a given stream, read_time is guaranteed to be monotonically increasing.

Returns:

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

    The consistent read_time for the given target_ids (omitted when the target_ids are not at a consistent snapshot).

    The stream is guaranteed to send a read_time with target_ids empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not).

    For a given stream, read_time is guaranteed to be monotonically increasing.



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'proto_docs/google/firestore/v1/firestore.rb', line 990

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

  # The type of change.
  module TargetChangeType
    # No change has occurred. Used only to send an updated `resume_token`.
    NO_CHANGE = 0

    # The targets have been added.
    ADD = 1

    # The targets have been removed.
    REMOVE = 2

    # The targets reflect all changes committed before the targets were added
    # to the stream.
    #
    # This will be sent after or with a `read_time` that is greater than or
    # equal to the time at which the targets were added.
    #
    # Listeners can wait for this change if read-after-write semantics
    # are desired.
    CURRENT = 3

    # The targets have been reset, and a new initial state for the targets
    # will be returned in subsequent changes.
    #
    # After the initial state is complete, `CURRENT` will be returned even
    # if the target was previously indicated to be `CURRENT`.
    RESET = 4
  end
end

#resume_token::String

Returns A token that can be used to resume the stream for the given target_ids, or all targets if target_ids is empty.

Not set on every target change.

Returns:

  • (::String)

    A token that can be used to resume the stream for the given target_ids, or all targets if target_ids is empty.

    Not set on every target change.



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'proto_docs/google/firestore/v1/firestore.rb', line 990

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

  # The type of change.
  module TargetChangeType
    # No change has occurred. Used only to send an updated `resume_token`.
    NO_CHANGE = 0

    # The targets have been added.
    ADD = 1

    # The targets have been removed.
    REMOVE = 2

    # The targets reflect all changes committed before the targets were added
    # to the stream.
    #
    # This will be sent after or with a `read_time` that is greater than or
    # equal to the time at which the targets were added.
    #
    # Listeners can wait for this change if read-after-write semantics
    # are desired.
    CURRENT = 3

    # The targets have been reset, and a new initial state for the targets
    # will be returned in subsequent changes.
    #
    # After the initial state is complete, `CURRENT` will be returned even
    # if the target was previously indicated to be `CURRENT`.
    RESET = 4
  end
end

#target_change_type::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType

Returns The type of change that occurred.

Returns:



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'proto_docs/google/firestore/v1/firestore.rb', line 990

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

  # The type of change.
  module TargetChangeType
    # No change has occurred. Used only to send an updated `resume_token`.
    NO_CHANGE = 0

    # The targets have been added.
    ADD = 1

    # The targets have been removed.
    REMOVE = 2

    # The targets reflect all changes committed before the targets were added
    # to the stream.
    #
    # This will be sent after or with a `read_time` that is greater than or
    # equal to the time at which the targets were added.
    #
    # Listeners can wait for this change if read-after-write semantics
    # are desired.
    CURRENT = 3

    # The targets have been reset, and a new initial state for the targets
    # will be returned in subsequent changes.
    #
    # After the initial state is complete, `CURRENT` will be returned even
    # if the target was previously indicated to be `CURRENT`.
    RESET = 4
  end
end

#target_ids::Array<::Integer>

Returns The target IDs of targets that have changed.

If empty, the change applies to all targets.

The order of the target IDs is not defined.

Returns:

  • (::Array<::Integer>)

    The target IDs of targets that have changed.

    If empty, the change applies to all targets.

    The order of the target IDs is not defined.



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'proto_docs/google/firestore/v1/firestore.rb', line 990

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

  # The type of change.
  module TargetChangeType
    # No change has occurred. Used only to send an updated `resume_token`.
    NO_CHANGE = 0

    # The targets have been added.
    ADD = 1

    # The targets have been removed.
    REMOVE = 2

    # The targets reflect all changes committed before the targets were added
    # to the stream.
    #
    # This will be sent after or with a `read_time` that is greater than or
    # equal to the time at which the targets were added.
    #
    # Listeners can wait for this change if read-after-write semantics
    # are desired.
    CURRENT = 3

    # The targets have been reset, and a new initial state for the targets
    # will be returned in subsequent changes.
    #
    # After the initial state is complete, `CURRENT` will be returned even
    # if the target was previously indicated to be `CURRENT`.
    RESET = 4
  end
end