Class: Google::Apis::GmailV1::Message
- Inherits:
-
Object
- Object
- Google::Apis::GmailV1::Message
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/gmail_v1/classes.rb,
lib/google/apis/gmail_v1/representations.rb,
lib/google/apis/gmail_v1/representations.rb
Overview
An email message.
Instance Attribute Summary collapse
-
#classification_label_values ⇒ Array<Google::Apis::GmailV1::ClassificationLabelValue>
Classification Label values on the message.
-
#history_id ⇒ Fixnum
The ID of the last history record that modified this message.
-
#id ⇒ String
The immutable ID of the message.
-
#internal_date ⇒ Fixnum
The internal message creation timestamp (epoch ms), which determines ordering in the inbox.
-
#label_ids ⇒ Array<String>
List of IDs of labels applied to this message.
-
#payload ⇒ Google::Apis::GmailV1::MessagePart
A single MIME message part.
-
#raw ⇒ String
The entire email message in an RFC 2822 formatted and base64url encoded string.
-
#size_estimate ⇒ Fixnum
Estimated size in bytes of the message.
-
#snippet ⇒ String
A short part of the message text.
-
#thread_id ⇒ String
The ID of the thread the message belongs to.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Message
constructor
A new instance of Message.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Message
Returns a new instance of Message.
1366 1367 1368 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1366 def initialize(**args) update!(**args) end |
Instance Attribute Details
#classification_label_values ⇒ Array<Google::Apis::GmailV1::ClassificationLabelValue>
Classification Label values on the message. Available Classification Label
schemas can be queried using the Google Drive Labels API. Each classification
label ID must be unique. If duplicate IDs are provided, only one will be
retained, and the selection is arbitrary. Only used for Google Workspace
accounts. There's a limit of 20 Classification Label values per request. If
the Classification Label values exceeds the maximum allowed number, the
request fails.
Corresponds to the JSON property classificationLabelValues
1307 1308 1309 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1307 def classification_label_values @classification_label_values end |
#history_id ⇒ Fixnum
The ID of the last history record that modified this message.
Corresponds to the JSON property historyId
1312 1313 1314 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1312 def history_id @history_id end |
#id ⇒ String
The immutable ID of the message.
Corresponds to the JSON property id
1317 1318 1319 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1317 def id @id end |
#internal_date ⇒ Fixnum
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
1326 1327 1328 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1326 def internal_date @internal_date end |
#label_ids ⇒ Array<String>
List of IDs of labels applied to this message.
Corresponds to the JSON property labelIds
1331 1332 1333 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1331 def label_ids @label_ids end |
#payload ⇒ Google::Apis::GmailV1::MessagePart
A single MIME message part.
Corresponds to the JSON property payload
1336 1337 1338 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1336 def payload @payload end |
#raw ⇒ String
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.
1344 1345 1346 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1344 def raw @raw end |
#size_estimate ⇒ Fixnum
Estimated size in bytes of the message.
Corresponds to the JSON property sizeEstimate
1349 1350 1351 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1349 def size_estimate @size_estimate end |
#snippet ⇒ String
A short part of the message text.
Corresponds to the JSON property snippet
1354 1355 1356 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1354 def snippet @snippet end |
#thread_id ⇒ String
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.
- The
ReferencesandIn-Reply-Toheaders must be set in compliance with the RFC 2822 standard. 3. TheSubjectheaders must match. Corresponds to the JSON propertythreadId
1364 1365 1366 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1364 def thread_id @thread_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1371 def update!(**args) @classification_label_values = args[:classification_label_values] if args.key?(:classification_label_values) @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 |