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
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
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.
|
BigInteger |
getHistoryId()
The ID of the last history record that modified this message.
|
String |
getId()
The immutable ID of the message.
|
Long |
getInternalDate()
The internal message creation timestamp (epoch ms), which determines ordering in the inbox.
|
List<String> |
getLabelIds()
List of IDs of labels applied to this message.
|
MessagePart |
getPayload()
The parsed email structure in the message parts.
|
String |
getRaw()
The entire email message in an RFC 2822 formatted and base64url encoded string.
|
Integer |
getSizeEstimate()
Estimated size in bytes of the message.
|
String |
getSnippet()
A short part of the message text.
|
String |
getThreadId()
The ID of the thread the message belongs to.
|
Message |
set(String fieldName,
Object value) |
Message |
setHistoryId(BigInteger historyId)
The ID of the last history record that modified this message.
|
Message |
setId(String id)
The immutable ID of the message.
|
Message |
setInternalDate(Long internalDate)
The internal message creation timestamp (epoch ms), which determines ordering in the inbox.
|
Message |
setLabelIds(List<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(String raw)
The entire email message in an RFC 2822 formatted and base64url encoded string.
|
Message |
setSizeEstimate(Integer sizeEstimate)
Estimated size in bytes of the message.
|
Message |
setSnippet(String snippet)
A short part of the message text.
|
Message |
setThreadId(String threadId)
The ID of the thread the message belongs to.
|
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public BigInteger getHistoryId()
null
for nonepublic Message setHistoryId(BigInteger historyId)
historyId
- historyId or null
for nonepublic String getId()
null
for nonepublic Message setId(String id)
id
- id or null
for nonepublic Long getInternalDate()
null
for nonepublic Message setInternalDate(Long internalDate)
internalDate
- internalDate or null
for nonepublic List<String> getLabelIds()
null
for nonepublic Message setLabelIds(List<String> labelIds)
labelIds
- labelIds or null
for nonepublic MessagePart getPayload()
null
for nonepublic Message setPayload(MessagePart payload)
payload
- payload or null
for nonepublic String getRaw()
null
for nonedecodeRaw()
public byte[] decodeRaw()
null
for nonegetRaw()
public Message setRaw(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 Integer getSizeEstimate()
null
for nonepublic Message setSizeEstimate(Integer sizeEstimate)
sizeEstimate
- sizeEstimate or null
for nonepublic String getSnippet()
null
for nonepublic Message setSnippet(String snippet)
snippet
- snippet or null
for nonepublic String getThreadId()
null
for nonepublic Message setThreadId(String threadId)
threadId
- threadId or null
for nonepublic Message set(String fieldName, Object value)
set
in class com.google.api.client.json.GenericJson
public Message clone()
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.