Class: Google::Apis::GmailV1::VacationSettings

Inherits:
Object
  • Object
show all
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

Vacation auto-reply settings for an account. These settings correspond to the " Vacation responder" feature in the web interface.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VacationSettings

Returns a new instance of VacationSettings.



1839
1840
1841
# File 'lib/google/apis/gmail_v1/classes.rb', line 1839

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

Instance Attribute Details

#enable_auto_replyBoolean Also known as: enable_auto_reply?

Flag that controls whether Gmail automatically replies to messages. Corresponds to the JSON property enableAutoReply

Returns:

  • (Boolean)


1785
1786
1787
# File 'lib/google/apis/gmail_v1/classes.rb', line 1785

def enable_auto_reply
  @enable_auto_reply
end

#end_timeFixnum

An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both startTime and endTime are specified, startTime must precede endTime. Corresponds to the JSON property endTime

Returns:

  • (Fixnum)


1794
1795
1796
# File 'lib/google/apis/gmail_v1/classes.rb', line 1794

def end_time
  @end_time
end

#response_body_htmlString

Response body in HTML format. Gmail will sanitize the HTML before storing it. If both response_body_plain_text and response_body_html are specified, response_body_html will be used. Corresponds to the JSON property responseBodyHtml

Returns:

  • (String)


1801
1802
1803
# File 'lib/google/apis/gmail_v1/classes.rb', line 1801

def response_body_html
  @response_body_html
end

#response_body_plain_textString

Response body in plain text format. If both response_body_plain_text and response_body_html are specified, response_body_html will be used. Corresponds to the JSON property responseBodyPlainText

Returns:

  • (String)


1807
1808
1809
# File 'lib/google/apis/gmail_v1/classes.rb', line 1807

def response_body_plain_text
  @response_body_plain_text
end

#response_subjectString

Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty. Corresponds to the JSON property responseSubject

Returns:

  • (String)


1814
1815
1816
# File 'lib/google/apis/gmail_v1/classes.rb', line 1814

def response_subject
  @response_subject
end

#restrict_to_contactsBoolean Also known as: restrict_to_contacts?

Flag that determines whether responses are sent to recipients who are not in the user's list of contacts. Corresponds to the JSON property restrictToContacts

Returns:

  • (Boolean)


1820
1821
1822
# File 'lib/google/apis/gmail_v1/classes.rb', line 1820

def restrict_to_contacts
  @restrict_to_contacts
end

#restrict_to_domainBoolean Also known as: restrict_to_domain?

Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Workspace users. Corresponds to the JSON property restrictToDomain

Returns:

  • (Boolean)


1828
1829
1830
# File 'lib/google/apis/gmail_v1/classes.rb', line 1828

def restrict_to_domain
  @restrict_to_domain
end

#start_timeFixnum

An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both startTime and endTime are specified, startTime must precede endTime. Corresponds to the JSON property startTime

Returns:

  • (Fixnum)


1837
1838
1839
# File 'lib/google/apis/gmail_v1/classes.rb', line 1837

def start_time
  @start_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
# File 'lib/google/apis/gmail_v1/classes.rb', line 1844

def update!(**args)
  @enable_auto_reply = args[:enable_auto_reply] if args.key?(:enable_auto_reply)
  @end_time = args[:end_time] if args.key?(:end_time)
  @response_body_html = args[:response_body_html] if args.key?(:response_body_html)
  @response_body_plain_text = args[:response_body_plain_text] if args.key?(:response_body_plain_text)
  @response_subject = args[:response_subject] if args.key?(:response_subject)
  @restrict_to_contacts = args[:restrict_to_contacts] if args.key?(:restrict_to_contacts)
  @restrict_to_domain = args[:restrict_to_domain] if args.key?(:restrict_to_domain)
  @start_time = args[:start_time] if args.key?(:start_time)
end