Class: Google::Apis::GmailV1::Draft

Inherits:
Object
  • Object
show all
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 draft email in the user's mailbox.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Draft

Returns a new instance of Draft



122
123
124
# File 'generated/google/apis/gmail_v1/classes.rb', line 122

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#idString

The immutable ID of the draft. Corresponds to the JSON property id

Returns:

  • (String)


115
116
117
# File 'generated/google/apis/gmail_v1/classes.rb', line 115

def id
  @id
end

#messageGoogle::Apis::GmailV1::Message

An email message. Corresponds to the JSON property message



120
121
122
# File 'generated/google/apis/gmail_v1/classes.rb', line 120

def message
  @message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



127
128
129
130
# File 'generated/google/apis/gmail_v1/classes.rb', line 127

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @message = args[:message] if args.key?(:message)
end