target.apidocs.com.google.api.services.gmail.model.MessagePart.html Maven / Gradle / Ivy
MessagePart (Gmail API v1-rev20230925-2.0.0)
com.google.api.services.gmail.model
Class MessagePart
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.gmail.model.MessagePart
-
public final class MessagePart
extends com.google.api.client.json.GenericJson
A single MIME message part.
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
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
MessagePart()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
MessagePart
clone()
MessagePartBody
getBody()
The message part body for this part, which may be empty for container MIME message parts.
String
getFilename()
The filename of the attachment.
List<MessagePartHeader>
getHeaders()
List of headers on this message part.
String
getMimeType()
The MIME type of the message part.
String
getPartId()
The immutable ID of the message part.
List<MessagePart>
getParts()
The child MIME message parts of this part.
MessagePart
set(String fieldName,
Object value)
MessagePart
setBody(MessagePartBody body)
The message part body for this part, which may be empty for container MIME message parts.
MessagePart
setFilename(String filename)
The filename of the attachment.
MessagePart
setHeaders(List<MessagePartHeader> headers)
List of headers on this message part.
MessagePart
setMimeType(String mimeType)
The MIME type of the message part.
MessagePart
setPartId(String partId)
The immutable ID of the message part.
MessagePart
setParts(List<MessagePart> parts)
The child MIME message parts of this part.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getBody
public MessagePartBody getBody()
The message part body for this part, which may be empty for container MIME message parts.
- Returns:
- value or
null
for none
-
setBody
public MessagePart setBody(MessagePartBody body)
The message part body for this part, which may be empty for container MIME message parts.
- Parameters:
body
- body or null
for none
-
getFilename
public String getFilename()
The filename of the attachment. Only present if this message part represents an attachment.
- Returns:
- value or
null
for none
-
setFilename
public MessagePart setFilename(String filename)
The filename of the attachment. Only present if this message part represents an attachment.
- Parameters:
filename
- filename or null
for none
-
getHeaders
public List<MessagePartHeader> getHeaders()
List of headers on this message part. For the top-level message part, representing the entire
message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and
`Subject`.
- Returns:
- value or
null
for none
-
setHeaders
public MessagePart setHeaders(List<MessagePartHeader> headers)
List of headers on this message part. For the top-level message part, representing the entire
message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and
`Subject`.
- Parameters:
headers
- headers or null
for none
-
getMimeType
public String getMimeType()
The MIME type of the message part.
- Returns:
- value or
null
for none
-
setMimeType
public MessagePart setMimeType(String mimeType)
The MIME type of the message part.
- Parameters:
mimeType
- mimeType or null
for none
-
getPartId
public String getPartId()
The immutable ID of the message part.
- Returns:
- value or
null
for none
-
setPartId
public MessagePart setPartId(String partId)
The immutable ID of the message part.
- Parameters:
partId
- partId or null
for none
-
getParts
public List<MessagePart> getParts()
The child MIME message parts of this part. This only applies to container MIME message parts,
for example `multipart`. For non- container MIME message part types, such as `text/plain`, this
field is empty. For more information, see RFC 1521.
- Returns:
- value or
null
for none
-
setParts
public MessagePart setParts(List<MessagePart> parts)
The child MIME message parts of this part. This only applies to container MIME message parts,
for example `multipart`. For non- container MIME message part types, such as `text/plain`, this
field is empty. For more information, see RFC 1521.
- Parameters:
parts
- parts or null
for none
-
set
public MessagePart set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public MessagePart clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2023 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy