on develop help sign in
Regenerating gogol-android-enterprise from latest service definition
commit7f426314a94338e882eaf17417dd0ffb4da6d565 authorBrendan Hay <brendan.g.hay@gmail.com> dateTue 10 May 2016, 16:12 (10 years ago) parent1742f99
9 files changed+419−17
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise.hs+28−2 gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types.hs+22 gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs+201−9 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Delete.hs+2−1 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Get.hs+2−1 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Patch.hs+2−1 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Update.hs+2−1 gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/List.hs+158 gogol-android-enterprise/gogol-android-enterprise.cabal+2−2
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise.hs+28−2
@@ -13,8 +13,7 @@
1313-- Stability : auto-generated
1414-- Portability : non-portable (GHC extensions)
1515--
16−-- Allows MDMs\/EMMs and enterprises to manage the deployment of apps to
17−-- Android for Work users.
16+-- Manages the deployment of apps to Android for Work users.
1817--
1918-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference>
2019module Network.Google.AndroidEnterprise
@@ -162,6 +161,9 @@ module Network.Google.AndroidEnterprise
162161 -- ** androidenterprise.products.getPermissions
163162 , module Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
164163
164+ -- ** androidenterprise.products.list
165+ , module Network.Google.Resource.AndroidEnterprise.Products.List
166+
165167 -- ** androidenterprise.products.updatePermissions
166168 , module Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
167169
@@ -270,6 +272,12 @@ module Network.Google.AndroidEnterprise
270272 , glulrKind
271273 , glulrUser
272274
275+ -- ** TokenPagination
276+ , TokenPagination
277+ , tokenPagination
278+ , tpNextPageToken
279+ , tpPreviousPageToken
280+
273281 -- ** ApprovalURLInfo
274282 , ApprovalURLInfo
275283 , approvalURLInfo
@@ -291,6 +299,13 @@ module Network.Google.AndroidEnterprise
291299 , scId
292300 , scProductId
293301
302+ -- ** PageInfo
303+ , PageInfo
304+ , pageInfo
305+ , piResultPerPage
306+ , piTotalResults
307+ , piStartIndex
308+
294309 -- ** ProductPermission
295310 , ProductPermission
296311 , productPermission
@@ -436,6 +451,7 @@ module Network.Google.AndroidEnterprise
436451 -- ** Product
437452 , Product
438453 , product
454+ , pSmallIconURL
439455 , pAuthorName
440456 , pKind
441457 , pWorkDetailsURL
@@ -486,6 +502,14 @@ module Network.Google.AndroidEnterprise
486502 , eeKind
487503 , eeReason
488504 , eeProductId
505+
506+ -- ** ProductsListResponse
507+ , ProductsListResponse
508+ , productsListResponse
509+ , plrTokenPagination
510+ , plrPageInfo
511+ , plrKind
512+ , plrProduct
489513 ) where
490514
491515import Network.Google.AndroidEnterprise.Types
@@ -534,6 +558,7 @@ import Network.Google.Resource.AndroidEnterprise.Products.GenerateAppr
534558import Network.Google.Resource.AndroidEnterprise.Products.Get
535559import Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
536560import Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
561+import Network.Google.Resource.AndroidEnterprise.Products.List
537562import Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
538563import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
539564import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get
@@ -613,6 +638,7 @@ type AndroidEnterpriseAPI =
613638 :<|> EntitlementsUpdateResource
614639 :<|> PermissionsGetResource
615640 :<|> ProductsGenerateApprovalURLResource
641+ :<|> ProductsListResource
616642 :<|> ProductsGetResource
617643 :<|> ProductsGetAppRestrictionsSchemaResource
618644 :<|> ProductsApproveResource
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types.hs+22
@@ -71,6 +71,12 @@ module Network.Google.AndroidEnterprise.Types
7171 , glulrKind
7272 , glulrUser
7373
74+ -- * TokenPagination
75+ , TokenPagination
76+ , tokenPagination
77+ , tpNextPageToken
78+ , tpPreviousPageToken
79+
7480 -- * ApprovalURLInfo
7581 , ApprovalURLInfo
7682 , approvalURLInfo
@@ -92,6 +98,13 @@ module Network.Google.AndroidEnterprise.Types
9298 , scId
9399 , scProductId
94100
101+ -- * PageInfo
102+ , PageInfo
103+ , pageInfo
104+ , piResultPerPage
105+ , piTotalResults
106+ , piStartIndex
107+
95108 -- * ProductPermission
96109 , ProductPermission
97110 , productPermission
@@ -237,6 +250,7 @@ module Network.Google.AndroidEnterprise.Types
237250 -- * Product
238251 , Product
239252 , product
253+ , pSmallIconURL
240254 , pAuthorName
241255 , pKind
242256 , pWorkDetailsURL
@@ -287,6 +301,14 @@ module Network.Google.AndroidEnterprise.Types
287301 , eeKind
288302 , eeReason
289303 , eeProductId
304+
305+ -- * ProductsListResponse
306+ , ProductsListResponse
307+ , productsListResponse
308+ , plrTokenPagination
309+ , plrPageInfo
310+ , plrKind
311+ , plrProduct
290312 ) where
291313
292314import Network.Google.AndroidEnterprise.Types.Product
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs+201−9
@@ -502,6 +502,53 @@ instance ToJSON GroupLicenseUsersListResponse where
502502 [Just ("kind" .= _glulrKind),
503503 ("user" .=) <$> _glulrUser])
504504
505+--
506+-- /See:/ 'tokenPagination' smart constructor.
507+data TokenPagination = TokenPagination'
508+ { _tpNextPageToken :: !(Maybe Text)
509+ , _tpPreviousPageToken :: !(Maybe Text)
510+ } deriving (Eq,Show,Data,Typeable,Generic)
511+
512+-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request.
513+--
514+-- Use one of the following lenses to modify other fields as desired:
515+--
516+-- * 'tpNextPageToken'
517+--
518+-- * 'tpPreviousPageToken'
519+tokenPagination
520+ :: TokenPagination
521+tokenPagination =
522+ TokenPagination'
523+ { _tpNextPageToken = Nothing
524+ , _tpPreviousPageToken = Nothing
525+ }
526+
527+tpNextPageToken :: Lens' TokenPagination (Maybe Text)
528+tpNextPageToken
529+ = lens _tpNextPageToken
530+ (\ s a -> s{_tpNextPageToken = a})
531+
532+tpPreviousPageToken :: Lens' TokenPagination (Maybe Text)
533+tpPreviousPageToken
534+ = lens _tpPreviousPageToken
535+ (\ s a -> s{_tpPreviousPageToken = a})
536+
537+instance FromJSON TokenPagination where
538+ parseJSON
539+ = withObject "TokenPagination"
540+ (\ o ->
541+ TokenPagination' <$>
542+ (o .:? "nextPageToken") <*>
543+ (o .:? "previousPageToken"))
544+
545+instance ToJSON TokenPagination where
546+ toJSON TokenPagination'{..}
547+ = object
548+ (catMaybes
549+ [("nextPageToken" .=) <$> _tpNextPageToken,
550+ ("previousPageToken" .=) <$> _tpPreviousPageToken])
551+
505552-- | Information on an approval URL.
506553--
507554-- /See:/ 'approvalURLInfo' smart constructor.
@@ -660,7 +707,7 @@ scName
660707-- order of this field. Duplicated values are allowed, but ordering between
661708-- elements with duplicate order is undefined. The value of this field is
662709-- never visible to a user, it is used solely for the purpose of defining
663−-- an ordering. Maximum length is 20 characters.
710+-- an ordering. Maximum length is 256 characters.
664711scOrderInPage :: Lens' StoreCluster (Maybe Text)
665712scOrderInPage
666713 = lens _scOrderInPage
@@ -699,6 +746,65 @@ instance ToJSON StoreCluster where
699746 ("id" .=) <$> _scId,
700747 ("productId" .=) <$> _scProductId])
701748
749+--
750+-- /See:/ 'pageInfo' smart constructor.
751+data PageInfo = PageInfo'
752+ { _piResultPerPage :: !(Maybe (Textual Int32))
753+ , _piTotalResults :: !(Maybe (Textual Int32))
754+ , _piStartIndex :: !(Maybe (Textual Int32))
755+ } deriving (Eq,Show,Data,Typeable,Generic)
756+
757+-- | Creates a value of 'PageInfo' with the minimum fields required to make a request.
758+--
759+-- Use one of the following lenses to modify other fields as desired:
760+--
761+-- * 'piResultPerPage'
762+--
763+-- * 'piTotalResults'
764+--
765+-- * 'piStartIndex'
766+pageInfo
767+ :: PageInfo
768+pageInfo =
769+ PageInfo'
770+ { _piResultPerPage = Nothing
771+ , _piTotalResults = Nothing
772+ , _piStartIndex = Nothing
773+ }
774+
775+piResultPerPage :: Lens' PageInfo (Maybe Int32)
776+piResultPerPage
777+ = lens _piResultPerPage
778+ (\ s a -> s{_piResultPerPage = a})
779+ . mapping _Coerce
780+
781+piTotalResults :: Lens' PageInfo (Maybe Int32)
782+piTotalResults
783+ = lens _piTotalResults
784+ (\ s a -> s{_piTotalResults = a})
785+ . mapping _Coerce
786+
787+piStartIndex :: Lens' PageInfo (Maybe Int32)
788+piStartIndex
789+ = lens _piStartIndex (\ s a -> s{_piStartIndex = a})
790+ . mapping _Coerce
791+
792+instance FromJSON PageInfo where
793+ parseJSON
794+ = withObject "PageInfo"
795+ (\ o ->
796+ PageInfo' <$>
797+ (o .:? "resultPerPage") <*> (o .:? "totalResults")
798+ <*> (o .:? "startIndex"))
799+
800+instance ToJSON PageInfo where
801+ toJSON PageInfo'{..}
802+ = object
803+ (catMaybes
804+ [("resultPerPage" .=) <$> _piResultPerPage,
805+ ("totalResults" .=) <$> _piTotalResults,
806+ ("startIndex" .=) <$> _piStartIndex])
807+
702808-- | A product permissions resource represents the set of permissions
703809-- required by a specific app and whether or not they have been accepted by
704810-- an enterprise admin. The API can be used to read the set of permissions,
@@ -1431,8 +1537,7 @@ uKind = lens _uKind (\ s a -> s{_uKind = a})
14311537uId :: Lens' User (Maybe Text)
14321538uId = lens _uId (\ s a -> s{_uId = a})
14331539
1434−-- | The user\'s primary email, e.g. \"jsmith\'example.com\". Will always be
1435−-- set for Google managed users and not set for EMM managed users.
1540+-- | The user\'s primary email, e.g. \"jsmith\'example.com\".
14361541uPrimaryEmail :: Lens' User (Maybe Text)
14371542uPrimaryEmail
14381543 = lens _uPrimaryEmail
@@ -1888,7 +1993,7 @@ instance ToJSON DevicesListResponse where
18881993 [Just ("kind" .= _dlrKind),
18891994 ("device" .=) <$> _dlrDevice])
18901995
1891−-- | An enterprise resource represents a binding between an organisation and
1996+-- | An enterprise resource represents a binding between an organization and
18921997-- their EMM. To create an enterprise, an admin of the enterprise must
18931998-- first go through a Play for Work sign-up flow. At the end of this the
18941999-- admin will be presented with a token (a short opaque alphanumeric
@@ -2041,7 +2146,8 @@ instance ToJSON StoreLayout where
20412146--
20422147-- /See:/ 'product' smart constructor.
20432148data Product = Product'
2044− { _pAuthorName :: !(Maybe Text)
2149+ { _pSmallIconURL :: !(Maybe Text)
2150+ , _pAuthorName :: !(Maybe Text)
20452151 , _pKind :: !Text
20462152 , _pWorkDetailsURL :: !(Maybe Text)
20472153 , _pRequiresContainerApp :: !(Maybe Bool)
@@ -2058,6 +2164,8 @@ data Product = Product'
20582164--
20592165-- Use one of the following lenses to modify other fields as desired:
20602166--
2167+-- * 'pSmallIconURL'
2168+--
20612169-- * 'pAuthorName'
20622170--
20632171-- * 'pKind'
@@ -2083,7 +2191,8 @@ product
20832191 :: Product
20842192product =
20852193 Product'
2086− { _pAuthorName = Nothing
2194+ { _pSmallIconURL = Nothing
2195+ , _pAuthorName = Nothing
20872196 , _pKind = "androidenterprise#product"
20882197 , _pWorkDetailsURL = Nothing
20892198 , _pRequiresContainerApp = Nothing
@@ -2096,6 +2205,13 @@ product =
20962205 , _pDetailsURL = Nothing
20972206 }
20982207
2208+-- | A link to a smaller image that can be used as an icon for the product.
2209+-- This image is suitable for use at up to 128px x 128px.
2210+pSmallIconURL :: Lens' Product (Maybe Text)
2211+pSmallIconURL
2212+ = lens _pSmallIconURL
2213+ (\ s a -> s{_pSmallIconURL = a})
2214+
20992215-- | The name of the author of the product (e.g. the app developer).
21002216pAuthorName :: Lens' Product (Maybe Text)
21012217pAuthorName
@@ -2146,7 +2262,8 @@ pDistributionChannel
21462262 = lens _pDistributionChannel
21472263 (\ s a -> s{_pDistributionChannel = a})
21482264
2149−-- | A link to an image that can be used as an icon for the product.
2265+-- | A link to an image that can be used as an icon for the product. This
2266+-- image is suitable for use at up to 512px x 512px.
21502267pIconURL :: Lens' Product (Maybe Text)
21512268pIconURL = lens _pIconURL (\ s a -> s{_pIconURL = a})
21522269
@@ -2170,7 +2287,7 @@ instance FromJSON Product where
21702287 = withObject "Product"
21712288 (\ o ->
21722289 Product' <$>
2173− (o .:? "authorName") <*>
2290+ (o .:? "smallIconUrl") <*> (o .:? "authorName") <*>
21742291 (o .:? "kind" .!= "androidenterprise#product")
21752292 <*> (o .:? "workDetailsUrl")
21762293 <*> (o .:? "requiresContainerApp")
@@ -2186,7 +2303,8 @@ instance ToJSON Product where
21862303 toJSON Product'{..}
21872304 = object
21882305 (catMaybes
2189− [("authorName" .=) <$> _pAuthorName,
2306+ [("smallIconUrl" .=) <$> _pSmallIconURL,
2307+ ("authorName" .=) <$> _pAuthorName,
21902308 Just ("kind" .= _pKind),
21912309 ("workDetailsUrl" .=) <$> _pWorkDetailsURL,
21922310 ("requiresContainerApp" .=) <$>
@@ -2570,3 +2688,77 @@ instance ToJSON Entitlement where
25702688 [Just ("kind" .= _eeKind),
25712689 ("reason" .=) <$> _eeReason,
25722690 ("productId" .=) <$> _eeProductId])
2691+
2692+-- | The matching products.
2693+--
2694+-- /See:/ 'productsListResponse' smart constructor.
2695+data ProductsListResponse = ProductsListResponse'
2696+ { _plrTokenPagination :: !(Maybe TokenPagination)
2697+ , _plrPageInfo :: !(Maybe PageInfo)
2698+ , _plrKind :: !Text
2699+ , _plrProduct :: !(Maybe [Product])
2700+ } deriving (Eq,Show,Data,Typeable,Generic)
2701+
2702+-- | Creates a value of 'ProductsListResponse' with the minimum fields required to make a request.
2703+--
2704+-- Use one of the following lenses to modify other fields as desired:
2705+--
2706+-- * 'plrTokenPagination'
2707+--
2708+-- * 'plrPageInfo'
2709+--
2710+-- * 'plrKind'
2711+--
2712+-- * 'plrProduct'
2713+productsListResponse
2714+ :: ProductsListResponse
2715+productsListResponse =
2716+ ProductsListResponse'
2717+ { _plrTokenPagination = Nothing
2718+ , _plrPageInfo = Nothing
2719+ , _plrKind = "androidenterprise#productsListResponse"
2720+ , _plrProduct = Nothing
2721+ }
2722+
2723+-- | Pagination information for token pagination.
2724+plrTokenPagination :: Lens' ProductsListResponse (Maybe TokenPagination)
2725+plrTokenPagination
2726+ = lens _plrTokenPagination
2727+ (\ s a -> s{_plrTokenPagination = a})
2728+
2729+-- | General pagination information.
2730+plrPageInfo :: Lens' ProductsListResponse (Maybe PageInfo)
2731+plrPageInfo
2732+ = lens _plrPageInfo (\ s a -> s{_plrPageInfo = a})
2733+
2734+-- | Identifies what kind of resource this is. Value: the fixed string
2735+-- \"androidenterprise#productsListResponse\".
2736+plrKind :: Lens' ProductsListResponse Text
2737+plrKind = lens _plrKind (\ s a -> s{_plrKind = a})
2738+
2739+-- | Information about a product (e.g. an app) in the Google Play Store, for
2740+-- display to an enterprise admin.
2741+plrProduct :: Lens' ProductsListResponse [Product]
2742+plrProduct
2743+ = lens _plrProduct (\ s a -> s{_plrProduct = a}) .
2744+ _Default
2745+ . _Coerce
2746+
2747+instance FromJSON ProductsListResponse where
2748+ parseJSON
2749+ = withObject "ProductsListResponse"
2750+ (\ o ->
2751+ ProductsListResponse' <$>
2752+ (o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
2753+ (o .:? "kind" .!=
2754+ "androidenterprise#productsListResponse")
2755+ <*> (o .:? "product" .!= mempty))
2756+
2757+instance ToJSON ProductsListResponse where
2758+ toJSON ProductsListResponse'{..}
2759+ = object
2760+ (catMaybes
2761+ [("tokenPagination" .=) <$> _plrTokenPagination,
2762+ ("pageInfo" .=) <$> _plrPageInfo,
2763+ Just ("kind" .= _plrKind),
2764+ ("product" .=) <$> _plrProduct])
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Delete.hs+2−1
@@ -84,7 +84,8 @@ entitlementsDelete pEntEntitlementId_ pEntEnterpriseId_ pEntUserId_ =
8484 , _entUserId = pEntUserId_
8585 }
8686
87−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
87+-- | The ID of the entitlement (a product ID), e.g.
88+-- \"app:com.google.android.gm\".
8889entEntitlementId :: Lens' EntitlementsDelete Text
8990entEntitlementId
9091 = lens _entEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Get.hs+2−1
@@ -84,7 +84,8 @@ entitlementsGet pEgEntitlementId_ pEgEnterpriseId_ pEgUserId_ =
8484 , _egUserId = pEgUserId_
8585 }
8686
87−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
87+-- | The ID of the entitlement (a product ID), e.g.
88+-- \"app:com.google.android.gm\".
8889egEntitlementId :: Lens' EntitlementsGet Text
8990egEntitlementId
9091 = lens _egEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Patch.hs+2−1
@@ -100,7 +100,8 @@ entitlementsPatch pEpEntitlementId_ pEpEnterpriseId_ pEpPayload_ pEpUserId_ =
100100 , _epUserId = pEpUserId_
101101 }
102102
103−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
103+-- | The ID of the entitlement (a product ID), e.g.
104+-- \"app:com.google.android.gm\".
104105epEntitlementId :: Lens' EntitlementsPatch Text
105106epEntitlementId
106107 = lens _epEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Update.hs+2−1
@@ -98,7 +98,8 @@ entitlementsUpdate pEuEntitlementId_ pEuEnterpriseId_ pEuPayload_ pEuUserId_ =
9898 , _euUserId = pEuUserId_
9999 }
100100
101−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
101+-- | The ID of the entitlement (a product ID), e.g.
102+-- \"app:com.google.android.gm\".
102103euEntitlementId :: Lens' EntitlementsUpdate Text
103104euEntitlementId
104105 = lens _euEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/List.hsnew file+158
@@ -0,0 +1,158 @@
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.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+-- Finds approved products that match a query.
24+--
25+-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.products.list@.
26+module Network.Google.Resource.AndroidEnterprise.Products.List
27+ (
28+ -- * REST Resource
29+ ProductsListResource
30+
31+ -- * Creating a Request
32+ , productsList
33+ , ProductsList
34+
35+ -- * Request Lenses
36+ , plEnterpriseId
37+ , plToken
38+ , plQuery
39+ , plLanguage
40+ , plApproved
41+ , plStartIndex
42+ , plMaxResults
43+ ) where
44+
45+import Network.Google.AndroidEnterprise.Types
46+import Network.Google.Prelude
47+
48+-- | A resource alias for @androidenterprise.products.list@ method which the
49+-- 'ProductsList' request conforms to.
50+type ProductsListResource =
51+ "androidenterprise" :>
52+ "v1" :>
53+ "enterprises" :>
54+ Capture "enterpriseId" Text :>
55+ "products" :>
56+ QueryParam "token" Text :>
57+ QueryParam "query" Text :>
58+ QueryParam "language" Text :>
59+ QueryParam "approved" Bool :>
60+ QueryParam "startIndex" (Textual Word32) :>
61+ QueryParam "maxResults" (Textual Word32) :>
62+ QueryParam "alt" AltJSON :>
63+ Get '[JSON] ProductsListResponse
64+
65+-- | Finds approved products that match a query.
66+--
67+-- /See:/ 'productsList' smart constructor.
68+data ProductsList = ProductsList'
69+ { _plEnterpriseId :: !Text
70+ , _plToken :: !(Maybe Text)
71+ , _plQuery :: !(Maybe Text)
72+ , _plLanguage :: !(Maybe Text)
73+ , _plApproved :: !(Maybe Bool)
74+ , _plStartIndex :: !(Maybe (Textual Word32))
75+ , _plMaxResults :: !(Maybe (Textual Word32))
76+ } deriving (Eq,Show,Data,Typeable,Generic)
77+
78+-- | Creates a value of 'ProductsList' with the minimum fields required to make a request.
79+--
80+-- Use one of the following lenses to modify other fields as desired:
81+--
82+-- * 'plEnterpriseId'
83+--
84+-- * 'plToken'
85+--
86+-- * 'plQuery'
87+--
88+-- * 'plLanguage'
89+--
90+-- * 'plApproved'
91+--
92+-- * 'plStartIndex'
93+--
94+-- * 'plMaxResults'
95+productsList
96+ :: Text -- ^ 'plEnterpriseId'
97+ -> ProductsList
98+productsList pPlEnterpriseId_ =
99+ ProductsList'
100+ { _plEnterpriseId = pPlEnterpriseId_
101+ , _plToken = Nothing
102+ , _plQuery = Nothing
103+ , _plLanguage = Nothing
104+ , _plApproved = Nothing
105+ , _plStartIndex = Nothing
106+ , _plMaxResults = Nothing
107+ }
108+
109+-- | The ID of the enterprise.
110+plEnterpriseId :: Lens' ProductsList Text
111+plEnterpriseId
112+ = lens _plEnterpriseId
113+ (\ s a -> s{_plEnterpriseId = a})
114+
115+plToken :: Lens' ProductsList (Maybe Text)
116+plToken = lens _plToken (\ s a -> s{_plToken = a})
117+
118+-- | The search query as typed in the Google Play Store search box. If
119+-- omitted, all approved apps will be returned.
120+plQuery :: Lens' ProductsList (Maybe Text)
121+plQuery = lens _plQuery (\ s a -> s{_plQuery = a})
122+
123+-- | The BCP47 tag for the user\'s preferred language (e.g. \"en-US\",
124+-- \"de\"). Results are returned in the language best matching it.
125+plLanguage :: Lens' ProductsList (Maybe Text)
126+plLanguage
127+ = lens _plLanguage (\ s a -> s{_plLanguage = a})
128+
129+-- | Whether to search amongst all products or only amongst approved ones.
130+-- Only \"true\" is supported, and should be specified.
131+plApproved :: Lens' ProductsList (Maybe Bool)
132+plApproved
133+ = lens _plApproved (\ s a -> s{_plApproved = a})
134+
135+plStartIndex :: Lens' ProductsList (Maybe Word32)
136+plStartIndex
137+ = lens _plStartIndex (\ s a -> s{_plStartIndex = a})
138+ . mapping _Coerce
139+
140+plMaxResults :: Lens' ProductsList (Maybe Word32)
141+plMaxResults
142+ = lens _plMaxResults (\ s a -> s{_plMaxResults = a})
143+ . mapping _Coerce
144+
145+instance GoogleRequest ProductsList where
146+ type Rs ProductsList = ProductsListResponse
147+ type Scopes ProductsList =
148+ '["https://www.googleapis.com/auth/androidenterprise"]
149+ requestClient ProductsList'{..}
150+ = go _plEnterpriseId _plToken _plQuery _plLanguage
151+ _plApproved
152+ _plStartIndex
153+ _plMaxResults
154+ (Just AltJSON)
155+ androidEnterpriseService
156+ where go
157+ = buildClient (Proxy :: Proxy ProductsListResource)
158+ mempty
gogol-android-enterprise/gogol-android-enterprise.cabal+2−2
@@ -14,8 +14,7 @@ cabal-version: >= 1.10
1414extra-source-files: README.md
1515
1616description:
17− Allows MDMs\/EMMs and enterprises to manage the deployment of apps to
18− Android for Work users.
17+ Manages the deployment of apps to Android for Work users.
1918 .
2019 /Warning:/ This is an experimental prototype/preview release which is still
2120 under exploratory development and not intended for public use, caveat emptor!
@@ -80,6 +79,7 @@ library
8079 , Network.Google.Resource.AndroidEnterprise.Products.Get
8180 , Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
8281 , Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
82+ , Network.Google.Resource.AndroidEnterprise.Products.List
8383 , Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
8484 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
8585 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get