Regen APIs, bump version

This commit is contained in:
Steve Bazyl committed 2016-07-06 14:13:29 -07:00
1 parent 24ef90b583
commit cba9d79b52
30 files changed
+1919 -196

No files matched your search

+543
View File
@@ -22,6 +22,39 @@ module Google
module Apis
module GmailV1
# Auto-forwarding settings for an account.
class AutoForwarding
include Google::Apis::Core::Hashable
# The state that a message should be left in after it has been forwarded.
# Corresponds to the JSON property `disposition`
# @return [String]
attr_accessor :disposition
# Email address to which all incoming messages are forwarded. This email address
# must be a verified member of the forwarding addresses.
# Corresponds to the JSON property `emailAddress`
# @return [String]
attr_accessor :email_address
# Whether all incoming mail is automatically forwarded to another address.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@disposition = args[:disposition] if args.key?(:disposition)
@email_address = args[:email_address] if args.key?(:email_address)
@enabled = args[:enabled] if args.key?(:enabled)
end
end
#
class BatchDeleteMessagesRequest
include Google::Apis::Core::Hashable
@@ -66,6 +99,173 @@ module Google
end
end
# Resource definition for Gmail filters. Filters apply to specific messages
# instead of an entire email thread.
class Filter
include Google::Apis::Core::Hashable
# A set of actions to perform on a message.
# Corresponds to the JSON property `action`
# @return [Google::Apis::GmailV1::FilterAction]
attr_accessor :action
# Message matching criteria.
# Corresponds to the JSON property `criteria`
# @return [Google::Apis::GmailV1::FilterCriteria]
attr_accessor :criteria
# The server assigned ID of the filter.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@action = args[:action] if args.key?(:action)
@criteria = args[:criteria] if args.key?(:criteria)
@id = args[:id] if args.key?(:id)
end
end
# A set of actions to perform on a message.
class FilterAction
include Google::Apis::Core::Hashable
# List of labels to add to the message.
# Corresponds to the JSON property `addLabelIds`
# @return [Array<String>]
attr_accessor :add_label_ids
# Email address that the message should be forwarded to.
# Corresponds to the JSON property `forward`
# @return [String]
attr_accessor :forward
# List of labels to remove from the message.
# Corresponds to the JSON property `removeLabelIds`
# @return [Array<String>]
attr_accessor :remove_label_ids
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@add_label_ids = args[:add_label_ids] if args.key?(:add_label_ids)
@forward = args[:forward] if args.key?(:forward)
@remove_label_ids = args[:remove_label_ids] if args.key?(:remove_label_ids)
end
end
# Message matching criteria.
class FilterCriteria
include Google::Apis::Core::Hashable
# Whether the response should exclude chats.
# Corresponds to the JSON property `excludeChats`
# @return [Boolean]
attr_accessor :exclude_chats
alias_method :exclude_chats?, :exclude_chats
# The sender's display name or email address.
# Corresponds to the JSON property `from`
# @return [String]
attr_accessor :from
# Whether the message has any attachment.
# Corresponds to the JSON property `hasAttachment`
# @return [Boolean]
attr_accessor :has_attachment
alias_method :has_attachment?, :has_attachment
# Only return messages not matching the specified query. Supports the same query
# format as the Gmail search box. For example, "from:someuser@example.com
# rfc822msgid: is:unread".
# Corresponds to the JSON property `negatedQuery`
# @return [String]
attr_accessor :negated_query
# Only return messages matching the specified query. Supports the same query
# format as the Gmail search box. For example, "from:someuser@example.com
# rfc822msgid: is:unread".
# Corresponds to the JSON property `query`
# @return [String]
attr_accessor :query
# The size of the entire RFC822 message in bytes, including all headers and
# attachments.
# Corresponds to the JSON property `size`
# @return [Fixnum]
attr_accessor :size
# How the message size in bytes should be in relation to the size field.
# Corresponds to the JSON property `sizeComparison`
# @return [String]
attr_accessor :size_comparison
# Case-insensitive phrase found in the message's subject. Trailing and leading
# whitespace are be trimmed and adjacent spaces are collapsed.
# Corresponds to the JSON property `subject`
# @return [String]
attr_accessor :subject
# The recipient's display name or email address. Includes recipients in the "to",
# "cc", and "bcc" header fields. You can use simply the local part of the email
# address. For example, "example" and "example@" both match "example@gmail.com".
# This field is case-insensitive.
# Corresponds to the JSON property `to`
# @return [String]
attr_accessor :to
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exclude_chats = args[:exclude_chats] if args.key?(:exclude_chats)
@from = args[:from] if args.key?(:from)
@has_attachment = args[:has_attachment] if args.key?(:has_attachment)
@negated_query = args[:negated_query] if args.key?(:negated_query)
@query = args[:query] if args.key?(:query)
@size = args[:size] if args.key?(:size)
@size_comparison = args[:size_comparison] if args.key?(:size_comparison)
@subject = args[:subject] if args.key?(:subject)
@to = args[:to] if args.key?(:to)
end
end
# Settings for a forwarding address.
class ForwardingAddress
include Google::Apis::Core::Hashable
# An email address to which messages can be forwarded.
# Corresponds to the JSON property `forwardingEmail`
# @return [String]
attr_accessor :forwarding_email
# Indicates whether this address has been verified and is usable for forwarding.
# Read-only.
# Corresponds to the JSON property `verificationStatus`
# @return [String]
attr_accessor :verification_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@forwarding_email = args[:forwarding_email] if args.key?(:forwarding_email)
@verification_status = args[:verification_status] if args.key?(:verification_status)
end
end
# A record of a change to the user's mailbox. Each history change may affect
# multiple messages in multiple ways.
class History
@@ -206,6 +406,50 @@ module Google
end
end
# IMAP settings for an account.
class ImapSettings
include Google::Apis::Core::Hashable
# If this value is true, Gmail will immediately expunge a message when it is
# marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the
# client before expunging messages marked as deleted.
# Corresponds to the JSON property `autoExpunge`
# @return [Boolean]
attr_accessor :auto_expunge
alias_method :auto_expunge?, :auto_expunge
# Whether IMAP is enabled for the account.
# Corresponds to the JSON property `enabled`
# @return [Boolean]
attr_accessor :enabled
alias_method :enabled?, :enabled
# The action that will be executed on a message when it is marked as deleted and
# expunged from the last visible IMAP folder.
# Corresponds to the JSON property `expungeBehavior`
# @return [String]
attr_accessor :expunge_behavior
# An optional limit on the number of messages that an IMAP folder may contain.
# Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted
# to mean that there is no limit.
# Corresponds to the JSON property `maxFolderSize`
# @return [Fixnum]
attr_accessor :max_folder_size
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@auto_expunge = args[:auto_expunge] if args.key?(:auto_expunge)
@enabled = args[:enabled] if args.key?(:enabled)
@expunge_behavior = args[:expunge_behavior] if args.key?(:expunge_behavior)
@max_folder_size = args[:max_folder_size] if args.key?(:max_folder_size)
end
end
# Labels are used to categorize messages and threads within the user's mailbox.
class Label
include Google::Apis::Core::Hashable
@@ -311,6 +555,44 @@ module Google
end
end
# Response for the ListFilters method.
class ListFiltersResponse
include Google::Apis::Core::Hashable
# List of a user's filters.
# Corresponds to the JSON property `filter`
# @return [Array<Google::Apis::GmailV1::Filter>]
attr_accessor :filter
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@filter = args[:filter] if args.key?(:filter)
end
end
# Response for the ListForwardingAddresses method.
class ListForwardingAddressesResponse
include Google::Apis::Core::Hashable
# List of addresses that may be used for forwarding.
# Corresponds to the JSON property `forwardingAddresses`
# @return [Array<Google::Apis::GmailV1::ForwardingAddress>]
attr_accessor :forwarding_addresses
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@forwarding_addresses = args[:forwarding_addresses] if args.key?(:forwarding_addresses)
end
end
#
class ListHistoryResponse
include Google::Apis::Core::Hashable
@@ -393,6 +675,25 @@ module Google
end
end
# Response for the ListSendAs method.
class ListSendAsResponse
include Google::Apis::Core::Hashable
# List of send-as aliases.
# Corresponds to the JSON property `sendAs`
# @return [Array<Google::Apis::GmailV1::SendAs>]
attr_accessor :send_as
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@send_as = args[:send_as] if args.key?(:send_as)
end
end
#
class ListThreadsResponse
include Google::Apis::Core::Hashable
@@ -670,6 +971,35 @@ module Google
end
end
# POP settings for an account.
class PopSettings
include Google::Apis::Core::Hashable
# The range of messages which are accessible via POP. Setting this to
# FROM_NOW_ON causes any existing messages to become inaccessible and causes all
# future messages to become accessible. Setting this to ALL_MAIL causes all
# messages to become accessible, even if they have been fetched previously.
# Corresponds to the JSON property `accessWindow`
# @return [String]
attr_accessor :access_window
# The action that will be executed on a message after it has been fetched via
# POP.
# Corresponds to the JSON property `disposition`
# @return [String]
attr_accessor :disposition
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@access_window = args[:access_window] if args.key?(:access_window)
@disposition = args[:disposition] if args.key?(:disposition)
end
end
# Profile for a Gmail user.
class Profile
include Google::Apis::Core::Hashable
@@ -707,6 +1037,144 @@ module Google
end
end
# Settings associated with a send-as alias, which can be either the primary
# login address associated with the account or a custom "from" address. Send-as
# aliases correspond to the "Send Mail As" feature in the web interface. See
# for more details.
class SendAs
include Google::Apis::Core::Hashable
# A name that appears in the "From:" header for mail sent using this alias. For
# custom "from" addresses, when this is empty, Gmail will populate the "From:"
# header with the name that is used for the primary address associated with the
# account.
# Corresponds to the JSON property `displayName`
# @return [String]
attr_accessor :display_name
# Whether this address is selected as the default "From:" address in situations
# such as composing a new message or sending a vacation auto-reply. Every Gmail
# account has exactly one default send-as address, so the only legal value that
# clients may write to this field is `true`. Changing this from `false` to `true`
# for an address will result in this field becoming `false` for the other
# previous default address.
# Corresponds to the JSON property `isDefault`
# @return [Boolean]
attr_accessor :is_default
alias_method :is_default?, :is_default
# Whether this address is the primary address used to login to the account.
# Every Gmail account has exactly one primary address, and it cannot be deleted
# from the collection of send-as aliases. This field is read-only.
# Corresponds to the JSON property `isPrimary`
# @return [Boolean]
attr_accessor :is_primary
alias_method :is_primary?, :is_primary
# An optional email address that is included in a "Reply-To:" header for mail
# sent using this alias. If this is empty, Gmail will not generate a "Reply-To:"
# header.
# Corresponds to the JSON property `replyToAddress`
# @return [String]
attr_accessor :reply_to_address
# The email address that appears in the "From:" header for mail sent using this
# alias. This is read-only for all operations except create.
# Corresponds to the JSON property `sendAsEmail`
# @return [String]
attr_accessor :send_as_email
# An optional HTML signature that is included in messages composed with this
# alias in the Gmail web UI.
# Corresponds to the JSON property `signature`
# @return [String]
attr_accessor :signature
# Configuration for communication with an SMTP service.
# Corresponds to the JSON property `smtpMsa`
# @return [Google::Apis::GmailV1::SmtpMsa]
attr_accessor :smtp_msa
# Whether Gmail should treat this address as an alias for the user's primary
# email address. See for more details. This setting only applies to custom "
# from" aliases.
# Corresponds to the JSON property `treatAsAlias`
# @return [Boolean]
attr_accessor :treat_as_alias
alias_method :treat_as_alias?, :treat_as_alias
# Indicates whether this address has been verified for use as a send-as alias.
# Read-only. This setting only applies to custom "from" aliases.
# Corresponds to the JSON property `verificationStatus`
# @return [String]
attr_accessor :verification_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@display_name = args[:display_name] if args.key?(:display_name)
@is_default = args[:is_default] if args.key?(:is_default)
@is_primary = args[:is_primary] if args.key?(:is_primary)
@reply_to_address = args[:reply_to_address] if args.key?(:reply_to_address)
@send_as_email = args[:send_as_email] if args.key?(:send_as_email)
@signature = args[:signature] if args.key?(:signature)
@smtp_msa = args[:smtp_msa] if args.key?(:smtp_msa)
@treat_as_alias = args[:treat_as_alias] if args.key?(:treat_as_alias)
@verification_status = args[:verification_status] if args.key?(:verification_status)
end
end
# Configuration for communication with an SMTP service.
class SmtpMsa
include Google::Apis::Core::Hashable
# The hostname of the SMTP service. Required.
# Corresponds to the JSON property `host`
# @return [String]
attr_accessor :host
# The password that will be used for authentication with the SMTP service. This
# is a write-only field that can be specified in requests to create or update
# SendAs settings; it is never populated in responses.
# Corresponds to the JSON property `password`
# @return [String]
attr_accessor :password
# The port of the SMTP service. Required.
# Corresponds to the JSON property `port`
# @return [Fixnum]
attr_accessor :port
# The protocol that will be used to secure communication with the SMTP service.
# Required.
# Corresponds to the JSON property `securityMode`
# @return [String]
attr_accessor :security_mode
# The username that will be used for authentication with the SMTP service. This
# is a write-only field that can be specified in requests to create or update
# SendAs settings; it is never populated in responses.
# Corresponds to the JSON property `username`
# @return [String]
attr_accessor :username
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@host = args[:host] if args.key?(:host)
@password = args[:password] if args.key?(:password)
@port = args[:port] if args.key?(:port)
@security_mode = args[:security_mode] if args.key?(:security_mode)
@username = args[:username] if args.key?(:username)
end
end
# A collection of messages representing a conversation.
class Thread
include Google::Apis::Core::Hashable
@@ -744,6 +1212,81 @@ module Google
end
end
# Vacation auto-reply settings for an account. These settings correspond to the "
# Vacation responder" feature in the web interface. See for more details.
class VacationSettings
include Google::Apis::Core::Hashable
# Flag that controls whether Gmail automatically replies to messages.
# Corresponds to the JSON property `enableAutoReply`
# @return [Boolean]
attr_accessor :enable_auto_reply
alias_method :enable_auto_reply?, :enable_auto_reply
# 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`
# @return [String]
attr_accessor :end_time
# Response body in HTML format. Gmail will sanitize the HTML before storing it.
# Corresponds to the JSON property `responseBodyHtml`
# @return [String]
attr_accessor :response_body_html
# Response body in plain text format.
# Corresponds to the JSON property `responseBodyPlainText`
# @return [String]
attr_accessor :response_body_plain_text
# 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`
# @return [String]
attr_accessor :response_subject
# 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`
# @return [Boolean]
attr_accessor :restrict_to_contacts
alias_method :restrict_to_contacts?, :restrict_to_contacts
# Flag that determines whether responses are sent to recipients who are outside
# of the user's domain. This feature is only available for Google Apps users.
# Corresponds to the JSON property `restrictToDomain`
# @return [Boolean]
attr_accessor :restrict_to_domain
alias_method :restrict_to_domain?, :restrict_to_domain
# 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`
# @return [String]
attr_accessor :start_time
def initialize(**args)
update!(**args)
end
# Update properties of this object
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
end
# Set up or update a new push notification watch on this user's mailbox.
class WatchRequest
include Google::Apis::Core::Hashable
@@ -22,6 +22,12 @@ module Google
module Apis
module GmailV1
class AutoForwarding
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BatchDeleteMessagesRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -34,6 +40,30 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class Filter
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FilterAction
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class FilterCriteria
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ForwardingAddress
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class History
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -64,6 +94,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ImapSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Label
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -76,6 +112,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListFiltersResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListForwardingAddressesResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListHistoryResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -94,6 +142,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class ListSendAsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListThreadsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -136,18 +190,42 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class PopSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Profile
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SendAs
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class SmtpMsa
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class Thread
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class VacationSettings
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class WatchRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
@@ -160,6 +238,15 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AutoForwarding
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :disposition, as: 'disposition'
property :email_address, as: 'emailAddress'
property :enabled, as: 'enabled'
end
end
class BatchDeleteMessagesRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -176,6 +263,49 @@ module Google
end
end
class Filter
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action', class: Google::Apis::GmailV1::FilterAction, decorator: Google::Apis::GmailV1::FilterAction::Representation
property :criteria, as: 'criteria', class: Google::Apis::GmailV1::FilterCriteria, decorator: Google::Apis::GmailV1::FilterCriteria::Representation
property :id, as: 'id'
end
end
class FilterAction
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :add_label_ids, as: 'addLabelIds'
property :forward, as: 'forward'
collection :remove_label_ids, as: 'removeLabelIds'
end
end
class FilterCriteria
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :exclude_chats, as: 'excludeChats'
property :from, as: 'from'
property :has_attachment, as: 'hasAttachment'
property :negated_query, as: 'negatedQuery'
property :query, as: 'query'
property :size, as: 'size'
property :size_comparison, as: 'sizeComparison'
property :subject, as: 'subject'
property :to, as: 'to'
end
end
class ForwardingAddress
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :forwarding_email, as: 'forwardingEmail'
property :verification_status, as: 'verificationStatus'
end
end
class History
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -227,6 +357,16 @@ module Google
end
end
class ImapSettings
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :auto_expunge, as: 'autoExpunge'
property :enabled, as: 'enabled'
property :expunge_behavior, as: 'expungeBehavior'
property :max_folder_size, as: 'maxFolderSize'
end
end
class Label
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -252,6 +392,22 @@ module Google
end
end
class ListFiltersResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :filter, as: 'filter', class: Google::Apis::GmailV1::Filter, decorator: Google::Apis::GmailV1::Filter::Representation
end
end
class ListForwardingAddressesResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :forwarding_addresses, as: 'forwardingAddresses', class: Google::Apis::GmailV1::ForwardingAddress, decorator: Google::Apis::GmailV1::ForwardingAddress::Representation
end
end
class ListHistoryResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -280,6 +436,14 @@ module Google
end
end
class ListSendAsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :send_as, as: 'sendAs', class: Google::Apis::GmailV1::SendAs, decorator: Google::Apis::GmailV1::SendAs::Representation
end
end
class ListThreadsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -354,6 +518,14 @@ module Google
end
end
class PopSettings
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :access_window, as: 'accessWindow'
property :disposition, as: 'disposition'
end
end
class Profile
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -364,6 +536,33 @@ module Google
end
end
class SendAs
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :display_name, as: 'displayName'
property :is_default, as: 'isDefault'
property :is_primary, as: 'isPrimary'
property :reply_to_address, as: 'replyToAddress'
property :send_as_email, as: 'sendAsEmail'
property :signature, as: 'signature'
property :smtp_msa, as: 'smtpMsa', class: Google::Apis::GmailV1::SmtpMsa, decorator: Google::Apis::GmailV1::SmtpMsa::Representation
property :treat_as_alias, as: 'treatAsAlias'
property :verification_status, as: 'verificationStatus'
end
end
class SmtpMsa
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :host, as: 'host'
property :password, as: 'password'
property :port, as: 'port'
property :security_mode, as: 'securityMode'
property :username, as: 'username'
end
end
class Thread
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@@ -375,6 +574,20 @@ module Google
end
end
class VacationSettings
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :enable_auto_reply, as: 'enableAutoReply'
property :end_time, as: 'endTime'
property :response_body_html, as: 'responseBodyHtml'
property :response_body_plain_text, as: 'responseBodyPlainText'
property :response_subject, as: 'responseSubject'
property :restrict_to_contacts, as: 'restrictToContacts'
property :restrict_to_domain, as: 'restrictToDomain'
property :start_time, as: 'startTime'
end
end
class WatchRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
+892
View File
@@ -1246,6 +1246,898 @@ module Google
execute_or_queue_command(command, &block)
end
# Gets the auto-forwarding setting for the specified account.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::AutoForwarding] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::AutoForwarding]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_auto_forwarding(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/autoForwarding', options)
command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation
command.response_class = Google::Apis::GmailV1::AutoForwarding
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets IMAP settings.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ImapSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ImapSettings]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_imap(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/imap', options)
command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation
command.response_class = Google::Apis::GmailV1::ImapSettings
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets POP settings.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::PopSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::PopSettings]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_pop(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/pop', options)
command.response_representation = Google::Apis::GmailV1::PopSettings::Representation
command.response_class = Google::Apis::GmailV1::PopSettings
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets vacation responder settings.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::VacationSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::VacationSettings]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_vacation(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/vacation', options)
command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation
command.response_class = Google::Apis::GmailV1::VacationSettings
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates the auto-forwarding setting for the specified account. A verified
# forwarding address must be specified when auto-forwarding is enabled.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::AutoForwarding] auto_forwarding_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::AutoForwarding] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::AutoForwarding]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_user_setting_auto_forwarding(user_id, auto_forwarding_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{userId}/settings/autoForwarding', options)
command.request_representation = Google::Apis::GmailV1::AutoForwarding::Representation
command.request_object = auto_forwarding_object
command.response_representation = Google::Apis::GmailV1::AutoForwarding::Representation
command.response_class = Google::Apis::GmailV1::AutoForwarding
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates IMAP settings.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::ImapSettings] imap_settings_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ImapSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ImapSettings]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_user_setting_imap(user_id, imap_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{userId}/settings/imap', options)
command.request_representation = Google::Apis::GmailV1::ImapSettings::Representation
command.request_object = imap_settings_object
command.response_representation = Google::Apis::GmailV1::ImapSettings::Representation
command.response_class = Google::Apis::GmailV1::ImapSettings
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates POP settings.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::PopSettings] pop_settings_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::PopSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::PopSettings]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_user_setting_pop(user_id, pop_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{userId}/settings/pop', options)
command.request_representation = Google::Apis::GmailV1::PopSettings::Representation
command.request_object = pop_settings_object
command.response_representation = Google::Apis::GmailV1::PopSettings::Representation
command.response_class = Google::Apis::GmailV1::PopSettings
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates vacation responder settings.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::VacationSettings] vacation_settings_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::VacationSettings] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::VacationSettings]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_user_setting_vacation(user_id, vacation_settings_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{userId}/settings/vacation', options)
command.request_representation = Google::Apis::GmailV1::VacationSettings::Representation
command.request_object = vacation_settings_object
command.response_representation = Google::Apis::GmailV1::VacationSettings::Representation
command.response_class = Google::Apis::GmailV1::VacationSettings
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates a filter.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::Filter] filter_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::Filter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::Filter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_user_setting_filter(user_id, filter_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{userId}/settings/filters', options)
command.request_representation = Google::Apis::GmailV1::Filter::Representation
command.request_object = filter_object
command.response_representation = Google::Apis::GmailV1::Filter::Representation
command.response_class = Google::Apis::GmailV1::Filter
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes a filter.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] id
# The ID of the filter to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{userId}/settings/filters/{id}', options)
command.params['userId'] = user_id unless user_id.nil?
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets a filter.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] id
# The ID of the filter to be fetched.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::Filter] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::Filter]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_filter(user_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/filters/{id}', options)
command.response_representation = Google::Apis::GmailV1::Filter::Representation
command.response_class = Google::Apis::GmailV1::Filter
command.params['userId'] = user_id unless user_id.nil?
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists the message filters of a Gmail user.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ListFiltersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ListFiltersResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_user_setting_filters(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/filters', options)
command.response_representation = Google::Apis::GmailV1::ListFiltersResponse::Representation
command.response_class = Google::Apis::GmailV1::ListFiltersResponse
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates a forwarding address. If ownership verification is required, a message
# will be sent to the recipient and the resource's verification status will be
# set to `pending`; otherwise, the resource will be created with verification
# status set to `accepted`.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::ForwardingAddress] forwarding_address_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ForwardingAddress] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ForwardingAddress]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_user_setting_forwarding_address(user_id, forwarding_address_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{userId}/settings/forwardingAddresses', options)
command.request_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
command.request_object = forwarding_address_object
command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
command.response_class = Google::Apis::GmailV1::ForwardingAddress
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes the specified forwarding address and revokes any verification that may
# have been required.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] forwarding_email
# The forwarding address to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{userId}/settings/forwardingAddresses/{forwardingEmail}', options)
command.params['userId'] = user_id unless user_id.nil?
command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets the specified forwarding address.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] forwarding_email
# The forwarding address to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ForwardingAddress] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ForwardingAddress]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_forwarding_address(user_id, forwarding_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/forwardingAddresses/{forwardingEmail}', options)
command.response_representation = Google::Apis::GmailV1::ForwardingAddress::Representation
command.response_class = Google::Apis::GmailV1::ForwardingAddress
command.params['userId'] = user_id unless user_id.nil?
command.params['forwardingEmail'] = forwarding_email unless forwarding_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists the forwarding addresses for the specified account.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ListForwardingAddressesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ListForwardingAddressesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_user_setting_forwarding_addresses(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/forwardingAddresses', options)
command.response_representation = Google::Apis::GmailV1::ListForwardingAddressesResponse::Representation
command.response_class = Google::Apis::GmailV1::ListForwardingAddressesResponse
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail will
# attempt to connect to the SMTP service to validate the configuration before
# creating the alias. If ownership verification is required for the alias, a
# message will be sent to the email address and the resource's verification
# status will be set to `pending`; otherwise, the resource will be created with
# verification status set to `accepted`. If a signature is provided, Gmail will
# sanitize the HTML before saving it with the alias.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [Google::Apis::GmailV1::SendAs] send_as_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::SendAs]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_user_setting_send_as(user_id, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{userId}/settings/sendAs', options)
command.request_representation = Google::Apis::GmailV1::SendAs::Representation
command.request_object = send_as_object
command.response_representation = Google::Apis::GmailV1::SendAs::Representation
command.response_class = Google::Apis::GmailV1::SendAs
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes the specified send-as alias. Revokes any verification that may have
# been required for using it.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] send_as_email
# The send-as alias to be deleted.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, '{userId}/settings/sendAs/{sendAsEmail}', options)
command.params['userId'] = user_id unless user_id.nil?
command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Gets the specified send-as alias. Fails with an HTTP 404 error if the
# specified address is not a member of the collection.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] send_as_email
# The send-as alias to be retrieved.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::SendAs]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/sendAs/{sendAsEmail}', options)
command.response_representation = Google::Apis::GmailV1::SendAs::Representation
command.response_class = Google::Apis::GmailV1::SendAs
command.params['userId'] = user_id unless user_id.nil?
command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists the send-as aliases for the specified account. The result includes the
# primary send-as address associated with the account as well as any custom "
# from" aliases.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::ListSendAsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::ListSendAsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_user_setting_send_as(user_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, '{userId}/settings/sendAs', options)
command.response_representation = Google::Apis::GmailV1::ListSendAsResponse::Representation
command.response_class = Google::Apis::GmailV1::ListSendAsResponse
command.params['userId'] = user_id unless user_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates a send-as alias. If a signature is provided, Gmail will sanitize the
# HTML before saving it with the alias. This method supports patch semantics.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] send_as_email
# The send-as alias to be updated.
# @param [Google::Apis::GmailV1::SendAs] send_as_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::SendAs]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, '{userId}/settings/sendAs/{sendAsEmail}', options)
command.request_representation = Google::Apis::GmailV1::SendAs::Representation
command.request_object = send_as_object
command.response_representation = Google::Apis::GmailV1::SendAs::Representation
command.response_class = Google::Apis::GmailV1::SendAs
command.params['userId'] = user_id unless user_id.nil?
command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates a send-as alias. If a signature is provided, Gmail will sanitize the
# HTML before saving it with the alias.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] send_as_email
# The send-as alias to be updated.
# @param [Google::Apis::GmailV1::SendAs] send_as_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GmailV1::SendAs] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GmailV1::SendAs]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def update_user_setting_send_as(user_id, send_as_email, send_as_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, '{userId}/settings/sendAs/{sendAsEmail}', options)
command.request_representation = Google::Apis::GmailV1::SendAs::Representation
command.request_object = send_as_object
command.response_representation = Google::Apis::GmailV1::SendAs::Representation
command.response_class = Google::Apis::GmailV1::SendAs
command.params['userId'] = user_id unless user_id.nil?
command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Sends a verification email to the specified send-as alias address. The
# verification status must be `pending`.
# @param [String] user_id
# User's email address. The special value "me" can be used to indicate the
# authenticated user.
# @param [String] send_as_email
# The send-as alias to be verified.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# Overrides userIp if both are provided.
# @param [String] user_ip
# IP address of the site where the request originates. Use this if you want to
# enforce per-user limits.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [NilClass] No result returned for this method
# @yieldparam err [StandardError] error object if request failed
#
# @return [void]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def verify_user_setting_send_as(user_id, send_as_email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{userId}/settings/sendAs/{sendAsEmail}/verify', options)
command.params['userId'] = user_id unless user_id.nil?
command.params['sendAsEmail'] = send_as_email unless send_as_email.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Immediately and permanently deletes the specified thread. This operation
# cannot be undone. Prefer threads.trash instead.
# @param [String] user_id