on develop help sign in
Regenerating gogol-android-enterprise from latest service definition
7f42631Brendan Hay
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise.hs+28−2
@@ -13,8 +13,7 @@
13-- Stability : auto-generated
13-- Stability : auto-generated
14-- Portability : non-portable (GHC extensions)
14-- Portability : non-portable (GHC extensions)
15--
15--
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.
18--
17--
19-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference>
18-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference>
20module Network.Google.AndroidEnterprise
19module Network.Google.AndroidEnterprise
@@ -162,6 +161,9 @@ module Network.Google.AndroidEnterprise
162 -- ** androidenterprise.products.getPermissions
161 -- ** androidenterprise.products.getPermissions
163 , module Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
162 , module Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
164
163
164+ -- ** androidenterprise.products.list
165+ , module Network.Google.Resource.AndroidEnterprise.Products.List
166+
165 -- ** androidenterprise.products.updatePermissions
167 -- ** androidenterprise.products.updatePermissions
166 , module Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
168 , module Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
167
169
@@ -270,6 +272,12 @@ module Network.Google.AndroidEnterprise
270 , glulrKind
272 , glulrKind
271 , glulrUser
273 , glulrUser
272
274
275+ -- ** TokenPagination
276+ , TokenPagination
277+ , tokenPagination
278+ , tpNextPageToken
279+ , tpPreviousPageToken
280+
273 -- ** ApprovalURLInfo
281 -- ** ApprovalURLInfo
274 , ApprovalURLInfo
282 , ApprovalURLInfo
275 , approvalURLInfo
283 , approvalURLInfo
@@ -291,6 +299,13 @@ module Network.Google.AndroidEnterprise
291 , scId
299 , scId
292 , scProductId
300 , scProductId
293
301
302+ -- ** PageInfo
303+ , PageInfo
304+ , pageInfo
305+ , piResultPerPage
306+ , piTotalResults
307+ , piStartIndex
308+
294 -- ** ProductPermission
309 -- ** ProductPermission
295 , ProductPermission
310 , ProductPermission
296 , productPermission
311 , productPermission
@@ -436,6 +451,7 @@ module Network.Google.AndroidEnterprise
436 -- ** Product
451 -- ** Product
437 , Product
452 , Product
438 , product
453 , product
454+ , pSmallIconURL
439 , pAuthorName
455 , pAuthorName
440 , pKind
456 , pKind
441 , pWorkDetailsURL
457 , pWorkDetailsURL
@@ -486,6 +502,14 @@ module Network.Google.AndroidEnterprise
486 , eeKind
502 , eeKind
487 , eeReason
503 , eeReason
488 , eeProductId
504 , eeProductId
505+
506+ -- ** ProductsListResponse
507+ , ProductsListResponse
508+ , productsListResponse
509+ , plrTokenPagination
510+ , plrPageInfo
511+ , plrKind
512+ , plrProduct
489 ) where
513 ) where
490
514
491import Network.Google.AndroidEnterprise.Types
515import Network.Google.AndroidEnterprise.Types
@@ -534,6 +558,7 @@ import Network.Google.Resource.AndroidEnterprise.Products.GenerateAppr
534import Network.Google.Resource.AndroidEnterprise.Products.Get
558import Network.Google.Resource.AndroidEnterprise.Products.Get
535import Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
559import Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
536import Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
560import Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
561+import Network.Google.Resource.AndroidEnterprise.Products.List
537import Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
562import Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
538import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
563import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
539import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get
564import Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get
@@ -613,6 +638,7 @@ type AndroidEnterpriseAPI =
613 :<|> EntitlementsUpdateResource
638 :<|> EntitlementsUpdateResource
614 :<|> PermissionsGetResource
639 :<|> PermissionsGetResource
615 :<|> ProductsGenerateApprovalURLResource
640 :<|> ProductsGenerateApprovalURLResource
641+ :<|> ProductsListResource
616 :<|> ProductsGetResource
642 :<|> ProductsGetResource
617 :<|> ProductsGetAppRestrictionsSchemaResource
643 :<|> ProductsGetAppRestrictionsSchemaResource
618 :<|> ProductsApproveResource
644 :<|> ProductsApproveResource
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types.hs+22
@@ -71,6 +71,12 @@ module Network.Google.AndroidEnterprise.Types
71 , glulrKind
71 , glulrKind
72 , glulrUser
72 , glulrUser
73
73
74+ -- * TokenPagination
75+ , TokenPagination
76+ , tokenPagination
77+ , tpNextPageToken
78+ , tpPreviousPageToken
79+
74 -- * ApprovalURLInfo
80 -- * ApprovalURLInfo
75 , ApprovalURLInfo
81 , ApprovalURLInfo
76 , approvalURLInfo
82 , approvalURLInfo
@@ -92,6 +98,13 @@ module Network.Google.AndroidEnterprise.Types
92 , scId
98 , scId
93 , scProductId
99 , scProductId
94
100
101+ -- * PageInfo
102+ , PageInfo
103+ , pageInfo
104+ , piResultPerPage
105+ , piTotalResults
106+ , piStartIndex
107+
95 -- * ProductPermission
108 -- * ProductPermission
96 , ProductPermission
109 , ProductPermission
97 , productPermission
110 , productPermission
@@ -237,6 +250,7 @@ module Network.Google.AndroidEnterprise.Types
237 -- * Product
250 -- * Product
238 , Product
251 , Product
239 , product
252 , product
253+ , pSmallIconURL
240 , pAuthorName
254 , pAuthorName
241 , pKind
255 , pKind
242 , pWorkDetailsURL
256 , pWorkDetailsURL
@@ -287,6 +301,14 @@ module Network.Google.AndroidEnterprise.Types
287 , eeKind
301 , eeKind
288 , eeReason
302 , eeReason
289 , eeProductId
303 , eeProductId
304+
305+ -- * ProductsListResponse
306+ , ProductsListResponse
307+ , productsListResponse
308+ , plrTokenPagination
309+ , plrPageInfo
310+ , plrKind
311+ , plrProduct
290 ) where
312 ) where
291
313
292import Network.Google.AndroidEnterprise.Types.Product
314import 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
502 [Just ("kind" .= _glulrKind),
502 [Just ("kind" .= _glulrKind),
503 ("user" .=) <$> _glulrUser])
503 ("user" .=) <$> _glulrUser])
504
504
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+
505-- | Information on an approval URL.
552-- | Information on an approval URL.
506--
553--
507-- /See:/ 'approvalURLInfo' smart constructor.
554-- /See:/ 'approvalURLInfo' smart constructor.
@@ -660,7 +707,7 @@ scName
660-- order of this field. Duplicated values are allowed, but ordering between
707-- order of this field. Duplicated values are allowed, but ordering between
661-- elements with duplicate order is undefined. The value of this field is
708-- elements with duplicate order is undefined. The value of this field is
662-- never visible to a user, it is used solely for the purpose of defining
709-- 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.
664scOrderInPage :: Lens' StoreCluster (Maybe Text)
711scOrderInPage :: Lens' StoreCluster (Maybe Text)
665scOrderInPage
712scOrderInPage
666 = lens _scOrderInPage
713 = lens _scOrderInPage
@@ -699,6 +746,65 @@ instance ToJSON StoreCluster where
699 ("id" .=) <$> _scId,
746 ("id" .=) <$> _scId,
700 ("productId" .=) <$> _scProductId])
747 ("productId" .=) <$> _scProductId])
701
748
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+
702-- | A product permissions resource represents the set of permissions
808-- | A product permissions resource represents the set of permissions
703-- required by a specific app and whether or not they have been accepted by
809-- required by a specific app and whether or not they have been accepted by
704-- an enterprise admin. The API can be used to read the set of permissions,
810-- 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})
1431uId :: Lens' User (Maybe Text)
1537uId :: Lens' User (Maybe Text)
1432uId = lens _uId (\ s a -> s{_uId = a})
1538uId = lens _uId (\ s a -> s{_uId = a})
1433
1539
1434−-- | The user\'s primary email, e.g. \"jsmith\'example.com\". Will always be
1540+-- | The user\'s primary email, e.g. \"jsmith\'example.com\".
1435−-- set for Google managed users and not set for EMM managed users.
1436uPrimaryEmail :: Lens' User (Maybe Text)
1541uPrimaryEmail :: Lens' User (Maybe Text)
1437uPrimaryEmail
1542uPrimaryEmail
1438 = lens _uPrimaryEmail
1543 = lens _uPrimaryEmail
@@ -1888,7 +1993,7 @@ instance ToJSON DevicesListResponse where
1888 [Just ("kind" .= _dlrKind),
1993 [Just ("kind" .= _dlrKind),
1889 ("device" .=) <$> _dlrDevice])
1994 ("device" .=) <$> _dlrDevice])
1890
1995
1891−-- | An enterprise resource represents a binding between an organisation and
1996+-- | An enterprise resource represents a binding between an organization and
1892-- their EMM. To create an enterprise, an admin of the enterprise must
1997-- their EMM. To create an enterprise, an admin of the enterprise must
1893-- first go through a Play for Work sign-up flow. At the end of this the
1998-- first go through a Play for Work sign-up flow. At the end of this the
1894-- admin will be presented with a token (a short opaque alphanumeric
1999-- admin will be presented with a token (a short opaque alphanumeric
@@ -2041,7 +2146,8 @@ instance ToJSON StoreLayout where
2041--
2146--
2042-- /See:/ 'product' smart constructor.
2147-- /See:/ 'product' smart constructor.
2043data Product = Product'
2148data Product = Product'
2149+ { _pSmallIconURL :: !(Maybe Text)
2044− { _pAuthorName :: !(Maybe Text)
2150+ , _pAuthorName :: !(Maybe Text)
2045 , _pKind :: !Text
2151 , _pKind :: !Text
2046 , _pWorkDetailsURL :: !(Maybe Text)
2152 , _pWorkDetailsURL :: !(Maybe Text)
2047 , _pRequiresContainerApp :: !(Maybe Bool)
2153 , _pRequiresContainerApp :: !(Maybe Bool)
@@ -2058,6 +2164,8 @@ data Product = Product'
2058--
2164--
2059-- Use one of the following lenses to modify other fields as desired:
2165-- Use one of the following lenses to modify other fields as desired:
2060--
2166--
2167+-- * 'pSmallIconURL'
2168+--
2061-- * 'pAuthorName'
2169-- * 'pAuthorName'
2062--
2170--
2063-- * 'pKind'
2171-- * 'pKind'
@@ -2083,7 +2191,8 @@ product
2083 :: Product
2191 :: Product
2084product =
2192product =
2085 Product'
2193 Product'
2194+ { _pSmallIconURL = Nothing
2086− { _pAuthorName = Nothing
2195+ , _pAuthorName = Nothing
2087 , _pKind = "androidenterprise#product"
2196 , _pKind = "androidenterprise#product"
2088 , _pWorkDetailsURL = Nothing
2197 , _pWorkDetailsURL = Nothing
2089 , _pRequiresContainerApp = Nothing
2198 , _pRequiresContainerApp = Nothing
@@ -2096,6 +2205,13 @@ product =
2096 , _pDetailsURL = Nothing
2205 , _pDetailsURL = Nothing
2097 }
2206 }
2098
2207
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+
2099-- | The name of the author of the product (e.g. the app developer).
2215-- | The name of the author of the product (e.g. the app developer).
2100pAuthorName :: Lens' Product (Maybe Text)
2216pAuthorName :: Lens' Product (Maybe Text)
2101pAuthorName
2217pAuthorName
@@ -2146,7 +2262,8 @@ pDistributionChannel
2146 = lens _pDistributionChannel
2262 = lens _pDistributionChannel
2147 (\ s a -> s{_pDistributionChannel = a})
2263 (\ s a -> s{_pDistributionChannel = a})
2148
2264
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.
2150pIconURL :: Lens' Product (Maybe Text)
2267pIconURL :: Lens' Product (Maybe Text)
2151pIconURL = lens _pIconURL (\ s a -> s{_pIconURL = a})
2268pIconURL = lens _pIconURL (\ s a -> s{_pIconURL = a})
2152
2269
@@ -2170,7 +2287,7 @@ instance FromJSON Product where
2170 = withObject "Product"
2287 = withObject "Product"
2171 (\ o ->
2288 (\ o ->
2172 Product' <$>
2289 Product' <$>
2173− (o .:? "authorName") <*>
2290+ (o .:? "smallIconUrl") <*> (o .:? "authorName") <*>
2174 (o .:? "kind" .!= "androidenterprise#product")
2291 (o .:? "kind" .!= "androidenterprise#product")
2175 <*> (o .:? "workDetailsUrl")
2292 <*> (o .:? "workDetailsUrl")
2176 <*> (o .:? "requiresContainerApp")
2293 <*> (o .:? "requiresContainerApp")
@@ -2186,7 +2303,8 @@ instance ToJSON Product where
2186 toJSON Product'{..}
2303 toJSON Product'{..}
2187 = object
2304 = object
2188 (catMaybes
2305 (catMaybes
2306+ [("smallIconUrl" .=) <$> _pSmallIconURL,
2189− [("authorName" .=) <$> _pAuthorName,
2307+ ("authorName" .=) <$> _pAuthorName,
2190 Just ("kind" .= _pKind),
2308 Just ("kind" .= _pKind),
2191 ("workDetailsUrl" .=) <$> _pWorkDetailsURL,
2309 ("workDetailsUrl" .=) <$> _pWorkDetailsURL,
2192 ("requiresContainerApp" .=) <$>
2310 ("requiresContainerApp" .=) <$>
@@ -2570,3 +2688,77 @@ instance ToJSON Entitlement where
2570 [Just ("kind" .= _eeKind),
2688 [Just ("kind" .= _eeKind),
2571 ("reason" .=) <$> _eeReason,
2689 ("reason" .=) <$> _eeReason,
2572 ("productId" .=) <$> _eeProductId])
2690 ("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_ =
84 , _entUserId = pEntUserId_
84 , _entUserId = pEntUserId_
85 }
85 }
86
86
87+-- | The ID of the entitlement (a product ID), e.g.
87−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
88+-- \"app:com.google.android.gm\".
88entEntitlementId :: Lens' EntitlementsDelete Text
89entEntitlementId :: Lens' EntitlementsDelete Text
89entEntitlementId
90entEntitlementId
90 = lens _entEntitlementId
91 = lens _entEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Get.hs+2−1
@@ -84,7 +84,8 @@ entitlementsGet pEgEntitlementId_ pEgEnterpriseId_ pEgUserId_ =
84 , _egUserId = pEgUserId_
84 , _egUserId = pEgUserId_
85 }
85 }
86
86
87+-- | The ID of the entitlement (a product ID), e.g.
87−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
88+-- \"app:com.google.android.gm\".
88egEntitlementId :: Lens' EntitlementsGet Text
89egEntitlementId :: Lens' EntitlementsGet Text
89egEntitlementId
90egEntitlementId
90 = lens _egEntitlementId
91 = lens _egEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Patch.hs+2−1
@@ -100,7 +100,8 @@ entitlementsPatch pEpEntitlementId_ pEpEnterpriseId_ pEpPayload_ pEpUserId_ =
100 , _epUserId = pEpUserId_
100 , _epUserId = pEpUserId_
101 }
101 }
102
102
103+-- | The ID of the entitlement (a product ID), e.g.
103−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
104+-- \"app:com.google.android.gm\".
104epEntitlementId :: Lens' EntitlementsPatch Text
105epEntitlementId :: Lens' EntitlementsPatch Text
105epEntitlementId
106epEntitlementId
106 = lens _epEntitlementId
107 = lens _epEntitlementId
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Entitlements/Update.hs+2−1
@@ -98,7 +98,8 @@ entitlementsUpdate pEuEntitlementId_ pEuEnterpriseId_ pEuPayload_ pEuUserId_ =
98 , _euUserId = pEuUserId_
98 , _euUserId = pEuUserId_
99 }
99 }
100
100
101+-- | The ID of the entitlement (a product ID), e.g.
101−-- | The ID of the entitlement, e.g. \"app:com.google.android.gm\".
102+-- \"app:com.google.android.gm\".
102euEntitlementId :: Lens' EntitlementsUpdate Text
103euEntitlementId :: Lens' EntitlementsUpdate Text
103euEntitlementId
104euEntitlementId
104 = lens _euEntitlementId
105 = 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
14extra-source-files: README.md
14extra-source-files: README.md
15
15
16description:
16description:
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.
19 .
18 .
20 /Warning:/ This is an experimental prototype/preview release which is still
19 /Warning:/ This is an experimental prototype/preview release which is still
21 under exploratory development and not intended for public use, caveat emptor!
20 under exploratory development and not intended for public use, caveat emptor!
@@ -80,6 +79,7 @@ library
80 , Network.Google.Resource.AndroidEnterprise.Products.Get
79 , Network.Google.Resource.AndroidEnterprise.Products.Get
81 , Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
80 , Network.Google.Resource.AndroidEnterprise.Products.GetAppRestrictionsSchema
82 , Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
81 , Network.Google.Resource.AndroidEnterprise.Products.GetPermissions
82+ , Network.Google.Resource.AndroidEnterprise.Products.List
83 , Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
83 , Network.Google.Resource.AndroidEnterprise.Products.UpdatePermissions
84 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
84 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Delete
85 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get
85 , Network.Google.Resource.AndroidEnterprise.Storelayoutclusters.Get