on develop help sign in
Regenerating gogol-android-publisher from latest service definition
commit2acf458ff55c0371bc2fc26fb67a3544dffb5b4b authorBrendan Hay <brendan.g.hay@gmail.com> dateMon 20 Jun 2016, 09:33 (10 years ago) parente449c9c
7 files changed+961
gogol-android-publisher/gen/Network/Google/AndroidPublisher.hs+75 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types.hs+60 gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs+489 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/Get.hs+99 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/List.hs+122 gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/Reply.hs+113 gogol-android-publisher/gogol-android-publisher.cabal+3
gogol-android-publisher/gen/Network/Google/AndroidPublisher.hs+75
@@ -185,6 +185,15 @@ module Network.Google.AndroidPublisher
185185 -- ** androidpublisher.purchases.subscriptions.revoke
186186 , module Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Revoke
187187
188+ -- ** androidpublisher.reviews.get
189+ , module Network.Google.Resource.AndroidPublisher.Reviews.Get
190+
191+ -- ** androidpublisher.reviews.list
192+ , module Network.Google.Resource.AndroidPublisher.Reviews.List
193+
194+ -- ** androidpublisher.reviews.reply
195+ , module Network.Google.Resource.AndroidPublisher.Reviews.Reply
196+
188197 -- * Types
189198
190199 -- ** InAppProductListings
@@ -254,6 +263,18 @@ module Network.Google.AndroidPublisher
254263 -- ** EditsTracksPatchTrack
255264 , EditsTracksPatchTrack (..)
256265
266+ -- ** UserComment
267+ , UserComment
268+ , userComment
269+ , ucAndroidOSVersion
270+ , ucText
271+ , ucDevice
272+ , ucAppVersionCode
273+ , ucAppVersionName
274+ , ucReviewerLanguage
275+ , ucStarRating
276+ , ucLastModified
277+
257278 -- ** Testers
258279 , Testers
259280 , testers
@@ -326,6 +347,13 @@ module Network.Google.AndroidPublisher
326347 , ppPurchaseTimeMillis
327348 , ppDeveloperPayload
328349
350+ -- ** ReviewsListResponse
351+ , ReviewsListResponse
352+ , reviewsListResponse
353+ , rlrTokenPagination
354+ , rlrPageInfo
355+ , rlrReviews
356+
329357 -- ** SubscriptionPurchasesDeferResponse
330358 , SubscriptionPurchasesDeferResponse
331359 , subscriptionPurchasesDeferResponse
@@ -433,6 +461,13 @@ module Network.Google.AndroidPublisher
433461 , apkllrKind
434462 , apkllrListings
435463
464+ -- ** Review
465+ , Review
466+ , review
467+ , rReviewId
468+ , rAuthorName
469+ , rComments
470+
436471 -- ** InAppProductsInsertResponse
437472 , InAppProductsInsertResponse
438473 , inAppProductsInsertResponse
@@ -452,12 +487,23 @@ module Network.Google.AndroidPublisher
452487 -- ** EditsExpansionFilesGetExpansionFileType
453488 , EditsExpansionFilesGetExpansionFileType (..)
454489
490+ -- ** ReviewsReplyRequest
491+ , ReviewsReplyRequest
492+ , reviewsReplyRequest
493+ , rrrReplyText
494+
455495 -- ** EditsExpansionFilesPatchExpansionFileType
456496 , EditsExpansionFilesPatchExpansionFileType (..)
457497
458498 -- ** EditsExpansionFilesUpdateExpansionFileType
459499 , EditsExpansionFilesUpdateExpansionFileType (..)
460500
501+ -- ** DeveloperComment
502+ , DeveloperComment
503+ , developerComment
504+ , dcText
505+ , dcLastModified
506+
461507 -- ** InAppProduct
462508 , InAppProduct
463509 , inAppProduct
@@ -500,6 +546,11 @@ module Network.Google.AndroidPublisher
500546 , apklrKind
501547 , apklrAPKs
502548
549+ -- ** ReviewsReplyResponse
550+ , ReviewsReplyResponse
551+ , reviewsReplyResponse
552+ , rrrResult
553+
503554 -- ** ExternallyHostedAPKUsesPermission
504555 , ExternallyHostedAPKUsesPermission
505556 , externallyHostedAPKUsesPermission
@@ -529,6 +580,12 @@ module Network.Google.AndroidPublisher
529580 , elrPageInfo
530581 , elrResources
531582
583+ -- ** Comment
584+ , Comment
585+ , comment
586+ , cUserComment
587+ , cDeveloperComment
588+
532589 -- ** EditsTestersUpdateTrack
533590 , EditsTestersUpdateTrack (..)
534591
@@ -537,6 +594,18 @@ module Network.Google.AndroidPublisher
537594 , inAppProductsUpdateRequest
538595 , inInAppProduct
539596
597+ -- ** Timestamp
598+ , Timestamp
599+ , timestamp
600+ , tNanos
601+ , tSeconds
602+
603+ -- ** ReviewReplyResult
604+ , ReviewReplyResult
605+ , reviewReplyResult
606+ , rReplyText
607+ , rLastEdited
608+
540609 -- ** Entitlement
541610 , Entitlement
542611 , entitlement
@@ -606,6 +675,9 @@ import Network.Google.Resource.AndroidPublisher.Purchases.Subscription
606675import Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Get
607676import Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Refund
608677import Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Revoke
678+import Network.Google.Resource.AndroidPublisher.Reviews.Get
679+import Network.Google.Resource.AndroidPublisher.Reviews.List
680+import Network.Google.Resource.AndroidPublisher.Reviews.Reply
609681
610682{- $resources
611683TODO
@@ -620,6 +692,9 @@ type AndroidPublisherAPI =
620692 :<|> InAppProductsGetResource
621693 :<|> InAppProductsDeleteResource
622694 :<|> InAppProductsUpdateResource
695+ :<|> ReviewsReplyResource
696+ :<|> ReviewsListResource
697+ :<|> ReviewsGetResource
623698 :<|> EditsImagesListResource
624699 :<|> EditsImagesDeleteallResource
625700 :<|> EditsImagesUploadResource
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types.hs+60
@@ -89,6 +89,18 @@ module Network.Google.AndroidPublisher.Types
8989 -- * EditsTracksPatchTrack
9090 , EditsTracksPatchTrack (..)
9191
92+ -- * UserComment
93+ , UserComment
94+ , userComment
95+ , ucAndroidOSVersion
96+ , ucText
97+ , ucDevice
98+ , ucAppVersionCode
99+ , ucAppVersionName
100+ , ucReviewerLanguage
101+ , ucStarRating
102+ , ucLastModified
103+
92104 -- * Testers
93105 , Testers
94106 , testers
@@ -161,6 +173,13 @@ module Network.Google.AndroidPublisher.Types
161173 , ppPurchaseTimeMillis
162174 , ppDeveloperPayload
163175
176+ -- * ReviewsListResponse
177+ , ReviewsListResponse
178+ , reviewsListResponse
179+ , rlrTokenPagination
180+ , rlrPageInfo
181+ , rlrReviews
182+
164183 -- * SubscriptionPurchasesDeferResponse
165184 , SubscriptionPurchasesDeferResponse
166185 , subscriptionPurchasesDeferResponse
@@ -268,6 +287,13 @@ module Network.Google.AndroidPublisher.Types
268287 , apkllrKind
269288 , apkllrListings
270289
290+ -- * Review
291+ , Review
292+ , review
293+ , rReviewId
294+ , rAuthorName
295+ , rComments
296+
271297 -- * InAppProductsInsertResponse
272298 , InAppProductsInsertResponse
273299 , inAppProductsInsertResponse
@@ -287,12 +313,23 @@ module Network.Google.AndroidPublisher.Types
287313 -- * EditsExpansionFilesGetExpansionFileType
288314 , EditsExpansionFilesGetExpansionFileType (..)
289315
316+ -- * ReviewsReplyRequest
317+ , ReviewsReplyRequest
318+ , reviewsReplyRequest
319+ , rrrReplyText
320+
290321 -- * EditsExpansionFilesPatchExpansionFileType
291322 , EditsExpansionFilesPatchExpansionFileType (..)
292323
293324 -- * EditsExpansionFilesUpdateExpansionFileType
294325 , EditsExpansionFilesUpdateExpansionFileType (..)
295326
327+ -- * DeveloperComment
328+ , DeveloperComment
329+ , developerComment
330+ , dcText
331+ , dcLastModified
332+
296333 -- * InAppProduct
297334 , InAppProduct
298335 , inAppProduct
@@ -335,6 +372,11 @@ module Network.Google.AndroidPublisher.Types
335372 , apklrKind
336373 , apklrAPKs
337374
375+ -- * ReviewsReplyResponse
376+ , ReviewsReplyResponse
377+ , reviewsReplyResponse
378+ , rrrResult
379+
338380 -- * ExternallyHostedAPKUsesPermission
339381 , ExternallyHostedAPKUsesPermission
340382 , externallyHostedAPKUsesPermission
@@ -364,6 +406,12 @@ module Network.Google.AndroidPublisher.Types
364406 , elrPageInfo
365407 , elrResources
366408
409+ -- * Comment
410+ , Comment
411+ , comment
412+ , cUserComment
413+ , cDeveloperComment
414+
367415 -- * EditsTestersUpdateTrack
368416 , EditsTestersUpdateTrack (..)
369417
@@ -372,6 +420,18 @@ module Network.Google.AndroidPublisher.Types
372420 , inAppProductsUpdateRequest
373421 , inInAppProduct
374422
423+ -- * Timestamp
424+ , Timestamp
425+ , timestamp
426+ , tNanos
427+ , tSeconds
428+
429+ -- * ReviewReplyResult
430+ , ReviewReplyResult
431+ , reviewReplyResult
432+ , rReplyText
433+ , rLastEdited
434+
375435 -- * Entitlement
376436 , Entitlement
377437 , entitlement
gogol-android-publisher/gen/Network/Google/AndroidPublisher/Types/Product.hs+489
@@ -503,6 +503,130 @@ instance ToJSON ExpansionFile where
503503 [("fileSize" .=) <$> _efFileSize,
504504 ("referencesVersion" .=) <$> _efReferencesVersion])
505505
506+--
507+-- /See:/ 'userComment' smart constructor.
508+data UserComment = UserComment'
509+ { _ucAndroidOSVersion :: !(Maybe (Textual Int32))
510+ , _ucText :: !(Maybe Text)
511+ , _ucDevice :: !(Maybe Text)
512+ , _ucAppVersionCode :: !(Maybe (Textual Int32))
513+ , _ucAppVersionName :: !(Maybe Text)
514+ , _ucReviewerLanguage :: !(Maybe Text)
515+ , _ucStarRating :: !(Maybe (Textual Int32))
516+ , _ucLastModified :: !(Maybe Timestamp)
517+ } deriving (Eq,Show,Data,Typeable,Generic)
518+
519+-- | Creates a value of 'UserComment' with the minimum fields required to make a request.
520+--
521+-- Use one of the following lenses to modify other fields as desired:
522+--
523+-- * 'ucAndroidOSVersion'
524+--
525+-- * 'ucText'
526+--
527+-- * 'ucDevice'
528+--
529+-- * 'ucAppVersionCode'
530+--
531+-- * 'ucAppVersionName'
532+--
533+-- * 'ucReviewerLanguage'
534+--
535+-- * 'ucStarRating'
536+--
537+-- * 'ucLastModified'
538+userComment
539+ :: UserComment
540+userComment =
541+ UserComment'
542+ { _ucAndroidOSVersion = Nothing
543+ , _ucText = Nothing
544+ , _ucDevice = Nothing
545+ , _ucAppVersionCode = Nothing
546+ , _ucAppVersionName = Nothing
547+ , _ucReviewerLanguage = Nothing
548+ , _ucStarRating = Nothing
549+ , _ucLastModified = Nothing
550+ }
551+
552+-- | Integer Android SDK version of the user\'s device at the time the review
553+-- was written, e.g. 23 is Marshmallow. May be absent.
554+ucAndroidOSVersion :: Lens' UserComment (Maybe Int32)
555+ucAndroidOSVersion
556+ = lens _ucAndroidOSVersion
557+ (\ s a -> s{_ucAndroidOSVersion = a})
558+ . mapping _Coerce
559+
560+-- | The content of the comment, i.e. review body. In some cases users have
561+-- been able to write a review with separate title and body; in those cases
562+-- the title and body are concatenated and separated by a tab character.
563+ucText :: Lens' UserComment (Maybe Text)
564+ucText = lens _ucText (\ s a -> s{_ucText = a})
565+
566+-- | Codename for the reviewer\'s device, e.g. klte, flounder. May be absent.
567+ucDevice :: Lens' UserComment (Maybe Text)
568+ucDevice = lens _ucDevice (\ s a -> s{_ucDevice = a})
569+
570+-- | Integer version code of the app as installed at the time the review was
571+-- written. May be absent.
572+ucAppVersionCode :: Lens' UserComment (Maybe Int32)
573+ucAppVersionCode
574+ = lens _ucAppVersionCode
575+ (\ s a -> s{_ucAppVersionCode = a})
576+ . mapping _Coerce
577+
578+-- | String version name of the app as installed at the time the review was
579+-- written. May be absent.
580+ucAppVersionName :: Lens' UserComment (Maybe Text)
581+ucAppVersionName
582+ = lens _ucAppVersionName
583+ (\ s a -> s{_ucAppVersionName = a})
584+
585+-- | Language code for the reviewer. This is taken from the device settings
586+-- so is not guaranteed to match the language the review is written in. May
587+-- be absent.
588+ucReviewerLanguage :: Lens' UserComment (Maybe Text)
589+ucReviewerLanguage
590+ = lens _ucReviewerLanguage
591+ (\ s a -> s{_ucReviewerLanguage = a})
592+
593+-- | The star rating associated with the review, from 1 to 5.
594+ucStarRating :: Lens' UserComment (Maybe Int32)
595+ucStarRating
596+ = lens _ucStarRating (\ s a -> s{_ucStarRating = a})
597+ . mapping _Coerce
598+
599+-- | The last time at which this comment was updated.
600+ucLastModified :: Lens' UserComment (Maybe Timestamp)
601+ucLastModified
602+ = lens _ucLastModified
603+ (\ s a -> s{_ucLastModified = a})
604+
605+instance FromJSON UserComment where
606+ parseJSON
607+ = withObject "UserComment"
608+ (\ o ->
609+ UserComment' <$>
610+ (o .:? "androidOsVersion") <*> (o .:? "text") <*>
611+ (o .:? "device")
612+ <*> (o .:? "appVersionCode")
613+ <*> (o .:? "appVersionName")
614+ <*> (o .:? "reviewerLanguage")
615+ <*> (o .:? "starRating")
616+ <*> (o .:? "lastModified"))
617+
618+instance ToJSON UserComment where
619+ toJSON UserComment'{..}
620+ = object
621+ (catMaybes
622+ [("androidOsVersion" .=) <$> _ucAndroidOSVersion,
623+ ("text" .=) <$> _ucText, ("device" .=) <$> _ucDevice,
624+ ("appVersionCode" .=) <$> _ucAppVersionCode,
625+ ("appVersionName" .=) <$> _ucAppVersionName,
626+ ("reviewerLanguage" .=) <$> _ucReviewerLanguage,
627+ ("starRating" .=) <$> _ucStarRating,
628+ ("lastModified" .=) <$> _ucLastModified])
629+
506630--
507631-- /See:/ 'testers' smart constructor.
508632data Testers = Testers'
@@ -1064,6 +1188,63 @@ instance ToJSON ProductPurchase where
10641188 ("purchaseTimeMillis" .=) <$> _ppPurchaseTimeMillis,
10651189 ("developerPayload" .=) <$> _ppDeveloperPayload])
10661190
1191+--
1192+-- /See:/ 'reviewsListResponse' smart constructor.
1193+data ReviewsListResponse = ReviewsListResponse'
1194+ { _rlrTokenPagination :: !(Maybe TokenPagination)
1195+ , _rlrPageInfo :: !(Maybe PageInfo)
1196+ , _rlrReviews :: !(Maybe [Review])
1197+ } deriving (Eq,Show,Data,Typeable,Generic)
1198+
1199+-- | Creates a value of 'ReviewsListResponse' with the minimum fields required to make a request.
1200+--
1201+-- Use one of the following lenses to modify other fields as desired:
1202+--
1203+-- * 'rlrTokenPagination'
1204+--
1205+-- * 'rlrPageInfo'
1206+--
1207+-- * 'rlrReviews'
1208+reviewsListResponse
1209+ :: ReviewsListResponse
1210+reviewsListResponse =
1211+ ReviewsListResponse'
1212+ { _rlrTokenPagination = Nothing
1213+ , _rlrPageInfo = Nothing
1214+ , _rlrReviews = Nothing
1215+ }
1216+
1217+rlrTokenPagination :: Lens' ReviewsListResponse (Maybe TokenPagination)
1218+rlrTokenPagination
1219+ = lens _rlrTokenPagination
1220+ (\ s a -> s{_rlrTokenPagination = a})
1221+
1222+rlrPageInfo :: Lens' ReviewsListResponse (Maybe PageInfo)
1223+rlrPageInfo
1224+ = lens _rlrPageInfo (\ s a -> s{_rlrPageInfo = a})
1225+
1226+rlrReviews :: Lens' ReviewsListResponse [Review]
1227+rlrReviews
1228+ = lens _rlrReviews (\ s a -> s{_rlrReviews = a}) .
1229+ _Default
1230+ . _Coerce
1231+
1232+instance FromJSON ReviewsListResponse where
1233+ parseJSON
1234+ = withObject "ReviewsListResponse"
1235+ (\ o ->
1236+ ReviewsListResponse' <$>
1237+ (o .:? "tokenPagination") <*> (o .:? "pageInfo") <*>
1238+ (o .:? "reviews" .!= mempty))
1239+
1240+instance ToJSON ReviewsListResponse where
1241+ toJSON ReviewsListResponse'{..}
1242+ = object
1243+ (catMaybes
1244+ [("tokenPagination" .=) <$> _rlrTokenPagination,
1245+ ("pageInfo" .=) <$> _rlrPageInfo,
1246+ ("reviews" .=) <$> _rlrReviews])
1247+
10671248--
10681249-- /See:/ 'subscriptionPurchasesDeferResponse' smart constructor.
10691250newtype SubscriptionPurchasesDeferResponse = SubscriptionPurchasesDeferResponse'
@@ -1923,6 +2104,65 @@ instance ToJSON APKListingsListResponse where
19232104 [Just ("kind" .= _apkllrKind),
19242105 ("listings" .=) <$> _apkllrListings])
19252106
2107+--
2108+-- /See:/ 'review' smart constructor.
2109+data Review = Review'
2110+ { _rReviewId :: !(Maybe Text)
2111+ , _rAuthorName :: !(Maybe Text)
2112+ , _rComments :: !(Maybe [Comment])
2113+ } deriving (Eq,Show,Data,Typeable,Generic)
2114+
2115+-- | Creates a value of 'Review' with the minimum fields required to make a request.
2116+--
2117+-- Use one of the following lenses to modify other fields as desired:
2118+--
2119+-- * 'rReviewId'
2120+--
2121+-- * 'rAuthorName'
2122+--
2123+-- * 'rComments'
2124+review
2125+ :: Review
2126+review =
2127+ Review'
2128+ { _rReviewId = Nothing
2129+ , _rAuthorName = Nothing
2130+ , _rComments = Nothing
2131+ }
2132+
2133+-- | Unique identifier for this review.
2134+rReviewId :: Lens' Review (Maybe Text)
2135+rReviewId
2136+ = lens _rReviewId (\ s a -> s{_rReviewId = a})
2137+
2138+-- | The name of the user who wrote the review.
2139+rAuthorName :: Lens' Review (Maybe Text)
2140+rAuthorName
2141+ = lens _rAuthorName (\ s a -> s{_rAuthorName = a})
2142+
2143+-- | A repeated field containing comments for the review.
2144+rComments :: Lens' Review [Comment]
2145+rComments
2146+ = lens _rComments (\ s a -> s{_rComments = a}) .
2147+ _Default
2148+ . _Coerce
2149+
2150+instance FromJSON Review where
2151+ parseJSON
2152+ = withObject "Review"
2153+ (\ o ->
2154+ Review' <$>
2155+ (o .:? "reviewId") <*> (o .:? "authorName") <*>
2156+ (o .:? "comments" .!= mempty))
2157+
2158+instance ToJSON Review where
2159+ toJSON Review'{..}
2160+ = object
2161+ (catMaybes
2162+ [("reviewId" .=) <$> _rReviewId,
2163+ ("authorName" .=) <$> _rAuthorName,
2164+ ("comments" .=) <$> _rComments])
2165+
19262166--
19272167-- /See:/ 'inAppProductsInsertResponse' smart constructor.
19282168newtype InAppProductsInsertResponse = InAppProductsInsertResponse'
@@ -2057,6 +2297,86 @@ instance ToJSON SubscriptionDeferralInfo where
20572297 ("expectedExpiryTimeMillis" .=) <$>
20582298 _sdiExpectedExpiryTimeMillis])
20592299
2300+--
2301+-- /See:/ 'reviewsReplyRequest' smart constructor.
2302+newtype ReviewsReplyRequest = ReviewsReplyRequest'
2303+ { _rrrReplyText :: Maybe Text
2304+ } deriving (Eq,Show,Data,Typeable,Generic)
2305+
2306+-- | Creates a value of 'ReviewsReplyRequest' with the minimum fields required to make a request.
2307+--
2308+-- Use one of the following lenses to modify other fields as desired:
2309+--
2310+-- * 'rrrReplyText'
2311+reviewsReplyRequest
2312+ :: ReviewsReplyRequest
2313+reviewsReplyRequest =
2314+ ReviewsReplyRequest'
2315+ { _rrrReplyText = Nothing
2316+ }
2317+
2318+-- | The text to set as the reply. Replies of more than approximately 350
2319+-- characters will be rejected. HTML tags will be stripped.
2320+rrrReplyText :: Lens' ReviewsReplyRequest (Maybe Text)
2321+rrrReplyText
2322+ = lens _rrrReplyText (\ s a -> s{_rrrReplyText = a})
2323+
2324+instance FromJSON ReviewsReplyRequest where
2325+ parseJSON
2326+ = withObject "ReviewsReplyRequest"
2327+ (\ o -> ReviewsReplyRequest' <$> (o .:? "replyText"))
2328+
2329+instance ToJSON ReviewsReplyRequest where
2330+ toJSON ReviewsReplyRequest'{..}
2331+ = object
2332+ (catMaybes [("replyText" .=) <$> _rrrReplyText])
2333+
2334+--
2335+-- /See:/ 'developerComment' smart constructor.
2336+data DeveloperComment = DeveloperComment'
2337+ { _dcText :: !(Maybe Text)
2338+ , _dcLastModified :: !(Maybe Timestamp)
2339+ } deriving (Eq,Show,Data,Typeable,Generic)
2340+
2341+-- | Creates a value of 'DeveloperComment' with the minimum fields required to make a request.
2342+--
2343+-- Use one of the following lenses to modify other fields as desired:
2344+--
2345+-- * 'dcText'
2346+--
2347+-- * 'dcLastModified'
2348+developerComment
2349+ :: DeveloperComment
2350+developerComment =
2351+ DeveloperComment'
2352+ { _dcText = Nothing
2353+ , _dcLastModified = Nothing
2354+ }
2355+
2356+-- | The content of the comment, i.e. reply body.
2357+dcText :: Lens' DeveloperComment (Maybe Text)
2358+dcText = lens _dcText (\ s a -> s{_dcText = a})
2359+
2360+-- | The last time at which this comment was updated.
2361+dcLastModified :: Lens' DeveloperComment (Maybe Timestamp)
2362+dcLastModified
2363+ = lens _dcLastModified
2364+ (\ s a -> s{_dcLastModified = a})
2365+
2366+instance FromJSON DeveloperComment where
2367+ parseJSON
2368+ = withObject "DeveloperComment"
2369+ (\ o ->
2370+ DeveloperComment' <$>
2371+ (o .:? "text") <*> (o .:? "lastModified"))
2372+
2373+instance ToJSON DeveloperComment where
2374+ toJSON DeveloperComment'{..}
2375+ = object
2376+ (catMaybes
2377+ [("text" .=) <$> _dcText,
2378+ ("lastModified" .=) <$> _dcLastModified])
2379+
20602380--
20612381-- /See:/ 'inAppProduct' smart constructor.
20622382data InAppProduct = InAppProduct'
@@ -2404,6 +2724,37 @@ instance ToJSON APKsListResponse where
24042724 [Just ("kind" .= _apklrKind),
24052725 ("apks" .=) <$> _apklrAPKs])
24062726
2727+--
2728+-- /See:/ 'reviewsReplyResponse' smart constructor.
2729+newtype ReviewsReplyResponse = ReviewsReplyResponse'
2730+ { _rrrResult :: Maybe ReviewReplyResult
2731+ } deriving (Eq,Show,Data,Typeable,Generic)
2732+
2733+-- | Creates a value of 'ReviewsReplyResponse' with the minimum fields required to make a request.
2734+--
2735+-- Use one of the following lenses to modify other fields as desired:
2736+--
2737+-- * 'rrrResult'
2738+reviewsReplyResponse
2739+ :: ReviewsReplyResponse
2740+reviewsReplyResponse =
2741+ ReviewsReplyResponse'
2742+ { _rrrResult = Nothing
2743+ }
2744+
2745+rrrResult :: Lens' ReviewsReplyResponse (Maybe ReviewReplyResult)
2746+rrrResult
2747+ = lens _rrrResult (\ s a -> s{_rrrResult = a})
2748+
2749+instance FromJSON ReviewsReplyResponse where
2750+ parseJSON
2751+ = withObject "ReviewsReplyResponse"
2752+ (\ o -> ReviewsReplyResponse' <$> (o .:? "result"))
2753+
2754+instance ToJSON ReviewsReplyResponse where
2755+ toJSON ReviewsReplyResponse'{..}
2756+ = object (catMaybes [("result" .=) <$> _rrrResult])
2757+
24072758-- | A permission used by this APK.
24082759--
24092760-- /See:/ 'externallyHostedAPKUsesPermission' smart constructor.
@@ -2636,6 +2987,53 @@ instance ToJSON EntitlementsListResponse where
26362987 ("pageInfo" .=) <$> _elrPageInfo,
26372988 ("resources" .=) <$> _elrResources])
26382989
2990+--
2991+-- /See:/ 'comment' smart constructor.
2992+data Comment = Comment'
2993+ { _cUserComment :: !(Maybe UserComment)
2994+ , _cDeveloperComment :: !(Maybe DeveloperComment)
2995+ } deriving (Eq,Show,Data,Typeable,Generic)
2996+
2997+-- | Creates a value of 'Comment' with the minimum fields required to make a request.
2998+--
2999+-- Use one of the following lenses to modify other fields as desired:
3000+--
3001+-- * 'cUserComment'
3002+--
3003+-- * 'cDeveloperComment'
3004+comment
3005+ :: Comment
3006+comment =
3007+ Comment'
3008+ { _cUserComment = Nothing
3009+ , _cDeveloperComment = Nothing
3010+ }
3011+
3012+-- | A comment from a user.
3013+cUserComment :: Lens' Comment (Maybe UserComment)
3014+cUserComment
3015+ = lens _cUserComment (\ s a -> s{_cUserComment = a})
3016+
3017+-- | A comment from a developer.
3018+cDeveloperComment :: Lens' Comment (Maybe DeveloperComment)
3019+cDeveloperComment
3020+ = lens _cDeveloperComment
3021+ (\ s a -> s{_cDeveloperComment = a})
3022+
3023+instance FromJSON Comment where
3024+ parseJSON
3025+ = withObject "Comment"
3026+ (\ o ->
3027+ Comment' <$>
3028+ (o .:? "userComment") <*> (o .:? "developerComment"))
3029+
3030+instance ToJSON Comment where
3031+ toJSON Comment'{..}
3032+ = object
3033+ (catMaybes
3034+ [("userComment" .=) <$> _cUserComment,
3035+ ("developerComment" .=) <$> _cDeveloperComment])
3036+
26393037--
26403038-- /See:/ 'inAppProductsUpdateRequest' smart constructor.
26413039newtype InAppProductsUpdateRequest = InAppProductsUpdateRequest'
@@ -2671,6 +3069,97 @@ instance ToJSON InAppProductsUpdateRequest where
26713069 = object
26723070 (catMaybes [("inappproduct" .=) <$> _inInAppProduct])
26733071
3072+--
3073+-- /See:/ 'timestamp' smart constructor.
3074+data Timestamp = Timestamp'
3075+ { _tNanos :: !(Maybe (Textual Int32))
3076+ , _tSeconds :: !(Maybe (Textual Int64))
3077+ } deriving (Eq,Show,Data,Typeable,Generic)
3078+
3079+-- | Creates a value of 'Timestamp' with the minimum fields required to make a request.
3080+--
3081+-- Use one of the following lenses to modify other fields as desired:
3082+--
3083+-- * 'tNanos'
3084+--
3085+-- * 'tSeconds'
3086+timestamp
3087+ :: Timestamp
3088+timestamp =
3089+ Timestamp'
3090+ { _tNanos = Nothing
3091+ , _tSeconds = Nothing
3092+ }
3093+
3094+tNanos :: Lens' Timestamp (Maybe Int32)
3095+tNanos
3096+ = lens _tNanos (\ s a -> s{_tNanos = a}) .
3097+ mapping _Coerce
3098+
3099+tSeconds :: Lens' Timestamp (Maybe Int64)
3100+tSeconds
3101+ = lens _tSeconds (\ s a -> s{_tSeconds = a}) .
3102+ mapping _Coerce
3103+
3104+instance FromJSON Timestamp where
3105+ parseJSON
3106+ = withObject "Timestamp"
3107+ (\ o ->
3108+ Timestamp' <$> (o .:? "nanos") <*> (o .:? "seconds"))
3109+
3110+instance ToJSON Timestamp where
3111+ toJSON Timestamp'{..}
3112+ = object
3113+ (catMaybes
3114+ [("nanos" .=) <$> _tNanos,
3115+ ("seconds" .=) <$> _tSeconds])
3116+
3117+--
3118+-- /See:/ 'reviewReplyResult' smart constructor.
3119+data ReviewReplyResult = ReviewReplyResult'
3120+ { _rReplyText :: !(Maybe Text)
3121+ , _rLastEdited :: !(Maybe Timestamp)
3122+ } deriving (Eq,Show,Data,Typeable,Generic)
3123+
3124+-- | Creates a value of 'ReviewReplyResult' with the minimum fields required to make a request.
3125+--
3126+-- Use one of the following lenses to modify other fields as desired:
3127+--
3128+-- * 'rReplyText'
3129+--
3130+-- * 'rLastEdited'
3131+reviewReplyResult
3132+ :: ReviewReplyResult
3133+reviewReplyResult =
3134+ ReviewReplyResult'
3135+ { _rReplyText = Nothing
3136+ , _rLastEdited = Nothing
3137+ }
3138+
3139+-- | The reply text that was applied.
3140+rReplyText :: Lens' ReviewReplyResult (Maybe Text)
3141+rReplyText
3142+ = lens _rReplyText (\ s a -> s{_rReplyText = a})
3143+
3144+-- | The time at which the reply took effect.
3145+rLastEdited :: Lens' ReviewReplyResult (Maybe Timestamp)
3146+rLastEdited
3147+ = lens _rLastEdited (\ s a -> s{_rLastEdited = a})
3148+
3149+instance FromJSON ReviewReplyResult where
3150+ parseJSON
3151+ = withObject "ReviewReplyResult"
3152+ (\ o ->
3153+ ReviewReplyResult' <$>
3154+ (o .:? "replyText") <*> (o .:? "lastEdited"))
3155+
3156+instance ToJSON ReviewReplyResult where
3157+ toJSON ReviewReplyResult'{..}
3158+ = object
3159+ (catMaybes
3160+ [("replyText" .=) <$> _rReplyText,
3161+ ("lastEdited" .=) <$> _rLastEdited])
3162+
26743163-- | An Entitlement resource indicates a user\'s current entitlement to an
26753164-- inapp item or subscription.
26763165--
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/Get.hsnew file+99
@@ -0,0 +1,99 @@
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.AndroidPublisher.Reviews.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+-- Returns a single review.
24+--
25+-- /See:/ <https://developers.google.com/android-publisher Google Play Developer API Reference> for @androidpublisher.reviews.get@.
26+module Network.Google.Resource.AndroidPublisher.Reviews.Get
27+ (
28+ -- * REST Resource
29+ ReviewsGetResource
30+
31+ -- * Creating a Request
32+ , reviewsGet
33+ , ReviewsGet
34+
35+ -- * Request Lenses
36+ , rgReviewId
37+ , rgPackageName
38+ ) where
39+
40+import Network.Google.AndroidPublisher.Types
41+import Network.Google.Prelude
42+
43+-- | A resource alias for @androidpublisher.reviews.get@ method which the
44+-- 'ReviewsGet' request conforms to.
45+type ReviewsGetResource =
46+ "androidpublisher" :>
47+ "v2" :>
48+ "applications" :>
49+ Capture "packageName" Text :>
50+ "reviews" :>
51+ Capture "reviewId" Text :>
52+ QueryParam "alt" AltJSON :> Get '[JSON] Review
53+
54+-- | Returns a single review.
55+--
56+-- /See:/ 'reviewsGet' smart constructor.
57+data ReviewsGet = ReviewsGet'
58+ { _rgReviewId :: !Text
59+ , _rgPackageName :: !Text
60+ } deriving (Eq,Show,Data,Typeable,Generic)
61+
62+-- | Creates a value of 'ReviewsGet' 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+-- * 'rgReviewId'
67+--
68+-- * 'rgPackageName'
69+reviewsGet
70+ :: Text -- ^ 'rgReviewId'
71+ -> Text -- ^ 'rgPackageName'
72+ -> ReviewsGet
73+reviewsGet pRgReviewId_ pRgPackageName_ =
74+ ReviewsGet'
75+ { _rgReviewId = pRgReviewId_
76+ , _rgPackageName = pRgPackageName_
77+ }
78+
79+rgReviewId :: Lens' ReviewsGet Text
80+rgReviewId
81+ = lens _rgReviewId (\ s a -> s{_rgReviewId = a})
82+
83+-- | Unique identifier for the Android app for which we want reviews; for
84+-- example, \"com.spiffygame\".
85+rgPackageName :: Lens' ReviewsGet Text
86+rgPackageName
87+ = lens _rgPackageName
88+ (\ s a -> s{_rgPackageName = a})
89+
90+instance GoogleRequest ReviewsGet where
91+ type Rs ReviewsGet = Review
92+ type Scopes ReviewsGet =
93+ '["https://www.googleapis.com/auth/androidpublisher"]
94+ requestClient ReviewsGet'{..}
95+ = go _rgPackageName _rgReviewId (Just AltJSON)
96+ androidPublisherService
97+ where go
98+ = buildClient (Proxy :: Proxy ReviewsGetResource)
99+ mempty
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/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.AndroidPublisher.Reviews.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+-- Returns a list of reviews.
24+--
25+-- /See:/ <https://developers.google.com/android-publisher Google Play Developer API Reference> for @androidpublisher.reviews.list@.
26+module Network.Google.Resource.AndroidPublisher.Reviews.List
27+ (
28+ -- * REST Resource
29+ ReviewsListResource
30+
31+ -- * Creating a Request
32+ , reviewsList
33+ , ReviewsList
34+
35+ -- * Request Lenses
36+ , rlPackageName
37+ , rlToken
38+ , rlStartIndex
39+ , rlMaxResults
40+ ) where
41+
42+import Network.Google.AndroidPublisher.Types
43+import Network.Google.Prelude
44+
45+-- | A resource alias for @androidpublisher.reviews.list@ method which the
46+-- 'ReviewsList' request conforms to.
47+type ReviewsListResource =
48+ "androidpublisher" :>
49+ "v2" :>
50+ "applications" :>
51+ Capture "packageName" Text :>
52+ "reviews" :>
53+ QueryParam "token" Text :>
54+ QueryParam "startIndex" (Textual Word32) :>
55+ QueryParam "maxResults" (Textual Word32) :>
56+ QueryParam "alt" AltJSON :>
57+ Get '[JSON] ReviewsListResponse
58+
59+-- | Returns a list of reviews.
60+--
61+-- /See:/ 'reviewsList' smart constructor.
62+data ReviewsList = ReviewsList'
63+ { _rlPackageName :: !Text
64+ , _rlToken :: !(Maybe Text)
65+ , _rlStartIndex :: !(Maybe (Textual Word32))
66+ , _rlMaxResults :: !(Maybe (Textual Word32))
67+ } deriving (Eq,Show,Data,Typeable,Generic)
68+
69+-- | Creates a value of 'ReviewsList' 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+-- * 'rlPackageName'
74+--
75+-- * 'rlToken'
76+--
77+-- * 'rlStartIndex'
78+--
79+-- * 'rlMaxResults'
80+reviewsList
81+ :: Text -- ^ 'rlPackageName'
82+ -> ReviewsList
83+reviewsList pRlPackageName_ =
84+ ReviewsList'
85+ { _rlPackageName = pRlPackageName_
86+ , _rlToken = Nothing
87+ , _rlStartIndex = Nothing
88+ , _rlMaxResults = Nothing
89+ }
90+
91+-- | Unique identifier for the Android app for which we want reviews; for
92+-- example, \"com.spiffygame\".
93+rlPackageName :: Lens' ReviewsList Text
94+rlPackageName
95+ = lens _rlPackageName
96+ (\ s a -> s{_rlPackageName = a})
97+
98+rlToken :: Lens' ReviewsList (Maybe Text)
99+rlToken = lens _rlToken (\ s a -> s{_rlToken = a})
100+
101+rlStartIndex :: Lens' ReviewsList (Maybe Word32)
102+rlStartIndex
103+ = lens _rlStartIndex (\ s a -> s{_rlStartIndex = a})
104+ . mapping _Coerce
105+
106+rlMaxResults :: Lens' ReviewsList (Maybe Word32)
107+rlMaxResults
108+ = lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
109+ . mapping _Coerce
110+
111+instance GoogleRequest ReviewsList where
112+ type Rs ReviewsList = ReviewsListResponse
113+ type Scopes ReviewsList =
114+ '["https://www.googleapis.com/auth/androidpublisher"]
115+ requestClient ReviewsList'{..}
116+ = go _rlPackageName _rlToken _rlStartIndex
117+ _rlMaxResults
118+ (Just AltJSON)
119+ androidPublisherService
120+ where go
121+ = buildClient (Proxy :: Proxy ReviewsListResource)
122+ mempty
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Reviews/Reply.hsnew file+113
@@ -0,0 +1,113 @@
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.AndroidPublisher.Reviews.Reply
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+-- Reply to a single review, or update an existing reply.
24+--
25+-- /See:/ <https://developers.google.com/android-publisher Google Play Developer API Reference> for @androidpublisher.reviews.reply@.
26+module Network.Google.Resource.AndroidPublisher.Reviews.Reply
27+ (
28+ -- * REST Resource
29+ ReviewsReplyResource
30+
31+ -- * Creating a Request
32+ , reviewsReply
33+ , ReviewsReply
34+
35+ -- * Request Lenses
36+ , rrReviewId
37+ , rrPackageName
38+ , rrPayload
39+ ) where
40+
41+import Network.Google.AndroidPublisher.Types
42+import Network.Google.Prelude
43+
44+-- | A resource alias for @androidpublisher.reviews.reply@ method which the
45+-- 'ReviewsReply' request conforms to.
46+type ReviewsReplyResource =
47+ "androidpublisher" :>
48+ "v2" :>
49+ "applications" :>
50+ Capture "packageName" Text :>
51+ "reviews" :>
52+ CaptureMode "reviewId" "reply" Text :>
53+ QueryParam "alt" AltJSON :>
54+ ReqBody '[JSON] ReviewsReplyRequest :>
55+ Post '[JSON] ReviewsReplyResponse
56+
57+-- | Reply to a single review, or update an existing reply.
58+--
59+-- /See:/ 'reviewsReply' smart constructor.
60+data ReviewsReply = ReviewsReply'
61+ { _rrReviewId :: !Text
62+ , _rrPackageName :: !Text
63+ , _rrPayload :: !ReviewsReplyRequest
64+ } deriving (Eq,Show,Data,Typeable,Generic)
65+
66+-- | Creates a value of 'ReviewsReply' 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+-- * 'rrReviewId'
71+--
72+-- * 'rrPackageName'
73+--
74+-- * 'rrPayload'
75+reviewsReply
76+ :: Text -- ^ 'rrReviewId'
77+ -> Text -- ^ 'rrPackageName'
78+ -> ReviewsReplyRequest -- ^ 'rrPayload'
79+ -> ReviewsReply
80+reviewsReply pRrReviewId_ pRrPackageName_ pRrPayload_ =
81+ ReviewsReply'
82+ { _rrReviewId = pRrReviewId_
83+ , _rrPackageName = pRrPackageName_
84+ , _rrPayload = pRrPayload_
85+ }
86+
87+rrReviewId :: Lens' ReviewsReply Text
88+rrReviewId
89+ = lens _rrReviewId (\ s a -> s{_rrReviewId = a})
90+
91+-- | Unique identifier for the Android app for which we want reviews; for
92+-- example, \"com.spiffygame\".
93+rrPackageName :: Lens' ReviewsReply Text
94+rrPackageName
95+ = lens _rrPackageName
96+ (\ s a -> s{_rrPackageName = a})
97+
98+-- | Multipart request metadata.
99+rrPayload :: Lens' ReviewsReply ReviewsReplyRequest
100+rrPayload
101+ = lens _rrPayload (\ s a -> s{_rrPayload = a})
102+
103+instance GoogleRequest ReviewsReply where
104+ type Rs ReviewsReply = ReviewsReplyResponse
105+ type Scopes ReviewsReply =
106+ '["https://www.googleapis.com/auth/androidpublisher"]
107+ requestClient ReviewsReply'{..}
108+ = go _rrPackageName _rrReviewId (Just AltJSON)
109+ _rrPayload
110+ androidPublisherService
111+ where go
112+ = buildClient (Proxy :: Proxy ReviewsReplyResource)
113+ mempty
gogol-android-publisher/gogol-android-publisher.cabal+3
@@ -87,6 +87,9 @@ library
8787 , Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Get
8888 , Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Refund
8989 , Network.Google.Resource.AndroidPublisher.Purchases.Subscriptions.Revoke
90+ , Network.Google.Resource.AndroidPublisher.Reviews.Get
91+ , Network.Google.Resource.AndroidPublisher.Reviews.List
92+ , Network.Google.Resource.AndroidPublisher.Reviews.Reply
9093
9194 other-modules:
9295 Network.Google.AndroidPublisher.Types.Product