{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.AndroidPublisher.Reviews.Reply
(
ReviewsReplyResource
, reviewsReply
, ReviewsReply
, rrReviewId
, rrPackageName
, rrPayload
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type ReviewsReplyResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"reviews" :>
CaptureMode "reviewId" "reply" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ReviewsReplyRequest :>
Post '[JSON] ReviewsReplyResponse
data ReviewsReply = ReviewsReply'
{ _rrReviewId :: !Text
, _rrPackageName :: !Text
, _rrPayload :: !ReviewsReplyRequest
} deriving (Eq,Show,Data,Typeable,Generic)
reviewsReply
:: Text
-> Text
-> ReviewsReplyRequest
-> ReviewsReply
reviewsReply pRrReviewId_ pRrPackageName_ pRrPayload_ =
ReviewsReply'
{ _rrReviewId = pRrReviewId_
, _rrPackageName = pRrPackageName_
, _rrPayload = pRrPayload_
}
rrReviewId :: Lens' ReviewsReply Text
rrReviewId
= lens _rrReviewId (\ s a -> s{_rrReviewId = a})
rrPackageName :: Lens' ReviewsReply Text
rrPackageName
= lens _rrPackageName
(\ s a -> s{_rrPackageName = a})
rrPayload :: Lens' ReviewsReply ReviewsReplyRequest
rrPayload
= lens _rrPayload (\ s a -> s{_rrPayload = a})
instance GoogleRequest ReviewsReply where
type Rs ReviewsReply = ReviewsReplyResponse
type Scopes ReviewsReply =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient ReviewsReply'{..}
= go _rrPackageName _rrReviewId (Just AltJSON)
_rrPayload
androidPublisherService
where go
= buildClient (Proxy :: Proxy ReviewsReplyResource)
mempty