Class: Google::Apis::CloudsearchV1::FuseboxItem
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::FuseboxItem
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
The Item message is the read interface for user data (traditionally referred to as a "message", such as a mail message or a chat message, but generalized to encompass other types such as tasks) and stored in Tingle. Each Item is associated with a single Thread. An Item contains three classes of data. (1): Item "fields" are common to items of all message types (e.g. mail, chat, task, etc.) and are identified by the ItemFieldSpec.FetchType enum when fetching Items. (2): Item "attributes" represent data associated with an Item that is stored on behalf of the client but to which the fusebox and storage layers are otherwise agnostic. (3): Item "parts" are application-defined protocol buffers that affect how the Item is indexed. Item parts are referenced as extensions to the ItemParts message. By default the application specifies the index terms associated with an Item part. For performance sensitive applications, the storage layer can be modified to understand and index data types natively.
Instance Attribute Summary collapse
-
#attributes ⇒ Google::Apis::CloudsearchV1::Attributes
Corresponds to the JSON property
attributes
. -
#creation_time_microseconds ⇒ Fixnum
The creation time of the Item in micro seconds.
-
#history ⇒ Google::Apis::CloudsearchV1::History
The most recent history records associated with the item.
-
#item_key ⇒ Google::Apis::CloudsearchV1::MultiKey
A union-like type for identifiying an object in storage.
-
#labels ⇒ Google::Apis::CloudsearchV1::Labels
Corresponds to the JSON property
labels
. -
#last_modification_time_us ⇒ Fixnum
The modification time of the Item in micro seconds.
-
#locker_references ⇒ Google::Apis::CloudsearchV1::References
go/lockpicker Locker counterpart of references.
-
#match_info ⇒ Google::Apis::CloudsearchV1::MatchInfo
Corresponds to the JSON property
matchInfo
. -
#parts ⇒ Google::Apis::CloudsearchV1::ItemParts
Container for type-specific extensions of an Item.
-
#read_ts ⇒ Fixnum
The read timestamp at which this item was read.
-
#references ⇒ Google::Apis::CloudsearchV1::References
References to attachments, video attachments in Youtube and Hangout messages.
-
#snippet ⇒ String
The snippet is a brief bit of text describing this item.
-
#thread_key ⇒ Google::Apis::CloudsearchV1::MultiKey
A union-like type for identifiying an object in storage.
-
#thread_locator ⇒ String
A base64 encoded and encrypted string generated from the Gaia Id and the thread id.
-
#triggers ⇒ Google::Apis::CloudsearchV1::Triggers
Corresponds to the JSON property
triggers
. -
#version ⇒ Fixnum
The latest history operation id that resulted in a mutation of the item.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FuseboxItem
constructor
A new instance of FuseboxItem.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ FuseboxItem
Returns a new instance of FuseboxItem.
9514 9515 9516 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9514 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attributes ⇒ Google::Apis::CloudsearchV1::Attributes
Corresponds to the JSON property attributes
9377 9378 9379 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9377 def attributes @attributes end |
#creation_time_microseconds ⇒ Fixnum
The creation time of the Item in micro seconds.
Corresponds to the JSON property creationTimeMicroseconds
9382 9383 9384 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9382 def creation_time_microseconds @creation_time_microseconds end |
#history ⇒ Google::Apis::CloudsearchV1::History
The most recent history records associated with the item.
Corresponds to the JSON property history
9387 9388 9389 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9387 def history @history end |
#item_key ⇒ Google::Apis::CloudsearchV1::MultiKey
A union-like type for identifiying an object in storage. MultiKeys contain
multiple key fields, each in a separate key space. At least one key field must
be set. More than one key field may be set as long as all key values refer to
the same object. All objects in storage have unique server_id keys. All
MultiKeys returned from storage to storage clients will always have the
server_id field set. When creating an object, if a MultiKey without a
server_id is supplied to storage, the storage system will auto-assign a server
ID to the new object. For all other storage requests (i.e. those not creating
new objects), clients may omit server_id (as long as they supply another key).
Instead of server ids, clients can specify string based
client_assigned_perm_id keys. Mail message drafts are a prime example of these
kinds of objects. Each time a user saves a new version of a draft, the storage
system needs to create a new object with the updated draft content and needs
to delete the object containing the old content. The new object gets a new
SERVER_ID but should get the same CLIENT_ASSIGNED_PERM_ID as the now-deleted
object containing the old content. Carrying forward the perm ID allows it to
be used to consistently refer to the same logical object across revisions.
These perm IDs save sync clients from having to deal with changing object IDs.
For example, assume there's a mail message in storage with SERVER_ID = 123 and
CLIENT_ASSIGNED_PERM_ID = "foo". The following are all valid ways of
addressing the object using MultiKeys: 1) MultiKey server_id = 123
2)
MultiKey server_id = 123, client_assigned_perm_id = "foo"
3) MultiKey
client_assigned_perm_id = "foo"
Multikeys are never serialized in the
storage. The individual keys are extracted and processed separately. Both the
integer ids as well as string ids are indexed for efficient retrieval using
the same fields in the backend. See go/tingle-multikeys for more information
on background and motivation.
Corresponds to the JSON property itemKey
9418 9419 9420 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9418 def item_key @item_key end |
#labels ⇒ Google::Apis::CloudsearchV1::Labels
Corresponds to the JSON property labels
9423 9424 9425 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9423 def labels @labels end |
#last_modification_time_us ⇒ Fixnum
The modification time of the Item in micro seconds. Modifications to the
message include label addition, deletion, etc.
Corresponds to the JSON property lastModificationTimeUs
9429 9430 9431 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9429 def last_modification_time_us @last_modification_time_us end |
#locker_references ⇒ Google::Apis::CloudsearchV1::References
go/lockpicker Locker counterpart of references.
Corresponds to the JSON property lockerReferences
9434 9435 9436 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9434 def locker_references @locker_references end |
#match_info ⇒ Google::Apis::CloudsearchV1::MatchInfo
Corresponds to the JSON property matchInfo
9439 9440 9441 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9439 def match_info @match_info end |
#parts ⇒ Google::Apis::CloudsearchV1::ItemParts
Container for type-specific extensions of an Item. This protobuf is defined in
a separate file to allow types to reference/extend the message without
depending on other fusebox protobufs. See items.proto.
Corresponds to the JSON property parts
9446 9447 9448 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9446 def parts @parts end |
#read_ts ⇒ Fixnum
The read timestamp at which this item was read. This is a temporary field used
to check if two items streamed during dual reading were read at the same
timestamp. This will be populated by Fusebox RPCs. "DO NOT USE UNLESS YOU TALK
TO FUSEBOX TEAM (gmail-fusebox@)".
Corresponds to the JSON property readTs
9454 9455 9456 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9454 def read_ts @read_ts end |
#references ⇒ Google::Apis::CloudsearchV1::References
References to attachments, video attachments in Youtube and Hangout messages.
Corresponds to the JSON property references
9459 9460 9461 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9459 def references @references end |
#snippet ⇒ String
The snippet is a brief bit of text describing this item.
Corresponds to the JSON property snippet
9464 9465 9466 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9464 def snippet @snippet end |
#thread_key ⇒ Google::Apis::CloudsearchV1::MultiKey
A union-like type for identifiying an object in storage. MultiKeys contain
multiple key fields, each in a separate key space. At least one key field must
be set. More than one key field may be set as long as all key values refer to
the same object. All objects in storage have unique server_id keys. All
MultiKeys returned from storage to storage clients will always have the
server_id field set. When creating an object, if a MultiKey without a
server_id is supplied to storage, the storage system will auto-assign a server
ID to the new object. For all other storage requests (i.e. those not creating
new objects), clients may omit server_id (as long as they supply another key).
Instead of server ids, clients can specify string based
client_assigned_perm_id keys. Mail message drafts are a prime example of these
kinds of objects. Each time a user saves a new version of a draft, the storage
system needs to create a new object with the updated draft content and needs
to delete the object containing the old content. The new object gets a new
SERVER_ID but should get the same CLIENT_ASSIGNED_PERM_ID as the now-deleted
object containing the old content. Carrying forward the perm ID allows it to
be used to consistently refer to the same logical object across revisions.
These perm IDs save sync clients from having to deal with changing object IDs.
For example, assume there's a mail message in storage with SERVER_ID = 123 and
CLIENT_ASSIGNED_PERM_ID = "foo". The following are all valid ways of
addressing the object using MultiKeys: 1) MultiKey server_id = 123
2)
MultiKey server_id = 123, client_assigned_perm_id = "foo"
3) MultiKey
client_assigned_perm_id = "foo"
Multikeys are never serialized in the
storage. The individual keys are extracted and processed separately. Both the
integer ids as well as string ids are indexed for efficient retrieval using
the same fields in the backend. See go/tingle-multikeys for more information
on background and motivation.
Corresponds to the JSON property threadKey
9495 9496 9497 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9495 def thread_key @thread_key end |
#thread_locator ⇒ String
A base64 encoded and encrypted string generated from the Gaia Id and the
thread id. Used to generate the permalink for this thread, exposed from Gmail
API.
Corresponds to the JSON property threadLocator
9502 9503 9504 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9502 def thread_locator @thread_locator end |
#triggers ⇒ Google::Apis::CloudsearchV1::Triggers
Corresponds to the JSON property triggers
9507 9508 9509 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9507 def triggers @triggers end |
#version ⇒ Fixnum
The latest history operation id that resulted in a mutation of the item.
Corresponds to the JSON property version
9512 9513 9514 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9512 def version @version end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 9519 def update!(**args) @attributes = args[:attributes] if args.key?(:attributes) @creation_time_microseconds = args[:creation_time_microseconds] if args.key?(:creation_time_microseconds) @history = args[:history] if args.key?(:history) @item_key = args[:item_key] if args.key?(:item_key) @labels = args[:labels] if args.key?(:labels) @last_modification_time_us = args[:last_modification_time_us] if args.key?(:last_modification_time_us) @locker_references = args[:locker_references] if args.key?(:locker_references) @match_info = args[:match_info] if args.key?(:match_info) @parts = args[:parts] if args.key?(:parts) @read_ts = args[:read_ts] if args.key?(:read_ts) @references = args[:references] if args.key?(:references) @snippet = args[:snippet] if args.key?(:snippet) @thread_key = args[:thread_key] if args.key?(:thread_key) @thread_locator = args[:thread_locator] if args.key?(:thread_locator) @triggers = args[:triggers] if args.key?(:triggers) @version = args[:version] if args.key?(:version) end |