Class: Google::Apis::GmailV1::MessagePartBody
- Inherits:
-
Object
- Object
- Google::Apis::GmailV1::MessagePartBody
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/gmail_v1/classes.rb,
lib/google/apis/gmail_v1/representations.rb,
lib/google/apis/gmail_v1/representations.rb
Overview
The body of a single MIME message part.
Instance Attribute Summary collapse
-
#attachment_id ⇒ String
When present, contains the ID of an external attachment that can be retrieved in a separate
messages.attachments.getrequest. -
#data ⇒ String
The body data of a MIME message part as a base64url encoded string.
-
#size ⇒ Fixnum
Number of bytes for the message part data (encoding notwithstanding).
Instance Method Summary collapse
-
#initialize(**args) ⇒ MessagePartBody
constructor
A new instance of MessagePartBody.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MessagePartBody
Returns a new instance of MessagePartBody.
1468 1469 1470 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1468 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attachment_id ⇒ String
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.
Corresponds to the JSON property attachmentId
1452 1453 1454 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1452 def @attachment_id end |
#data ⇒ String
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.
Corresponds to the JSON property data
NOTE: Values are automatically base64 encoded/decoded in the client library.
1461 1462 1463 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1461 def data @data end |
#size ⇒ Fixnum
Number of bytes for the message part data (encoding notwithstanding).
Corresponds to the JSON property size
1466 1467 1468 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1466 def size @size end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1473 1474 1475 1476 1477 |
# File 'lib/google/apis/gmail_v1/classes.rb', line 1473 def update!(**args) @attachment_id = args[:attachment_id] if args.key?(:attachment_id) @data = args[:data] if args.key?(:data) @size = args[:size] if args.key?(:size) end |