Class: Google::Apis::GmailV1::History

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

Overview

A record of a change to the user's mailbox. Each history change may affect multiple messages in multiple ways.

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) ⇒ History

Returns a new instance of History.


306
307
308
# File 'generated/google/apis/gmail_v1/classes.rb', line 306

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

Instance Attribute Details

#idString

The mailbox sequence ID. Corresponds to the JSON property id

Returns:

  • (String)

277
278
279
# File 'generated/google/apis/gmail_v1/classes.rb', line 277

def id
  @id
end

#labels_addedArray<Google::Apis::GmailV1::HistoryLabelAdded>

Labels added to messages in this history record. Corresponds to the JSON property labelsAdded


282
283
284
# File 'generated/google/apis/gmail_v1/classes.rb', line 282

def labels_added
  @labels_added
end

#labels_removedArray<Google::Apis::GmailV1::HistoryLabelRemoved>

Labels removed from messages in this history record. Corresponds to the JSON property labelsRemoved


287
288
289
# File 'generated/google/apis/gmail_v1/classes.rb', line 287

def labels_removed
  @labels_removed
end

#messagesArray<Google::Apis::GmailV1::Message>

List of messages changed in this history record. The fields for specific change types, such as messagesAdded may duplicate messages in this field. We recommend using the specific change-type fields instead of this. Corresponds to the JSON property messages

Returns:


294
295
296
# File 'generated/google/apis/gmail_v1/classes.rb', line 294

def messages
  @messages
end

#messages_addedArray<Google::Apis::GmailV1::HistoryMessageAdded>

Messages added to the mailbox in this history record. Corresponds to the JSON property messagesAdded


299
300
301
# File 'generated/google/apis/gmail_v1/classes.rb', line 299

def messages_added
  @messages_added
end

#messages_deletedArray<Google::Apis::GmailV1::HistoryMessageDeleted>

Messages deleted (not Trashed) from the mailbox in this history record. Corresponds to the JSON property messagesDeleted


304
305
306
# File 'generated/google/apis/gmail_v1/classes.rb', line 304

def messages_deleted
  @messages_deleted
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


311
312
313
314
315
316
317
318
# File 'generated/google/apis/gmail_v1/classes.rb', line 311

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @labels_added = args[:labels_added] if args.key?(:labels_added)
  @labels_removed = args[:labels_removed] if args.key?(:labels_removed)
  @messages = args[:messages] if args.key?(:messages)
  @messages_added = args[:messages_added] if args.key?(:messages_added)
  @messages_deleted = args[:messages_deleted] if args.key?(:messages_deleted)
end