{-# 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.Get
(
ReviewsGetResource
, reviewsGet
, ReviewsGet
, rgReviewId
, rgPackageName
, rgTranslationLanguage
) where
import Network.Google.AndroidPublisher.Types
import Network.Google.Prelude
type ReviewsGetResource =
"androidpublisher" :>
"v3" :>
"applications" :>
Capture "packageName" Text :>
"reviews" :>
Capture "reviewId" Text :>
QueryParam "translationLanguage" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Review
data ReviewsGet = ReviewsGet'
{ _rgReviewId :: !Text
, _rgPackageName :: !Text
, _rgTranslationLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
reviewsGet
:: Text
-> Text
-> ReviewsGet
reviewsGet pRgReviewId_ pRgPackageName_ =
ReviewsGet'
{ _rgReviewId = pRgReviewId_
, _rgPackageName = pRgPackageName_
, _rgTranslationLanguage = Nothing
}
rgReviewId :: Lens' ReviewsGet Text
rgReviewId
= lens _rgReviewId (\ s a -> s{_rgReviewId = a})
rgPackageName :: Lens' ReviewsGet Text
rgPackageName
= lens _rgPackageName
(\ s a -> s{_rgPackageName = a})
rgTranslationLanguage :: Lens' ReviewsGet (Maybe Text)
rgTranslationLanguage
= lens _rgTranslationLanguage
(\ s a -> s{_rgTranslationLanguage = a})
instance GoogleRequest ReviewsGet where
type Rs ReviewsGet = Review
type Scopes ReviewsGet =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient ReviewsGet'{..}
= go _rgPackageName _rgReviewId
_rgTranslationLanguage
(Just AltJSON)
androidPublisherService
where go
= buildClient (Proxy :: Proxy ReviewsGetResource)
mempty