
target.apidocs.com.google.api.services.gmail.model.MessagePartBody.html Maven / Gradle / Ivy
MessagePartBody (Gmail API v1-rev20230911-2.0.0)
com.google.api.services.gmail.model
Class MessagePartBody
- 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.MessagePartBody
-
public final class MessagePartBody
extends com.google.api.client.json.GenericJson
The body of 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
MessagePartBody()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
MessagePartBody
clone()
byte[]
decodeData()
The body data of a MIME message part as a base64url encoded string.
MessagePartBody
encodeData(byte[] data)
The body data of a MIME message part as a base64url encoded string.
String
getAttachmentId()
When present, contains the ID of an external attachment that can be retrieved in a separate
`messages.attachments.get` request.
String
getData()
The body data of a MIME message part as a base64url encoded string.
Integer
getSize()
Number of bytes for the message part data (encoding notwithstanding).
MessagePartBody
set(String fieldName,
Object value)
MessagePartBody
setAttachmentId(String attachmentId)
When present, contains the ID of an external attachment that can be retrieved in a separate
`messages.attachments.get` request.
MessagePartBody
setData(String data)
The body data of a MIME message part as a base64url encoded string.
MessagePartBody
setSize(Integer size)
Number of bytes for the message part data (encoding notwithstanding).
-
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
-
getAttachmentId
public String getAttachmentId()
When present, contains the ID of an external attachment that can be retrieved in a separate
`messages.attachments.get` request. When not present, the entire content of the message part
body is contained in the data field.
- Returns:
- value or
null
for none
-
setAttachmentId
public MessagePartBody setAttachmentId(String attachmentId)
When present, contains the ID of an external attachment that can be retrieved in a separate
`messages.attachments.get` request. When not present, the entire content of the message part
body is contained in the data field.
- Parameters:
attachmentId
- attachmentId or null
for none
-
getData
public String getData()
The body data of a MIME message part as a base64url encoded string. May be empty for MIME
container types that have no message body or when the body data is sent as a separate
attachment. An attachment ID is present if the body data is contained in a separate attachment.
- Returns:
- value or
null
for none
- See Also:
decodeData()
-
decodeData
public byte[] decodeData()
The body data of a MIME message part as a base64url encoded string. May be empty for MIME
container types that have no message body or when the body data is sent as a separate
attachment. An attachment ID is present if the body data is contained in a separate attachment.
- Returns:
- Base64 decoded value or
null
for none
- Since:
- 1.14
- See Also:
getData()
-
setData
public MessagePartBody setData(String data)
The body data of a MIME message part as a base64url encoded string. May be empty for MIME
container types that have no message body or when the body data is sent as a separate
attachment. An attachment ID is present if the body data is contained in a separate attachment.
- Parameters:
data
- data or null
for none
- See Also:
#encodeData()
-
encodeData
public MessagePartBody encodeData(byte[] data)
The body data of a MIME message part as a base64url encoded string. May be empty for MIME
container types that have no message body or when the body data is sent as a separate
attachment. An attachment ID is present if the body data is contained in a separate attachment.
- Since:
- 1.14
- See Also:
The value is encoded Base64 or {@code null} for none.
-
getSize
public Integer getSize()
Number of bytes for the message part data (encoding notwithstanding).
- Returns:
- value or
null
for none
-
setSize
public MessagePartBody setSize(Integer size)
Number of bytes for the message part data (encoding notwithstanding).
- Parameters:
size
- size or null
for none
-
set
public MessagePartBody set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public MessagePartBody clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2023 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy