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