class Google::Apis::GmailV1::Message

An email message.

Attributes

history_id[RW]

The ID of the last history record that modified this message. Corresponds to the JSON property `historyId` @return [Fixnum]

id[RW]

The immutable ID of the message. Corresponds to the JSON property `id` @return [String]

internal_date[RW]

The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the ` Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header. Corresponds to the JSON property `internalDate` @return [Fixnum]

label_ids[RW]

List of IDs of labels applied to this message. Corresponds to the JSON property `labelIds` @return [Array<String>]

payload[RW]

A single MIME message part. Corresponds to the JSON property `payload` @return [Google::Apis::GmailV1::MessagePart]

raw[RW]

The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied. Corresponds to the JSON property `raw` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

size_estimate[RW]

Estimated size in bytes of the message. Corresponds to the JSON property `sizeEstimate` @return [Fixnum]

snippet[RW]

A short part of the message text. Corresponds to the JSON property `snippet` @return [String]

thread_id[RW]

The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request.

  1. The `References` and `In-Reply-To` headers must be set in compliance with

the [RFC 2822](tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match. Corresponds to the JSON property `threadId` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/gmail_v1/classes.rb, line 987
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/gmail_v1/classes.rb, line 992
def update!(**args)
  @history_id = args[:history_id] if args.key?(:history_id)
  @id = args[:id] if args.key?(:id)
  @internal_date = args[:internal_date] if args.key?(:internal_date)
  @label_ids = args[:label_ids] if args.key?(:label_ids)
  @payload = args[:payload] if args.key?(:payload)
  @raw = args[:raw] if args.key?(:raw)
  @size_estimate = args[:size_estimate] if args.key?(:size_estimate)
  @snippet = args[:snippet] if args.key?(:snippet)
  @thread_id = args[:thread_id] if args.key?(:thread_id)
end