OLD | NEW |
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 /** | 572 /** |
573 * Lists the history of all changes to the given mailbox. History results are | 573 * Lists the history of all changes to the given mailbox. History results are |
574 * returned in chronological order (increasing historyId). | 574 * returned in chronological order (increasing historyId). |
575 * | 575 * |
576 * Request parameters: | 576 * Request parameters: |
577 * | 577 * |
578 * [userId] - The user's email address. The special value me can be used to | 578 * [userId] - The user's email address. The special value me can be used to |
579 * indicate the authenticated user. | 579 * indicate the authenticated user. |
580 * | 580 * |
| 581 * [historyTypes] - History types to be returned by the function |
| 582 * |
581 * [labelId] - Only return messages with a label matching the ID. | 583 * [labelId] - Only return messages with a label matching the ID. |
582 * | 584 * |
583 * [maxResults] - The maximum number of history records to return. | 585 * [maxResults] - The maximum number of history records to return. |
584 * | 586 * |
585 * [pageToken] - Page token to retrieve a specific page of results in the | 587 * [pageToken] - Page token to retrieve a specific page of results in the |
586 * list. | 588 * list. |
587 * | 589 * |
588 * [startHistoryId] - Required. Returns history records after the specified | 590 * [startHistoryId] - Required. Returns history records after the specified |
589 * startHistoryId. The supplied startHistoryId should be obtained from the | 591 * startHistoryId. The supplied startHistoryId should be obtained from the |
590 * historyId of a message, thread, or previous list response. History IDs | 592 * historyId of a message, thread, or previous list response. History IDs |
591 * increase chronologically but are not contiguous with random gaps in between | 593 * increase chronologically but are not contiguous with random gaps in between |
592 * valid IDs. Supplying an invalid or out of date startHistoryId typically | 594 * valid IDs. Supplying an invalid or out of date startHistoryId typically |
593 * returns an HTTP 404 error code. A historyId is typically valid for at least | 595 * returns an HTTP 404 error code. A historyId is typically valid for at least |
594 * a week, but in some rare circumstances may be valid for only a few hours. | 596 * a week, but in some rare circumstances may be valid for only a few hours. |
595 * If you receive an HTTP 404 error response, your application should perform | 597 * If you receive an HTTP 404 error response, your application should perform |
596 * a full sync. If you receive no nextPageToken in the response, there are no | 598 * a full sync. If you receive no nextPageToken in the response, there are no |
597 * updates to retrieve and you can store the returned historyId for a future | 599 * updates to retrieve and you can store the returned historyId for a future |
598 * request. | 600 * request. |
599 * | 601 * |
600 * Completes with a [ListHistoryResponse]. | 602 * Completes with a [ListHistoryResponse]. |
601 * | 603 * |
602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
603 * error. | 605 * error. |
604 * | 606 * |
605 * If the used [http.Client] completes with an error when making a REST call, | 607 * If the used [http.Client] completes with an error when making a REST call, |
606 * this method will complete with the same error. | 608 * this method will complete with the same error. |
607 */ | 609 */ |
608 async.Future<ListHistoryResponse> list(core.String userId, {core.String labelI
d, core.int maxResults, core.String pageToken, core.String startHistoryId}) { | 610 async.Future<ListHistoryResponse> list(core.String userId, {core.List<core.Str
ing> historyTypes, core.String labelId, core.int maxResults, core.String pageTok
en, core.String startHistoryId}) { |
609 var _url = null; | 611 var _url = null; |
610 var _queryParams = new core.Map(); | 612 var _queryParams = new core.Map(); |
611 var _uploadMedia = null; | 613 var _uploadMedia = null; |
612 var _uploadOptions = null; | 614 var _uploadOptions = null; |
613 var _downloadOptions = commons.DownloadOptions.Metadata; | 615 var _downloadOptions = commons.DownloadOptions.Metadata; |
614 var _body = null; | 616 var _body = null; |
615 | 617 |
616 if (userId == null) { | 618 if (userId == null) { |
617 throw new core.ArgumentError("Parameter userId is required."); | 619 throw new core.ArgumentError("Parameter userId is required."); |
618 } | 620 } |
| 621 if (historyTypes != null) { |
| 622 _queryParams["historyTypes"] = historyTypes; |
| 623 } |
619 if (labelId != null) { | 624 if (labelId != null) { |
620 _queryParams["labelId"] = [labelId]; | 625 _queryParams["labelId"] = [labelId]; |
621 } | 626 } |
622 if (maxResults != null) { | 627 if (maxResults != null) { |
623 _queryParams["maxResults"] = ["${maxResults}"]; | 628 _queryParams["maxResults"] = ["${maxResults}"]; |
624 } | 629 } |
625 if (pageToken != null) { | 630 if (pageToken != null) { |
626 _queryParams["pageToken"] = [pageToken]; | 631 _queryParams["pageToken"] = [pageToken]; |
627 } | 632 } |
628 if (startHistoryId != null) { | 633 if (startHistoryId != null) { |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 * not send a message. | 1146 * not send a message. |
1142 * | 1147 * |
1143 * [request] - The metadata request object. | 1148 * [request] - The metadata request object. |
1144 * | 1149 * |
1145 * Request parameters: | 1150 * Request parameters: |
1146 * | 1151 * |
1147 * [userId] - The user's email address. The special value me can be used to | 1152 * [userId] - The user's email address. The special value me can be used to |
1148 * indicate the authenticated user. | 1153 * indicate the authenticated user. |
1149 * | 1154 * |
1150 * [deleted] - Mark the email as permanently deleted (not TRASH) and only | 1155 * [deleted] - Mark the email as permanently deleted (not TRASH) and only |
1151 * visible in Google Apps Vault to a Vault administrator. Only used for Google | 1156 * visible in Google Vault to a Vault administrator. Only used for G Suite |
1152 * Apps for Work accounts. | 1157 * accounts. |
1153 * | 1158 * |
1154 * [internalDateSource] - Source for Gmail's internal date of the message. | 1159 * [internalDateSource] - Source for Gmail's internal date of the message. |
1155 * Possible string values are: | 1160 * Possible string values are: |
1156 * - "dateHeader" | 1161 * - "dateHeader" |
1157 * - "receivedTime" | 1162 * - "receivedTime" |
1158 * | 1163 * |
1159 * [neverMarkSpam] - Ignore the Gmail spam classifier decision and never mark | 1164 * [neverMarkSpam] - Ignore the Gmail spam classifier decision and never mark |
1160 * this email as SPAM in the mailbox. | 1165 * this email as SPAM in the mailbox. |
1161 * | 1166 * |
1162 * [processForCalendar] - Process calendar invites in the email and add any | 1167 * [processForCalendar] - Process calendar invites in the email and add any |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 * message. | 1235 * message. |
1231 * | 1236 * |
1232 * [request] - The metadata request object. | 1237 * [request] - The metadata request object. |
1233 * | 1238 * |
1234 * Request parameters: | 1239 * Request parameters: |
1235 * | 1240 * |
1236 * [userId] - The user's email address. The special value me can be used to | 1241 * [userId] - The user's email address. The special value me can be used to |
1237 * indicate the authenticated user. | 1242 * indicate the authenticated user. |
1238 * | 1243 * |
1239 * [deleted] - Mark the email as permanently deleted (not TRASH) and only | 1244 * [deleted] - Mark the email as permanently deleted (not TRASH) and only |
1240 * visible in Google Apps Vault to a Vault administrator. Only used for Google | 1245 * visible in Google Vault to a Vault administrator. Only used for G Suite |
1241 * Apps for Work accounts. | 1246 * accounts. |
1242 * | 1247 * |
1243 * [internalDateSource] - Source for Gmail's internal date of the message. | 1248 * [internalDateSource] - Source for Gmail's internal date of the message. |
1244 * Possible string values are: | 1249 * Possible string values are: |
1245 * - "dateHeader" | 1250 * - "dateHeader" |
1246 * - "receivedTime" | 1251 * - "receivedTime" |
1247 * | 1252 * |
1248 * [uploadMedia] - The media to upload. | 1253 * [uploadMedia] - The media to upload. |
1249 * | 1254 * |
1250 * [uploadOptions] - Options for the media upload. Streaming Media without the | 1255 * [uploadOptions] - Options for the media upload. Streaming Media without the |
1251 * length being known ahead of time is only supported via resumable uploads. | 1256 * length being known ahead of time is only supported via resumable uploads. |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 downloadOptions: _downloadOptions); | 2361 downloadOptions: _downloadOptions); |
2357 return _response.then((data) => new ListForwardingAddressesResponse.fromJson
(data)); | 2362 return _response.then((data) => new ListForwardingAddressesResponse.fromJson
(data)); |
2358 } | 2363 } |
2359 | 2364 |
2360 } | 2365 } |
2361 | 2366 |
2362 | 2367 |
2363 class UsersSettingsSendAsResourceApi { | 2368 class UsersSettingsSendAsResourceApi { |
2364 final commons.ApiRequester _requester; | 2369 final commons.ApiRequester _requester; |
2365 | 2370 |
| 2371 UsersSettingsSendAsSmimeInfoResourceApi get smimeInfo => new UsersSettingsSend
AsSmimeInfoResourceApi(_requester); |
| 2372 |
2366 UsersSettingsSendAsResourceApi(commons.ApiRequester client) : | 2373 UsersSettingsSendAsResourceApi(commons.ApiRequester client) : |
2367 _requester = client; | 2374 _requester = client; |
2368 | 2375 |
2369 /** | 2376 /** |
2370 * Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail | 2377 * Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail |
2371 * will attempt to connect to the SMTP service to validate the configuration | 2378 * will attempt to connect to the SMTP service to validate the configuration |
2372 * before creating the alias. If ownership verification is required for the | 2379 * before creating the alias. If ownership verification is required for the |
2373 * alias, a message will be sent to the email address and the resource's | 2380 * alias, a message will be sent to the email address and the resource's |
2374 * verification status will be set to pending; otherwise, the resource will be | 2381 * verification status will be set to pending; otherwise, the resource will be |
2375 * created with verification status set to accepted. If a signature is | 2382 * created with verification status set to accepted. If a signature is |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2696 queryParams: _queryParams, | 2703 queryParams: _queryParams, |
2697 uploadOptions: _uploadOptions, | 2704 uploadOptions: _uploadOptions, |
2698 uploadMedia: _uploadMedia, | 2705 uploadMedia: _uploadMedia, |
2699 downloadOptions: _downloadOptions); | 2706 downloadOptions: _downloadOptions); |
2700 return _response.then((data) => null); | 2707 return _response.then((data) => null); |
2701 } | 2708 } |
2702 | 2709 |
2703 } | 2710 } |
2704 | 2711 |
2705 | 2712 |
| 2713 class UsersSettingsSendAsSmimeInfoResourceApi { |
| 2714 final commons.ApiRequester _requester; |
| 2715 |
| 2716 UsersSettingsSendAsSmimeInfoResourceApi(commons.ApiRequester client) : |
| 2717 _requester = client; |
| 2718 |
| 2719 /** |
| 2720 * Deletes the specified S/MIME config for the specified send-as alias. |
| 2721 * |
| 2722 * Request parameters: |
| 2723 * |
| 2724 * [userId] - The user's email address. The special value me can be used to |
| 2725 * indicate the authenticated user. |
| 2726 * |
| 2727 * [sendAsEmail] - The email address that appears in the "From:" header for |
| 2728 * mail sent using this alias. |
| 2729 * |
| 2730 * [id] - The immutable ID for the SmimeInfo. |
| 2731 * |
| 2732 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2733 * error. |
| 2734 * |
| 2735 * If the used [http.Client] completes with an error when making a REST call, |
| 2736 * this method will complete with the same error. |
| 2737 */ |
| 2738 async.Future delete(core.String userId, core.String sendAsEmail, core.String i
d) { |
| 2739 var _url = null; |
| 2740 var _queryParams = new core.Map(); |
| 2741 var _uploadMedia = null; |
| 2742 var _uploadOptions = null; |
| 2743 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2744 var _body = null; |
| 2745 |
| 2746 if (userId == null) { |
| 2747 throw new core.ArgumentError("Parameter userId is required."); |
| 2748 } |
| 2749 if (sendAsEmail == null) { |
| 2750 throw new core.ArgumentError("Parameter sendAsEmail is required."); |
| 2751 } |
| 2752 if (id == null) { |
| 2753 throw new core.ArgumentError("Parameter id is required."); |
| 2754 } |
| 2755 |
| 2756 _downloadOptions = null; |
| 2757 |
| 2758 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm
ons.Escaper.ecapeVariable('$sendAsEmail') + '/smimeInfo/' + commons.Escaper.ecap
eVariable('$id'); |
| 2759 |
| 2760 var _response = _requester.request(_url, |
| 2761 "DELETE", |
| 2762 body: _body, |
| 2763 queryParams: _queryParams, |
| 2764 uploadOptions: _uploadOptions, |
| 2765 uploadMedia: _uploadMedia, |
| 2766 downloadOptions: _downloadOptions); |
| 2767 return _response.then((data) => null); |
| 2768 } |
| 2769 |
| 2770 /** |
| 2771 * Gets the specified S/MIME config for the specified send-as alias. |
| 2772 * |
| 2773 * Request parameters: |
| 2774 * |
| 2775 * [userId] - The user's email address. The special value me can be used to |
| 2776 * indicate the authenticated user. |
| 2777 * |
| 2778 * [sendAsEmail] - The email address that appears in the "From:" header for |
| 2779 * mail sent using this alias. |
| 2780 * |
| 2781 * [id] - The immutable ID for the SmimeInfo. |
| 2782 * |
| 2783 * Completes with a [SmimeInfo]. |
| 2784 * |
| 2785 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2786 * error. |
| 2787 * |
| 2788 * If the used [http.Client] completes with an error when making a REST call, |
| 2789 * this method will complete with the same error. |
| 2790 */ |
| 2791 async.Future<SmimeInfo> get(core.String userId, core.String sendAsEmail, core.
String id) { |
| 2792 var _url = null; |
| 2793 var _queryParams = new core.Map(); |
| 2794 var _uploadMedia = null; |
| 2795 var _uploadOptions = null; |
| 2796 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2797 var _body = null; |
| 2798 |
| 2799 if (userId == null) { |
| 2800 throw new core.ArgumentError("Parameter userId is required."); |
| 2801 } |
| 2802 if (sendAsEmail == null) { |
| 2803 throw new core.ArgumentError("Parameter sendAsEmail is required."); |
| 2804 } |
| 2805 if (id == null) { |
| 2806 throw new core.ArgumentError("Parameter id is required."); |
| 2807 } |
| 2808 |
| 2809 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm
ons.Escaper.ecapeVariable('$sendAsEmail') + '/smimeInfo/' + commons.Escaper.ecap
eVariable('$id'); |
| 2810 |
| 2811 var _response = _requester.request(_url, |
| 2812 "GET", |
| 2813 body: _body, |
| 2814 queryParams: _queryParams, |
| 2815 uploadOptions: _uploadOptions, |
| 2816 uploadMedia: _uploadMedia, |
| 2817 downloadOptions: _downloadOptions); |
| 2818 return _response.then((data) => new SmimeInfo.fromJson(data)); |
| 2819 } |
| 2820 |
| 2821 /** |
| 2822 * Insert (upload) the given S/MIME config for the specified send-as alias. |
| 2823 * Note that pkcs12 format is required for the key. |
| 2824 * |
| 2825 * [request] - The metadata request object. |
| 2826 * |
| 2827 * Request parameters: |
| 2828 * |
| 2829 * [userId] - The user's email address. The special value me can be used to |
| 2830 * indicate the authenticated user. |
| 2831 * |
| 2832 * [sendAsEmail] - The email address that appears in the "From:" header for |
| 2833 * mail sent using this alias. |
| 2834 * |
| 2835 * Completes with a [SmimeInfo]. |
| 2836 * |
| 2837 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2838 * error. |
| 2839 * |
| 2840 * If the used [http.Client] completes with an error when making a REST call, |
| 2841 * this method will complete with the same error. |
| 2842 */ |
| 2843 async.Future<SmimeInfo> insert(SmimeInfo request, core.String userId, core.Str
ing sendAsEmail) { |
| 2844 var _url = null; |
| 2845 var _queryParams = new core.Map(); |
| 2846 var _uploadMedia = null; |
| 2847 var _uploadOptions = null; |
| 2848 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2849 var _body = null; |
| 2850 |
| 2851 if (request != null) { |
| 2852 _body = convert.JSON.encode((request).toJson()); |
| 2853 } |
| 2854 if (userId == null) { |
| 2855 throw new core.ArgumentError("Parameter userId is required."); |
| 2856 } |
| 2857 if (sendAsEmail == null) { |
| 2858 throw new core.ArgumentError("Parameter sendAsEmail is required."); |
| 2859 } |
| 2860 |
| 2861 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm
ons.Escaper.ecapeVariable('$sendAsEmail') + '/smimeInfo'; |
| 2862 |
| 2863 var _response = _requester.request(_url, |
| 2864 "POST", |
| 2865 body: _body, |
| 2866 queryParams: _queryParams, |
| 2867 uploadOptions: _uploadOptions, |
| 2868 uploadMedia: _uploadMedia, |
| 2869 downloadOptions: _downloadOptions); |
| 2870 return _response.then((data) => new SmimeInfo.fromJson(data)); |
| 2871 } |
| 2872 |
| 2873 /** |
| 2874 * Lists S/MIME configs for the specified send-as alias. |
| 2875 * |
| 2876 * Request parameters: |
| 2877 * |
| 2878 * [userId] - The user's email address. The special value me can be used to |
| 2879 * indicate the authenticated user. |
| 2880 * |
| 2881 * [sendAsEmail] - The email address that appears in the "From:" header for |
| 2882 * mail sent using this alias. |
| 2883 * |
| 2884 * Completes with a [ListSmimeInfoResponse]. |
| 2885 * |
| 2886 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2887 * error. |
| 2888 * |
| 2889 * If the used [http.Client] completes with an error when making a REST call, |
| 2890 * this method will complete with the same error. |
| 2891 */ |
| 2892 async.Future<ListSmimeInfoResponse> list(core.String userId, core.String sendA
sEmail) { |
| 2893 var _url = null; |
| 2894 var _queryParams = new core.Map(); |
| 2895 var _uploadMedia = null; |
| 2896 var _uploadOptions = null; |
| 2897 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2898 var _body = null; |
| 2899 |
| 2900 if (userId == null) { |
| 2901 throw new core.ArgumentError("Parameter userId is required."); |
| 2902 } |
| 2903 if (sendAsEmail == null) { |
| 2904 throw new core.ArgumentError("Parameter sendAsEmail is required."); |
| 2905 } |
| 2906 |
| 2907 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm
ons.Escaper.ecapeVariable('$sendAsEmail') + '/smimeInfo'; |
| 2908 |
| 2909 var _response = _requester.request(_url, |
| 2910 "GET", |
| 2911 body: _body, |
| 2912 queryParams: _queryParams, |
| 2913 uploadOptions: _uploadOptions, |
| 2914 uploadMedia: _uploadMedia, |
| 2915 downloadOptions: _downloadOptions); |
| 2916 return _response.then((data) => new ListSmimeInfoResponse.fromJson(data)); |
| 2917 } |
| 2918 |
| 2919 /** |
| 2920 * Sets the default S/MIME config for the specified send-as alias. |
| 2921 * |
| 2922 * Request parameters: |
| 2923 * |
| 2924 * [userId] - The user's email address. The special value me can be used to |
| 2925 * indicate the authenticated user. |
| 2926 * |
| 2927 * [sendAsEmail] - The email address that appears in the "From:" header for |
| 2928 * mail sent using this alias. |
| 2929 * |
| 2930 * [id] - The immutable ID for the SmimeInfo. |
| 2931 * |
| 2932 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2933 * error. |
| 2934 * |
| 2935 * If the used [http.Client] completes with an error when making a REST call, |
| 2936 * this method will complete with the same error. |
| 2937 */ |
| 2938 async.Future setDefault(core.String userId, core.String sendAsEmail, core.Stri
ng id) { |
| 2939 var _url = null; |
| 2940 var _queryParams = new core.Map(); |
| 2941 var _uploadMedia = null; |
| 2942 var _uploadOptions = null; |
| 2943 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2944 var _body = null; |
| 2945 |
| 2946 if (userId == null) { |
| 2947 throw new core.ArgumentError("Parameter userId is required."); |
| 2948 } |
| 2949 if (sendAsEmail == null) { |
| 2950 throw new core.ArgumentError("Parameter sendAsEmail is required."); |
| 2951 } |
| 2952 if (id == null) { |
| 2953 throw new core.ArgumentError("Parameter id is required."); |
| 2954 } |
| 2955 |
| 2956 _downloadOptions = null; |
| 2957 |
| 2958 _url = commons.Escaper.ecapeVariable('$userId') + '/settings/sendAs/' + comm
ons.Escaper.ecapeVariable('$sendAsEmail') + '/smimeInfo/' + commons.Escaper.ecap
eVariable('$id') + '/setDefault'; |
| 2959 |
| 2960 var _response = _requester.request(_url, |
| 2961 "POST", |
| 2962 body: _body, |
| 2963 queryParams: _queryParams, |
| 2964 uploadOptions: _uploadOptions, |
| 2965 uploadMedia: _uploadMedia, |
| 2966 downloadOptions: _downloadOptions); |
| 2967 return _response.then((data) => null); |
| 2968 } |
| 2969 |
| 2970 } |
| 2971 |
| 2972 |
2706 class UsersThreadsResourceApi { | 2973 class UsersThreadsResourceApi { |
2707 final commons.ApiRequester _requester; | 2974 final commons.ApiRequester _requester; |
2708 | 2975 |
2709 UsersThreadsResourceApi(commons.ApiRequester client) : | 2976 UsersThreadsResourceApi(commons.ApiRequester client) : |
2710 _requester = client; | 2977 _requester = client; |
2711 | 2978 |
2712 /** | 2979 /** |
2713 * Immediately and permanently deletes the specified thread. This operation | 2980 * Immediately and permanently deletes the specified thread. This operation |
2714 * cannot be undone. Prefer threads.trash instead. | 2981 * cannot be undone. Prefer threads.trash instead. |
2715 * | 2982 * |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3933 | 4200 |
3934 core.Map toJson() { | 4201 core.Map toJson() { |
3935 var _json = new core.Map(); | 4202 var _json = new core.Map(); |
3936 if (sendAs != null) { | 4203 if (sendAs != null) { |
3937 _json["sendAs"] = sendAs.map((value) => (value).toJson()).toList(); | 4204 _json["sendAs"] = sendAs.map((value) => (value).toJson()).toList(); |
3938 } | 4205 } |
3939 return _json; | 4206 return _json; |
3940 } | 4207 } |
3941 } | 4208 } |
3942 | 4209 |
| 4210 class ListSmimeInfoResponse { |
| 4211 /** List of SmimeInfo. */ |
| 4212 core.List<SmimeInfo> smimeInfo; |
| 4213 |
| 4214 ListSmimeInfoResponse(); |
| 4215 |
| 4216 ListSmimeInfoResponse.fromJson(core.Map _json) { |
| 4217 if (_json.containsKey("smimeInfo")) { |
| 4218 smimeInfo = _json["smimeInfo"].map((value) => new SmimeInfo.fromJson(value
)).toList(); |
| 4219 } |
| 4220 } |
| 4221 |
| 4222 core.Map toJson() { |
| 4223 var _json = new core.Map(); |
| 4224 if (smimeInfo != null) { |
| 4225 _json["smimeInfo"] = smimeInfo.map((value) => (value).toJson()).toList(); |
| 4226 } |
| 4227 return _json; |
| 4228 } |
| 4229 } |
| 4230 |
3943 class ListThreadsResponse { | 4231 class ListThreadsResponse { |
3944 /** Page token to retrieve the next page of results in the list. */ | 4232 /** Page token to retrieve the next page of results in the list. */ |
3945 core.String nextPageToken; | 4233 core.String nextPageToken; |
3946 /** Estimated total number of results. */ | 4234 /** Estimated total number of results. */ |
3947 core.int resultSizeEstimate; | 4235 core.int resultSizeEstimate; |
3948 /** List of threads. */ | 4236 /** List of threads. */ |
3949 core.List<Thread> threads; | 4237 core.List<Thread> threads; |
3950 | 4238 |
3951 ListThreadsResponse(); | 4239 ListThreadsResponse(); |
3952 | 4240 |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4525 if (treatAsAlias != null) { | 4813 if (treatAsAlias != null) { |
4526 _json["treatAsAlias"] = treatAsAlias; | 4814 _json["treatAsAlias"] = treatAsAlias; |
4527 } | 4815 } |
4528 if (verificationStatus != null) { | 4816 if (verificationStatus != null) { |
4529 _json["verificationStatus"] = verificationStatus; | 4817 _json["verificationStatus"] = verificationStatus; |
4530 } | 4818 } |
4531 return _json; | 4819 return _json; |
4532 } | 4820 } |
4533 } | 4821 } |
4534 | 4822 |
| 4823 /** An S/MIME email config. */ |
| 4824 class SmimeInfo { |
| 4825 /** Encrypted key password, when key is encrypted. */ |
| 4826 core.String encryptedKeyPassword; |
| 4827 /** When the certificate expires (in milliseconds since epoch). */ |
| 4828 core.String expiration; |
| 4829 /** The immutable ID for the SmimeInfo. */ |
| 4830 core.String id; |
| 4831 /** |
| 4832 * Whether this SmimeInfo is the default one for this user's send-as address. |
| 4833 */ |
| 4834 core.bool isDefault; |
| 4835 /** The S/MIME certificate issuer's common name. */ |
| 4836 core.String issuerCn; |
| 4837 /** |
| 4838 * PEM formatted X509 concatenated certificate string (standard base64 |
| 4839 * encoding). Format used for returning key, which includes public key as well |
| 4840 * as certificate chain (not private key). |
| 4841 */ |
| 4842 core.String pem; |
| 4843 /** |
| 4844 * PKCS#12 format containing a single private/public key pair and certificate |
| 4845 * chain. This format is only accepted from client for creating a new |
| 4846 * SmimeInfo and is never returned, because the private key is not intended to |
| 4847 * be exported. PKCS#12 may be encrypted, in which case encryptedKeyPassword |
| 4848 * should be set appropriately. |
| 4849 */ |
| 4850 core.String pkcs12; |
| 4851 core.List<core.int> get pkcs12AsBytes { |
| 4852 return convert.BASE64.decode(pkcs12); |
| 4853 } |
| 4854 |
| 4855 void set pkcs12AsBytes(core.List<core.int> _bytes) { |
| 4856 pkcs12 = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+",
"-"); |
| 4857 } |
| 4858 |
| 4859 SmimeInfo(); |
| 4860 |
| 4861 SmimeInfo.fromJson(core.Map _json) { |
| 4862 if (_json.containsKey("encryptedKeyPassword")) { |
| 4863 encryptedKeyPassword = _json["encryptedKeyPassword"]; |
| 4864 } |
| 4865 if (_json.containsKey("expiration")) { |
| 4866 expiration = _json["expiration"]; |
| 4867 } |
| 4868 if (_json.containsKey("id")) { |
| 4869 id = _json["id"]; |
| 4870 } |
| 4871 if (_json.containsKey("isDefault")) { |
| 4872 isDefault = _json["isDefault"]; |
| 4873 } |
| 4874 if (_json.containsKey("issuerCn")) { |
| 4875 issuerCn = _json["issuerCn"]; |
| 4876 } |
| 4877 if (_json.containsKey("pem")) { |
| 4878 pem = _json["pem"]; |
| 4879 } |
| 4880 if (_json.containsKey("pkcs12")) { |
| 4881 pkcs12 = _json["pkcs12"]; |
| 4882 } |
| 4883 } |
| 4884 |
| 4885 core.Map toJson() { |
| 4886 var _json = new core.Map(); |
| 4887 if (encryptedKeyPassword != null) { |
| 4888 _json["encryptedKeyPassword"] = encryptedKeyPassword; |
| 4889 } |
| 4890 if (expiration != null) { |
| 4891 _json["expiration"] = expiration; |
| 4892 } |
| 4893 if (id != null) { |
| 4894 _json["id"] = id; |
| 4895 } |
| 4896 if (isDefault != null) { |
| 4897 _json["isDefault"] = isDefault; |
| 4898 } |
| 4899 if (issuerCn != null) { |
| 4900 _json["issuerCn"] = issuerCn; |
| 4901 } |
| 4902 if (pem != null) { |
| 4903 _json["pem"] = pem; |
| 4904 } |
| 4905 if (pkcs12 != null) { |
| 4906 _json["pkcs12"] = pkcs12; |
| 4907 } |
| 4908 return _json; |
| 4909 } |
| 4910 } |
| 4911 |
4535 /** Configuration for communication with an SMTP service. */ | 4912 /** Configuration for communication with an SMTP service. */ |
4536 class SmtpMsa { | 4913 class SmtpMsa { |
4537 /** The hostname of the SMTP service. Required. */ | 4914 /** The hostname of the SMTP service. Required. */ |
4538 core.String host; | 4915 core.String host; |
4539 /** | 4916 /** |
4540 * The password that will be used for authentication with the SMTP service. | 4917 * The password that will be used for authentication with the SMTP service. |
4541 * This is a write-only field that can be specified in requests to create or | 4918 * This is a write-only field that can be specified in requests to create or |
4542 * update SendAs settings; it is never populated in responses. | 4919 * update SendAs settings; it is never populated in responses. |
4543 */ | 4920 */ |
4544 core.String password; | 4921 core.String password; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4675 * body must be nonempty. | 5052 * body must be nonempty. |
4676 */ | 5053 */ |
4677 core.String responseSubject; | 5054 core.String responseSubject; |
4678 /** | 5055 /** |
4679 * Flag that determines whether responses are sent to recipients who are not | 5056 * Flag that determines whether responses are sent to recipients who are not |
4680 * in the user's list of contacts. | 5057 * in the user's list of contacts. |
4681 */ | 5058 */ |
4682 core.bool restrictToContacts; | 5059 core.bool restrictToContacts; |
4683 /** | 5060 /** |
4684 * Flag that determines whether responses are sent to recipients who are | 5061 * Flag that determines whether responses are sent to recipients who are |
4685 * outside of the user's domain. This feature is only available for Google | 5062 * outside of the user's domain. This feature is only available for G Suite |
4686 * Apps users. | 5063 * users. |
4687 */ | 5064 */ |
4688 core.bool restrictToDomain; | 5065 core.bool restrictToDomain; |
4689 /** | 5066 /** |
4690 * An optional start time for sending auto-replies (epoch ms). When this is | 5067 * An optional start time for sending auto-replies (epoch ms). When this is |
4691 * specified, Gmail will automatically reply only to messages that it receives | 5068 * specified, Gmail will automatically reply only to messages that it receives |
4692 * after the start time. If both startTime and endTime are specified, | 5069 * after the start time. If both startTime and endTime are specified, |
4693 * startTime must precede endTime. | 5070 * startTime must precede endTime. |
4694 */ | 5071 */ |
4695 core.String startTime; | 5072 core.String startTime; |
4696 | 5073 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4834 var _json = new core.Map(); | 5211 var _json = new core.Map(); |
4835 if (expiration != null) { | 5212 if (expiration != null) { |
4836 _json["expiration"] = expiration; | 5213 _json["expiration"] = expiration; |
4837 } | 5214 } |
4838 if (historyId != null) { | 5215 if (historyId != null) { |
4839 _json["historyId"] = historyId; | 5216 _json["historyId"] = historyId; |
4840 } | 5217 } |
4841 return _json; | 5218 return _json; |
4842 } | 5219 } |
4843 } | 5220 } |
OLD | NEW |