public final class Message
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Gmail API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags| Constructor and Description |
|---|
Message() |
| Modifier and Type | Method and Description |
|---|---|
Message |
clone() |
byte[] |
decodeRaw()
The entire email message in an RFC 2822 formatted and base64url encoded string.
|
Message |
encodeRaw(byte[] raw)
The entire email message in an RFC 2822 formatted and base64url encoded string.
|
java.math.BigInteger |
getHistoryId()
The ID of the last history record that modified this message.
|
java.lang.String |
getId()
The immutable ID of the message.
|
java.lang.Long |
getInternalDate()
The internal message creation timestamp (epoch ms), which determines ordering in the inbox.
|
java.util.List<java.lang.String> |
getLabelIds()
List of IDs of labels applied to this message.
|
MessagePart |
getPayload()
The parsed email structure in the message parts.
|
java.lang.String |
getRaw()
The entire email message in an RFC 2822 formatted and base64url encoded string.
|
java.lang.Integer |
getSizeEstimate()
Estimated size in bytes of the message.
|
java.lang.String |
getSnippet()
A short part of the message text.
|
java.lang.String |
getThreadId()
The ID of the thread the message belongs to.
|
Message |
set(java.lang.String fieldName,
java.lang.Object value) |
Message |
setHistoryId(java.math.BigInteger historyId)
The ID of the last history record that modified this message.
|
Message |
setId(java.lang.String id)
The immutable ID of the message.
|
Message |
setInternalDate(java.lang.Long internalDate)
The internal message creation timestamp (epoch ms), which determines ordering in the inbox.
|
Message |
setLabelIds(java.util.List<java.lang.String> labelIds)
List of IDs of labels applied to this message.
|
Message |
setPayload(MessagePart payload)
The parsed email structure in the message parts.
|
Message |
setRaw(java.lang.String raw)
The entire email message in an RFC 2822 formatted and base64url encoded string.
|
Message |
setSizeEstimate(java.lang.Integer sizeEstimate)
Estimated size in bytes of the message.
|
Message |
setSnippet(java.lang.String snippet)
A short part of the message text.
|
Message |
setThreadId(java.lang.String threadId)
The ID of the thread the message belongs to.
|
getFactory, setFactory, toPrettyString, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, valuespublic java.math.BigInteger getHistoryId()
null for nonepublic Message setHistoryId(java.math.BigInteger historyId)
historyId - historyId or null for nonepublic java.lang.String getId()
null for nonepublic Message setId(java.lang.String id)
id - id or null for nonepublic java.lang.Long getInternalDate()
null for nonepublic Message setInternalDate(java.lang.Long internalDate)
internalDate - internalDate or null for nonepublic java.util.List<java.lang.String> getLabelIds()
null for nonepublic Message setLabelIds(java.util.List<java.lang.String> labelIds)
labelIds - labelIds or null for nonepublic MessagePart getPayload()
null for nonepublic Message setPayload(MessagePart payload)
payload - payload or null for nonepublic java.lang.String getRaw()
null for nonedecodeRaw()public byte[] decodeRaw()
null for nonegetRaw()public Message setRaw(java.lang.String raw)
raw - raw or null for none#encodeRaw()public Message encodeRaw(byte[] raw)
The value is encoded Base64 or {@code null} for none.
public java.lang.Integer getSizeEstimate()
null for nonepublic Message setSizeEstimate(java.lang.Integer sizeEstimate)
sizeEstimate - sizeEstimate or null for nonepublic java.lang.String getSnippet()
null for nonepublic Message setSnippet(java.lang.String snippet)
snippet - snippet or null for nonepublic java.lang.String getThreadId()
null for nonepublic Message setThreadId(java.lang.String threadId)
threadId - threadId or null for nonepublic Message set(java.lang.String fieldName, java.lang.Object value)
set in class com.google.api.client.json.GenericJsonpublic Message clone()
clone in class com.google.api.client.json.GenericJson