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

Side by Side Diff: generated/googleapis/lib/androidenterprise/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
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.androidenterprise.v1; 3 library googleapis.androidenterprise.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 14 matching lines...) Expand all
25 CollectionsResourceApi get collections => new CollectionsResourceApi(_requeste r); 25 CollectionsResourceApi get collections => new CollectionsResourceApi(_requeste r);
26 CollectionviewersResourceApi get collectionviewers => new CollectionviewersRes ourceApi(_requester); 26 CollectionviewersResourceApi get collectionviewers => new CollectionviewersRes ourceApi(_requester);
27 DevicesResourceApi get devices => new DevicesResourceApi(_requester); 27 DevicesResourceApi get devices => new DevicesResourceApi(_requester);
28 EnterprisesResourceApi get enterprises => new EnterprisesResourceApi(_requeste r); 28 EnterprisesResourceApi get enterprises => new EnterprisesResourceApi(_requeste r);
29 EntitlementsResourceApi get entitlements => new EntitlementsResourceApi(_reque ster); 29 EntitlementsResourceApi get entitlements => new EntitlementsResourceApi(_reque ster);
30 GrouplicensesResourceApi get grouplicenses => new GrouplicensesResourceApi(_re quester); 30 GrouplicensesResourceApi get grouplicenses => new GrouplicensesResourceApi(_re quester);
31 GrouplicenseusersResourceApi get grouplicenseusers => new GrouplicenseusersRes ourceApi(_requester); 31 GrouplicenseusersResourceApi get grouplicenseusers => new GrouplicenseusersRes ourceApi(_requester);
32 InstallsResourceApi get installs => new InstallsResourceApi(_requester); 32 InstallsResourceApi get installs => new InstallsResourceApi(_requester);
33 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r); 33 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r);
34 ProductsResourceApi get products => new ProductsResourceApi(_requester); 34 ProductsResourceApi get products => new ProductsResourceApi(_requester);
35 ServiceaccountkeysResourceApi get serviceaccountkeys => new Serviceaccountkeys ResourceApi(_requester);
35 StorelayoutclustersResourceApi get storelayoutclusters => new Storelayoutclust ersResourceApi(_requester); 36 StorelayoutclustersResourceApi get storelayoutclusters => new Storelayoutclust ersResourceApi(_requester);
36 StorelayoutpagesResourceApi get storelayoutpages => new StorelayoutpagesResour ceApi(_requester); 37 StorelayoutpagesResourceApi get storelayoutpages => new StorelayoutpagesResour ceApi(_requester);
37 UsersResourceApi get users => new UsersResourceApi(_requester); 38 UsersResourceApi get users => new UsersResourceApi(_requester);
38 39
39 AndroidenterpriseApi(http.Client client, {core.String rootUrl: "https://www.go ogleapis.com/", core.String servicePath: "androidenterprise/v1/"}) : 40 AndroidenterpriseApi(http.Client client, {core.String rootUrl: "https://www.go ogleapis.com/", core.String servicePath: "androidenterprise/v1/"}) :
40 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
41 } 42 }
42 43
43 44
44 class CollectionsResourceApi { 45 class CollectionsResourceApi {
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 "GET", 638 "GET",
638 body: _body, 639 body: _body,
639 queryParams: _queryParams, 640 queryParams: _queryParams,
640 uploadOptions: _uploadOptions, 641 uploadOptions: _uploadOptions,
641 uploadMedia: _uploadMedia, 642 uploadMedia: _uploadMedia,
642 downloadOptions: _downloadOptions); 643 downloadOptions: _downloadOptions);
643 return _response.then((data) => new Device.fromJson(data)); 644 return _response.then((data) => new Device.fromJson(data));
644 } 645 }
645 646
646 /** 647 /**
647 * Retrieves whether a device is enabled or disabled for access by the user to 648 * Retrieves whether a device's access to Google services is enabled or
648 * Google services. The device state takes effect only if enforcing EMM 649 * disabled. The device state takes effect only if enforcing EMM policies on
649 * policies on Android devices is enabled in the Google Admin Console. 650 * Android devices is enabled in the Google Admin Console. Otherwise, the
650 * Otherwise, the device state is ignored and all devices are allowed access 651 * device state is ignored and all devices are allowed access to Google
651 * to Google services. 652 * services. This is only supported for Google-managed users.
652 * 653 *
653 * Request parameters: 654 * Request parameters:
654 * 655 *
655 * [enterpriseId] - The ID of the enterprise. 656 * [enterpriseId] - The ID of the enterprise.
656 * 657 *
657 * [userId] - The ID of the user. 658 * [userId] - The ID of the user.
658 * 659 *
659 * [deviceId] - The ID of the device. 660 * [deviceId] - The ID of the device.
660 * 661 *
661 * Completes with a [DeviceState]. 662 * Completes with a [DeviceState].
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 "GET", 735 "GET",
735 body: _body, 736 body: _body,
736 queryParams: _queryParams, 737 queryParams: _queryParams,
737 uploadOptions: _uploadOptions, 738 uploadOptions: _uploadOptions,
738 uploadMedia: _uploadMedia, 739 uploadMedia: _uploadMedia,
739 downloadOptions: _downloadOptions); 740 downloadOptions: _downloadOptions);
740 return _response.then((data) => new DevicesListResponse.fromJson(data)); 741 return _response.then((data) => new DevicesListResponse.fromJson(data));
741 } 742 }
742 743
743 /** 744 /**
744 * Sets whether a device is enabled or disabled for access by the user to 745 * Sets whether a device's access to Google services is enabled or disabled.
745 * Google services. The device state takes effect only if enforcing EMM 746 * The device state takes effect only if enforcing EMM policies on Android
746 * policies on Android devices is enabled in the Google Admin Console. 747 * devices is enabled in the Google Admin Console. Otherwise, the device state
747 * Otherwise, the device state is ignored and all devices are allowed access 748 * is ignored and all devices are allowed access to Google services. This is
748 * to Google services. 749 * only supported for Google-managed users.
749 * 750 *
750 * [request] - The metadata request object. 751 * [request] - The metadata request object.
751 * 752 *
752 * Request parameters: 753 * Request parameters:
753 * 754 *
754 * [enterpriseId] - The ID of the enterprise. 755 * [enterpriseId] - The ID of the enterprise.
755 * 756 *
756 * [userId] - The ID of the user. 757 * [userId] - The ID of the user.
757 * 758 *
758 * [deviceId] - The ID of the device. 759 * [deviceId] - The ID of the device.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 802 }
802 803
803 804
804 class EnterprisesResourceApi { 805 class EnterprisesResourceApi {
805 final commons.ApiRequester _requester; 806 final commons.ApiRequester _requester;
806 807
807 EnterprisesResourceApi(commons.ApiRequester client) : 808 EnterprisesResourceApi(commons.ApiRequester client) :
808 _requester = client; 809 _requester = client;
809 810
810 /** 811 /**
812 * Acknowledges notifications that were received from
813 * Enterprises.PullNotificationSet to prevent subsequent calls from returning
814 * the same notifications.
815 *
816 * Request parameters:
817 *
818 * [notificationSetId] - The notification set ID as returned by
819 * Enterprises.PullNotificationSet. This must be provided.
820 *
821 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
822 * error.
823 *
824 * If the used [http.Client] completes with an error when making a REST call,
825 * this method will complete with the same error.
826 */
827 async.Future acknowledgeNotificationSet({core.String notificationSetId}) {
828 var _url = null;
829 var _queryParams = new core.Map();
830 var _uploadMedia = null;
831 var _uploadOptions = null;
832 var _downloadOptions = commons.DownloadOptions.Metadata;
833 var _body = null;
834
835 if (notificationSetId != null) {
836 _queryParams["notificationSetId"] = [notificationSetId];
837 }
838
839 _downloadOptions = null;
840
841 _url = 'enterprises/acknowledgeNotificationSet';
842
843 var _response = _requester.request(_url,
844 "POST",
845 body: _body,
846 queryParams: _queryParams,
847 uploadOptions: _uploadOptions,
848 uploadMedia: _uploadMedia,
849 downloadOptions: _downloadOptions);
850 return _response.then((data) => null);
851 }
852
853 /**
854 * Completes the signup flow, by specifying the Completion token and
855 * Enterprise token. This request must not be called multiple times for a
856 * given Enterprise Token.
857 *
858 * Request parameters:
859 *
860 * [completionToken] - The Completion token initially returned by
861 * GenerateSignupUrl.
862 *
863 * [enterpriseToken] - The Enterprise token appended to the Callback URL.
864 *
865 * Completes with a [Enterprise].
866 *
867 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
868 * error.
869 *
870 * If the used [http.Client] completes with an error when making a REST call,
871 * this method will complete with the same error.
872 */
873 async.Future<Enterprise> completeSignup({core.String completionToken, core.Str ing enterpriseToken}) {
874 var _url = null;
875 var _queryParams = new core.Map();
876 var _uploadMedia = null;
877 var _uploadOptions = null;
878 var _downloadOptions = commons.DownloadOptions.Metadata;
879 var _body = null;
880
881 if (completionToken != null) {
882 _queryParams["completionToken"] = [completionToken];
883 }
884 if (enterpriseToken != null) {
885 _queryParams["enterpriseToken"] = [enterpriseToken];
886 }
887
888 _url = 'enterprises/completeSignup';
889
890 var _response = _requester.request(_url,
891 "POST",
892 body: _body,
893 queryParams: _queryParams,
894 uploadOptions: _uploadOptions,
895 uploadMedia: _uploadMedia,
896 downloadOptions: _downloadOptions);
897 return _response.then((data) => new Enterprise.fromJson(data));
898 }
899
900 /**
811 * Deletes the binding between the EMM and enterprise. This is now deprecated; 901 * Deletes the binding between the EMM and enterprise. This is now deprecated;
812 * use this to unenroll customers that were previously enrolled with the 902 * use this to unenroll customers that were previously enrolled with the
813 * 'insert' call, then enroll them again with the 'enroll' call. 903 * 'insert' call, then enroll them again with the 'enroll' call.
814 * 904 *
815 * Request parameters: 905 * Request parameters:
816 * 906 *
817 * [enterpriseId] - The ID of the enterprise. 907 * [enterpriseId] - The ID of the enterprise.
818 * 908 *
819 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 909 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
820 * error. 910 * error.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 "POST", 977 "POST",
888 body: _body, 978 body: _body,
889 queryParams: _queryParams, 979 queryParams: _queryParams,
890 uploadOptions: _uploadOptions, 980 uploadOptions: _uploadOptions,
891 uploadMedia: _uploadMedia, 981 uploadMedia: _uploadMedia,
892 downloadOptions: _downloadOptions); 982 downloadOptions: _downloadOptions);
893 return _response.then((data) => new Enterprise.fromJson(data)); 983 return _response.then((data) => new Enterprise.fromJson(data));
894 } 984 }
895 985
896 /** 986 /**
987 * Generates a sign-up URL.
988 *
989 * Request parameters:
990 *
991 * [callbackUrl] - The callback URL to which the Admin will be redirected
992 * after successfully creating an enterprise. Before redirecting there the
993 * system will add a single query parameter to this URL named
994 * "enterpriseToken" which will contain an opaque token to be used for the
995 * CompleteSignup request.
996 * Beware that this means that the URL will be parsed, the parameter added and
997 * then a new URL formatted, i.e. there may be some minor formatting changes
998 * and, more importantly, the URL must be well-formed so that it can be
999 * parsed.
1000 *
1001 * Completes with a [SignupInfo].
1002 *
1003 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1004 * error.
1005 *
1006 * If the used [http.Client] completes with an error when making a REST call,
1007 * this method will complete with the same error.
1008 */
1009 async.Future<SignupInfo> generateSignupUrl({core.String callbackUrl}) {
1010 var _url = null;
1011 var _queryParams = new core.Map();
1012 var _uploadMedia = null;
1013 var _uploadOptions = null;
1014 var _downloadOptions = commons.DownloadOptions.Metadata;
1015 var _body = null;
1016
1017 if (callbackUrl != null) {
1018 _queryParams["callbackUrl"] = [callbackUrl];
1019 }
1020
1021 _url = 'enterprises/signupUrl';
1022
1023 var _response = _requester.request(_url,
1024 "POST",
1025 body: _body,
1026 queryParams: _queryParams,
1027 uploadOptions: _uploadOptions,
1028 uploadMedia: _uploadMedia,
1029 downloadOptions: _downloadOptions);
1030 return _response.then((data) => new SignupInfo.fromJson(data));
1031 }
1032
1033 /**
897 * Retrieves the name and domain of an enterprise. 1034 * Retrieves the name and domain of an enterprise.
898 * 1035 *
899 * Request parameters: 1036 * Request parameters:
900 * 1037 *
901 * [enterpriseId] - The ID of the enterprise. 1038 * [enterpriseId] - The ID of the enterprise.
902 * 1039 *
903 * Completes with a [Enterprise]. 1040 * Completes with a [Enterprise].
904 * 1041 *
905 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1042 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
906 * error. 1043 * error.
(...skipping 19 matching lines...) Expand all
926 "GET", 1063 "GET",
927 body: _body, 1064 body: _body,
928 queryParams: _queryParams, 1065 queryParams: _queryParams,
929 uploadOptions: _uploadOptions, 1066 uploadOptions: _uploadOptions,
930 uploadMedia: _uploadMedia, 1067 uploadMedia: _uploadMedia,
931 downloadOptions: _downloadOptions); 1068 downloadOptions: _downloadOptions);
932 return _response.then((data) => new Enterprise.fromJson(data)); 1069 return _response.then((data) => new Enterprise.fromJson(data));
933 } 1070 }
934 1071
935 /** 1072 /**
1073 * Returns a service account and credentials. The service account can be bound
1074 * to the enterprise by calling setAccount. The service account is unique to
1075 * this enterprise and EMM, and will be deleted if the enterprise is unbound.
1076 * The credentials contain private key data and are not stored server-side.
1077 *
1078 * This method can only be called after calling Enterprises.Enroll or
1079 * Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other
1080 * times it will return an error.
1081 *
1082 * Subsequent calls after the first will generate a new, unique set of
1083 * credentials, and invalidate the previously generated credentials.
1084 *
1085 * Once the service account is bound to the enterprise, it can be managed
1086 * using the serviceAccountKeys resource.
1087 *
1088 * Request parameters:
1089 *
1090 * [enterpriseId] - null
1091 *
1092 * [keyType] - The type of credential to return with the service account.
1093 * Required.
1094 * Possible string values are:
1095 * - "googleCredentials"
1096 * - "pkcs12"
1097 *
1098 * Completes with a [ServiceAccount].
1099 *
1100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1101 * error.
1102 *
1103 * If the used [http.Client] completes with an error when making a REST call,
1104 * this method will complete with the same error.
1105 */
1106 async.Future<ServiceAccount> getServiceAccount(core.String enterpriseId, {core .String keyType}) {
1107 var _url = null;
1108 var _queryParams = new core.Map();
1109 var _uploadMedia = null;
1110 var _uploadOptions = null;
1111 var _downloadOptions = commons.DownloadOptions.Metadata;
1112 var _body = null;
1113
1114 if (enterpriseId == null) {
1115 throw new core.ArgumentError("Parameter enterpriseId is required.");
1116 }
1117 if (keyType != null) {
1118 _queryParams["keyType"] = [keyType];
1119 }
1120
1121 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s erviceAccount';
1122
1123 var _response = _requester.request(_url,
1124 "GET",
1125 body: _body,
1126 queryParams: _queryParams,
1127 uploadOptions: _uploadOptions,
1128 uploadMedia: _uploadMedia,
1129 downloadOptions: _downloadOptions);
1130 return _response.then((data) => new ServiceAccount.fromJson(data));
1131 }
1132
1133 /**
936 * Returns the store layout resource. 1134 * Returns the store layout resource.
937 * 1135 *
938 * Request parameters: 1136 * Request parameters:
939 * 1137 *
940 * [enterpriseId] - The ID of the enterprise. 1138 * [enterpriseId] - The ID of the enterprise.
941 * 1139 *
942 * Completes with a [StoreLayout]. 1140 * Completes with a [StoreLayout].
943 * 1141 *
944 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1142 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
945 * error. 1143 * error.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 "POST", 1209 "POST",
1012 body: _body, 1210 body: _body,
1013 queryParams: _queryParams, 1211 queryParams: _queryParams,
1014 uploadOptions: _uploadOptions, 1212 uploadOptions: _uploadOptions,
1015 uploadMedia: _uploadMedia, 1213 uploadMedia: _uploadMedia,
1016 downloadOptions: _downloadOptions); 1214 downloadOptions: _downloadOptions);
1017 return _response.then((data) => new Enterprise.fromJson(data)); 1215 return _response.then((data) => new Enterprise.fromJson(data));
1018 } 1216 }
1019 1217
1020 /** 1218 /**
1021 * Looks up an enterprise by domain name. 1219 * Looks up an enterprise by domain name. This is only supported for
1220 * enterprises created via the Google-initiated creation flow. Lookup of the
1221 * id is not needed for enterprises created via the EMM-initiated flow since
1222 * the EMM learns the enterprise ID in the callback specified in the
1223 * Enterprises.generateSignupUrl call.
1022 * 1224 *
1023 * Request parameters: 1225 * Request parameters:
1024 * 1226 *
1025 * [domain] - The exact primary domain name of the enterprise to look up. 1227 * [domain] - The exact primary domain name of the enterprise to look up.
1026 * 1228 *
1027 * Completes with a [EnterprisesListResponse]. 1229 * Completes with a [EnterprisesListResponse].
1028 * 1230 *
1029 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1231 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1030 * error. 1232 * error.
1031 * 1233 *
(...skipping 19 matching lines...) Expand all
1051 "GET", 1253 "GET",
1052 body: _body, 1254 body: _body,
1053 queryParams: _queryParams, 1255 queryParams: _queryParams,
1054 uploadOptions: _uploadOptions, 1256 uploadOptions: _uploadOptions,
1055 uploadMedia: _uploadMedia, 1257 uploadMedia: _uploadMedia,
1056 downloadOptions: _downloadOptions); 1258 downloadOptions: _downloadOptions);
1057 return _response.then((data) => new EnterprisesListResponse.fromJson(data)); 1259 return _response.then((data) => new EnterprisesListResponse.fromJson(data));
1058 } 1260 }
1059 1261
1060 /** 1262 /**
1263 * Pulls and returns a notification set for the enterprises associated with
1264 * the service account authenticated for the request. The notification set may
1265 * be empty if no notification are pending.
1266 * A notification set returned needs to be acknowledged within 20 seconds by
1267 * calling Enterprises.AcknowledgeNotificationSet, unless the notification set
1268 * is empty.
1269 * Notifications that are not acknowledged within the 20 seconds will
1270 * eventually be included again in the response to another PullNotificationSet
1271 * request, and those that are never acknowledged will ultimately be deleted
1272 * according to the Google Cloud Platform Pub/Sub system policy.
1273 * Multiple requests might be performed concurrently to retrieve
1274 * notifications, in which case the pending notifications (if any) will be
1275 * split among each caller, if any are pending.
1276 *
1277 * Request parameters:
1278 *
1279 * [requestMode] - The request mode for pulling notifications. If omitted,
1280 * defaults to WAIT_FOR_NOTIFCATIONS.
1281 * If this is set to WAIT_FOR_NOTIFCATIONS, the request will eventually
1282 * timeout, in which case it should be retried.
1283 * Possible string values are:
1284 * - "returnImmediately"
1285 * - "waitForNotifications"
1286 *
1287 * Completes with a [NotificationSet].
1288 *
1289 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1290 * error.
1291 *
1292 * If the used [http.Client] completes with an error when making a REST call,
1293 * this method will complete with the same error.
1294 */
1295 async.Future<NotificationSet> pullNotificationSet({core.String requestMode}) {
1296 var _url = null;
1297 var _queryParams = new core.Map();
1298 var _uploadMedia = null;
1299 var _uploadOptions = null;
1300 var _downloadOptions = commons.DownloadOptions.Metadata;
1301 var _body = null;
1302
1303 if (requestMode != null) {
1304 _queryParams["requestMode"] = [requestMode];
1305 }
1306
1307 _url = 'enterprises/pullNotificationSet';
1308
1309 var _response = _requester.request(_url,
1310 "POST",
1311 body: _body,
1312 queryParams: _queryParams,
1313 uploadOptions: _uploadOptions,
1314 uploadMedia: _uploadMedia,
1315 downloadOptions: _downloadOptions);
1316 return _response.then((data) => new NotificationSet.fromJson(data));
1317 }
1318
1319 /**
1061 * Sends a test push notification to validate the EMM integration with the 1320 * Sends a test push notification to validate the EMM integration with the
1062 * Google Cloud Pub/Sub service for this enterprise. 1321 * Google Cloud Pub/Sub service for this enterprise.
1063 * 1322 *
1064 * Request parameters: 1323 * Request parameters:
1065 * 1324 *
1066 * [enterpriseId] - The ID of the enterprise. 1325 * [enterpriseId] - The ID of the enterprise.
1067 * 1326 *
1068 * Completes with a [EnterprisesSendTestPushNotificationResponse]. 1327 * Completes with a [EnterprisesSendTestPushNotificationResponse].
1069 * 1328 *
1070 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1329 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 "GET", 2521 "GET",
2263 body: _body, 2522 body: _body,
2264 queryParams: _queryParams, 2523 queryParams: _queryParams,
2265 uploadOptions: _uploadOptions, 2524 uploadOptions: _uploadOptions,
2266 uploadMedia: _uploadMedia, 2525 uploadMedia: _uploadMedia,
2267 downloadOptions: _downloadOptions); 2526 downloadOptions: _downloadOptions);
2268 return _response.then((data) => new ProductPermissions.fromJson(data)); 2527 return _response.then((data) => new ProductPermissions.fromJson(data));
2269 } 2528 }
2270 2529
2271 /** 2530 /**
2272 * Finds approved products that match a query. 2531 * Finds approved products that match a query, or all approved products if
2532 * there is no query.
2273 * 2533 *
2274 * Request parameters: 2534 * Request parameters:
2275 * 2535 *
2276 * [enterpriseId] - The ID of the enterprise. 2536 * [enterpriseId] - The ID of the enterprise.
2277 * 2537 *
2278 * [approved] - Specifies whether to search among all products (false) or 2538 * [approved] - Specifies whether to search among all products (false) or
2279 * among only products that have been approved (true). Only "true" is 2539 * among only products that have been approved (true). Only "true" is
2280 * supported, and should be specified. 2540 * supported, and should be specified.
2281 * 2541 *
2282 * [language] - The BCP47 tag for the user's preferred language (e.g. "en-US", 2542 * [language] - The BCP47 tag for the user's preferred language (e.g. "en-US",
2283 * "de"). Results are returned in the language best matching the preferred 2543 * "de"). Results are returned in the language best matching the preferred
2284 * language. 2544 * language.
2285 * 2545 *
2286 * [maxResults] - Specifies the maximum number of products that can be 2546 * [maxResults] - Specifies the maximum number of products that can be
2287 * returned per request. If not specified, uses a default value of 100, which 2547 * returned per request. If not specified, uses a default value of 100, which
2288 * is also the maximum retrievable within a single response. 2548 * is also the maximum retrievable within a single response.
2289 * 2549 *
2290 * [query] - The search query as typed in the Google Play Store search box. If 2550 * [query] - The search query as typed in the Google Play Store search box. If
2291 * omitted, all approved apps will be returned (using the pagination 2551 * omitted, all approved apps will be returned (using the pagination
2292 * parameters). 2552 * parameters), including apps that are not available in the store (e.g.
2553 * unpublished apps).
2293 * 2554 *
2294 * [token] - A pagination token is contained in a requestÂ’s response when 2555 * [token] - A pagination token is contained in a requestÂ’s response when
2295 * there are more products. The token can be used in a subsequent request to 2556 * there are more products. The token can be used in a subsequent request to
2296 * obtain more products, and so forth. This parameter cannot be used in the 2557 * obtain more products, and so forth. This parameter cannot be used in the
2297 * initial request. 2558 * initial request.
2298 * 2559 *
2299 * Completes with a [ProductsListResponse]. 2560 * Completes with a [ProductsListResponse].
2300 * 2561 *
2301 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2562 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2302 * error. 2563 * error.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 "GET", 2598 "GET",
2338 body: _body, 2599 body: _body,
2339 queryParams: _queryParams, 2600 queryParams: _queryParams,
2340 uploadOptions: _uploadOptions, 2601 uploadOptions: _uploadOptions,
2341 uploadMedia: _uploadMedia, 2602 uploadMedia: _uploadMedia,
2342 downloadOptions: _downloadOptions); 2603 downloadOptions: _downloadOptions);
2343 return _response.then((data) => new ProductsListResponse.fromJson(data)); 2604 return _response.then((data) => new ProductsListResponse.fromJson(data));
2344 } 2605 }
2345 2606
2346 /** 2607 /**
2608 * Unapproves the specified product (and the relevant app permissions, if any)
2609 *
2610 * Request parameters:
2611 *
2612 * [enterpriseId] - The ID of the enterprise.
2613 *
2614 * [productId] - The ID of the product.
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 unapprove(core.String enterpriseId, core.String productId) {
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 (enterpriseId == null) {
2631 throw new core.ArgumentError("Parameter enterpriseId is required.");
2632 }
2633 if (productId == null) {
2634 throw new core.ArgumentError("Parameter productId is required.");
2635 }
2636
2637 _downloadOptions = null;
2638
2639 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/p roducts/' + commons.Escaper.ecapeVariable('$productId') + '/unapprove';
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 /**
2347 * This method has been deprecated. To programmatically approve applications, 2652 * This method has been deprecated. To programmatically approve applications,
2348 * you must use the iframe mechanism via the generateApprovalUrl and approve 2653 * you must use the iframe mechanism via the generateApprovalUrl and approve
2349 * methods of the Products resource. For more information, see the Play EMM 2654 * methods of the Products resource. For more information, see the Play EMM
2350 * API usage requirements. 2655 * API usage requirements.
2351 * 2656 *
2352 * The updatePermissions method (deprecated) updates the set of Android app 2657 * The updatePermissions method (deprecated) updates the set of Android app
2353 * permissions for this app that have been accepted by the enterprise. 2658 * permissions for this app that have been accepted by the enterprise.
2354 * 2659 *
2355 * [request] - The metadata request object. 2660 * [request] - The metadata request object.
2356 * 2661 *
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 queryParams: _queryParams, 2699 queryParams: _queryParams,
2395 uploadOptions: _uploadOptions, 2700 uploadOptions: _uploadOptions,
2396 uploadMedia: _uploadMedia, 2701 uploadMedia: _uploadMedia,
2397 downloadOptions: _downloadOptions); 2702 downloadOptions: _downloadOptions);
2398 return _response.then((data) => new ProductPermissions.fromJson(data)); 2703 return _response.then((data) => new ProductPermissions.fromJson(data));
2399 } 2704 }
2400 2705
2401 } 2706 }
2402 2707
2403 2708
2404 class StorelayoutclustersResourceApi { 2709 class ServiceaccountkeysResourceApi {
2405 final commons.ApiRequester _requester; 2710 final commons.ApiRequester _requester;
2406 2711
2407 StorelayoutclustersResourceApi(commons.ApiRequester client) : 2712 ServiceaccountkeysResourceApi(commons.ApiRequester client) :
2408 _requester = client; 2713 _requester = client;
2409 2714
2410 /** 2715 /**
2411 * Deletes a cluster. 2716 * Removes and invalidates the specified credentials for the service account
2717 * associated with this enterprise. The calling service account must have been
2718 * retrieved by calling Enterprises.GetServiceAccount and must have been set
2719 * as the enterprise service account by calling Enterprises.SetAccount.
2412 * 2720 *
2413 * Request parameters: 2721 * Request parameters:
2414 * 2722 *
2415 * [enterpriseId] - The ID of the enterprise. 2723 * [enterpriseId] - The ID of the enterprise.
2416 * 2724 *
2417 * [pageId] - The ID of the page. 2725 * [keyId] - The ID of the key.
2418 *
2419 * [clusterId] - The ID of the cluster.
2420 * 2726 *
2421 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2727 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2422 * error. 2728 * error.
2423 * 2729 *
2424 * If the used [http.Client] completes with an error when making a REST call, 2730 * If the used [http.Client] completes with an error when making a REST call,
2425 * this method will complete with the same error. 2731 * this method will complete with the same error.
2426 */ 2732 */
2427 async.Future delete(core.String enterpriseId, core.String pageId, core.String clusterId) { 2733 async.Future delete(core.String enterpriseId, core.String keyId) {
2428 var _url = null; 2734 var _url = null;
2429 var _queryParams = new core.Map(); 2735 var _queryParams = new core.Map();
2430 var _uploadMedia = null; 2736 var _uploadMedia = null;
2431 var _uploadOptions = null; 2737 var _uploadOptions = null;
2432 var _downloadOptions = commons.DownloadOptions.Metadata; 2738 var _downloadOptions = commons.DownloadOptions.Metadata;
2433 var _body = null; 2739 var _body = null;
2434 2740
2435 if (enterpriseId == null) { 2741 if (enterpriseId == null) {
2436 throw new core.ArgumentError("Parameter enterpriseId is required."); 2742 throw new core.ArgumentError("Parameter enterpriseId is required.");
2437 } 2743 }
2438 if (pageId == null) { 2744 if (keyId == null) {
2439 throw new core.ArgumentError("Parameter pageId is required."); 2745 throw new core.ArgumentError("Parameter keyId is required.");
2440 }
2441 if (clusterId == null) {
2442 throw new core.ArgumentError("Parameter clusterId is required.");
2443 } 2746 }
2444 2747
2445 _downloadOptions = null; 2748 _downloadOptions = null;
2446 2749
2447 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c ommons.Escaper.ecapeVariable('$clusterId'); 2750 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s erviceAccountKeys/' + commons.Escaper.ecapeVariable('$keyId');
2448 2751
2449 var _response = _requester.request(_url, 2752 var _response = _requester.request(_url,
2450 "DELETE", 2753 "DELETE",
2451 body: _body, 2754 body: _body,
2452 queryParams: _queryParams, 2755 queryParams: _queryParams,
2453 uploadOptions: _uploadOptions, 2756 uploadOptions: _uploadOptions,
2454 uploadMedia: _uploadMedia, 2757 uploadMedia: _uploadMedia,
2455 downloadOptions: _downloadOptions); 2758 downloadOptions: _downloadOptions);
2456 return _response.then((data) => null); 2759 return _response.then((data) => null);
2457 } 2760 }
2458 2761
2459 /** 2762 /**
2460 * Retrieves details of a cluster. 2763 * Generates new credentials for the service account associated with this
2764 * enterprise. The calling service account must have been retrieved by calling
2765 * Enterprises.GetServiceAccount and must have been set as the enterprise
2766 * service account by calling Enterprises.SetAccount.
2767 *
2768 * Only the type of the key should be populated in the resource to be
2769 * inserted.
2770 *
2771 * [request] - The metadata request object.
2461 * 2772 *
2462 * Request parameters: 2773 * Request parameters:
2463 * 2774 *
2464 * [enterpriseId] - The ID of the enterprise. 2775 * [enterpriseId] - The ID of the enterprise.
2465 * 2776 *
2466 * [pageId] - The ID of the page. 2777 * Completes with a [ServiceAccountKey].
2467 *
2468 * [clusterId] - The ID of the cluster.
2469 *
2470 * Completes with a [StoreCluster].
2471 * 2778 *
2472 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2779 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2473 * error. 2780 * error.
2474 * 2781 *
2475 * If the used [http.Client] completes with an error when making a REST call, 2782 * If the used [http.Client] completes with an error when making a REST call,
2476 * this method will complete with the same error. 2783 * this method will complete with the same error.
2477 */ 2784 */
2478 async.Future<StoreCluster> get(core.String enterpriseId, core.String pageId, c ore.String clusterId) { 2785 async.Future<ServiceAccountKey> insert(ServiceAccountKey request, core.String enterpriseId) {
2479 var _url = null; 2786 var _url = null;
2480 var _queryParams = new core.Map(); 2787 var _queryParams = new core.Map();
2481 var _uploadMedia = null; 2788 var _uploadMedia = null;
2482 var _uploadOptions = null; 2789 var _uploadOptions = null;
2483 var _downloadOptions = commons.DownloadOptions.Metadata; 2790 var _downloadOptions = commons.DownloadOptions.Metadata;
2484 var _body = null; 2791 var _body = null;
2485 2792
2793 if (request != null) {
2794 _body = convert.JSON.encode((request).toJson());
2795 }
2486 if (enterpriseId == null) { 2796 if (enterpriseId == null) {
2487 throw new core.ArgumentError("Parameter enterpriseId is required."); 2797 throw new core.ArgumentError("Parameter enterpriseId is required.");
2488 } 2798 }
2489 if (pageId == null) {
2490 throw new core.ArgumentError("Parameter pageId is required.");
2491 }
2492 if (clusterId == null) {
2493 throw new core.ArgumentError("Parameter clusterId is required.");
2494 }
2495 2799
2496 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c ommons.Escaper.ecapeVariable('$clusterId'); 2800 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s erviceAccountKeys';
2497 2801
2498 var _response = _requester.request(_url, 2802 var _response = _requester.request(_url,
2499 "GET", 2803 "POST",
2500 body: _body, 2804 body: _body,
2501 queryParams: _queryParams, 2805 queryParams: _queryParams,
2502 uploadOptions: _uploadOptions, 2806 uploadOptions: _uploadOptions,
2503 uploadMedia: _uploadMedia, 2807 uploadMedia: _uploadMedia,
2504 downloadOptions: _downloadOptions); 2808 downloadOptions: _downloadOptions);
2505 return _response.then((data) => new StoreCluster.fromJson(data)); 2809 return _response.then((data) => new ServiceAccountKey.fromJson(data));
2506 } 2810 }
2507 2811
2508 /** 2812 /**
2509 * Inserts a new cluster in a page. 2813 * Lists all active credentials for the service account associated with this
2510 * 2814 * enterprise. Only the ID and key type are returned. The calling service
2511 * [request] - The metadata request object. 2815 * account must have been retrieved by calling Enterprises.GetServiceAccount
2816 * and must have been set as the enterprise service account by calling
2817 * Enterprises.SetAccount.
2512 * 2818 *
2513 * Request parameters: 2819 * Request parameters:
2514 * 2820 *
2515 * [enterpriseId] - The ID of the enterprise. 2821 * [enterpriseId] - The ID of the enterprise.
2516 * 2822 *
2517 * [pageId] - The ID of the page. 2823 * Completes with a [ServiceAccountKeysListResponse].
2518 *
2519 * Completes with a [StoreCluster].
2520 * 2824 *
2521 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 2825 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2522 * error. 2826 * error.
2523 * 2827 *
2524 * If the used [http.Client] completes with an error when making a REST call, 2828 * If the used [http.Client] completes with an error when making a REST call,
2525 * this method will complete with the same error. 2829 * this method will complete with the same error.
2526 */ 2830 */
2527 async.Future<StoreCluster> insert(StoreCluster request, core.String enterprise Id, core.String pageId) { 2831 async.Future<ServiceAccountKeysListResponse> list(core.String enterpriseId) {
2528 var _url = null; 2832 var _url = null;
2529 var _queryParams = new core.Map(); 2833 var _queryParams = new core.Map();
2530 var _uploadMedia = null; 2834 var _uploadMedia = null;
2531 var _uploadOptions = null; 2835 var _uploadOptions = null;
2532 var _downloadOptions = commons.DownloadOptions.Metadata; 2836 var _downloadOptions = commons.DownloadOptions.Metadata;
2533 var _body = null; 2837 var _body = null;
2534 2838
2839 if (enterpriseId == null) {
2840 throw new core.ArgumentError("Parameter enterpriseId is required.");
2841 }
2842
2843 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s erviceAccountKeys';
2844
2845 var _response = _requester.request(_url,
2846 "GET",
2847 body: _body,
2848 queryParams: _queryParams,
2849 uploadOptions: _uploadOptions,
2850 uploadMedia: _uploadMedia,
2851 downloadOptions: _downloadOptions);
2852 return _response.then((data) => new ServiceAccountKeysListResponse.fromJson( data));
2853 }
2854
2855 }
2856
2857
2858 class StorelayoutclustersResourceApi {
2859 final commons.ApiRequester _requester;
2860
2861 StorelayoutclustersResourceApi(commons.ApiRequester client) :
2862 _requester = client;
2863
2864 /**
2865 * Deletes a cluster.
2866 *
2867 * Request parameters:
2868 *
2869 * [enterpriseId] - The ID of the enterprise.
2870 *
2871 * [pageId] - The ID of the page.
2872 *
2873 * [clusterId] - The ID of the cluster.
2874 *
2875 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2876 * error.
2877 *
2878 * If the used [http.Client] completes with an error when making a REST call,
2879 * this method will complete with the same error.
2880 */
2881 async.Future delete(core.String enterpriseId, core.String pageId, core.String clusterId) {
2882 var _url = null;
2883 var _queryParams = new core.Map();
2884 var _uploadMedia = null;
2885 var _uploadOptions = null;
2886 var _downloadOptions = commons.DownloadOptions.Metadata;
2887 var _body = null;
2888
2889 if (enterpriseId == null) {
2890 throw new core.ArgumentError("Parameter enterpriseId is required.");
2891 }
2892 if (pageId == null) {
2893 throw new core.ArgumentError("Parameter pageId is required.");
2894 }
2895 if (clusterId == null) {
2896 throw new core.ArgumentError("Parameter clusterId is required.");
2897 }
2898
2899 _downloadOptions = null;
2900
2901 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c ommons.Escaper.ecapeVariable('$clusterId');
2902
2903 var _response = _requester.request(_url,
2904 "DELETE",
2905 body: _body,
2906 queryParams: _queryParams,
2907 uploadOptions: _uploadOptions,
2908 uploadMedia: _uploadMedia,
2909 downloadOptions: _downloadOptions);
2910 return _response.then((data) => null);
2911 }
2912
2913 /**
2914 * Retrieves details of a cluster.
2915 *
2916 * Request parameters:
2917 *
2918 * [enterpriseId] - The ID of the enterprise.
2919 *
2920 * [pageId] - The ID of the page.
2921 *
2922 * [clusterId] - The ID of the cluster.
2923 *
2924 * Completes with a [StoreCluster].
2925 *
2926 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2927 * error.
2928 *
2929 * If the used [http.Client] completes with an error when making a REST call,
2930 * this method will complete with the same error.
2931 */
2932 async.Future<StoreCluster> get(core.String enterpriseId, core.String pageId, c ore.String clusterId) {
2933 var _url = null;
2934 var _queryParams = new core.Map();
2935 var _uploadMedia = null;
2936 var _uploadOptions = null;
2937 var _downloadOptions = commons.DownloadOptions.Metadata;
2938 var _body = null;
2939
2940 if (enterpriseId == null) {
2941 throw new core.ArgumentError("Parameter enterpriseId is required.");
2942 }
2943 if (pageId == null) {
2944 throw new core.ArgumentError("Parameter pageId is required.");
2945 }
2946 if (clusterId == null) {
2947 throw new core.ArgumentError("Parameter clusterId is required.");
2948 }
2949
2950 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/s toreLayout/pages/' + commons.Escaper.ecapeVariable('$pageId') + '/clusters/' + c ommons.Escaper.ecapeVariable('$clusterId');
2951
2952 var _response = _requester.request(_url,
2953 "GET",
2954 body: _body,
2955 queryParams: _queryParams,
2956 uploadOptions: _uploadOptions,
2957 uploadMedia: _uploadMedia,
2958 downloadOptions: _downloadOptions);
2959 return _response.then((data) => new StoreCluster.fromJson(data));
2960 }
2961
2962 /**
2963 * Inserts a new cluster in a page.
2964 *
2965 * [request] - The metadata request object.
2966 *
2967 * Request parameters:
2968 *
2969 * [enterpriseId] - The ID of the enterprise.
2970 *
2971 * [pageId] - The ID of the page.
2972 *
2973 * Completes with a [StoreCluster].
2974 *
2975 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2976 * error.
2977 *
2978 * If the used [http.Client] completes with an error when making a REST call,
2979 * this method will complete with the same error.
2980 */
2981 async.Future<StoreCluster> insert(StoreCluster request, core.String enterprise Id, core.String pageId) {
2982 var _url = null;
2983 var _queryParams = new core.Map();
2984 var _uploadMedia = null;
2985 var _uploadOptions = null;
2986 var _downloadOptions = commons.DownloadOptions.Metadata;
2987 var _body = null;
2988
2535 if (request != null) { 2989 if (request != null) {
2536 _body = convert.JSON.encode((request).toJson()); 2990 _body = convert.JSON.encode((request).toJson());
2537 } 2991 }
2538 if (enterpriseId == null) { 2992 if (enterpriseId == null) {
2539 throw new core.ArgumentError("Parameter enterpriseId is required."); 2993 throw new core.ArgumentError("Parameter enterpriseId is required.");
2540 } 2994 }
2541 if (pageId == null) { 2995 if (pageId == null) {
2542 throw new core.ArgumentError("Parameter pageId is required."); 2996 throw new core.ArgumentError("Parameter pageId is required.");
2543 } 2997 }
2544 2998
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 } 3441 }
2988 3442
2989 3443
2990 class UsersResourceApi { 3444 class UsersResourceApi {
2991 final commons.ApiRequester _requester; 3445 final commons.ApiRequester _requester;
2992 3446
2993 UsersResourceApi(commons.ApiRequester client) : 3447 UsersResourceApi(commons.ApiRequester client) :
2994 _requester = client; 3448 _requester = client;
2995 3449
2996 /** 3450 /**
3451 * Deleted an EMM-managed user.
3452 *
3453 * Request parameters:
3454 *
3455 * [enterpriseId] - The ID of the enterprise.
3456 *
3457 * [userId] - The ID of the user.
3458 *
3459 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3460 * error.
3461 *
3462 * If the used [http.Client] completes with an error when making a REST call,
3463 * this method will complete with the same error.
3464 */
3465 async.Future delete(core.String enterpriseId, core.String userId) {
3466 var _url = null;
3467 var _queryParams = new core.Map();
3468 var _uploadMedia = null;
3469 var _uploadOptions = null;
3470 var _downloadOptions = commons.DownloadOptions.Metadata;
3471 var _body = null;
3472
3473 if (enterpriseId == null) {
3474 throw new core.ArgumentError("Parameter enterpriseId is required.");
3475 }
3476 if (userId == null) {
3477 throw new core.ArgumentError("Parameter userId is required.");
3478 }
3479
3480 _downloadOptions = null;
3481
3482 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId');
3483
3484 var _response = _requester.request(_url,
3485 "DELETE",
3486 body: _body,
3487 queryParams: _queryParams,
3488 uploadOptions: _uploadOptions,
3489 uploadMedia: _uploadMedia,
3490 downloadOptions: _downloadOptions);
3491 return _response.then((data) => null);
3492 }
3493
3494 /**
3495 * Generates an authentication token which the device policy client can use to
3496 * provision the given EMM-managed user account on a device. The generated
3497 * token is single-use and expires after a few minutes.
3498 *
3499 * This call only works with EMM-managed accounts.
3500 *
3501 * Request parameters:
3502 *
3503 * [enterpriseId] - The ID of the enterprise.
3504 *
3505 * [userId] - The ID of the user.
3506 *
3507 * Completes with a [AuthenticationToken].
3508 *
3509 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3510 * error.
3511 *
3512 * If the used [http.Client] completes with an error when making a REST call,
3513 * this method will complete with the same error.
3514 */
3515 async.Future<AuthenticationToken> generateAuthenticationToken(core.String ente rpriseId, core.String userId) {
3516 var _url = null;
3517 var _queryParams = new core.Map();
3518 var _uploadMedia = null;
3519 var _uploadOptions = null;
3520 var _downloadOptions = commons.DownloadOptions.Metadata;
3521 var _body = null;
3522
3523 if (enterpriseId == null) {
3524 throw new core.ArgumentError("Parameter enterpriseId is required.");
3525 }
3526 if (userId == null) {
3527 throw new core.ArgumentError("Parameter userId is required.");
3528 }
3529
3530 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId') + '/authenticationToken';
3531
3532 var _response = _requester.request(_url,
3533 "POST",
3534 body: _body,
3535 queryParams: _queryParams,
3536 uploadOptions: _uploadOptions,
3537 uploadMedia: _uploadMedia,
3538 downloadOptions: _downloadOptions);
3539 return _response.then((data) => new AuthenticationToken.fromJson(data));
3540 }
3541
3542 /**
2997 * Generates a token (activation code) to allow this user to configure their 3543 * Generates a token (activation code) to allow this user to configure their
2998 * work account in the Android Setup Wizard. Revokes any previously generated 3544 * work account in the Android Setup Wizard. Revokes any previously generated
2999 * token. 3545 * token.
3000 * 3546 *
3001 * This call only works with Google managed accounts. 3547 * This call only works with Google managed accounts.
3002 * 3548 *
3003 * Request parameters: 3549 * Request parameters:
3004 * 3550 *
3005 * [enterpriseId] - The ID of the enterprise. 3551 * [enterpriseId] - The ID of the enterprise.
3006 * 3552 *
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3123 "GET", 3669 "GET",
3124 body: _body, 3670 body: _body,
3125 queryParams: _queryParams, 3671 queryParams: _queryParams,
3126 uploadOptions: _uploadOptions, 3672 uploadOptions: _uploadOptions,
3127 uploadMedia: _uploadMedia, 3673 uploadMedia: _uploadMedia,
3128 downloadOptions: _downloadOptions); 3674 downloadOptions: _downloadOptions);
3129 return _response.then((data) => new ProductSet.fromJson(data)); 3675 return _response.then((data) => new ProductSet.fromJson(data));
3130 } 3676 }
3131 3677
3132 /** 3678 /**
3133 * Looks up a user by their primary email address. 3679 * Creates a new EMM-managed user.
3680 *
3681 * The required details of the user are passed in the Users resource in the
3682 * body of the request. Specifically, the accountIdentifier, accountType, and
3683 * displayName fields must be provided.
3684 *
3685 * [request] - The metadata request object.
3134 * 3686 *
3135 * Request parameters: 3687 * Request parameters:
3136 * 3688 *
3689 * [enterpriseId] - The ID of the enterprise.
3690 *
3691 * Completes with a [User].
3692 *
3693 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3694 * error.
3695 *
3696 * If the used [http.Client] completes with an error when making a REST call,
3697 * this method will complete with the same error.
3698 */
3699 async.Future<User> insert(User request, core.String enterpriseId) {
3700 var _url = null;
3701 var _queryParams = new core.Map();
3702 var _uploadMedia = null;
3703 var _uploadOptions = null;
3704 var _downloadOptions = commons.DownloadOptions.Metadata;
3705 var _body = null;
3706
3707 if (request != null) {
3708 _body = convert.JSON.encode((request).toJson());
3709 }
3710 if (enterpriseId == null) {
3711 throw new core.ArgumentError("Parameter enterpriseId is required.");
3712 }
3713
3714 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers';
3715
3716 var _response = _requester.request(_url,
3717 "POST",
3718 body: _body,
3719 queryParams: _queryParams,
3720 uploadOptions: _uploadOptions,
3721 uploadMedia: _uploadMedia,
3722 downloadOptions: _downloadOptions);
3723 return _response.then((data) => new User.fromJson(data));
3724 }
3725
3726 /**
3727 * Looks up a user by their primary email address. This is only supported for
3728 * Google-managed users. Lookup of the id is not needed for EMM-managed users
3729 * because the id is already returned in the result of the Users.insert call.
3730 *
3731 * Request parameters:
3732 *
3137 * [enterpriseId] - The ID of the enterprise. 3733 * [enterpriseId] - The ID of the enterprise.
3138 * 3734 *
3139 * [email] - The exact primary email address of the user to look up. 3735 * [email] - The exact primary email address of the user to look up.
3140 * 3736 *
3141 * Completes with a [UsersListResponse]. 3737 * Completes with a [UsersListResponse].
3142 * 3738 *
3143 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3739 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3144 * error. 3740 * error.
3145 * 3741 *
3146 * If the used [http.Client] completes with an error when making a REST call, 3742 * If the used [http.Client] completes with an error when making a REST call,
(...skipping 21 matching lines...) Expand all
3168 "GET", 3764 "GET",
3169 body: _body, 3765 body: _body,
3170 queryParams: _queryParams, 3766 queryParams: _queryParams,
3171 uploadOptions: _uploadOptions, 3767 uploadOptions: _uploadOptions,
3172 uploadMedia: _uploadMedia, 3768 uploadMedia: _uploadMedia,
3173 downloadOptions: _downloadOptions); 3769 downloadOptions: _downloadOptions);
3174 return _response.then((data) => new UsersListResponse.fromJson(data)); 3770 return _response.then((data) => new UsersListResponse.fromJson(data));
3175 } 3771 }
3176 3772
3177 /** 3773 /**
3774 * Updates the details of an EMM-managed user.
3775 *
3776 * This only works with EMM-managed users. Pass the new details in Users
3777 * resource in the request body. Only the displayName field can be changed.
3778 * Other fields must either be unset or have the currently active value. This
3779 * method supports patch semantics.
3780 *
3781 * [request] - The metadata request object.
3782 *
3783 * Request parameters:
3784 *
3785 * [enterpriseId] - The ID of the enterprise.
3786 *
3787 * [userId] - The ID of the user.
3788 *
3789 * Completes with a [User].
3790 *
3791 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3792 * error.
3793 *
3794 * If the used [http.Client] completes with an error when making a REST call,
3795 * this method will complete with the same error.
3796 */
3797 async.Future<User> patch(User request, core.String enterpriseId, core.String u serId) {
3798 var _url = null;
3799 var _queryParams = new core.Map();
3800 var _uploadMedia = null;
3801 var _uploadOptions = null;
3802 var _downloadOptions = commons.DownloadOptions.Metadata;
3803 var _body = null;
3804
3805 if (request != null) {
3806 _body = convert.JSON.encode((request).toJson());
3807 }
3808 if (enterpriseId == null) {
3809 throw new core.ArgumentError("Parameter enterpriseId is required.");
3810 }
3811 if (userId == null) {
3812 throw new core.ArgumentError("Parameter userId is required.");
3813 }
3814
3815 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId');
3816
3817 var _response = _requester.request(_url,
3818 "PATCH",
3819 body: _body,
3820 queryParams: _queryParams,
3821 uploadOptions: _uploadOptions,
3822 uploadMedia: _uploadMedia,
3823 downloadOptions: _downloadOptions);
3824 return _response.then((data) => new User.fromJson(data));
3825 }
3826
3827 /**
3178 * Revokes a previously generated token (activation code) for the user. 3828 * Revokes a previously generated token (activation code) for the user.
3179 * 3829 *
3180 * Request parameters: 3830 * Request parameters:
3181 * 3831 *
3832 * [enterpriseId] - The ID of the enterprise.
3833 *
3834 * [userId] - The ID of the user.
3835 *
3836 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3837 * error.
3838 *
3839 * If the used [http.Client] completes with an error when making a REST call,
3840 * this method will complete with the same error.
3841 */
3842 async.Future revokeToken(core.String enterpriseId, core.String userId) {
3843 var _url = null;
3844 var _queryParams = new core.Map();
3845 var _uploadMedia = null;
3846 var _uploadOptions = null;
3847 var _downloadOptions = commons.DownloadOptions.Metadata;
3848 var _body = null;
3849
3850 if (enterpriseId == null) {
3851 throw new core.ArgumentError("Parameter enterpriseId is required.");
3852 }
3853 if (userId == null) {
3854 throw new core.ArgumentError("Parameter userId is required.");
3855 }
3856
3857 _downloadOptions = null;
3858
3859 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId') + '/token';
3860
3861 var _response = _requester.request(_url,
3862 "DELETE",
3863 body: _body,
3864 queryParams: _queryParams,
3865 uploadOptions: _uploadOptions,
3866 uploadMedia: _uploadMedia,
3867 downloadOptions: _downloadOptions);
3868 return _response.then((data) => null);
3869 }
3870
3871 /**
3872 * Modifies the set of products a user is entitled to access.
3873 *
3874 * [request] - The metadata request object.
3875 *
3876 * Request parameters:
3877 *
3182 * [enterpriseId] - The ID of the enterprise. 3878 * [enterpriseId] - The ID of the enterprise.
3183 * 3879 *
3184 * [userId] - The ID of the user. 3880 * [userId] - The ID of the user.
3185 * 3881 *
3882 * Completes with a [ProductSet].
3883 *
3186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3884 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3187 * error. 3885 * error.
3188 * 3886 *
3189 * If the used [http.Client] completes with an error when making a REST call, 3887 * If the used [http.Client] completes with an error when making a REST call,
3190 * this method will complete with the same error. 3888 * this method will complete with the same error.
3191 */ 3889 */
3192 async.Future revokeToken(core.String enterpriseId, core.String userId) { 3890 async.Future<ProductSet> setAvailableProductSet(ProductSet request, core.Strin g enterpriseId, core.String userId) {
3193 var _url = null; 3891 var _url = null;
3194 var _queryParams = new core.Map(); 3892 var _queryParams = new core.Map();
3195 var _uploadMedia = null; 3893 var _uploadMedia = null;
3196 var _uploadOptions = null; 3894 var _uploadOptions = null;
3197 var _downloadOptions = commons.DownloadOptions.Metadata; 3895 var _downloadOptions = commons.DownloadOptions.Metadata;
3198 var _body = null; 3896 var _body = null;
3199 3897
3898 if (request != null) {
3899 _body = convert.JSON.encode((request).toJson());
3900 }
3200 if (enterpriseId == null) { 3901 if (enterpriseId == null) {
3201 throw new core.ArgumentError("Parameter enterpriseId is required."); 3902 throw new core.ArgumentError("Parameter enterpriseId is required.");
3202 } 3903 }
3203 if (userId == null) { 3904 if (userId == null) {
3204 throw new core.ArgumentError("Parameter userId is required."); 3905 throw new core.ArgumentError("Parameter userId is required.");
3205 } 3906 }
3206 3907
3207 _downloadOptions = null; 3908 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId') + '/availableProductSet';
3208
3209 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId') + '/token';
3210 3909
3211 var _response = _requester.request(_url, 3910 var _response = _requester.request(_url,
3212 "DELETE", 3911 "PUT",
3213 body: _body, 3912 body: _body,
3214 queryParams: _queryParams, 3913 queryParams: _queryParams,
3215 uploadOptions: _uploadOptions, 3914 uploadOptions: _uploadOptions,
3216 uploadMedia: _uploadMedia, 3915 uploadMedia: _uploadMedia,
3217 downloadOptions: _downloadOptions); 3916 downloadOptions: _downloadOptions);
3218 return _response.then((data) => null); 3917 return _response.then((data) => new ProductSet.fromJson(data));
3219 } 3918 }
3220 3919
3221 /** 3920 /**
3222 * Modifies the set of products a user is entitled to access. 3921 * Updates the details of an EMM-managed user.
3922 *
3923 * This only works with EMM-managed users. Pass the new details in Users
3924 * resource in the request body. Only the displayName field can be changed.
3925 * Other fields must either be unset or have the currently active value.
3223 * 3926 *
3224 * [request] - The metadata request object. 3927 * [request] - The metadata request object.
3225 * 3928 *
3226 * Request parameters: 3929 * Request parameters:
3227 * 3930 *
3228 * [enterpriseId] - The ID of the enterprise. 3931 * [enterpriseId] - The ID of the enterprise.
3229 * 3932 *
3230 * [userId] - The ID of the user. 3933 * [userId] - The ID of the user.
3231 * 3934 *
3232 * Completes with a [ProductSet]. 3935 * Completes with a [User].
3233 * 3936 *
3234 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 3937 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3235 * error. 3938 * error.
3236 * 3939 *
3237 * If the used [http.Client] completes with an error when making a REST call, 3940 * If the used [http.Client] completes with an error when making a REST call,
3238 * this method will complete with the same error. 3941 * this method will complete with the same error.
3239 */ 3942 */
3240 async.Future<ProductSet> setAvailableProductSet(ProductSet request, core.Strin g enterpriseId, core.String userId) { 3943 async.Future<User> update(User request, core.String enterpriseId, core.String userId) {
3241 var _url = null; 3944 var _url = null;
3242 var _queryParams = new core.Map(); 3945 var _queryParams = new core.Map();
3243 var _uploadMedia = null; 3946 var _uploadMedia = null;
3244 var _uploadOptions = null; 3947 var _uploadOptions = null;
3245 var _downloadOptions = commons.DownloadOptions.Metadata; 3948 var _downloadOptions = commons.DownloadOptions.Metadata;
3246 var _body = null; 3949 var _body = null;
3247 3950
3248 if (request != null) { 3951 if (request != null) {
3249 _body = convert.JSON.encode((request).toJson()); 3952 _body = convert.JSON.encode((request).toJson());
3250 } 3953 }
3251 if (enterpriseId == null) { 3954 if (enterpriseId == null) {
3252 throw new core.ArgumentError("Parameter enterpriseId is required."); 3955 throw new core.ArgumentError("Parameter enterpriseId is required.");
3253 } 3956 }
3254 if (userId == null) { 3957 if (userId == null) {
3255 throw new core.ArgumentError("Parameter userId is required."); 3958 throw new core.ArgumentError("Parameter userId is required.");
3256 } 3959 }
3257 3960
3258 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId') + '/availableProductSet'; 3961 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u sers/' + commons.Escaper.ecapeVariable('$userId');
3259 3962
3260 var _response = _requester.request(_url, 3963 var _response = _requester.request(_url,
3261 "PUT", 3964 "PUT",
3262 body: _body, 3965 body: _body,
3263 queryParams: _queryParams, 3966 queryParams: _queryParams,
3264 uploadOptions: _uploadOptions, 3967 uploadOptions: _uploadOptions,
3265 uploadMedia: _uploadMedia, 3968 uploadMedia: _uploadMedia,
3266 downloadOptions: _downloadOptions); 3969 downloadOptions: _downloadOptions);
3267 return _response.then((data) => new ProductSet.fromJson(data)); 3970 return _response.then((data) => new User.fromJson(data));
3268 } 3971 }
3269 3972
3270 } 3973 }
3271 3974
3272 3975
3273 3976
3274 /** 3977 /**
3978 * This represents an enterprise administrator who can manage the enterprise in
3979 * the Google Play for Work Store.
3980 */
3981 class Administrator {
3982 /** The administrator's email address. */
3983 core.String email;
3984
3985 Administrator();
3986
3987 Administrator.fromJson(core.Map _json) {
3988 if (_json.containsKey("email")) {
3989 email = _json["email"];
3990 }
3991 }
3992
3993 core.Map toJson() {
3994 var _json = new core.Map();
3995 if (email != null) {
3996 _json["email"] = email;
3997 }
3998 return _json;
3999 }
4000 }
4001
4002 /**
3275 * Represents the list of app restrictions available to be pre-configured for 4003 * Represents the list of app restrictions available to be pre-configured for
3276 * the product. 4004 * the product.
3277 */ 4005 */
3278 class AppRestrictionsSchema { 4006 class AppRestrictionsSchema {
3279 /** 4007 /**
3280 * Identifies what kind of resource this is. Value: the fixed string 4008 * Identifies what kind of resource this is. Value: the fixed string
3281 * "androidenterprise#appRestrictionsSchema". 4009 * "androidenterprise#appRestrictionsSchema".
3282 */ 4010 */
3283 core.String kind; 4011 core.String kind;
3284 /** The set of restrictions that make up this schema. */ 4012 /** The set of restrictions that make up this schema. */
(...skipping 16 matching lines...) Expand all
3301 _json["kind"] = kind; 4029 _json["kind"] = kind;
3302 } 4030 }
3303 if (restrictions != null) { 4031 if (restrictions != null) {
3304 _json["restrictions"] = restrictions.map((value) => (value).toJson()).toLi st(); 4032 _json["restrictions"] = restrictions.map((value) => (value).toJson()).toLi st();
3305 } 4033 }
3306 return _json; 4034 return _json;
3307 } 4035 }
3308 } 4036 }
3309 4037
3310 /** 4038 /**
4039 * An event generated when a new app version is uploaded to Google Play and its
4040 * app restrictions schema changed. To fetch the app restrictions schema for an
4041 * app, use Products.getAppRestrictionsSchema on the EMM API.
4042 */
4043 class AppRestrictionsSchemaChangeEvent {
4044 /**
4045 * The id of the product (e.g. "app:com.google.android.gm") for which the app
4046 * restriction schema changed. This field will always be present.
4047 */
4048 core.String productId;
4049
4050 AppRestrictionsSchemaChangeEvent();
4051
4052 AppRestrictionsSchemaChangeEvent.fromJson(core.Map _json) {
4053 if (_json.containsKey("productId")) {
4054 productId = _json["productId"];
4055 }
4056 }
4057
4058 core.Map toJson() {
4059 var _json = new core.Map();
4060 if (productId != null) {
4061 _json["productId"] = productId;
4062 }
4063 return _json;
4064 }
4065 }
4066
4067 /**
3311 * A restriction in the App Restriction Schema represents a piece of 4068 * A restriction in the App Restriction Schema represents a piece of
3312 * configuration that may be pre-applied. 4069 * configuration that may be pre-applied.
3313 */ 4070 */
3314 class AppRestrictionsSchemaRestriction { 4071 class AppRestrictionsSchemaRestriction {
3315 /** The default value of the restriction. */ 4072 /** The default value of the restriction. */
3316 AppRestrictionsSchemaRestrictionRestrictionValue defaultValue; 4073 AppRestrictionsSchemaRestrictionRestrictionValue defaultValue;
3317 /** 4074 /**
3318 * A longer description of the restriction, giving more detail of what it 4075 * A longer description of the restriction, giving more detail of what it
3319 * affects. 4076 * affects.
3320 */ 4077 */
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 if (valueMultiselect != null) { 4202 if (valueMultiselect != null) {
3446 _json["valueMultiselect"] = valueMultiselect; 4203 _json["valueMultiselect"] = valueMultiselect;
3447 } 4204 }
3448 if (valueString != null) { 4205 if (valueString != null) {
3449 _json["valueString"] = valueString; 4206 _json["valueString"] = valueString;
3450 } 4207 }
3451 return _json; 4208 return _json;
3452 } 4209 }
3453 } 4210 }
3454 4211
4212 /**
4213 * An event generated when a new version of an app is uploaded to Google Play.
4214 * Notifications are sent for new public versions only: alpha, beta, or canary
4215 * versions do not generate this event. To fetch up-to-date version history for
4216 * an app, use Products.Get on the EMM API.
4217 */
4218 class AppUpdateEvent {
4219 /**
4220 * The id of the product (e.g. "app:com.google.android.gm") that was updated.
4221 * This field will always be present.
4222 */
4223 core.String productId;
4224
4225 AppUpdateEvent();
4226
4227 AppUpdateEvent.fromJson(core.Map _json) {
4228 if (_json.containsKey("productId")) {
4229 productId = _json["productId"];
4230 }
4231 }
4232
4233 core.Map toJson() {
4234 var _json = new core.Map();
4235 if (productId != null) {
4236 _json["productId"] = productId;
4237 }
4238 return _json;
4239 }
4240 }
4241
3455 /** This represents a single version of the app. */ 4242 /** This represents a single version of the app. */
3456 class AppVersion { 4243 class AppVersion {
3457 /** Unique increasing identifier for the app version. */ 4244 /** Unique increasing identifier for the app version. */
3458 core.int versionCode; 4245 core.int versionCode;
3459 /** 4246 /**
3460 * The string used in the Play Store by the app developer to identify the 4247 * The string used in the Play Store by the app developer to identify the
3461 * version. The string is not necessarily unique or localized (for example, 4248 * version. The string is not necessarily unique or localized (for example,
3462 * the string could be "1.4"). 4249 * the string could be "1.4").
3463 */ 4250 */
3464 core.String versionString; 4251 core.String versionString;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 _json["approvalUrl"] = approvalUrl; 4303 _json["approvalUrl"] = approvalUrl;
3517 } 4304 }
3518 if (kind != null) { 4305 if (kind != null) {
3519 _json["kind"] = kind; 4306 _json["kind"] = kind;
3520 } 4307 }
3521 return _json; 4308 return _json;
3522 } 4309 }
3523 } 4310 }
3524 4311
3525 /** 4312 /**
4313 * An AuthenticationToken is used by the EMM's device policy client on a device
4314 * to provision the given EMM-managed user on that device.
4315 */
4316 class AuthenticationToken {
4317 /**
4318 * Identifies what kind of resource this is. Value: the fixed string
4319 * "androidenterprise#authenticationToken".
4320 */
4321 core.String kind;
4322 /**
4323 * The authentication token to be passed to the device policy client on the
4324 * device where it can be used to provision the account for which this token
4325 * was generated.
4326 */
4327 core.String token;
4328
4329 AuthenticationToken();
4330
4331 AuthenticationToken.fromJson(core.Map _json) {
4332 if (_json.containsKey("kind")) {
4333 kind = _json["kind"];
4334 }
4335 if (_json.containsKey("token")) {
4336 token = _json["token"];
4337 }
4338 }
4339
4340 core.Map toJson() {
4341 var _json = new core.Map();
4342 if (kind != null) {
4343 _json["kind"] = kind;
4344 }
4345 if (token != null) {
4346 _json["token"] = token;
4347 }
4348 return _json;
4349 }
4350 }
4351
4352 /**
3526 * A collection resource defines a named set of apps that is visible to a set of 4353 * A collection resource defines a named set of apps that is visible to a set of
3527 * users in the Google Play Store app running on those users' managed devices. 4354 * users in the Google Play Store app running on those users' managed devices.
3528 * Those users can then install any of those apps if they wish (which will 4355 * Those users can then install any of those apps if they wish (which will
3529 * trigger creation of install and entitlement resources). A user cannot install 4356 * trigger creation of install and entitlement resources). A user cannot install
3530 * an app on a managed device unless the app is listed in at least one 4357 * an app on a managed device unless the app is listed in at least one
3531 * collection that is visible to that user. 4358 * collection that is visible to that user.
3532 * 4359 *
3533 * Note that the API can be used to directly install an app regardless of 4360 * Note that the API can be used to directly install an app regardless of
3534 * whether it is in any collection - so an enterprise has a choice of either 4361 * whether it is in any collection - so an enterprise has a choice of either
3535 * directly pushing apps to users, or allowing users to install apps if they 4362 * directly pushing apps to users, or allowing users to install apps if they
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
3691 /** 4518 /**
3692 * Identifies what kind of resource this is. Value: the fixed string 4519 * Identifies what kind of resource this is. Value: the fixed string
3693 * "androidenterprise#device". 4520 * "androidenterprise#device".
3694 */ 4521 */
3695 core.String kind; 4522 core.String kind;
3696 /** 4523 /**
3697 * The mechanism by which this device is managed by the EMM. "managedDevice" 4524 * The mechanism by which this device is managed by the EMM. "managedDevice"
3698 * means that the EMM's app is a device owner. "managedProfile" means that the 4525 * means that the EMM's app is a device owner. "managedProfile" means that the
3699 * EMM's app is the profile owner (and there is a separate personal profile 4526 * EMM's app is the profile owner (and there is a separate personal profile
3700 * which is not managed). "containerApp" means that the EMM's app is managing 4527 * which is not managed). "containerApp" means that the EMM's app is managing
3701 * the Android for Work container app on the device. ?unmanagedProfile? means 4528 * the Android for Work container app on the device.
3702 * that the EMM?s app is managing a managed user on an unmanaged device
3703 */ 4529 */
3704 core.String managementType; 4530 core.String managementType;
3705 4531
3706 Device(); 4532 Device();
3707 4533
3708 Device.fromJson(core.Map _json) { 4534 Device.fromJson(core.Map _json) {
3709 if (_json.containsKey("androidId")) { 4535 if (_json.containsKey("androidId")) {
3710 androidId = _json["androidId"]; 4536 androidId = _json["androidId"];
3711 } 4537 }
3712 if (_json.containsKey("kind")) { 4538 if (_json.containsKey("kind")) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 _json["device"] = device.map((value) => (value).toJson()).toList(); 4626 _json["device"] = device.map((value) => (value).toJson()).toList();
3801 } 4627 }
3802 if (kind != null) { 4628 if (kind != null) {
3803 _json["kind"] = kind; 4629 _json["kind"] = kind;
3804 } 4630 }
3805 return _json; 4631 return _json;
3806 } 4632 }
3807 } 4633 }
3808 4634
3809 /** 4635 /**
3810 * An enterprise resource represents a binding between an organization and their 4636 * An enterprise resource represents the binding between an EMM and a specific
3811 * EMM. 4637 * organization.
3812 * 4638 *
3813 * To create an enterprise, an admin of the enterprise must first go through a
3814 * Play for Work sign-up flow. At the end of this the admin will be presented
3815 * with a token (a short opaque alphanumeric string). They must then present
3816 * this to the EMM, who then supplies it to the enroll method. Until this is
3817 * done the EMM will not have any access to the enterprise.
3818 * 4639 *
3819 * After calling enroll the EMM should call setAccount to specify the service 4640 * That binding can be instantiated in one of two different ways using this API
3820 * account that will be allowed to act on behalf of the enterprise, which will 4641 * as follows:
3821 * be required for access to the enterprise's data through this API. Only one
3822 * call of setAccount is allowed for a given enterprise; the only way to change
3823 * the account later is to unenroll the enterprise and enroll it again
3824 * (obtaining a new token).
3825 * 4642 *
3826 * The EMM can unenroll an enterprise in order to sever the binding between
3827 * them. Re-enrolling an enterprise is possible, but requires a new token to be
3828 * retrieved. Enterprises.unenroll requires the EMM's credentials (as enroll
3829 * does), not the enterprise's. Enterprises.unenroll can only be used for
3830 * enterprises that were previously enrolled with the enroll call. Any
3831 * enterprises that were enrolled using the (deprecated) Enterprises.insert call
3832 * must be unenrolled with Enterprises.delete and can then be re-enrolled using
3833 * the Enterprises.enroll call.
3834 * 4643 *
3835 * The ID for an enterprise is an opaque string. It is returned by insert and 4644 *
3836 * enroll and can also be retrieved if the enterprise's primary domain is known 4645 * - For Google managed domain customers, the process involves using
3837 * using the list method. 4646 * Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts
4647 * obtained from the Admin console and the Google Developers console) and
4648 * submitted to the EMM through a more-or-less manual process.
4649 *
4650 *
4651 * - An alternative process that takes advantage of Google-provided mechanisms
4652 * (Android for Work Sign-up UI) that expedite the process involves
4653 * Enterprises.generateSignupUrl, Enterprises.completeSignup,
4654 * Enterprises.getServiceAccount (optional), and Enterprises.setAccount.
4655 *
4656 *
4657 * The overall processes are very different and involve different identity
4658 * models, but as an EMM, you can support either or both approaches in your EMM
4659 * console. See EMM Developer's Guide for details.
3838 */ 4660 */
3839 class Enterprise { 4661 class Enterprise {
4662 /**
4663 * Administrators of the enterprise. This is only supported for enterprises
4664 * created via the EMM-initiated flow.
4665 */
4666 core.List<Administrator> administrator;
3840 /** The unique ID for the enterprise. */ 4667 /** The unique ID for the enterprise. */
3841 core.String id; 4668 core.String id;
3842 /** 4669 /**
3843 * Identifies what kind of resource this is. Value: the fixed string 4670 * Identifies what kind of resource this is. Value: the fixed string
3844 * "androidenterprise#enterprise". 4671 * "androidenterprise#enterprise".
3845 */ 4672 */
3846 core.String kind; 4673 core.String kind;
3847 /** The name of the enterprise, e.g. "Example Inc". */ 4674 /** The name of the enterprise, e.g. "Example Inc". */
3848 core.String name; 4675 core.String name;
3849 /** The enterprise's primary domain, e.g. "example.com". */ 4676 /** The enterprise's primary domain, e.g. "example.com". */
3850 core.String primaryDomain; 4677 core.String primaryDomain;
3851 4678
3852 Enterprise(); 4679 Enterprise();
3853 4680
3854 Enterprise.fromJson(core.Map _json) { 4681 Enterprise.fromJson(core.Map _json) {
4682 if (_json.containsKey("administrator")) {
4683 administrator = _json["administrator"].map((value) => new Administrator.fr omJson(value)).toList();
4684 }
3855 if (_json.containsKey("id")) { 4685 if (_json.containsKey("id")) {
3856 id = _json["id"]; 4686 id = _json["id"];
3857 } 4687 }
3858 if (_json.containsKey("kind")) { 4688 if (_json.containsKey("kind")) {
3859 kind = _json["kind"]; 4689 kind = _json["kind"];
3860 } 4690 }
3861 if (_json.containsKey("name")) { 4691 if (_json.containsKey("name")) {
3862 name = _json["name"]; 4692 name = _json["name"];
3863 } 4693 }
3864 if (_json.containsKey("primaryDomain")) { 4694 if (_json.containsKey("primaryDomain")) {
3865 primaryDomain = _json["primaryDomain"]; 4695 primaryDomain = _json["primaryDomain"];
3866 } 4696 }
3867 } 4697 }
3868 4698
3869 core.Map toJson() { 4699 core.Map toJson() {
3870 var _json = new core.Map(); 4700 var _json = new core.Map();
4701 if (administrator != null) {
4702 _json["administrator"] = administrator.map((value) => (value).toJson()).to List();
4703 }
3871 if (id != null) { 4704 if (id != null) {
3872 _json["id"] = id; 4705 _json["id"] = id;
3873 } 4706 }
3874 if (kind != null) { 4707 if (kind != null) {
3875 _json["kind"] = kind; 4708 _json["kind"] = kind;
3876 } 4709 }
3877 if (name != null) { 4710 if (name != null) {
3878 _json["name"] = name; 4711 _json["name"] = name;
3879 } 4712 }
3880 if (primaryDomain != null) { 4713 if (primaryDomain != null) {
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 if (productId != null) { 5182 if (productId != null) {
4350 _json["productId"] = productId; 5183 _json["productId"] = productId;
4351 } 5184 }
4352 if (versionCode != null) { 5185 if (versionCode != null) {
4353 _json["versionCode"] = versionCode; 5186 _json["versionCode"] = versionCode;
4354 } 5187 }
4355 return _json; 5188 return _json;
4356 } 5189 }
4357 } 5190 }
4358 5191
5192 /** An event generated when an app installation failed on a device */
5193 class InstallFailureEvent {
5194 /** The Android ID of the device. This field will always be present. */
5195 core.String deviceId;
5196 /** Additional details on the failure if applicable. */
5197 core.String failureDetails;
5198 /**
5199 * The reason for the installation failure. This field will always be present.
5200 */
5201 core.String failureReason;
5202 /**
5203 * The id of the product (e.g. "app:com.google.android.gm") for which the
5204 * install failure event occured. This field will always be present.
5205 */
5206 core.String productId;
5207 /** The ID of the user. This field will always be present. */
5208 core.String userId;
5209
5210 InstallFailureEvent();
5211
5212 InstallFailureEvent.fromJson(core.Map _json) {
5213 if (_json.containsKey("deviceId")) {
5214 deviceId = _json["deviceId"];
5215 }
5216 if (_json.containsKey("failureDetails")) {
5217 failureDetails = _json["failureDetails"];
5218 }
5219 if (_json.containsKey("failureReason")) {
5220 failureReason = _json["failureReason"];
5221 }
5222 if (_json.containsKey("productId")) {
5223 productId = _json["productId"];
5224 }
5225 if (_json.containsKey("userId")) {
5226 userId = _json["userId"];
5227 }
5228 }
5229
5230 core.Map toJson() {
5231 var _json = new core.Map();
5232 if (deviceId != null) {
5233 _json["deviceId"] = deviceId;
5234 }
5235 if (failureDetails != null) {
5236 _json["failureDetails"] = failureDetails;
5237 }
5238 if (failureReason != null) {
5239 _json["failureReason"] = failureReason;
5240 }
5241 if (productId != null) {
5242 _json["productId"] = productId;
5243 }
5244 if (userId != null) {
5245 _json["userId"] = userId;
5246 }
5247 return _json;
5248 }
5249 }
5250
4359 /** The install resources for the device. */ 5251 /** The install resources for the device. */
4360 class InstallsListResponse { 5252 class InstallsListResponse {
4361 /** 5253 /**
4362 * An installation of an app for a user on a specific device. The existence of 5254 * An installation of an app for a user on a specific device. The existence of
4363 * an install implies that the user must have an entitlement to the app. 5255 * an install implies that the user must have an entitlement to the app.
4364 */ 5256 */
4365 core.List<Install> install; 5257 core.List<Install> install;
4366 /** 5258 /**
4367 * Identifies what kind of resource this is. Value: the fixed string 5259 * Identifies what kind of resource this is. Value: the fixed string
4368 * "androidenterprise#installsListResponse". 5260 * "androidenterprise#installsListResponse".
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
4413 core.Map toJson() { 5305 core.Map toJson() {
4414 var _json = new core.Map(); 5306 var _json = new core.Map();
4415 if (locale != null) { 5307 if (locale != null) {
4416 _json["locale"] = locale; 5308 _json["locale"] = locale;
4417 } 5309 }
4418 if (text != null) { 5310 if (text != null) {
4419 _json["text"] = text; 5311 _json["text"] = text;
4420 } 5312 }
4421 return _json; 5313 return _json;
4422 } 5314 }
5315 }
5316
5317 /** An event generated when new permissions are added to an app. */
5318 class NewPermissionsEvent {
5319 /**
5320 * The set of permissions that the enterprise admin has already approved for
5321 * this application. Use Permissions.Get on the EMM API to retrieve details
5322 * about these permissions.
5323 */
5324 core.List<core.String> approvedPermissions;
5325 /**
5326 * The id of the product (e.g. "app:com.google.android.gm") for which new
5327 * permissions were added. This field will always be present.
5328 */
5329 core.String productId;
5330 /**
5331 * The set of permissions that the app is currently requesting. Use
5332 * Permissions.Get on the EMM API to retrieve details about these permissions.
5333 */
5334 core.List<core.String> requestedPermissions;
5335
5336 NewPermissionsEvent();
5337
5338 NewPermissionsEvent.fromJson(core.Map _json) {
5339 if (_json.containsKey("approvedPermissions")) {
5340 approvedPermissions = _json["approvedPermissions"];
5341 }
5342 if (_json.containsKey("productId")) {
5343 productId = _json["productId"];
5344 }
5345 if (_json.containsKey("requestedPermissions")) {
5346 requestedPermissions = _json["requestedPermissions"];
5347 }
5348 }
5349
5350 core.Map toJson() {
5351 var _json = new core.Map();
5352 if (approvedPermissions != null) {
5353 _json["approvedPermissions"] = approvedPermissions;
5354 }
5355 if (productId != null) {
5356 _json["productId"] = productId;
5357 }
5358 if (requestedPermissions != null) {
5359 _json["requestedPermissions"] = requestedPermissions;
5360 }
5361 return _json;
5362 }
5363 }
5364
5365 /** A notification of one event relating to an enterprise. */
5366 class Notification {
5367 /** Notifications about new app restrictions schema changes. */
5368 AppRestrictionsSchemaChangeEvent appRestrictionsSchemaChangeEvent;
5369 /** Notifications about app updates. */
5370 AppUpdateEvent appUpdateEvent;
5371 /**
5372 * The ID of the enterprise for which the notification is sent. This will
5373 * always be present.
5374 */
5375 core.String enterpriseId;
5376 /** Notifications about an app installation failure. */
5377 InstallFailureEvent installFailureEvent;
5378 /** Notifications about new app permissions. */
5379 NewPermissionsEvent newPermissionsEvent;
5380 /** Notifications about changes to a product's approval status. */
5381 ProductApprovalEvent productApprovalEvent;
5382 /** Notifications about product availability changes. */
5383 ProductAvailabilityChangeEvent productAvailabilityChangeEvent;
5384 /**
5385 * The time when the notification was published in milliseconds since
5386 * 1970-01-01T00:00:00Z. This will always be present.
5387 */
5388 core.String timestampMillis;
5389
5390 Notification();
5391
5392 Notification.fromJson(core.Map _json) {
5393 if (_json.containsKey("appRestrictionsSchemaChangeEvent")) {
5394 appRestrictionsSchemaChangeEvent = new AppRestrictionsSchemaChangeEvent.fr omJson(_json["appRestrictionsSchemaChangeEvent"]);
5395 }
5396 if (_json.containsKey("appUpdateEvent")) {
5397 appUpdateEvent = new AppUpdateEvent.fromJson(_json["appUpdateEvent"]);
5398 }
5399 if (_json.containsKey("enterpriseId")) {
5400 enterpriseId = _json["enterpriseId"];
5401 }
5402 if (_json.containsKey("installFailureEvent")) {
5403 installFailureEvent = new InstallFailureEvent.fromJson(_json["installFailu reEvent"]);
5404 }
5405 if (_json.containsKey("newPermissionsEvent")) {
5406 newPermissionsEvent = new NewPermissionsEvent.fromJson(_json["newPermissio nsEvent"]);
5407 }
5408 if (_json.containsKey("productApprovalEvent")) {
5409 productApprovalEvent = new ProductApprovalEvent.fromJson(_json["productApp rovalEvent"]);
5410 }
5411 if (_json.containsKey("productAvailabilityChangeEvent")) {
5412 productAvailabilityChangeEvent = new ProductAvailabilityChangeEvent.fromJs on(_json["productAvailabilityChangeEvent"]);
5413 }
5414 if (_json.containsKey("timestampMillis")) {
5415 timestampMillis = _json["timestampMillis"];
5416 }
5417 }
5418
5419 core.Map toJson() {
5420 var _json = new core.Map();
5421 if (appRestrictionsSchemaChangeEvent != null) {
5422 _json["appRestrictionsSchemaChangeEvent"] = (appRestrictionsSchemaChangeEv ent).toJson();
5423 }
5424 if (appUpdateEvent != null) {
5425 _json["appUpdateEvent"] = (appUpdateEvent).toJson();
5426 }
5427 if (enterpriseId != null) {
5428 _json["enterpriseId"] = enterpriseId;
5429 }
5430 if (installFailureEvent != null) {
5431 _json["installFailureEvent"] = (installFailureEvent).toJson();
5432 }
5433 if (newPermissionsEvent != null) {
5434 _json["newPermissionsEvent"] = (newPermissionsEvent).toJson();
5435 }
5436 if (productApprovalEvent != null) {
5437 _json["productApprovalEvent"] = (productApprovalEvent).toJson();
5438 }
5439 if (productAvailabilityChangeEvent != null) {
5440 _json["productAvailabilityChangeEvent"] = (productAvailabilityChangeEvent) .toJson();
5441 }
5442 if (timestampMillis != null) {
5443 _json["timestampMillis"] = timestampMillis;
5444 }
5445 return _json;
5446 }
5447 }
5448
5449 /**
5450 * A resource returned by the PullNotificationSet API, which contains a
5451 * collection of notifications for enterprises associated with the service
5452 * account authenticated for the request.
5453 */
5454 class NotificationSet {
5455 /**
5456 * Identifies what kind of resource this is. Value: the fixed string
5457 * "androidenterprise#notificationSet".
5458 */
5459 core.String kind;
5460 /** The notifications received, or empty if no notifications are present. */
5461 core.List<Notification> notification;
5462 /**
5463 * The notification set ID, required to mark the notification as received with
5464 * the Enterprises.AcknowledgeNotification API. This will be omitted if no
5465 * notifications are present.
5466 */
5467 core.String notificationSetId;
5468
5469 NotificationSet();
5470
5471 NotificationSet.fromJson(core.Map _json) {
5472 if (_json.containsKey("kind")) {
5473 kind = _json["kind"];
5474 }
5475 if (_json.containsKey("notification")) {
5476 notification = _json["notification"].map((value) => new Notification.fromJ son(value)).toList();
5477 }
5478 if (_json.containsKey("notificationSetId")) {
5479 notificationSetId = _json["notificationSetId"];
5480 }
5481 }
5482
5483 core.Map toJson() {
5484 var _json = new core.Map();
5485 if (kind != null) {
5486 _json["kind"] = kind;
5487 }
5488 if (notification != null) {
5489 _json["notification"] = notification.map((value) => (value).toJson()).toLi st();
5490 }
5491 if (notificationSetId != null) {
5492 _json["notificationSetId"] = notificationSetId;
5493 }
5494 return _json;
5495 }
4423 } 5496 }
4424 5497
4425 class PageInfo { 5498 class PageInfo {
4426 core.int resultPerPage; 5499 core.int resultPerPage;
4427 core.int startIndex; 5500 core.int startIndex;
4428 core.int totalResults; 5501 core.int totalResults;
4429 5502
4430 PageInfo(); 5503 PageInfo();
4431 5504
4432 PageInfo.fromJson(core.Map _json) { 5505 PageInfo.fromJson(core.Map _json) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
4511 _json["name"] = name; 5584 _json["name"] = name;
4512 } 5585 }
4513 if (permissionId != null) { 5586 if (permissionId != null) {
4514 _json["permissionId"] = permissionId; 5587 _json["permissionId"] = permissionId;
4515 } 5588 }
4516 return _json; 5589 return _json;
4517 } 5590 }
4518 } 5591 }
4519 5592
4520 /** 5593 /**
4521 * A product represents an app in the Google Play Store that is available to at 5594 * A Products resource represents an app in the Google Play Store that is
4522 * least some users in the enterprise. (Some apps are restricted to a single 5595 * available to at least some users in the enterprise. (Some apps are restricted
4523 * enterprise, and no information about them is made available outside that 5596 * to a single enterprise, and no information about them is made available
4524 * enterprise.) 5597 * outside that enterprise.)
4525 * 5598 *
4526 * The information provided for each product (localized name, icon, link to the 5599 * The information provided for each product (localized name, icon, link to the
4527 * full Google Play details page) is intended to allow a basic representation of 5600 * full Google Play details page) is intended to allow a basic representation of
4528 * the product within an EMM user interface. 5601 * the product within an EMM user interface.
4529 */ 5602 */
4530 class Product { 5603 class Product {
4531 /** 5604 /**
4532 * App versions currently available for this product. The returned list 5605 * App versions currently available for this product. The returned list
4533 * contains only public versions. Alpha and beta versions are not included. 5606 * contains only public versions. Alpha and beta versions are not included.
4534 */ 5607 */
(...skipping 19 matching lines...) Expand all
4554 /** 5627 /**
4555 * Identifies what kind of resource this is. Value: the fixed string 5628 * Identifies what kind of resource this is. Value: the fixed string
4556 * "androidenterprise#product". 5629 * "androidenterprise#product".
4557 */ 5630 */
4558 core.String kind; 5631 core.String kind;
4559 /** 5632 /**
4560 * A string of the form app:<package name>. For example, 5633 * A string of the form app:<package name>. For example,
4561 * app:com.google.android.gm represents the Gmail app. 5634 * app:com.google.android.gm represents the Gmail app.
4562 */ 5635 */
4563 core.String productId; 5636 core.String productId;
4564 /** Whether this product is free, free with in-app purchases, or paid. */ 5637 /**
5638 * Whether this product is free, free with in-app purchases, or paid. If the
5639 * pricing is unknown, this means the product is not generally available
5640 * anymore (even though it might still be available to people who own it).
5641 */
4565 core.String productPricing; 5642 core.String productPricing;
4566 /** 5643 /**
4567 * Whether this app can only be installed on devices using the Android for 5644 * Whether this app can only be installed on devices using the Android for
4568 * Work container app. 5645 * Work container app.
4569 */ 5646 */
4570 core.bool requiresContainerApp; 5647 core.bool requiresContainerApp;
4571 /** 5648 /**
4572 * A link to a smaller image that can be used as an icon for the product. This 5649 * A link to a smaller image that can be used as an icon for the product. This
4573 * image is suitable for use at up to 128px x 128px. 5650 * image is suitable for use at up to 128px x 128px.
4574 */ 5651 */
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
4657 if (title != null) { 5734 if (title != null) {
4658 _json["title"] = title; 5735 _json["title"] = title;
4659 } 5736 }
4660 if (workDetailsUrl != null) { 5737 if (workDetailsUrl != null) {
4661 _json["workDetailsUrl"] = workDetailsUrl; 5738 _json["workDetailsUrl"] = workDetailsUrl;
4662 } 5739 }
4663 return _json; 5740 return _json;
4664 } 5741 }
4665 } 5742 }
4666 5743
5744 /** An event generated when a product's approval status is changed. */
5745 class ProductApprovalEvent {
5746 /**
5747 * Whether the product was approved or unapproved. This field will always be
5748 * present.
5749 */
5750 core.String approved;
5751 /**
5752 * The id of the product (e.g. "app:com.google.android.gm") for which the
5753 * approval status has changed. This field will always be present.
5754 */
5755 core.String productId;
5756
5757 ProductApprovalEvent();
5758
5759 ProductApprovalEvent.fromJson(core.Map _json) {
5760 if (_json.containsKey("approved")) {
5761 approved = _json["approved"];
5762 }
5763 if (_json.containsKey("productId")) {
5764 productId = _json["productId"];
5765 }
5766 }
5767
5768 core.Map toJson() {
5769 var _json = new core.Map();
5770 if (approved != null) {
5771 _json["approved"] = approved;
5772 }
5773 if (productId != null) {
5774 _json["productId"] = productId;
5775 }
5776 return _json;
5777 }
5778 }
5779
5780 /** An event generated whenever a product's availability changes. */
5781 class ProductAvailabilityChangeEvent {
5782 /** The new state of the product. This field will always be present. */
5783 core.String availabilityStatus;
5784 /**
5785 * The id of the product (e.g. "app:com.google.android.gm") for which the
5786 * product availability changed. This field will always be present.
5787 */
5788 core.String productId;
5789
5790 ProductAvailabilityChangeEvent();
5791
5792 ProductAvailabilityChangeEvent.fromJson(core.Map _json) {
5793 if (_json.containsKey("availabilityStatus")) {
5794 availabilityStatus = _json["availabilityStatus"];
5795 }
5796 if (_json.containsKey("productId")) {
5797 productId = _json["productId"];
5798 }
5799 }
5800
5801 core.Map toJson() {
5802 var _json = new core.Map();
5803 if (availabilityStatus != null) {
5804 _json["availabilityStatus"] = availabilityStatus;
5805 }
5806 if (productId != null) {
5807 _json["productId"] = productId;
5808 }
5809 return _json;
5810 }
5811 }
5812
4667 /** 5813 /**
4668 * A product permissions resource represents the set of permissions required by 5814 * A product permissions resource represents the set of permissions required by
4669 * a specific app and whether or not they have been accepted by an enterprise 5815 * a specific app and whether or not they have been accepted by an enterprise
4670 * admin. 5816 * admin.
4671 * 5817 *
4672 * The API can be used to read the set of permissions, and also to update the 5818 * The API can be used to read the set of permissions, and also to update the
4673 * set to indicate that permissions have been accepted. 5819 * set to indicate that permissions have been accepted.
4674 */ 5820 */
4675 class ProductPermission { 5821 class ProductPermission {
4676 /** An opaque string uniquely identifying the permission. */ 5822 /** An opaque string uniquely identifying the permission. */
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
4884 _json["product"] = product.map((value) => (value).toJson()).toList(); 6030 _json["product"] = product.map((value) => (value).toJson()).toList();
4885 } 6031 }
4886 if (tokenPagination != null) { 6032 if (tokenPagination != null) {
4887 _json["tokenPagination"] = (tokenPagination).toJson(); 6033 _json["tokenPagination"] = (tokenPagination).toJson();
4888 } 6034 }
4889 return _json; 6035 return _json;
4890 } 6036 }
4891 } 6037 }
4892 6038
4893 /** 6039 /**
6040 * A service account identity, including the name and credentials that can be
6041 * used to authenticate as the service account.
6042 */
6043 class ServiceAccount {
6044 /** Credentials that can be used to authenticate as this ServiceAccount. */
6045 ServiceAccountKey key;
6046 /**
6047 * Identifies what kind of resource this is. Value: the fixed string
6048 * "androidenterprise#serviceAccount".
6049 */
6050 core.String kind;
6051 /**
6052 * The account name of the service account, in the form of an email address.
6053 * Assigned by the server.
6054 */
6055 core.String name;
6056
6057 ServiceAccount();
6058
6059 ServiceAccount.fromJson(core.Map _json) {
6060 if (_json.containsKey("key")) {
6061 key = new ServiceAccountKey.fromJson(_json["key"]);
6062 }
6063 if (_json.containsKey("kind")) {
6064 kind = _json["kind"];
6065 }
6066 if (_json.containsKey("name")) {
6067 name = _json["name"];
6068 }
6069 }
6070
6071 core.Map toJson() {
6072 var _json = new core.Map();
6073 if (key != null) {
6074 _json["key"] = (key).toJson();
6075 }
6076 if (kind != null) {
6077 _json["kind"] = kind;
6078 }
6079 if (name != null) {
6080 _json["name"] = name;
6081 }
6082 return _json;
6083 }
6084 }
6085
6086 /** Credentials that can be used to authenticate as a service account. */
6087 class ServiceAccountKey {
6088 /**
6089 * The body of the private key credentials file, in string format. This is
6090 * only populated when the ServiceAccountKey is created, and is not stored by
6091 * Google.
6092 */
6093 core.String data;
6094 /**
6095 * An opaque, unique identifier for this ServiceAccountKey. Assigned by the
6096 * server.
6097 */
6098 core.String id;
6099 /**
6100 * Identifies what kind of resource this is. Value: the fixed string
6101 * "androidenterprise#serviceAccountKey".
6102 */
6103 core.String kind;
6104 /** The file format of the generated key data. */
6105 core.String type;
6106
6107 ServiceAccountKey();
6108
6109 ServiceAccountKey.fromJson(core.Map _json) {
6110 if (_json.containsKey("data")) {
6111 data = _json["data"];
6112 }
6113 if (_json.containsKey("id")) {
6114 id = _json["id"];
6115 }
6116 if (_json.containsKey("kind")) {
6117 kind = _json["kind"];
6118 }
6119 if (_json.containsKey("type")) {
6120 type = _json["type"];
6121 }
6122 }
6123
6124 core.Map toJson() {
6125 var _json = new core.Map();
6126 if (data != null) {
6127 _json["data"] = data;
6128 }
6129 if (id != null) {
6130 _json["id"] = id;
6131 }
6132 if (kind != null) {
6133 _json["kind"] = kind;
6134 }
6135 if (type != null) {
6136 _json["type"] = type;
6137 }
6138 return _json;
6139 }
6140 }
6141
6142 class ServiceAccountKeysListResponse {
6143 /** The service account credentials. */
6144 core.List<ServiceAccountKey> serviceAccountKey;
6145
6146 ServiceAccountKeysListResponse();
6147
6148 ServiceAccountKeysListResponse.fromJson(core.Map _json) {
6149 if (_json.containsKey("serviceAccountKey")) {
6150 serviceAccountKey = _json["serviceAccountKey"].map((value) => new ServiceA ccountKey.fromJson(value)).toList();
6151 }
6152 }
6153
6154 core.Map toJson() {
6155 var _json = new core.Map();
6156 if (serviceAccountKey != null) {
6157 _json["serviceAccountKey"] = serviceAccountKey.map((value) => (value).toJs on()).toList();
6158 }
6159 return _json;
6160 }
6161 }
6162
6163 /**
6164 * A resource returned by the GenerateSignupUrl API, which contains the Signup
6165 * URL and Completion Token.
6166 */
6167 class SignupInfo {
6168 /**
6169 * An opaque token that will be required, along with the Enterprise Token, for
6170 * obtaining the enterprise resource from CompleteSignup.
6171 */
6172 core.String completionToken;
6173 /**
6174 * Identifies what kind of resource this is. Value: the fixed string
6175 * "androidenterprise#signupInfo".
6176 */
6177 core.String kind;
6178 /**
6179 * A URL under which the Admin can sign up for an enterprise. The page pointed
6180 * to cannot be rendered in an iframe.
6181 */
6182 core.String url;
6183
6184 SignupInfo();
6185
6186 SignupInfo.fromJson(core.Map _json) {
6187 if (_json.containsKey("completionToken")) {
6188 completionToken = _json["completionToken"];
6189 }
6190 if (_json.containsKey("kind")) {
6191 kind = _json["kind"];
6192 }
6193 if (_json.containsKey("url")) {
6194 url = _json["url"];
6195 }
6196 }
6197
6198 core.Map toJson() {
6199 var _json = new core.Map();
6200 if (completionToken != null) {
6201 _json["completionToken"] = completionToken;
6202 }
6203 if (kind != null) {
6204 _json["kind"] = kind;
6205 }
6206 if (url != null) {
6207 _json["url"] = url;
6208 }
6209 return _json;
6210 }
6211 }
6212
6213 /**
4894 * Definition of a Google Play for Work store cluster, a list of products 6214 * Definition of a Google Play for Work store cluster, a list of products
4895 * displayed as part of a store page. 6215 * displayed as part of a store page.
4896 */ 6216 */
4897 class StoreCluster { 6217 class StoreCluster {
4898 /** 6218 /**
4899 * Unique ID of this cluster. Assigned by the server. Immutable once assigned. 6219 * Unique ID of this cluster. Assigned by the server. Immutable once assigned.
4900 */ 6220 */
4901 core.String id; 6221 core.String id;
4902 /** 6222 /**
4903 * Identifies what kind of resource this is. Value: the fixed string 6223 * Identifies what kind of resource this is. Value: the fixed string
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
5167 _json["nextPageToken"] = nextPageToken; 6487 _json["nextPageToken"] = nextPageToken;
5168 } 6488 }
5169 if (previousPageToken != null) { 6489 if (previousPageToken != null) {
5170 _json["previousPageToken"] = previousPageToken; 6490 _json["previousPageToken"] = previousPageToken;
5171 } 6491 }
5172 return _json; 6492 return _json;
5173 } 6493 }
5174 } 6494 }
5175 6495
5176 /** 6496 /**
5177 * A user resource represents an individual user within the enterprise's domain. 6497 * A Users resource represents an account associated with an enterprise. The
6498 * account may be specific to a device or to an individual user (who can then
6499 * use the account across multiple devices). The account may provide access to
6500 * Google Play for Work only, or to other Google services, depending on the
6501 * identity model used:
6502 * - Google managed domain identity model requires synchronization to Google
6503 * account sources (via primaryEmail).
5178 * 6504 *
5179 * Note that each user is associated with a Google account based on the user's
5180 * corporate email address (which must be in one of the enterprise's domains).
5181 * As part of installing the EMM's DPC app to manage a device the Google account
5182 * must be provisioned to the device, and so the user resource must be created
5183 * before that. This can be done using the Google Admin SDK Directory API.
5184 * 6505 *
5185 * The ID for a user is an opaque string. It can be retrieved using the list 6506 * - Android for Work accounts identity model provides a dynamic means for
5186 * method queried by the user's primary email address. 6507 * enterprises to create user or device accounts as needed. These accounts
6508 * provide access to Google Play for Work only.
5187 */ 6509 */
5188 class User { 6510 class User {
6511 /**
6512 * The id as used by the EMM for this user, e.g. "user342" or "asset#44418".
6513 * Will always be set for EMM managed users and not set for Google managed
6514 * users. For privacy sensitive deployments it should not be possible to
6515 * identify the individual with this identifier.
6516 */
6517 core.String accountIdentifier;
6518 /**
6519 * The type of account that this user represents. A "deviceAccount" is
6520 * specific to a single device while a "userAccount" represents a traditional
6521 * user account, i.e. one that can be installed on multiple devices.
6522 * "googleManaged" users will always be a "userAccount" but "emmManaged" users
6523 * can be either a "userAccount" or a "deviceAccount".
6524 */
6525 core.String accountType;
6526 /**
6527 * The user's name as it is to be presented in user interfaces, e.g. "John".
6528 * Can optionally be set for EMM managed users and will not be set for Google
6529 * managed users. For privacy sensitive deployments this should be left unset
6530 * or set to something generic.
6531 */
6532 core.String displayName;
5189 /** The unique ID for the user. */ 6533 /** The unique ID for the user. */
5190 core.String id; 6534 core.String id;
5191 /** 6535 /**
5192 * Identifies what kind of resource this is. Value: the fixed string 6536 * Identifies what kind of resource this is. Value: the fixed string
5193 * "androidenterprise#user". 6537 * "androidenterprise#user".
5194 */ 6538 */
5195 core.String kind; 6539 core.String kind;
5196 /** The user's primary email address, e.g. "jsmith@example.com". */ 6540 /**
6541 * The entity that manages the user. With "googleManaged" users, the source of
6542 * truth is Google so EMMs have to make sure a Google account exists for the
6543 * user. With "emmManaged" users, the EMM is in charge.
6544 */
6545 core.String managementType;
6546 /**
6547 * The user's primary email address, for example, "jsmith@example.com". Will
6548 * always be set for Google managed users and not set for EMM managed users.
6549 */
5197 core.String primaryEmail; 6550 core.String primaryEmail;
5198 6551
5199 User(); 6552 User();
5200 6553
5201 User.fromJson(core.Map _json) { 6554 User.fromJson(core.Map _json) {
6555 if (_json.containsKey("accountIdentifier")) {
6556 accountIdentifier = _json["accountIdentifier"];
6557 }
6558 if (_json.containsKey("accountType")) {
6559 accountType = _json["accountType"];
6560 }
6561 if (_json.containsKey("displayName")) {
6562 displayName = _json["displayName"];
6563 }
5202 if (_json.containsKey("id")) { 6564 if (_json.containsKey("id")) {
5203 id = _json["id"]; 6565 id = _json["id"];
5204 } 6566 }
5205 if (_json.containsKey("kind")) { 6567 if (_json.containsKey("kind")) {
5206 kind = _json["kind"]; 6568 kind = _json["kind"];
5207 } 6569 }
6570 if (_json.containsKey("managementType")) {
6571 managementType = _json["managementType"];
6572 }
5208 if (_json.containsKey("primaryEmail")) { 6573 if (_json.containsKey("primaryEmail")) {
5209 primaryEmail = _json["primaryEmail"]; 6574 primaryEmail = _json["primaryEmail"];
5210 } 6575 }
5211 } 6576 }
5212 6577
5213 core.Map toJson() { 6578 core.Map toJson() {
5214 var _json = new core.Map(); 6579 var _json = new core.Map();
6580 if (accountIdentifier != null) {
6581 _json["accountIdentifier"] = accountIdentifier;
6582 }
6583 if (accountType != null) {
6584 _json["accountType"] = accountType;
6585 }
6586 if (displayName != null) {
6587 _json["displayName"] = displayName;
6588 }
5215 if (id != null) { 6589 if (id != null) {
5216 _json["id"] = id; 6590 _json["id"] = id;
5217 } 6591 }
5218 if (kind != null) { 6592 if (kind != null) {
5219 _json["kind"] = kind; 6593 _json["kind"] = kind;
5220 } 6594 }
6595 if (managementType != null) {
6596 _json["managementType"] = managementType;
6597 }
5221 if (primaryEmail != null) { 6598 if (primaryEmail != null) {
5222 _json["primaryEmail"] = primaryEmail; 6599 _json["primaryEmail"] = primaryEmail;
5223 } 6600 }
5224 return _json; 6601 return _json;
5225 } 6602 }
5226 } 6603 }
5227 6604
5228 /** 6605 /**
5229 * A UserToken is used by a user when setting up a managed device or profile 6606 * A UserToken is used by a user when setting up a managed device or profile
5230 * with their work account on a device. When the user enters their email address 6607 * with their work account on a device. When the user enters their email address
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
5299 var _json = new core.Map(); 6676 var _json = new core.Map();
5300 if (kind != null) { 6677 if (kind != null) {
5301 _json["kind"] = kind; 6678 _json["kind"] = kind;
5302 } 6679 }
5303 if (user != null) { 6680 if (user != null) {
5304 _json["user"] = user.map((value) => (value).toJson()).toList(); 6681 _json["user"] = user.map((value) => (value).toJson()).toList();
5305 } 6682 }
5306 return _json; 6683 return _json;
5307 } 6684 }
5308 } 6685 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/analyticsreporting/v4.dart ('k') | generated/googleapis/lib/appengine/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698