Class: Google::Apis::GmailV1::MessagePart
- Inherits:
-
Object
- Object
- Google::Apis::GmailV1::MessagePart
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/gmail_v1/classes.rb,
generated/google/apis/gmail_v1/representations.rb,
generated/google/apis/gmail_v1/representations.rb
Overview
A single MIME message part.
Instance Attribute Summary collapse
-
#body ⇒ Google::Apis::GmailV1::MessagePartBody
The body of a single MIME message part.
-
#filename ⇒ String
The filename of the attachment.
-
#headers ⇒ Array<Google::Apis::GmailV1::MessagePartHeader>
List of headers on this message part.
-
#mime_type ⇒ String
The MIME type of the message part.
-
#part_id ⇒ String
The immutable ID of the message part.
-
#parts ⇒ Array<Google::Apis::GmailV1::MessagePart>
The child MIME message parts of this part.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MessagePart
constructor
A new instance of MessagePart.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ MessagePart
Returns a new instance of MessagePart
997 998 999 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 997 def initialize(**args) update!(**args) end |
Instance Attribute Details
#body ⇒ Google::Apis::GmailV1::MessagePartBody
The body of a single MIME message part.
Corresponds to the JSON property body
964 965 966 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 964 def body @body end |
#filename ⇒ String
The filename of the attachment. Only present if this message part represents
an attachment.
Corresponds to the JSON property filename
970 971 972 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 970 def filename @filename end |
#headers ⇒ Array<Google::Apis::GmailV1::MessagePartHeader>
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.
Corresponds to the JSON property headers
977 978 979 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 977 def headers @headers end |
#mime_type ⇒ String
The MIME type of the message part.
Corresponds to the JSON property mimeType
982 983 984 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 982 def mime_type @mime_type end |
#part_id ⇒ String
The immutable ID of the message part.
Corresponds to the JSON property partId
987 988 989 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 987 def part_id @part_id end |
#parts ⇒ Array<Google::Apis::GmailV1::MessagePart>
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.
Corresponds to the JSON property parts
995 996 997 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 995 def parts @parts end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1002 1003 1004 1005 1006 1007 1008 1009 |
# File 'generated/google/apis/gmail_v1/classes.rb', line 1002 def update!(**args) @body = args[:body] if args.key?(:body) @filename = args[:filename] if args.key?(:filename) @headers = args[:headers] if args.key?(:headers) @mime_type = args[:mime_type] if args.key?(:mime_type) @part_id = args[:part_id] if args.key?(:part_id) @parts = args[:parts] if args.key?(:parts) end |