on develop help sign in
Regenerating gogol-android-enterprise from latest service definition
commitd9ab01ba536758160168c5125a119c4123aae6b6 authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 25 Oct 2016, 11:37 (10 years ago) parent8b9e099
39 files changed+6418−203
gen/model/androidenterprise/v1/androidenterprise-api.json+1372−83 gogol-android-enterprise/gen/Network/Google/AndroidEnterprise.hs+282 gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types.hs+157 gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs+1519−83 gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Sum.hs+60 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/GetState.hs+10−10 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/SetState.hs+10−10 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/AcknowledgeNotificationSet.hs+95 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/CompleteSignup.hs+105 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/CreateWebToken.hs+109 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GenerateSignupURL.hs+95 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GetServiceAccount.hs+123 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GetStoreLayout.hs+6−2 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/List.hs+10−2 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/PullNotificationSet.hs+125 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/SetStoreLayout.hs+2−2 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Delete.hs+136 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Get.hs+135 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/List.hs+122 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Patch.hs+151 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Update.hs+151 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Delete.hs+121 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Get.hs+123 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/List.hs+107 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Patch.hs+136 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Update.hs+136 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/GetAppRestrictionsSchema.hs+12−6 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/List.hs+6−3 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/UnApprove.hs+103 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/Delete.hs+107 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/Insert.hs+109 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/List.hs+98 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Delete.hs+98 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/GenerateAuthenticationToken.hs+111 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Insert.hs+107 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/List.hs+8−2 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Patch.hs+119 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Update.hs+117 gogol-android-enterprise/gogol-android-enterprise.cabal+25
gen/model/androidenterprise/v1/androidenterprise-api.json+1372−83
@@ -1,12 +1,12 @@
11{
22 "kind": "discovery#restDescription",
3− "etag": "\"jQLIOHBVnDZie4rQHGH1WJF-INE/i6DBUMt-cLevFkAtIek_BVKzCR0\"",
3+ "etag": "\"C5oy1hgQsABtYOYIOXWcR3BgYqU/F0hyrz-8KleQbDmoIwAoxTX0SoE\"",
44 "discoveryVersion": "v1",
55 "id": "androidenterprise:v1",
66 "name": "androidenterprise",
77 "canonicalName": "Android Enterprise",
88 "version": "v1",
9− "revision": "20160511",
9+ "revision": "20161011",
1010 "title": "Google Play EMM API",
1111 "description": "Manages the deployment of apps to Android for Work users.",
1212 "ownerDomain": "google.com",
@@ -77,6 +77,56 @@
7777 }
7878 },
7979 "schemas": {
80+ "Administrator": {
81+ "id": "Administrator",
82+ "type": "object",
83+ "description": "This represents an enterprise administrator who can manage the enterprise in the Google Play for Work Store.",
84+ "properties": {
85+ "email": {
86+ "type": "string",
87+ "description": "The administrator's email address."
88+ }
89+ }
90+ },
91+ "AdministratorWebToken": {
92+ "id": "AdministratorWebToken",
93+ "type": "object",
94+ "description": "A token authorizing an administrator to access an iframe.",
95+ "properties": {
96+ "kind": {
97+ "type": "string",
98+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#administratorWebToken\".",
99+ "default": "androidenterprise#administratorWebToken"
100+ },
101+ "token": {
102+ "type": "string",
103+ "description": "An opaque token to be passed to the Play front-end to generate an iframe."
104+ }
105+ }
106+ },
107+ "AdministratorWebTokenSpec": {
108+ "id": "AdministratorWebTokenSpec",
109+ "type": "object",
110+ "description": "Specification for a token used to generate iframes. The token specifies what data the admin is allowed to modify and the URI the iframe is allowed to communiate with.",
111+ "properties": {
112+ "kind": {
113+ "type": "string",
114+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#administratorWebTokenSpec\".",
115+ "default": "androidenterprise#administratorWebTokenSpec"
116+ },
117+ "parent": {
118+ "type": "string",
119+ "description": "The URI of the parent frame hosting the iframe. To prevent XSS, the iframe may not be hosted at other URIs. This URI must be https."
120+ },
121+ "permission": {
122+ "type": "array",
123+ "description": "The list of permissions the admin is granted within the iframe. The admin will only be allowed to view an iframe if they have all of the permissions associated with it.",
124+ "items": {
125+ "type": "string"
126+ }
127+ }
128+ }
129+ },
80130 "AppRestrictionsSchema": {
81131 "id": "AppRestrictionsSchema",
82132 "type": "object",
@@ -96,6 +146,17 @@
96146 }
97147 }
98148 },
149+ "AppRestrictionsSchemaChangeEvent": {
150+ "id": "AppRestrictionsSchemaChangeEvent",
151+ "type": "object",
152+ "description": "An event generated when a new app version is uploaded to Google Play and its app restrictions schema changed. To fetch the app restrictions schema for an app, use Products.getAppRestrictionsSchema on the EMM API.",
153+ "properties": {
154+ "productId": {
155+ "type": "string",
156+ "description": "The id of the product (e.g. \"app:com.google.android.gm\") for which the app restriction schema changed. This field will always be present."
157+ }
158+ }
159+ },
99160 "AppRestrictionsSchemaRestriction": {
100161 "id": "AppRestrictionsSchemaRestriction",
101162 "type": "object",
@@ -103,7 +164,7 @@
103164 "properties": {
104165 "defaultValue": {
105166 "$ref": "AppRestrictionsSchemaRestrictionRestrictionValue",
106− "description": "The default value of the restriction."
167+ "description": "The default value of the restriction. bundle and bundleArray restrictions never have a default value."
107168 },
108169 "description": {
109170 "type": "string",
@@ -118,7 +179,7 @@
118179 },
119180 "entryValue": {
120181 "type": "array",
121− "description": "For choice or multiselect restrictions, the list of possible entries' machine-readable values.",
182+ "description": "For choice or multiselect restrictions, the list of possible entries' machine-readable values. These values should be used in the configuration, either as a single string value for a choice restriction or in a stringArray for a multiselect restriction.",
122183 "items": {
123184 "type": "string"
124185 }
@@ -127,6 +188,13 @@
127188 "type": "string",
128189 "description": "The unique key that the product uses to identify the restriction, e.g. \"com.google.android.gm.fieldname\"."
129190 },
191+ "nestedRestriction": {
192+ "type": "array",
193+ "description": "For bundle or bundleArray restrictions, the list of nested restrictions. A bundle restriction is always nested within a bundleArray restriction, and a bundleArray restriction is at most two levels deep.",
194+ "items": {
195+ "$ref": "AppRestrictionsSchemaRestriction"
196+ }
197+ },
130198 "restrictionType": {
131199 "type": "string",
132200 "description": "The type of the restriction."
@@ -168,6 +236,17 @@
168236 }
169237 }
170238 },
239+ "AppUpdateEvent": {
240+ "id": "AppUpdateEvent",
241+ "type": "object",
242+ "description": "An event generated when a new version of an app is uploaded to Google Play. Notifications are sent for new public versions only: alpha, beta, or canary versions do not generate this event. To fetch up-to-date version history for an app, use Products.Get on the EMM API.",
243+ "properties": {
244+ "productId": {
245+ "type": "string",
246+ "description": "The id of the product (e.g. \"app:com.google.android.gm\") that was updated. This field will always be present."
247+ }
248+ }
249+ },
171250 "AppVersion": {
172251 "id": "AppVersion",
173252 "type": "object",
@@ -200,6 +279,22 @@
200279 }
201280 }
202281 },
282+ "AuthenticationToken": {
283+ "id": "AuthenticationToken",
284+ "type": "object",
285+ "description": "An AuthenticationToken is used by the EMM's device policy client on a device to provision the given EMM-managed user on that device.",
286+ "properties": {
287+ "kind": {
288+ "type": "string",
289+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#authenticationToken\".",
290+ "default": "androidenterprise#authenticationToken"
291+ },
292+ "token": {
293+ "type": "string",
294+ "description": "The authentication token to be passed to the device policy client on the device where it can be used to provision the account for which this token was generated."
295+ }
296+ }
297+ },
203298 "Collection": {
204299 "id": "Collection",
205300 "type": "object",
@@ -297,7 +392,7 @@
297392 },
298393 "managementType": {
299394 "type": "string",
300− "description": "The mechanism by which this device is managed by the EMM. \"managedDevice\" means that the EMM's app is a device owner. \"managedProfile\" means that the EMM's app is the profile owner (and there is a separate personal profile which is not managed). \"containerApp\" means that the EMM's app is managing the Android for Work container app on the device. ?unmanagedProfile? means that the EMM?s app is managing a managed user on an unmanaged device"
395+ "description": "Identifies the extent to which the device is controlled by an Android for Work EMM in various deployment configurations.\n\nPossible values include: \n- \"managedDevice\", a device that has the EMM's device policy controller (DPC) as the device owner, \n- \"managedProfile\", a device that has a work profile managed by the DPC (DPC is profile owner) in addition to a separate, personal profile that is unavailable to the DPC, \n- \"containerApp\", a device running the Android for Work App. The Android for Work App is managed by the DPC, \n- \"unmanagedProfile\", a device that has been allowed (by the domain's admin, using the Admin Console to enable the privilege) to use Android for Work apps or Google Apps for Work, but the profile is itself not owned by a DPC."
301396 }
302397 }
303398 },
@@ -339,8 +434,15 @@
339434 "Enterprise": {
340435 "id": "Enterprise",
341436 "type": "object",
342− "description": "An enterprise resource represents a binding between an organization and their EMM.\n\nTo create an enterprise, an admin of the enterprise must first go through a Play for Work sign-up flow. At the end of this the admin will be presented with a token (a short opaque alphanumeric string). They must then present this to the EMM, who then supplies it to the enroll method. Until this is done the EMM will not have any access to the enterprise.\n\nAfter calling enroll the EMM should call setAccount to specify the service account that will be allowed to act on behalf of the enterprise, which will be required for access to the enterprise's data through this API. Only one call of setAccount is allowed for a given enterprise; the only way to change the account later is to unenroll the enterprise and enroll it again (obtaining a new token).\n\nThe EMM can unenroll an enterprise in order to sever the binding between them. Re-enrolling an enterprise is possible, but requires a new token to be retrieved. Enterprises.unenroll requires the EMM's credentials (as enroll does), not the enterprise's. Enterprises.unenroll can only be used for enterprises that were previously enrolled with the enroll call. Any enterprises that were enrolled using the (deprecated) Enterprises.insert call must be unenrolled with Enterprises.delete and can then be re-enrolled using the Enterprises.enroll call.\n\nThe ID for an enterprise is an opaque string. It is returned by insert and enroll and can also be retrieved if the enterprise's primary domain is known using the list method.",
437+ "description": "An Enterprises resource represents the binding between an EMM and a specific organization. That binding can be instantiated in one of two different ways using this API as follows: \n- For Google managed domain customers, the process involves using Enterprises.enroll and Enterprises.setAccount (in conjunction with artifacts obtained from the Admin console and the Google API Console) and submitted to the EMM through a more-or-less manual process. \n- For Android for Work Accounts customers, the process involves using Enterprises.generateSignupUrl and Enterprises.completeSignup in conjunction with the Android for Work Sign-up UI (Google-provided mechanism) to create the binding without manual steps. As an EMM, you can support either or both approaches in your EMM console. See Create an Enterprise for details.",
343438 "properties": {
439+ "administrator": {
440+ "type": "array",
441+ "description": "Administrators of the enterprise. This is only supported for enterprises created via the EMM-initiated flow.",
442+ "items": {
443+ "$ref": "Administrator"
444+ }
445+ },
344446 "id": {
345447 "type": "string",
346448 "description": "The unique ID for the enterprise."
@@ -352,11 +454,11 @@
352454 },
353455 "name": {
354456 "type": "string",
355− "description": "The name of the enterprise, e.g. \"Example Inc\"."
457+ "description": "The name of the enterprise, for example, \"Example, Inc\"."
356458 },
357459 "primaryDomain": {
358460 "type": "string",
359− "description": "The enterprise's primary domain, e.g. \"example.com\".",
461+ "description": "The enterprise's primary domain, such as \"example.com\".",
360462 "annotations": {
361463 "required": [
362464 "androidenterprise.enterprises.insert"
@@ -550,6 +652,33 @@
550652 }
551653 }
552654 },
655+ "InstallFailureEvent": {
656+ "id": "InstallFailureEvent",
657+ "type": "object",
658+ "description": "An event generated when an app installation failed on a device",
659+ "properties": {
660+ "deviceId": {
661+ "type": "string",
662+ "description": "The Android ID of the device. This field will always be present."
663+ },
664+ "failureDetails": {
665+ "type": "string",
666+ "description": "Additional details on the failure if applicable."
667+ },
668+ "failureReason": {
669+ "type": "string",
670+ "description": "The reason for the installation failure. This field will always be present."
671+ },
672+ "productId": {
673+ "type": "string",
674+ "description": "The id of the product (e.g. \"app:com.google.android.gm\") for which the install failure event occured. This field will always be present."
675+ },
676+ "userId": {
677+ "type": "string",
678+ "description": "The ID of the user. This field will always be present."
679+ }
680+ }
681+ },
553682 "InstallsListResponse": {
554683 "id": "InstallsListResponse",
555684 "type": "object",
@@ -584,6 +713,211 @@
584713 }
585714 }
586715 },
716+ "ManagedConfiguration": {
717+ "id": "ManagedConfiguration",
718+ "type": "object",
719+ "description": "A managed configuration resource contains the set of managed properties that have been configured for an Android app. The app's developer would have defined configurable properties in the managed configurations schema.",
720+ "properties": {
721+ "kind": {
722+ "type": "string",
723+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#managedConfiguration\".",
724+ "default": "androidenterprise#managedConfiguration"
725+ },
726+ "managedProperty": {
727+ "type": "array",
728+ "description": "The set of managed properties for this configuration.",
729+ "items": {
730+ "$ref": "ManagedProperty"
731+ }
732+ },
733+ "productId": {
734+ "type": "string",
735+ "description": "The ID of the product that the managed configuration is for, e.g. \"app:com.google.android.gm\"."
736+ }
737+ }
738+ },
739+ "ManagedConfigurationsForDeviceListResponse": {
740+ "id": "ManagedConfigurationsForDeviceListResponse",
741+ "type": "object",
742+ "description": "The managed configuration resources for the device.",
743+ "properties": {
744+ "kind": {
745+ "type": "string",
746+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#managedConfigurationsForDeviceListResponse\".",
747+ "default": "androidenterprise#managedConfigurationsForDeviceListResponse"
748+ },
749+ "managedConfigurationForDevice": {
750+ "type": "array",
751+ "description": "A managed configuration for an app on a specific device.",
752+ "items": {
753+ "$ref": "ManagedConfiguration"
754+ }
755+ }
756+ }
757+ },
758+ "ManagedConfigurationsForUserListResponse": {
759+ "id": "ManagedConfigurationsForUserListResponse",
760+ "type": "object",
761+ "description": "The managed configuration resources for the user.",
762+ "properties": {
763+ "kind": {
764+ "type": "string",
765+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#managedConfigurationsForUserListResponse\".",
766+ "default": "androidenterprise#managedConfigurationsForUserListResponse"
767+ },
768+ "managedConfigurationForUser": {
769+ "type": "array",
770+ "description": "A managed configuration for an app for a specific user.",
771+ "items": {
772+ "$ref": "ManagedConfiguration"
773+ }
774+ }
775+ }
776+ },
777+ "ManagedProperty": {
778+ "id": "ManagedProperty",
779+ "type": "object",
780+ "description": "A managed property of a managed configuration. The property must match one of the properties in the app restrictions schema of the product. Exactly one of the value fields must be populated, and it must match the property's type in the app restrictions schema.",
781+ "properties": {
782+ "key": {
783+ "type": "string",
784+ "description": "The unique key that identifies the property."
785+ },
786+ "valueBool": {
787+ "type": "boolean",
788+ "description": "The boolean value - this will only be present if type of the property is bool."
789+ },
790+ "valueBundle": {
791+ "$ref": "ManagedPropertyBundle",
792+ "description": "The bundle of managed properties - this will only be present if type of the property is bundle."
793+ },
794+ "valueBundleArray": {
795+ "type": "array",
796+ "description": "The list of bundles of properties - this will only be present if type of the property is bundle_array.",
797+ "items": {
798+ "$ref": "ManagedPropertyBundle"
799+ }
800+ },
801+ "valueInteger": {
802+ "type": "integer",
803+ "description": "The integer value - this will only be present if type of the property is integer.",
804+ "format": "int32"
805+ },
806+ "valueString": {
807+ "type": "string",
808+ "description": "The string value - this will only be present if type of the property is string, choice or hidden."
809+ },
810+ "valueStringArray": {
811+ "type": "array",
812+ "description": "The list of string values - this will only be present if type of the property is multiselect.",
813+ "items": {
814+ "type": "string"
815+ }
816+ }
817+ }
818+ },
819+ "ManagedPropertyBundle": {
820+ "id": "ManagedPropertyBundle",
821+ "type": "object",
822+ "description": "A bundle of managed properties.",
823+ "properties": {
824+ "managedProperty": {
825+ "type": "array",
826+ "description": "The list of managed properties.",
827+ "items": {
828+ "$ref": "ManagedProperty"
829+ }
830+ }
831+ }
832+ },
833+ "NewPermissionsEvent": {
834+ "id": "NewPermissionsEvent",
835+ "type": "object",
836+ "description": "An event generated when new permissions are added to an app.",
837+ "properties": {
838+ "approvedPermissions": {
839+ "type": "array",
840+ "description": "The set of permissions that the enterprise admin has already approved for this application. Use Permissions.Get on the EMM API to retrieve details about these permissions.",
841+ "items": {
842+ "type": "string"
843+ }
844+ },
845+ "productId": {
846+ "type": "string",
847+ "description": "The id of the product (e.g. \"app:com.google.android.gm\") for which new permissions were added. This field will always be present."
848+ },
849+ "requestedPermissions": {
850+ "type": "array",
851+ "description": "The set of permissions that the app is currently requesting. Use Permissions.Get on the EMM API to retrieve details about these permissions.",
852+ "items": {
853+ "type": "string"
854+ }
855+ }
856+ }
857+ },
858+ "Notification": {
859+ "id": "Notification",
860+ "type": "object",
861+ "description": "A notification of one event relating to an enterprise.",
862+ "properties": {
863+ "appRestrictionsSchemaChangeEvent": {
864+ "$ref": "AppRestrictionsSchemaChangeEvent",
865+ "description": "Notifications about new app restrictions schema changes."
866+ },
867+ "appUpdateEvent": {
868+ "$ref": "AppUpdateEvent",
869+ "description": "Notifications about app updates."
870+ },
871+ "enterpriseId": {
872+ "type": "string",
873+ "description": "The ID of the enterprise for which the notification is sent. This will always be present."
874+ },
875+ "installFailureEvent": {
876+ "$ref": "InstallFailureEvent",
877+ "description": "Notifications about an app installation failure."
878+ },
879+ "newPermissionsEvent": {
880+ "$ref": "NewPermissionsEvent",
881+ "description": "Notifications about new app permissions."
882+ },
883+ "productApprovalEvent": {
884+ "$ref": "ProductApprovalEvent",
885+ "description": "Notifications about changes to a product's approval status."
886+ },
887+ "productAvailabilityChangeEvent": {
888+ "$ref": "ProductAvailabilityChangeEvent",
889+ "description": "Notifications about product availability changes."
890+ },
891+ "timestampMillis": {
892+ "type": "string",
893+ "description": "The time when the notification was published in milliseconds since 1970-01-01T00:00:00Z. This will always be present.",
894+ "format": "int64"
895+ }
896+ }
897+ },
898+ "NotificationSet": {
899+ "id": "NotificationSet",
900+ "type": "object",
901+ "description": "A resource returned by the PullNotificationSet API, which contains a collection of notifications for enterprises associated with the service account authenticated for the request.",
902+ "properties": {
903+ "kind": {
904+ "type": "string",
905+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#notificationSet\".",
906+ "default": "androidenterprise#notificationSet"
907+ },
908+ "notification": {
909+ "type": "array",
910+ "description": "The notifications received, or empty if no notifications are present.",
911+ "items": {
912+ "$ref": "Notification"
913+ }
914+ },
915+ "notificationSetId": {
916+ "type": "string",
917+ "description": "The notification set ID, required to mark the notification as received with the Enterprises.AcknowledgeNotification API. This will be omitted if no notifications are present."
918+ }
919+ }
920+ },
587921 "PageInfo": {
588922 "id": "PageInfo",
589923 "type": "object",
@@ -629,7 +963,7 @@
629963 "Product": {
630964 "id": "Product",
631965 "type": "object",
632− "description": "A product represents an app in the Google Play Store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.)\n\nThe information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface.",
966+ "description": "A Products resource represents an app in the Google Play Store that is available to at least some users in the enterprise. (Some apps are restricted to a single enterprise, and no information about them is made available outside that enterprise.)\n\nThe information provided for each product (localized name, icon, link to the full Google Play details page) is intended to allow a basic representation of the product within an EMM user interface.",
633967 "properties": {
634968 "appVersion": {
635969 "type": "array",
@@ -665,7 +999,7 @@
665999 },
6661000 "productPricing": {
6671001 "type": "string",
668− "description": "Whether this product is free, free with in-app purchases, or paid."
1002+ "description": "Whether this product is free, free with in-app purchases, or paid. If the pricing is unknown, this means the product is not generally available anymore (even though it might still be available to people who own it)."
6691003 },
6701004 "requiresContainerApp": {
6711005 "type": "boolean",
@@ -685,6 +1019,36 @@
6851019 }
6861020 }
6871021 },
1022+ "ProductApprovalEvent": {
1023+ "id": "ProductApprovalEvent",
1024+ "type": "object",
1025+ "description": "An event generated when a product's approval status is changed.",
1026+ "properties": {
1027+ "approved": {
1028+ "type": "string",
1029+ "description": "Whether the product was approved or unapproved. This field will always be present."
1030+ },
1031+ "productId": {
1032+ "type": "string",
1033+ "description": "The id of the product (e.g. \"app:com.google.android.gm\") for which the approval status has changed. This field will always be present."
1034+ }
1035+ }
1036+ },
1037+ "ProductAvailabilityChangeEvent": {
1038+ "id": "ProductAvailabilityChangeEvent",
1039+ "type": "object",
1040+ "description": "An event generated whenever a product's availability changes.",
1041+ "properties": {
1042+ "availabilityStatus": {
1043+ "type": "string",
1044+ "description": "The new state of the product. This field will always be present."
1045+ },
1046+ "productId": {
1047+ "type": "string",
1048+ "description": "The id of the product (e.g. \"app:com.google.android.gm\") for which the product availability changed. This field will always be present."
1049+ }
1050+ }
1051+ },
6881052 "ProductPermission": {
6891053 "id": "ProductPermission",
6901054 "type": "object",
@@ -744,6 +1108,10 @@
7441108 "items": {
7451109 "type": "string"
7461110 }
1111+ },
1112+ "productSetBehavior": {
1113+ "type": "string",
1114+ "description": "The interpretation of this product set. \"unknown\" should never be sent and ignored if received. \"whitelist\" means that this product set constitutes a whitelist. \"includeAll\" means that all products are accessible (the value of the productId field is therefore ignored). If a value is not supplied, it is interpreted to be \"whitelist\" for backwards compatibility."
7471115 }
7481116 }
7491117 },
@@ -794,57 +1162,143 @@
7941162 }
7951163 }
7961164 },
797− "StoreCluster": {
798− "id": "StoreCluster",
1165+ "ServiceAccount": {
1166+ "id": "ServiceAccount",
7991167 "type": "object",
800− "description": "Definition of a Google Play for Work store cluster, a list of products displayed as part of a store page.",
1168+ "description": "A service account identity, including the name and credentials that can be used to authenticate as the service account.",
8011169 "properties": {
802− "id": {
803− "type": "string",
804− "description": "Unique ID of this cluster. Assigned by the server. Immutable once assigned."
1170+ "key": {
1171+ "$ref": "ServiceAccountKey",
1172+ "description": "Credentials that can be used to authenticate as this ServiceAccount."
8051173 },
8061174 "kind": {
8071175 "type": "string",
808− "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#storeCluster\".",
809− "default": "androidenterprise#storeCluster"
1176+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#serviceAccount\".",
1177+ "default": "androidenterprise#serviceAccount"
8101178 },
8111179 "name": {
812− "type": "array",
813− "description": "Ordered list of localized strings giving the name of this page. The text displayed is the one that best matches the user locale, or the first entry if there is no good match. There needs to be at least one entry.",
814− "items": {
815− "$ref": "LocalizedText"
816− }
817− },
818− "orderInPage": {
8191180 "type": "string",
820− "description": "String (US-ASCII only) used to determine order of this cluster within the parent page's elements. Page elements are sorted in lexicographic order of this field. Duplicated values are allowed, but ordering between elements with duplicate order is undefined.\n\nThe value of this field is never visible to a user, it is used solely for the purpose of defining an ordering. Maximum length is 256 characters."
821− },
822− "productId": {
823− "type": "array",
824− "description": "List of products in the order they are displayed in the cluster. There should not be duplicates within a cluster.",
825− "items": {
826− "type": "string"
827− }
1181+ "description": "The account name of the service account, in the form of an email address. Assigned by the server."
8281182 }
8291183 }
8301184 },
831− "StoreLayout": {
832− "id": "StoreLayout",
1185+ "ServiceAccountKey": {
1186+ "id": "ServiceAccountKey",
8331187 "type": "object",
834− "description": "General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.",
1188+ "description": "Credentials that can be used to authenticate as a service account.",
8351189 "properties": {
836− "homepageId": {
1190+ "data": {
1191+ "type": "string",
1192+ "description": "The body of the private key credentials file, in string format. This is only populated when the ServiceAccountKey is created, and is not stored by Google."
1193+ },
1194+ "id": {
8371195 "type": "string",
838− "description": "The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store.\n\nIf there is no homepage set, an empty store is shown. The homepage can be unset (by not specifying it) to empty the store.\n\nIf there exists at least one page, this field must be set to the ID of a valid page."
1196+ "description": "An opaque, unique identifier for this ServiceAccountKey. Assigned by the server."
8391197 },
8401198 "kind": {
8411199 "type": "string",
842− "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#storeLayout\".",
843− "default": "androidenterprise#storeLayout"
1200+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#serviceAccountKey\".",
1201+ "default": "androidenterprise#serviceAccountKey"
1202+ },
1203+ "type": {
1204+ "type": "string",
1205+ "description": "The file format of the generated key data.",
1206+ "annotations": {
1207+ "required": [
1208+ "androidenterprise.serviceaccountkeys.insert"
1209+ ]
1210+ }
8441211 }
8451212 }
8461213 },
847− "StoreLayoutClustersListResponse": {
1214+ "ServiceAccountKeysListResponse": {
1215+ "id": "ServiceAccountKeysListResponse",
1216+ "type": "object",
1217+ "properties": {
1218+ "serviceAccountKey": {
1219+ "type": "array",
1220+ "description": "The service account credentials.",
1221+ "items": {
1222+ "$ref": "ServiceAccountKey"
1223+ }
1224+ }
1225+ }
1226+ },
1227+ "SignupInfo": {
1228+ "id": "SignupInfo",
1229+ "type": "object",
1230+ "description": "A resource returned by the GenerateSignupUrl API, which contains the Signup URL and Completion Token.",
1231+ "properties": {
1232+ "completionToken": {
1233+ "type": "string",
1234+ "description": "An opaque token that will be required, along with the Enterprise Token, for obtaining the enterprise resource from CompleteSignup."
1235+ },
1236+ "kind": {
1237+ "type": "string",
1238+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#signupInfo\".",
1239+ "default": "androidenterprise#signupInfo"
1240+ },
1241+ "url": {
1242+ "type": "string",
1243+ "description": "A URL under which the Admin can sign up for an enterprise. The page pointed to cannot be rendered in an iframe."
1244+ }
1245+ }
1246+ },
1247+ "StoreCluster": {
1248+ "id": "StoreCluster",
1249+ "type": "object",
1250+ "description": "Definition of a Google Play for Work store cluster, a list of products displayed as part of a store page.",
1251+ "properties": {
1252+ "id": {
1253+ "type": "string",
1254+ "description": "Unique ID of this cluster. Assigned by the server. Immutable once assigned."
1255+ },
1256+ "kind": {
1257+ "type": "string",
1258+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#storeCluster\".",
1259+ "default": "androidenterprise#storeCluster"
1260+ },
1261+ "name": {
1262+ "type": "array",
1263+ "description": "Ordered list of localized strings giving the name of this page. The text displayed is the one that best matches the user locale, or the first entry if there is no good match. There needs to be at least one entry.",
1264+ "items": {
1265+ "$ref": "LocalizedText"
1266+ }
1267+ },
1268+ "orderInPage": {
1269+ "type": "string",
1270+ "description": "String (US-ASCII only) used to determine order of this cluster within the parent page's elements. Page elements are sorted in lexicographic order of this field. Duplicated values are allowed, but ordering between elements with duplicate order is undefined.\n\nThe value of this field is never visible to a user, it is used solely for the purpose of defining an ordering. Maximum length is 256 characters."
1271+ },
1272+ "productId": {
1273+ "type": "array",
1274+ "description": "List of products in the order they are displayed in the cluster. There should not be duplicates within a cluster.",
1275+ "items": {
1276+ "type": "string"
1277+ }
1278+ }
1279+ }
1280+ },
1281+ "StoreLayout": {
1282+ "id": "StoreLayout",
1283+ "type": "object",
1284+ "description": "General setting for the Google Play for Work store layout, currently only specifying the page to display the first time the store is opened.",
1285+ "properties": {
1286+ "homepageId": {
1287+ "type": "string",
1288+ "description": "The ID of the store page to be used as the homepage. The homepage will be used as the first page shown in the Google Play for Work store.\n\nIf a homepage has not been set, the Play store shown on devices will be empty. Not specifying a homepage on a store layout effectively empties the store.\n\nIf there exists at least one page, this field must be set to the ID of a valid page."
1289+ },
1290+ "kind": {
1291+ "type": "string",
1292+ "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#storeLayout\".",
1293+ "default": "androidenterprise#storeLayout"
1294+ },
1295+ "storeLayoutType": {
1296+ "type": "string",
1297+ "description": "Sets a store layout type. If set to \"custom\", \"homepageId\" must be specified. If set to \"basic\", the layout will consist of all approved apps accessible by the user, split in pages of 100 each; in this case, \"homepageId\" must not be specified. The \"basic\" setting takes precedence over any existing collections setup for this enterprise (if any). Should the enterprise use collectionViewers for controlling access rights, these will still be respected."
1298+ }
1299+ }
1300+ },
1301+ "StoreLayoutClustersListResponse": {
8481302 "id": "StoreLayoutClustersListResponse",
8491303 "type": "object",
8501304 "description": "The store page resources for the enterprise.",
@@ -927,8 +1381,30 @@
9271381 "User": {
9281382 "id": "User",
9291383 "type": "object",
930− "description": "A user resource represents an individual user within the enterprise's domain.\n\nNote that each user is associated with a Google account based on the user's corporate email address (which must be in one of the enterprise's domains). As part of installing the EMM's DPC app to manage a device the Google account must be provisioned to the device, and so the user resource must be created before that. This can be done using the Google Admin SDK Directory API.\n\nThe ID for a user is an opaque string. It can be retrieved using the list method queried by the user's primary email address.",
1384+ "description": "A Users resource represents an account associated with an enterprise. The account may be specific to a device or to an individual user (who can then use the account across multiple devices). The account may provide access to Google Play for Work only, or to other Google services, depending on the identity model: \n- Google managed domain identity model requires synchronization to Google account sources (via primaryEmail). \n- Android for Work Accounts identity model provides a dynamic means for enterprises to create user or device accounts as needed. These accounts provide access to Google Play for Work only.",
9311385 "properties": {
1386+ "accountIdentifier": {
1387+ "type": "string",
1388+ "description": "A unique identifier you create for this user, such as \"user342\" or \"asset#44418\". Do not use personally identifiable information (PII) for this property. Must always be set for EMM-managed users. Not set for Google-managed users.",
1389+ "annotations": {
1390+ "required": [
1391+ "androidenterprise.users.insert"
1392+ ]
1393+ }
1394+ },
1395+ "accountType": {
1396+ "type": "string",
1397+ "description": "The type of account that this user represents. A userAccount can be installed on multiple devices, but a deviceAccount is specific to a single device. An EMM-managed user (emmManaged) can be either type (userAccount, deviceAccount), but a Google-managed user (googleManaged) is always a userAccount.",
1398+ "annotations": {
1399+ "required": [
1400+ "androidenterprise.users.insert"
1401+ ]
1402+ }
1403+ },
1404+ "displayName": {
1405+ "type": "string",
1406+ "description": "The name that will appear in user interfaces. Setting this property is optional when creating EMM-managed users. If you do set this property, use something generic about the organization (such as \"Example, Inc.\") or your name (as EMM). Not used for Google-managed user accounts."
1407+ },
9321408 "id": {
9331409 "type": "string",
9341410 "description": "The unique ID for the user."
@@ -938,9 +1414,13 @@
9381414 "description": "Identifies what kind of resource this is. Value: the fixed string \"androidenterprise#user\".",
9391415 "default": "androidenterprise#user"
9401416 },
1417+ "managementType": {
1418+ "type": "string",
1419+ "description": "The entity that manages the user. With googleManaged users, the source of truth is Google so EMMs have to make sure a Google Account exists for the user. With emmManaged users, the EMM is in charge."
1420+ },
9411421 "primaryEmail": {
9421422 "type": "string",
943− "description": "The user's primary email, e.g. \"jsmith@example.com\"."
1423+ "description": "The user's primary email address, for example, \"jsmith@example.com\". Will always be set for Google managed users and not set for EMM managed users."
9441424 }
9451425 }
9461426 },
@@ -1389,7 +1869,7 @@
13891869 "id": "androidenterprise.devices.getState",
13901870 "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state",
13911871 "httpMethod": "GET",
1392− "description": "Retrieves whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services.",
1872+ "description": "Retrieves whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.",
13931873 "parameters": {
13941874 "deviceId": {
13951875 "type": "string",
@@ -1456,7 +1936,7 @@
14561936 "id": "androidenterprise.devices.setState",
14571937 "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state",
14581938 "httpMethod": "PUT",
1459− "description": "Sets whether a device is enabled or disabled for access by the user to Google services. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services.",
1939+ "description": "Sets whether a device's access to Google services is enabled or disabled. The device state takes effect only if enforcing EMM policies on Android devices is enabled in the Google Admin Console. Otherwise, the device state is ignored and all devices are allowed access to Google services. This is only supported for Google-managed users.",
14601940 "parameters": {
14611941 "deviceId": {
14621942 "type": "string",
@@ -1496,6 +1976,72 @@
14961976 },
14971977 "enterprises": {
14981978 "methods": {
1979+ "acknowledgeNotificationSet": {
1980+ "id": "androidenterprise.enterprises.acknowledgeNotificationSet",
1981+ "path": "enterprises/acknowledgeNotificationSet",
1982+ "httpMethod": "POST",
1983+ "description": "Acknowledges notifications that were received from Enterprises.PullNotificationSet to prevent subsequent calls from returning the same notifications.",
1984+ "parameters": {
1985+ "notificationSetId": {
1986+ "type": "string",
1987+ "description": "The notification set ID as returned by Enterprises.PullNotificationSet. This must be provided.",
1988+ "location": "query"
1989+ }
1990+ },
1991+ "scopes": [
1992+ "https://www.googleapis.com/auth/androidenterprise"
1993+ ]
1994+ },
1995+ "completeSignup": {
1996+ "id": "androidenterprise.enterprises.completeSignup",
1997+ "path": "enterprises/completeSignup",
1998+ "httpMethod": "POST",
1999+ "description": "Completes the signup flow, by specifying the Completion token and Enterprise token. This request must not be called multiple times for a given Enterprise Token.",
2000+ "parameters": {
2001+ "completionToken": {
2002+ "type": "string",
2003+ "description": "The Completion token initially returned by GenerateSignupUrl.",
2004+ "location": "query"
2005+ },
2006+ "enterpriseToken": {
2007+ "type": "string",
2008+ "description": "The Enterprise token appended to the Callback URL.",
2009+ "location": "query"
2010+ }
2011+ },
2012+ "response": {
2013+ "$ref": "Enterprise"
2014+ },
2015+ "scopes": [
2016+ "https://www.googleapis.com/auth/androidenterprise"
2017+ ]
2018+ },
2019+ "createWebToken": {
2020+ "id": "androidenterprise.enterprises.createWebToken",
2021+ "path": "enterprises/{enterpriseId}/createWebToken",
2022+ "httpMethod": "POST",
2023+ "description": "Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the Play for Work javascript API. Each token may only be used to start one UI session. See the javascript API documentation for further information.",
2024+ "parameters": {
2025+ "enterpriseId": {
2026+ "type": "string",
2027+ "description": "The ID of the enterprise.",
2028+ "required": true,
2029+ "location": "path"
2030+ }
2031+ },
2032+ "parameterOrder": [
2033+ "enterpriseId"
2034+ ],
2035+ "request": {
2036+ "$ref": "AdministratorWebTokenSpec"
2037+ },
2038+ "response": {
2039+ "$ref": "AdministratorWebToken"
2040+ },
2041+ "scopes": [
2042+ "https://www.googleapis.com/auth/androidenterprise"
2043+ ]
2044+ },
14992045 "delete": {
15002046 "id": "androidenterprise.enterprises.delete",
15012047 "path": "enterprises/{enterpriseId}",
@@ -1542,6 +2088,25 @@
15422088 "https://www.googleapis.com/auth/androidenterprise"
15432089 ]
15442090 },
2091+ "generateSignupUrl": {
2092+ "id": "androidenterprise.enterprises.generateSignupUrl",
2093+ "path": "enterprises/signupUrl",
2094+ "httpMethod": "POST",
2095+ "description": "Generates a sign-up URL.",
2096+ "parameters": {
2097+ "callbackUrl": {
2098+ "type": "string",
2099+ "description": "The callback URL to which the Admin will be redirected after successfully creating an enterprise. Before redirecting there the system will add a single query parameter to this URL named \"enterpriseToken\" which will contain an opaque token to be used for the CompleteSignup request.\nBeware that this means that the URL will be parsed, the parameter added and then a new URL formatted, i.e. there may be some minor formatting changes and, more importantly, the URL must be well-formed so that it can be parsed.",
2100+ "location": "query"
2101+ }
2102+ },
2103+ "response": {
2104+ "$ref": "SignupInfo"
2105+ },
2106+ "scopes": [
2107+ "https://www.googleapis.com/auth/androidenterprise"
2108+ ]
2109+ },
15452110 "get": {
15462111 "id": "androidenterprise.enterprises.get",
15472112 "path": "enterprises/{enterpriseId}",
@@ -1565,11 +2130,47 @@
15652130 "https://www.googleapis.com/auth/androidenterprise"
15662131 ]
15672132 },
2133+ "getServiceAccount": {
2134+ "id": "androidenterprise.enterprises.getServiceAccount",
2135+ "path": "enterprises/{enterpriseId}/serviceAccount",
2136+ "httpMethod": "GET",
2137+ "description": "Returns a service account and credentials. The service account can be bound to the enterprise by calling setAccount. The service account is unique to this enterprise and EMM, and will be deleted if the enterprise is unbound. The credentials contain private key data and are not stored server-side.\n\nThis method can only be called after calling Enterprises.Enroll or Enterprises.CompleteSignup, and before Enterprises.SetAccount; at other times it will return an error.\n\nSubsequent calls after the first will generate a new, unique set of credentials, and invalidate the previously generated credentials.\n\nOnce the service account is bound to the enterprise, it can be managed using the serviceAccountKeys resource.",
2138+ "parameters": {
2139+ "enterpriseId": {
2140+ "type": "string",
2141+ "description": "The ID of the enterprise.",
2142+ "required": true,
2143+ "location": "path"
2144+ },
2145+ "keyType": {
2146+ "type": "string",
2147+ "description": "The type of credential to return with the service account. Required.",
2148+ "enum": [
2149+ "googleCredentials",
2150+ "pkcs12"
2151+ ],
2152+ "enumDescriptions": [
2153+ "",
2154+ ""
2155+ ],
2156+ "location": "query"
2157+ }
2158+ },
2159+ "parameterOrder": [
2160+ "enterpriseId"
2161+ ],
2162+ "response": {
2163+ "$ref": "ServiceAccount"
2164+ },
2165+ "scopes": [
2166+ "https://www.googleapis.com/auth/androidenterprise"
2167+ ]
2168+ },
15682169 "getStoreLayout": {
15692170 "id": "androidenterprise.enterprises.getStoreLayout",
15702171 "path": "enterprises/{enterpriseId}/storeLayout",
15712172 "httpMethod": "GET",
1572− "description": "Returns the store layout resource.",
2173+ "description": "Returns the store layout for the enterprise. If the store layout has not been set, or if the store layout has no homepageId set, returns a NOT_FOUND error.",
15732174 "parameters": {
15742175 "enterpriseId": {
15752176 "type": "string",
@@ -1618,7 +2219,7 @@
16182219 "id": "androidenterprise.enterprises.list",
16192220 "path": "enterprises",
16202221 "httpMethod": "GET",
1621− "description": "Looks up an enterprise by domain name.",
2222+ "description": "Looks up an enterprise by domain name. This is only supported for enterprises created via the Google-initiated creation flow. Lookup of the id is not needed for enterprises created via the EMM-initiated flow since the EMM learns the enterprise ID in the callback specified in the Enterprises.generateSignupUrl call.",
16222223 "parameters": {
16232224 "domain": {
16242225 "type": "string",
@@ -1637,6 +2238,33 @@
16372238 "https://www.googleapis.com/auth/androidenterprise"
16382239 ]
16392240 },
2241+ "pullNotificationSet": {
2242+ "id": "androidenterprise.enterprises.pullNotificationSet",
2243+ "path": "enterprises/pullNotificationSet",
2244+ "httpMethod": "POST",
2245+ "description": "Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending.\nA notification set returned needs to be acknowledged within 20 seconds by calling Enterprises\u200b.AcknowledgeNotificationSet, unless the notification set is empty.\nNotifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub/Sub system policy.\nMultiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending.\nIf no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.",
2246+ "parameters": {
2247+ "requestMode": {
2248+ "type": "string",
2249+ "description": "The request mode for pulling notifications.\nSpecifying waitForNotifications will cause the request to block and wait until one or more notifications are present, or return an empty notification list if no notifications are present after some time.\nSpeciying returnImmediately will cause the request to immediately return the pending notifications, or an empty list if no notifications are present.\nIf omitted, defaults to waitForNotifications.",
2250+ "enum": [
2251+ "returnImmediately",
2252+ "waitForNotifications"
2253+ ],
2254+ "enumDescriptions": [
2255+ "",
2256+ ""
2257+ ],
2258+ "location": "query"
2259+ }
2260+ },
2261+ "response": {
2262+ "$ref": "NotificationSet"
2263+ },
2264+ "scopes": [
2265+ "https://www.googleapis.com/auth/androidenterprise"
2266+ ]
2267+ },
16402268 "sendTestPushNotification": {
16412269 "id": "androidenterprise.enterprises.sendTestPushNotification",
16422270 "path": "enterprises/{enterpriseId}/sendTestPushNotification",
@@ -1690,7 +2318,7 @@
16902318 "id": "androidenterprise.enterprises.setStoreLayout",
16912319 "path": "enterprises/{enterpriseId}/storeLayout",
16922320 "httpMethod": "PUT",
1693− "description": "Sets the store layout resource.",
2321+ "description": "Sets the store layout for the enterprise.",
16942322 "parameters": {
16952323 "enterpriseId": {
16962324 "type": "string",
@@ -2138,33 +2766,446 @@
21382766 "deviceId"
21392767 ],
21402768 "response": {
2141− "$ref": "InstallsListResponse"
2769+ "$ref": "InstallsListResponse"
2770+ },
2771+ "scopes": [
2772+ "https://www.googleapis.com/auth/androidenterprise"
2773+ ]
2774+ },
2775+ "patch": {
2776+ "id": "androidenterprise.installs.patch",
2777+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}",
2778+ "httpMethod": "PATCH",
2779+ "description": "Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics.",
2780+ "parameters": {
2781+ "deviceId": {
2782+ "type": "string",
2783+ "description": "The Android ID of the device.",
2784+ "required": true,
2785+ "location": "path"
2786+ },
2787+ "enterpriseId": {
2788+ "type": "string",
2789+ "description": "The ID of the enterprise.",
2790+ "required": true,
2791+ "location": "path"
2792+ },
2793+ "installId": {
2794+ "type": "string",
2795+ "description": "The ID of the product represented by the install, e.g. \"app:com.google.android.gm\".",
2796+ "required": true,
2797+ "location": "path"
2798+ },
2799+ "userId": {
2800+ "type": "string",
2801+ "description": "The ID of the user.",
2802+ "required": true,
2803+ "location": "path"
2804+ }
2805+ },
2806+ "parameterOrder": [
2807+ "enterpriseId",
2808+ "userId",
2809+ "deviceId",
2810+ "installId"
2811+ ],
2812+ "request": {
2813+ "$ref": "Install"
2814+ },
2815+ "response": {
2816+ "$ref": "Install"
2817+ },
2818+ "scopes": [
2819+ "https://www.googleapis.com/auth/androidenterprise"
2820+ ]
2821+ },
2822+ "update": {
2823+ "id": "androidenterprise.installs.update",
2824+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}",
2825+ "httpMethod": "PUT",
2826+ "description": "Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary.",
2827+ "parameters": {
2828+ "deviceId": {
2829+ "type": "string",
2830+ "description": "The Android ID of the device.",
2831+ "required": true,
2832+ "location": "path"
2833+ },
2834+ "enterpriseId": {
2835+ "type": "string",
2836+ "description": "The ID of the enterprise.",
2837+ "required": true,
2838+ "location": "path"
2839+ },
2840+ "installId": {
2841+ "type": "string",
2842+ "description": "The ID of the product represented by the install, e.g. \"app:com.google.android.gm\".",
2843+ "required": true,
2844+ "location": "path"
2845+ },
2846+ "userId": {
2847+ "type": "string",
2848+ "description": "The ID of the user.",
2849+ "required": true,
2850+ "location": "path"
2851+ }
2852+ },
2853+ "parameterOrder": [
2854+ "enterpriseId",
2855+ "userId",
2856+ "deviceId",
2857+ "installId"
2858+ ],
2859+ "request": {
2860+ "$ref": "Install"
2861+ },
2862+ "response": {
2863+ "$ref": "Install"
2864+ },
2865+ "scopes": [
2866+ "https://www.googleapis.com/auth/androidenterprise"
2867+ ]
2868+ }
2869+ }
2870+ },
2871+ "managedconfigurationsfordevice": {
2872+ "methods": {
2873+ "delete": {
2874+ "id": "androidenterprise.managedconfigurationsfordevice.delete",
2875+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}",
2876+ "httpMethod": "DELETE",
2877+ "description": "Removes a per-device managed configuration for an app for the specified device.",
2878+ "parameters": {
2879+ "deviceId": {
2880+ "type": "string",
2881+ "description": "The Android ID of the device.",
2882+ "required": true,
2883+ "location": "path"
2884+ },
2885+ "enterpriseId": {
2886+ "type": "string",
2887+ "description": "The ID of the enterprise.",
2888+ "required": true,
2889+ "location": "path"
2890+ },
2891+ "managedConfigurationForDeviceId": {
2892+ "type": "string",
2893+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
2894+ "required": true,
2895+ "location": "path"
2896+ },
2897+ "userId": {
2898+ "type": "string",
2899+ "description": "The ID of the user.",
2900+ "required": true,
2901+ "location": "path"
2902+ }
2903+ },
2904+ "parameterOrder": [
2905+ "enterpriseId",
2906+ "userId",
2907+ "deviceId",
2908+ "managedConfigurationForDeviceId"
2909+ ],
2910+ "scopes": [
2911+ "https://www.googleapis.com/auth/androidenterprise"
2912+ ]
2913+ },
2914+ "get": {
2915+ "id": "androidenterprise.managedconfigurationsfordevice.get",
2916+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}",
2917+ "httpMethod": "GET",
2918+ "description": "Retrieves details of a per-device managed configuration.",
2919+ "parameters": {
2920+ "deviceId": {
2921+ "type": "string",
2922+ "description": "The Android ID of the device.",
2923+ "required": true,
2924+ "location": "path"
2925+ },
2926+ "enterpriseId": {
2927+ "type": "string",
2928+ "description": "The ID of the enterprise.",
2929+ "required": true,
2930+ "location": "path"
2931+ },
2932+ "managedConfigurationForDeviceId": {
2933+ "type": "string",
2934+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
2935+ "required": true,
2936+ "location": "path"
2937+ },
2938+ "userId": {
2939+ "type": "string",
2940+ "description": "The ID of the user.",
2941+ "required": true,
2942+ "location": "path"
2943+ }
2944+ },
2945+ "parameterOrder": [
2946+ "enterpriseId",
2947+ "userId",
2948+ "deviceId",
2949+ "managedConfigurationForDeviceId"
2950+ ],
2951+ "response": {
2952+ "$ref": "ManagedConfiguration"
2953+ },
2954+ "scopes": [
2955+ "https://www.googleapis.com/auth/androidenterprise"
2956+ ]
2957+ },
2958+ "list": {
2959+ "id": "androidenterprise.managedconfigurationsfordevice.list",
2960+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice",
2961+ "httpMethod": "GET",
2962+ "description": "Lists all the per-device managed configurations for the specified device. Only the ID is set.",
2963+ "parameters": {
2964+ "deviceId": {
2965+ "type": "string",
2966+ "description": "The Android ID of the device.",
2967+ "required": true,
2968+ "location": "path"
2969+ },
2970+ "enterpriseId": {
2971+ "type": "string",
2972+ "description": "The ID of the enterprise.",
2973+ "required": true,
2974+ "location": "path"
2975+ },
2976+ "userId": {
2977+ "type": "string",
2978+ "description": "The ID of the user.",
2979+ "required": true,
2980+ "location": "path"
2981+ }
2982+ },
2983+ "parameterOrder": [
2984+ "enterpriseId",
2985+ "userId",
2986+ "deviceId"
2987+ ],
2988+ "response": {
2989+ "$ref": "ManagedConfigurationsForDeviceListResponse"
2990+ },
2991+ "scopes": [
2992+ "https://www.googleapis.com/auth/androidenterprise"
2993+ ]
2994+ },
2995+ "patch": {
2996+ "id": "androidenterprise.managedconfigurationsfordevice.patch",
2997+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}",
2998+ "httpMethod": "PATCH",
2999+ "description": "Adds or updates a per-device managed configuration for an app for the specified device. This method supports patch semantics.",
3000+ "parameters": {
3001+ "deviceId": {
3002+ "type": "string",
3003+ "description": "The Android ID of the device.",
3004+ "required": true,
3005+ "location": "path"
3006+ },
3007+ "enterpriseId": {
3008+ "type": "string",
3009+ "description": "The ID of the enterprise.",
3010+ "required": true,
3011+ "location": "path"
3012+ },
3013+ "managedConfigurationForDeviceId": {
3014+ "type": "string",
3015+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
3016+ "required": true,
3017+ "location": "path"
3018+ },
3019+ "userId": {
3020+ "type": "string",
3021+ "description": "The ID of the user.",
3022+ "required": true,
3023+ "location": "path"
3024+ }
3025+ },
3026+ "parameterOrder": [
3027+ "enterpriseId",
3028+ "userId",
3029+ "deviceId",
3030+ "managedConfigurationForDeviceId"
3031+ ],
3032+ "request": {
3033+ "$ref": "ManagedConfiguration"
3034+ },
3035+ "response": {
3036+ "$ref": "ManagedConfiguration"
3037+ },
3038+ "scopes": [
3039+ "https://www.googleapis.com/auth/androidenterprise"
3040+ ]
3041+ },
3042+ "update": {
3043+ "id": "androidenterprise.managedconfigurationsfordevice.update",
3044+ "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}",
3045+ "httpMethod": "PUT",
3046+ "description": "Adds or updates a per-device managed configuration for an app for the specified device.",
3047+ "parameters": {
3048+ "deviceId": {
3049+ "type": "string",
3050+ "description": "The Android ID of the device.",
3051+ "required": true,
3052+ "location": "path"
3053+ },
3054+ "enterpriseId": {
3055+ "type": "string",
3056+ "description": "The ID of the enterprise.",
3057+ "required": true,
3058+ "location": "path"
3059+ },
3060+ "managedConfigurationForDeviceId": {
3061+ "type": "string",
3062+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
3063+ "required": true,
3064+ "location": "path"
3065+ },
3066+ "userId": {
3067+ "type": "string",
3068+ "description": "The ID of the user.",
3069+ "required": true,
3070+ "location": "path"
3071+ }
3072+ },
3073+ "parameterOrder": [
3074+ "enterpriseId",
3075+ "userId",
3076+ "deviceId",
3077+ "managedConfigurationForDeviceId"
3078+ ],
3079+ "request": {
3080+ "$ref": "ManagedConfiguration"
3081+ },
3082+ "response": {
3083+ "$ref": "ManagedConfiguration"
3084+ },
3085+ "scopes": [
3086+ "https://www.googleapis.com/auth/androidenterprise"
3087+ ]
3088+ }
3089+ }
3090+ },
3091+ "managedconfigurationsforuser": {
3092+ "methods": {
3093+ "delete": {
3094+ "id": "androidenterprise.managedconfigurationsforuser.delete",
3095+ "path": "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}",
3096+ "httpMethod": "DELETE",
3097+ "description": "Removes a per-user managed configuration for an app for the specified user.",
3098+ "parameters": {
3099+ "enterpriseId": {
3100+ "type": "string",
3101+ "description": "The ID of the enterprise.",
3102+ "required": true,
3103+ "location": "path"
3104+ },
3105+ "managedConfigurationForUserId": {
3106+ "type": "string",
3107+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
3108+ "required": true,
3109+ "location": "path"
3110+ },
3111+ "userId": {
3112+ "type": "string",
3113+ "description": "The ID of the user.",
3114+ "required": true,
3115+ "location": "path"
3116+ }
3117+ },
3118+ "parameterOrder": [
3119+ "enterpriseId",
3120+ "userId",
3121+ "managedConfigurationForUserId"
3122+ ],
3123+ "scopes": [
3124+ "https://www.googleapis.com/auth/androidenterprise"
3125+ ]
3126+ },
3127+ "get": {
3128+ "id": "androidenterprise.managedconfigurationsforuser.get",
3129+ "path": "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}",
3130+ "httpMethod": "GET",
3131+ "description": "Retrieves details of a per-user managed configuration for an app for the specified user.",
3132+ "parameters": {
3133+ "enterpriseId": {
3134+ "type": "string",
3135+ "description": "The ID of the enterprise.",
3136+ "required": true,
3137+ "location": "path"
3138+ },
3139+ "managedConfigurationForUserId": {
3140+ "type": "string",
3141+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
3142+ "required": true,
3143+ "location": "path"
3144+ },
3145+ "userId": {
3146+ "type": "string",
3147+ "description": "The ID of the user.",
3148+ "required": true,
3149+ "location": "path"
3150+ }
3151+ },
3152+ "parameterOrder": [
3153+ "enterpriseId",
3154+ "userId",
3155+ "managedConfigurationForUserId"
3156+ ],
3157+ "response": {
3158+ "$ref": "ManagedConfiguration"
3159+ },
3160+ "scopes": [
3161+ "https://www.googleapis.com/auth/androidenterprise"
3162+ ]
3163+ },
3164+ "list": {
3165+ "id": "androidenterprise.managedconfigurationsforuser.list",
3166+ "path": "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser",
3167+ "httpMethod": "GET",
3168+ "description": "Lists all the per-user managed configurations for the specified user. Only the ID is set.",
3169+ "parameters": {
3170+ "enterpriseId": {
3171+ "type": "string",
3172+ "description": "The ID of the enterprise.",
3173+ "required": true,
3174+ "location": "path"
3175+ },
3176+ "userId": {
3177+ "type": "string",
3178+ "description": "The ID of the user.",
3179+ "required": true,
3180+ "location": "path"
3181+ }
3182+ },
3183+ "parameterOrder": [
3184+ "enterpriseId",
3185+ "userId"
3186+ ],
3187+ "response": {
3188+ "$ref": "ManagedConfigurationsForUserListResponse"
21423189 },
21433190 "scopes": [
21443191 "https://www.googleapis.com/auth/androidenterprise"
21453192 ]
21463193 },
21473194 "patch": {
2148− "id": "androidenterprise.installs.patch",
2149− "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}",
3195+ "id": "androidenterprise.managedconfigurationsforuser.patch",
3196+ "path": "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}",
21503197 "httpMethod": "PATCH",
2151− "description": "Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary. This method supports patch semantics.",
3198+ "description": "Adds or updates a per-user managed configuration for an app for the specified user. This method supports patch semantics.",
21523199 "parameters": {
2153− "deviceId": {
2154− "type": "string",
2155− "description": "The Android ID of the device.",
2156− "required": true,
2157− "location": "path"
2158− },
21593200 "enterpriseId": {
21603201 "type": "string",
21613202 "description": "The ID of the enterprise.",
21623203 "required": true,
21633204 "location": "path"
21643205 },
2165− "installId": {
3206+ "managedConfigurationForUserId": {
21663207 "type": "string",
2167− "description": "The ID of the product represented by the install, e.g. \"app:com.google.android.gm\".",
3208+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
21683209 "required": true,
21693210 "location": "path"
21703211 },
@@ -2178,40 +3219,33 @@
21783219 "parameterOrder": [
21793220 "enterpriseId",
21803221 "userId",
2181− "deviceId",
2182− "installId"
3222+ "managedConfigurationForUserId"
21833223 ],
21843224 "request": {
2185− "$ref": "Install"
3225+ "$ref": "ManagedConfiguration"
21863226 },
21873227 "response": {
2188− "$ref": "Install"
3228+ "$ref": "ManagedConfiguration"
21893229 },
21903230 "scopes": [
21913231 "https://www.googleapis.com/auth/androidenterprise"
21923232 ]
21933233 },
21943234 "update": {
2195− "id": "androidenterprise.installs.update",
2196− "path": "enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}",
3235+ "id": "androidenterprise.managedconfigurationsforuser.update",
3236+ "path": "enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}",
21973237 "httpMethod": "PUT",
2198− "description": "Requests to install the latest version of an app to a device. If the app is already installed then it is updated to the latest version if necessary.",
3238+ "description": "Adds or updates a per-user managed configuration for an app for the specified user.",
21993239 "parameters": {
2200− "deviceId": {
2201− "type": "string",
2202− "description": "The Android ID of the device.",
2203− "required": true,
2204− "location": "path"
2205− },
22063240 "enterpriseId": {
22073241 "type": "string",
22083242 "description": "The ID of the enterprise.",
22093243 "required": true,
22103244 "location": "path"
22113245 },
2212− "installId": {
3246+ "managedConfigurationForUserId": {
22133247 "type": "string",
2214− "description": "The ID of the product represented by the install, e.g. \"app:com.google.android.gm\".",
3248+ "description": "The ID of the managed configuration (a product ID), e.g. \"app:com.google.android.gm\".",
22153249 "required": true,
22163250 "location": "path"
22173251 },
@@ -2225,14 +3259,13 @@
22253259 "parameterOrder": [
22263260 "enterpriseId",
22273261 "userId",
2228− "deviceId",
2229− "installId"
3262+ "managedConfigurationForUserId"
22303263 ],
22313264 "request": {
2232− "$ref": "Install"
3265+ "$ref": "ManagedConfiguration"
22333266 },
22343267 "response": {
2235− "$ref": "Install"
3268+ "$ref": "ManagedConfiguration"
22363269 },
22373270 "scopes": [
22383271 "https://www.googleapis.com/auth/androidenterprise"
@@ -2378,7 +3411,7 @@
23783411 "id": "androidenterprise.products.getAppRestrictionsSchema",
23793412 "path": "enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema",
23803413 "httpMethod": "GET",
2381− "description": "Retrieves the schema defining app restrictions configurable for this product. All products have a schema, but this may be empty if no app restrictions are defined.",
3414+ "description": "Retrieves the schema that defines the configurable properties for this product. All products have a schema, but this schema may be empty if no managed configurations have been defined. This schema can be used to populate a UI that allows an administrator to configure the product. To apply a managed configuration based on the schema obtained using this API, see Managed Configurations through Play.",
23823415 "parameters": {
23833416 "enterpriseId": {
23843417 "type": "string",
@@ -2443,7 +3476,7 @@
24433476 "id": "androidenterprise.products.list",
24443477 "path": "enterprises/{enterpriseId}/products",
24453478 "httpMethod": "GET",
2446− "description": "Finds approved products that match a query.",
3479+ "description": "Finds approved products that match a query, or all approved products if there is no query.",
24473480 "parameters": {
24483481 "approved": {
24493482 "type": "boolean",
@@ -2469,7 +3502,7 @@
24693502 },
24703503 "query": {
24713504 "type": "string",
2472− "description": "The search query as typed in the Google Play Store search box. If omitted, all approved apps will be returned (using the pagination parameters).",
3505+ "description": "The search query as typed in the Google Play Store search box. If omitted, all approved apps will be returned (using the pagination parameters), including apps that are not available in the store (e.g. unpublished apps).",
24733506 "location": "query"
24743507 },
24753508 "token": {
@@ -2488,6 +3521,33 @@
24883521 "https://www.googleapis.com/auth/androidenterprise"
24893522 ]
24903523 },
3524+ "unapprove": {
3525+ "id": "androidenterprise.products.unapprove",
3526+ "path": "enterprises/{enterpriseId}/products/{productId}/unapprove",
3527+ "httpMethod": "POST",
3528+ "description": "Unapproves the specified product (and the relevant app permissions, if any)",
3529+ "parameters": {
3530+ "enterpriseId": {
3531+ "type": "string",
3532+ "description": "The ID of the enterprise.",
3533+ "required": true,
3534+ "location": "path"
3535+ },
3536+ "productId": {
3537+ "type": "string",
3538+ "description": "The ID of the product.",
3539+ "required": true,
3540+ "location": "path"
3541+ }
3542+ },
3543+ "parameterOrder": [
3544+ "enterpriseId",
3545+ "productId"
3546+ ],
3547+ "scopes": [
3548+ "https://www.googleapis.com/auth/androidenterprise"
3549+ ]
3550+ },
24913551 "updatePermissions": {
24923552 "id": "androidenterprise.products.updatePermissions",
24933553 "path": "enterprises/{enterpriseId}/products/{productId}/permissions",
@@ -2523,6 +3583,86 @@
25233583 }
25243584 }
25253585 },
3586+ "serviceaccountkeys": {
3587+ "methods": {
3588+ "delete": {
3589+ "id": "androidenterprise.serviceaccountkeys.delete",
3590+ "path": "enterprises/{enterpriseId}/serviceAccountKeys/{keyId}",
3591+ "httpMethod": "DELETE",
3592+ "description": "Removes and invalidates the specified credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.",
3593+ "parameters": {
3594+ "enterpriseId": {
3595+ "type": "string",
3596+ "description": "The ID of the enterprise.",
3597+ "required": true,
3598+ "location": "path"
3599+ },
3600+ "keyId": {
3601+ "type": "string",
3602+ "description": "The ID of the key.",
3603+ "required": true,
3604+ "location": "path"
3605+ }
3606+ },
3607+ "parameterOrder": [
3608+ "enterpriseId",
3609+ "keyId"
3610+ ],
3611+ "scopes": [
3612+ "https://www.googleapis.com/auth/androidenterprise"
3613+ ]
3614+ },
3615+ "insert": {
3616+ "id": "androidenterprise.serviceaccountkeys.insert",
3617+ "path": "enterprises/{enterpriseId}/serviceAccountKeys",
3618+ "httpMethod": "POST",
3619+ "description": "Generates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.\n\nOnly the type of the key should be populated in the resource to be inserted.",
3620+ "parameters": {
3621+ "enterpriseId": {
3622+ "type": "string",
3623+ "description": "The ID of the enterprise.",
3624+ "required": true,
3625+ "location": "path"
3626+ }
3627+ },
3628+ "parameterOrder": [
3629+ "enterpriseId"
3630+ ],
3631+ "request": {
3632+ "$ref": "ServiceAccountKey"
3633+ },
3634+ "response": {
3635+ "$ref": "ServiceAccountKey"
3636+ },
3637+ "scopes": [
3638+ "https://www.googleapis.com/auth/androidenterprise"
3639+ ]
3640+ },
3641+ "list": {
3642+ "id": "androidenterprise.serviceaccountkeys.list",
3643+ "path": "enterprises/{enterpriseId}/serviceAccountKeys",
3644+ "httpMethod": "GET",
3645+ "description": "Lists all active credentials for the service account associated with this enterprise. Only the ID and key type are returned. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount.",
3646+ "parameters": {
3647+ "enterpriseId": {
3648+ "type": "string",
3649+ "description": "The ID of the enterprise.",
3650+ "required": true,
3651+ "location": "path"
3652+ }
3653+ },
3654+ "parameterOrder": [
3655+ "enterpriseId"
3656+ ],
3657+ "response": {
3658+ "$ref": "ServiceAccountKeysListResponse"
3659+ },
3660+ "scopes": [
3661+ "https://www.googleapis.com/auth/androidenterprise"
3662+ ]
3663+ }
3664+ }
3665+ },
25263666 "storelayoutclusters": {
25273667 "methods": {
25283668 "delete": {
@@ -2919,6 +4059,63 @@
29194059 },
29204060 "users": {
29214061 "methods": {
4062+ "delete": {
4063+ "id": "androidenterprise.users.delete",
4064+ "path": "enterprises/{enterpriseId}/users/{userId}",
4065+ "httpMethod": "DELETE",
4066+ "description": "Deleted an EMM-managed user.",
4067+ "parameters": {
4068+ "enterpriseId": {
4069+ "type": "string",
4070+ "description": "The ID of the enterprise.",
4071+ "required": true,
4072+ "location": "path"
4073+ },
4074+ "userId": {
4075+ "type": "string",
4076+ "description": "The ID of the user.",
4077+ "required": true,
4078+ "location": "path"
4079+ }
4080+ },
4081+ "parameterOrder": [
4082+ "enterpriseId",
4083+ "userId"
4084+ ],
4085+ "scopes": [
4086+ "https://www.googleapis.com/auth/androidenterprise"
4087+ ]
4088+ },
4089+ "generateAuthenticationToken": {
4090+ "id": "androidenterprise.users.generateAuthenticationToken",
4091+ "path": "enterprises/{enterpriseId}/users/{userId}/authenticationToken",
4092+ "httpMethod": "POST",
4093+ "description": "Generates an authentication token which the device policy client can use to provision the given EMM-managed user account on a device. The generated token is single-use and expires after a few minutes.\n\nThis call only works with EMM-managed accounts.",
4094+ "parameters": {
4095+ "enterpriseId": {
4096+ "type": "string",
4097+ "description": "The ID of the enterprise.",
4098+ "required": true,
4099+ "location": "path"
4100+ },
4101+ "userId": {
4102+ "type": "string",
4103+ "description": "The ID of the user.",
4104+ "required": true,
4105+ "location": "path"
4106+ }
4107+ },
4108+ "parameterOrder": [
4109+ "enterpriseId",
4110+ "userId"
4111+ ],
4112+ "response": {
4113+ "$ref": "AuthenticationToken"
4114+ },
4115+ "scopes": [
4116+ "https://www.googleapis.com/auth/androidenterprise"
4117+ ]
4118+ },
29224119 "generateToken": {
29234120 "id": "androidenterprise.users.generateToken",
29244121 "path": "enterprises/{enterpriseId}/users/{userId}/token",
@@ -3009,11 +4206,37 @@
30094206 "https://www.googleapis.com/auth/androidenterprise"
30104207 ]
30114208 },
4209+ "insert": {
4210+ "id": "androidenterprise.users.insert",
4211+ "path": "enterprises/{enterpriseId}/users",
4212+ "httpMethod": "POST",
4213+ "description": "Creates a new EMM-managed user.\n\nThe Users resource passed in the body of the request should include an accountIdentifier and an accountType.\nIf a corresponding user already exists with the same account identifier, the user will be updated with the resource. In this case only the displayName field can be changed.",
4214+ "parameters": {
4215+ "enterpriseId": {
4216+ "type": "string",
4217+ "description": "The ID of the enterprise.",
4218+ "required": true,
4219+ "location": "path"
4220+ }
4221+ },
4222+ "parameterOrder": [
4223+ "enterpriseId"
4224+ ],
4225+ "request": {
4226+ "$ref": "User"
4227+ },
4228+ "response": {
4229+ "$ref": "User"
4230+ },
4231+ "scopes": [
4232+ "https://www.googleapis.com/auth/androidenterprise"
4233+ ]
4234+ },
30124235 "list": {
30134236 "id": "androidenterprise.users.list",
30144237 "path": "enterprises/{enterpriseId}/users",
30154238 "httpMethod": "GET",
3016− "description": "Looks up a user by their primary email address.",
4239+ "description": "Looks up a user by primary email address. This is only supported for Google-managed users. Lookup of the id is not needed for EMM-managed users because the id is already returned in the result of the Users.insert call.",
30174240 "parameters": {
30184241 "email": {
30194242 "type": "string",
@@ -3039,6 +4262,39 @@
30394262 "https://www.googleapis.com/auth/androidenterprise"
30404263 ]
30414264 },
4265+ "patch": {
4266+ "id": "androidenterprise.users.patch",
4267+ "path": "enterprises/{enterpriseId}/users/{userId}",
4268+ "httpMethod": "PATCH",
4269+ "description": "Updates the details of an EMM-managed user.\n\nCan be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the displayName field can be changed. Other fields must either be unset or have the currently active value. This method supports patch semantics.",
4270+ "parameters": {
4271+ "enterpriseId": {
4272+ "type": "string",
4273+ "description": "The ID of the enterprise.",
4274+ "required": true,
4275+ "location": "path"
4276+ },
4277+ "userId": {
4278+ "type": "string",
4279+ "description": "The ID of the user.",
4280+ "required": true,
4281+ "location": "path"
4282+ }
4283+ },
4284+ "parameterOrder": [
4285+ "enterpriseId",
4286+ "userId"
4287+ ],
4288+ "request": {
4289+ "$ref": "User"
4290+ },
4291+ "response": {
4292+ "$ref": "User"
4293+ },
4294+ "scopes": [
4295+ "https://www.googleapis.com/auth/androidenterprise"
4296+ ]
4297+ },
30424298 "revokeToken": {
30434299 "id": "androidenterprise.users.revokeToken",
30444300 "path": "enterprises/{enterpriseId}/users/{userId}/token",
@@ -3098,6 +4354,39 @@
30984354 "scopes": [
30994355 "https://www.googleapis.com/auth/androidenterprise"
31004356 ]
4357+ },
4358+ "update": {
4359+ "id": "androidenterprise.users.update",
4360+ "path": "enterprises/{enterpriseId}/users/{userId}",
4361+ "httpMethod": "PUT",
4362+ "description": "Updates the details of an EMM-managed user.\n\nCan be used with EMM-managed users only (not Google managed users). Pass the new details in the Users resource in the request body. Only the displayName field can be changed. Other fields must either be unset or have the currently active value.",
4363+ "parameters": {
4364+ "enterpriseId": {
4365+ "type": "string",
4366+ "description": "The ID of the enterprise.",
4367+ "required": true,
4368+ "location": "path"
4369+ },
4370+ "userId": {
4371+ "type": "string",
4372+ "description": "The ID of the user.",
4373+ "required": true,
4374+ "location": "path"
4375+ }
4376+ },
4377+ "parameterOrder": [
4378+ "enterpriseId",
4379+ "userId"
4380+ ],
4381+ "request": {
4382+ "$ref": "User"
4383+ },
4384+ "response": {
4385+ "$ref": "User"
4386+ },
4387+ "scopes": [
4388+ "https://www.googleapis.com/auth/androidenterprise"
4389+ ]
31014390 }
31024391 }
31034392 }
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise.hs+282
@@ -74,15 +74,30 @@ module Network.Google.AndroidEnterprise
7474 -- ** androidenterprise.devices.setState
7575 , module Network.Google.Resource.AndroidEnterprise.Devices.SetState
7676
77+ -- ** androidenterprise.enterprises.acknowledgeNotificationSet
78+ , module Network.Google.Resource.AndroidEnterprise.Enterprises.AcknowledgeNotificationSet
79+
80+ -- ** androidenterprise.enterprises.completeSignup
81+ , module Network.Google.Resource.AndroidEnterprise.Enterprises.CompleteSignup
82+
83+ -- ** androidenterprise.enterprises.createWebToken
84+ , module Network.Google.Resource.AndroidEnterprise.Enterprises.CreateWebToken
85+
7786 -- ** androidenterprise.enterprises.delete
7887 , module Network.Google.Resource.AndroidEnterprise.Enterprises.Delete
7988
8089 -- ** androidenterprise.enterprises.enroll
8190 , module Network.Google.Resource.AndroidEnterprise.Enterprises.Enroll
8291
92+ -- ** androidenterprise.enterprises.generateSignupUrl
93+ , module Network.Google.Resource.AndroidEnterprise.Enterprises.GenerateSignupURL
94+
8395 -- ** androidenterprise.enterprises.get
8496 , module Network.Google.Resource.AndroidEnterprise.Enterprises.Get
8597
98+ -- ** androidenterprise.enterprises.getServiceAccount
99+ , module Network.Google.Resource.AndroidEnterprise.Enterprises.GetServiceAccount
100+
86101 -- ** androidenterprise.enterprises.getStoreLayout
87102 , module Network.Google.Resource.AndroidEnterprise.Enterprises.GetStoreLayout
88103
@@ -92,6 +107,9 @@ module Network.Google.AndroidEnterprise
92107 -- ** androidenterprise.enterprises.list
93108 , module Network.Google.Resource.AndroidEnterprise.Enterprises.List
94109
110+ -- ** androidenterprise.enterprises.pullNotificationSet
111+ , module Network.Google.Resource.AndroidEnterprise.Enterprises.PullNotificationSet
112+
95113 -- ** androidenterprise.enterprises.sendTestPushNotification
96114 , module Network.Google.Resource.AndroidEnterprise.Enterprises.SendTestPushNotification
97115
@@ -143,6 +161,36 @@ module Network.Google.AndroidEnterprise
143161 -- ** androidenterprise.installs.update
144162 , module Network.Google.Resource.AndroidEnterprise.Installs.Update
145163
164+ -- ** androidenterprise.managedconfigurationsfordevice.delete
165+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Delete
166+
167+ -- ** androidenterprise.managedconfigurationsfordevice.get
168+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Get
169+
170+ -- ** androidenterprise.managedconfigurationsfordevice.list
171+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.List
172+
173+ -- ** androidenterprise.managedconfigurationsfordevice.patch
174+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Patch
175+
176+ -- ** androidenterprise.managedconfigurationsfordevice.update
177+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Update
178+
179+ -- ** androidenterprise.managedconfigurationsforuser.delete
180+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Delete
181+
182+ -- ** androidenterprise.managedconfigurationsforuser.get
183+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Get
184+
185+ -- ** androidenterprise.managedconfigurationsforuser.list
186+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.List
187+
188+ -- ** androidenterprise.managedconfigurationsforuser.patch
189+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Patch
190+
191+ -- ** androidenterprise.managedconfigurationsforuser.update
192+ , module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Update
193+
146194 -- ** androidenterprise.permissions.get
147195 , module Network.Google.Resource.AndroidEnterprise.Permissions.Get
148196
@@ -164,9 +212,21 @@ module Network.Google.AndroidEnterprise
164212 -- ** androidenterprise.products.list
165213 , module Network.Google.Resource.AndroidEnterprise.Products.List
166214
215+ -- ** androidenterprise.products.unapprove
216+ , module Network.Google.Resource.AndroidEnterprise.Products.UnApprove
217+
167218 -- ** androidenterprise.products.updatePermissions
168219 , module Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
169220
221+ -- ** androidenterprise.serviceaccountkeys.delete
222+ , module Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Delete
223+
224+ -- ** androidenterprise.serviceaccountkeys.insert
225+ , module Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Insert
226+
227+ -- ** androidenterprise.serviceaccountkeys.list
228+ , module Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.List
229+
170230 -- ** androidenterprise.storelayoutclusters.delete
171231 , module Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
172232
@@ -203,6 +263,12 @@ module Network.Google.AndroidEnterprise
203263 -- ** androidenterprise.storelayoutpages.update
204264 , module Network.Google.Resource.AndroidEnterprise.Storelayoutpages.Update
205265
266+ -- ** androidenterprise.users.delete
267+ , module Network.Google.Resource.AndroidEnterprise.Users.Delete
268+
269+ -- ** androidenterprise.users.generateAuthenticationToken
270+ , module Network.Google.Resource.AndroidEnterprise.Users.GenerateAuthenticationToken
271+
206272 -- ** androidenterprise.users.generateToken
207273 , module Network.Google.Resource.AndroidEnterprise.Users.GenerateToken
208274
@@ -212,15 +278,24 @@ module Network.Google.AndroidEnterprise
212278 -- ** androidenterprise.users.getAvailableProductSet
213279 , module Network.Google.Resource.AndroidEnterprise.Users.GetAvailableProductSet
214280
281+ -- ** androidenterprise.users.insert
282+ , module Network.Google.Resource.AndroidEnterprise.Users.Insert
283+
215284 -- ** androidenterprise.users.list
216285 , module Network.Google.Resource.AndroidEnterprise.Users.List
217286
287+ -- ** androidenterprise.users.patch
288+ , module Network.Google.Resource.AndroidEnterprise.Users.Patch
289+
218290 -- ** androidenterprise.users.revokeToken
219291 , module Network.Google.Resource.AndroidEnterprise.Users.RevokeToken
220292
221293 -- ** androidenterprise.users.setAvailableProductSet
222294 , module Network.Google.Resource.AndroidEnterprise.Users.SetAvailableProductSet
223295
296+ -- ** androidenterprise.users.update
297+ , module Network.Google.Resource.AndroidEnterprise.Users.Update
298+
224299 -- * Types
225300
226301 -- ** GroupLicense
@@ -284,12 +359,30 @@ module Network.Google.AndroidEnterprise
284359 , auiApprovalURL
285360 , auiKind
286361
362+ -- ** ManagedProperty
363+ , ManagedProperty
364+ , managedProperty
365+ , mpValueStringArray
366+ , mpValueBool
367+ , mpKey
368+ , mpValueBundle
369+ , mpValueInteger
370+ , mpValueBundleArray
371+ , mpValueString
372+
287373 -- ** StoreLayoutClustersListResponse
288374 , StoreLayoutClustersListResponse
289375 , storeLayoutClustersListResponse
290376 , slclrCluster
291377 , slclrKind
292378
379+ -- ** ManagedConfiguration
380+ , ManagedConfiguration
381+ , managedConfiguration
382+ , mcManagedProperty
383+ , mcKind
384+ , mcProductId
385+
293386 -- ** StoreCluster
294387 , StoreCluster
295388 , storeCluster
@@ -299,6 +392,25 @@ module Network.Google.AndroidEnterprise
299392 , scId
300393 , scProductId
301394
395+ -- ** AdministratorWebTokenSpec
396+ , AdministratorWebTokenSpec
397+ , administratorWebTokenSpec
398+ , awtsParent
399+ , awtsKind
400+ , awtsPermission
401+
402+ -- ** Notification
403+ , Notification
404+ , notification
405+ , nEnterpriseId
406+ , nNewPermissionsEvent
407+ , nProductApprovalEvent
408+ , nProductAvailabilityChangeEvent
409+ , nAppUpdateEvent
410+ , nInstallFailureEvent
411+ , nAppRestrictionsSchemaChangeEvent
412+ , nTimestampMillis
413+
302414 -- ** PageInfo
303415 , PageInfo
304416 , pageInfo
@@ -312,6 +424,25 @@ module Network.Google.AndroidEnterprise
312424 , ppState
313425 , ppPermissionId
314426
427+ -- ** NewPermissionsEvent
428+ , NewPermissionsEvent
429+ , newPermissionsEvent
430+ , npeRequestedPermissions
431+ , npeApprovedPermissions
432+ , npeProductId
433+
434+ -- ** ProductAvailabilityChangeEvent
435+ , ProductAvailabilityChangeEvent
436+ , productAvailabilityChangeEvent
437+ , paceAvailabilityStatus
438+ , paceProductId
439+
440+ -- ** ProductApprovalEvent
441+ , ProductApprovalEvent
442+ , productApprovalEvent
443+ , paeApproved
444+ , paeProductId
445+
315446 -- ** Device
316447 , Device
317448 , device
@@ -319,6 +450,14 @@ module Network.Google.AndroidEnterprise
319450 , dManagementType
320451 , dAndroidId
321452
453+ -- ** ServiceAccountKey
454+ , ServiceAccountKey
455+ , serviceAccountKey
456+ , sakKind
457+ , sakData
458+ , sakId
459+ , sakType
460+
322461 -- ** InstallsListResponse
323462 , InstallsListResponse
324463 , installsListResponse
@@ -335,6 +474,12 @@ module Network.Google.AndroidEnterprise
335474 , arsrDefaultValue
336475 , arsrTitle
337476 , arsrDescription
477+ , arsrNestedRestriction
478+
479+ -- ** Administrator
480+ , Administrator
481+ , administrator
482+ , aEmail
338483
339484 -- ** UsersListResponse
340485 , UsersListResponse
@@ -342,12 +487,26 @@ module Network.Google.AndroidEnterprise
342487 , ulrKind
343488 , ulrUser
344489
490+ -- ** AuthenticationToken
491+ , AuthenticationToken
492+ , authenticationToken
493+ , atKind
494+ , atToken
495+
345496 -- ** AppVersion
346497 , AppVersion
347498 , appVersion
348499 , avVersionCode
349500 , avVersionString
350501
502+ -- ** EnterprisesPullNotificationSetRequestMode
503+ , EnterprisesPullNotificationSetRequestMode (..)
504+
505+ -- ** ManagedPropertyBundle
506+ , ManagedPropertyBundle
507+ , managedPropertyBundle
508+ , mpbManagedProperty
509+
351510 -- ** GroupLicensesListResponse
352511 , GroupLicensesListResponse
353512 , groupLicensesListResponse
@@ -367,6 +526,7 @@ module Network.Google.AndroidEnterprise
367526 , ProductSet
368527 , productSet
369528 , psKind
529+ , psProductSetBehavior
370530 , psProductId
371531
372532 -- ** Install
@@ -377,12 +537,27 @@ module Network.Google.AndroidEnterprise
377537 , iInstallState
378538 , iProductId
379539
540+ -- ** ServiceAccountKeysListResponse
541+ , ServiceAccountKeysListResponse
542+ , serviceAccountKeysListResponse
543+ , saklrServiceAccountKey
544+
380545 -- ** User
381546 , User
382547 , user
548+ , uAccountIdentifier
383549 , uKind
550+ , uDisplayName
384551 , uId
385552 , uPrimaryEmail
553+ , uManagementType
554+ , uAccountType
555+
556+ -- ** ManagedConfigurationsForDeviceListResponse
557+ , ManagedConfigurationsForDeviceListResponse
558+ , managedConfigurationsForDeviceListResponse
559+ , mcfdlrKind
560+ , mcfdlrManagedConfigurationForDevice
386561
387562 -- ** ProductsGenerateApprovalURLResponse
388563 , ProductsGenerateApprovalURLResponse
@@ -403,12 +578,31 @@ module Network.Google.AndroidEnterprise
403578 , estpnrTopicName
404579 , estpnrMessageId
405580
581+ -- ** ServiceAccount
582+ , ServiceAccount
583+ , serviceAccount
584+ , saKind
585+ , saKey
586+ , saName
587+
588+ -- ** AppUpdateEvent
589+ , AppUpdateEvent
590+ , appUpdateEvent
591+ , aueProductId
592+
406593 -- ** EnterprisesListResponse
407594 , EnterprisesListResponse
408595 , enterprisesListResponse
409596 , elrKind
410597 , elrEnterprise
411598
599+ -- ** NotificationSet
600+ , NotificationSet
601+ , notificationSet
602+ , nsNotificationSetId
603+ , nsNotification
604+ , nsKind
605+
412606 -- ** AppRestrictionsSchema
413607 , AppRestrictionsSchema
414608 , appRestrictionsSchema
@@ -438,16 +632,51 @@ module Network.Google.AndroidEnterprise
438632 , Enterprise
439633 , enterprise
440634 , eKind
635+ , eAdministrator
441636 , ePrimaryDomain
442637 , eName
443638 , eId
444639
640+ -- ** InstallFailureEvent
641+ , InstallFailureEvent
642+ , installFailureEvent
643+ , ifeFailureReason
644+ , ifeFailureDetails
645+ , ifeUserId
646+ , ifeDeviceId
647+ , ifeProductId
648+
649+ -- ** ManagedConfigurationsForUserListResponse
650+ , ManagedConfigurationsForUserListResponse
651+ , managedConfigurationsForUserListResponse
652+ , mcfulrManagedConfigurationForUser
653+ , mcfulrKind
654+
445655 -- ** StoreLayout
446656 , StoreLayout
447657 , storeLayout
658+ , slStoreLayoutType
448659 , slKind
449660 , slHomepageId
450661
662+ -- ** AppRestrictionsSchemaChangeEvent
663+ , AppRestrictionsSchemaChangeEvent
664+ , appRestrictionsSchemaChangeEvent
665+ , arsceProductId
666+
667+ -- ** AdministratorWebToken
668+ , AdministratorWebToken
669+ , administratorWebToken
670+ , awtKind
671+ , awtToken
672+
673+ -- ** SignupInfo
674+ , SignupInfo
675+ , signupInfo
676+ , siCompletionToken
677+ , siKind
678+ , siURL
679+
451680 -- ** Product
452681 , Product
453682 , product
@@ -470,6 +699,9 @@ module Network.Google.AndroidEnterprise
470699 , entKind
471700 , entEntitlement
472701
702+ -- ** EnterprisesGetServiceAccountKeyType
703+ , EnterprisesGetServiceAccountKeyType (..)
704+
473705 -- ** ProductPermissions
474706 , ProductPermissions
475707 , productPermissions
@@ -529,12 +761,18 @@ import Network.Google.Resource.AndroidEnterprise.Devices.Get
529761import Network.Google.Resource.AndroidEnterprise.Devices.GetState
530762import Network.Google.Resource.AndroidEnterprise.Devices.List
531763import Network.Google.Resource.AndroidEnterprise.Devices.SetState
764+import Network.Google.Resource.AndroidEnterprise.Enterprises.AcknowledgeNotificationSet
765+import Network.Google.Resource.AndroidEnterprise.Enterprises.CompleteSignup
766+import Network.Google.Resource.AndroidEnterprise.Enterprises.CreateWebToken
532767import Network.Google.Resource.AndroidEnterprise.Enterprises.Delete
533768import Network.Google.Resource.AndroidEnterprise.Enterprises.Enroll
769+import Network.Google.Resource.AndroidEnterprise.Enterprises.GenerateSignupURL
534770import Network.Google.Resource.AndroidEnterprise.Enterprises.Get
771+import Network.Google.Resource.AndroidEnterprise.Enterprises.GetServiceAccount
535772import Network.Google.Resource.AndroidEnterprise.Enterprises.GetStoreLayout
536773import Network.Google.Resource.AndroidEnterprise.Enterprises.Insert
537774import Network.Google.Resource.AndroidEnterprise.Enterprises.List
775+import Network.Google.Resource.AndroidEnterprise.Enterprises.PullNotificationSet
538776import Network.Google.Resource.AndroidEnterprise.Enterprises.SendTestPushNotification
539777import Network.Google.Resource.AndroidEnterprise.Enterprises.SetAccount
540778import Network.Google.Resource.AndroidEnterprise.Enterprises.SetStoreLayout
@@ -552,6 +790,16 @@ import Network.Google.Resource.AndroidEnterprise.Installs.Get
552790import Network.Google.Resource.AndroidEnterprise.Installs.List
553791import Network.Google.Resource.AndroidEnterprise.Installs.Patch
554792import Network.Google.Resource.AndroidEnterprise.Installs.Update
793+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Delete
794+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Get
795+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.List
796+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Patch
797+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Update
798+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Delete
799+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Get
800+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.List
801+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Patch
802+import Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Update
555803import Network.Google.Resource.AndroidEnterprise.Permissions.Get
556804import Network.Google.Resource.AndroidEnterprise.Products.Approve
557805import Network.Google.Resource.AndroidEnterprise.Products.GenerateApprovalURL
@@ -559,7 +807,11 @@ import Network.Google.Resource.AndroidEnterprise.Products.Get
559807import Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
560808import Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
561809import Network.Google.Resource.AndroidEnterprise.Products.List
810+import Network.Google.Resource.AndroidEnterprise.Products.UnApprove
562811import Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
812+import Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Delete
813+import Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Insert
814+import Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.List
563815import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
564816import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get
565817import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Insert
@@ -572,12 +824,17 @@ import Network.Google.Resource.AndroidEnterprise.Storelayoutpages.Inse
572824import Network.Google.Resource.AndroidEnterprise.Storelayoutpages.List
573825import Network.Google.Resource.AndroidEnterprise.Storelayoutpages.Patch
574826import Network.Google.Resource.AndroidEnterprise.Storelayoutpages.Update
827+import Network.Google.Resource.AndroidEnterprise.Users.Delete
828+import Network.Google.Resource.AndroidEnterprise.Users.GenerateAuthenticationToken
575829import Network.Google.Resource.AndroidEnterprise.Users.GenerateToken
576830import Network.Google.Resource.AndroidEnterprise.Users.Get
577831import Network.Google.Resource.AndroidEnterprise.Users.GetAvailableProductSet
832+import Network.Google.Resource.AndroidEnterprise.Users.Insert
578833import Network.Google.Resource.AndroidEnterprise.Users.List
834+import Network.Google.Resource.AndroidEnterprise.Users.Patch
579835import Network.Google.Resource.AndroidEnterprise.Users.RevokeToken
580836import Network.Google.Resource.AndroidEnterprise.Users.SetAvailableProductSet
837+import Network.Google.Resource.AndroidEnterprise.Users.Update
581838
582839{- $resources
583840TODO
@@ -596,12 +853,17 @@ type AndroidEnterpriseAPI =
596853 :<|> CollectionviewersGetResource
597854 :<|> CollectionviewersDeleteResource
598855 :<|> CollectionviewersUpdateResource
856+ :<|> UsersInsertResource
599857 :<|> UsersListResource
600858 :<|> UsersGenerateTokenResource
859+ :<|> UsersGenerateAuthenticationTokenResource
860+ :<|> UsersPatchResource
601861 :<|> UsersGetResource
602862 :<|> UsersSetAvailableProductSetResource
603863 :<|> UsersRevokeTokenResource
604864 :<|> UsersGetAvailableProductSetResource
865+ :<|> UsersDeleteResource
866+ :<|> UsersUpdateResource
605867 :<|> InstallsListResource
606868 :<|> InstallsPatchResource
607869 :<|> InstallsGetResource
@@ -619,16 +881,30 @@ type AndroidEnterpriseAPI =
619881 :<|> CollectionsGetResource
620882 :<|> CollectionsDeleteResource
621883 :<|> CollectionsUpdateResource
884+ :<|> ServiceAccountkeysInsertResource
885+ :<|> ServiceAccountkeysListResource
886+ :<|> ServiceAccountkeysDeleteResource
887+ :<|> EnterprisesCompleteSignupResource
888+ :<|> EnterprisesCreateWebTokenResource
622889 :<|> EnterprisesInsertResource
890+ :<|> EnterprisesGetServiceAccountResource
623891 :<|> EnterprisesListResource
624892 :<|> EnterprisesUnenrollResource
625893 :<|> EnterprisesGetStoreLayoutResource
626894 :<|> EnterprisesSetAccountResource
627895 :<|> EnterprisesEnrollResource
628896 :<|> EnterprisesGetResource
897+ :<|> EnterprisesGenerateSignupURLResource
629898 :<|> EnterprisesSendTestPushNotificationResource
630899 :<|> EnterprisesSetStoreLayoutResource
900+ :<|> EnterprisesAcknowledgeNotificationSetResource
901+ :<|> EnterprisesPullNotificationSetResource
631902 :<|> EnterprisesDeleteResource
903+ :<|> ManagedConfigurationsforUserListResource
904+ :<|> ManagedConfigurationsforUserPatchResource
905+ :<|> ManagedConfigurationsforUserGetResource
906+ :<|> ManagedConfigurationsforUserDeleteResource
907+ :<|> ManagedConfigurationsforUserUpdateResource
632908 :<|> GrouplicensesListResource
633909 :<|> GrouplicensesGetResource
634910 :<|> EntitlementsListResource
@@ -636,11 +912,17 @@ type AndroidEnterpriseAPI =
636912 :<|> EntitlementsGetResource
637913 :<|> EntitlementsDeleteResource
638914 :<|> EntitlementsUpdateResource
915+ :<|> ManagedConfigurationsforDeviceListResource
916+ :<|> ManagedConfigurationsforDevicePatchResource
917+ :<|> ManagedConfigurationsforDeviceGetResource
918+ :<|> ManagedConfigurationsforDeviceDeleteResource
919+ :<|> ManagedConfigurationsforDeviceUpdateResource
639920 :<|> PermissionsGetResource
640921 :<|> ProductsGenerateApprovalURLResource
641922 :<|> ProductsListResource
642923 :<|> ProductsGetResource
643924 :<|> ProductsGetAppRestrictionsSchemaResource
925+ :<|> ProductsUnApproveResource
644926 :<|> ProductsApproveResource
645927 :<|> ProductsGetPermissionsResource
646928 :<|> ProductsUpdatePermissionsResource
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types.hs+157
@@ -83,12 +83,30 @@ module Network.Google.AndroidEnterprise.Types
8383 , auiApprovalURL
8484 , auiKind
8585
86+ -- * ManagedProperty
87+ , ManagedProperty
88+ , managedProperty
89+ , mpValueStringArray
90+ , mpValueBool
91+ , mpKey
92+ , mpValueBundle
93+ , mpValueInteger
94+ , mpValueBundleArray
95+ , mpValueString
96+
8697 -- * StoreLayoutClustersListResponse
8798 , StoreLayoutClustersListResponse
8899 , storeLayoutClustersListResponse
89100 , slclrCluster
90101 , slclrKind
91102
103+ -- * ManagedConfiguration
104+ , ManagedConfiguration
105+ , managedConfiguration
106+ , mcManagedProperty
107+ , mcKind
108+ , mcProductId
109+
92110 -- * StoreCluster
93111 , StoreCluster
94112 , storeCluster
@@ -98,6 +116,25 @@ module Network.Google.AndroidEnterprise.Types
98116 , scId
99117 , scProductId
100118
119+ -- * AdministratorWebTokenSpec
120+ , AdministratorWebTokenSpec
121+ , administratorWebTokenSpec
122+ , awtsParent
123+ , awtsKind
124+ , awtsPermission
125+
126+ -- * Notification
127+ , Notification
128+ , notification
129+ , nEnterpriseId
130+ , nNewPermissionsEvent
131+ , nProductApprovalEvent
132+ , nProductAvailabilityChangeEvent
133+ , nAppUpdateEvent
134+ , nInstallFailureEvent
135+ , nAppRestrictionsSchemaChangeEvent
136+ , nTimestampMillis
137+
101138 -- * PageInfo
102139 , PageInfo
103140 , pageInfo
@@ -111,6 +148,25 @@ module Network.Google.AndroidEnterprise.Types
111148 , ppState
112149 , ppPermissionId
113150
151+ -- * NewPermissionsEvent
152+ , NewPermissionsEvent
153+ , newPermissionsEvent
154+ , npeRequestedPermissions
155+ , npeApprovedPermissions
156+ , npeProductId
157+
158+ -- * ProductAvailabilityChangeEvent
159+ , ProductAvailabilityChangeEvent
160+ , productAvailabilityChangeEvent
161+ , paceAvailabilityStatus
162+ , paceProductId
163+
164+ -- * ProductApprovalEvent
165+ , ProductApprovalEvent
166+ , productApprovalEvent
167+ , paeApproved
168+ , paeProductId
169+
114170 -- * Device
115171 , Device
116172 , device
@@ -118,6 +174,14 @@ module Network.Google.AndroidEnterprise.Types
118174 , dManagementType
119175 , dAndroidId
120176
177+ -- * ServiceAccountKey
178+ , ServiceAccountKey
179+ , serviceAccountKey
180+ , sakKind
181+ , sakData
182+ , sakId
183+ , sakType
184+
121185 -- * InstallsListResponse
122186 , InstallsListResponse
123187 , installsListResponse
@@ -134,6 +198,12 @@ module Network.Google.AndroidEnterprise.Types
134198 , arsrDefaultValue
135199 , arsrTitle
136200 , arsrDescription
201+ , arsrNestedRestriction
202+
203+ -- * Administrator
204+ , Administrator
205+ , administrator
206+ , aEmail
137207
138208 -- * UsersListResponse
139209 , UsersListResponse
@@ -141,12 +211,26 @@ module Network.Google.AndroidEnterprise.Types
141211 , ulrKind
142212 , ulrUser
143213
214+ -- * AuthenticationToken
215+ , AuthenticationToken
216+ , authenticationToken
217+ , atKind
218+ , atToken
219+
144220 -- * AppVersion
145221 , AppVersion
146222 , appVersion
147223 , avVersionCode
148224 , avVersionString
149225
226+ -- * EnterprisesPullNotificationSetRequestMode
227+ , EnterprisesPullNotificationSetRequestMode (..)
228+
229+ -- * ManagedPropertyBundle
230+ , ManagedPropertyBundle
231+ , managedPropertyBundle
232+ , mpbManagedProperty
233+
150234 -- * GroupLicensesListResponse
151235 , GroupLicensesListResponse
152236 , groupLicensesListResponse
@@ -166,6 +250,7 @@ module Network.Google.AndroidEnterprise.Types
166250 , ProductSet
167251 , productSet
168252 , psKind
253+ , psProductSetBehavior
169254 , psProductId
170255
171256 -- * Install
@@ -176,12 +261,27 @@ module Network.Google.AndroidEnterprise.Types
176261 , iInstallState
177262 , iProductId
178263
264+ -- * ServiceAccountKeysListResponse
265+ , ServiceAccountKeysListResponse
266+ , serviceAccountKeysListResponse
267+ , saklrServiceAccountKey
268+
179269 -- * User
180270 , User
181271 , user
272+ , uAccountIdentifier
182273 , uKind
274+ , uDisplayName
183275 , uId
184276 , uPrimaryEmail
277+ , uManagementType
278+ , uAccountType
279+
280+ -- * ManagedConfigurationsForDeviceListResponse
281+ , ManagedConfigurationsForDeviceListResponse
282+ , managedConfigurationsForDeviceListResponse
283+ , mcfdlrKind
284+ , mcfdlrManagedConfigurationForDevice
185285
186286 -- * ProductsGenerateApprovalURLResponse
187287 , ProductsGenerateApprovalURLResponse
@@ -202,12 +302,31 @@ module Network.Google.AndroidEnterprise.Types
202302 , estpnrTopicName
203303 , estpnrMessageId
204304
305+ -- * ServiceAccount
306+ , ServiceAccount
307+ , serviceAccount
308+ , saKind
309+ , saKey
310+ , saName
311+
312+ -- * AppUpdateEvent
313+ , AppUpdateEvent
314+ , appUpdateEvent
315+ , aueProductId
316+
205317 -- * EnterprisesListResponse
206318 , EnterprisesListResponse
207319 , enterprisesListResponse
208320 , elrKind
209321 , elrEnterprise
210322
323+ -- * NotificationSet
324+ , NotificationSet
325+ , notificationSet
326+ , nsNotificationSetId
327+ , nsNotification
328+ , nsKind
329+
211330 -- * AppRestrictionsSchema
212331 , AppRestrictionsSchema
213332 , appRestrictionsSchema
@@ -237,16 +356,51 @@ module Network.Google.AndroidEnterprise.Types
237356 , Enterprise
238357 , enterprise
239358 , eKind
359+ , eAdministrator
240360 , ePrimaryDomain
241361 , eName
242362 , eId
243363
364+ -- * InstallFailureEvent
365+ , InstallFailureEvent
366+ , installFailureEvent
367+ , ifeFailureReason
368+ , ifeFailureDetails
369+ , ifeUserId
370+ , ifeDeviceId
371+ , ifeProductId
372+
373+ -- * ManagedConfigurationsForUserListResponse
374+ , ManagedConfigurationsForUserListResponse
375+ , managedConfigurationsForUserListResponse
376+ , mcfulrManagedConfigurationForUser
377+ , mcfulrKind
378+
244379 -- * StoreLayout
245380 , StoreLayout
246381 , storeLayout
382+ , slStoreLayoutType
247383 , slKind
248384 , slHomepageId
249385
386+ -- * AppRestrictionsSchemaChangeEvent
387+ , AppRestrictionsSchemaChangeEvent
388+ , appRestrictionsSchemaChangeEvent
389+ , arsceProductId
390+
391+ -- * AdministratorWebToken
392+ , AdministratorWebToken
393+ , administratorWebToken
394+ , awtKind
395+ , awtToken
396+
397+ -- * SignupInfo
398+ , SignupInfo
399+ , signupInfo
400+ , siCompletionToken
401+ , siKind
402+ , siURL
403+
250404 -- * Product
251405 , Product
252406 , product
@@ -269,6 +423,9 @@ module Network.Google.AndroidEnterprise.Types
269423 , entKind
270424 , entEntitlement
271425
426+ -- * EnterprisesGetServiceAccountKeyType
427+ , EnterprisesGetServiceAccountKeyType (..)
428+
272429 -- * ProductPermissions
273430 , ProductPermissions
274431 , productPermissions
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs+1519−83
@@ -600,6 +600,127 @@ instance ToJSON ApprovalURLInfo where
600600 [("approvalUrl" .=) <$> _auiApprovalURL,
601601 Just ("kind" .= _auiKind)])
602602
603+-- | A managed property of a managed configuration. The property must match
604+-- one of the properties in the app restrictions schema of the product.
605+-- Exactly one of the value fields must be populated, and it must match the
606+-- property\'s type in the app restrictions schema.
607+--
608+-- /See:/ 'managedProperty' smart constructor.
609+data ManagedProperty = ManagedProperty'
610+ { _mpValueStringArray :: !(Maybe [Text])
611+ , _mpValueBool :: !(Maybe Bool)
612+ , _mpKey :: !(Maybe Text)
613+ , _mpValueBundle :: !(Maybe ManagedPropertyBundle)
614+ , _mpValueInteger :: !(Maybe (Textual Int32))
615+ , _mpValueBundleArray :: !(Maybe [ManagedPropertyBundle])
616+ , _mpValueString :: !(Maybe Text)
617+ } deriving (Eq,Show,Data,Typeable,Generic)
618+
619+-- | Creates a value of 'ManagedProperty' with the minimum fields required to make a request.
620+--
621+-- Use one of the following lenses to modify other fields as desired:
622+--
623+-- * 'mpValueStringArray'
624+--
625+-- * 'mpValueBool'
626+--
627+-- * 'mpKey'
628+--
629+-- * 'mpValueBundle'
630+--
631+-- * 'mpValueInteger'
632+--
633+-- * 'mpValueBundleArray'
634+--
635+-- * 'mpValueString'
636+managedProperty
637+ :: ManagedProperty
638+managedProperty =
639+ ManagedProperty'
640+ { _mpValueStringArray = Nothing
641+ , _mpValueBool = Nothing
642+ , _mpKey = Nothing
643+ , _mpValueBundle = Nothing
644+ , _mpValueInteger = Nothing
645+ , _mpValueBundleArray = Nothing
646+ , _mpValueString = Nothing
647+ }
648+
649+-- | The list of string values - this will only be present if type of the
650+-- property is multiselect.
651+mpValueStringArray :: Lens' ManagedProperty [Text]
652+mpValueStringArray
653+ = lens _mpValueStringArray
654+ (\ s a -> s{_mpValueStringArray = a})
655+ . _Default
656+ . _Coerce
657+
658+-- | The boolean value - this will only be present if type of the property is
659+-- bool.
660+mpValueBool :: Lens' ManagedProperty (Maybe Bool)
661+mpValueBool
662+ = lens _mpValueBool (\ s a -> s{_mpValueBool = a})
663+
664+-- | The unique key that identifies the property.
665+mpKey :: Lens' ManagedProperty (Maybe Text)
666+mpKey = lens _mpKey (\ s a -> s{_mpKey = a})
667+
668+-- | The bundle of managed properties - this will only be present if type of
669+-- the property is bundle.
670+mpValueBundle :: Lens' ManagedProperty (Maybe ManagedPropertyBundle)
671+mpValueBundle
672+ = lens _mpValueBundle
673+ (\ s a -> s{_mpValueBundle = a})
674+
675+-- | The integer value - this will only be present if type of the property is
676+-- integer.
677+mpValueInteger :: Lens' ManagedProperty (Maybe Int32)
678+mpValueInteger
679+ = lens _mpValueInteger
680+ (\ s a -> s{_mpValueInteger = a})
681+ . mapping _Coerce
682+
683+-- | The list of bundles of properties - this will only be present if type of
684+-- the property is bundle_array.
685+mpValueBundleArray :: Lens' ManagedProperty [ManagedPropertyBundle]
686+mpValueBundleArray
687+ = lens _mpValueBundleArray
688+ (\ s a -> s{_mpValueBundleArray = a})
689+ . _Default
690+ . _Coerce
691+
692+-- | The string value - this will only be present if type of the property is
693+-- string, choice or hidden.
694+mpValueString :: Lens' ManagedProperty (Maybe Text)
695+mpValueString
696+ = lens _mpValueString
697+ (\ s a -> s{_mpValueString = a})
698+
699+instance FromJSON ManagedProperty where
700+ parseJSON
701+ = withObject "ManagedProperty"
702+ (\ o ->
703+ ManagedProperty' <$>
704+ (o .:? "valueStringArray" .!= mempty) <*>
705+ (o .:? "valueBool")
706+ <*> (o .:? "key")
707+ <*> (o .:? "valueBundle")
708+ <*> (o .:? "valueInteger")
709+ <*> (o .:? "valueBundleArray" .!= mempty)
710+ <*> (o .:? "valueString"))
711+
712+instance ToJSON ManagedProperty where
713+ toJSON ManagedProperty'{..}
714+ = object
715+ (catMaybes
716+ [("valueStringArray" .=) <$> _mpValueStringArray,
717+ ("valueBool" .=) <$> _mpValueBool,
718+ ("key" .=) <$> _mpKey,
719+ ("valueBundle" .=) <$> _mpValueBundle,
720+ ("valueInteger" .=) <$> _mpValueInteger,
721+ ("valueBundleArray" .=) <$> _mpValueBundleArray,
722+ ("valueString" .=) <$> _mpValueString])
723+
603724-- | The store page resources for the enterprise.
604725--
605726-- /See:/ 'storeLayoutClustersListResponse' smart constructor.
@@ -653,6 +774,73 @@ instance ToJSON StoreLayoutClustersListResponse where
653774 [("cluster" .=) <$> _slclrCluster,
654775 Just ("kind" .= _slclrKind)])
655776
777+-- | A managed configuration resource contains the set of managed properties
778+-- that have been configured for an Android app. The app\'s developer would
779+-- have defined configurable properties in the managed configurations
780+-- schema.
781+--
782+-- /See:/ 'managedConfiguration' smart constructor.
783+data ManagedConfiguration = ManagedConfiguration'
784+ { _mcManagedProperty :: !(Maybe [ManagedProperty])
785+ , _mcKind :: !Text
786+ , _mcProductId :: !(Maybe Text)
787+ } deriving (Eq,Show,Data,Typeable,Generic)
788+
789+-- | Creates a value of 'ManagedConfiguration' with the minimum fields required to make a request.
790+--
791+-- Use one of the following lenses to modify other fields as desired:
792+--
793+-- * 'mcManagedProperty'
794+--
795+-- * 'mcKind'
796+--
797+-- * 'mcProductId'
798+managedConfiguration
799+ :: ManagedConfiguration
800+managedConfiguration =
801+ ManagedConfiguration'
802+ { _mcManagedProperty = Nothing
803+ , _mcKind = "androidenterprise#managedConfiguration"
804+ , _mcProductId = Nothing
805+ }
806+
807+-- | The set of managed properties for this configuration.
808+mcManagedProperty :: Lens' ManagedConfiguration [ManagedProperty]
809+mcManagedProperty
810+ = lens _mcManagedProperty
811+ (\ s a -> s{_mcManagedProperty = a})
812+ . _Default
813+ . _Coerce
814+
815+-- | Identifies what kind of resource this is. Value: the fixed string
816+-- \"androidenterprise#managedConfiguration\".
817+mcKind :: Lens' ManagedConfiguration Text
818+mcKind = lens _mcKind (\ s a -> s{_mcKind = a})
819+
820+-- | The ID of the product that the managed configuration is for, e.g.
821+-- \"app:com.google.android.gm\".
822+mcProductId :: Lens' ManagedConfiguration (Maybe Text)
823+mcProductId
824+ = lens _mcProductId (\ s a -> s{_mcProductId = a})
825+
826+instance FromJSON ManagedConfiguration where
827+ parseJSON
828+ = withObject "ManagedConfiguration"
829+ (\ o ->
830+ ManagedConfiguration' <$>
831+ (o .:? "managedProperty" .!= mempty) <*>
832+ (o .:? "kind" .!=
833+ "androidenterprise#managedConfiguration")
834+ <*> (o .:? "productId"))
835+
836+instance ToJSON ManagedConfiguration where
837+ toJSON ManagedConfiguration'{..}
838+ = object
839+ (catMaybes
840+ [("managedProperty" .=) <$> _mcManagedProperty,
841+ Just ("kind" .= _mcKind),
842+ ("productId" .=) <$> _mcProductId])
843+
656844-- | Definition of a Google Play for Work store cluster, a list of products
657845-- displayed as part of a store page.
658846--
@@ -746,6 +934,202 @@ instance ToJSON StoreCluster where
746934 ("id" .=) <$> _scId,
747935 ("productId" .=) <$> _scProductId])
748936
937+-- | Specification for a token used to generate iframes. The token specifies
938+-- what data the admin is allowed to modify and the URI the iframe is
939+-- allowed to communiate with.
940+--
941+-- /See:/ 'administratorWebTokenSpec' smart constructor.
942+data AdministratorWebTokenSpec = AdministratorWebTokenSpec'
943+ { _awtsParent :: !(Maybe Text)
944+ , _awtsKind :: !Text
945+ , _awtsPermission :: !(Maybe [Text])
946+ } deriving (Eq,Show,Data,Typeable,Generic)
947+
948+-- | Creates a value of 'AdministratorWebTokenSpec' with the minimum fields required to make a request.
949+--
950+-- Use one of the following lenses to modify other fields as desired:
951+--
952+-- * 'awtsParent'
953+--
954+-- * 'awtsKind'
955+--
956+-- * 'awtsPermission'
957+administratorWebTokenSpec
958+ :: AdministratorWebTokenSpec
959+administratorWebTokenSpec =
960+ AdministratorWebTokenSpec'
961+ { _awtsParent = Nothing
962+ , _awtsKind = "androidenterprise#administratorWebTokenSpec"
963+ , _awtsPermission = Nothing
964+ }
965+
966+-- | The URI of the parent frame hosting the iframe. To prevent XSS, the
967+-- iframe may not be hosted at other URIs. This URI must be https.
968+awtsParent :: Lens' AdministratorWebTokenSpec (Maybe Text)
969+awtsParent
970+ = lens _awtsParent (\ s a -> s{_awtsParent = a})
971+
972+-- | Identifies what kind of resource this is. Value: the fixed string
973+-- \"androidenterprise#administratorWebTokenSpec\".
974+awtsKind :: Lens' AdministratorWebTokenSpec Text
975+awtsKind = lens _awtsKind (\ s a -> s{_awtsKind = a})
976+
977+-- | The list of permissions the admin is granted within the iframe. The
978+-- admin will only be allowed to view an iframe if they have all of the
979+-- permissions associated with it.
980+awtsPermission :: Lens' AdministratorWebTokenSpec [Text]
981+awtsPermission
982+ = lens _awtsPermission
983+ (\ s a -> s{_awtsPermission = a})
984+ . _Default
985+ . _Coerce
986+
987+instance FromJSON AdministratorWebTokenSpec where
988+ parseJSON
989+ = withObject "AdministratorWebTokenSpec"
990+ (\ o ->
991+ AdministratorWebTokenSpec' <$>
992+ (o .:? "parent") <*>
993+ (o .:? "kind" .!=
994+ "androidenterprise#administratorWebTokenSpec")
995+ <*> (o .:? "permission" .!= mempty))
996+
997+instance ToJSON AdministratorWebTokenSpec where
998+ toJSON AdministratorWebTokenSpec'{..}
999+ = object
1000+ (catMaybes
1001+ [("parent" .=) <$> _awtsParent,
1002+ Just ("kind" .= _awtsKind),
1003+ ("permission" .=) <$> _awtsPermission])
1004+
1005+-- | A notification of one event relating to an enterprise.
1006+--
1007+-- /See:/ 'notification' smart constructor.
1008+data Notification = Notification'
1009+ { _nEnterpriseId :: !(Maybe Text)
1010+ , _nNewPermissionsEvent :: !(Maybe NewPermissionsEvent)
1011+ , _nProductApprovalEvent :: !(Maybe ProductApprovalEvent)
1012+ , _nProductAvailabilityChangeEvent :: !(Maybe ProductAvailabilityChangeEvent)
1013+ , _nAppUpdateEvent :: !(Maybe AppUpdateEvent)
1014+ , _nInstallFailureEvent :: !(Maybe InstallFailureEvent)
1015+ , _nAppRestrictionsSchemaChangeEvent :: !(Maybe AppRestrictionsSchemaChangeEvent)
1016+ , _nTimestampMillis :: !(Maybe (Textual Int64))
1017+ } deriving (Eq,Show,Data,Typeable,Generic)
1018+
1019+-- | Creates a value of 'Notification' with the minimum fields required to make a request.
1020+--
1021+-- Use one of the following lenses to modify other fields as desired:
1022+--
1023+-- * 'nEnterpriseId'
1024+--
1025+-- * 'nNewPermissionsEvent'
1026+--
1027+-- * 'nProductApprovalEvent'
1028+--
1029+-- * 'nProductAvailabilityChangeEvent'
1030+--
1031+-- * 'nAppUpdateEvent'
1032+--
1033+-- * 'nInstallFailureEvent'
1034+--
1035+-- * 'nAppRestrictionsSchemaChangeEvent'
1036+--
1037+-- * 'nTimestampMillis'
1038+notification
1039+ :: Notification
1040+notification =
1041+ Notification'
1042+ { _nEnterpriseId = Nothing
1043+ , _nNewPermissionsEvent = Nothing
1044+ , _nProductApprovalEvent = Nothing
1045+ , _nProductAvailabilityChangeEvent = Nothing
1046+ , _nAppUpdateEvent = Nothing
1047+ , _nInstallFailureEvent = Nothing
1048+ , _nAppRestrictionsSchemaChangeEvent = Nothing
1049+ , _nTimestampMillis = Nothing
1050+ }
1051+
1052+-- | The ID of the enterprise for which the notification is sent. This will
1053+-- always be present.
1054+nEnterpriseId :: Lens' Notification (Maybe Text)
1055+nEnterpriseId
1056+ = lens _nEnterpriseId
1057+ (\ s a -> s{_nEnterpriseId = a})
1058+
1059+-- | Notifications about new app permissions.
1060+nNewPermissionsEvent :: Lens' Notification (Maybe NewPermissionsEvent)
1061+nNewPermissionsEvent
1062+ = lens _nNewPermissionsEvent
1063+ (\ s a -> s{_nNewPermissionsEvent = a})
1064+
1065+-- | Notifications about changes to a product\'s approval status.
1066+nProductApprovalEvent :: Lens' Notification (Maybe ProductApprovalEvent)
1067+nProductApprovalEvent
1068+ = lens _nProductApprovalEvent
1069+ (\ s a -> s{_nProductApprovalEvent = a})
1070+
1071+-- | Notifications about product availability changes.
1072+nProductAvailabilityChangeEvent :: Lens' Notification (Maybe ProductAvailabilityChangeEvent)
1073+nProductAvailabilityChangeEvent
1074+ = lens _nProductAvailabilityChangeEvent
1075+ (\ s a -> s{_nProductAvailabilityChangeEvent = a})
1076+
1077+-- | Notifications about app updates.
1078+nAppUpdateEvent :: Lens' Notification (Maybe AppUpdateEvent)
1079+nAppUpdateEvent
1080+ = lens _nAppUpdateEvent
1081+ (\ s a -> s{_nAppUpdateEvent = a})
1082+
1083+-- | Notifications about an app installation failure.
1084+nInstallFailureEvent :: Lens' Notification (Maybe InstallFailureEvent)
1085+nInstallFailureEvent
1086+ = lens _nInstallFailureEvent
1087+ (\ s a -> s{_nInstallFailureEvent = a})
1088+
1089+-- | Notifications about new app restrictions schema changes.
1090+nAppRestrictionsSchemaChangeEvent :: Lens' Notification (Maybe AppRestrictionsSchemaChangeEvent)
1091+nAppRestrictionsSchemaChangeEvent
1092+ = lens _nAppRestrictionsSchemaChangeEvent
1093+ (\ s a -> s{_nAppRestrictionsSchemaChangeEvent = a})
1094+
1095+-- | The time when the notification was published in milliseconds since
1096+-- 1970-01-01T00:00:00Z. This will always be present.
1097+nTimestampMillis :: Lens' Notification (Maybe Int64)
1098+nTimestampMillis
1099+ = lens _nTimestampMillis
1100+ (\ s a -> s{_nTimestampMillis = a})
1101+ . mapping _Coerce
1102+
1103+instance FromJSON Notification where
1104+ parseJSON
1105+ = withObject "Notification"
1106+ (\ o ->
1107+ Notification' <$>
1108+ (o .:? "enterpriseId") <*>
1109+ (o .:? "newPermissionsEvent")
1110+ <*> (o .:? "productApprovalEvent")
1111+ <*> (o .:? "productAvailabilityChangeEvent")
1112+ <*> (o .:? "appUpdateEvent")
1113+ <*> (o .:? "installFailureEvent")
1114+ <*> (o .:? "appRestrictionsSchemaChangeEvent")
1115+ <*> (o .:? "timestampMillis"))
1116+
1117+instance ToJSON Notification where
1118+ toJSON Notification'{..}
1119+ = object
1120+ (catMaybes
1121+ [("enterpriseId" .=) <$> _nEnterpriseId,
1122+ ("newPermissionsEvent" .=) <$> _nNewPermissionsEvent,
1123+ ("productApprovalEvent" .=) <$>
1124+ _nProductApprovalEvent,
1125+ ("productAvailabilityChangeEvent" .=) <$>
1126+ _nProductAvailabilityChangeEvent,
1127+ ("appUpdateEvent" .=) <$> _nAppUpdateEvent,
1128+ ("installFailureEvent" .=) <$> _nInstallFailureEvent,
1129+ ("appRestrictionsSchemaChangeEvent" .=) <$>
1130+ _nAppRestrictionsSchemaChangeEvent,
1131+ ("timestampMillis" .=) <$> _nTimestampMillis])
1132+
7491133--
7501134-- /See:/ 'pageInfo' smart constructor.
7511135data PageInfo = PageInfo'
@@ -856,6 +1240,179 @@ instance ToJSON ProductPermission where
8561240 [("state" .=) <$> _ppState,
8571241 ("permissionId" .=) <$> _ppPermissionId])
8581242
1243+-- | An event generated when new permissions are added to an app.
1244+--
1245+-- /See:/ 'newPermissionsEvent' smart constructor.
1246+data NewPermissionsEvent = NewPermissionsEvent'
1247+ { _npeRequestedPermissions :: !(Maybe [Text])
1248+ , _npeApprovedPermissions :: !(Maybe [Text])
1249+ , _npeProductId :: !(Maybe Text)
1250+ } deriving (Eq,Show,Data,Typeable,Generic)
1251+
1252+-- | Creates a value of 'NewPermissionsEvent' with the minimum fields required to make a request.
1253+--
1254+-- Use one of the following lenses to modify other fields as desired:
1255+--
1256+-- * 'npeRequestedPermissions'
1257+--
1258+-- * 'npeApprovedPermissions'
1259+--
1260+-- * 'npeProductId'
1261+newPermissionsEvent
1262+ :: NewPermissionsEvent
1263+newPermissionsEvent =
1264+ NewPermissionsEvent'
1265+ { _npeRequestedPermissions = Nothing
1266+ , _npeApprovedPermissions = Nothing
1267+ , _npeProductId = Nothing
1268+ }
1269+
1270+-- | The set of permissions that the app is currently requesting. Use
1271+-- Permissions.Get on the EMM API to retrieve details about these
1272+-- permissions.
1273+npeRequestedPermissions :: Lens' NewPermissionsEvent [Text]
1274+npeRequestedPermissions
1275+ = lens _npeRequestedPermissions
1276+ (\ s a -> s{_npeRequestedPermissions = a})
1277+ . _Default
1278+ . _Coerce
1279+
1280+-- | The set of permissions that the enterprise admin has already approved
1281+-- for this application. Use Permissions.Get on the EMM API to retrieve
1282+-- details about these permissions.
1283+npeApprovedPermissions :: Lens' NewPermissionsEvent [Text]
1284+npeApprovedPermissions
1285+ = lens _npeApprovedPermissions
1286+ (\ s a -> s{_npeApprovedPermissions = a})
1287+ . _Default
1288+ . _Coerce
1289+
1290+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which new
1291+-- permissions were added. This field will always be present.
1292+npeProductId :: Lens' NewPermissionsEvent (Maybe Text)
1293+npeProductId
1294+ = lens _npeProductId (\ s a -> s{_npeProductId = a})
1295+
1296+instance FromJSON NewPermissionsEvent where
1297+ parseJSON
1298+ = withObject "NewPermissionsEvent"
1299+ (\ o ->
1300+ NewPermissionsEvent' <$>
1301+ (o .:? "requestedPermissions" .!= mempty) <*>
1302+ (o .:? "approvedPermissions" .!= mempty)
1303+ <*> (o .:? "productId"))
1304+
1305+instance ToJSON NewPermissionsEvent where
1306+ toJSON NewPermissionsEvent'{..}
1307+ = object
1308+ (catMaybes
1309+ [("requestedPermissions" .=) <$>
1310+ _npeRequestedPermissions,
1311+ ("approvedPermissions" .=) <$>
1312+ _npeApprovedPermissions,
1313+ ("productId" .=) <$> _npeProductId])
1314+
1315+-- | An event generated whenever a product\'s availability changes.
1316+--
1317+-- /See:/ 'productAvailabilityChangeEvent' smart constructor.
1318+data ProductAvailabilityChangeEvent = ProductAvailabilityChangeEvent'
1319+ { _paceAvailabilityStatus :: !(Maybe Text)
1320+ , _paceProductId :: !(Maybe Text)
1321+ } deriving (Eq,Show,Data,Typeable,Generic)
1322+
1323+-- | Creates a value of 'ProductAvailabilityChangeEvent' with the minimum fields required to make a request.
1324+--
1325+-- Use one of the following lenses to modify other fields as desired:
1326+--
1327+-- * 'paceAvailabilityStatus'
1328+--
1329+-- * 'paceProductId'
1330+productAvailabilityChangeEvent
1331+ :: ProductAvailabilityChangeEvent
1332+productAvailabilityChangeEvent =
1333+ ProductAvailabilityChangeEvent'
1334+ { _paceAvailabilityStatus = Nothing
1335+ , _paceProductId = Nothing
1336+ }
1337+
1338+-- | The new state of the product. This field will always be present.
1339+paceAvailabilityStatus :: Lens' ProductAvailabilityChangeEvent (Maybe Text)
1340+paceAvailabilityStatus
1341+ = lens _paceAvailabilityStatus
1342+ (\ s a -> s{_paceAvailabilityStatus = a})
1343+
1344+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
1345+-- product availability changed. This field will always be present.
1346+paceProductId :: Lens' ProductAvailabilityChangeEvent (Maybe Text)
1347+paceProductId
1348+ = lens _paceProductId
1349+ (\ s a -> s{_paceProductId = a})
1350+
1351+instance FromJSON ProductAvailabilityChangeEvent
1352+ where
1353+ parseJSON
1354+ = withObject "ProductAvailabilityChangeEvent"
1355+ (\ o ->
1356+ ProductAvailabilityChangeEvent' <$>
1357+ (o .:? "availabilityStatus") <*> (o .:? "productId"))
1358+
1359+instance ToJSON ProductAvailabilityChangeEvent where
1360+ toJSON ProductAvailabilityChangeEvent'{..}
1361+ = object
1362+ (catMaybes
1363+ [("availabilityStatus" .=) <$>
1364+ _paceAvailabilityStatus,
1365+ ("productId" .=) <$> _paceProductId])
1366+
1367+-- | An event generated when a product\'s approval status is changed.
1368+--
1369+-- /See:/ 'productApprovalEvent' smart constructor.
1370+data ProductApprovalEvent = ProductApprovalEvent'
1371+ { _paeApproved :: !(Maybe Text)
1372+ , _paeProductId :: !(Maybe Text)
1373+ } deriving (Eq,Show,Data,Typeable,Generic)
1374+
1375+-- | Creates a value of 'ProductApprovalEvent' with the minimum fields required to make a request.
1376+--
1377+-- Use one of the following lenses to modify other fields as desired:
1378+--
1379+-- * 'paeApproved'
1380+--
1381+-- * 'paeProductId'
1382+productApprovalEvent
1383+ :: ProductApprovalEvent
1384+productApprovalEvent =
1385+ ProductApprovalEvent'
1386+ { _paeApproved = Nothing
1387+ , _paeProductId = Nothing
1388+ }
1389+
1390+-- | Whether the product was approved or unapproved. This field will always
1391+-- be present.
1392+paeApproved :: Lens' ProductApprovalEvent (Maybe Text)
1393+paeApproved
1394+ = lens _paeApproved (\ s a -> s{_paeApproved = a})
1395+
1396+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
1397+-- approval status has changed. This field will always be present.
1398+paeProductId :: Lens' ProductApprovalEvent (Maybe Text)
1399+paeProductId
1400+ = lens _paeProductId (\ s a -> s{_paeProductId = a})
1401+
1402+instance FromJSON ProductApprovalEvent where
1403+ parseJSON
1404+ = withObject "ProductApprovalEvent"
1405+ (\ o ->
1406+ ProductApprovalEvent' <$>
1407+ (o .:? "approved") <*> (o .:? "productId"))
1408+
1409+instance ToJSON ProductApprovalEvent where
1410+ toJSON ProductApprovalEvent'{..}
1411+ = object
1412+ (catMaybes
1413+ [("approved" .=) <$> _paeApproved,
1414+ ("productId" .=) <$> _paeProductId])
1415+
8591416-- | A device resource represents a mobile device managed by the EMM and
8601417-- belonging to a specific enterprise user. This collection cannot be
8611418-- modified via the API; it is automatically populated as devices are set
@@ -891,13 +1448,17 @@ device =
8911448dKind :: Lens' Device Text
8921449dKind = lens _dKind (\ s a -> s{_dKind = a})
8931450
894−-- | The mechanism by which this device is managed by the EMM.
895−-- \"managedDevice\" means that the EMM\'s app is a device owner.
896−-- \"managedProfile\" means that the EMM\'s app is the profile owner (and
897−-- there is a separate personal profile which is not managed).
898−-- \"containerApp\" means that the EMM\'s app is managing the Android for
899−-- Work container app on the device. ?unmanagedProfile? means that the
900−-- EMM?s app is managing a managed user on an unmanaged device
1451+-- | Identifies the extent to which the device is controlled by an Android
1452+-- for Work EMM in various deployment configurations. Possible values
1453+-- include: - \"managedDevice\", a device that has the EMM\'s device policy
1454+-- controller (DPC) as the device owner, - \"managedProfile\", a device
1455+-- that has a work profile managed by the DPC (DPC is profile owner) in
1456+-- addition to a separate, personal profile that is unavailable to the DPC,
1457+-- - \"containerApp\", a device running the Android for Work App. The
1458+-- Android for Work App is managed by the DPC, - \"unmanagedProfile\", a
1459+-- device that has been allowed (by the domain\'s admin, using the Admin
1460+-- Console to enable the privilege) to use Android for Work apps or Google
1461+-- Apps for Work, but the profile is itself not owned by a DPC.
9011462dManagementType :: Lens' Device (Maybe Text)
9021463dManagementType
9031464 = lens _dManagementType
@@ -926,6 +1487,75 @@ instance ToJSON Device where
9261487 ("managementType" .=) <$> _dManagementType,
9271488 ("androidId" .=) <$> _dAndroidId])
9281489
1490+-- | Credentials that can be used to authenticate as a service account.
1491+--
1492+-- /See:/ 'serviceAccountKey' smart constructor.
1493+data ServiceAccountKey = ServiceAccountKey'
1494+ { _sakKind :: !Text
1495+ , _sakData :: !(Maybe Text)
1496+ , _sakId :: !(Maybe Text)
1497+ , _sakType :: !(Maybe Text)
1498+ } deriving (Eq,Show,Data,Typeable,Generic)
1499+
1500+-- | Creates a value of 'ServiceAccountKey' with the minimum fields required to make a request.
1501+--
1502+-- Use one of the following lenses to modify other fields as desired:
1503+--
1504+-- * 'sakKind'
1505+--
1506+-- * 'sakData'
1507+--
1508+-- * 'sakId'
1509+--
1510+-- * 'sakType'
1511+serviceAccountKey
1512+ :: ServiceAccountKey
1513+serviceAccountKey =
1514+ ServiceAccountKey'
1515+ { _sakKind = "androidenterprise#serviceAccountKey"
1516+ , _sakData = Nothing
1517+ , _sakId = Nothing
1518+ , _sakType = Nothing
1519+ }
1520+
1521+-- | Identifies what kind of resource this is. Value: the fixed string
1522+-- \"androidenterprise#serviceAccountKey\".
1523+sakKind :: Lens' ServiceAccountKey Text
1524+sakKind = lens _sakKind (\ s a -> s{_sakKind = a})
1525+
1526+-- | The body of the private key credentials file, in string format. This is
1527+-- only populated when the ServiceAccountKey is created, and is not stored
1528+-- by Google.
1529+sakData :: Lens' ServiceAccountKey (Maybe Text)
1530+sakData = lens _sakData (\ s a -> s{_sakData = a})
1531+
1532+-- | An opaque, unique identifier for this ServiceAccountKey. Assigned by the
1533+-- server.
1534+sakId :: Lens' ServiceAccountKey (Maybe Text)
1535+sakId = lens _sakId (\ s a -> s{_sakId = a})
1536+
1537+-- | The file format of the generated key data.
1538+sakType :: Lens' ServiceAccountKey (Maybe Text)
1539+sakType = lens _sakType (\ s a -> s{_sakType = a})
1540+
1541+instance FromJSON ServiceAccountKey where
1542+ parseJSON
1543+ = withObject "ServiceAccountKey"
1544+ (\ o ->
1545+ ServiceAccountKey' <$>
1546+ (o .:? "kind" .!=
1547+ "androidenterprise#serviceAccountKey")
1548+ <*> (o .:? "data")
1549+ <*> (o .:? "id")
1550+ <*> (o .:? "type"))
1551+
1552+instance ToJSON ServiceAccountKey where
1553+ toJSON ServiceAccountKey'{..}
1554+ = object
1555+ (catMaybes
1556+ [Just ("kind" .= _sakKind), ("data" .=) <$> _sakData,
1557+ ("id" .=) <$> _sakId, ("type" .=) <$> _sakType])
1558+
9291559-- | The install resources for the device.
9301560--
9311561-- /See:/ 'installsListResponse' smart constructor.
@@ -983,13 +1613,14 @@ instance ToJSON InstallsListResponse where
9831613--
9841614-- /See:/ 'appRestrictionsSchemaRestriction' smart constructor.
9851615data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction'
986− { _arsrRestrictionType :: !(Maybe Text)
987− , _arsrEntry :: !(Maybe [Text])
988− , _arsrKey :: !(Maybe Text)
989− , _arsrEntryValue :: !(Maybe [Text])
990− , _arsrDefaultValue :: !(Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
991− , _arsrTitle :: !(Maybe Text)
992− , _arsrDescription :: !(Maybe Text)
1616+ { _arsrRestrictionType :: !(Maybe Text)
1617+ , _arsrEntry :: !(Maybe [Text])
1618+ , _arsrKey :: !(Maybe Text)
1619+ , _arsrEntryValue :: !(Maybe [Text])
1620+ , _arsrDefaultValue :: !(Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
1621+ , _arsrTitle :: !(Maybe Text)
1622+ , _arsrDescription :: !(Maybe Text)
1623+ , _arsrNestedRestriction :: !(Maybe [AppRestrictionsSchemaRestriction])
9931624 } deriving (Eq,Show,Data,Typeable,Generic)
9941625
9951626-- | Creates a value of 'AppRestrictionsSchemaRestriction' with the minimum fields required to make a request.
@@ -1009,6 +1640,8 @@ data AppRestrictionsSchemaRestriction = AppRestrictionsSchemaRestriction'
10091640-- * 'arsrTitle'
10101641--
10111642-- * 'arsrDescription'
1643+--
1644+-- * 'arsrNestedRestriction'
10121645appRestrictionsSchemaRestriction
10131646 :: AppRestrictionsSchemaRestriction
10141647appRestrictionsSchemaRestriction =
@@ -1020,6 +1653,7 @@ appRestrictionsSchemaRestriction =
10201653 , _arsrDefaultValue = Nothing
10211654 , _arsrTitle = Nothing
10221655 , _arsrDescription = Nothing
1656+ , _arsrNestedRestriction = Nothing
10231657 }
10241658
10251659-- | The type of the restriction.
@@ -1042,7 +1676,9 @@ arsrKey :: Lens' AppRestrictionsSchemaRestriction (Maybe Text)
10421676arsrKey = lens _arsrKey (\ s a -> s{_arsrKey = a})
10431677
10441678-- | For choice or multiselect restrictions, the list of possible entries\'
1045−-- machine-readable values.
1679+-- machine-readable values. These values should be used in the
1680+-- configuration, either as a single string value for a choice restriction
1681+-- or in a stringArray for a multiselect restriction.
10461682arsrEntryValue :: Lens' AppRestrictionsSchemaRestriction [Text]
10471683arsrEntryValue
10481684 = lens _arsrEntryValue
@@ -1050,7 +1686,8 @@ arsrEntryValue
10501686 . _Default
10511687 . _Coerce
10521688
1053−-- | The default value of the restriction.
1689+-- | The default value of the restriction. bundle and bundleArray
1690+-- restrictions never have a default value.
10541691arsrDefaultValue :: Lens' AppRestrictionsSchemaRestriction (Maybe AppRestrictionsSchemaRestrictionRestrictionValue)
10551692arsrDefaultValue
10561693 = lens _arsrDefaultValue
@@ -1068,6 +1705,16 @@ arsrDescription
10681705 = lens _arsrDescription
10691706 (\ s a -> s{_arsrDescription = a})
10701707
1708+-- | For bundle or bundleArray restrictions, the list of nested restrictions.
1709+-- A bundle restriction is always nested within a bundleArray restriction,
1710+-- and a bundleArray restriction is at most two levels deep.
1711+arsrNestedRestriction :: Lens' AppRestrictionsSchemaRestriction [AppRestrictionsSchemaRestriction]
1712+arsrNestedRestriction
1713+ = lens _arsrNestedRestriction
1714+ (\ s a -> s{_arsrNestedRestriction = a})
1715+ . _Default
1716+ . _Coerce
1717+
10711718instance FromJSON AppRestrictionsSchemaRestriction
10721719 where
10731720 parseJSON
@@ -1080,7 +1727,8 @@ instance FromJSON AppRestrictionsSchemaRestriction
10801727 <*> (o .:? "entryValue" .!= mempty)
10811728 <*> (o .:? "defaultValue")
10821729 <*> (o .:? "title")
1083− <*> (o .:? "description"))
1730+ <*> (o .:? "description")
1731+ <*> (o .:? "nestedRestriction" .!= mempty))
10841732
10851733instance ToJSON AppRestrictionsSchemaRestriction
10861734 where
@@ -1092,7 +1740,41 @@ instance ToJSON AppRestrictionsSchemaRestriction
10921740 ("entryValue" .=) <$> _arsrEntryValue,
10931741 ("defaultValue" .=) <$> _arsrDefaultValue,
10941742 ("title" .=) <$> _arsrTitle,
1095− ("description" .=) <$> _arsrDescription])
1743+ ("description" .=) <$> _arsrDescription,
1744+ ("nestedRestriction" .=) <$> _arsrNestedRestriction])
1745+
1746+-- | This represents an enterprise administrator who can manage the
1747+-- enterprise in the Google Play for Work Store.
1748+--
1749+-- /See:/ 'administrator' smart constructor.
1750+newtype Administrator = Administrator'
1751+ { _aEmail :: Maybe Text
1752+ } deriving (Eq,Show,Data,Typeable,Generic)
1753+
1754+-- | Creates a value of 'Administrator' with the minimum fields required to make a request.
1755+--
1756+-- Use one of the following lenses to modify other fields as desired:
1757+--
1758+-- * 'aEmail'
1759+administrator
1760+ :: Administrator
1761+administrator =
1762+ Administrator'
1763+ { _aEmail = Nothing
1764+ }
1765+
1766+-- | The administrator\'s email address.
1767+aEmail :: Lens' Administrator (Maybe Text)
1768+aEmail = lens _aEmail (\ s a -> s{_aEmail = a})
1769+
1770+instance FromJSON Administrator where
1771+ parseJSON
1772+ = withObject "Administrator"
1773+ (\ o -> Administrator' <$> (o .:? "email"))
1774+
1775+instance ToJSON Administrator where
1776+ toJSON Administrator'{..}
1777+ = object (catMaybes [("email" .=) <$> _aEmail])
10961778
10971779-- | The matching user resources.
10981780--
@@ -1144,6 +1826,57 @@ instance ToJSON UsersListResponse where
11441826 [Just ("kind" .= _ulrKind),
11451827 ("user" .=) <$> _ulrUser])
11461828
1829+-- | An AuthenticationToken is used by the EMM\'s device policy client on a
1830+-- device to provision the given EMM-managed user on that device.
1831+--
1832+-- /See:/ 'authenticationToken' smart constructor.
1833+data AuthenticationToken = AuthenticationToken'
1834+ { _atKind :: !Text
1835+ , _atToken :: !(Maybe Text)
1836+ } deriving (Eq,Show,Data,Typeable,Generic)
1837+
1838+-- | Creates a value of 'AuthenticationToken' with the minimum fields required to make a request.
1839+--
1840+-- Use one of the following lenses to modify other fields as desired:
1841+--
1842+-- * 'atKind'
1843+--
1844+-- * 'atToken'
1845+authenticationToken
1846+ :: AuthenticationToken
1847+authenticationToken =
1848+ AuthenticationToken'
1849+ { _atKind = "androidenterprise#authenticationToken"
1850+ , _atToken = Nothing
1851+ }
1852+
1853+-- | Identifies what kind of resource this is. Value: the fixed string
1854+-- \"androidenterprise#authenticationToken\".
1855+atKind :: Lens' AuthenticationToken Text
1856+atKind = lens _atKind (\ s a -> s{_atKind = a})
1857+
1858+-- | The authentication token to be passed to the device policy client on the
1859+-- device where it can be used to provision the account for which this
1860+-- token was generated.
1861+atToken :: Lens' AuthenticationToken (Maybe Text)
1862+atToken = lens _atToken (\ s a -> s{_atToken = a})
1863+
1864+instance FromJSON AuthenticationToken where
1865+ parseJSON
1866+ = withObject "AuthenticationToken"
1867+ (\ o ->
1868+ AuthenticationToken' <$>
1869+ (o .:? "kind" .!=
1870+ "androidenterprise#authenticationToken")
1871+ <*> (o .:? "token"))
1872+
1873+instance ToJSON AuthenticationToken where
1874+ toJSON AuthenticationToken'{..}
1875+ = object
1876+ (catMaybes
1877+ [Just ("kind" .= _atKind),
1878+ ("token" .=) <$> _atToken])
1879+
11471880-- | This represents a single version of the app.
11481881--
11491882-- /See:/ 'appVersion' smart constructor.
@@ -1196,6 +1929,46 @@ instance ToJSON AppVersion where
11961929 [("versionCode" .=) <$> _avVersionCode,
11971930 ("versionString" .=) <$> _avVersionString])
11981931
1932+-- | A bundle of managed properties.
1933+--
1934+-- /See:/ 'managedPropertyBundle' smart constructor.
1935+newtype ManagedPropertyBundle = ManagedPropertyBundle'
1936+ { _mpbManagedProperty :: Maybe [ManagedProperty]
1937+ } deriving (Eq,Show,Data,Typeable,Generic)
1938+
1939+-- | Creates a value of 'ManagedPropertyBundle' with the minimum fields required to make a request.
1940+--
1941+-- Use one of the following lenses to modify other fields as desired:
1942+--
1943+-- * 'mpbManagedProperty'
1944+managedPropertyBundle
1945+ :: ManagedPropertyBundle
1946+managedPropertyBundle =
1947+ ManagedPropertyBundle'
1948+ { _mpbManagedProperty = Nothing
1949+ }
1950+
1951+-- | The list of managed properties.
1952+mpbManagedProperty :: Lens' ManagedPropertyBundle [ManagedProperty]
1953+mpbManagedProperty
1954+ = lens _mpbManagedProperty
1955+ (\ s a -> s{_mpbManagedProperty = a})
1956+ . _Default
1957+ . _Coerce
1958+
1959+instance FromJSON ManagedPropertyBundle where
1960+ parseJSON
1961+ = withObject "ManagedPropertyBundle"
1962+ (\ o ->
1963+ ManagedPropertyBundle' <$>
1964+ (o .:? "managedProperty" .!= mempty))
1965+
1966+instance ToJSON ManagedPropertyBundle where
1967+ toJSON ManagedPropertyBundle'{..}
1968+ = object
1969+ (catMaybes
1970+ [("managedProperty" .=) <$> _mpbManagedProperty])
1971+
11991972-- | The grouplicense resources for the enterprise.
12001973--
12011974-- /See:/ 'groupLicensesListResponse' smart constructor.
@@ -1353,8 +2126,9 @@ instance ToJSON Collection where
13532126--
13542127-- /See:/ 'productSet' smart constructor.
13552128data ProductSet = ProductSet'
1356− { _psKind :: !Text
1357− , _psProductId :: !(Maybe [Text])
2129+ { _psKind :: !Text
2130+ , _psProductSetBehavior :: !(Maybe Text)
2131+ , _psProductId :: !(Maybe [Text])
13582132 } deriving (Eq,Show,Data,Typeable,Generic)
13592133
13602134-- | Creates a value of 'ProductSet' with the minimum fields required to make a request.
@@ -1363,12 +2137,15 @@ data ProductSet = ProductSet'
13632137--
13642138-- * 'psKind'
13652139--
2140+-- * 'psProductSetBehavior'
2141+--
13662142-- * 'psProductId'
13672143productSet
13682144 :: ProductSet
13692145productSet =
13702146 ProductSet'
13712147 { _psKind = "androidenterprise#productSet"
2148+ , _psProductSetBehavior = Nothing
13722149 , _psProductId = Nothing
13732150 }
13742151
@@ -1377,6 +2154,17 @@ productSet =
13772154psKind :: Lens' ProductSet Text
13782155psKind = lens _psKind (\ s a -> s{_psKind = a})
13792156
2157+-- | The interpretation of this product set. \"unknown\" should never be sent
2158+-- and ignored if received. \"whitelist\" means that this product set
2159+-- constitutes a whitelist. \"includeAll\" means that all products are
2160+-- accessible (the value of the productId field is therefore ignored). If a
2161+-- value is not supplied, it is interpreted to be \"whitelist\" for
2162+-- backwards compatibility.
2163+psProductSetBehavior :: Lens' ProductSet (Maybe Text)
2164+psProductSetBehavior
2165+ = lens _psProductSetBehavior
2166+ (\ s a -> s{_psProductSetBehavior = a})
2167+
13802168-- | The list of product IDs making up the set of products.
13812169psProductId :: Lens' ProductSet [Text]
13822170psProductId
@@ -1390,13 +2178,15 @@ instance FromJSON ProductSet where
13902178 (\ o ->
13912179 ProductSet' <$>
13922180 (o .:? "kind" .!= "androidenterprise#productSet") <*>
1393− (o .:? "productId" .!= mempty))
2181+ (o .:? "productSetBehavior")
2182+ <*> (o .:? "productId" .!= mempty))
13942183
13952184instance ToJSON ProductSet where
13962185 toJSON ProductSet'{..}
13972186 = object
13982187 (catMaybes
13992188 [Just ("kind" .= _psKind),
2189+ ("productSetBehavior" .=) <$> _psProductSetBehavior,
14002190 ("productId" .=) <$> _psProductId])
14012191
14022192-- | The existence of an install resource indicates that an app is installed
@@ -1494,71 +2284,233 @@ instance ToJSON Install where
14942284 ("installState" .=) <$> _iInstallState,
14952285 ("productId" .=) <$> _iProductId])
14962286
1497−-- | A user resource represents an individual user within the enterprise\'s
1498−-- domain. Note that each user is associated with a Google account based on
1499−-- the user\'s corporate email address (which must be in one of the
1500−-- enterprise\'s domains). As part of installing the EMM\'s DPC app to
1501−-- manage a device the Google account must be provisioned to the device,
1502−-- and so the user resource must be created before that. This can be done
1503−-- using the Google Admin SDK Directory API. The ID for a user is an opaque
1504−-- string. It can be retrieved using the list method queried by the user\'s
1505−-- primary email address.
2287+--
2288+-- /See:/ 'serviceAccountKeysListResponse' smart constructor.
2289+newtype ServiceAccountKeysListResponse = ServiceAccountKeysListResponse'
2290+ { _saklrServiceAccountKey :: Maybe [ServiceAccountKey]
2291+ } deriving (Eq,Show,Data,Typeable,Generic)
2292+
2293+-- | Creates a value of 'ServiceAccountKeysListResponse' with the minimum fields required to make a request.
2294+--
2295+-- Use one of the following lenses to modify other fields as desired:
2296+--
2297+-- * 'saklrServiceAccountKey'
2298+serviceAccountKeysListResponse
2299+ :: ServiceAccountKeysListResponse
2300+serviceAccountKeysListResponse =
2301+ ServiceAccountKeysListResponse'
2302+ { _saklrServiceAccountKey = Nothing
2303+ }
2304+
2305+-- | The service account credentials.
2306+saklrServiceAccountKey :: Lens' ServiceAccountKeysListResponse [ServiceAccountKey]
2307+saklrServiceAccountKey
2308+ = lens _saklrServiceAccountKey
2309+ (\ s a -> s{_saklrServiceAccountKey = a})
2310+ . _Default
2311+ . _Coerce
2312+
2313+instance FromJSON ServiceAccountKeysListResponse
2314+ where
2315+ parseJSON
2316+ = withObject "ServiceAccountKeysListResponse"
2317+ (\ o ->
2318+ ServiceAccountKeysListResponse' <$>
2319+ (o .:? "serviceAccountKey" .!= mempty))
2320+
2321+instance ToJSON ServiceAccountKeysListResponse where
2322+ toJSON ServiceAccountKeysListResponse'{..}
2323+ = object
2324+ (catMaybes
2325+ [("serviceAccountKey" .=) <$>
2326+ _saklrServiceAccountKey])
2327+
2328+-- | A Users resource represents an account associated with an enterprise.
2329+-- The account may be specific to a device or to an individual user (who
2330+-- can then use the account across multiple devices). The account may
2331+-- provide access to Google Play for Work only, or to other Google
2332+-- services, depending on the identity model: - Google managed domain
2333+-- identity model requires synchronization to Google account sources (via
2334+-- primaryEmail). - Android for Work Accounts identity model provides a
2335+-- dynamic means for enterprises to create user or device accounts as
2336+-- needed. These accounts provide access to Google Play for Work only.
15062337--
15072338-- /See:/ 'user' smart constructor.
15082339data User = User'
1509− { _uKind :: !Text
1510− , _uId :: !(Maybe Text)
1511− , _uPrimaryEmail :: !(Maybe Text)
2340+ { _uAccountIdentifier :: !(Maybe Text)
2341+ , _uKind :: !Text
2342+ , _uDisplayName :: !(Maybe Text)
2343+ , _uId :: !(Maybe Text)
2344+ , _uPrimaryEmail :: !(Maybe Text)
2345+ , _uManagementType :: !(Maybe Text)
2346+ , _uAccountType :: !(Maybe Text)
15122347 } deriving (Eq,Show,Data,Typeable,Generic)
15132348
15142349-- | Creates a value of 'User' with the minimum fields required to make a request.
15152350--
15162351-- Use one of the following lenses to modify other fields as desired:
15172352--
2353+-- * 'uAccountIdentifier'
2354+--
15182355-- * 'uKind'
15192356--
2357+-- * 'uDisplayName'
2358+--
15202359-- * 'uId'
15212360--
15222361-- * 'uPrimaryEmail'
2362+--
2363+-- * 'uManagementType'
2364+--
2365+-- * 'uAccountType'
15232366user
15242367 :: User
15252368user =
15262369 User'
1527− { _uKind = "androidenterprise#user"
2370+ { _uAccountIdentifier = Nothing
2371+ , _uKind = "androidenterprise#user"
2372+ , _uDisplayName = Nothing
15282373 , _uId = Nothing
15292374 , _uPrimaryEmail = Nothing
2375+ , _uManagementType = Nothing
2376+ , _uAccountType = Nothing
15302377 }
15312378
2379+-- | A unique identifier you create for this user, such as \"user342\" or
2380+-- \"asset#44418\". Do not use personally identifiable information (PII)
2381+-- for this property. Must always be set for EMM-managed users. Not set for
2382+-- Google-managed users.
2383+uAccountIdentifier :: Lens' User (Maybe Text)
2384+uAccountIdentifier
2385+ = lens _uAccountIdentifier
2386+ (\ s a -> s{_uAccountIdentifier = a})
2387+
15322388-- | Identifies what kind of resource this is. Value: the fixed string
15332389-- \"androidenterprise#user\".
15342390uKind :: Lens' User Text
15352391uKind = lens _uKind (\ s a -> s{_uKind = a})
15362392
2393+-- | The name that will appear in user interfaces. Setting this property is
2394+-- optional when creating EMM-managed users. If you do set this property,
2395+-- use something generic about the organization (such as \"Example, Inc.\")
2396+-- or your name (as EMM). Not used for Google-managed user accounts.
2397+uDisplayName :: Lens' User (Maybe Text)
2398+uDisplayName
2399+ = lens _uDisplayName (\ s a -> s{_uDisplayName = a})
2400+
15372401-- | The unique ID for the user.
15382402uId :: Lens' User (Maybe Text)
15392403uId = lens _uId (\ s a -> s{_uId = a})
15402404
1541−-- | The user\'s primary email, e.g. \"jsmith\'example.com\".
2405+-- | The user\'s primary email address, for example, \"jsmith\'example.com\".
2406+-- Will always be set for Google managed users and not set for EMM managed
2407+-- users.
15422408uPrimaryEmail :: Lens' User (Maybe Text)
15432409uPrimaryEmail
15442410 = lens _uPrimaryEmail
15452411 (\ s a -> s{_uPrimaryEmail = a})
15462412
2413+-- | The entity that manages the user. With googleManaged users, the source
2414+-- of truth is Google so EMMs have to make sure a Google Account exists for
2415+-- the user. With emmManaged users, the EMM is in charge.
2416+uManagementType :: Lens' User (Maybe Text)
2417+uManagementType
2418+ = lens _uManagementType
2419+ (\ s a -> s{_uManagementType = a})
2420+
2421+-- | The type of account that this user represents. A userAccount can be
2422+-- installed on multiple devices, but a deviceAccount is specific to a
2423+-- single device. An EMM-managed user (emmManaged) can be either type
2424+-- (userAccount, deviceAccount), but a Google-managed user (googleManaged)
2425+-- is always a userAccount.
2426+uAccountType :: Lens' User (Maybe Text)
2427+uAccountType
2428+ = lens _uAccountType (\ s a -> s{_uAccountType = a})
2429+
15472430instance FromJSON User where
15482431 parseJSON
15492432 = withObject "User"
15502433 (\ o ->
15512434 User' <$>
1552− (o .:? "kind" .!= "androidenterprise#user") <*>
1553− (o .:? "id")
1554− <*> (o .:? "primaryEmail"))
2435+ (o .:? "accountIdentifier") <*>
2436+ (o .:? "kind" .!= "androidenterprise#user")
2437+ <*> (o .:? "displayName")
2438+ <*> (o .:? "id")
2439+ <*> (o .:? "primaryEmail")
2440+ <*> (o .:? "managementType")
2441+ <*> (o .:? "accountType"))
15552442
15562443instance ToJSON User where
15572444 toJSON User'{..}
15582445 = object
15592446 (catMaybes
1560− [Just ("kind" .= _uKind), ("id" .=) <$> _uId,
1561− ("primaryEmail" .=) <$> _uPrimaryEmail])
2447+ [("accountIdentifier" .=) <$> _uAccountIdentifier,
2448+ Just ("kind" .= _uKind),
2449+ ("displayName" .=) <$> _uDisplayName,
2450+ ("id" .=) <$> _uId,
2451+ ("primaryEmail" .=) <$> _uPrimaryEmail,
2452+ ("managementType" .=) <$> _uManagementType,
2453+ ("accountType" .=) <$> _uAccountType])
2454+
2455+-- | The managed configuration resources for the device.
2456+--
2457+-- /See:/ 'managedConfigurationsForDeviceListResponse' smart constructor.
2458+data ManagedConfigurationsForDeviceListResponse = ManagedConfigurationsForDeviceListResponse'
2459+ { _mcfdlrKind :: !Text
2460+ , _mcfdlrManagedConfigurationForDevice :: !(Maybe [ManagedConfiguration])
2461+ } deriving (Eq,Show,Data,Typeable,Generic)
2462+
2463+-- | Creates a value of 'ManagedConfigurationsForDeviceListResponse' with the minimum fields required to make a request.
2464+--
2465+-- Use one of the following lenses to modify other fields as desired:
2466+--
2467+-- * 'mcfdlrKind'
2468+--
2469+-- * 'mcfdlrManagedConfigurationForDevice'
2470+managedConfigurationsForDeviceListResponse
2471+ :: ManagedConfigurationsForDeviceListResponse
2472+managedConfigurationsForDeviceListResponse =
2473+ ManagedConfigurationsForDeviceListResponse'
2474+ { _mcfdlrKind = "androidenterprise#managedConfigurationsForDeviceListResponse"
2475+ , _mcfdlrManagedConfigurationForDevice = Nothing
2476+ }
2477+
2478+-- | Identifies what kind of resource this is. Value: the fixed string
2479+-- \"androidenterprise#managedConfigurationsForDeviceListResponse\".
2480+mcfdlrKind :: Lens' ManagedConfigurationsForDeviceListResponse Text
2481+mcfdlrKind
2482+ = lens _mcfdlrKind (\ s a -> s{_mcfdlrKind = a})
2483+
2484+-- | A managed configuration for an app on a specific device.
2485+mcfdlrManagedConfigurationForDevice :: Lens' ManagedConfigurationsForDeviceListResponse [ManagedConfiguration]
2486+mcfdlrManagedConfigurationForDevice
2487+ = lens _mcfdlrManagedConfigurationForDevice
2488+ (\ s a ->
2489+ s{_mcfdlrManagedConfigurationForDevice = a})
2490+ . _Default
2491+ . _Coerce
2492+
2493+instance FromJSON
2494+ ManagedConfigurationsForDeviceListResponse where
2495+ parseJSON
2496+ = withObject
2497+ "ManagedConfigurationsForDeviceListResponse"
2498+ (\ o ->
2499+ ManagedConfigurationsForDeviceListResponse' <$>
2500+ (o .:? "kind" .!=
2501+ "androidenterprise#managedConfigurationsForDeviceListResponse")
2502+ <*>
2503+ (o .:? "managedConfigurationForDevice" .!= mempty))
2504+
2505+instance ToJSON
2506+ ManagedConfigurationsForDeviceListResponse where
2507+ toJSON
2508+ ManagedConfigurationsForDeviceListResponse'{..}
2509+ = object
2510+ (catMaybes
2511+ [Just ("kind" .= _mcfdlrKind),
2512+ ("managedConfigurationForDevice" .=) <$>
2513+ _mcfdlrManagedConfigurationForDevice])
15622514
15632515--
15642516-- /See:/ 'productsGenerateApprovalURLResponse' smart constructor.
@@ -1733,6 +2685,102 @@ instance ToJSON
17332685 [("topicName" .=) <$> _estpnrTopicName,
17342686 ("messageId" .=) <$> _estpnrMessageId])
17352687
2688+-- | A service account identity, including the name and credentials that can
2689+-- be used to authenticate as the service account.
2690+--
2691+-- /See:/ 'serviceAccount' smart constructor.
2692+data ServiceAccount = ServiceAccount'
2693+ { _saKind :: !Text
2694+ , _saKey :: !(Maybe ServiceAccountKey)
2695+ , _saName :: !(Maybe Text)
2696+ } deriving (Eq,Show,Data,Typeable,Generic)
2697+
2698+-- | Creates a value of 'ServiceAccount' with the minimum fields required to make a request.
2699+--
2700+-- Use one of the following lenses to modify other fields as desired:
2701+--
2702+-- * 'saKind'
2703+--
2704+-- * 'saKey'
2705+--
2706+-- * 'saName'
2707+serviceAccount
2708+ :: ServiceAccount
2709+serviceAccount =
2710+ ServiceAccount'
2711+ { _saKind = "androidenterprise#serviceAccount"
2712+ , _saKey = Nothing
2713+ , _saName = Nothing
2714+ }
2715+
2716+-- | Identifies what kind of resource this is. Value: the fixed string
2717+-- \"androidenterprise#serviceAccount\".
2718+saKind :: Lens' ServiceAccount Text
2719+saKind = lens _saKind (\ s a -> s{_saKind = a})
2720+
2721+-- | Credentials that can be used to authenticate as this ServiceAccount.
2722+saKey :: Lens' ServiceAccount (Maybe ServiceAccountKey)
2723+saKey = lens _saKey (\ s a -> s{_saKey = a})
2724+
2725+-- | The account name of the service account, in the form of an email
2726+-- address. Assigned by the server.
2727+saName :: Lens' ServiceAccount (Maybe Text)
2728+saName = lens _saName (\ s a -> s{_saName = a})
2729+
2730+instance FromJSON ServiceAccount where
2731+ parseJSON
2732+ = withObject "ServiceAccount"
2733+ (\ o ->
2734+ ServiceAccount' <$>
2735+ (o .:? "kind" .!= "androidenterprise#serviceAccount")
2736+ <*> (o .:? "key")
2737+ <*> (o .:? "name"))
2738+
2739+instance ToJSON ServiceAccount where
2740+ toJSON ServiceAccount'{..}
2741+ = object
2742+ (catMaybes
2743+ [Just ("kind" .= _saKind), ("key" .=) <$> _saKey,
2744+ ("name" .=) <$> _saName])
2745+
2746+-- | An event generated when a new version of an app is uploaded to Google
2747+-- Play. Notifications are sent for new public versions only: alpha, beta,
2748+-- or canary versions do not generate this event. To fetch up-to-date
2749+-- version history for an app, use Products.Get on the EMM API.
2750+--
2751+-- /See:/ 'appUpdateEvent' smart constructor.
2752+newtype AppUpdateEvent = AppUpdateEvent'
2753+ { _aueProductId :: Maybe Text
2754+ } deriving (Eq,Show,Data,Typeable,Generic)
2755+
2756+-- | Creates a value of 'AppUpdateEvent' with the minimum fields required to make a request.
2757+--
2758+-- Use one of the following lenses to modify other fields as desired:
2759+--
2760+-- * 'aueProductId'
2761+appUpdateEvent
2762+ :: AppUpdateEvent
2763+appUpdateEvent =
2764+ AppUpdateEvent'
2765+ { _aueProductId = Nothing
2766+ }
2767+
2768+-- | The id of the product (e.g. \"app:com.google.android.gm\") that was
2769+-- updated. This field will always be present.
2770+aueProductId :: Lens' AppUpdateEvent (Maybe Text)
2771+aueProductId
2772+ = lens _aueProductId (\ s a -> s{_aueProductId = a})
2773+
2774+instance FromJSON AppUpdateEvent where
2775+ parseJSON
2776+ = withObject "AppUpdateEvent"
2777+ (\ o -> AppUpdateEvent' <$> (o .:? "productId"))
2778+
2779+instance ToJSON AppUpdateEvent where
2780+ toJSON AppUpdateEvent'{..}
2781+ = object
2782+ (catMaybes [("productId" .=) <$> _aueProductId])
2783+
17362784-- | The matching enterprise resources.
17372785--
17382786-- /See:/ 'enterprisesListResponse' smart constructor.
@@ -1785,6 +2833,75 @@ instance ToJSON EnterprisesListResponse where
17852833 [Just ("kind" .= _elrKind),
17862834 ("enterprise" .=) <$> _elrEnterprise])
17872835
2836+-- | A resource returned by the PullNotificationSet API, which contains a
2837+-- collection of notifications for enterprises associated with the service
2838+-- account authenticated for the request.
2839+--
2840+-- /See:/ 'notificationSet' smart constructor.
2841+data NotificationSet = NotificationSet'
2842+ { _nsNotificationSetId :: !(Maybe Text)
2843+ , _nsNotification :: !(Maybe [Notification])
2844+ , _nsKind :: !Text
2845+ } deriving (Eq,Show,Data,Typeable,Generic)
2846+
2847+-- | Creates a value of 'NotificationSet' with the minimum fields required to make a request.
2848+--
2849+-- Use one of the following lenses to modify other fields as desired:
2850+--
2851+-- * 'nsNotificationSetId'
2852+--
2853+-- * 'nsNotification'
2854+--
2855+-- * 'nsKind'
2856+notificationSet
2857+ :: NotificationSet
2858+notificationSet =
2859+ NotificationSet'
2860+ { _nsNotificationSetId = Nothing
2861+ , _nsNotification = Nothing
2862+ , _nsKind = "androidenterprise#notificationSet"
2863+ }
2864+
2865+-- | The notification set ID, required to mark the notification as received
2866+-- with the Enterprises.AcknowledgeNotification API. This will be omitted
2867+-- if no notifications are present.
2868+nsNotificationSetId :: Lens' NotificationSet (Maybe Text)
2869+nsNotificationSetId
2870+ = lens _nsNotificationSetId
2871+ (\ s a -> s{_nsNotificationSetId = a})
2872+
2873+-- | The notifications received, or empty if no notifications are present.
2874+nsNotification :: Lens' NotificationSet [Notification]
2875+nsNotification
2876+ = lens _nsNotification
2877+ (\ s a -> s{_nsNotification = a})
2878+ . _Default
2879+ . _Coerce
2880+
2881+-- | Identifies what kind of resource this is. Value: the fixed string
2882+-- \"androidenterprise#notificationSet\".
2883+nsKind :: Lens' NotificationSet Text
2884+nsKind = lens _nsKind (\ s a -> s{_nsKind = a})
2885+
2886+instance FromJSON NotificationSet where
2887+ parseJSON
2888+ = withObject "NotificationSet"
2889+ (\ o ->
2890+ NotificationSet' <$>
2891+ (o .:? "notificationSetId") <*>
2892+ (o .:? "notification" .!= mempty)
2893+ <*>
2894+ (o .:? "kind" .!=
2895+ "androidenterprise#notificationSet"))
2896+
2897+instance ToJSON NotificationSet where
2898+ toJSON NotificationSet'{..}
2899+ = object
2900+ (catMaybes
2901+ [("notificationSetId" .=) <$> _nsNotificationSetId,
2902+ ("notification" .=) <$> _nsNotification,
2903+ Just ("kind" .= _nsKind)])
2904+
17882905-- | Represents the list of app restrictions available to be pre-configured
17892906-- for the product.
17902907--
@@ -1994,33 +3111,23 @@ instance ToJSON DevicesListResponse where
19943111 [Just ("kind" .= _dlrKind),
19953112 ("device" .=) <$> _dlrDevice])
19963113
1997−-- | An enterprise resource represents a binding between an organization and
1998−-- their EMM. To create an enterprise, an admin of the enterprise must
1999−-- first go through a Play for Work sign-up flow. At the end of this the
2000−-- admin will be presented with a token (a short opaque alphanumeric
2001−-- string). They must then present this to the EMM, who then supplies it to
2002−-- the enroll method. Until this is done the EMM will not have any access
2003−-- to the enterprise. After calling enroll the EMM should call setAccount
2004−-- to specify the service account that will be allowed to act on behalf of
2005−-- the enterprise, which will be required for access to the enterprise\'s
2006−-- data through this API. Only one call of setAccount is allowed for a
2007−-- given enterprise; the only way to change the account later is to
2008−-- unenroll the enterprise and enroll it again (obtaining a new token). The
2009−-- EMM can unenroll an enterprise in order to sever the binding between
2010−-- them. Re-enrolling an enterprise is possible, but requires a new token
2011−-- to be retrieved. Enterprises.unenroll requires the EMM\'s credentials
2012−-- (as enroll does), not the enterprise\'s. Enterprises.unenroll can only
2013−-- be used for enterprises that were previously enrolled with the enroll
2014−-- call. Any enterprises that were enrolled using the (deprecated)
2015−-- Enterprises.insert call must be unenrolled with Enterprises.delete and
2016−-- can then be re-enrolled using the Enterprises.enroll call. The ID for an
2017−-- enterprise is an opaque string. It is returned by insert and enroll and
2018−-- can also be retrieved if the enterprise\'s primary domain is known using
2019−-- the list method.
3114+-- | An Enterprises resource represents the binding between an EMM and a
3115+-- specific organization. That binding can be instantiated in one of two
3116+-- different ways using this API as follows: - For Google managed domain
3117+-- customers, the process involves using Enterprises.enroll and
3118+-- Enterprises.setAccount (in conjunction with artifacts obtained from the
3119+-- Admin console and the Google API Console) and submitted to the EMM
3120+-- through a more-or-less manual process. - For Android for Work Accounts
3121+-- customers, the process involves using Enterprises.generateSignupUrl and
3122+-- Enterprises.completeSignup in conjunction with the Android for Work
3123+-- Sign-up UI (Google-provided mechanism) to create the binding without
3124+-- manual steps. As an EMM, you can support either or both approaches in
3125+-- your EMM console. See Create an Enterprise for details.
20203126--
20213127-- /See:/ 'enterprise' smart constructor.
20223128data Enterprise = Enterprise'
20233129 { _eKind :: !Text
3130+ , _eAdministrator :: !(Maybe [Administrator])
20243131 , _ePrimaryDomain :: !(Maybe Text)
20253132 , _eName :: !(Maybe Text)
20263133 , _eId :: !(Maybe Text)
@@ -2032,6 +3139,8 @@ data Enterprise = Enterprise'
20323139--
20333140-- * 'eKind'
20343141--
3142+-- * 'eAdministrator'
3143+--
20353144-- * 'ePrimaryDomain'
20363145--
20373146-- * 'eName'
@@ -2042,6 +3151,7 @@ enterprise
20423151enterprise =
20433152 Enterprise'
20443153 { _eKind = "androidenterprise#enterprise"
3154+ , _eAdministrator = Nothing
20453155 , _ePrimaryDomain = Nothing
20463156 , _eName = Nothing
20473157 , _eId = Nothing
@@ -2052,13 +3162,22 @@ enterprise =
20523162eKind :: Lens' Enterprise Text
20533163eKind = lens _eKind (\ s a -> s{_eKind = a})
20543164
2055−-- | The enterprise\'s primary domain, e.g. \"example.com\".
3165+-- | Administrators of the enterprise. This is only supported for enterprises
3166+-- created via the EMM-initiated flow.
3167+eAdministrator :: Lens' Enterprise [Administrator]
3168+eAdministrator
3169+ = lens _eAdministrator
3170+ (\ s a -> s{_eAdministrator = a})
3171+ . _Default
3172+ . _Coerce
3173+
3174+-- | The enterprise\'s primary domain, such as \"example.com\".
20563175ePrimaryDomain :: Lens' Enterprise (Maybe Text)
20573176ePrimaryDomain
20583177 = lens _ePrimaryDomain
20593178 (\ s a -> s{_ePrimaryDomain = a})
20603179
2061−-- | The name of the enterprise, e.g. \"Example Inc\".
3180+-- | The name of the enterprise, for example, \"Example, Inc\".
20623181eName :: Lens' Enterprise (Maybe Text)
20633182eName = lens _eName (\ s a -> s{_eName = a})
20643183
@@ -2072,7 +3191,8 @@ instance FromJSON Enterprise where
20723191 (\ o ->
20733192 Enterprise' <$>
20743193 (o .:? "kind" .!= "androidenterprise#enterprise") <*>
2075− (o .:? "primaryDomain")
3194+ (o .:? "administrator" .!= mempty)
3195+ <*> (o .:? "primaryDomain")
20763196 <*> (o .:? "name")
20773197 <*> (o .:? "id"))
20783198
@@ -2081,22 +3201,167 @@ instance ToJSON Enterprise where
20813201 = object
20823202 (catMaybes
20833203 [Just ("kind" .= _eKind),
3204+ ("administrator" .=) <$> _eAdministrator,
20843205 ("primaryDomain" .=) <$> _ePrimaryDomain,
20853206 ("name" .=) <$> _eName, ("id" .=) <$> _eId])
20863207
3208+-- | An event generated when an app installation failed on a device
3209+--
3210+-- /See:/ 'installFailureEvent' smart constructor.
3211+data InstallFailureEvent = InstallFailureEvent'
3212+ { _ifeFailureReason :: !(Maybe Text)
3213+ , _ifeFailureDetails :: !(Maybe Text)
3214+ , _ifeUserId :: !(Maybe Text)
3215+ , _ifeDeviceId :: !(Maybe Text)
3216+ , _ifeProductId :: !(Maybe Text)
3217+ } deriving (Eq,Show,Data,Typeable,Generic)
3218+
3219+-- | Creates a value of 'InstallFailureEvent' with the minimum fields required to make a request.
3220+--
3221+-- Use one of the following lenses to modify other fields as desired:
3222+--
3223+-- * 'ifeFailureReason'
3224+--
3225+-- * 'ifeFailureDetails'
3226+--
3227+-- * 'ifeUserId'
3228+--
3229+-- * 'ifeDeviceId'
3230+--
3231+-- * 'ifeProductId'
3232+installFailureEvent
3233+ :: InstallFailureEvent
3234+installFailureEvent =
3235+ InstallFailureEvent'
3236+ { _ifeFailureReason = Nothing
3237+ , _ifeFailureDetails = Nothing
3238+ , _ifeUserId = Nothing
3239+ , _ifeDeviceId = Nothing
3240+ , _ifeProductId = Nothing
3241+ }
3242+
3243+-- | The reason for the installation failure. This field will always be
3244+-- present.
3245+ifeFailureReason :: Lens' InstallFailureEvent (Maybe Text)
3246+ifeFailureReason
3247+ = lens _ifeFailureReason
3248+ (\ s a -> s{_ifeFailureReason = a})
3249+
3250+-- | Additional details on the failure if applicable.
3251+ifeFailureDetails :: Lens' InstallFailureEvent (Maybe Text)
3252+ifeFailureDetails
3253+ = lens _ifeFailureDetails
3254+ (\ s a -> s{_ifeFailureDetails = a})
3255+
3256+-- | The ID of the user. This field will always be present.
3257+ifeUserId :: Lens' InstallFailureEvent (Maybe Text)
3258+ifeUserId
3259+ = lens _ifeUserId (\ s a -> s{_ifeUserId = a})
3260+
3261+-- | The Android ID of the device. This field will always be present.
3262+ifeDeviceId :: Lens' InstallFailureEvent (Maybe Text)
3263+ifeDeviceId
3264+ = lens _ifeDeviceId (\ s a -> s{_ifeDeviceId = a})
3265+
3266+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
3267+-- install failure event occured. This field will always be present.
3268+ifeProductId :: Lens' InstallFailureEvent (Maybe Text)
3269+ifeProductId
3270+ = lens _ifeProductId (\ s a -> s{_ifeProductId = a})
3271+
3272+instance FromJSON InstallFailureEvent where
3273+ parseJSON
3274+ = withObject "InstallFailureEvent"
3275+ (\ o ->
3276+ InstallFailureEvent' <$>
3277+ (o .:? "failureReason") <*> (o .:? "failureDetails")
3278+ <*> (o .:? "userId")
3279+ <*> (o .:? "deviceId")
3280+ <*> (o .:? "productId"))
3281+
3282+instance ToJSON InstallFailureEvent where
3283+ toJSON InstallFailureEvent'{..}
3284+ = object
3285+ (catMaybes
3286+ [("failureReason" .=) <$> _ifeFailureReason,
3287+ ("failureDetails" .=) <$> _ifeFailureDetails,
3288+ ("userId" .=) <$> _ifeUserId,
3289+ ("deviceId" .=) <$> _ifeDeviceId,
3290+ ("productId" .=) <$> _ifeProductId])
3291+
3292+-- | The managed configuration resources for the user.
3293+--
3294+-- /See:/ 'managedConfigurationsForUserListResponse' smart constructor.
3295+data ManagedConfigurationsForUserListResponse = ManagedConfigurationsForUserListResponse'
3296+ { _mcfulrManagedConfigurationForUser :: !(Maybe [ManagedConfiguration])
3297+ , _mcfulrKind :: !Text
3298+ } deriving (Eq,Show,Data,Typeable,Generic)
3299+
3300+-- | Creates a value of 'ManagedConfigurationsForUserListResponse' with the minimum fields required to make a request.
3301+--
3302+-- Use one of the following lenses to modify other fields as desired:
3303+--
3304+-- * 'mcfulrManagedConfigurationForUser'
3305+--
3306+-- * 'mcfulrKind'
3307+managedConfigurationsForUserListResponse
3308+ :: ManagedConfigurationsForUserListResponse
3309+managedConfigurationsForUserListResponse =
3310+ ManagedConfigurationsForUserListResponse'
3311+ { _mcfulrManagedConfigurationForUser = Nothing
3312+ , _mcfulrKind = "androidenterprise#managedConfigurationsForUserListResponse"
3313+ }
3314+
3315+-- | A managed configuration for an app for a specific user.
3316+mcfulrManagedConfigurationForUser :: Lens' ManagedConfigurationsForUserListResponse [ManagedConfiguration]
3317+mcfulrManagedConfigurationForUser
3318+ = lens _mcfulrManagedConfigurationForUser
3319+ (\ s a -> s{_mcfulrManagedConfigurationForUser = a})
3320+ . _Default
3321+ . _Coerce
3322+
3323+-- | Identifies what kind of resource this is. Value: the fixed string
3324+-- \"androidenterprise#managedConfigurationsForUserListResponse\".
3325+mcfulrKind :: Lens' ManagedConfigurationsForUserListResponse Text
3326+mcfulrKind
3327+ = lens _mcfulrKind (\ s a -> s{_mcfulrKind = a})
3328+
3329+instance FromJSON
3330+ ManagedConfigurationsForUserListResponse where
3331+ parseJSON
3332+ = withObject
3333+ "ManagedConfigurationsForUserListResponse"
3334+ (\ o ->
3335+ ManagedConfigurationsForUserListResponse' <$>
3336+ (o .:? "managedConfigurationForUser" .!= mempty) <*>
3337+ (o .:? "kind" .!=
3338+ "androidenterprise#managedConfigurationsForUserListResponse"))
3339+
3340+instance ToJSON
3341+ ManagedConfigurationsForUserListResponse where
3342+ toJSON ManagedConfigurationsForUserListResponse'{..}
3343+ = object
3344+ (catMaybes
3345+ [("managedConfigurationForUser" .=) <$>
3346+ _mcfulrManagedConfigurationForUser,
3347+ Just ("kind" .= _mcfulrKind)])
3348+
20873349-- | General setting for the Google Play for Work store layout, currently
20883350-- only specifying the page to display the first time the store is opened.
20893351--
20903352-- /See:/ 'storeLayout' smart constructor.
20913353data StoreLayout = StoreLayout'
2092− { _slKind :: !Text
2093− , _slHomepageId :: !(Maybe Text)
3354+ { _slStoreLayoutType :: !(Maybe Text)
3355+ , _slKind :: !Text
3356+ , _slHomepageId :: !(Maybe Text)
20943357 } deriving (Eq,Show,Data,Typeable,Generic)
20953358
20963359-- | Creates a value of 'StoreLayout' with the minimum fields required to make a request.
20973360--
20983361-- Use one of the following lenses to modify other fields as desired:
20993362--
3363+-- * 'slStoreLayoutType'
3364+--
21003365-- * 'slKind'
21013366--
21023367-- * 'slHomepageId'
@@ -2104,20 +3369,34 @@ storeLayout
21043369 :: StoreLayout
21053370storeLayout =
21063371 StoreLayout'
2107− { _slKind = "androidenterprise#storeLayout"
3372+ { _slStoreLayoutType = Nothing
3373+ , _slKind = "androidenterprise#storeLayout"
21083374 , _slHomepageId = Nothing
21093375 }
21103376
3377+-- | Sets a store layout type. If set to \"custom\", \"homepageId\" must be
3378+-- specified. If set to \"basic\", the layout will consist of all approved
3379+-- apps accessible by the user, split in pages of 100 each; in this case,
3380+-- \"homepageId\" must not be specified. The \"basic\" setting takes
3381+-- precedence over any existing collections setup for this enterprise (if
3382+-- any). Should the enterprise use collectionViewers for controlling access
3383+-- rights, these will still be respected.
3384+slStoreLayoutType :: Lens' StoreLayout (Maybe Text)
3385+slStoreLayoutType
3386+ = lens _slStoreLayoutType
3387+ (\ s a -> s{_slStoreLayoutType = a})
3388+
21113389-- | Identifies what kind of resource this is. Value: the fixed string
21123390-- \"androidenterprise#storeLayout\".
21133391slKind :: Lens' StoreLayout Text
21143392slKind = lens _slKind (\ s a -> s{_slKind = a})
21153393
21163394-- | The ID of the store page to be used as the homepage. The homepage will
2117−-- be used as the first page shown in the Google Play for Work store. If
2118−-- there is no homepage set, an empty store is shown. The homepage can be
2119−-- unset (by not specifying it) to empty the store. If there exists at
2120−-- least one page, this field must be set to the ID of a valid page.
3395+-- be used as the first page shown in the Google Play for Work store. If a
3396+-- homepage has not been set, the Play store shown on devices will be
3397+-- empty. Not specifying a homepage on a store layout effectively empties
3398+-- the store. If there exists at least one page, this field must be set to
3399+-- the ID of a valid page.
21213400slHomepageId :: Lens' StoreLayout (Maybe Text)
21223401slHomepageId
21233402 = lens _slHomepageId (\ s a -> s{_slHomepageId = a})
@@ -2127,23 +3406,177 @@ instance FromJSON StoreLayout where
21273406 = withObject "StoreLayout"
21283407 (\ o ->
21293408 StoreLayout' <$>
2130− (o .:? "kind" .!= "androidenterprise#storeLayout")
3409+ (o .:? "storeLayoutType") <*>
3410+ (o .:? "kind" .!= "androidenterprise#storeLayout")
21313411 <*> (o .:? "homepageId"))
21323412
21333413instance ToJSON StoreLayout where
21343414 toJSON StoreLayout'{..}
21353415 = object
21363416 (catMaybes
2137− [Just ("kind" .= _slKind),
3417+ [("storeLayoutType" .=) <$> _slStoreLayoutType,
3418+ Just ("kind" .= _slKind),
21383419 ("homepageId" .=) <$> _slHomepageId])
21393420
2140−-- | A product represents an app in the Google Play Store that is available
2141−-- to at least some users in the enterprise. (Some apps are restricted to a
2142−-- single enterprise, and no information about them is made available
2143−-- outside that enterprise.) The information provided for each product
2144−-- (localized name, icon, link to the full Google Play details page) is
2145−-- intended to allow a basic representation of the product within an EMM
2146−-- user interface.
3421+-- | An event generated when a new app version is uploaded to Google Play and
3422+-- its app restrictions schema changed. To fetch the app restrictions
3423+-- schema for an app, use Products.getAppRestrictionsSchema on the EMM API.
3424+--
3425+-- /See:/ 'appRestrictionsSchemaChangeEvent' smart constructor.
3426+newtype AppRestrictionsSchemaChangeEvent = AppRestrictionsSchemaChangeEvent'
3427+ { _arsceProductId :: Maybe Text
3428+ } deriving (Eq,Show,Data,Typeable,Generic)
3429+
3430+-- | Creates a value of 'AppRestrictionsSchemaChangeEvent' with the minimum fields required to make a request.
3431+--
3432+-- Use one of the following lenses to modify other fields as desired:
3433+--
3434+-- * 'arsceProductId'
3435+appRestrictionsSchemaChangeEvent
3436+ :: AppRestrictionsSchemaChangeEvent
3437+appRestrictionsSchemaChangeEvent =
3438+ AppRestrictionsSchemaChangeEvent'
3439+ { _arsceProductId = Nothing
3440+ }
3441+
3442+-- | The id of the product (e.g. \"app:com.google.android.gm\") for which the
3443+-- app restriction schema changed. This field will always be present.
3444+arsceProductId :: Lens' AppRestrictionsSchemaChangeEvent (Maybe Text)
3445+arsceProductId
3446+ = lens _arsceProductId
3447+ (\ s a -> s{_arsceProductId = a})
3448+
3449+instance FromJSON AppRestrictionsSchemaChangeEvent
3450+ where
3451+ parseJSON
3452+ = withObject "AppRestrictionsSchemaChangeEvent"
3453+ (\ o ->
3454+ AppRestrictionsSchemaChangeEvent' <$>
3455+ (o .:? "productId"))
3456+
3457+instance ToJSON AppRestrictionsSchemaChangeEvent
3458+ where
3459+ toJSON AppRestrictionsSchemaChangeEvent'{..}
3460+ = object
3461+ (catMaybes [("productId" .=) <$> _arsceProductId])
3462+
3463+-- | A token authorizing an administrator to access an iframe.
3464+--
3465+-- /See:/ 'administratorWebToken' smart constructor.
3466+data AdministratorWebToken = AdministratorWebToken'
3467+ { _awtKind :: !Text
3468+ , _awtToken :: !(Maybe Text)
3469+ } deriving (Eq,Show,Data,Typeable,Generic)
3470+
3471+-- | Creates a value of 'AdministratorWebToken' with the minimum fields required to make a request.
3472+--
3473+-- Use one of the following lenses to modify other fields as desired:
3474+--
3475+-- * 'awtKind'
3476+--
3477+-- * 'awtToken'
3478+administratorWebToken
3479+ :: AdministratorWebToken
3480+administratorWebToken =
3481+ AdministratorWebToken'
3482+ { _awtKind = "androidenterprise#administratorWebToken"
3483+ , _awtToken = Nothing
3484+ }
3485+
3486+-- | Identifies what kind of resource this is. Value: the fixed string
3487+-- \"androidenterprise#administratorWebToken\".
3488+awtKind :: Lens' AdministratorWebToken Text
3489+awtKind = lens _awtKind (\ s a -> s{_awtKind = a})
3490+
3491+-- | An opaque token to be passed to the Play front-end to generate an
3492+-- iframe.
3493+awtToken :: Lens' AdministratorWebToken (Maybe Text)
3494+awtToken = lens _awtToken (\ s a -> s{_awtToken = a})
3495+
3496+instance FromJSON AdministratorWebToken where
3497+ parseJSON
3498+ = withObject "AdministratorWebToken"
3499+ (\ o ->
3500+ AdministratorWebToken' <$>
3501+ (o .:? "kind" .!=
3502+ "androidenterprise#administratorWebToken")
3503+ <*> (o .:? "token"))
3504+
3505+instance ToJSON AdministratorWebToken where
3506+ toJSON AdministratorWebToken'{..}
3507+ = object
3508+ (catMaybes
3509+ [Just ("kind" .= _awtKind),
3510+ ("token" .=) <$> _awtToken])
3511+
3512+-- | A resource returned by the GenerateSignupUrl API, which contains the
3513+-- Signup URL and Completion Token.
3514+--
3515+-- /See:/ 'signupInfo' smart constructor.
3516+data SignupInfo = SignupInfo'
3517+ { _siCompletionToken :: !(Maybe Text)
3518+ , _siKind :: !Text
3519+ , _siURL :: !(Maybe Text)
3520+ } deriving (Eq,Show,Data,Typeable,Generic)
3521+
3522+-- | Creates a value of 'SignupInfo' with the minimum fields required to make a request.
3523+--
3524+-- Use one of the following lenses to modify other fields as desired:
3525+--
3526+-- * 'siCompletionToken'
3527+--
3528+-- * 'siKind'
3529+--
3530+-- * 'siURL'
3531+signupInfo
3532+ :: SignupInfo
3533+signupInfo =
3534+ SignupInfo'
3535+ { _siCompletionToken = Nothing
3536+ , _siKind = "androidenterprise#signupInfo"
3537+ , _siURL = Nothing
3538+ }
3539+
3540+-- | An opaque token that will be required, along with the Enterprise Token,
3541+-- for obtaining the enterprise resource from CompleteSignup.
3542+siCompletionToken :: Lens' SignupInfo (Maybe Text)
3543+siCompletionToken
3544+ = lens _siCompletionToken
3545+ (\ s a -> s{_siCompletionToken = a})
3546+
3547+-- | Identifies what kind of resource this is. Value: the fixed string
3548+-- \"androidenterprise#signupInfo\".
3549+siKind :: Lens' SignupInfo Text
3550+siKind = lens _siKind (\ s a -> s{_siKind = a})
3551+
3552+-- | A URL under which the Admin can sign up for an enterprise. The page
3553+-- pointed to cannot be rendered in an iframe.
3554+siURL :: Lens' SignupInfo (Maybe Text)
3555+siURL = lens _siURL (\ s a -> s{_siURL = a})
3556+
3557+instance FromJSON SignupInfo where
3558+ parseJSON
3559+ = withObject "SignupInfo"
3560+ (\ o ->
3561+ SignupInfo' <$>
3562+ (o .:? "completionToken") <*>
3563+ (o .:? "kind" .!= "androidenterprise#signupInfo")
3564+ <*> (o .:? "url"))
3565+
3566+instance ToJSON SignupInfo where
3567+ toJSON SignupInfo'{..}
3568+ = object
3569+ (catMaybes
3570+ [("completionToken" .=) <$> _siCompletionToken,
3571+ Just ("kind" .= _siKind), ("url" .=) <$> _siURL])
3572+
3573+-- | A Products resource represents an app in the Google Play Store that is
3574+-- available to at least some users in the enterprise. (Some apps are
3575+-- restricted to a single enterprise, and no information about them is made
3576+-- available outside that enterprise.) The information provided for each
3577+-- product (localized name, icon, link to the full Google Play details
3578+-- page) is intended to allow a basic representation of the product within
3579+-- an EMM user interface.
21473580--
21483581-- /See:/ 'product' smart constructor.
21493582data Product = Product'
@@ -2245,7 +3678,10 @@ pAppVersion
22453678 _Default
22463679 . _Coerce
22473680
2248−-- | Whether this product is free, free with in-app purchases, or paid.
3681+-- | Whether this product is free, free with in-app purchases, or paid. If
3682+-- the pricing is unknown, this means the product is not generally
3683+-- available anymore (even though it might still be available to people who
3684+-- own it).
22493685pProductPricing :: Lens' Product (Maybe Text)
22503686pProductPricing
22513687 = lens _pProductPricing
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Sum.hs+60
@@ -17,3 +17,63 @@
1717module Network.Google.AndroidEnterprise.Types.Sum where
1818
1919import Network.Google.Prelude
20+
21+-- | The request mode for pulling notifications. Specifying
22+-- waitForNotifications will cause the request to block and wait until one
23+-- or more notifications are present, or return an empty notification list
24+-- if no notifications are present after some time. Speciying
25+-- returnImmediately will cause the request to immediately return the
26+-- pending notifications, or an empty list if no notifications are present.
27+-- If omitted, defaults to waitForNotifications.
28+data EnterprisesPullNotificationSetRequestMode
29+ = ReturnImmediately
30+ -- ^ @returnImmediately@
31+ | WaitForNotifications
32+ -- ^ @waitForNotifications@
33+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
34+
35+instance Hashable EnterprisesPullNotificationSetRequestMode
36+
37+instance FromHttpApiData EnterprisesPullNotificationSetRequestMode where
38+ parseQueryParam = \case
39+ "returnImmediately" -> Right ReturnImmediately
40+ "waitForNotifications" -> Right WaitForNotifications
41+ x -> Left ("Unable to parse EnterprisesPullNotificationSetRequestMode from: " <> x)
42+
43+instance ToHttpApiData EnterprisesPullNotificationSetRequestMode where
44+ toQueryParam = \case
45+ ReturnImmediately -> "returnImmediately"
46+ WaitForNotifications -> "waitForNotifications"
47+
48+instance FromJSON EnterprisesPullNotificationSetRequestMode where
49+ parseJSON = parseJSONText "EnterprisesPullNotificationSetRequestMode"
50+
51+instance ToJSON EnterprisesPullNotificationSetRequestMode where
52+ toJSON = toJSONText
53+
54+-- | The type of credential to return with the service account. Required.
55+data EnterprisesGetServiceAccountKeyType
56+ = GoogleCredentials
57+ -- ^ @googleCredentials@
58+ | PKCS12
59+ -- ^ @pkcs12@
60+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
61+
62+instance Hashable EnterprisesGetServiceAccountKeyType
63+
64+instance FromHttpApiData EnterprisesGetServiceAccountKeyType where
65+ parseQueryParam = \case
66+ "googleCredentials" -> Right GoogleCredentials
67+ "pkcs12" -> Right PKCS12
68+ x -> Left ("Unable to parse EnterprisesGetServiceAccountKeyType from: " <> x)
69+
70+instance ToHttpApiData EnterprisesGetServiceAccountKeyType where
71+ toQueryParam = \case
72+ GoogleCredentials -> "googleCredentials"
73+ PKCS12 -> "pkcs12"
74+
75+instance FromJSON EnterprisesGetServiceAccountKeyType where
76+ parseJSON = parseJSONText "EnterprisesGetServiceAccountKeyType"
77+
78+instance ToJSON EnterprisesGetServiceAccountKeyType where
79+ toJSON = toJSONText
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/GetState.hs+10−10
@@ -20,11 +20,11 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Retrieves whether a device is enabled or disabled for access by the user
24−-- to Google services. The device state takes effect only if enforcing EMM
25−-- policies on Android devices is enabled in the Google Admin Console.
26−-- Otherwise, the device state is ignored and all devices are allowed
27−-- access to Google services.
23+-- Retrieves whether a device\'s access to Google services is enabled or
24+-- disabled. The device state takes effect only if enforcing EMM policies
25+-- on Android devices is enabled in the Google Admin Console. Otherwise,
26+-- the device state is ignored and all devices are allowed access to Google
27+-- services. This is only supported for Google-managed users.
2828--
2929-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.devices.getState@.
3030module Network.Google.Resource.AndroidEnterprise.Devices.GetState
@@ -59,11 +59,11 @@ type DevicesGetStateResource =
5959 "state" :>
6060 QueryParam "alt" AltJSON :> Get '[JSON] DeviceState
6161
62−-- | Retrieves whether a device is enabled or disabled for access by the user
63−-- to Google services. The device state takes effect only if enforcing EMM
64−-- policies on Android devices is enabled in the Google Admin Console.
65−-- Otherwise, the device state is ignored and all devices are allowed
66−-- access to Google services.
62+-- | Retrieves whether a device\'s access to Google services is enabled or
63+-- disabled. The device state takes effect only if enforcing EMM policies
64+-- on Android devices is enabled in the Google Admin Console. Otherwise,
65+-- the device state is ignored and all devices are allowed access to Google
66+-- services. This is only supported for Google-managed users.
6767--
6868-- /See:/ 'devicesGetState' smart constructor.
6969data DevicesGetState = DevicesGetState'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Devices/SetState.hs+10−10
@@ -20,11 +20,11 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Sets whether a device is enabled or disabled for access by the user to
24−-- Google services. The device state takes effect only if enforcing EMM
25−-- policies on Android devices is enabled in the Google Admin Console.
26−-- Otherwise, the device state is ignored and all devices are allowed
27−-- access to Google services.
23+-- Sets whether a device\'s access to Google services is enabled or
24+-- disabled. The device state takes effect only if enforcing EMM policies
25+-- on Android devices is enabled in the Google Admin Console. Otherwise,
26+-- the device state is ignored and all devices are allowed access to Google
27+-- services. This is only supported for Google-managed users.
2828--
2929-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.devices.setState@.
3030module Network.Google.Resource.AndroidEnterprise.Devices.SetState
@@ -62,11 +62,11 @@ type DevicesSetStateResource =
6262 ReqBody '[JSON] DeviceState :>
6363 Put '[JSON] DeviceState
6464
65−-- | Sets whether a device is enabled or disabled for access by the user to
66−-- Google services. The device state takes effect only if enforcing EMM
67−-- policies on Android devices is enabled in the Google Admin Console.
68−-- Otherwise, the device state is ignored and all devices are allowed
69−-- access to Google services.
65+-- | Sets whether a device\'s access to Google services is enabled or
66+-- disabled. The device state takes effect only if enforcing EMM policies
67+-- on Android devices is enabled in the Google Admin Console. Otherwise,
68+-- the device state is ignored and all devices are allowed access to Google
69+-- services. This is only supported for Google-managed users.
7070--
7171-- /See:/ 'devicesSetState' smart constructor.
7272data DevicesSetState = DevicesSetState'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/AcknowledgeNotificationSet.hsnew file+95
@@ -0,0 +1,95 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Enterprises.AcknowledgeNotificationSet
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Acknowledges notifications that were received from
24+-- Enterprises.PullNotificationSet to prevent subsequent calls from
25+-- returning the same notifications.
26+--
27+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.acknowledgeNotificationSet@.
28+module Network.Google.Resource.AndroidEnterprise.Enterprises.AcknowledgeNotificationSet
29+ (
30+ -- * REST Resource
31+ EnterprisesAcknowledgeNotificationSetResource
32+
33+ -- * Creating a Request
34+ , enterprisesAcknowledgeNotificationSet
35+ , EnterprisesAcknowledgeNotificationSet
36+
37+ -- * Request Lenses
38+ , eansNotificationSetId
39+ ) where
40+
41+import Network.Google.AndroidEnterprise.Types
42+import Network.Google.Prelude
43+
44+-- | A resource alias for @androidenterprise.enterprises.acknowledgeNotificationSet@ method which the
45+-- 'EnterprisesAcknowledgeNotificationSet' request conforms to.
46+type EnterprisesAcknowledgeNotificationSetResource =
47+ "androidenterprise" :>
48+ "v1" :>
49+ "enterprises" :>
50+ "acknowledgeNotificationSet" :>
51+ QueryParam "notificationSetId" Text :>
52+ QueryParam "alt" AltJSON :> Post '[JSON] ()
53+
54+-- | Acknowledges notifications that were received from
55+-- Enterprises.PullNotificationSet to prevent subsequent calls from
56+-- returning the same notifications.
57+--
58+-- /See:/ 'enterprisesAcknowledgeNotificationSet' smart constructor.
59+newtype EnterprisesAcknowledgeNotificationSet = EnterprisesAcknowledgeNotificationSet'
60+ { _eansNotificationSetId :: Maybe Text
61+ } deriving (Eq,Show,Data,Typeable,Generic)
62+
63+-- | Creates a value of 'EnterprisesAcknowledgeNotificationSet' with the minimum fields required to make a request.
64+--
65+-- Use one of the following lenses to modify other fields as desired:
66+--
67+-- * 'eansNotificationSetId'
68+enterprisesAcknowledgeNotificationSet
69+ :: EnterprisesAcknowledgeNotificationSet
70+enterprisesAcknowledgeNotificationSet =
71+ EnterprisesAcknowledgeNotificationSet'
72+ { _eansNotificationSetId = Nothing
73+ }
74+
75+-- | The notification set ID as returned by Enterprises.PullNotificationSet.
76+-- This must be provided.
77+eansNotificationSetId :: Lens' EnterprisesAcknowledgeNotificationSet (Maybe Text)
78+eansNotificationSetId
79+ = lens _eansNotificationSetId
80+ (\ s a -> s{_eansNotificationSetId = a})
81+
82+instance GoogleRequest
83+ EnterprisesAcknowledgeNotificationSet where
84+ type Rs EnterprisesAcknowledgeNotificationSet = ()
85+ type Scopes EnterprisesAcknowledgeNotificationSet =
86+ '["https://www.googleapis.com/auth/androidenterprise"]
87+ requestClient
88+ EnterprisesAcknowledgeNotificationSet'{..}
89+ = go _eansNotificationSetId (Just AltJSON)
90+ androidEnterpriseService
91+ where go
92+ = buildClient
93+ (Proxy ::
94+ Proxy EnterprisesAcknowledgeNotificationSetResource)
95+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/CompleteSignup.hsnew file+105
@@ -0,0 +1,105 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Enterprises.CompleteSignup
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Completes the signup flow, by specifying the Completion token and
24+-- Enterprise token. This request must not be called multiple times for a
25+-- given Enterprise Token.
26+--
27+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.completeSignup@.
28+module Network.Google.Resource.AndroidEnterprise.Enterprises.CompleteSignup
29+ (
30+ -- * REST Resource
31+ EnterprisesCompleteSignupResource
32+
33+ -- * Creating a Request
34+ , enterprisesCompleteSignup
35+ , EnterprisesCompleteSignup
36+
37+ -- * Request Lenses
38+ , ecsCompletionToken
39+ , ecsEnterpriseToken
40+ ) where
41+
42+import Network.Google.AndroidEnterprise.Types
43+import Network.Google.Prelude
44+
45+-- | A resource alias for @androidenterprise.enterprises.completeSignup@ method which the
46+-- 'EnterprisesCompleteSignup' request conforms to.
47+type EnterprisesCompleteSignupResource =
48+ "androidenterprise" :>
49+ "v1" :>
50+ "enterprises" :>
51+ "completeSignup" :>
52+ QueryParam "completionToken" Text :>
53+ QueryParam "enterpriseToken" Text :>
54+ QueryParam "alt" AltJSON :> Post '[JSON] Enterprise
55+
56+-- | Completes the signup flow, by specifying the Completion token and
57+-- Enterprise token. This request must not be called multiple times for a
58+-- given Enterprise Token.
59+--
60+-- /See:/ 'enterprisesCompleteSignup' smart constructor.
61+data EnterprisesCompleteSignup = EnterprisesCompleteSignup'
62+ { _ecsCompletionToken :: !(Maybe Text)
63+ , _ecsEnterpriseToken :: !(Maybe Text)
64+ } deriving (Eq,Show,Data,Typeable,Generic)
65+
66+-- | Creates a value of 'EnterprisesCompleteSignup' with the minimum fields required to make a request.
67+--
68+-- Use one of the following lenses to modify other fields as desired:
69+--
70+-- * 'ecsCompletionToken'
71+--
72+-- * 'ecsEnterpriseToken'
73+enterprisesCompleteSignup
74+ :: EnterprisesCompleteSignup
75+enterprisesCompleteSignup =
76+ EnterprisesCompleteSignup'
77+ { _ecsCompletionToken = Nothing
78+ , _ecsEnterpriseToken = Nothing
79+ }
80+
81+-- | The Completion token initially returned by GenerateSignupUrl.
82+ecsCompletionToken :: Lens' EnterprisesCompleteSignup (Maybe Text)
83+ecsCompletionToken
84+ = lens _ecsCompletionToken
85+ (\ s a -> s{_ecsCompletionToken = a})
86+
87+-- | The Enterprise token appended to the Callback URL.
88+ecsEnterpriseToken :: Lens' EnterprisesCompleteSignup (Maybe Text)
89+ecsEnterpriseToken
90+ = lens _ecsEnterpriseToken
91+ (\ s a -> s{_ecsEnterpriseToken = a})
92+
93+instance GoogleRequest EnterprisesCompleteSignup
94+ where
95+ type Rs EnterprisesCompleteSignup = Enterprise
96+ type Scopes EnterprisesCompleteSignup =
97+ '["https://www.googleapis.com/auth/androidenterprise"]
98+ requestClient EnterprisesCompleteSignup'{..}
99+ = go _ecsCompletionToken _ecsEnterpriseToken
100+ (Just AltJSON)
101+ androidEnterpriseService
102+ where go
103+ = buildClient
104+ (Proxy :: Proxy EnterprisesCompleteSignupResource)
105+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/CreateWebToken.hsnew file+109
@@ -0,0 +1,109 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Enterprises.CreateWebToken
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns a unique token to access an embeddable UI. To generate a web UI,
24+-- pass the generated token into the Play for Work javascript API. Each
25+-- token may only be used to start one UI session. See the javascript API
26+-- documentation for further information.
27+--
28+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.createWebToken@.
29+module Network.Google.Resource.AndroidEnterprise.Enterprises.CreateWebToken
30+ (
31+ -- * REST Resource
32+ EnterprisesCreateWebTokenResource
33+
34+ -- * Creating a Request
35+ , enterprisesCreateWebToken
36+ , EnterprisesCreateWebToken
37+
38+ -- * Request Lenses
39+ , ecwtEnterpriseId
40+ , ecwtPayload
41+ ) where
42+
43+import Network.Google.AndroidEnterprise.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidenterprise.enterprises.createWebToken@ method which the
47+-- 'EnterprisesCreateWebToken' request conforms to.
48+type EnterprisesCreateWebTokenResource =
49+ "androidenterprise" :>
50+ "v1" :>
51+ "enterprises" :>
52+ Capture "enterpriseId" Text :>
53+ "createWebToken" :>
54+ QueryParam "alt" AltJSON :>
55+ ReqBody '[JSON] AdministratorWebTokenSpec :>
56+ Post '[JSON] AdministratorWebToken
57+
58+-- | Returns a unique token to access an embeddable UI. To generate a web UI,
59+-- pass the generated token into the Play for Work javascript API. Each
60+-- token may only be used to start one UI session. See the javascript API
61+-- documentation for further information.
62+--
63+-- /See:/ 'enterprisesCreateWebToken' smart constructor.
64+data EnterprisesCreateWebToken = EnterprisesCreateWebToken'
65+ { _ecwtEnterpriseId :: !Text
66+ , _ecwtPayload :: !AdministratorWebTokenSpec
67+ } deriving (Eq,Show,Data,Typeable,Generic)
68+
69+-- | Creates a value of 'EnterprisesCreateWebToken' with the minimum fields required to make a request.
70+--
71+-- Use one of the following lenses to modify other fields as desired:
72+--
73+-- * 'ecwtEnterpriseId'
74+--
75+-- * 'ecwtPayload'
76+enterprisesCreateWebToken
77+ :: Text -- ^ 'ecwtEnterpriseId'
78+ -> AdministratorWebTokenSpec -- ^ 'ecwtPayload'
79+ -> EnterprisesCreateWebToken
80+enterprisesCreateWebToken pEcwtEnterpriseId_ pEcwtPayload_ =
81+ EnterprisesCreateWebToken'
82+ { _ecwtEnterpriseId = pEcwtEnterpriseId_
83+ , _ecwtPayload = pEcwtPayload_
84+ }
85+
86+-- | The ID of the enterprise.
87+ecwtEnterpriseId :: Lens' EnterprisesCreateWebToken Text
88+ecwtEnterpriseId
89+ = lens _ecwtEnterpriseId
90+ (\ s a -> s{_ecwtEnterpriseId = a})
91+
92+-- | Multipart request metadata.
93+ecwtPayload :: Lens' EnterprisesCreateWebToken AdministratorWebTokenSpec
94+ecwtPayload
95+ = lens _ecwtPayload (\ s a -> s{_ecwtPayload = a})
96+
97+instance GoogleRequest EnterprisesCreateWebToken
98+ where
99+ type Rs EnterprisesCreateWebToken =
100+ AdministratorWebToken
101+ type Scopes EnterprisesCreateWebToken =
102+ '["https://www.googleapis.com/auth/androidenterprise"]
103+ requestClient EnterprisesCreateWebToken'{..}
104+ = go _ecwtEnterpriseId (Just AltJSON) _ecwtPayload
105+ androidEnterpriseService
106+ where go
107+ = buildClient
108+ (Proxy :: Proxy EnterprisesCreateWebTokenResource)
109+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GenerateSignupURL.hsnew file+95
@@ -0,0 +1,95 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Enterprises.GenerateSignupURL
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Generates a sign-up URL.
24+--
25+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.generateSignupUrl@.
26+module Network.Google.Resource.AndroidEnterprise.Enterprises.GenerateSignupURL
27+ (
28+ -- * REST Resource
29+ EnterprisesGenerateSignupURLResource
30+
31+ -- * Creating a Request
32+ , enterprisesGenerateSignupURL
33+ , EnterprisesGenerateSignupURL
34+
35+ -- * Request Lenses
36+ , egsuCallbackURL
37+ ) where
38+
39+import Network.Google.AndroidEnterprise.Types
40+import Network.Google.Prelude
41+
42+-- | A resource alias for @androidenterprise.enterprises.generateSignupUrl@ method which the
43+-- 'EnterprisesGenerateSignupURL' request conforms to.
44+type EnterprisesGenerateSignupURLResource =
45+ "androidenterprise" :>
46+ "v1" :>
47+ "enterprises" :>
48+ "signupUrl" :>
49+ QueryParam "callbackUrl" Text :>
50+ QueryParam "alt" AltJSON :> Post '[JSON] SignupInfo
51+
52+-- | Generates a sign-up URL.
53+--
54+-- /See:/ 'enterprisesGenerateSignupURL' smart constructor.
55+newtype EnterprisesGenerateSignupURL = EnterprisesGenerateSignupURL'
56+ { _egsuCallbackURL :: Maybe Text
57+ } deriving (Eq,Show,Data,Typeable,Generic)
58+
59+-- | Creates a value of 'EnterprisesGenerateSignupURL' with the minimum fields required to make a request.
60+--
61+-- Use one of the following lenses to modify other fields as desired:
62+--
63+-- * 'egsuCallbackURL'
64+enterprisesGenerateSignupURL
65+ :: EnterprisesGenerateSignupURL
66+enterprisesGenerateSignupURL =
67+ EnterprisesGenerateSignupURL'
68+ { _egsuCallbackURL = Nothing
69+ }
70+
71+-- | The callback URL to which the Admin will be redirected after
72+-- successfully creating an enterprise. Before redirecting there the system
73+-- will add a single query parameter to this URL named \"enterpriseToken\"
74+-- which will contain an opaque token to be used for the CompleteSignup
75+-- request. Beware that this means that the URL will be parsed, the
76+-- parameter added and then a new URL formatted, i.e. there may be some
77+-- minor formatting changes and, more importantly, the URL must be
78+-- well-formed so that it can be parsed.
79+egsuCallbackURL :: Lens' EnterprisesGenerateSignupURL (Maybe Text)
80+egsuCallbackURL
81+ = lens _egsuCallbackURL
82+ (\ s a -> s{_egsuCallbackURL = a})
83+
84+instance GoogleRequest EnterprisesGenerateSignupURL
85+ where
86+ type Rs EnterprisesGenerateSignupURL = SignupInfo
87+ type Scopes EnterprisesGenerateSignupURL =
88+ '["https://www.googleapis.com/auth/androidenterprise"]
89+ requestClient EnterprisesGenerateSignupURL'{..}
90+ = go _egsuCallbackURL (Just AltJSON)
91+ androidEnterpriseService
92+ where go
93+ = buildClient
94+ (Proxy :: Proxy EnterprisesGenerateSignupURLResource)
95+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GetServiceAccount.hsnew file+123
@@ -0,0 +1,123 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Enterprises.GetServiceAccount
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Returns a service account and credentials. The service account can be
24+-- bound to the enterprise by calling setAccount. The service account is
25+-- unique to this enterprise and EMM, and will be deleted if the enterprise
26+-- is unbound. The credentials contain private key data and are not stored
27+-- server-side. This method can only be called after calling
28+-- Enterprises.Enroll or Enterprises.CompleteSignup, and before
29+-- Enterprises.SetAccount; at other times it will return an error.
30+-- Subsequent calls after the first will generate a new, unique set of
31+-- credentials, and invalidate the previously generated credentials. Once
32+-- the service account is bound to the enterprise, it can be managed using
33+-- the serviceAccountKeys resource.
34+--
35+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.getServiceAccount@.
36+module Network.Google.Resource.AndroidEnterprise.Enterprises.GetServiceAccount
37+ (
38+ -- * REST Resource
39+ EnterprisesGetServiceAccountResource
40+
41+ -- * Creating a Request
42+ , enterprisesGetServiceAccount
43+ , EnterprisesGetServiceAccount
44+
45+ -- * Request Lenses
46+ , egsaKeyType
47+ , egsaEnterpriseId
48+ ) where
49+
50+import Network.Google.AndroidEnterprise.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @androidenterprise.enterprises.getServiceAccount@ method which the
54+-- 'EnterprisesGetServiceAccount' request conforms to.
55+type EnterprisesGetServiceAccountResource =
56+ "androidenterprise" :>
57+ "v1" :>
58+ "enterprises" :>
59+ Capture "enterpriseId" Text :>
60+ "serviceAccount" :>
61+ QueryParam "keyType"
62+ EnterprisesGetServiceAccountKeyType
63+ :>
64+ QueryParam "alt" AltJSON :>
65+ Get '[JSON] ServiceAccount
66+
67+-- | Returns a service account and credentials. The service account can be
68+-- bound to the enterprise by calling setAccount. The service account is
69+-- unique to this enterprise and EMM, and will be deleted if the enterprise
70+-- is unbound. The credentials contain private key data and are not stored
71+-- server-side. This method can only be called after calling
72+-- Enterprises.Enroll or Enterprises.CompleteSignup, and before
73+-- Enterprises.SetAccount; at other times it will return an error.
74+-- Subsequent calls after the first will generate a new, unique set of
75+-- credentials, and invalidate the previously generated credentials. Once
76+-- the service account is bound to the enterprise, it can be managed using
77+-- the serviceAccountKeys resource.
78+--
79+-- /See:/ 'enterprisesGetServiceAccount' smart constructor.
80+data EnterprisesGetServiceAccount = EnterprisesGetServiceAccount'
81+ { _egsaKeyType :: !(Maybe EnterprisesGetServiceAccountKeyType)
82+ , _egsaEnterpriseId :: !Text
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'EnterprisesGetServiceAccount' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'egsaKeyType'
90+--
91+-- * 'egsaEnterpriseId'
92+enterprisesGetServiceAccount
93+ :: Text -- ^ 'egsaEnterpriseId'
94+ -> EnterprisesGetServiceAccount
95+enterprisesGetServiceAccount pEgsaEnterpriseId_ =
96+ EnterprisesGetServiceAccount'
97+ { _egsaKeyType = Nothing
98+ , _egsaEnterpriseId = pEgsaEnterpriseId_
99+ }
100+
101+-- | The type of credential to return with the service account. Required.
102+egsaKeyType :: Lens' EnterprisesGetServiceAccount (Maybe EnterprisesGetServiceAccountKeyType)
103+egsaKeyType
104+ = lens _egsaKeyType (\ s a -> s{_egsaKeyType = a})
105+
106+-- | The ID of the enterprise.
107+egsaEnterpriseId :: Lens' EnterprisesGetServiceAccount Text
108+egsaEnterpriseId
109+ = lens _egsaEnterpriseId
110+ (\ s a -> s{_egsaEnterpriseId = a})
111+
112+instance GoogleRequest EnterprisesGetServiceAccount
113+ where
114+ type Rs EnterprisesGetServiceAccount = ServiceAccount
115+ type Scopes EnterprisesGetServiceAccount =
116+ '["https://www.googleapis.com/auth/androidenterprise"]
117+ requestClient EnterprisesGetServiceAccount'{..}
118+ = go _egsaEnterpriseId _egsaKeyType (Just AltJSON)
119+ androidEnterpriseService
120+ where go
121+ = buildClient
122+ (Proxy :: Proxy EnterprisesGetServiceAccountResource)
123+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/GetStoreLayout.hs+6−2
@@ -20,7 +20,9 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Returns the store layout resource.
23+-- Returns the store layout for the enterprise. If the store layout has not
24+-- been set, or if the store layout has no homepageId set, returns a
25+-- NOT_FOUND error.
2426--
2527-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.getStoreLayout@.
2628module Network.Google.Resource.AndroidEnterprise.Enterprises.GetStoreLayout
@@ -49,7 +51,9 @@ type EnterprisesGetStoreLayoutResource =
4951 "storeLayout" :>
5052 QueryParam "alt" AltJSON :> Get '[JSON] StoreLayout
5153
52−-- | Returns the store layout resource.
54+-- | Returns the store layout for the enterprise. If the store layout has not
55+-- been set, or if the store layout has no homepageId set, returns a
56+-- NOT_FOUND error.
5357--
5458-- /See:/ 'enterprisesGetStoreLayout' smart constructor.
5559newtype EnterprisesGetStoreLayout = EnterprisesGetStoreLayout'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/List.hs+10−2
@@ -20,7 +20,11 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Looks up an enterprise by domain name.
23+-- Looks up an enterprise by domain name. This is only supported for
24+-- enterprises created via the Google-initiated creation flow. Lookup of
25+-- the id is not needed for enterprises created via the EMM-initiated flow
26+-- since the EMM learns the enterprise ID in the callback specified in the
27+-- Enterprises.generateSignupUrl call.
2428--
2529-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.list@.
2630module Network.Google.Resource.AndroidEnterprise.Enterprises.List
@@ -49,7 +53,11 @@ type EnterprisesListResource =
4953 QueryParam "alt" AltJSON :>
5054 Get '[JSON] EnterprisesListResponse
5155
52−-- | Looks up an enterprise by domain name.
56+-- | Looks up an enterprise by domain name. This is only supported for
57+-- enterprises created via the Google-initiated creation flow. Lookup of
58+-- the id is not needed for enterprises created via the EMM-initiated flow
59+-- since the EMM learns the enterprise ID in the callback specified in the
60+-- Enterprises.generateSignupUrl call.
5361--
5462-- /See:/ 'enterprisesList' smart constructor.
5563newtype EnterprisesList = EnterprisesList'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/PullNotificationSet.hsnew file+125
@@ -0,0 +1,125 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Enterprises.PullNotificationSet
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Pulls and returns a notification set for the enterprises associated with
24+-- the service account authenticated for the request. The notification set
25+-- may be empty if no notification are pending. A notification set returned
26+-- needs to be acknowledged within 20 seconds by calling
27+-- Enterprises​.AcknowledgeNotificationSet, unless the notification set is
28+-- empty. Notifications that are not acknowledged within the 20 seconds
29+-- will eventually be included again in the response to another
30+-- PullNotificationSet request, and those that are never acknowledged will
31+-- ultimately be deleted according to the Google Cloud Platform Pub\/Sub
32+-- system policy. Multiple requests might be performed concurrently to
33+-- retrieve notifications, in which case the pending notifications (if any)
34+-- will be split among each caller, if any are pending. If no notifications
35+-- are present, an empty notification list is returned. Subsequent requests
36+-- may return more notifications once they become available.
37+--
38+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.pullNotificationSet@.
39+module Network.Google.Resource.AndroidEnterprise.Enterprises.PullNotificationSet
40+ (
41+ -- * REST Resource
42+ EnterprisesPullNotificationSetResource
43+
44+ -- * Creating a Request
45+ , enterprisesPullNotificationSet
46+ , EnterprisesPullNotificationSet
47+
48+ -- * Request Lenses
49+ , epnsRequestMode
50+ ) where
51+
52+import Network.Google.AndroidEnterprise.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @androidenterprise.enterprises.pullNotificationSet@ method which the
56+-- 'EnterprisesPullNotificationSet' request conforms to.
57+type EnterprisesPullNotificationSetResource =
58+ "androidenterprise" :>
59+ "v1" :>
60+ "enterprises" :>
61+ "pullNotificationSet" :>
62+ QueryParam "requestMode"
63+ EnterprisesPullNotificationSetRequestMode
64+ :>
65+ QueryParam "alt" AltJSON :>
66+ Post '[JSON] NotificationSet
67+
68+-- | Pulls and returns a notification set for the enterprises associated with
69+-- the service account authenticated for the request. The notification set
70+-- may be empty if no notification are pending. A notification set returned
71+-- needs to be acknowledged within 20 seconds by calling
72+-- Enterprises​.AcknowledgeNotificationSet, unless the notification set is
73+-- empty. Notifications that are not acknowledged within the 20 seconds
74+-- will eventually be included again in the response to another
75+-- PullNotificationSet request, and those that are never acknowledged will
76+-- ultimately be deleted according to the Google Cloud Platform Pub\/Sub
77+-- system policy. Multiple requests might be performed concurrently to
78+-- retrieve notifications, in which case the pending notifications (if any)
79+-- will be split among each caller, if any are pending. If no notifications
80+-- are present, an empty notification list is returned. Subsequent requests
81+-- may return more notifications once they become available.
82+--
83+-- /See:/ 'enterprisesPullNotificationSet' smart constructor.
84+newtype EnterprisesPullNotificationSet = EnterprisesPullNotificationSet'
85+ { _epnsRequestMode :: Maybe EnterprisesPullNotificationSetRequestMode
86+ } deriving (Eq,Show,Data,Typeable,Generic)
87+
88+-- | Creates a value of 'EnterprisesPullNotificationSet' with the minimum fields required to make a request.
89+--
90+-- Use one of the following lenses to modify other fields as desired:
91+--
92+-- * 'epnsRequestMode'
93+enterprisesPullNotificationSet
94+ :: EnterprisesPullNotificationSet
95+enterprisesPullNotificationSet =
96+ EnterprisesPullNotificationSet'
97+ { _epnsRequestMode = Nothing
98+ }
99+
100+-- | The request mode for pulling notifications. Specifying
101+-- waitForNotifications will cause the request to block and wait until one
102+-- or more notifications are present, or return an empty notification list
103+-- if no notifications are present after some time. Speciying
104+-- returnImmediately will cause the request to immediately return the
105+-- pending notifications, or an empty list if no notifications are present.
106+-- If omitted, defaults to waitForNotifications.
107+epnsRequestMode :: Lens' EnterprisesPullNotificationSet (Maybe EnterprisesPullNotificationSetRequestMode)
108+epnsRequestMode
109+ = lens _epnsRequestMode
110+ (\ s a -> s{_epnsRequestMode = a})
111+
112+instance GoogleRequest EnterprisesPullNotificationSet
113+ where
114+ type Rs EnterprisesPullNotificationSet =
115+ NotificationSet
116+ type Scopes EnterprisesPullNotificationSet =
117+ '["https://www.googleapis.com/auth/androidenterprise"]
118+ requestClient EnterprisesPullNotificationSet'{..}
119+ = go _epnsRequestMode (Just AltJSON)
120+ androidEnterpriseService
121+ where go
122+ = buildClient
123+ (Proxy ::
124+ Proxy EnterprisesPullNotificationSetResource)
125+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Enterprises/SetStoreLayout.hs+2−2
@@ -20,7 +20,7 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Sets the store layout resource.
23+-- Sets the store layout for the enterprise.
2424--
2525-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.setStoreLayout@.
2626module Network.Google.Resource.AndroidEnterprise.Enterprises.SetStoreLayout
@@ -52,7 +52,7 @@ type EnterprisesSetStoreLayoutResource =
5252 ReqBody '[JSON] StoreLayout :>
5353 Put '[JSON] StoreLayout
5454
55−-- | Sets the store layout resource.
55+-- | Sets the store layout for the enterprise.
5656--
5757-- /See:/ 'enterprisesSetStoreLayout' smart constructor.
5858data EnterprisesSetStoreLayout = EnterprisesSetStoreLayout'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Delete.hsnew file+136
@@ -0,0 +1,136 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Removes a per-device managed configuration for an app for the specified
24+-- device.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsfordevice.delete@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Delete
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforDeviceDeleteResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforDeviceDelete
34+ , ManagedConfigurationsforDeviceDelete
35+
36+ -- * Request Lenses
37+ , mcddEnterpriseId
38+ , mcddUserId
39+ , mcddDeviceId
40+ , mcddManagedConfigurationForDeviceId
41+ ) where
42+
43+import Network.Google.AndroidEnterprise.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidenterprise.managedconfigurationsfordevice.delete@ method which the
47+-- 'ManagedConfigurationsforDeviceDelete' request conforms to.
48+type ManagedConfigurationsforDeviceDeleteResource =
49+ "androidenterprise" :>
50+ "v1" :>
51+ "enterprises" :>
52+ Capture "enterpriseId" Text :>
53+ "users" :>
54+ Capture "userId" Text :>
55+ "devices" :>
56+ Capture "deviceId" Text :>
57+ "managedConfigurationsForDevice" :>
58+ Capture "managedConfigurationForDeviceId" Text :>
59+ QueryParam "alt" AltJSON :> Delete '[JSON] ()
60+
61+-- | Removes a per-device managed configuration for an app for the specified
62+-- device.
63+--
64+-- /See:/ 'managedConfigurationsforDeviceDelete' smart constructor.
65+data ManagedConfigurationsforDeviceDelete = ManagedConfigurationsforDeviceDelete'
66+ { _mcddEnterpriseId :: !Text
67+ , _mcddUserId :: !Text
68+ , _mcddDeviceId :: !Text
69+ , _mcddManagedConfigurationForDeviceId :: !Text
70+ } deriving (Eq,Show,Data,Typeable,Generic)
71+
72+-- | Creates a value of 'ManagedConfigurationsforDeviceDelete' with the minimum fields required to make a request.
73+--
74+-- Use one of the following lenses to modify other fields as desired:
75+--
76+-- * 'mcddEnterpriseId'
77+--
78+-- * 'mcddUserId'
79+--
80+-- * 'mcddDeviceId'
81+--
82+-- * 'mcddManagedConfigurationForDeviceId'
83+managedConfigurationsforDeviceDelete
84+ :: Text -- ^ 'mcddEnterpriseId'
85+ -> Text -- ^ 'mcddUserId'
86+ -> Text -- ^ 'mcddDeviceId'
87+ -> Text -- ^ 'mcddManagedConfigurationForDeviceId'
88+ -> ManagedConfigurationsforDeviceDelete
89+managedConfigurationsforDeviceDelete pMcddEnterpriseId_ pMcddUserId_ pMcddDeviceId_ pMcddManagedConfigurationForDeviceId_ =
90+ ManagedConfigurationsforDeviceDelete'
91+ { _mcddEnterpriseId = pMcddEnterpriseId_
92+ , _mcddUserId = pMcddUserId_
93+ , _mcddDeviceId = pMcddDeviceId_
94+ , _mcddManagedConfigurationForDeviceId = pMcddManagedConfigurationForDeviceId_
95+ }
96+
97+-- | The ID of the enterprise.
98+mcddEnterpriseId :: Lens' ManagedConfigurationsforDeviceDelete Text
99+mcddEnterpriseId
100+ = lens _mcddEnterpriseId
101+ (\ s a -> s{_mcddEnterpriseId = a})
102+
103+-- | The ID of the user.
104+mcddUserId :: Lens' ManagedConfigurationsforDeviceDelete Text
105+mcddUserId
106+ = lens _mcddUserId (\ s a -> s{_mcddUserId = a})
107+
108+-- | The Android ID of the device.
109+mcddDeviceId :: Lens' ManagedConfigurationsforDeviceDelete Text
110+mcddDeviceId
111+ = lens _mcddDeviceId (\ s a -> s{_mcddDeviceId = a})
112+
113+-- | The ID of the managed configuration (a product ID), e.g.
114+-- \"app:com.google.android.gm\".
115+mcddManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDeviceDelete Text
116+mcddManagedConfigurationForDeviceId
117+ = lens _mcddManagedConfigurationForDeviceId
118+ (\ s a ->
119+ s{_mcddManagedConfigurationForDeviceId = a})
120+
121+instance GoogleRequest
122+ ManagedConfigurationsforDeviceDelete where
123+ type Rs ManagedConfigurationsforDeviceDelete = ()
124+ type Scopes ManagedConfigurationsforDeviceDelete =
125+ '["https://www.googleapis.com/auth/androidenterprise"]
126+ requestClient
127+ ManagedConfigurationsforDeviceDelete'{..}
128+ = go _mcddEnterpriseId _mcddUserId _mcddDeviceId
129+ _mcddManagedConfigurationForDeviceId
130+ (Just AltJSON)
131+ androidEnterpriseService
132+ where go
133+ = buildClient
134+ (Proxy ::
135+ Proxy ManagedConfigurationsforDeviceDeleteResource)
136+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Get.hsnew file+135
@@ -0,0 +1,135 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Retrieves details of a per-device managed configuration.
24+--
25+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsfordevice.get@.
26+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Get
27+ (
28+ -- * REST Resource
29+ ManagedConfigurationsforDeviceGetResource
30+
31+ -- * Creating a Request
32+ , managedConfigurationsforDeviceGet
33+ , ManagedConfigurationsforDeviceGet
34+
35+ -- * Request Lenses
36+ , mcdgEnterpriseId
37+ , mcdgUserId
38+ , mcdgDeviceId
39+ , mcdgManagedConfigurationForDeviceId
40+ ) where
41+
42+import Network.Google.AndroidEnterprise.Types
43+import Network.Google.Prelude
44+
45+-- | A resource alias for @androidenterprise.managedconfigurationsfordevice.get@ method which the
46+-- 'ManagedConfigurationsforDeviceGet' request conforms to.
47+type ManagedConfigurationsforDeviceGetResource =
48+ "androidenterprise" :>
49+ "v1" :>
50+ "enterprises" :>
51+ Capture "enterpriseId" Text :>
52+ "users" :>
53+ Capture "userId" Text :>
54+ "devices" :>
55+ Capture "deviceId" Text :>
56+ "managedConfigurationsForDevice" :>
57+ Capture "managedConfigurationForDeviceId" Text :>
58+ QueryParam "alt" AltJSON :>
59+ Get '[JSON] ManagedConfiguration
60+
61+-- | Retrieves details of a per-device managed configuration.
62+--
63+-- /See:/ 'managedConfigurationsforDeviceGet' smart constructor.
64+data ManagedConfigurationsforDeviceGet = ManagedConfigurationsforDeviceGet'
65+ { _mcdgEnterpriseId :: !Text
66+ , _mcdgUserId :: !Text
67+ , _mcdgDeviceId :: !Text
68+ , _mcdgManagedConfigurationForDeviceId :: !Text
69+ } deriving (Eq,Show,Data,Typeable,Generic)
70+
71+-- | Creates a value of 'ManagedConfigurationsforDeviceGet' with the minimum fields required to make a request.
72+--
73+-- Use one of the following lenses to modify other fields as desired:
74+--
75+-- * 'mcdgEnterpriseId'
76+--
77+-- * 'mcdgUserId'
78+--
79+-- * 'mcdgDeviceId'
80+--
81+-- * 'mcdgManagedConfigurationForDeviceId'
82+managedConfigurationsforDeviceGet
83+ :: Text -- ^ 'mcdgEnterpriseId'
84+ -> Text -- ^ 'mcdgUserId'
85+ -> Text -- ^ 'mcdgDeviceId'
86+ -> Text -- ^ 'mcdgManagedConfigurationForDeviceId'
87+ -> ManagedConfigurationsforDeviceGet
88+managedConfigurationsforDeviceGet pMcdgEnterpriseId_ pMcdgUserId_ pMcdgDeviceId_ pMcdgManagedConfigurationForDeviceId_ =
89+ ManagedConfigurationsforDeviceGet'
90+ { _mcdgEnterpriseId = pMcdgEnterpriseId_
91+ , _mcdgUserId = pMcdgUserId_
92+ , _mcdgDeviceId = pMcdgDeviceId_
93+ , _mcdgManagedConfigurationForDeviceId = pMcdgManagedConfigurationForDeviceId_
94+ }
95+
96+-- | The ID of the enterprise.
97+mcdgEnterpriseId :: Lens' ManagedConfigurationsforDeviceGet Text
98+mcdgEnterpriseId
99+ = lens _mcdgEnterpriseId
100+ (\ s a -> s{_mcdgEnterpriseId = a})
101+
102+-- | The ID of the user.
103+mcdgUserId :: Lens' ManagedConfigurationsforDeviceGet Text
104+mcdgUserId
105+ = lens _mcdgUserId (\ s a -> s{_mcdgUserId = a})
106+
107+-- | The Android ID of the device.
108+mcdgDeviceId :: Lens' ManagedConfigurationsforDeviceGet Text
109+mcdgDeviceId
110+ = lens _mcdgDeviceId (\ s a -> s{_mcdgDeviceId = a})
111+
112+-- | The ID of the managed configuration (a product ID), e.g.
113+-- \"app:com.google.android.gm\".
114+mcdgManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDeviceGet Text
115+mcdgManagedConfigurationForDeviceId
116+ = lens _mcdgManagedConfigurationForDeviceId
117+ (\ s a ->
118+ s{_mcdgManagedConfigurationForDeviceId = a})
119+
120+instance GoogleRequest
121+ ManagedConfigurationsforDeviceGet where
122+ type Rs ManagedConfigurationsforDeviceGet =
123+ ManagedConfiguration
124+ type Scopes ManagedConfigurationsforDeviceGet =
125+ '["https://www.googleapis.com/auth/androidenterprise"]
126+ requestClient ManagedConfigurationsforDeviceGet'{..}
127+ = go _mcdgEnterpriseId _mcdgUserId _mcdgDeviceId
128+ _mcdgManagedConfigurationForDeviceId
129+ (Just AltJSON)
130+ androidEnterpriseService
131+ where go
132+ = buildClient
133+ (Proxy ::
134+ Proxy ManagedConfigurationsforDeviceGetResource)
135+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/List.hsnew file+122
@@ -0,0 +1,122 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists all the per-device managed configurations for the specified
24+-- device. Only the ID is set.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsfordevice.list@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.List
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforDeviceListResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforDeviceList
34+ , ManagedConfigurationsforDeviceList
35+
36+ -- * Request Lenses
37+ , mcdlEnterpriseId
38+ , mcdlUserId
39+ , mcdlDeviceId
40+ ) where
41+
42+import Network.Google.AndroidEnterprise.Types
43+import Network.Google.Prelude
44+
45+-- | A resource alias for @androidenterprise.managedconfigurationsfordevice.list@ method which the
46+-- 'ManagedConfigurationsforDeviceList' request conforms to.
47+type ManagedConfigurationsforDeviceListResource =
48+ "androidenterprise" :>
49+ "v1" :>
50+ "enterprises" :>
51+ Capture "enterpriseId" Text :>
52+ "users" :>
53+ Capture "userId" Text :>
54+ "devices" :>
55+ Capture "deviceId" Text :>
56+ "managedConfigurationsForDevice" :>
57+ QueryParam "alt" AltJSON :>
58+ Get '[JSON]
59+ ManagedConfigurationsForDeviceListResponse
60+
61+-- | Lists all the per-device managed configurations for the specified
62+-- device. Only the ID is set.
63+--
64+-- /See:/ 'managedConfigurationsforDeviceList' smart constructor.
65+data ManagedConfigurationsforDeviceList = ManagedConfigurationsforDeviceList'
66+ { _mcdlEnterpriseId :: !Text
67+ , _mcdlUserId :: !Text
68+ , _mcdlDeviceId :: !Text
69+ } deriving (Eq,Show,Data,Typeable,Generic)
70+
71+-- | Creates a value of 'ManagedConfigurationsforDeviceList' with the minimum fields required to make a request.
72+--
73+-- Use one of the following lenses to modify other fields as desired:
74+--
75+-- * 'mcdlEnterpriseId'
76+--
77+-- * 'mcdlUserId'
78+--
79+-- * 'mcdlDeviceId'
80+managedConfigurationsforDeviceList
81+ :: Text -- ^ 'mcdlEnterpriseId'
82+ -> Text -- ^ 'mcdlUserId'
83+ -> Text -- ^ 'mcdlDeviceId'
84+ -> ManagedConfigurationsforDeviceList
85+managedConfigurationsforDeviceList pMcdlEnterpriseId_ pMcdlUserId_ pMcdlDeviceId_ =
86+ ManagedConfigurationsforDeviceList'
87+ { _mcdlEnterpriseId = pMcdlEnterpriseId_
88+ , _mcdlUserId = pMcdlUserId_
89+ , _mcdlDeviceId = pMcdlDeviceId_
90+ }
91+
92+-- | The ID of the enterprise.
93+mcdlEnterpriseId :: Lens' ManagedConfigurationsforDeviceList Text
94+mcdlEnterpriseId
95+ = lens _mcdlEnterpriseId
96+ (\ s a -> s{_mcdlEnterpriseId = a})
97+
98+-- | The ID of the user.
99+mcdlUserId :: Lens' ManagedConfigurationsforDeviceList Text
100+mcdlUserId
101+ = lens _mcdlUserId (\ s a -> s{_mcdlUserId = a})
102+
103+-- | The Android ID of the device.
104+mcdlDeviceId :: Lens' ManagedConfigurationsforDeviceList Text
105+mcdlDeviceId
106+ = lens _mcdlDeviceId (\ s a -> s{_mcdlDeviceId = a})
107+
108+instance GoogleRequest
109+ ManagedConfigurationsforDeviceList where
110+ type Rs ManagedConfigurationsforDeviceList =
111+ ManagedConfigurationsForDeviceListResponse
112+ type Scopes ManagedConfigurationsforDeviceList =
113+ '["https://www.googleapis.com/auth/androidenterprise"]
114+ requestClient ManagedConfigurationsforDeviceList'{..}
115+ = go _mcdlEnterpriseId _mcdlUserId _mcdlDeviceId
116+ (Just AltJSON)
117+ androidEnterpriseService
118+ where go
119+ = buildClient
120+ (Proxy ::
121+ Proxy ManagedConfigurationsforDeviceListResource)
122+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Patch.hsnew file+151
@@ -0,0 +1,151 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Patch
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Adds or updates a per-device managed configuration for an app for the
24+-- specified device. This method supports patch semantics.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsfordevice.patch@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Patch
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforDevicePatchResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforDevicePatch
34+ , ManagedConfigurationsforDevicePatch
35+
36+ -- * Request Lenses
37+ , mcdpEnterpriseId
38+ , mcdpPayload
39+ , mcdpUserId
40+ , mcdpDeviceId
41+ , mcdpManagedConfigurationForDeviceId
42+ ) where
43+
44+import Network.Google.AndroidEnterprise.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidenterprise.managedconfigurationsfordevice.patch@ method which the
48+-- 'ManagedConfigurationsforDevicePatch' request conforms to.
49+type ManagedConfigurationsforDevicePatchResource =
50+ "androidenterprise" :>
51+ "v1" :>
52+ "enterprises" :>
53+ Capture "enterpriseId" Text :>
54+ "users" :>
55+ Capture "userId" Text :>
56+ "devices" :>
57+ Capture "deviceId" Text :>
58+ "managedConfigurationsForDevice" :>
59+ Capture "managedConfigurationForDeviceId" Text :>
60+ QueryParam "alt" AltJSON :>
61+ ReqBody '[JSON] ManagedConfiguration :>
62+ Patch '[JSON] ManagedConfiguration
63+
64+-- | Adds or updates a per-device managed configuration for an app for the
65+-- specified device. This method supports patch semantics.
66+--
67+-- /See:/ 'managedConfigurationsforDevicePatch' smart constructor.
68+data ManagedConfigurationsforDevicePatch = ManagedConfigurationsforDevicePatch'
69+ { _mcdpEnterpriseId :: !Text
70+ , _mcdpPayload :: !ManagedConfiguration
71+ , _mcdpUserId :: !Text
72+ , _mcdpDeviceId :: !Text
73+ , _mcdpManagedConfigurationForDeviceId :: !Text
74+ } deriving (Eq,Show,Data,Typeable,Generic)
75+
76+-- | Creates a value of 'ManagedConfigurationsforDevicePatch' with the minimum fields required to make a request.
77+--
78+-- Use one of the following lenses to modify other fields as desired:
79+--
80+-- * 'mcdpEnterpriseId'
81+--
82+-- * 'mcdpPayload'
83+--
84+-- * 'mcdpUserId'
85+--
86+-- * 'mcdpDeviceId'
87+--
88+-- * 'mcdpManagedConfigurationForDeviceId'
89+managedConfigurationsforDevicePatch
90+ :: Text -- ^ 'mcdpEnterpriseId'
91+ -> ManagedConfiguration -- ^ 'mcdpPayload'
92+ -> Text -- ^ 'mcdpUserId'
93+ -> Text -- ^ 'mcdpDeviceId'
94+ -> Text -- ^ 'mcdpManagedConfigurationForDeviceId'
95+ -> ManagedConfigurationsforDevicePatch
96+managedConfigurationsforDevicePatch pMcdpEnterpriseId_ pMcdpPayload_ pMcdpUserId_ pMcdpDeviceId_ pMcdpManagedConfigurationForDeviceId_ =
97+ ManagedConfigurationsforDevicePatch'
98+ { _mcdpEnterpriseId = pMcdpEnterpriseId_
99+ , _mcdpPayload = pMcdpPayload_
100+ , _mcdpUserId = pMcdpUserId_
101+ , _mcdpDeviceId = pMcdpDeviceId_
102+ , _mcdpManagedConfigurationForDeviceId = pMcdpManagedConfigurationForDeviceId_
103+ }
104+
105+-- | The ID of the enterprise.
106+mcdpEnterpriseId :: Lens' ManagedConfigurationsforDevicePatch Text
107+mcdpEnterpriseId
108+ = lens _mcdpEnterpriseId
109+ (\ s a -> s{_mcdpEnterpriseId = a})
110+
111+-- | Multipart request metadata.
112+mcdpPayload :: Lens' ManagedConfigurationsforDevicePatch ManagedConfiguration
113+mcdpPayload
114+ = lens _mcdpPayload (\ s a -> s{_mcdpPayload = a})
115+
116+-- | The ID of the user.
117+mcdpUserId :: Lens' ManagedConfigurationsforDevicePatch Text
118+mcdpUserId
119+ = lens _mcdpUserId (\ s a -> s{_mcdpUserId = a})
120+
121+-- | The Android ID of the device.
122+mcdpDeviceId :: Lens' ManagedConfigurationsforDevicePatch Text
123+mcdpDeviceId
124+ = lens _mcdpDeviceId (\ s a -> s{_mcdpDeviceId = a})
125+
126+-- | The ID of the managed configuration (a product ID), e.g.
127+-- \"app:com.google.android.gm\".
128+mcdpManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDevicePatch Text
129+mcdpManagedConfigurationForDeviceId
130+ = lens _mcdpManagedConfigurationForDeviceId
131+ (\ s a ->
132+ s{_mcdpManagedConfigurationForDeviceId = a})
133+
134+instance GoogleRequest
135+ ManagedConfigurationsforDevicePatch where
136+ type Rs ManagedConfigurationsforDevicePatch =
137+ ManagedConfiguration
138+ type Scopes ManagedConfigurationsforDevicePatch =
139+ '["https://www.googleapis.com/auth/androidenterprise"]
140+ requestClient
141+ ManagedConfigurationsforDevicePatch'{..}
142+ = go _mcdpEnterpriseId _mcdpUserId _mcdpDeviceId
143+ _mcdpManagedConfigurationForDeviceId
144+ (Just AltJSON)
145+ _mcdpPayload
146+ androidEnterpriseService
147+ where go
148+ = buildClient
149+ (Proxy ::
150+ Proxy ManagedConfigurationsforDevicePatchResource)
151+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforDevice/Update.hsnew file+151
@@ -0,0 +1,151 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Update
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Adds or updates a per-device managed configuration for an app for the
24+-- specified device.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsfordevice.update@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Update
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforDeviceUpdateResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforDeviceUpdate
34+ , ManagedConfigurationsforDeviceUpdate
35+
36+ -- * Request Lenses
37+ , mcduEnterpriseId
38+ , mcduPayload
39+ , mcduUserId
40+ , mcduDeviceId
41+ , mcduManagedConfigurationForDeviceId
42+ ) where
43+
44+import Network.Google.AndroidEnterprise.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidenterprise.managedconfigurationsfordevice.update@ method which the
48+-- 'ManagedConfigurationsforDeviceUpdate' request conforms to.
49+type ManagedConfigurationsforDeviceUpdateResource =
50+ "androidenterprise" :>
51+ "v1" :>
52+ "enterprises" :>
53+ Capture "enterpriseId" Text :>
54+ "users" :>
55+ Capture "userId" Text :>
56+ "devices" :>
57+ Capture "deviceId" Text :>
58+ "managedConfigurationsForDevice" :>
59+ Capture "managedConfigurationForDeviceId" Text :>
60+ QueryParam "alt" AltJSON :>
61+ ReqBody '[JSON] ManagedConfiguration :>
62+ Put '[JSON] ManagedConfiguration
63+
64+-- | Adds or updates a per-device managed configuration for an app for the
65+-- specified device.
66+--
67+-- /See:/ 'managedConfigurationsforDeviceUpdate' smart constructor.
68+data ManagedConfigurationsforDeviceUpdate = ManagedConfigurationsforDeviceUpdate'
69+ { _mcduEnterpriseId :: !Text
70+ , _mcduPayload :: !ManagedConfiguration
71+ , _mcduUserId :: !Text
72+ , _mcduDeviceId :: !Text
73+ , _mcduManagedConfigurationForDeviceId :: !Text
74+ } deriving (Eq,Show,Data,Typeable,Generic)
75+
76+-- | Creates a value of 'ManagedConfigurationsforDeviceUpdate' with the minimum fields required to make a request.
77+--
78+-- Use one of the following lenses to modify other fields as desired:
79+--
80+-- * 'mcduEnterpriseId'
81+--
82+-- * 'mcduPayload'
83+--
84+-- * 'mcduUserId'
85+--
86+-- * 'mcduDeviceId'
87+--
88+-- * 'mcduManagedConfigurationForDeviceId'
89+managedConfigurationsforDeviceUpdate
90+ :: Text -- ^ 'mcduEnterpriseId'
91+ -> ManagedConfiguration -- ^ 'mcduPayload'
92+ -> Text -- ^ 'mcduUserId'
93+ -> Text -- ^ 'mcduDeviceId'
94+ -> Text -- ^ 'mcduManagedConfigurationForDeviceId'
95+ -> ManagedConfigurationsforDeviceUpdate
96+managedConfigurationsforDeviceUpdate pMcduEnterpriseId_ pMcduPayload_ pMcduUserId_ pMcduDeviceId_ pMcduManagedConfigurationForDeviceId_ =
97+ ManagedConfigurationsforDeviceUpdate'
98+ { _mcduEnterpriseId = pMcduEnterpriseId_
99+ , _mcduPayload = pMcduPayload_
100+ , _mcduUserId = pMcduUserId_
101+ , _mcduDeviceId = pMcduDeviceId_
102+ , _mcduManagedConfigurationForDeviceId = pMcduManagedConfigurationForDeviceId_
103+ }
104+
105+-- | The ID of the enterprise.
106+mcduEnterpriseId :: Lens' ManagedConfigurationsforDeviceUpdate Text
107+mcduEnterpriseId
108+ = lens _mcduEnterpriseId
109+ (\ s a -> s{_mcduEnterpriseId = a})
110+
111+-- | Multipart request metadata.
112+mcduPayload :: Lens' ManagedConfigurationsforDeviceUpdate ManagedConfiguration
113+mcduPayload
114+ = lens _mcduPayload (\ s a -> s{_mcduPayload = a})
115+
116+-- | The ID of the user.
117+mcduUserId :: Lens' ManagedConfigurationsforDeviceUpdate Text
118+mcduUserId
119+ = lens _mcduUserId (\ s a -> s{_mcduUserId = a})
120+
121+-- | The Android ID of the device.
122+mcduDeviceId :: Lens' ManagedConfigurationsforDeviceUpdate Text
123+mcduDeviceId
124+ = lens _mcduDeviceId (\ s a -> s{_mcduDeviceId = a})
125+
126+-- | The ID of the managed configuration (a product ID), e.g.
127+-- \"app:com.google.android.gm\".
128+mcduManagedConfigurationForDeviceId :: Lens' ManagedConfigurationsforDeviceUpdate Text
129+mcduManagedConfigurationForDeviceId
130+ = lens _mcduManagedConfigurationForDeviceId
131+ (\ s a ->
132+ s{_mcduManagedConfigurationForDeviceId = a})
133+
134+instance GoogleRequest
135+ ManagedConfigurationsforDeviceUpdate where
136+ type Rs ManagedConfigurationsforDeviceUpdate =
137+ ManagedConfiguration
138+ type Scopes ManagedConfigurationsforDeviceUpdate =
139+ '["https://www.googleapis.com/auth/androidenterprise"]
140+ requestClient
141+ ManagedConfigurationsforDeviceUpdate'{..}
142+ = go _mcduEnterpriseId _mcduUserId _mcduDeviceId
143+ _mcduManagedConfigurationForDeviceId
144+ (Just AltJSON)
145+ _mcduPayload
146+ androidEnterpriseService
147+ where go
148+ = buildClient
149+ (Proxy ::
150+ Proxy ManagedConfigurationsforDeviceUpdateResource)
151+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Delete.hsnew file+121
@@ -0,0 +1,121 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Removes a per-user managed configuration for an app for the specified
24+-- user.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsforuser.delete@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Delete
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforUserDeleteResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforUserDelete
34+ , ManagedConfigurationsforUserDelete
35+
36+ -- * Request Lenses
37+ , mcudEnterpriseId
38+ , mcudUserId
39+ , mcudManagedConfigurationForUserId
40+ ) where
41+
42+import Network.Google.AndroidEnterprise.Types
43+import Network.Google.Prelude
44+
45+-- | A resource alias for @androidenterprise.managedconfigurationsforuser.delete@ method which the
46+-- 'ManagedConfigurationsforUserDelete' request conforms to.
47+type ManagedConfigurationsforUserDeleteResource =
48+ "androidenterprise" :>
49+ "v1" :>
50+ "enterprises" :>
51+ Capture "enterpriseId" Text :>
52+ "users" :>
53+ Capture "userId" Text :>
54+ "managedConfigurationsForUser" :>
55+ Capture "managedConfigurationForUserId" Text :>
56+ QueryParam "alt" AltJSON :> Delete '[JSON] ()
57+
58+-- | Removes a per-user managed configuration for an app for the specified
59+-- user.
60+--
61+-- /See:/ 'managedConfigurationsforUserDelete' smart constructor.
62+data ManagedConfigurationsforUserDelete = ManagedConfigurationsforUserDelete'
63+ { _mcudEnterpriseId :: !Text
64+ , _mcudUserId :: !Text
65+ , _mcudManagedConfigurationForUserId :: !Text
66+ } deriving (Eq,Show,Data,Typeable,Generic)
67+
68+-- | Creates a value of 'ManagedConfigurationsforUserDelete' with the minimum fields required to make a request.
69+--
70+-- Use one of the following lenses to modify other fields as desired:
71+--
72+-- * 'mcudEnterpriseId'
73+--
74+-- * 'mcudUserId'
75+--
76+-- * 'mcudManagedConfigurationForUserId'
77+managedConfigurationsforUserDelete
78+ :: Text -- ^ 'mcudEnterpriseId'
79+ -> Text -- ^ 'mcudUserId'
80+ -> Text -- ^ 'mcudManagedConfigurationForUserId'
81+ -> ManagedConfigurationsforUserDelete
82+managedConfigurationsforUserDelete pMcudEnterpriseId_ pMcudUserId_ pMcudManagedConfigurationForUserId_ =
83+ ManagedConfigurationsforUserDelete'
84+ { _mcudEnterpriseId = pMcudEnterpriseId_
85+ , _mcudUserId = pMcudUserId_
86+ , _mcudManagedConfigurationForUserId = pMcudManagedConfigurationForUserId_
87+ }
88+
89+-- | The ID of the enterprise.
90+mcudEnterpriseId :: Lens' ManagedConfigurationsforUserDelete Text
91+mcudEnterpriseId
92+ = lens _mcudEnterpriseId
93+ (\ s a -> s{_mcudEnterpriseId = a})
94+
95+-- | The ID of the user.
96+mcudUserId :: Lens' ManagedConfigurationsforUserDelete Text
97+mcudUserId
98+ = lens _mcudUserId (\ s a -> s{_mcudUserId = a})
99+
100+-- | The ID of the managed configuration (a product ID), e.g.
101+-- \"app:com.google.android.gm\".
102+mcudManagedConfigurationForUserId :: Lens' ManagedConfigurationsforUserDelete Text
103+mcudManagedConfigurationForUserId
104+ = lens _mcudManagedConfigurationForUserId
105+ (\ s a -> s{_mcudManagedConfigurationForUserId = a})
106+
107+instance GoogleRequest
108+ ManagedConfigurationsforUserDelete where
109+ type Rs ManagedConfigurationsforUserDelete = ()
110+ type Scopes ManagedConfigurationsforUserDelete =
111+ '["https://www.googleapis.com/auth/androidenterprise"]
112+ requestClient ManagedConfigurationsforUserDelete'{..}
113+ = go _mcudEnterpriseId _mcudUserId
114+ _mcudManagedConfigurationForUserId
115+ (Just AltJSON)
116+ androidEnterpriseService
117+ where go
118+ = buildClient
119+ (Proxy ::
120+ Proxy ManagedConfigurationsforUserDeleteResource)
121+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Get.hsnew file+123
@@ -0,0 +1,123 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Get
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Retrieves details of a per-user managed configuration for an app for the
24+-- specified user.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsforuser.get@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Get
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforUserGetResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforUserGet
34+ , ManagedConfigurationsforUserGet
35+
36+ -- * Request Lenses
37+ , mcugEnterpriseId
38+ , mcugUserId
39+ , mcugManagedConfigurationForUserId
40+ ) where
41+
42+import Network.Google.AndroidEnterprise.Types
43+import Network.Google.Prelude
44+
45+-- | A resource alias for @androidenterprise.managedconfigurationsforuser.get@ method which the
46+-- 'ManagedConfigurationsforUserGet' request conforms to.
47+type ManagedConfigurationsforUserGetResource =
48+ "androidenterprise" :>
49+ "v1" :>
50+ "enterprises" :>
51+ Capture "enterpriseId" Text :>
52+ "users" :>
53+ Capture "userId" Text :>
54+ "managedConfigurationsForUser" :>
55+ Capture "managedConfigurationForUserId" Text :>
56+ QueryParam "alt" AltJSON :>
57+ Get '[JSON] ManagedConfiguration
58+
59+-- | Retrieves details of a per-user managed configuration for an app for the
60+-- specified user.
61+--
62+-- /See:/ 'managedConfigurationsforUserGet' smart constructor.
63+data ManagedConfigurationsforUserGet = ManagedConfigurationsforUserGet'
64+ { _mcugEnterpriseId :: !Text
65+ , _mcugUserId :: !Text
66+ , _mcugManagedConfigurationForUserId :: !Text
67+ } deriving (Eq,Show,Data,Typeable,Generic)
68+
69+-- | Creates a value of 'ManagedConfigurationsforUserGet' with the minimum fields required to make a request.
70+--
71+-- Use one of the following lenses to modify other fields as desired:
72+--
73+-- * 'mcugEnterpriseId'
74+--
75+-- * 'mcugUserId'
76+--
77+-- * 'mcugManagedConfigurationForUserId'
78+managedConfigurationsforUserGet
79+ :: Text -- ^ 'mcugEnterpriseId'
80+ -> Text -- ^ 'mcugUserId'
81+ -> Text -- ^ 'mcugManagedConfigurationForUserId'
82+ -> ManagedConfigurationsforUserGet
83+managedConfigurationsforUserGet pMcugEnterpriseId_ pMcugUserId_ pMcugManagedConfigurationForUserId_ =
84+ ManagedConfigurationsforUserGet'
85+ { _mcugEnterpriseId = pMcugEnterpriseId_
86+ , _mcugUserId = pMcugUserId_
87+ , _mcugManagedConfigurationForUserId = pMcugManagedConfigurationForUserId_
88+ }
89+
90+-- | The ID of the enterprise.
91+mcugEnterpriseId :: Lens' ManagedConfigurationsforUserGet Text
92+mcugEnterpriseId
93+ = lens _mcugEnterpriseId
94+ (\ s a -> s{_mcugEnterpriseId = a})
95+
96+-- | The ID of the user.
97+mcugUserId :: Lens' ManagedConfigurationsforUserGet Text
98+mcugUserId
99+ = lens _mcugUserId (\ s a -> s{_mcugUserId = a})
100+
101+-- | The ID of the managed configuration (a product ID), e.g.
102+-- \"app:com.google.android.gm\".
103+mcugManagedConfigurationForUserId :: Lens' ManagedConfigurationsforUserGet Text
104+mcugManagedConfigurationForUserId
105+ = lens _mcugManagedConfigurationForUserId
106+ (\ s a -> s{_mcugManagedConfigurationForUserId = a})
107+
108+instance GoogleRequest
109+ ManagedConfigurationsforUserGet where
110+ type Rs ManagedConfigurationsforUserGet =
111+ ManagedConfiguration
112+ type Scopes ManagedConfigurationsforUserGet =
113+ '["https://www.googleapis.com/auth/androidenterprise"]
114+ requestClient ManagedConfigurationsforUserGet'{..}
115+ = go _mcugEnterpriseId _mcugUserId
116+ _mcugManagedConfigurationForUserId
117+ (Just AltJSON)
118+ androidEnterpriseService
119+ where go
120+ = buildClient
121+ (Proxy ::
122+ Proxy ManagedConfigurationsforUserGetResource)
123+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/List.hsnew file+107
@@ -0,0 +1,107 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists all the per-user managed configurations for the specified user.
24+-- Only the ID is set.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsforuser.list@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.List
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforUserListResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforUserList
34+ , ManagedConfigurationsforUserList
35+
36+ -- * Request Lenses
37+ , mculEnterpriseId
38+ , mculUserId
39+ ) where
40+
41+import Network.Google.AndroidEnterprise.Types
42+import Network.Google.Prelude
43+
44+-- | A resource alias for @androidenterprise.managedconfigurationsforuser.list@ method which the
45+-- 'ManagedConfigurationsforUserList' request conforms to.
46+type ManagedConfigurationsforUserListResource =
47+ "androidenterprise" :>
48+ "v1" :>
49+ "enterprises" :>
50+ Capture "enterpriseId" Text :>
51+ "users" :>
52+ Capture "userId" Text :>
53+ "managedConfigurationsForUser" :>
54+ QueryParam "alt" AltJSON :>
55+ Get '[JSON] ManagedConfigurationsForUserListResponse
56+
57+-- | Lists all the per-user managed configurations for the specified user.
58+-- Only the ID is set.
59+--
60+-- /See:/ 'managedConfigurationsforUserList' smart constructor.
61+data ManagedConfigurationsforUserList = ManagedConfigurationsforUserList'
62+ { _mculEnterpriseId :: !Text
63+ , _mculUserId :: !Text
64+ } deriving (Eq,Show,Data,Typeable,Generic)
65+
66+-- | Creates a value of 'ManagedConfigurationsforUserList' with the minimum fields required to make a request.
67+--
68+-- Use one of the following lenses to modify other fields as desired:
69+--
70+-- * 'mculEnterpriseId'
71+--
72+-- * 'mculUserId'
73+managedConfigurationsforUserList
74+ :: Text -- ^ 'mculEnterpriseId'
75+ -> Text -- ^ 'mculUserId'
76+ -> ManagedConfigurationsforUserList
77+managedConfigurationsforUserList pMculEnterpriseId_ pMculUserId_ =
78+ ManagedConfigurationsforUserList'
79+ { _mculEnterpriseId = pMculEnterpriseId_
80+ , _mculUserId = pMculUserId_
81+ }
82+
83+-- | The ID of the enterprise.
84+mculEnterpriseId :: Lens' ManagedConfigurationsforUserList Text
85+mculEnterpriseId
86+ = lens _mculEnterpriseId
87+ (\ s a -> s{_mculEnterpriseId = a})
88+
89+-- | The ID of the user.
90+mculUserId :: Lens' ManagedConfigurationsforUserList Text
91+mculUserId
92+ = lens _mculUserId (\ s a -> s{_mculUserId = a})
93+
94+instance GoogleRequest
95+ ManagedConfigurationsforUserList where
96+ type Rs ManagedConfigurationsforUserList =
97+ ManagedConfigurationsForUserListResponse
98+ type Scopes ManagedConfigurationsforUserList =
99+ '["https://www.googleapis.com/auth/androidenterprise"]
100+ requestClient ManagedConfigurationsforUserList'{..}
101+ = go _mculEnterpriseId _mculUserId (Just AltJSON)
102+ androidEnterpriseService
103+ where go
104+ = buildClient
105+ (Proxy ::
106+ Proxy ManagedConfigurationsforUserListResource)
107+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Patch.hsnew file+136
@@ -0,0 +1,136 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Patch
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Adds or updates a per-user managed configuration for an app for the
24+-- specified user. This method supports patch semantics.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsforuser.patch@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Patch
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforUserPatchResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforUserPatch
34+ , ManagedConfigurationsforUserPatch
35+
36+ -- * Request Lenses
37+ , mcupEnterpriseId
38+ , mcupPayload
39+ , mcupUserId
40+ , mcupManagedConfigurationForUserId
41+ ) where
42+
43+import Network.Google.AndroidEnterprise.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidenterprise.managedconfigurationsforuser.patch@ method which the
47+-- 'ManagedConfigurationsforUserPatch' request conforms to.
48+type ManagedConfigurationsforUserPatchResource =
49+ "androidenterprise" :>
50+ "v1" :>
51+ "enterprises" :>
52+ Capture "enterpriseId" Text :>
53+ "users" :>
54+ Capture "userId" Text :>
55+ "managedConfigurationsForUser" :>
56+ Capture "managedConfigurationForUserId" Text :>
57+ QueryParam "alt" AltJSON :>
58+ ReqBody '[JSON] ManagedConfiguration :>
59+ Patch '[JSON] ManagedConfiguration
60+
61+-- | Adds or updates a per-user managed configuration for an app for the
62+-- specified user. This method supports patch semantics.
63+--
64+-- /See:/ 'managedConfigurationsforUserPatch' smart constructor.
65+data ManagedConfigurationsforUserPatch = ManagedConfigurationsforUserPatch'
66+ { _mcupEnterpriseId :: !Text
67+ , _mcupPayload :: !ManagedConfiguration
68+ , _mcupUserId :: !Text
69+ , _mcupManagedConfigurationForUserId :: !Text
70+ } deriving (Eq,Show,Data,Typeable,Generic)
71+
72+-- | Creates a value of 'ManagedConfigurationsforUserPatch' with the minimum fields required to make a request.
73+--
74+-- Use one of the following lenses to modify other fields as desired:
75+--
76+-- * 'mcupEnterpriseId'
77+--
78+-- * 'mcupPayload'
79+--
80+-- * 'mcupUserId'
81+--
82+-- * 'mcupManagedConfigurationForUserId'
83+managedConfigurationsforUserPatch
84+ :: Text -- ^ 'mcupEnterpriseId'
85+ -> ManagedConfiguration -- ^ 'mcupPayload'
86+ -> Text -- ^ 'mcupUserId'
87+ -> Text -- ^ 'mcupManagedConfigurationForUserId'
88+ -> ManagedConfigurationsforUserPatch
89+managedConfigurationsforUserPatch pMcupEnterpriseId_ pMcupPayload_ pMcupUserId_ pMcupManagedConfigurationForUserId_ =
90+ ManagedConfigurationsforUserPatch'
91+ { _mcupEnterpriseId = pMcupEnterpriseId_
92+ , _mcupPayload = pMcupPayload_
93+ , _mcupUserId = pMcupUserId_
94+ , _mcupManagedConfigurationForUserId = pMcupManagedConfigurationForUserId_
95+ }
96+
97+-- | The ID of the enterprise.
98+mcupEnterpriseId :: Lens' ManagedConfigurationsforUserPatch Text
99+mcupEnterpriseId
100+ = lens _mcupEnterpriseId
101+ (\ s a -> s{_mcupEnterpriseId = a})
102+
103+-- | Multipart request metadata.
104+mcupPayload :: Lens' ManagedConfigurationsforUserPatch ManagedConfiguration
105+mcupPayload
106+ = lens _mcupPayload (\ s a -> s{_mcupPayload = a})
107+
108+-- | The ID of the user.
109+mcupUserId :: Lens' ManagedConfigurationsforUserPatch Text
110+mcupUserId
111+ = lens _mcupUserId (\ s a -> s{_mcupUserId = a})
112+
113+-- | The ID of the managed configuration (a product ID), e.g.
114+-- \"app:com.google.android.gm\".
115+mcupManagedConfigurationForUserId :: Lens' ManagedConfigurationsforUserPatch Text
116+mcupManagedConfigurationForUserId
117+ = lens _mcupManagedConfigurationForUserId
118+ (\ s a -> s{_mcupManagedConfigurationForUserId = a})
119+
120+instance GoogleRequest
121+ ManagedConfigurationsforUserPatch where
122+ type Rs ManagedConfigurationsforUserPatch =
123+ ManagedConfiguration
124+ type Scopes ManagedConfigurationsforUserPatch =
125+ '["https://www.googleapis.com/auth/androidenterprise"]
126+ requestClient ManagedConfigurationsforUserPatch'{..}
127+ = go _mcupEnterpriseId _mcupUserId
128+ _mcupManagedConfigurationForUserId
129+ (Just AltJSON)
130+ _mcupPayload
131+ androidEnterpriseService
132+ where go
133+ = buildClient
134+ (Proxy ::
135+ Proxy ManagedConfigurationsforUserPatchResource)
136+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ManagedConfigurationsforUser/Update.hsnew file+136
@@ -0,0 +1,136 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Update
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Adds or updates a per-user managed configuration for an app for the
24+-- specified user.
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.managedconfigurationsforuser.update@.
27+module Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Update
28+ (
29+ -- * REST Resource
30+ ManagedConfigurationsforUserUpdateResource
31+
32+ -- * Creating a Request
33+ , managedConfigurationsforUserUpdate
34+ , ManagedConfigurationsforUserUpdate
35+
36+ -- * Request Lenses
37+ , mcuuEnterpriseId
38+ , mcuuPayload
39+ , mcuuUserId
40+ , mcuuManagedConfigurationForUserId
41+ ) where
42+
43+import Network.Google.AndroidEnterprise.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidenterprise.managedconfigurationsforuser.update@ method which the
47+-- 'ManagedConfigurationsforUserUpdate' request conforms to.
48+type ManagedConfigurationsforUserUpdateResource =
49+ "androidenterprise" :>
50+ "v1" :>
51+ "enterprises" :>
52+ Capture "enterpriseId" Text :>
53+ "users" :>
54+ Capture "userId" Text :>
55+ "managedConfigurationsForUser" :>
56+ Capture "managedConfigurationForUserId" Text :>
57+ QueryParam "alt" AltJSON :>
58+ ReqBody '[JSON] ManagedConfiguration :>
59+ Put '[JSON] ManagedConfiguration
60+
61+-- | Adds or updates a per-user managed configuration for an app for the
62+-- specified user.
63+--
64+-- /See:/ 'managedConfigurationsforUserUpdate' smart constructor.
65+data ManagedConfigurationsforUserUpdate = ManagedConfigurationsforUserUpdate'
66+ { _mcuuEnterpriseId :: !Text
67+ , _mcuuPayload :: !ManagedConfiguration
68+ , _mcuuUserId :: !Text
69+ , _mcuuManagedConfigurationForUserId :: !Text
70+ } deriving (Eq,Show,Data,Typeable,Generic)
71+
72+-- | Creates a value of 'ManagedConfigurationsforUserUpdate' with the minimum fields required to make a request.
73+--
74+-- Use one of the following lenses to modify other fields as desired:
75+--
76+-- * 'mcuuEnterpriseId'
77+--
78+-- * 'mcuuPayload'
79+--
80+-- * 'mcuuUserId'
81+--
82+-- * 'mcuuManagedConfigurationForUserId'
83+managedConfigurationsforUserUpdate
84+ :: Text -- ^ 'mcuuEnterpriseId'
85+ -> ManagedConfiguration -- ^ 'mcuuPayload'
86+ -> Text -- ^ 'mcuuUserId'
87+ -> Text -- ^ 'mcuuManagedConfigurationForUserId'
88+ -> ManagedConfigurationsforUserUpdate
89+managedConfigurationsforUserUpdate pMcuuEnterpriseId_ pMcuuPayload_ pMcuuUserId_ pMcuuManagedConfigurationForUserId_ =
90+ ManagedConfigurationsforUserUpdate'
91+ { _mcuuEnterpriseId = pMcuuEnterpriseId_
92+ , _mcuuPayload = pMcuuPayload_
93+ , _mcuuUserId = pMcuuUserId_
94+ , _mcuuManagedConfigurationForUserId = pMcuuManagedConfigurationForUserId_
95+ }
96+
97+-- | The ID of the enterprise.
98+mcuuEnterpriseId :: Lens' ManagedConfigurationsforUserUpdate Text
99+mcuuEnterpriseId
100+ = lens _mcuuEnterpriseId
101+ (\ s a -> s{_mcuuEnterpriseId = a})
102+
103+-- | Multipart request metadata.
104+mcuuPayload :: Lens' ManagedConfigurationsforUserUpdate ManagedConfiguration
105+mcuuPayload
106+ = lens _mcuuPayload (\ s a -> s{_mcuuPayload = a})
107+
108+-- | The ID of the user.
109+mcuuUserId :: Lens' ManagedConfigurationsforUserUpdate Text
110+mcuuUserId
111+ = lens _mcuuUserId (\ s a -> s{_mcuuUserId = a})
112+
113+-- | The ID of the managed configuration (a product ID), e.g.
114+-- \"app:com.google.android.gm\".
115+mcuuManagedConfigurationForUserId :: Lens' ManagedConfigurationsforUserUpdate Text
116+mcuuManagedConfigurationForUserId
117+ = lens _mcuuManagedConfigurationForUserId
118+ (\ s a -> s{_mcuuManagedConfigurationForUserId = a})
119+
120+instance GoogleRequest
121+ ManagedConfigurationsforUserUpdate where
122+ type Rs ManagedConfigurationsforUserUpdate =
123+ ManagedConfiguration
124+ type Scopes ManagedConfigurationsforUserUpdate =
125+ '["https://www.googleapis.com/auth/androidenterprise"]
126+ requestClient ManagedConfigurationsforUserUpdate'{..}
127+ = go _mcuuEnterpriseId _mcuuUserId
128+ _mcuuManagedConfigurationForUserId
129+ (Just AltJSON)
130+ _mcuuPayload
131+ androidEnterpriseService
132+ where go
133+ = buildClient
134+ (Proxy ::
135+ Proxy ManagedConfigurationsforUserUpdateResource)
136+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/GetAppRestrictionsSchema.hs+12−6
@@ -20,9 +20,12 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Retrieves the schema defining app restrictions configurable for this
24−-- product. All products have a schema, but this may be empty if no app
25−-- restrictions are defined.
23+-- Retrieves the schema that defines the configurable properties for this
24+-- product. All products have a schema, but this schema may be empty if no
25+-- managed configurations have been defined. This schema can be used to
26+-- populate a UI that allows an administrator to configure the product. To
27+-- apply a managed configuration based on the schema obtained using this
28+-- API, see Managed Configurations through Play.
2629--
2730-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.products.getAppRestrictionsSchema@.
2831module Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
@@ -57,9 +60,12 @@ type ProductsGetAppRestrictionsSchemaResource =
5760 QueryParam "alt" AltJSON :>
5861 Get '[JSON] AppRestrictionsSchema
5962
60−-- | Retrieves the schema defining app restrictions configurable for this
61−-- product. All products have a schema, but this may be empty if no app
62−-- restrictions are defined.
63+-- | Retrieves the schema that defines the configurable properties for this
64+-- product. All products have a schema, but this schema may be empty if no
65+-- managed configurations have been defined. This schema can be used to
66+-- populate a UI that allows an administrator to configure the product. To
67+-- apply a managed configuration based on the schema obtained using this
68+-- API, see Managed Configurations through Play.
6369--
6470-- /See:/ 'productsGetAppRestrictionsSchema' smart constructor.
6571data ProductsGetAppRestrictionsSchema = ProductsGetAppRestrictionsSchema'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/List.hs+6−3
@@ -20,7 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Finds approved products that match a query.
23+-- Finds approved products that match a query, or all approved products if
24+-- there is no query.
2425--
2526-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.products.list@.
2627module Network.Google.Resource.AndroidEnterprise.Products.List
@@ -60,7 +61,8 @@ type ProductsListResource =
6061 QueryParam "alt" AltJSON :>
6162 Get '[JSON] ProductsListResponse
6263
63−-- | Finds approved products that match a query.
64+-- | Finds approved products that match a query, or all approved products if
65+-- there is no query.
6466--
6567-- /See:/ 'productsList' smart constructor.
6668data ProductsList = ProductsList'
@@ -115,7 +117,8 @@ plToken = lens _plToken (\ s a -> s{_plToken = a})
115117
116118-- | The search query as typed in the Google Play Store search box. If
117119-- omitted, all approved apps will be returned (using the pagination
118−-- parameters).
120+-- parameters), including apps that are not available in the store (e.g.
121+-- unpublished apps).
119122plQuery :: Lens' ProductsList (Maybe Text)
120123plQuery = lens _plQuery (\ s a -> s{_plQuery = a})
121124
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/UnApprove.hsnew file+103
@@ -0,0 +1,103 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Products.UnApprove
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Unapproves the specified product (and the relevant app permissions, if
24+-- any)
25+--
26+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.products.unapprove@.
27+module Network.Google.Resource.AndroidEnterprise.Products.UnApprove
28+ (
29+ -- * REST Resource
30+ ProductsUnApproveResource
31+
32+ -- * Creating a Request
33+ , productsUnApprove
34+ , ProductsUnApprove
35+
36+ -- * Request Lenses
37+ , puaEnterpriseId
38+ , puaProductId
39+ ) where
40+
41+import Network.Google.AndroidEnterprise.Types
42+import Network.Google.Prelude
43+
44+-- | A resource alias for @androidenterprise.products.unapprove@ method which the
45+-- 'ProductsUnApprove' request conforms to.
46+type ProductsUnApproveResource =
47+ "androidenterprise" :>
48+ "v1" :>
49+ "enterprises" :>
50+ Capture "enterpriseId" Text :>
51+ "products" :>
52+ Capture "productId" Text :>
53+ "unapprove" :>
54+ QueryParam "alt" AltJSON :> Post '[JSON] ()
55+
56+-- | Unapproves the specified product (and the relevant app permissions, if
57+-- any)
58+--
59+-- /See:/ 'productsUnApprove' smart constructor.
60+data ProductsUnApprove = ProductsUnApprove'
61+ { _puaEnterpriseId :: !Text
62+ , _puaProductId :: !Text
63+ } deriving (Eq,Show,Data,Typeable,Generic)
64+
65+-- | Creates a value of 'ProductsUnApprove' with the minimum fields required to make a request.
66+--
67+-- Use one of the following lenses to modify other fields as desired:
68+--
69+-- * 'puaEnterpriseId'
70+--
71+-- * 'puaProductId'
72+productsUnApprove
73+ :: Text -- ^ 'puaEnterpriseId'
74+ -> Text -- ^ 'puaProductId'
75+ -> ProductsUnApprove
76+productsUnApprove pPuaEnterpriseId_ pPuaProductId_ =
77+ ProductsUnApprove'
78+ { _puaEnterpriseId = pPuaEnterpriseId_
79+ , _puaProductId = pPuaProductId_
80+ }
81+
82+-- | The ID of the enterprise.
83+puaEnterpriseId :: Lens' ProductsUnApprove Text
84+puaEnterpriseId
85+ = lens _puaEnterpriseId
86+ (\ s a -> s{_puaEnterpriseId = a})
87+
88+-- | The ID of the product.
89+puaProductId :: Lens' ProductsUnApprove Text
90+puaProductId
91+ = lens _puaProductId (\ s a -> s{_puaProductId = a})
92+
93+instance GoogleRequest ProductsUnApprove where
94+ type Rs ProductsUnApprove = ()
95+ type Scopes ProductsUnApprove =
96+ '["https://www.googleapis.com/auth/androidenterprise"]
97+ requestClient ProductsUnApprove'{..}
98+ = go _puaEnterpriseId _puaProductId (Just AltJSON)
99+ androidEnterpriseService
100+ where go
101+ = buildClient
102+ (Proxy :: Proxy ProductsUnApproveResource)
103+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/Delete.hsnew file+107
@@ -0,0 +1,107 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Removes and invalidates the specified credentials for the service
24+-- account associated with this enterprise. The calling service account
25+-- must have been retrieved by calling Enterprises.GetServiceAccount and
26+-- must have been set as the enterprise service account by calling
27+-- Enterprises.SetAccount.
28+--
29+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.serviceaccountkeys.delete@.
30+module Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Delete
31+ (
32+ -- * REST Resource
33+ ServiceAccountkeysDeleteResource
34+
35+ -- * Creating a Request
36+ , serviceAccountkeysDelete
37+ , ServiceAccountkeysDelete
38+
39+ -- * Request Lenses
40+ , sadKeyId
41+ , sadEnterpriseId
42+ ) where
43+
44+import Network.Google.AndroidEnterprise.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidenterprise.serviceaccountkeys.delete@ method which the
48+-- 'ServiceAccountkeysDelete' request conforms to.
49+type ServiceAccountkeysDeleteResource =
50+ "androidenterprise" :>
51+ "v1" :>
52+ "enterprises" :>
53+ Capture "enterpriseId" Text :>
54+ "serviceAccountKeys" :>
55+ Capture "keyId" Text :>
56+ QueryParam "alt" AltJSON :> Delete '[JSON] ()
57+
58+-- | Removes and invalidates the specified credentials for the service
59+-- account associated with this enterprise. The calling service account
60+-- must have been retrieved by calling Enterprises.GetServiceAccount and
61+-- must have been set as the enterprise service account by calling
62+-- Enterprises.SetAccount.
63+--
64+-- /See:/ 'serviceAccountkeysDelete' smart constructor.
65+data ServiceAccountkeysDelete = ServiceAccountkeysDelete'
66+ { _sadKeyId :: !Text
67+ , _sadEnterpriseId :: !Text
68+ } deriving (Eq,Show,Data,Typeable,Generic)
69+
70+-- | Creates a value of 'ServiceAccountkeysDelete' with the minimum fields required to make a request.
71+--
72+-- Use one of the following lenses to modify other fields as desired:
73+--
74+-- * 'sadKeyId'
75+--
76+-- * 'sadEnterpriseId'
77+serviceAccountkeysDelete
78+ :: Text -- ^ 'sadKeyId'
79+ -> Text -- ^ 'sadEnterpriseId'
80+ -> ServiceAccountkeysDelete
81+serviceAccountkeysDelete pSadKeyId_ pSadEnterpriseId_ =
82+ ServiceAccountkeysDelete'
83+ { _sadKeyId = pSadKeyId_
84+ , _sadEnterpriseId = pSadEnterpriseId_
85+ }
86+
87+-- | The ID of the key.
88+sadKeyId :: Lens' ServiceAccountkeysDelete Text
89+sadKeyId = lens _sadKeyId (\ s a -> s{_sadKeyId = a})
90+
91+-- | The ID of the enterprise.
92+sadEnterpriseId :: Lens' ServiceAccountkeysDelete Text
93+sadEnterpriseId
94+ = lens _sadEnterpriseId
95+ (\ s a -> s{_sadEnterpriseId = a})
96+
97+instance GoogleRequest ServiceAccountkeysDelete where
98+ type Rs ServiceAccountkeysDelete = ()
99+ type Scopes ServiceAccountkeysDelete =
100+ '["https://www.googleapis.com/auth/androidenterprise"]
101+ requestClient ServiceAccountkeysDelete'{..}
102+ = go _sadEnterpriseId _sadKeyId (Just AltJSON)
103+ androidEnterpriseService
104+ where go
105+ = buildClient
106+ (Proxy :: Proxy ServiceAccountkeysDeleteResource)
107+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/Insert.hsnew file+109
@@ -0,0 +1,109 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Insert
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Generates new credentials for the service account associated with this
24+-- enterprise. The calling service account must have been retrieved by
25+-- calling Enterprises.GetServiceAccount and must have been set as the
26+-- enterprise service account by calling Enterprises.SetAccount. Only the
27+-- type of the key should be populated in the resource to be inserted.
28+--
29+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.serviceaccountkeys.insert@.
30+module Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Insert
31+ (
32+ -- * REST Resource
33+ ServiceAccountkeysInsertResource
34+
35+ -- * Creating a Request
36+ , serviceAccountkeysInsert
37+ , ServiceAccountkeysInsert
38+
39+ -- * Request Lenses
40+ , saiEnterpriseId
41+ , saiPayload
42+ ) where
43+
44+import Network.Google.AndroidEnterprise.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidenterprise.serviceaccountkeys.insert@ method which the
48+-- 'ServiceAccountkeysInsert' request conforms to.
49+type ServiceAccountkeysInsertResource =
50+ "androidenterprise" :>
51+ "v1" :>
52+ "enterprises" :>
53+ Capture "enterpriseId" Text :>
54+ "serviceAccountKeys" :>
55+ QueryParam "alt" AltJSON :>
56+ ReqBody '[JSON] ServiceAccountKey :>
57+ Post '[JSON] ServiceAccountKey
58+
59+-- | Generates new credentials for the service account associated with this
60+-- enterprise. The calling service account must have been retrieved by
61+-- calling Enterprises.GetServiceAccount and must have been set as the
62+-- enterprise service account by calling Enterprises.SetAccount. Only the
63+-- type of the key should be populated in the resource to be inserted.
64+--
65+-- /See:/ 'serviceAccountkeysInsert' smart constructor.
66+data ServiceAccountkeysInsert = ServiceAccountkeysInsert'
67+ { _saiEnterpriseId :: !Text
68+ , _saiPayload :: !ServiceAccountKey
69+ } deriving (Eq,Show,Data,Typeable,Generic)
70+
71+-- | Creates a value of 'ServiceAccountkeysInsert' with the minimum fields required to make a request.
72+--
73+-- Use one of the following lenses to modify other fields as desired:
74+--
75+-- * 'saiEnterpriseId'
76+--
77+-- * 'saiPayload'
78+serviceAccountkeysInsert
79+ :: Text -- ^ 'saiEnterpriseId'
80+ -> ServiceAccountKey -- ^ 'saiPayload'
81+ -> ServiceAccountkeysInsert
82+serviceAccountkeysInsert pSaiEnterpriseId_ pSaiPayload_ =
83+ ServiceAccountkeysInsert'
84+ { _saiEnterpriseId = pSaiEnterpriseId_
85+ , _saiPayload = pSaiPayload_
86+ }
87+
88+-- | The ID of the enterprise.
89+saiEnterpriseId :: Lens' ServiceAccountkeysInsert Text
90+saiEnterpriseId
91+ = lens _saiEnterpriseId
92+ (\ s a -> s{_saiEnterpriseId = a})
93+
94+-- | Multipart request metadata.
95+saiPayload :: Lens' ServiceAccountkeysInsert ServiceAccountKey
96+saiPayload
97+ = lens _saiPayload (\ s a -> s{_saiPayload = a})
98+
99+instance GoogleRequest ServiceAccountkeysInsert where
100+ type Rs ServiceAccountkeysInsert = ServiceAccountKey
101+ type Scopes ServiceAccountkeysInsert =
102+ '["https://www.googleapis.com/auth/androidenterprise"]
103+ requestClient ServiceAccountkeysInsert'{..}
104+ = go _saiEnterpriseId (Just AltJSON) _saiPayload
105+ androidEnterpriseService
106+ where go
107+ = buildClient
108+ (Proxy :: Proxy ServiceAccountkeysInsertResource)
109+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/ServiceAccountkeys/List.hsnew file+98
@@ -0,0 +1,98 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.List
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Lists all active credentials for the service account associated with
24+-- this enterprise. Only the ID and key type are returned. The calling
25+-- service account must have been retrieved by calling
26+-- Enterprises.GetServiceAccount and must have been set as the enterprise
27+-- service account by calling Enterprises.SetAccount.
28+--
29+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.serviceaccountkeys.list@.
30+module Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.List
31+ (
32+ -- * REST Resource
33+ ServiceAccountkeysListResource
34+
35+ -- * Creating a Request
36+ , serviceAccountkeysList
37+ , ServiceAccountkeysList
38+
39+ -- * Request Lenses
40+ , salEnterpriseId
41+ ) where
42+
43+import Network.Google.AndroidEnterprise.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidenterprise.serviceaccountkeys.list@ method which the
47+-- 'ServiceAccountkeysList' request conforms to.
48+type ServiceAccountkeysListResource =
49+ "androidenterprise" :>
50+ "v1" :>
51+ "enterprises" :>
52+ Capture "enterpriseId" Text :>
53+ "serviceAccountKeys" :>
54+ QueryParam "alt" AltJSON :>
55+ Get '[JSON] ServiceAccountKeysListResponse
56+
57+-- | Lists all active credentials for the service account associated with
58+-- this enterprise. Only the ID and key type are returned. The calling
59+-- service account must have been retrieved by calling
60+-- Enterprises.GetServiceAccount and must have been set as the enterprise
61+-- service account by calling Enterprises.SetAccount.
62+--
63+-- /See:/ 'serviceAccountkeysList' smart constructor.
64+newtype ServiceAccountkeysList = ServiceAccountkeysList'
65+ { _salEnterpriseId :: Text
66+ } deriving (Eq,Show,Data,Typeable,Generic)
67+
68+-- | Creates a value of 'ServiceAccountkeysList' with the minimum fields required to make a request.
69+--
70+-- Use one of the following lenses to modify other fields as desired:
71+--
72+-- * 'salEnterpriseId'
73+serviceAccountkeysList
74+ :: Text -- ^ 'salEnterpriseId'
75+ -> ServiceAccountkeysList
76+serviceAccountkeysList pSalEnterpriseId_ =
77+ ServiceAccountkeysList'
78+ { _salEnterpriseId = pSalEnterpriseId_
79+ }
80+
81+-- | The ID of the enterprise.
82+salEnterpriseId :: Lens' ServiceAccountkeysList Text
83+salEnterpriseId
84+ = lens _salEnterpriseId
85+ (\ s a -> s{_salEnterpriseId = a})
86+
87+instance GoogleRequest ServiceAccountkeysList where
88+ type Rs ServiceAccountkeysList =
89+ ServiceAccountKeysListResponse
90+ type Scopes ServiceAccountkeysList =
91+ '["https://www.googleapis.com/auth/androidenterprise"]
92+ requestClient ServiceAccountkeysList'{..}
93+ = go _salEnterpriseId (Just AltJSON)
94+ androidEnterpriseService
95+ where go
96+ = buildClient
97+ (Proxy :: Proxy ServiceAccountkeysListResource)
98+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Delete.hsnew file+98
@@ -0,0 +1,98 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Users.Delete
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Deleted an EMM-managed user.
24+--
25+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.users.delete@.
26+module Network.Google.Resource.AndroidEnterprise.Users.Delete
27+ (
28+ -- * REST Resource
29+ UsersDeleteResource
30+
31+ -- * Creating a Request
32+ , usersDelete
33+ , UsersDelete
34+
35+ -- * Request Lenses
36+ , udEnterpriseId
37+ , udUserId
38+ ) where
39+
40+import Network.Google.AndroidEnterprise.Types
41+import Network.Google.Prelude
42+
43+-- | A resource alias for @androidenterprise.users.delete@ method which the
44+-- 'UsersDelete' request conforms to.
45+type UsersDeleteResource =
46+ "androidenterprise" :>
47+ "v1" :>
48+ "enterprises" :>
49+ Capture "enterpriseId" Text :>
50+ "users" :>
51+ Capture "userId" Text :>
52+ QueryParam "alt" AltJSON :> Delete '[JSON] ()
53+
54+-- | Deleted an EMM-managed user.
55+--
56+-- /See:/ 'usersDelete' smart constructor.
57+data UsersDelete = UsersDelete'
58+ { _udEnterpriseId :: !Text
59+ , _udUserId :: !Text
60+ } deriving (Eq,Show,Data,Typeable,Generic)
61+
62+-- | Creates a value of 'UsersDelete' with the minimum fields required to make a request.
63+--
64+-- Use one of the following lenses to modify other fields as desired:
65+--
66+-- * 'udEnterpriseId'
67+--
68+-- * 'udUserId'
69+usersDelete
70+ :: Text -- ^ 'udEnterpriseId'
71+ -> Text -- ^ 'udUserId'
72+ -> UsersDelete
73+usersDelete pUdEnterpriseId_ pUdUserId_ =
74+ UsersDelete'
75+ { _udEnterpriseId = pUdEnterpriseId_
76+ , _udUserId = pUdUserId_
77+ }
78+
79+-- | The ID of the enterprise.
80+udEnterpriseId :: Lens' UsersDelete Text
81+udEnterpriseId
82+ = lens _udEnterpriseId
83+ (\ s a -> s{_udEnterpriseId = a})
84+
85+-- | The ID of the user.
86+udUserId :: Lens' UsersDelete Text
87+udUserId = lens _udUserId (\ s a -> s{_udUserId = a})
88+
89+instance GoogleRequest UsersDelete where
90+ type Rs UsersDelete = ()
91+ type Scopes UsersDelete =
92+ '["https://www.googleapis.com/auth/androidenterprise"]
93+ requestClient UsersDelete'{..}
94+ = go _udEnterpriseId _udUserId (Just AltJSON)
95+ androidEnterpriseService
96+ where go
97+ = buildClient (Proxy :: Proxy UsersDeleteResource)
98+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/GenerateAuthenticationToken.hsnew file+111
@@ -0,0 +1,111 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Users.GenerateAuthenticationToken
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Generates an authentication token which the device policy client can use
24+-- to provision the given EMM-managed user account on a device. The
25+-- generated token is single-use and expires after a few minutes. This call
26+-- only works with EMM-managed accounts.
27+--
28+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.users.generateAuthenticationToken@.
29+module Network.Google.Resource.AndroidEnterprise.Users.GenerateAuthenticationToken
30+ (
31+ -- * REST Resource
32+ UsersGenerateAuthenticationTokenResource
33+
34+ -- * Creating a Request
35+ , usersGenerateAuthenticationToken
36+ , UsersGenerateAuthenticationToken
37+
38+ -- * Request Lenses
39+ , ugatEnterpriseId
40+ , ugatUserId
41+ ) where
42+
43+import Network.Google.AndroidEnterprise.Types
44+import Network.Google.Prelude
45+
46+-- | A resource alias for @androidenterprise.users.generateAuthenticationToken@ method which the
47+-- 'UsersGenerateAuthenticationToken' request conforms to.
48+type UsersGenerateAuthenticationTokenResource =
49+ "androidenterprise" :>
50+ "v1" :>
51+ "enterprises" :>
52+ Capture "enterpriseId" Text :>
53+ "users" :>
54+ Capture "userId" Text :>
55+ "authenticationToken" :>
56+ QueryParam "alt" AltJSON :>
57+ Post '[JSON] AuthenticationToken
58+
59+-- | Generates an authentication token which the device policy client can use
60+-- to provision the given EMM-managed user account on a device. The
61+-- generated token is single-use and expires after a few minutes. This call
62+-- only works with EMM-managed accounts.
63+--
64+-- /See:/ 'usersGenerateAuthenticationToken' smart constructor.
65+data UsersGenerateAuthenticationToken = UsersGenerateAuthenticationToken'
66+ { _ugatEnterpriseId :: !Text
67+ , _ugatUserId :: !Text
68+ } deriving (Eq,Show,Data,Typeable,Generic)
69+
70+-- | Creates a value of 'UsersGenerateAuthenticationToken' with the minimum fields required to make a request.
71+--
72+-- Use one of the following lenses to modify other fields as desired:
73+--
74+-- * 'ugatEnterpriseId'
75+--
76+-- * 'ugatUserId'
77+usersGenerateAuthenticationToken
78+ :: Text -- ^ 'ugatEnterpriseId'
79+ -> Text -- ^ 'ugatUserId'
80+ -> UsersGenerateAuthenticationToken
81+usersGenerateAuthenticationToken pUgatEnterpriseId_ pUgatUserId_ =
82+ UsersGenerateAuthenticationToken'
83+ { _ugatEnterpriseId = pUgatEnterpriseId_
84+ , _ugatUserId = pUgatUserId_
85+ }
86+
87+-- | The ID of the enterprise.
88+ugatEnterpriseId :: Lens' UsersGenerateAuthenticationToken Text
89+ugatEnterpriseId
90+ = lens _ugatEnterpriseId
91+ (\ s a -> s{_ugatEnterpriseId = a})
92+
93+-- | The ID of the user.
94+ugatUserId :: Lens' UsersGenerateAuthenticationToken Text
95+ugatUserId
96+ = lens _ugatUserId (\ s a -> s{_ugatUserId = a})
97+
98+instance GoogleRequest
99+ UsersGenerateAuthenticationToken where
100+ type Rs UsersGenerateAuthenticationToken =
101+ AuthenticationToken
102+ type Scopes UsersGenerateAuthenticationToken =
103+ '["https://www.googleapis.com/auth/androidenterprise"]
104+ requestClient UsersGenerateAuthenticationToken'{..}
105+ = go _ugatEnterpriseId _ugatUserId (Just AltJSON)
106+ androidEnterpriseService
107+ where go
108+ = buildClient
109+ (Proxy ::
110+ Proxy UsersGenerateAuthenticationTokenResource)
111+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Insert.hsnew file+107
@@ -0,0 +1,107 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Users.Insert
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Creates a new EMM-managed user. The Users resource passed in the body of
24+-- the request should include an accountIdentifier and an accountType. If a
25+-- corresponding user already exists with the same account identifier, the
26+-- user will be updated with the resource. In this case only the
27+-- displayName field can be changed.
28+--
29+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.users.insert@.
30+module Network.Google.Resource.AndroidEnterprise.Users.Insert
31+ (
32+ -- * REST Resource
33+ UsersInsertResource
34+
35+ -- * Creating a Request
36+ , usersInsert
37+ , UsersInsert
38+
39+ -- * Request Lenses
40+ , uiEnterpriseId
41+ , uiPayload
42+ ) where
43+
44+import Network.Google.AndroidEnterprise.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidenterprise.users.insert@ method which the
48+-- 'UsersInsert' request conforms to.
49+type UsersInsertResource =
50+ "androidenterprise" :>
51+ "v1" :>
52+ "enterprises" :>
53+ Capture "enterpriseId" Text :>
54+ "users" :>
55+ QueryParam "alt" AltJSON :>
56+ ReqBody '[JSON] User :> Post '[JSON] User
57+
58+-- | Creates a new EMM-managed user. The Users resource passed in the body of
59+-- the request should include an accountIdentifier and an accountType. If a
60+-- corresponding user already exists with the same account identifier, the
61+-- user will be updated with the resource. In this case only the
62+-- displayName field can be changed.
63+--
64+-- /See:/ 'usersInsert' smart constructor.
65+data UsersInsert = UsersInsert'
66+ { _uiEnterpriseId :: !Text
67+ , _uiPayload :: !User
68+ } deriving (Eq,Show,Data,Typeable,Generic)
69+
70+-- | Creates a value of 'UsersInsert' with the minimum fields required to make a request.
71+--
72+-- Use one of the following lenses to modify other fields as desired:
73+--
74+-- * 'uiEnterpriseId'
75+--
76+-- * 'uiPayload'
77+usersInsert
78+ :: Text -- ^ 'uiEnterpriseId'
79+ -> User -- ^ 'uiPayload'
80+ -> UsersInsert
81+usersInsert pUiEnterpriseId_ pUiPayload_ =
82+ UsersInsert'
83+ { _uiEnterpriseId = pUiEnterpriseId_
84+ , _uiPayload = pUiPayload_
85+ }
86+
87+-- | The ID of the enterprise.
88+uiEnterpriseId :: Lens' UsersInsert Text
89+uiEnterpriseId
90+ = lens _uiEnterpriseId
91+ (\ s a -> s{_uiEnterpriseId = a})
92+
93+-- | Multipart request metadata.
94+uiPayload :: Lens' UsersInsert User
95+uiPayload
96+ = lens _uiPayload (\ s a -> s{_uiPayload = a})
97+
98+instance GoogleRequest UsersInsert where
99+ type Rs UsersInsert = User
100+ type Scopes UsersInsert =
101+ '["https://www.googleapis.com/auth/androidenterprise"]
102+ requestClient UsersInsert'{..}
103+ = go _uiEnterpriseId (Just AltJSON) _uiPayload
104+ androidEnterpriseService
105+ where go
106+ = buildClient (Proxy :: Proxy UsersInsertResource)
107+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/List.hs+8−2
@@ -20,7 +20,10 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Looks up a user by their primary email address.
23+-- Looks up a user by primary email address. This is only supported for
24+-- Google-managed users. Lookup of the id is not needed for EMM-managed
25+-- users because the id is already returned in the result of the
26+-- Users.insert call.
2427--
2528-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.users.list@.
2629module Network.Google.Resource.AndroidEnterprise.Users.List
@@ -52,7 +55,10 @@ type UsersListResource =
5255 QueryParam "alt" AltJSON :>
5356 Get '[JSON] UsersListResponse
5457
55−-- | Looks up a user by their primary email address.
58+-- | Looks up a user by primary email address. This is only supported for
59+-- Google-managed users. Lookup of the id is not needed for EMM-managed
60+-- users because the id is already returned in the result of the
61+-- Users.insert call.
5662--
5763-- /See:/ 'usersList' smart constructor.
5864data UsersList = UsersList'
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Patch.hsnew file+119
@@ -0,0 +1,119 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Users.Patch
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Updates the details of an EMM-managed user. Can be used with EMM-managed
24+-- users only (not Google managed users). Pass the new details in the Users
25+-- resource in the request body. Only the displayName field can be changed.
26+-- Other fields must either be unset or have the currently active value.
27+-- This method supports patch semantics.
28+--
29+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.users.patch@.
30+module Network.Google.Resource.AndroidEnterprise.Users.Patch
31+ (
32+ -- * REST Resource
33+ UsersPatchResource
34+
35+ -- * Creating a Request
36+ , usersPatch
37+ , UsersPatch
38+
39+ -- * Request Lenses
40+ , upEnterpriseId
41+ , upPayload
42+ , upUserId
43+ ) where
44+
45+import Network.Google.AndroidEnterprise.Types
46+import Network.Google.Prelude
47+
48+-- | A resource alias for @androidenterprise.users.patch@ method which the
49+-- 'UsersPatch' request conforms to.
50+type UsersPatchResource =
51+ "androidenterprise" :>
52+ "v1" :>
53+ "enterprises" :>
54+ Capture "enterpriseId" Text :>
55+ "users" :>
56+ Capture "userId" Text :>
57+ QueryParam "alt" AltJSON :>
58+ ReqBody '[JSON] User :> Patch '[JSON] User
59+
60+-- | Updates the details of an EMM-managed user. Can be used with EMM-managed
61+-- users only (not Google managed users). Pass the new details in the Users
62+-- resource in the request body. Only the displayName field can be changed.
63+-- Other fields must either be unset or have the currently active value.
64+-- This method supports patch semantics.
65+--
66+-- /See:/ 'usersPatch' smart constructor.
67+data UsersPatch = UsersPatch'
68+ { _upEnterpriseId :: !Text
69+ , _upPayload :: !User
70+ , _upUserId :: !Text
71+ } deriving (Eq,Show,Data,Typeable,Generic)
72+
73+-- | Creates a value of 'UsersPatch' with the minimum fields required to make a request.
74+--
75+-- Use one of the following lenses to modify other fields as desired:
76+--
77+-- * 'upEnterpriseId'
78+--
79+-- * 'upPayload'
80+--
81+-- * 'upUserId'
82+usersPatch
83+ :: Text -- ^ 'upEnterpriseId'
84+ -> User -- ^ 'upPayload'
85+ -> Text -- ^ 'upUserId'
86+ -> UsersPatch
87+usersPatch pUpEnterpriseId_ pUpPayload_ pUpUserId_ =
88+ UsersPatch'
89+ { _upEnterpriseId = pUpEnterpriseId_
90+ , _upPayload = pUpPayload_
91+ , _upUserId = pUpUserId_
92+ }
93+
94+-- | The ID of the enterprise.
95+upEnterpriseId :: Lens' UsersPatch Text
96+upEnterpriseId
97+ = lens _upEnterpriseId
98+ (\ s a -> s{_upEnterpriseId = a})
99+
100+-- | Multipart request metadata.
101+upPayload :: Lens' UsersPatch User
102+upPayload
103+ = lens _upPayload (\ s a -> s{_upPayload = a})
104+
105+-- | The ID of the user.
106+upUserId :: Lens' UsersPatch Text
107+upUserId = lens _upUserId (\ s a -> s{_upUserId = a})
108+
109+instance GoogleRequest UsersPatch where
110+ type Rs UsersPatch = User
111+ type Scopes UsersPatch =
112+ '["https://www.googleapis.com/auth/androidenterprise"]
113+ requestClient UsersPatch'{..}
114+ = go _upEnterpriseId _upUserId (Just AltJSON)
115+ _upPayload
116+ androidEnterpriseService
117+ where go
118+ = buildClient (Proxy :: Proxy UsersPatchResource)
119+ mempty
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Users/Update.hsnew file+117
@@ -0,0 +1,117 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.AndroidEnterprise.Users.Update
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Updates the details of an EMM-managed user. Can be used with EMM-managed
24+-- users only (not Google managed users). Pass the new details in the Users
25+-- resource in the request body. Only the displayName field can be changed.
26+-- Other fields must either be unset or have the currently active value.
27+--
28+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.users.update@.
29+module Network.Google.Resource.AndroidEnterprise.Users.Update
30+ (
31+ -- * REST Resource
32+ UsersUpdateResource
33+
34+ -- * Creating a Request
35+ , usersUpdate
36+ , UsersUpdate
37+
38+ -- * Request Lenses
39+ , uuEnterpriseId
40+ , uuPayload
41+ , uuUserId
42+ ) where
43+
44+import Network.Google.AndroidEnterprise.Types
45+import Network.Google.Prelude
46+
47+-- | A resource alias for @androidenterprise.users.update@ method which the
48+-- 'UsersUpdate' request conforms to.
49+type UsersUpdateResource =
50+ "androidenterprise" :>
51+ "v1" :>
52+ "enterprises" :>
53+ Capture "enterpriseId" Text :>
54+ "users" :>
55+ Capture "userId" Text :>
56+ QueryParam "alt" AltJSON :>
57+ ReqBody '[JSON] User :> Put '[JSON] User
58+
59+-- | Updates the details of an EMM-managed user. Can be used with EMM-managed
60+-- users only (not Google managed users). Pass the new details in the Users
61+-- resource in the request body. Only the displayName field can be changed.
62+-- Other fields must either be unset or have the currently active value.
63+--
64+-- /See:/ 'usersUpdate' smart constructor.
65+data UsersUpdate = UsersUpdate'
66+ { _uuEnterpriseId :: !Text
67+ , _uuPayload :: !User
68+ , _uuUserId :: !Text
69+ } deriving (Eq,Show,Data,Typeable,Generic)
70+
71+-- | Creates a value of 'UsersUpdate' with the minimum fields required to make a request.
72+--
73+-- Use one of the following lenses to modify other fields as desired:
74+--
75+-- * 'uuEnterpriseId'
76+--
77+-- * 'uuPayload'
78+--
79+-- * 'uuUserId'
80+usersUpdate
81+ :: Text -- ^ 'uuEnterpriseId'
82+ -> User -- ^ 'uuPayload'
83+ -> Text -- ^ 'uuUserId'
84+ -> UsersUpdate
85+usersUpdate pUuEnterpriseId_ pUuPayload_ pUuUserId_ =
86+ UsersUpdate'
87+ { _uuEnterpriseId = pUuEnterpriseId_
88+ , _uuPayload = pUuPayload_
89+ , _uuUserId = pUuUserId_
90+ }
91+
92+-- | The ID of the enterprise.
93+uuEnterpriseId :: Lens' UsersUpdate Text
94+uuEnterpriseId
95+ = lens _uuEnterpriseId
96+ (\ s a -> s{_uuEnterpriseId = a})
97+
98+-- | Multipart request metadata.
99+uuPayload :: Lens' UsersUpdate User
100+uuPayload
101+ = lens _uuPayload (\ s a -> s{_uuPayload = a})
102+
103+-- | The ID of the user.
104+uuUserId :: Lens' UsersUpdate Text
105+uuUserId = lens _uuUserId (\ s a -> s{_uuUserId = a})
106+
107+instance GoogleRequest UsersUpdate where
108+ type Rs UsersUpdate = User
109+ type Scopes UsersUpdate =
110+ '["https://www.googleapis.com/auth/androidenterprise"]
111+ requestClient UsersUpdate'{..}
112+ = go _uuEnterpriseId _uuUserId (Just AltJSON)
113+ _uuPayload
114+ androidEnterpriseService
115+ where go
116+ = buildClient (Proxy :: Proxy UsersUpdateResource)
117+ mempty
gogol-android-enterprise/gogol-android-enterprise.cabal+25
@@ -50,12 +50,18 @@ library
5050 , Network.Google.Resource.AndroidEnterprise.Devices.GetState
5151 , Network.Google.Resource.AndroidEnterprise.Devices.List
5252 , Network.Google.Resource.AndroidEnterprise.Devices.SetState
53+ , Network.Google.Resource.AndroidEnterprise.Enterprises.AcknowledgeNotificationSet
54+ , Network.Google.Resource.AndroidEnterprise.Enterprises.CompleteSignup
55+ , Network.Google.Resource.AndroidEnterprise.Enterprises.CreateWebToken
5356 , Network.Google.Resource.AndroidEnterprise.Enterprises.Delete
5457 , Network.Google.Resource.AndroidEnterprise.Enterprises.Enroll
58+ , Network.Google.Resource.AndroidEnterprise.Enterprises.GenerateSignupURL
5559 , Network.Google.Resource.AndroidEnterprise.Enterprises.Get
60+ , Network.Google.Resource.AndroidEnterprise.Enterprises.GetServiceAccount
5661 , Network.Google.Resource.AndroidEnterprise.Enterprises.GetStoreLayout
5762 , Network.Google.Resource.AndroidEnterprise.Enterprises.Insert
5863 , Network.Google.Resource.AndroidEnterprise.Enterprises.List
64+ , Network.Google.Resource.AndroidEnterprise.Enterprises.PullNotificationSet
5965 , Network.Google.Resource.AndroidEnterprise.Enterprises.SendTestPushNotification
6066 , Network.Google.Resource.AndroidEnterprise.Enterprises.SetAccount
6167 , Network.Google.Resource.AndroidEnterprise.Enterprises.SetStoreLayout
@@ -73,6 +79,16 @@ library
7379 , Network.Google.Resource.AndroidEnterprise.Installs.List
7480 , Network.Google.Resource.AndroidEnterprise.Installs.Patch
7581 , Network.Google.Resource.AndroidEnterprise.Installs.Update
82+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Delete
83+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Get
84+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.List
85+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Patch
86+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforDevice.Update
87+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Delete
88+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Get
89+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.List
90+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Patch
91+ , Network.Google.Resource.AndroidEnterprise.ManagedConfigurationsforUser.Update
7692 , Network.Google.Resource.AndroidEnterprise.Permissions.Get
7793 , Network.Google.Resource.AndroidEnterprise.Products.Approve
7894 , Network.Google.Resource.AndroidEnterprise.Products.GenerateApprovalURL
@@ -80,7 +96,11 @@ library
8096 , Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
8197 , Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
8298 , Network.Google.Resource.AndroidEnterprise.Products.List
99+ , Network.Google.Resource.AndroidEnterprise.Products.UnApprove
83100 , Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
101+ , Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Delete
102+ , Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.Insert
103+ , Network.Google.Resource.AndroidEnterprise.ServiceAccountkeys.List
84104 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
85105 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get
86106 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Insert
@@ -93,12 +113,17 @@ library
93113 , Network.Google.Resource.AndroidEnterprise.Storelayoutpages.List
94114 , Network.Google.Resource.AndroidEnterprise.Storelayoutpages.Patch
95115 , Network.Google.Resource.AndroidEnterprise.Storelayoutpages.Update
116+ , Network.Google.Resource.AndroidEnterprise.Users.Delete
117+ , Network.Google.Resource.AndroidEnterprise.Users.GenerateAuthenticationToken
96118 , Network.Google.Resource.AndroidEnterprise.Users.GenerateToken
97119 , Network.Google.Resource.AndroidEnterprise.Users.Get
98120 , Network.Google.Resource.AndroidEnterprise.Users.GetAvailableProductSet
121+ , Network.Google.Resource.AndroidEnterprise.Users.Insert
99122 , Network.Google.Resource.AndroidEnterprise.Users.List
123+ , Network.Google.Resource.AndroidEnterprise.Users.Patch
100124 , Network.Google.Resource.AndroidEnterprise.Users.RevokeToken
101125 , Network.Google.Resource.AndroidEnterprise.Users.SetAvailableProductSet
126+ , Network.Google.Resource.AndroidEnterprise.Users.Update
102127
103128 other-modules:
104129 Network.Google.AndroidEnterprise.Types.Product