Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Side by Side Diff: generated/googleapis/lib/gmail/v1.dart

Issue 2159673002: Api-roll 39: 2016-07-18 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/genomics/v1.dart ('k') | generated/googleapis/lib/qpxexpress/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.gmail.v1; 3 library googleapis.gmail.v1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 21 matching lines...) Expand all
32 32
33 /** View and modify but not delete your email */ 33 /** View and modify but not delete your email */
34 static const GmailModifyScope = "https://www.googleapis.com/auth/gmail.modify" ; 34 static const GmailModifyScope = "https://www.googleapis.com/auth/gmail.modify" ;
35 35
36 /** View your emails messages and settings */ 36 /** View your emails messages and settings */
37 static const GmailReadonlyScope = "https://www.googleapis.com/auth/gmail.reado nly"; 37 static const GmailReadonlyScope = "https://www.googleapis.com/auth/gmail.reado nly";
38 38
39 /** Send email on your behalf */ 39 /** Send email on your behalf */
40 static const GmailSendScope = "https://www.googleapis.com/auth/gmail.send"; 40 static const GmailSendScope = "https://www.googleapis.com/auth/gmail.send";
41 41
42 /** Manage your basic mail settings */
43 static const GmailSettingsBasicScope = "https://www.googleapis.com/auth/gmail. settings.basic";
44
45 /**
46 * Manage your sensitive mail settings, including who can manage your mail
47 */
48 static const GmailSettingsSharingScope = "https://www.googleapis.com/auth/gmai l.settings.sharing";
49
42 50
43 final commons.ApiRequester _requester; 51 final commons.ApiRequester _requester;
44 52
45 UsersResourceApi get users => new UsersResourceApi(_requester); 53 UsersResourceApi get users => new UsersResourceApi(_requester);
46 54
47 GmailApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "gmail/v1/users/"}) : 55 GmailApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com /", core.String servicePath: "gmail/v1/users/"}) :
48 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 56 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
49 } 57 }
50 58
51 59
52 class UsersResourceApi { 60 class UsersResourceApi {
53 final commons.ApiRequester _requester; 61 final commons.ApiRequester _requester;
54 62
55 UsersDraftsResourceApi get drafts => new UsersDraftsResourceApi(_requester); 63 UsersDraftsResourceApi get drafts => new UsersDraftsResourceApi(_requester);
56 UsersHistoryResourceApi get history => new UsersHistoryResourceApi(_requester) ; 64 UsersHistoryResourceApi get history => new UsersHistoryResourceApi(_requester) ;
57 UsersLabelsResourceApi get labels => new UsersLabelsResourceApi(_requester); 65 UsersLabelsResourceApi get labels => new UsersLabelsResourceApi(_requester);
58 UsersMessagesResourceApi get messages => new UsersMessagesResourceApi(_request er); 66 UsersMessagesResourceApi get messages => new UsersMessagesResourceApi(_request er);
67 UsersSettingsResourceApi get settings => new UsersSettingsResourceApi(_request er);
59 UsersThreadsResourceApi get threads => new UsersThreadsResourceApi(_requester) ; 68 UsersThreadsResourceApi get threads => new UsersThreadsResourceApi(_requester) ;
60 69
61 UsersResourceApi(commons.ApiRequester client) : 70 UsersResourceApi(commons.ApiRequester client) :
62 _requester = client; 71 _requester = client;
63 72
64 /** 73 /**
65 * Gets the current user's Gmail profile. 74 * Gets the current user's Gmail profile.
66 * 75 *
67 * Request parameters: 76 * Request parameters:
68 * 77 *
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 queryParams: _queryParams, 1575 queryParams: _queryParams,
1567 uploadOptions: _uploadOptions, 1576 uploadOptions: _uploadOptions,
1568 uploadMedia: _uploadMedia, 1577 uploadMedia: _uploadMedia,
1569 downloadOptions: _downloadOptions); 1578 downloadOptions: _downloadOptions);
1570 return _response.then((data) => new MessagePartBody.fromJson(data)); 1579 return _response.then((data) => new MessagePartBody.fromJson(data));
1571 } 1580 }
1572 1581
1573 } 1582 }
1574 1583
1575 1584
1576 class UsersThreadsResourceApi { 1585 class UsersSettingsResourceApi {
1577 final commons.ApiRequester _requester; 1586 final commons.ApiRequester _requester;
1578 1587
1579 UsersThreadsResourceApi(commons.ApiRequester client) : 1588 UsersSettingsFiltersResourceApi get filters => new UsersSettingsFiltersResourc eApi(_requester);
1589 UsersSettingsForwardingAddressesResourceApi get forwardingAddresses => new Use rsSettingsForwardingAddressesResourceApi(_requester);
1590 UsersSettingsSendAsResourceApi get sendAs => new UsersSettingsSendAsResourceAp i(_requester);
1591
1592 UsersSettingsResourceApi(commons.ApiRequester client) :
1580 _requester = client; 1593 _requester = client;
1581 1594
1582 /** 1595 /**
1583 * Immediately and permanently deletes the specified thread. This operation 1596 * Gets the auto-forwarding setting for the specified account.
1584 * cannot be undone. Prefer threads.trash instead.
1585 * 1597 *
1586 * Request parameters: 1598 * Request parameters:
1587 * 1599 *
1588 * [userId] - The user's email address. The special value me can be used to 1600 * [userId] - User's email address. The special value "me" can be used to
1589 * indicate the authenticated user. 1601 * indicate the authenticated user.
1590 * 1602 *
1591 * [id] - ID of the Thread to delete. 1603 * Completes with a [AutoForwarding].
1592 * 1604 *
1593 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1605 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1594 * error. 1606 * error.
1595 * 1607 *
1596 * If the used [http.Client] completes with an error when making a REST call, 1608 * If the used [http.Client] completes with an error when making a REST call,
1597 * this method will complete with the same error. 1609 * this method will complete with the same error.
1598 */ 1610 */
1599 async.Future delete(core.String userId, core.String id) { 1611 async.Future<AutoForwarding> getAutoForwarding(core.String userId) {
1600 var _url = null; 1612 var _url = null;
1601 var _queryParams = new core.Map(); 1613 var _queryParams = new core.Map();
1602 var _uploadMedia = null; 1614 var _uploadMedia = null;
1603 var _uploadOptions = null; 1615 var _uploadOptions = null;
1604 var _downloadOptions = commons.DownloadOptions.Metadata; 1616 var _downloadOptions = commons.DownloadOptions.Metadata;
1605 var _body = null; 1617 var _body = null;
1606 1618
1607 if (userId == null) { 1619 if (userId == null) {
1608 throw new core.ArgumentError("Parameter userId is required."); 1620 throw new core.ArgumentError("Parameter userId is required.");
1609 } 1621 }
1610 if (id == null) {
1611 throw new core.ArgumentError("Parameter id is required.");
1612 }
1613 1622
1614 _downloadOptions = null; 1623 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/autoForwarding' ;
1615
1616 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id');
1617 1624
1618 var _response = _requester.request(_url, 1625 var _response = _requester.request(_url,
1619 "DELETE", 1626 "GET",
1620 body: _body, 1627 body: _body,
1621 queryParams: _queryParams, 1628 queryParams: _queryParams,
1622 uploadOptions: _uploadOptions, 1629 uploadOptions: _uploadOptions,
1623 uploadMedia: _uploadMedia, 1630 uploadMedia: _uploadMedia,
1624 downloadOptions: _downloadOptions); 1631 downloadOptions: _downloadOptions);
1625 return _response.then((data) => null); 1632 return _response.then((data) => new AutoForwarding.fromJson(data));
1626 } 1633 }
1627 1634
1628 /** 1635 /**
1629 * Gets the specified thread. 1636 * Gets IMAP settings.
1630 * 1637 *
1631 * Request parameters: 1638 * Request parameters:
1632 * 1639 *
1633 * [userId] - The user's email address. The special value me can be used to 1640 * [userId] - User's email address. The special value "me" can be used to
1634 * indicate the authenticated user. 1641 * indicate the authenticated user.
1635 * 1642 *
1636 * [id] - The ID of the thread to retrieve. 1643 * Completes with a [ImapSettings].
1637 *
1638 * [format] - The format to return the messages in.
1639 * Possible string values are:
1640 * - "full"
1641 * - "metadata"
1642 * - "minimal"
1643 *
1644 * [metadataHeaders] - When given and format is METADATA, only include headers
1645 * specified.
1646 *
1647 * Completes with a [Thread].
1648 * 1644 *
1649 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1645 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1650 * error. 1646 * error.
1647 *
1648 * If the used [http.Client] completes with an error when making a REST call,
1649 * this method will complete with the same error.
1650 */
1651 async.Future<ImapSettings> getImap(core.String userId) {
1652 var _url = null;
1653 var _queryParams = new core.Map();
1654 var _uploadMedia = null;
1655 var _uploadOptions = null;
1656 var _downloadOptions = commons.DownloadOptions.Metadata;
1657 var _body = null;
1658
1659 if (userId == null) {
1660 throw new core.ArgumentError("Parameter userId is required.");
1661 }
1662
1663 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/imap';
1664
1665 var _response = _requester.request(_url,
1666 "GET",
1667 body: _body,
1668 queryParams: _queryParams,
1669 uploadOptions: _uploadOptions,
1670 uploadMedia: _uploadMedia,
1671 downloadOptions: _downloadOptions);
1672 return _response.then((data) => new ImapSettings.fromJson(data));
1673 }
1674
1675 /**
1676 * Gets POP settings.
1677 *
1678 * Request parameters:
1679 *
1680 * [userId] - User's email address. The special value "me" can be used to
1681 * indicate the authenticated user.
1682 *
1683 * Completes with a [PopSettings].
1684 *
1685 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1686 * error.
1651 * 1687 *
1652 * If the used [http.Client] completes with an error when making a REST call, 1688 * If the used [http.Client] completes with an error when making a REST call,
1653 * this method will complete with the same error. 1689 * this method will complete with the same error.
1654 */ 1690 */
1655 async.Future<Thread> get(core.String userId, core.String id, {core.String form at, core.List<core.String> metadataHeaders}) { 1691 async.Future<PopSettings> getPop(core.String userId) {
1656 var _url = null; 1692 var _url = null;
1657 var _queryParams = new core.Map(); 1693 var _queryParams = new core.Map();
1658 var _uploadMedia = null; 1694 var _uploadMedia = null;
1659 var _uploadOptions = null; 1695 var _uploadOptions = null;
1660 var _downloadOptions = commons.DownloadOptions.Metadata; 1696 var _downloadOptions = commons.DownloadOptions.Metadata;
1661 var _body = null; 1697 var _body = null;
1662 1698
1663 if (userId == null) { 1699 if (userId == null) {
1664 throw new core.ArgumentError("Parameter userId is required."); 1700 throw new core.ArgumentError("Parameter userId is required.");
1665 } 1701 }
1666 if (id == null) {
1667 throw new core.ArgumentError("Parameter id is required.");
1668 }
1669 if (format != null) {
1670 _queryParams["format"] = [format];
1671 }
1672 if (metadataHeaders != null) {
1673 _queryParams["metadataHeaders"] = metadataHeaders;
1674 }
1675 1702
1676 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id'); 1703 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/pop';
1677 1704
1678 var _response = _requester.request(_url, 1705 var _response = _requester.request(_url,
1679 "GET", 1706 "GET",
1680 body: _body, 1707 body: _body,
1681 queryParams: _queryParams, 1708 queryParams: _queryParams,
1682 uploadOptions: _uploadOptions, 1709 uploadOptions: _uploadOptions,
1683 uploadMedia: _uploadMedia, 1710 uploadMedia: _uploadMedia,
1684 downloadOptions: _downloadOptions); 1711 downloadOptions: _downloadOptions);
1685 return _response.then((data) => new Thread.fromJson(data)); 1712 return _response.then((data) => new PopSettings.fromJson(data));
1686 } 1713 }
1687 1714
1688 /** 1715 /**
1689 * Lists the threads in the user's mailbox. 1716 * Gets vacation responder settings.
1690 * 1717 *
1691 * Request parameters: 1718 * Request parameters:
1692 * 1719 *
1693 * [userId] - The user's email address. The special value me can be used to 1720 * [userId] - User's email address. The special value "me" can be used to
1694 * indicate the authenticated user. 1721 * indicate the authenticated user.
1695 * 1722 *
1696 * [includeSpamTrash] - Include threads from SPAM and TRASH in the results. 1723 * Completes with a [VacationSettings].
1697 *
1698 * [labelIds] - Only return threads with labels that match all of the
1699 * specified label IDs.
1700 *
1701 * [maxResults] - Maximum number of threads to return.
1702 *
1703 * [pageToken] - Page token to retrieve a specific page of results in the
1704 * list.
1705 *
1706 * [q] - Only return threads matching the specified query. Supports the same
1707 * query format as the Gmail search box. For example,
1708 * "from:someuser@example.com rfc822msgid: is:unread".
1709 *
1710 * Completes with a [ListThreadsResponse].
1711 * 1724 *
1712 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1725 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1713 * error. 1726 * error.
1727 *
1728 * If the used [http.Client] completes with an error when making a REST call,
1729 * this method will complete with the same error.
1730 */
1731 async.Future<VacationSettings> getVacation(core.String userId) {
1732 var _url = null;
1733 var _queryParams = new core.Map();
1734 var _uploadMedia = null;
1735 var _uploadOptions = null;
1736 var _downloadOptions = commons.DownloadOptions.Metadata;
1737 var _body = null;
1738
1739 if (userId == null) {
1740 throw new core.ArgumentError("Parameter userId is required.");
1741 }
1742
1743 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/vacation';
1744
1745 var _response = _requester.request(_url,
1746 "GET",
1747 body: _body,
1748 queryParams: _queryParams,
1749 uploadOptions: _uploadOptions,
1750 uploadMedia: _uploadMedia,
1751 downloadOptions: _downloadOptions);
1752 return _response.then((data) => new VacationSettings.fromJson(data));
1753 }
1754
1755 /**
1756 * Updates the auto-forwarding setting for the specified account. A verified
1757 * forwarding address must be specified when auto-forwarding is enabled.
1758 *
1759 * [request] - The metadata request object.
1760 *
1761 * Request parameters:
1762 *
1763 * [userId] - User's email address. The special value "me" can be used to
1764 * indicate the authenticated user.
1765 *
1766 * Completes with a [AutoForwarding].
1767 *
1768 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1769 * error.
1714 * 1770 *
1715 * If the used [http.Client] completes with an error when making a REST call, 1771 * If the used [http.Client] completes with an error when making a REST call,
1716 * this method will complete with the same error. 1772 * this method will complete with the same error.
1717 */ 1773 */
1718 async.Future<ListThreadsResponse> list(core.String userId, {core.bool includeS pamTrash, core.List<core.String> labelIds, core.int maxResults, core.String page Token, core.String q}) { 1774 async.Future<AutoForwarding> updateAutoForwarding(AutoForwarding request, core .String userId) {
1719 var _url = null; 1775 var _url = null;
1720 var _queryParams = new core.Map(); 1776 var _queryParams = new core.Map();
1721 var _uploadMedia = null; 1777 var _uploadMedia = null;
1722 var _uploadOptions = null; 1778 var _uploadOptions = null;
1723 var _downloadOptions = commons.DownloadOptions.Metadata; 1779 var _downloadOptions = commons.DownloadOptions.Metadata;
1724 var _body = null; 1780 var _body = null;
1725 1781
1782 if (request != null) {
1783 _body = convert.JSON.encode((request).toJson());
1784 }
1726 if (userId == null) { 1785 if (userId == null) {
1727 throw new core.ArgumentError("Parameter userId is required."); 1786 throw new core.ArgumentError("Parameter userId is required.");
1728 } 1787 }
1729 if (includeSpamTrash != null) {
1730 _queryParams["includeSpamTrash"] = ["${includeSpamTrash}"];
1731 }
1732 if (labelIds != null) {
1733 _queryParams["labelIds"] = labelIds;
1734 }
1735 if (maxResults != null) {
1736 _queryParams["maxResults"] = ["${maxResults}"];
1737 }
1738 if (pageToken != null) {
1739 _queryParams["pageToken"] = [pageToken];
1740 }
1741 if (q != null) {
1742 _queryParams["q"] = [q];
1743 }
1744 1788
1745 _url = commons.Escaper.ecapeVariable('$userId') + '/threads'; 1789 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/autoForwarding' ;
1746 1790
1747 var _response = _requester.request(_url, 1791 var _response = _requester.request(_url,
1748 "GET", 1792 "PUT",
1749 body: _body, 1793 body: _body,
1750 queryParams: _queryParams, 1794 queryParams: _queryParams,
1751 uploadOptions: _uploadOptions, 1795 uploadOptions: _uploadOptions,
1752 uploadMedia: _uploadMedia, 1796 uploadMedia: _uploadMedia,
1753 downloadOptions: _downloadOptions); 1797 downloadOptions: _downloadOptions);
1754 return _response.then((data) => new ListThreadsResponse.fromJson(data)); 1798 return _response.then((data) => new AutoForwarding.fromJson(data));
1755 } 1799 }
1756 1800
1757 /** 1801 /**
1758 * Modifies the labels applied to the thread. This applies to all messages in 1802 * Updates IMAP settings.
1759 * the thread.
1760 * 1803 *
1761 * [request] - The metadata request object. 1804 * [request] - The metadata request object.
1762 * 1805 *
1763 * Request parameters: 1806 * Request parameters:
1764 * 1807 *
1765 * [userId] - The user's email address. The special value me can be used to 1808 * [userId] - User's email address. The special value "me" can be used to
1766 * indicate the authenticated user. 1809 * indicate the authenticated user.
1767 * 1810 *
1768 * [id] - The ID of the thread to modify. 1811 * Completes with a [ImapSettings].
1769 *
1770 * Completes with a [Thread].
1771 * 1812 *
1772 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1813 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1773 * error. 1814 * error.
1774 * 1815 *
1775 * If the used [http.Client] completes with an error when making a REST call, 1816 * If the used [http.Client] completes with an error when making a REST call,
1776 * this method will complete with the same error. 1817 * this method will complete with the same error.
1777 */ 1818 */
1778 async.Future<Thread> modify(ModifyThreadRequest request, core.String userId, c ore.String id) { 1819 async.Future<ImapSettings> updateImap(ImapSettings request, core.String userId ) {
1779 var _url = null; 1820 var _url = null;
1780 var _queryParams = new core.Map(); 1821 var _queryParams = new core.Map();
1781 var _uploadMedia = null; 1822 var _uploadMedia = null;
1782 var _uploadOptions = null; 1823 var _uploadOptions = null;
1783 var _downloadOptions = commons.DownloadOptions.Metadata; 1824 var _downloadOptions = commons.DownloadOptions.Metadata;
1784 var _body = null; 1825 var _body = null;
1785 1826
1786 if (request != null) { 1827 if (request != null) {
1787 _body = convert.JSON.encode((request).toJson()); 1828 _body = convert.JSON.encode((request).toJson());
1788 } 1829 }
1789 if (userId == null) { 1830 if (userId == null) {
1790 throw new core.ArgumentError("Parameter userId is required."); 1831 throw new core.ArgumentError("Parameter userId is required.");
1791 } 1832 }
1792 if (id == null) {
1793 throw new core.ArgumentError("Parameter id is required.");
1794 }
1795 1833
1796 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id') + '/modify'; 1834 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/imap';
1797 1835
1798 var _response = _requester.request(_url, 1836 var _response = _requester.request(_url,
1799 "POST", 1837 "PUT",
1800 body: _body, 1838 body: _body,
1801 queryParams: _queryParams, 1839 queryParams: _queryParams,
1802 uploadOptions: _uploadOptions, 1840 uploadOptions: _uploadOptions,
1803 uploadMedia: _uploadMedia, 1841 uploadMedia: _uploadMedia,
1804 downloadOptions: _downloadOptions); 1842 downloadOptions: _downloadOptions);
1805 return _response.then((data) => new Thread.fromJson(data)); 1843 return _response.then((data) => new ImapSettings.fromJson(data));
1806 } 1844 }
1807 1845
1808 /** 1846 /**
1809 * Moves the specified thread to the trash. 1847 * Updates POP settings.
1848 *
1849 * [request] - The metadata request object.
1810 * 1850 *
1811 * Request parameters: 1851 * Request parameters:
1812 * 1852 *
1813 * [userId] - The user's email address. The special value me can be used to 1853 * [userId] - User's email address. The special value "me" can be used to
1814 * indicate the authenticated user. 1854 * indicate the authenticated user.
1815 * 1855 *
1816 * [id] - The ID of the thread to Trash. 1856 * Completes with a [PopSettings].
1817 *
1818 * Completes with a [Thread].
1819 * 1857 *
1820 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1858 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1821 * error. 1859 * error.
1822 * 1860 *
1823 * If the used [http.Client] completes with an error when making a REST call, 1861 * If the used [http.Client] completes with an error when making a REST call,
1824 * this method will complete with the same error. 1862 * this method will complete with the same error.
1825 */ 1863 */
1826 async.Future<Thread> trash(core.String userId, core.String id) { 1864 async.Future<PopSettings> updatePop(PopSettings request, core.String userId) {
1827 var _url = null; 1865 var _url = null;
1828 var _queryParams = new core.Map(); 1866 var _queryParams = new core.Map();
1829 var _uploadMedia = null; 1867 var _uploadMedia = null;
1830 var _uploadOptions = null; 1868 var _uploadOptions = null;
1831 var _downloadOptions = commons.DownloadOptions.Metadata; 1869 var _downloadOptions = commons.DownloadOptions.Metadata;
1832 var _body = null; 1870 var _body = null;
1833 1871
1872 if (request != null) {
1873 _body = convert.JSON.encode((request).toJson());
1874 }
1834 if (userId == null) { 1875 if (userId == null) {
1835 throw new core.ArgumentError("Parameter userId is required."); 1876 throw new core.ArgumentError("Parameter userId is required.");
1836 } 1877 }
1837 if (id == null) {
1838 throw new core.ArgumentError("Parameter id is required.");
1839 }
1840 1878
1841 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id') + '/trash'; 1879 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/pop';
1842 1880
1843 var _response = _requester.request(_url, 1881 var _response = _requester.request(_url,
1844 "POST", 1882 "PUT",
1845 body: _body, 1883 body: _body,
1846 queryParams: _queryParams, 1884 queryParams: _queryParams,
1847 uploadOptions: _uploadOptions, 1885 uploadOptions: _uploadOptions,
1848 uploadMedia: _uploadMedia, 1886 uploadMedia: _uploadMedia,
1849 downloadOptions: _downloadOptions); 1887 downloadOptions: _downloadOptions);
1850 return _response.then((data) => new Thread.fromJson(data)); 1888 return _response.then((data) => new PopSettings.fromJson(data));
1851 } 1889 }
1852 1890
1853 /** 1891 /**
1854 * Removes the specified thread from the trash. 1892 * Updates vacation responder settings.
1893 *
1894 * [request] - The metadata request object.
1855 * 1895 *
1856 * Request parameters: 1896 * Request parameters:
1857 * 1897 *
1858 * [userId] - The user's email address. The special value me can be used to 1898 * [userId] - User's email address. The special value "me" can be used to
1859 * indicate the authenticated user. 1899 * indicate the authenticated user.
1860 * 1900 *
1861 * [id] - The ID of the thread to remove from Trash. 1901 * Completes with a [VacationSettings].
1862 *
1863 * Completes with a [Thread].
1864 * 1902 *
1865 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1903 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1866 * error. 1904 * error.
1867 * 1905 *
1868 * If the used [http.Client] completes with an error when making a REST call, 1906 * If the used [http.Client] completes with an error when making a REST call,
1869 * this method will complete with the same error. 1907 * this method will complete with the same error.
1870 */ 1908 */
1871 async.Future<Thread> untrash(core.String userId, core.String id) { 1909 async.Future<VacationSettings> updateVacation(VacationSettings request, core.S tring userId) {
1872 var _url = null; 1910 var _url = null;
1873 var _queryParams = new core.Map(); 1911 var _queryParams = new core.Map();
1874 var _uploadMedia = null; 1912 var _uploadMedia = null;
1875 var _uploadOptions = null; 1913 var _uploadOptions = null;
1876 var _downloadOptions = commons.DownloadOptions.Metadata; 1914 var _downloadOptions = commons.DownloadOptions.Metadata;
1877 var _body = null; 1915 var _body = null;
1878 1916
1917 if (request != null) {
1918 _body = convert.JSON.encode((request).toJson());
1919 }
1920 if (userId == null) {
1921 throw new core.ArgumentError("Parameter userId is required.");
1922 }
1923
1924 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/vacation';
1925
1926 var _response = _requester.request(_url,
1927 "PUT",
1928 body: _body,
1929 queryParams: _queryParams,
1930 uploadOptions: _uploadOptions,
1931 uploadMedia: _uploadMedia,
1932 downloadOptions: _downloadOptions);
1933 return _response.then((data) => new VacationSettings.fromJson(data));
1934 }
1935
1936 }
1937
1938
1939 class UsersSettingsFiltersResourceApi {
1940 final commons.ApiRequester _requester;
1941
1942 UsersSettingsFiltersResourceApi(commons.ApiRequester client) :
1943 _requester = client;
1944
1945 /**
1946 * Creates a filter.
1947 *
1948 * [request] - The metadata request object.
1949 *
1950 * Request parameters:
1951 *
1952 * [userId] - User's email address. The special value "me" can be used to
1953 * indicate the authenticated user.
1954 *
1955 * Completes with a [Filter].
1956 *
1957 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1958 * error.
1959 *
1960 * If the used [http.Client] completes with an error when making a REST call,
1961 * this method will complete with the same error.
1962 */
1963 async.Future<Filter> create(Filter request, core.String userId) {
1964 var _url = null;
1965 var _queryParams = new core.Map();
1966 var _uploadMedia = null;
1967 var _uploadOptions = null;
1968 var _downloadOptions = commons.DownloadOptions.Metadata;
1969 var _body = null;
1970
1971 if (request != null) {
1972 _body = convert.JSON.encode((request).toJson());
1973 }
1974 if (userId == null) {
1975 throw new core.ArgumentError("Parameter userId is required.");
1976 }
1977
1978 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/filters';
1979
1980 var _response = _requester.request(_url,
1981 "POST",
1982 body: _body,
1983 queryParams: _queryParams,
1984 uploadOptions: _uploadOptions,
1985 uploadMedia: _uploadMedia,
1986 downloadOptions: _downloadOptions);
1987 return _response.then((data) => new Filter.fromJson(data));
1988 }
1989
1990 /**
1991 * Deletes a filter.
1992 *
1993 * Request parameters:
1994 *
1995 * [userId] - User's email address. The special value "me" can be used to
1996 * indicate the authenticated user.
1997 *
1998 * [id] - The ID of the filter to be deleted.
1999 *
2000 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2001 * error.
2002 *
2003 * If the used [http.Client] completes with an error when making a REST call,
2004 * this method will complete with the same error.
2005 */
2006 async.Future delete(core.String userId, core.String id) {
2007 var _url = null;
2008 var _queryParams = new core.Map();
2009 var _uploadMedia = null;
2010 var _uploadOptions = null;
2011 var _downloadOptions = commons.DownloadOptions.Metadata;
2012 var _body = null;
2013
1879 if (userId == null) { 2014 if (userId == null) {
1880 throw new core.ArgumentError("Parameter userId is required."); 2015 throw new core.ArgumentError("Parameter userId is required.");
1881 } 2016 }
1882 if (id == null) { 2017 if (id == null) {
1883 throw new core.ArgumentError("Parameter id is required."); 2018 throw new core.ArgumentError("Parameter id is required.");
1884 } 2019 }
1885 2020
2021 _downloadOptions = null;
2022
2023 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/filters/' + com mons.Escaper.ecapeVariable('$id');
2024
2025 var _response = _requester.request(_url,
2026 "DELETE",
2027 body: _body,
2028 queryParams: _queryParams,
2029 uploadOptions: _uploadOptions,
2030 uploadMedia: _uploadMedia,
2031 downloadOptions: _downloadOptions);
2032 return _response.then((data) => null);
2033 }
2034
2035 /**
2036 * Gets a filter.
2037 *
2038 * Request parameters:
2039 *
2040 * [userId] - User's email address. The special value "me" can be used to
2041 * indicate the authenticated user.
2042 *
2043 * [id] - The ID of the filter to be fetched.
2044 *
2045 * Completes with a [Filter].
2046 *
2047 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2048 * error.
2049 *
2050 * If the used [http.Client] completes with an error when making a REST call,
2051 * this method will complete with the same error.
2052 */
2053 async.Future<Filter> get(core.String userId, core.String id) {
2054 var _url = null;
2055 var _queryParams = new core.Map();
2056 var _uploadMedia = null;
2057 var _uploadOptions = null;
2058 var _downloadOptions = commons.DownloadOptions.Metadata;
2059 var _body = null;
2060
2061 if (userId == null) {
2062 throw new core.ArgumentError("Parameter userId is required.");
2063 }
2064 if (id == null) {
2065 throw new core.ArgumentError("Parameter id is required.");
2066 }
2067
2068 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/filters/' + com mons.Escaper.ecapeVariable('$id');
2069
2070 var _response = _requester.request(_url,
2071 "GET",
2072 body: _body,
2073 queryParams: _queryParams,
2074 uploadOptions: _uploadOptions,
2075 uploadMedia: _uploadMedia,
2076 downloadOptions: _downloadOptions);
2077 return _response.then((data) => new Filter.fromJson(data));
2078 }
2079
2080 /**
2081 * Lists the message filters of a Gmail user.
2082 *
2083 * Request parameters:
2084 *
2085 * [userId] - User's email address. The special value "me" can be used to
2086 * indicate the authenticated user.
2087 *
2088 * Completes with a [ListFiltersResponse].
2089 *
2090 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2091 * error.
2092 *
2093 * If the used [http.Client] completes with an error when making a REST call,
2094 * this method will complete with the same error.
2095 */
2096 async.Future<ListFiltersResponse> list(core.String userId) {
2097 var _url = null;
2098 var _queryParams = new core.Map();
2099 var _uploadMedia = null;
2100 var _uploadOptions = null;
2101 var _downloadOptions = commons.DownloadOptions.Metadata;
2102 var _body = null;
2103
2104 if (userId == null) {
2105 throw new core.ArgumentError("Parameter userId is required.");
2106 }
2107
2108 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/filters';
2109
2110 var _response = _requester.request(_url,
2111 "GET",
2112 body: _body,
2113 queryParams: _queryParams,
2114 uploadOptions: _uploadOptions,
2115 uploadMedia: _uploadMedia,
2116 downloadOptions: _downloadOptions);
2117 return _response.then((data) => new ListFiltersResponse.fromJson(data));
2118 }
2119
2120 }
2121
2122
2123 class UsersSettingsForwardingAddressesResourceApi {
2124 final commons.ApiRequester _requester;
2125
2126 UsersSettingsForwardingAddressesResourceApi(commons.ApiRequester client) :
2127 _requester = client;
2128
2129 /**
2130 * Creates a forwarding address. If ownership verification is required, a
2131 * message will be sent to the recipient and the resource's verification
2132 * status will be set to pending; otherwise, the resource will be created with
2133 * verification status set to accepted.
2134 *
2135 * [request] - The metadata request object.
2136 *
2137 * Request parameters:
2138 *
2139 * [userId] - User's email address. The special value "me" can be used to
2140 * indicate the authenticated user.
2141 *
2142 * Completes with a [ForwardingAddress].
2143 *
2144 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2145 * error.
2146 *
2147 * If the used [http.Client] completes with an error when making a REST call,
2148 * this method will complete with the same error.
2149 */
2150 async.Future<ForwardingAddress> create(ForwardingAddress request, core.String userId) {
2151 var _url = null;
2152 var _queryParams = new core.Map();
2153 var _uploadMedia = null;
2154 var _uploadOptions = null;
2155 var _downloadOptions = commons.DownloadOptions.Metadata;
2156 var _body = null;
2157
2158 if (request != null) {
2159 _body = convert.JSON.encode((request).toJson());
2160 }
2161 if (userId == null) {
2162 throw new core.ArgumentError("Parameter userId is required.");
2163 }
2164
2165 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/forwardingAddre sses';
2166
2167 var _response = _requester.request(_url,
2168 "POST",
2169 body: _body,
2170 queryParams: _queryParams,
2171 uploadOptions: _uploadOptions,
2172 uploadMedia: _uploadMedia,
2173 downloadOptions: _downloadOptions);
2174 return _response.then((data) => new ForwardingAddress.fromJson(data));
2175 }
2176
2177 /**
2178 * Deletes the specified forwarding address and revokes any verification that
2179 * may have been required.
2180 *
2181 * Request parameters:
2182 *
2183 * [userId] - User's email address. The special value "me" can be used to
2184 * indicate the authenticated user.
2185 *
2186 * [forwardingEmail] - The forwarding address to be deleted.
2187 *
2188 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2189 * error.
2190 *
2191 * If the used [http.Client] completes with an error when making a REST call,
2192 * this method will complete with the same error.
2193 */
2194 async.Future delete(core.String userId, core.String forwardingEmail) {
2195 var _url = null;
2196 var _queryParams = new core.Map();
2197 var _uploadMedia = null;
2198 var _uploadOptions = null;
2199 var _downloadOptions = commons.DownloadOptions.Metadata;
2200 var _body = null;
2201
2202 if (userId == null) {
2203 throw new core.ArgumentError("Parameter userId is required.");
2204 }
2205 if (forwardingEmail == null) {
2206 throw new core.ArgumentError("Parameter forwardingEmail is required.");
2207 }
2208
2209 _downloadOptions = null;
2210
2211 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/forwardingAddre sses/' + commons.Escaper.ecapeVariable('$forwardingEmail');
2212
2213 var _response = _requester.request(_url,
2214 "DELETE",
2215 body: _body,
2216 queryParams: _queryParams,
2217 uploadOptions: _uploadOptions,
2218 uploadMedia: _uploadMedia,
2219 downloadOptions: _downloadOptions);
2220 return _response.then((data) => null);
2221 }
2222
2223 /**
2224 * Gets the specified forwarding address.
2225 *
2226 * Request parameters:
2227 *
2228 * [userId] - User's email address. The special value "me" can be used to
2229 * indicate the authenticated user.
2230 *
2231 * [forwardingEmail] - The forwarding address to be retrieved.
2232 *
2233 * Completes with a [ForwardingAddress].
2234 *
2235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2236 * error.
2237 *
2238 * If the used [http.Client] completes with an error when making a REST call,
2239 * this method will complete with the same error.
2240 */
2241 async.Future<ForwardingAddress> get(core.String userId, core.String forwarding Email) {
2242 var _url = null;
2243 var _queryParams = new core.Map();
2244 var _uploadMedia = null;
2245 var _uploadOptions = null;
2246 var _downloadOptions = commons.DownloadOptions.Metadata;
2247 var _body = null;
2248
2249 if (userId == null) {
2250 throw new core.ArgumentError("Parameter userId is required.");
2251 }
2252 if (forwardingEmail == null) {
2253 throw new core.ArgumentError("Parameter forwardingEmail is required.");
2254 }
2255
2256 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/forwardingAddre sses/' + commons.Escaper.ecapeVariable('$forwardingEmail');
2257
2258 var _response = _requester.request(_url,
2259 "GET",
2260 body: _body,
2261 queryParams: _queryParams,
2262 uploadOptions: _uploadOptions,
2263 uploadMedia: _uploadMedia,
2264 downloadOptions: _downloadOptions);
2265 return _response.then((data) => new ForwardingAddress.fromJson(data));
2266 }
2267
2268 /**
2269 * Lists the forwarding addresses for the specified account.
2270 *
2271 * Request parameters:
2272 *
2273 * [userId] - User's email address. The special value "me" can be used to
2274 * indicate the authenticated user.
2275 *
2276 * Completes with a [ListForwardingAddressesResponse].
2277 *
2278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2279 * error.
2280 *
2281 * If the used [http.Client] completes with an error when making a REST call,
2282 * this method will complete with the same error.
2283 */
2284 async.Future<ListForwardingAddressesResponse> list(core.String userId) {
2285 var _url = null;
2286 var _queryParams = new core.Map();
2287 var _uploadMedia = null;
2288 var _uploadOptions = null;
2289 var _downloadOptions = commons.DownloadOptions.Metadata;
2290 var _body = null;
2291
2292 if (userId == null) {
2293 throw new core.ArgumentError("Parameter userId is required.");
2294 }
2295
2296 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/forwardingAddre sses';
2297
2298 var _response = _requester.request(_url,
2299 "GET",
2300 body: _body,
2301 queryParams: _queryParams,
2302 uploadOptions: _uploadOptions,
2303 uploadMedia: _uploadMedia,
2304 downloadOptions: _downloadOptions);
2305 return _response.then((data) => new ListForwardingAddressesResponse.fromJson (data));
2306 }
2307
2308 }
2309
2310
2311 class UsersSettingsSendAsResourceApi {
2312 final commons.ApiRequester _requester;
2313
2314 UsersSettingsSendAsResourceApi(commons.ApiRequester client) :
2315 _requester = client;
2316
2317 /**
2318 * Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail
2319 * will attempt to connect to the SMTP service to validate the configuration
2320 * before creating the alias. If ownership verification is required for the
2321 * alias, a message will be sent to the email address and the resource's
2322 * verification status will be set to pending; otherwise, the resource will be
2323 * created with verification status set to accepted. If a signature is
2324 * provided, Gmail will sanitize the HTML before saving it with the alias.
2325 *
2326 * [request] - The metadata request object.
2327 *
2328 * Request parameters:
2329 *
2330 * [userId] - User's email address. The special value "me" can be used to
2331 * indicate the authenticated user.
2332 *
2333 * Completes with a [SendAs].
2334 *
2335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2336 * error.
2337 *
2338 * If the used [http.Client] completes with an error when making a REST call,
2339 * this method will complete with the same error.
2340 */
2341 async.Future<SendAs> create(SendAs request, core.String userId) {
2342 var _url = null;
2343 var _queryParams = new core.Map();
2344 var _uploadMedia = null;
2345 var _uploadOptions = null;
2346 var _downloadOptions = commons.DownloadOptions.Metadata;
2347 var _body = null;
2348
2349 if (request != null) {
2350 _body = convert.JSON.encode((request).toJson());
2351 }
2352 if (userId == null) {
2353 throw new core.ArgumentError("Parameter userId is required.");
2354 }
2355
2356 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs';
2357
2358 var _response = _requester.request(_url,
2359 "POST",
2360 body: _body,
2361 queryParams: _queryParams,
2362 uploadOptions: _uploadOptions,
2363 uploadMedia: _uploadMedia,
2364 downloadOptions: _downloadOptions);
2365 return _response.then((data) => new SendAs.fromJson(data));
2366 }
2367
2368 /**
2369 * Deletes the specified send-as alias. Revokes any verification that may have
2370 * been required for using it.
2371 *
2372 * Request parameters:
2373 *
2374 * [userId] - User's email address. The special value "me" can be used to
2375 * indicate the authenticated user.
2376 *
2377 * [sendAsEmail] - The send-as alias to be deleted.
2378 *
2379 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2380 * error.
2381 *
2382 * If the used [http.Client] completes with an error when making a REST call,
2383 * this method will complete with the same error.
2384 */
2385 async.Future delete(core.String userId, core.String sendAsEmail) {
2386 var _url = null;
2387 var _queryParams = new core.Map();
2388 var _uploadMedia = null;
2389 var _uploadOptions = null;
2390 var _downloadOptions = commons.DownloadOptions.Metadata;
2391 var _body = null;
2392
2393 if (userId == null) {
2394 throw new core.ArgumentError("Parameter userId is required.");
2395 }
2396 if (sendAsEmail == null) {
2397 throw new core.ArgumentError("Parameter sendAsEmail is required.");
2398 }
2399
2400 _downloadOptions = null;
2401
2402 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm ons.Escaper.ecapeVariable('$sendAsEmail');
2403
2404 var _response = _requester.request(_url,
2405 "DELETE",
2406 body: _body,
2407 queryParams: _queryParams,
2408 uploadOptions: _uploadOptions,
2409 uploadMedia: _uploadMedia,
2410 downloadOptions: _downloadOptions);
2411 return _response.then((data) => null);
2412 }
2413
2414 /**
2415 * Gets the specified send-as alias. Fails with an HTTP 404 error if the
2416 * specified address is not a member of the collection.
2417 *
2418 * Request parameters:
2419 *
2420 * [userId] - User's email address. The special value "me" can be used to
2421 * indicate the authenticated user.
2422 *
2423 * [sendAsEmail] - The send-as alias to be retrieved.
2424 *
2425 * Completes with a [SendAs].
2426 *
2427 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2428 * error.
2429 *
2430 * If the used [http.Client] completes with an error when making a REST call,
2431 * this method will complete with the same error.
2432 */
2433 async.Future<SendAs> get(core.String userId, core.String sendAsEmail) {
2434 var _url = null;
2435 var _queryParams = new core.Map();
2436 var _uploadMedia = null;
2437 var _uploadOptions = null;
2438 var _downloadOptions = commons.DownloadOptions.Metadata;
2439 var _body = null;
2440
2441 if (userId == null) {
2442 throw new core.ArgumentError("Parameter userId is required.");
2443 }
2444 if (sendAsEmail == null) {
2445 throw new core.ArgumentError("Parameter sendAsEmail is required.");
2446 }
2447
2448 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm ons.Escaper.ecapeVariable('$sendAsEmail');
2449
2450 var _response = _requester.request(_url,
2451 "GET",
2452 body: _body,
2453 queryParams: _queryParams,
2454 uploadOptions: _uploadOptions,
2455 uploadMedia: _uploadMedia,
2456 downloadOptions: _downloadOptions);
2457 return _response.then((data) => new SendAs.fromJson(data));
2458 }
2459
2460 /**
2461 * Lists the send-as aliases for the specified account. The result includes
2462 * the primary send-as address associated with the account as well as any
2463 * custom "from" aliases.
2464 *
2465 * Request parameters:
2466 *
2467 * [userId] - User's email address. The special value "me" can be used to
2468 * indicate the authenticated user.
2469 *
2470 * Completes with a [ListSendAsResponse].
2471 *
2472 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2473 * error.
2474 *
2475 * If the used [http.Client] completes with an error when making a REST call,
2476 * this method will complete with the same error.
2477 */
2478 async.Future<ListSendAsResponse> list(core.String userId) {
2479 var _url = null;
2480 var _queryParams = new core.Map();
2481 var _uploadMedia = null;
2482 var _uploadOptions = null;
2483 var _downloadOptions = commons.DownloadOptions.Metadata;
2484 var _body = null;
2485
2486 if (userId == null) {
2487 throw new core.ArgumentError("Parameter userId is required.");
2488 }
2489
2490 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs';
2491
2492 var _response = _requester.request(_url,
2493 "GET",
2494 body: _body,
2495 queryParams: _queryParams,
2496 uploadOptions: _uploadOptions,
2497 uploadMedia: _uploadMedia,
2498 downloadOptions: _downloadOptions);
2499 return _response.then((data) => new ListSendAsResponse.fromJson(data));
2500 }
2501
2502 /**
2503 * Updates a send-as alias. If a signature is provided, Gmail will sanitize
2504 * the HTML before saving it with the alias. This method supports patch
2505 * semantics.
2506 *
2507 * [request] - The metadata request object.
2508 *
2509 * Request parameters:
2510 *
2511 * [userId] - User's email address. The special value "me" can be used to
2512 * indicate the authenticated user.
2513 *
2514 * [sendAsEmail] - The send-as alias to be updated.
2515 *
2516 * Completes with a [SendAs].
2517 *
2518 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2519 * error.
2520 *
2521 * If the used [http.Client] completes with an error when making a REST call,
2522 * this method will complete with the same error.
2523 */
2524 async.Future<SendAs> patch(SendAs request, core.String userId, core.String sen dAsEmail) {
2525 var _url = null;
2526 var _queryParams = new core.Map();
2527 var _uploadMedia = null;
2528 var _uploadOptions = null;
2529 var _downloadOptions = commons.DownloadOptions.Metadata;
2530 var _body = null;
2531
2532 if (request != null) {
2533 _body = convert.JSON.encode((request).toJson());
2534 }
2535 if (userId == null) {
2536 throw new core.ArgumentError("Parameter userId is required.");
2537 }
2538 if (sendAsEmail == null) {
2539 throw new core.ArgumentError("Parameter sendAsEmail is required.");
2540 }
2541
2542 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm ons.Escaper.ecapeVariable('$sendAsEmail');
2543
2544 var _response = _requester.request(_url,
2545 "PATCH",
2546 body: _body,
2547 queryParams: _queryParams,
2548 uploadOptions: _uploadOptions,
2549 uploadMedia: _uploadMedia,
2550 downloadOptions: _downloadOptions);
2551 return _response.then((data) => new SendAs.fromJson(data));
2552 }
2553
2554 /**
2555 * Updates a send-as alias. If a signature is provided, Gmail will sanitize
2556 * the HTML before saving it with the alias.
2557 *
2558 * [request] - The metadata request object.
2559 *
2560 * Request parameters:
2561 *
2562 * [userId] - User's email address. The special value "me" can be used to
2563 * indicate the authenticated user.
2564 *
2565 * [sendAsEmail] - The send-as alias to be updated.
2566 *
2567 * Completes with a [SendAs].
2568 *
2569 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2570 * error.
2571 *
2572 * If the used [http.Client] completes with an error when making a REST call,
2573 * this method will complete with the same error.
2574 */
2575 async.Future<SendAs> update(SendAs request, core.String userId, core.String se ndAsEmail) {
2576 var _url = null;
2577 var _queryParams = new core.Map();
2578 var _uploadMedia = null;
2579 var _uploadOptions = null;
2580 var _downloadOptions = commons.DownloadOptions.Metadata;
2581 var _body = null;
2582
2583 if (request != null) {
2584 _body = convert.JSON.encode((request).toJson());
2585 }
2586 if (userId == null) {
2587 throw new core.ArgumentError("Parameter userId is required.");
2588 }
2589 if (sendAsEmail == null) {
2590 throw new core.ArgumentError("Parameter sendAsEmail is required.");
2591 }
2592
2593 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm ons.Escaper.ecapeVariable('$sendAsEmail');
2594
2595 var _response = _requester.request(_url,
2596 "PUT",
2597 body: _body,
2598 queryParams: _queryParams,
2599 uploadOptions: _uploadOptions,
2600 uploadMedia: _uploadMedia,
2601 downloadOptions: _downloadOptions);
2602 return _response.then((data) => new SendAs.fromJson(data));
2603 }
2604
2605 /**
2606 * Sends a verification email to the specified send-as alias address. The
2607 * verification status must be pending.
2608 *
2609 * Request parameters:
2610 *
2611 * [userId] - User's email address. The special value "me" can be used to
2612 * indicate the authenticated user.
2613 *
2614 * [sendAsEmail] - The send-as alias to be verified.
2615 *
2616 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2617 * error.
2618 *
2619 * If the used [http.Client] completes with an error when making a REST call,
2620 * this method will complete with the same error.
2621 */
2622 async.Future verify(core.String userId, core.String sendAsEmail) {
2623 var _url = null;
2624 var _queryParams = new core.Map();
2625 var _uploadMedia = null;
2626 var _uploadOptions = null;
2627 var _downloadOptions = commons.DownloadOptions.Metadata;
2628 var _body = null;
2629
2630 if (userId == null) {
2631 throw new core.ArgumentError("Parameter userId is required.");
2632 }
2633 if (sendAsEmail == null) {
2634 throw new core.ArgumentError("Parameter sendAsEmail is required.");
2635 }
2636
2637 _downloadOptions = null;
2638
2639 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm ons.Escaper.ecapeVariable('$sendAsEmail') + '/verify';
2640
2641 var _response = _requester.request(_url,
2642 "POST",
2643 body: _body,
2644 queryParams: _queryParams,
2645 uploadOptions: _uploadOptions,
2646 uploadMedia: _uploadMedia,
2647 downloadOptions: _downloadOptions);
2648 return _response.then((data) => null);
2649 }
2650
2651 }
2652
2653
2654 class UsersThreadsResourceApi {
2655 final commons.ApiRequester _requester;
2656
2657 UsersThreadsResourceApi(commons.ApiRequester client) :
2658 _requester = client;
2659
2660 /**
2661 * Immediately and permanently deletes the specified thread. This operation
2662 * cannot be undone. Prefer threads.trash instead.
2663 *
2664 * Request parameters:
2665 *
2666 * [userId] - The user's email address. The special value me can be used to
2667 * indicate the authenticated user.
2668 *
2669 * [id] - ID of the Thread to delete.
2670 *
2671 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2672 * error.
2673 *
2674 * If the used [http.Client] completes with an error when making a REST call,
2675 * this method will complete with the same error.
2676 */
2677 async.Future delete(core.String userId, core.String id) {
2678 var _url = null;
2679 var _queryParams = new core.Map();
2680 var _uploadMedia = null;
2681 var _uploadOptions = null;
2682 var _downloadOptions = commons.DownloadOptions.Metadata;
2683 var _body = null;
2684
2685 if (userId == null) {
2686 throw new core.ArgumentError("Parameter userId is required.");
2687 }
2688 if (id == null) {
2689 throw new core.ArgumentError("Parameter id is required.");
2690 }
2691
2692 _downloadOptions = null;
2693
2694 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id');
2695
2696 var _response = _requester.request(_url,
2697 "DELETE",
2698 body: _body,
2699 queryParams: _queryParams,
2700 uploadOptions: _uploadOptions,
2701 uploadMedia: _uploadMedia,
2702 downloadOptions: _downloadOptions);
2703 return _response.then((data) => null);
2704 }
2705
2706 /**
2707 * Gets the specified thread.
2708 *
2709 * Request parameters:
2710 *
2711 * [userId] - The user's email address. The special value me can be used to
2712 * indicate the authenticated user.
2713 *
2714 * [id] - The ID of the thread to retrieve.
2715 *
2716 * [format] - The format to return the messages in.
2717 * Possible string values are:
2718 * - "full"
2719 * - "metadata"
2720 * - "minimal"
2721 *
2722 * [metadataHeaders] - When given and format is METADATA, only include headers
2723 * specified.
2724 *
2725 * Completes with a [Thread].
2726 *
2727 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2728 * error.
2729 *
2730 * If the used [http.Client] completes with an error when making a REST call,
2731 * this method will complete with the same error.
2732 */
2733 async.Future<Thread> get(core.String userId, core.String id, {core.String form at, core.List<core.String> metadataHeaders}) {
2734 var _url = null;
2735 var _queryParams = new core.Map();
2736 var _uploadMedia = null;
2737 var _uploadOptions = null;
2738 var _downloadOptions = commons.DownloadOptions.Metadata;
2739 var _body = null;
2740
2741 if (userId == null) {
2742 throw new core.ArgumentError("Parameter userId is required.");
2743 }
2744 if (id == null) {
2745 throw new core.ArgumentError("Parameter id is required.");
2746 }
2747 if (format != null) {
2748 _queryParams["format"] = [format];
2749 }
2750 if (metadataHeaders != null) {
2751 _queryParams["metadataHeaders"] = metadataHeaders;
2752 }
2753
2754 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id');
2755
2756 var _response = _requester.request(_url,
2757 "GET",
2758 body: _body,
2759 queryParams: _queryParams,
2760 uploadOptions: _uploadOptions,
2761 uploadMedia: _uploadMedia,
2762 downloadOptions: _downloadOptions);
2763 return _response.then((data) => new Thread.fromJson(data));
2764 }
2765
2766 /**
2767 * Lists the threads in the user's mailbox.
2768 *
2769 * Request parameters:
2770 *
2771 * [userId] - The user's email address. The special value me can be used to
2772 * indicate the authenticated user.
2773 *
2774 * [includeSpamTrash] - Include threads from SPAM and TRASH in the results.
2775 *
2776 * [labelIds] - Only return threads with labels that match all of the
2777 * specified label IDs.
2778 *
2779 * [maxResults] - Maximum number of threads to return.
2780 *
2781 * [pageToken] - Page token to retrieve a specific page of results in the
2782 * list.
2783 *
2784 * [q] - Only return threads matching the specified query. Supports the same
2785 * query format as the Gmail search box. For example,
2786 * "from:someuser@example.com rfc822msgid: is:unread".
2787 *
2788 * Completes with a [ListThreadsResponse].
2789 *
2790 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2791 * error.
2792 *
2793 * If the used [http.Client] completes with an error when making a REST call,
2794 * this method will complete with the same error.
2795 */
2796 async.Future<ListThreadsResponse> list(core.String userId, {core.bool includeS pamTrash, core.List<core.String> labelIds, core.int maxResults, core.String page Token, core.String q}) {
2797 var _url = null;
2798 var _queryParams = new core.Map();
2799 var _uploadMedia = null;
2800 var _uploadOptions = null;
2801 var _downloadOptions = commons.DownloadOptions.Metadata;
2802 var _body = null;
2803
2804 if (userId == null) {
2805 throw new core.ArgumentError("Parameter userId is required.");
2806 }
2807 if (includeSpamTrash != null) {
2808 _queryParams["includeSpamTrash"] = ["${includeSpamTrash}"];
2809 }
2810 if (labelIds != null) {
2811 _queryParams["labelIds"] = labelIds;
2812 }
2813 if (maxResults != null) {
2814 _queryParams["maxResults"] = ["${maxResults}"];
2815 }
2816 if (pageToken != null) {
2817 _queryParams["pageToken"] = [pageToken];
2818 }
2819 if (q != null) {
2820 _queryParams["q"] = [q];
2821 }
2822
2823 _url = commons.Escaper.ecapeVariable('$userId') + '/threads';
2824
2825 var _response = _requester.request(_url,
2826 "GET",
2827 body: _body,
2828 queryParams: _queryParams,
2829 uploadOptions: _uploadOptions,
2830 uploadMedia: _uploadMedia,
2831 downloadOptions: _downloadOptions);
2832 return _response.then((data) => new ListThreadsResponse.fromJson(data));
2833 }
2834
2835 /**
2836 * Modifies the labels applied to the thread. This applies to all messages in
2837 * the thread.
2838 *
2839 * [request] - The metadata request object.
2840 *
2841 * Request parameters:
2842 *
2843 * [userId] - The user's email address. The special value me can be used to
2844 * indicate the authenticated user.
2845 *
2846 * [id] - The ID of the thread to modify.
2847 *
2848 * Completes with a [Thread].
2849 *
2850 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2851 * error.
2852 *
2853 * If the used [http.Client] completes with an error when making a REST call,
2854 * this method will complete with the same error.
2855 */
2856 async.Future<Thread> modify(ModifyThreadRequest request, core.String userId, c ore.String id) {
2857 var _url = null;
2858 var _queryParams = new core.Map();
2859 var _uploadMedia = null;
2860 var _uploadOptions = null;
2861 var _downloadOptions = commons.DownloadOptions.Metadata;
2862 var _body = null;
2863
2864 if (request != null) {
2865 _body = convert.JSON.encode((request).toJson());
2866 }
2867 if (userId == null) {
2868 throw new core.ArgumentError("Parameter userId is required.");
2869 }
2870 if (id == null) {
2871 throw new core.ArgumentError("Parameter id is required.");
2872 }
2873
2874 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id') + '/modify';
2875
2876 var _response = _requester.request(_url,
2877 "POST",
2878 body: _body,
2879 queryParams: _queryParams,
2880 uploadOptions: _uploadOptions,
2881 uploadMedia: _uploadMedia,
2882 downloadOptions: _downloadOptions);
2883 return _response.then((data) => new Thread.fromJson(data));
2884 }
2885
2886 /**
2887 * Moves the specified thread to the trash.
2888 *
2889 * Request parameters:
2890 *
2891 * [userId] - The user's email address. The special value me can be used to
2892 * indicate the authenticated user.
2893 *
2894 * [id] - The ID of the thread to Trash.
2895 *
2896 * Completes with a [Thread].
2897 *
2898 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2899 * error.
2900 *
2901 * If the used [http.Client] completes with an error when making a REST call,
2902 * this method will complete with the same error.
2903 */
2904 async.Future<Thread> trash(core.String userId, core.String id) {
2905 var _url = null;
2906 var _queryParams = new core.Map();
2907 var _uploadMedia = null;
2908 var _uploadOptions = null;
2909 var _downloadOptions = commons.DownloadOptions.Metadata;
2910 var _body = null;
2911
2912 if (userId == null) {
2913 throw new core.ArgumentError("Parameter userId is required.");
2914 }
2915 if (id == null) {
2916 throw new core.ArgumentError("Parameter id is required.");
2917 }
2918
2919 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id') + '/trash';
2920
2921 var _response = _requester.request(_url,
2922 "POST",
2923 body: _body,
2924 queryParams: _queryParams,
2925 uploadOptions: _uploadOptions,
2926 uploadMedia: _uploadMedia,
2927 downloadOptions: _downloadOptions);
2928 return _response.then((data) => new Thread.fromJson(data));
2929 }
2930
2931 /**
2932 * Removes the specified thread from the trash.
2933 *
2934 * Request parameters:
2935 *
2936 * [userId] - The user's email address. The special value me can be used to
2937 * indicate the authenticated user.
2938 *
2939 * [id] - The ID of the thread to remove from Trash.
2940 *
2941 * Completes with a [Thread].
2942 *
2943 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2944 * error.
2945 *
2946 * If the used [http.Client] completes with an error when making a REST call,
2947 * this method will complete with the same error.
2948 */
2949 async.Future<Thread> untrash(core.String userId, core.String id) {
2950 var _url = null;
2951 var _queryParams = new core.Map();
2952 var _uploadMedia = null;
2953 var _uploadOptions = null;
2954 var _downloadOptions = commons.DownloadOptions.Metadata;
2955 var _body = null;
2956
2957 if (userId == null) {
2958 throw new core.ArgumentError("Parameter userId is required.");
2959 }
2960 if (id == null) {
2961 throw new core.ArgumentError("Parameter id is required.");
2962 }
2963
1886 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id') + '/untrash'; 2964 _url = commons.Escaper.ecapeVariable('$userId') + '/threads/' + commons.Esca per.ecapeVariable('$id') + '/untrash';
1887 2965
1888 var _response = _requester.request(_url, 2966 var _response = _requester.request(_url,
1889 "POST", 2967 "POST",
1890 body: _body, 2968 body: _body,
1891 queryParams: _queryParams, 2969 queryParams: _queryParams,
1892 uploadOptions: _uploadOptions, 2970 uploadOptions: _uploadOptions,
1893 uploadMedia: _uploadMedia, 2971 uploadMedia: _uploadMedia,
1894 downloadOptions: _downloadOptions); 2972 downloadOptions: _downloadOptions);
1895 return _response.then((data) => new Thread.fromJson(data)); 2973 return _response.then((data) => new Thread.fromJson(data));
1896 } 2974 }
1897 2975
1898 } 2976 }
1899 2977
1900 2978
1901 2979
2980 /** Auto-forwarding settings for an account. */
2981 class AutoForwarding {
2982 /**
2983 * The state that a message should be left in after it has been forwarded.
2984 * Possible string values are:
2985 * - "archive"
2986 * - "dispositionUnspecified"
2987 * - "leaveInInbox"
2988 * - "markRead"
2989 * - "trash"
2990 */
2991 core.String disposition;
2992 /**
2993 * Email address to which all incoming messages are forwarded. This email
2994 * address must be a verified member of the forwarding addresses.
2995 */
2996 core.String emailAddress;
2997 /**
2998 * Whether all incoming mail is automatically forwarded to another address.
2999 */
3000 core.bool enabled;
3001
3002 AutoForwarding();
3003
3004 AutoForwarding.fromJson(core.Map _json) {
3005 if (_json.containsKey("disposition")) {
3006 disposition = _json["disposition"];
3007 }
3008 if (_json.containsKey("emailAddress")) {
3009 emailAddress = _json["emailAddress"];
3010 }
3011 if (_json.containsKey("enabled")) {
3012 enabled = _json["enabled"];
3013 }
3014 }
3015
3016 core.Map toJson() {
3017 var _json = new core.Map();
3018 if (disposition != null) {
3019 _json["disposition"] = disposition;
3020 }
3021 if (emailAddress != null) {
3022 _json["emailAddress"] = emailAddress;
3023 }
3024 if (enabled != null) {
3025 _json["enabled"] = enabled;
3026 }
3027 return _json;
3028 }
3029 }
3030
1902 class BatchDeleteMessagesRequest { 3031 class BatchDeleteMessagesRequest {
1903 /** The IDs of the messages to delete. */ 3032 /** The IDs of the messages to delete. */
1904 core.List<core.String> ids; 3033 core.List<core.String> ids;
1905 3034
1906 BatchDeleteMessagesRequest(); 3035 BatchDeleteMessagesRequest();
1907 3036
1908 BatchDeleteMessagesRequest.fromJson(core.Map _json) { 3037 BatchDeleteMessagesRequest.fromJson(core.Map _json) {
1909 if (_json.containsKey("ids")) { 3038 if (_json.containsKey("ids")) {
1910 ids = _json["ids"]; 3039 ids = _json["ids"];
1911 } 3040 }
(...skipping 29 matching lines...) Expand all
1941 core.Map toJson() { 3070 core.Map toJson() {
1942 var _json = new core.Map(); 3071 var _json = new core.Map();
1943 if (id != null) { 3072 if (id != null) {
1944 _json["id"] = id; 3073 _json["id"] = id;
1945 } 3074 }
1946 if (message != null) { 3075 if (message != null) {
1947 _json["message"] = (message).toJson(); 3076 _json["message"] = (message).toJson();
1948 } 3077 }
1949 return _json; 3078 return _json;
1950 } 3079 }
3080 }
3081
3082 /**
3083 * Resource definition for Gmail filters. Filters apply to specific messages
3084 * instead of an entire email thread.
3085 */
3086 class Filter {
3087 /** Action that the filter performs. */
3088 FilterAction action;
3089 /** Matching criteria for the filter. */
3090 FilterCriteria criteria;
3091 /** The server assigned ID of the filter. */
3092 core.String id;
3093
3094 Filter();
3095
3096 Filter.fromJson(core.Map _json) {
3097 if (_json.containsKey("action")) {
3098 action = new FilterAction.fromJson(_json["action"]);
3099 }
3100 if (_json.containsKey("criteria")) {
3101 criteria = new FilterCriteria.fromJson(_json["criteria"]);
3102 }
3103 if (_json.containsKey("id")) {
3104 id = _json["id"];
3105 }
3106 }
3107
3108 core.Map toJson() {
3109 var _json = new core.Map();
3110 if (action != null) {
3111 _json["action"] = (action).toJson();
3112 }
3113 if (criteria != null) {
3114 _json["criteria"] = (criteria).toJson();
3115 }
3116 if (id != null) {
3117 _json["id"] = id;
3118 }
3119 return _json;
3120 }
3121 }
3122
3123 /** A set of actions to perform on a message. */
3124 class FilterAction {
3125 /** List of labels to add to the message. */
3126 core.List<core.String> addLabelIds;
3127 /** Email address that the message should be forwarded to. */
3128 core.String forward;
3129 /** List of labels to remove from the message. */
3130 core.List<core.String> removeLabelIds;
3131
3132 FilterAction();
3133
3134 FilterAction.fromJson(core.Map _json) {
3135 if (_json.containsKey("addLabelIds")) {
3136 addLabelIds = _json["addLabelIds"];
3137 }
3138 if (_json.containsKey("forward")) {
3139 forward = _json["forward"];
3140 }
3141 if (_json.containsKey("removeLabelIds")) {
3142 removeLabelIds = _json["removeLabelIds"];
3143 }
3144 }
3145
3146 core.Map toJson() {
3147 var _json = new core.Map();
3148 if (addLabelIds != null) {
3149 _json["addLabelIds"] = addLabelIds;
3150 }
3151 if (forward != null) {
3152 _json["forward"] = forward;
3153 }
3154 if (removeLabelIds != null) {
3155 _json["removeLabelIds"] = removeLabelIds;
3156 }
3157 return _json;
3158 }
3159 }
3160
3161 /** Message matching criteria. */
3162 class FilterCriteria {
3163 /** Whether the response should exclude chats. */
3164 core.bool excludeChats;
3165 /** The sender's display name or email address. */
3166 core.String from;
3167 /** Whether the message has any attachment. */
3168 core.bool hasAttachment;
3169 /**
3170 * Only return messages not matching the specified query. Supports the same
3171 * query format as the Gmail search box. For example,
3172 * "from:someuser@example.com rfc822msgid: is:unread".
3173 */
3174 core.String negatedQuery;
3175 /**
3176 * Only return messages matching the specified query. Supports the same query
3177 * format as the Gmail search box. For example, "from:someuser@example.com
3178 * rfc822msgid: is:unread".
3179 */
3180 core.String query;
3181 /**
3182 * The size of the entire RFC822 message in bytes, including all headers and
3183 * attachments.
3184 */
3185 core.int size;
3186 /**
3187 * How the message size in bytes should be in relation to the size field.
3188 * Possible string values are:
3189 * - "larger"
3190 * - "smaller"
3191 * - "unspecified"
3192 */
3193 core.String sizeComparison;
3194 /**
3195 * Case-insensitive phrase found in the message's subject. Trailing and
3196 * leading whitespace are be trimmed and adjacent spaces are collapsed.
3197 */
3198 core.String subject;
3199 /**
3200 * The recipient's display name or email address. Includes recipients in the
3201 * "to", "cc", and "bcc" header fields. You can use simply the local part of
3202 * the email address. For example, "example" and "example@" both match
3203 * "example@gmail.com". This field is case-insensitive.
3204 */
3205 core.String to;
3206
3207 FilterCriteria();
3208
3209 FilterCriteria.fromJson(core.Map _json) {
3210 if (_json.containsKey("excludeChats")) {
3211 excludeChats = _json["excludeChats"];
3212 }
3213 if (_json.containsKey("from")) {
3214 from = _json["from"];
3215 }
3216 if (_json.containsKey("hasAttachment")) {
3217 hasAttachment = _json["hasAttachment"];
3218 }
3219 if (_json.containsKey("negatedQuery")) {
3220 negatedQuery = _json["negatedQuery"];
3221 }
3222 if (_json.containsKey("query")) {
3223 query = _json["query"];
3224 }
3225 if (_json.containsKey("size")) {
3226 size = _json["size"];
3227 }
3228 if (_json.containsKey("sizeComparison")) {
3229 sizeComparison = _json["sizeComparison"];
3230 }
3231 if (_json.containsKey("subject")) {
3232 subject = _json["subject"];
3233 }
3234 if (_json.containsKey("to")) {
3235 to = _json["to"];
3236 }
3237 }
3238
3239 core.Map toJson() {
3240 var _json = new core.Map();
3241 if (excludeChats != null) {
3242 _json["excludeChats"] = excludeChats;
3243 }
3244 if (from != null) {
3245 _json["from"] = from;
3246 }
3247 if (hasAttachment != null) {
3248 _json["hasAttachment"] = hasAttachment;
3249 }
3250 if (negatedQuery != null) {
3251 _json["negatedQuery"] = negatedQuery;
3252 }
3253 if (query != null) {
3254 _json["query"] = query;
3255 }
3256 if (size != null) {
3257 _json["size"] = size;
3258 }
3259 if (sizeComparison != null) {
3260 _json["sizeComparison"] = sizeComparison;
3261 }
3262 if (subject != null) {
3263 _json["subject"] = subject;
3264 }
3265 if (to != null) {
3266 _json["to"] = to;
3267 }
3268 return _json;
3269 }
3270 }
3271
3272 /** Settings for a forwarding address. */
3273 class ForwardingAddress {
3274 /** An email address to which messages can be forwarded. */
3275 core.String forwardingEmail;
3276 /**
3277 * Indicates whether this address has been verified and is usable for
3278 * forwarding. Read-only.
3279 * Possible string values are:
3280 * - "accepted"
3281 * - "pending"
3282 * - "verificationStatusUnspecified"
3283 */
3284 core.String verificationStatus;
3285
3286 ForwardingAddress();
3287
3288 ForwardingAddress.fromJson(core.Map _json) {
3289 if (_json.containsKey("forwardingEmail")) {
3290 forwardingEmail = _json["forwardingEmail"];
3291 }
3292 if (_json.containsKey("verificationStatus")) {
3293 verificationStatus = _json["verificationStatus"];
3294 }
3295 }
3296
3297 core.Map toJson() {
3298 var _json = new core.Map();
3299 if (forwardingEmail != null) {
3300 _json["forwardingEmail"] = forwardingEmail;
3301 }
3302 if (verificationStatus != null) {
3303 _json["verificationStatus"] = verificationStatus;
3304 }
3305 return _json;
3306 }
1951 } 3307 }
1952 3308
1953 /** 3309 /**
1954 * A record of a change to the user's mailbox. Each history change may affect 3310 * A record of a change to the user's mailbox. Each history change may affect
1955 * multiple messages in multiple ways. 3311 * multiple messages in multiple ways.
1956 */ 3312 */
1957 class History { 3313 class History {
1958 /** The mailbox sequence ID. */ 3314 /** The mailbox sequence ID. */
1959 core.String id; 3315 core.String id;
1960 /** Labels added to messages in this history record. */ 3316 /** Labels added to messages in this history record. */
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 3466
2111 core.Map toJson() { 3467 core.Map toJson() {
2112 var _json = new core.Map(); 3468 var _json = new core.Map();
2113 if (message != null) { 3469 if (message != null) {
2114 _json["message"] = (message).toJson(); 3470 _json["message"] = (message).toJson();
2115 } 3471 }
2116 return _json; 3472 return _json;
2117 } 3473 }
2118 } 3474 }
2119 3475
3476 /** IMAP settings for an account. */
3477 class ImapSettings {
3478 /**
3479 * If this value is true, Gmail will immediately expunge a message when it is
3480 * marked as deleted in IMAP. Otherwise, Gmail will wait for an update from
3481 * the client before expunging messages marked as deleted.
3482 */
3483 core.bool autoExpunge;
3484 /** Whether IMAP is enabled for the account. */
3485 core.bool enabled;
3486 /**
3487 * The action that will be executed on a message when it is marked as deleted
3488 * and expunged from the last visible IMAP folder.
3489 * Possible string values are:
3490 * - "archive"
3491 * - "deleteForever"
3492 * - "expungeBehaviorUnspecified"
3493 * - "trash"
3494 */
3495 core.String expungeBehavior;
3496 /**
3497 * An optional limit on the number of messages that an IMAP folder may
3498 * contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is
3499 * interpreted to mean that there is no limit.
3500 */
3501 core.int maxFolderSize;
3502
3503 ImapSettings();
3504
3505 ImapSettings.fromJson(core.Map _json) {
3506 if (_json.containsKey("autoExpunge")) {
3507 autoExpunge = _json["autoExpunge"];
3508 }
3509 if (_json.containsKey("enabled")) {
3510 enabled = _json["enabled"];
3511 }
3512 if (_json.containsKey("expungeBehavior")) {
3513 expungeBehavior = _json["expungeBehavior"];
3514 }
3515 if (_json.containsKey("maxFolderSize")) {
3516 maxFolderSize = _json["maxFolderSize"];
3517 }
3518 }
3519
3520 core.Map toJson() {
3521 var _json = new core.Map();
3522 if (autoExpunge != null) {
3523 _json["autoExpunge"] = autoExpunge;
3524 }
3525 if (enabled != null) {
3526 _json["enabled"] = enabled;
3527 }
3528 if (expungeBehavior != null) {
3529 _json["expungeBehavior"] = expungeBehavior;
3530 }
3531 if (maxFolderSize != null) {
3532 _json["maxFolderSize"] = maxFolderSize;
3533 }
3534 return _json;
3535 }
3536 }
3537
2120 /** 3538 /**
2121 * Labels are used to categorize messages and threads within the user's mailbox. 3539 * Labels are used to categorize messages and threads within the user's mailbox.
2122 */ 3540 */
2123 class Label { 3541 class Label {
2124 /** The immutable ID of the label. */ 3542 /** The immutable ID of the label. */
2125 core.String id; 3543 core.String id;
2126 /** 3544 /**
2127 * The visibility of the label in the label list in the Gmail web interface. 3545 * The visibility of the label in the label list in the Gmail web interface.
2128 * Possible string values are: 3546 * Possible string values are:
2129 * - "labelHide" 3547 * - "labelHide"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 if (nextPageToken != null) { 3676 if (nextPageToken != null) {
2259 _json["nextPageToken"] = nextPageToken; 3677 _json["nextPageToken"] = nextPageToken;
2260 } 3678 }
2261 if (resultSizeEstimate != null) { 3679 if (resultSizeEstimate != null) {
2262 _json["resultSizeEstimate"] = resultSizeEstimate; 3680 _json["resultSizeEstimate"] = resultSizeEstimate;
2263 } 3681 }
2264 return _json; 3682 return _json;
2265 } 3683 }
2266 } 3684 }
2267 3685
3686 /** Response for the ListFilters method. */
3687 class ListFiltersResponse {
3688 /** List of a user's filters. */
3689 core.List<Filter> filter;
3690
3691 ListFiltersResponse();
3692
3693 ListFiltersResponse.fromJson(core.Map _json) {
3694 if (_json.containsKey("filter")) {
3695 filter = _json["filter"].map((value) => new Filter.fromJson(value)).toList ();
3696 }
3697 }
3698
3699 core.Map toJson() {
3700 var _json = new core.Map();
3701 if (filter != null) {
3702 _json["filter"] = filter.map((value) => (value).toJson()).toList();
3703 }
3704 return _json;
3705 }
3706 }
3707
3708 /** Response for the ListForwardingAddresses method. */
3709 class ListForwardingAddressesResponse {
3710 /** List of addresses that may be used for forwarding. */
3711 core.List<ForwardingAddress> forwardingAddresses;
3712
3713 ListForwardingAddressesResponse();
3714
3715 ListForwardingAddressesResponse.fromJson(core.Map _json) {
3716 if (_json.containsKey("forwardingAddresses")) {
3717 forwardingAddresses = _json["forwardingAddresses"].map((value) => new Forw ardingAddress.fromJson(value)).toList();
3718 }
3719 }
3720
3721 core.Map toJson() {
3722 var _json = new core.Map();
3723 if (forwardingAddresses != null) {
3724 _json["forwardingAddresses"] = forwardingAddresses.map((value) => (value). toJson()).toList();
3725 }
3726 return _json;
3727 }
3728 }
3729
2268 class ListHistoryResponse { 3730 class ListHistoryResponse {
2269 /** 3731 /**
2270 * List of history records. Any messages contained in the response will 3732 * List of history records. Any messages contained in the response will
2271 * typically only have id and threadId fields populated. 3733 * typically only have id and threadId fields populated.
2272 */ 3734 */
2273 core.List<History> history; 3735 core.List<History> history;
2274 /** The ID of the mailbox's current history record. */ 3736 /** The ID of the mailbox's current history record. */
2275 core.String historyId; 3737 core.String historyId;
2276 /** Page token to retrieve the next page of results in the list. */ 3738 /** Page token to retrieve the next page of results in the list. */
2277 core.String nextPageToken; 3739 core.String nextPageToken;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 if (nextPageToken != null) { 3818 if (nextPageToken != null) {
2357 _json["nextPageToken"] = nextPageToken; 3819 _json["nextPageToken"] = nextPageToken;
2358 } 3820 }
2359 if (resultSizeEstimate != null) { 3821 if (resultSizeEstimate != null) {
2360 _json["resultSizeEstimate"] = resultSizeEstimate; 3822 _json["resultSizeEstimate"] = resultSizeEstimate;
2361 } 3823 }
2362 return _json; 3824 return _json;
2363 } 3825 }
2364 } 3826 }
2365 3827
3828 /** Response for the ListSendAs method. */
3829 class ListSendAsResponse {
3830 /** List of send-as aliases. */
3831 core.List<SendAs> sendAs;
3832
3833 ListSendAsResponse();
3834
3835 ListSendAsResponse.fromJson(core.Map _json) {
3836 if (_json.containsKey("sendAs")) {
3837 sendAs = _json["sendAs"].map((value) => new SendAs.fromJson(value)).toList ();
3838 }
3839 }
3840
3841 core.Map toJson() {
3842 var _json = new core.Map();
3843 if (sendAs != null) {
3844 _json["sendAs"] = sendAs.map((value) => (value).toJson()).toList();
3845 }
3846 return _json;
3847 }
3848 }
3849
2366 class ListThreadsResponse { 3850 class ListThreadsResponse {
2367 /** Page token to retrieve the next page of results in the list. */ 3851 /** Page token to retrieve the next page of results in the list. */
2368 core.String nextPageToken; 3852 core.String nextPageToken;
2369 /** Estimated total number of results. */ 3853 /** Estimated total number of results. */
2370 core.int resultSizeEstimate; 3854 core.int resultSizeEstimate;
2371 /** List of threads. */ 3855 /** List of threads. */
2372 core.List<Thread> threads; 3856 core.List<Thread> threads;
2373 3857
2374 ListThreadsResponse(); 3858 ListThreadsResponse();
2375 3859
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 if (addLabelIds != null) { 4209 if (addLabelIds != null) {
2726 _json["addLabelIds"] = addLabelIds; 4210 _json["addLabelIds"] = addLabelIds;
2727 } 4211 }
2728 if (removeLabelIds != null) { 4212 if (removeLabelIds != null) {
2729 _json["removeLabelIds"] = removeLabelIds; 4213 _json["removeLabelIds"] = removeLabelIds;
2730 } 4214 }
2731 return _json; 4215 return _json;
2732 } 4216 }
2733 } 4217 }
2734 4218
4219 /** POP settings for an account. */
4220 class PopSettings {
4221 /**
4222 * The range of messages which are accessible via POP.
4223 * Possible string values are:
4224 * - "accessWindowUnspecified"
4225 * - "allMail"
4226 * - "disabled"
4227 * - "fromNowOn"
4228 */
4229 core.String accessWindow;
4230 /**
4231 * The action that will be executed on a message after it has been fetched via
4232 * POP.
4233 * Possible string values are:
4234 * - "archive"
4235 * - "dispositionUnspecified"
4236 * - "leaveInInbox"
4237 * - "markRead"
4238 * - "trash"
4239 */
4240 core.String disposition;
4241
4242 PopSettings();
4243
4244 PopSettings.fromJson(core.Map _json) {
4245 if (_json.containsKey("accessWindow")) {
4246 accessWindow = _json["accessWindow"];
4247 }
4248 if (_json.containsKey("disposition")) {
4249 disposition = _json["disposition"];
4250 }
4251 }
4252
4253 core.Map toJson() {
4254 var _json = new core.Map();
4255 if (accessWindow != null) {
4256 _json["accessWindow"] = accessWindow;
4257 }
4258 if (disposition != null) {
4259 _json["disposition"] = disposition;
4260 }
4261 return _json;
4262 }
4263 }
4264
2735 /** Profile for a Gmail user. */ 4265 /** Profile for a Gmail user. */
2736 class Profile { 4266 class Profile {
2737 /** The user's email address. */ 4267 /** The user's email address. */
2738 core.String emailAddress; 4268 core.String emailAddress;
2739 /** The ID of the mailbox's current history record. */ 4269 /** The ID of the mailbox's current history record. */
2740 core.String historyId; 4270 core.String historyId;
2741 /** The total number of messages in the mailbox. */ 4271 /** The total number of messages in the mailbox. */
2742 core.int messagesTotal; 4272 core.int messagesTotal;
2743 /** The total number of threads in the mailbox. */ 4273 /** The total number of threads in the mailbox. */
2744 core.int threadsTotal; 4274 core.int threadsTotal;
(...skipping 26 matching lines...) Expand all
2771 if (messagesTotal != null) { 4301 if (messagesTotal != null) {
2772 _json["messagesTotal"] = messagesTotal; 4302 _json["messagesTotal"] = messagesTotal;
2773 } 4303 }
2774 if (threadsTotal != null) { 4304 if (threadsTotal != null) {
2775 _json["threadsTotal"] = threadsTotal; 4305 _json["threadsTotal"] = threadsTotal;
2776 } 4306 }
2777 return _json; 4307 return _json;
2778 } 4308 }
2779 } 4309 }
2780 4310
4311 /**
4312 * Settings associated with a send-as alias, which can be either the primary
4313 * login address associated with the account or a custom "from" address. Send-as
4314 * aliases correspond to the "Send Mail As" feature in the web interface. See
4315 * for more details.
4316 */
4317 class SendAs {
4318 /**
4319 * A name that appears in the "From:" header for mail sent using this alias.
4320 * For custom "from" addresses, when this is empty, Gmail will populate the
4321 * "From:" header with the name that is used for the primary address
4322 * associated with the account.
4323 */
4324 core.String displayName;
4325 /**
4326 * Whether this address is selected as the default "From:" address in
4327 * situations such as composing a new message or sending a vacation
4328 * auto-reply. Every Gmail account has exactly one default send-as address, so
4329 * the only legal value that clients may write to this field is true. Changing
4330 * this from false to true for an address will result in this field becoming
4331 * false for the other previous default address.
4332 */
4333 core.bool isDefault;
4334 /**
4335 * Whether this address is the primary address used to login to the account.
4336 * Every Gmail account has exactly one primary address, and it cannot be
4337 * deleted from the collection of send-as aliases. This field is read-only.
4338 */
4339 core.bool isPrimary;
4340 /**
4341 * An optional email address that is included in a "Reply-To:" header for mail
4342 * sent using this alias. If this is empty, Gmail will not generate a
4343 * "Reply-To:" header.
4344 */
4345 core.String replyToAddress;
4346 /**
4347 * The email address that appears in the "From:" header for mail sent using
4348 * this alias. This is read-only for all operations except create.
4349 */
4350 core.String sendAsEmail;
4351 /**
4352 * An optional HTML signature that is included in messages composed with this
4353 * alias in the Gmail web UI.
4354 */
4355 core.String signature;
4356 /**
4357 * An optional SMTP service that will be used as an outbound relay for mail
4358 * sent using this alias. If this is empty, outbound mail will be sent
4359 * directly from Gmail's servers to the destination SMTP service. This setting
4360 * only applies to custom "from" aliases.
4361 */
4362 SmtpMsa smtpMsa;
4363 /**
4364 * Whether Gmail should treat this address as an alias for the user's primary
4365 * email address. See for more details. This setting only applies to custom
4366 * "from" aliases.
4367 */
4368 core.bool treatAsAlias;
4369 /**
4370 * Indicates whether this address has been verified for use as a send-as
4371 * alias. Read-only. This setting only applies to custom "from" aliases.
4372 * Possible string values are:
4373 * - "accepted"
4374 * - "pending"
4375 * - "verificationStatusUnspecified"
4376 */
4377 core.String verificationStatus;
4378
4379 SendAs();
4380
4381 SendAs.fromJson(core.Map _json) {
4382 if (_json.containsKey("displayName")) {
4383 displayName = _json["displayName"];
4384 }
4385 if (_json.containsKey("isDefault")) {
4386 isDefault = _json["isDefault"];
4387 }
4388 if (_json.containsKey("isPrimary")) {
4389 isPrimary = _json["isPrimary"];
4390 }
4391 if (_json.containsKey("replyToAddress")) {
4392 replyToAddress = _json["replyToAddress"];
4393 }
4394 if (_json.containsKey("sendAsEmail")) {
4395 sendAsEmail = _json["sendAsEmail"];
4396 }
4397 if (_json.containsKey("signature")) {
4398 signature = _json["signature"];
4399 }
4400 if (_json.containsKey("smtpMsa")) {
4401 smtpMsa = new SmtpMsa.fromJson(_json["smtpMsa"]);
4402 }
4403 if (_json.containsKey("treatAsAlias")) {
4404 treatAsAlias = _json["treatAsAlias"];
4405 }
4406 if (_json.containsKey("verificationStatus")) {
4407 verificationStatus = _json["verificationStatus"];
4408 }
4409 }
4410
4411 core.Map toJson() {
4412 var _json = new core.Map();
4413 if (displayName != null) {
4414 _json["displayName"] = displayName;
4415 }
4416 if (isDefault != null) {
4417 _json["isDefault"] = isDefault;
4418 }
4419 if (isPrimary != null) {
4420 _json["isPrimary"] = isPrimary;
4421 }
4422 if (replyToAddress != null) {
4423 _json["replyToAddress"] = replyToAddress;
4424 }
4425 if (sendAsEmail != null) {
4426 _json["sendAsEmail"] = sendAsEmail;
4427 }
4428 if (signature != null) {
4429 _json["signature"] = signature;
4430 }
4431 if (smtpMsa != null) {
4432 _json["smtpMsa"] = (smtpMsa).toJson();
4433 }
4434 if (treatAsAlias != null) {
4435 _json["treatAsAlias"] = treatAsAlias;
4436 }
4437 if (verificationStatus != null) {
4438 _json["verificationStatus"] = verificationStatus;
4439 }
4440 return _json;
4441 }
4442 }
4443
4444 /** Configuration for communication with an SMTP service. */
4445 class SmtpMsa {
4446 /** The hostname of the SMTP service. Required. */
4447 core.String host;
4448 /**
4449 * The password that will be used for authentication with the SMTP service.
4450 * This is a write-only field that can be specified in requests to create or
4451 * update SendAs settings; it is never populated in responses.
4452 */
4453 core.String password;
4454 /** The port of the SMTP service. Required. */
4455 core.int port;
4456 /**
4457 * The protocol that will be used to secure communication with the SMTP
4458 * service. Required.
4459 * Possible string values are:
4460 * - "none"
4461 * - "securityModeUnspecified"
4462 * - "ssl"
4463 * - "starttls"
4464 */
4465 core.String securityMode;
4466 /**
4467 * The username that will be used for authentication with the SMTP service.
4468 * This is a write-only field that can be specified in requests to create or
4469 * update SendAs settings; it is never populated in responses.
4470 */
4471 core.String username;
4472
4473 SmtpMsa();
4474
4475 SmtpMsa.fromJson(core.Map _json) {
4476 if (_json.containsKey("host")) {
4477 host = _json["host"];
4478 }
4479 if (_json.containsKey("password")) {
4480 password = _json["password"];
4481 }
4482 if (_json.containsKey("port")) {
4483 port = _json["port"];
4484 }
4485 if (_json.containsKey("securityMode")) {
4486 securityMode = _json["securityMode"];
4487 }
4488 if (_json.containsKey("username")) {
4489 username = _json["username"];
4490 }
4491 }
4492
4493 core.Map toJson() {
4494 var _json = new core.Map();
4495 if (host != null) {
4496 _json["host"] = host;
4497 }
4498 if (password != null) {
4499 _json["password"] = password;
4500 }
4501 if (port != null) {
4502 _json["port"] = port;
4503 }
4504 if (securityMode != null) {
4505 _json["securityMode"] = securityMode;
4506 }
4507 if (username != null) {
4508 _json["username"] = username;
4509 }
4510 return _json;
4511 }
4512 }
4513
2781 /** A collection of messages representing a conversation. */ 4514 /** A collection of messages representing a conversation. */
2782 class Thread { 4515 class Thread {
2783 /** The ID of the last history record that modified this thread. */ 4516 /** The ID of the last history record that modified this thread. */
2784 core.String historyId; 4517 core.String historyId;
2785 /** The unique ID of the thread. */ 4518 /** The unique ID of the thread. */
2786 core.String id; 4519 core.String id;
2787 /** The list of messages in the thread. */ 4520 /** The list of messages in the thread. */
2788 core.List<Message> messages; 4521 core.List<Message> messages;
2789 /** A short part of the message text. */ 4522 /** A short part of the message text. */
2790 core.String snippet; 4523 core.String snippet;
(...skipping 26 matching lines...) Expand all
2817 if (messages != null) { 4550 if (messages != null) {
2818 _json["messages"] = messages.map((value) => (value).toJson()).toList(); 4551 _json["messages"] = messages.map((value) => (value).toJson()).toList();
2819 } 4552 }
2820 if (snippet != null) { 4553 if (snippet != null) {
2821 _json["snippet"] = snippet; 4554 _json["snippet"] = snippet;
2822 } 4555 }
2823 return _json; 4556 return _json;
2824 } 4557 }
2825 } 4558 }
2826 4559
4560 /**
4561 * Vacation auto-reply settings for an account. These settings correspond to the
4562 * "Vacation responder" feature in the web interface. See for more details.
4563 */
4564 class VacationSettings {
4565 /** Flag that controls whether Gmail automatically replies to messages. */
4566 core.bool enableAutoReply;
4567 /**
4568 * An optional end time for sending auto-replies (epoch ms). When this is
4569 * specified, Gmail will automatically reply only to messages that it receives
4570 * before the end time. If both startTime and endTime are specified, startTime
4571 * must precede endTime.
4572 */
4573 core.String endTime;
4574 /**
4575 * Response body in HTML format. Gmail will sanitize the HTML before storing
4576 * it.
4577 */
4578 core.String responseBodyHtml;
4579 /** Response body in plain text format. */
4580 core.String responseBodyPlainText;
4581 /**
4582 * Optional text to prepend to the subject line in vacation responses. In
4583 * order to enable auto-replies, either the response subject or the response
4584 * body must be nonempty.
4585 */
4586 core.String responseSubject;
4587 /**
4588 * Flag that determines whether responses are sent to recipients who are not
4589 * in the user's list of contacts.
4590 */
4591 core.bool restrictToContacts;
4592 /**
4593 * Flag that determines whether responses are sent to recipients who are
4594 * outside of the user's domain. This feature is only available for Google
4595 * Apps users.
4596 */
4597 core.bool restrictToDomain;
4598 /**
4599 * An optional start time for sending auto-replies (epoch ms). When this is
4600 * specified, Gmail will automatically reply only to messages that it receives
4601 * after the start time. If both startTime and endTime are specified,
4602 * startTime must precede endTime.
4603 */
4604 core.String startTime;
4605
4606 VacationSettings();
4607
4608 VacationSettings.fromJson(core.Map _json) {
4609 if (_json.containsKey("enableAutoReply")) {
4610 enableAutoReply = _json["enableAutoReply"];
4611 }
4612 if (_json.containsKey("endTime")) {
4613 endTime = _json["endTime"];
4614 }
4615 if (_json.containsKey("responseBodyHtml")) {
4616 responseBodyHtml = _json["responseBodyHtml"];
4617 }
4618 if (_json.containsKey("responseBodyPlainText")) {
4619 responseBodyPlainText = _json["responseBodyPlainText"];
4620 }
4621 if (_json.containsKey("responseSubject")) {
4622 responseSubject = _json["responseSubject"];
4623 }
4624 if (_json.containsKey("restrictToContacts")) {
4625 restrictToContacts = _json["restrictToContacts"];
4626 }
4627 if (_json.containsKey("restrictToDomain")) {
4628 restrictToDomain = _json["restrictToDomain"];
4629 }
4630 if (_json.containsKey("startTime")) {
4631 startTime = _json["startTime"];
4632 }
4633 }
4634
4635 core.Map toJson() {
4636 var _json = new core.Map();
4637 if (enableAutoReply != null) {
4638 _json["enableAutoReply"] = enableAutoReply;
4639 }
4640 if (endTime != null) {
4641 _json["endTime"] = endTime;
4642 }
4643 if (responseBodyHtml != null) {
4644 _json["responseBodyHtml"] = responseBodyHtml;
4645 }
4646 if (responseBodyPlainText != null) {
4647 _json["responseBodyPlainText"] = responseBodyPlainText;
4648 }
4649 if (responseSubject != null) {
4650 _json["responseSubject"] = responseSubject;
4651 }
4652 if (restrictToContacts != null) {
4653 _json["restrictToContacts"] = restrictToContacts;
4654 }
4655 if (restrictToDomain != null) {
4656 _json["restrictToDomain"] = restrictToDomain;
4657 }
4658 if (startTime != null) {
4659 _json["startTime"] = startTime;
4660 }
4661 return _json;
4662 }
4663 }
4664
2827 /** Set up or update a new push notification watch on this user's mailbox. */ 4665 /** Set up or update a new push notification watch on this user's mailbox. */
2828 class WatchRequest { 4666 class WatchRequest {
2829 /** 4667 /**
2830 * Filtering behavior of labelIds list specified. 4668 * Filtering behavior of labelIds list specified.
2831 * Possible string values are: 4669 * Possible string values are:
2832 * - "exclude" 4670 * - "exclude"
2833 * - "include" 4671 * - "include"
2834 */ 4672 */
2835 core.String labelFilterAction; 4673 core.String labelFilterAction;
2836 /** 4674 /**
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 var _json = new core.Map(); 4743 var _json = new core.Map();
2906 if (expiration != null) { 4744 if (expiration != null) {
2907 _json["expiration"] = expiration; 4745 _json["expiration"] = expiration;
2908 } 4746 }
2909 if (historyId != null) { 4747 if (historyId != null) {
2910 _json["historyId"] = historyId; 4748 _json["historyId"] = historyId;
2911 } 4749 }
2912 return _json; 4750 return _json;
2913 } 4751 }
2914 } 4752 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/genomics/v1.dart ('k') | generated/googleapis/lib/qpxexpress/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698