Class: Google::Apis::FirestoreV1::Target

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/firestore_v1/classes.rb,
generated/google/apis/firestore_v1/representations.rb,
generated/google/apis/firestore_v1/representations.rb

Overview

A specification of a set of documents to listen to.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Target

Returns a new instance of Target.



2177
2178
2179
# File 'generated/google/apis/firestore_v1/classes.rb', line 2177

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#documentsGoogle::Apis::FirestoreV1::DocumentsTarget

A target specified by a set of documents names. Corresponds to the JSON property documents



2145
2146
2147
# File 'generated/google/apis/firestore_v1/classes.rb', line 2145

def documents
  @documents
end

#onceBoolean Also known as: once?

If the target should be removed once it is current and consistent. Corresponds to the JSON property once

Returns:

  • (Boolean)


2150
2151
2152
# File 'generated/google/apis/firestore_v1/classes.rb', line 2150

def once
  @once
end

#queryGoogle::Apis::FirestoreV1::QueryTarget

A target specified by a query. Corresponds to the JSON property query



2156
2157
2158
# File 'generated/google/apis/firestore_v1/classes.rb', line 2156

def query
  @query
end

#read_timeString

Start listening after a specific read_time. The client must know the state of matching documents at this time. Corresponds to the JSON property readTime

Returns:

  • (String)


2162
2163
2164
# File 'generated/google/apis/firestore_v1/classes.rb', line 2162

def read_time
  @read_time
end

#resume_tokenString

A resume token from a prior TargetChange for an identical target. Using a resume token with a different target is unsupported and may fail. Corresponds to the JSON property resumeToken NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


2169
2170
2171
# File 'generated/google/apis/firestore_v1/classes.rb', line 2169

def resume_token
  @resume_token
end

#target_idFixnum

The target ID that identifies the target on the stream. Must be a positive number and non-zero. Corresponds to the JSON property targetId

Returns:

  • (Fixnum)


2175
2176
2177
# File 'generated/google/apis/firestore_v1/classes.rb', line 2175

def target_id
  @target_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2182
2183
2184
2185
2186
2187
2188
2189
# File 'generated/google/apis/firestore_v1/classes.rb', line 2182

def update!(**args)
  @documents = args[:documents] if args.key?(:documents)
  @once = args[:once] if args.key?(:once)
  @query = args[:query] if args.key?(:query)
  @read_time = args[:read_time] if args.key?(:read_time)
  @resume_token = args[:resume_token] if args.key?(:resume_token)
  @target_id = args[:target_id] if args.key?(:target_id)
end