body = $body; } /** * @return MessagePartBody */ public function getBody() { return $this->body; } /** * The filename of the attachment. Only present if this message part * represents an attachment. * * @param string $filename */ public function setFilename($filename) { $this->filename = $filename; } /** * @return string */ public function getFilename() { return $this->filename; } /** * 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`. * * @param MessagePartHeader[] $headers */ public function setHeaders($headers) { $this->headers = $headers; } /** * @return MessagePartHeader[] */ public function getHeaders() { return $this->headers; } /** * The MIME type of the message part. * * @param string $mimeType */ public function setMimeType($mimeType) { $this->mimeType = $mimeType; } /** * @return string */ public function getMimeType() { return $this->mimeType; } /** * The immutable ID of the message part. * * @param string $partId */ public function setPartId($partId) { $this->partId = $partId; } /** * @return string */ public function getPartId() { return $this->partId; } /** * 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. * * @param MessagePart[] $parts */ public function setParts($parts) { $this->parts = $parts; } /** * @return MessagePart[] */ public function getParts() { return $this->parts; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(MessagePart::class, 'Google_Service_Gmail_MessagePart');