@@ -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])