@@ -502,6 +502,53 @@ instance ToJSON GroupLicenseUsersListResponse where
502 [Just ("kind" .= _glulrKind),
502 [Just ("kind" .= _glulrKind),
503 ("user" .=) <$> _glulrUser])
503 ("user" .=) <$> _glulrUser])
506+-- /See:/ 'tokenPagination' smart constructor.
507+data TokenPagination = TokenPagination'
508+ { _tpNextPageToken :: !(Maybe Text)
509+ , _tpPreviousPageToken :: !(Maybe Text)
510+ } deriving (Eq,Show,Data,Typeable,Generic)
512+-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request.
514+-- Use one of the following lenses to modify other fields as desired:
516+-- * 'tpNextPageToken'
518+-- * 'tpPreviousPageToken'
523+ { _tpNextPageToken = Nothing
524+ , _tpPreviousPageToken = Nothing
527+tpNextPageToken :: Lens' TokenPagination (Maybe Text)
529+ = lens _tpNextPageToken
530+ (\ s a -> s{_tpNextPageToken = a})
532+tpPreviousPageToken :: Lens' TokenPagination (Maybe Text)
534+ = lens _tpPreviousPageToken
535+ (\ s a -> s{_tpPreviousPageToken = a})
537+instance FromJSON TokenPagination where
539+ = withObject "TokenPagination"
541+ TokenPagination' <$>
542+ (o .:? "nextPageToken") <*>
543+ (o .:? "previousPageToken"))
545+instance ToJSON TokenPagination where
546+ toJSON TokenPagination'{..}
549+ [("nextPageToken" .=) <$> _tpNextPageToken,
550+ ("previousPageToken" .=) <$> _tpPreviousPageToken])
505-- | Information on an approval URL.
552-- | Information on an approval URL.
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])
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)
757+-- | Creates a value of 'PageInfo' with the minimum fields required to make a request.
759+-- Use one of the following lenses to modify other fields as desired:
761+-- * 'piResultPerPage'
763+-- * 'piTotalResults'
770+ { _piResultPerPage = Nothing
771+ , _piTotalResults = Nothing
772+ , _piStartIndex = Nothing
775+piResultPerPage :: Lens' PageInfo (Maybe Int32)
777+ = lens _piResultPerPage
778+ (\ s a -> s{_piResultPerPage = a})
781+piTotalResults :: Lens' PageInfo (Maybe Int32)
783+ = lens _piTotalResults
784+ (\ s a -> s{_piTotalResults = a})
787+piStartIndex :: Lens' PageInfo (Maybe Int32)
789+ = lens _piStartIndex (\ s a -> s{_piStartIndex = a})
792+instance FromJSON PageInfo where
794+ = withObject "PageInfo"
797+ (o .:? "resultPerPage") <*> (o .:? "totalResults")
798+ <*> (o .:? "startIndex"))
800+instance ToJSON PageInfo where
801+ toJSON PageInfo'{..}
804+ [("resultPerPage" .=) <$> _piResultPerPage,
805+ ("totalResults" .=) <$> _piTotalResults,
806+ ("startIndex" .=) <$> _piStartIndex])
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})
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])
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
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'
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:
2167+-- * 'pSmallIconURL'
2061-- * 'pAuthorName'
2169-- * 'pAuthorName'
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
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)
2212+ = lens _pSmallIconURL
2213+ (\ s a -> s{_pSmallIconURL = a})
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})
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})
@@ -2170,7 +2287,7 @@ instance FromJSON Product where
2170 = withObject "Product"
2287 = withObject "Product"
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])
2692+-- | The matching products.
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)
2702+-- | Creates a value of 'ProductsListResponse' with the minimum fields required to make a request.
2704+-- Use one of the following lenses to modify other fields as desired:
2706+-- * 'plrTokenPagination'
2713+productsListResponse
2714+ :: ProductsListResponse
2715+productsListResponse =
2716+ ProductsListResponse'
2717+ { _plrTokenPagination = Nothing
2718+ , _plrPageInfo = Nothing
2719+ , _plrKind = "androidenterprise#productsListResponse"
2720+ , _plrProduct = Nothing
2723+-- | Pagination information for token pagination.
2724+plrTokenPagination :: Lens' ProductsListResponse (Maybe TokenPagination)
2726+ = lens _plrTokenPagination
2727+ (\ s a -> s{_plrTokenPagination = a})
2729+-- | General pagination information.
2730+plrPageInfo :: Lens' ProductsListResponse (Maybe PageInfo)
2732+ = lens _plrPageInfo (\ s a -> s{_plrPageInfo = a})
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})
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]
2743+ = lens _plrProduct (\ s a -> s{_plrProduct = a}) .
2747+instance FromJSON ProductsListResponse where
2749+ = withObject "ProductsListResponse"
2751+ ProductsListResponse' <$>
2752+ (o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
2754+ "androidenterprise#productsListResponse")
2755+ <*> (o .:? "product" .!= mempty))
2757+instance ToJSON ProductsListResponse where
2758+ toJSON ProductsListResponse'{..}
2761+ [("tokenPagination" .=) <$> _plrTokenPagination,
2762+ ("pageInfo" .=) <$> _plrPageInfo,
2763+ Just ("kind" .= _plrKind),
2764+ ("product" .=) <$> _plrProduct])