{-# 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.DFAReporting.PostalCodes.Get
(
PostalCodesGetResource
, postalCodesGet
, PostalCodesGet
, pcgProFileId
, pcgCode
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PostalCodesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"postalCodes" :>
Capture "code" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] PostalCode
data PostalCodesGet = PostalCodesGet'
{ _pcgProFileId :: !(Textual Int64)
, _pcgCode :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
postalCodesGet
:: Int64
-> Text
-> PostalCodesGet
postalCodesGet pPcgProFileId_ pPcgCode_ =
PostalCodesGet'
{ _pcgProFileId = _Coerce # pPcgProFileId_
, _pcgCode = pPcgCode_
}
pcgProFileId :: Lens' PostalCodesGet Int64
pcgProFileId
= lens _pcgProFileId (\ s a -> s{_pcgProFileId = a})
. _Coerce
pcgCode :: Lens' PostalCodesGet Text
pcgCode = lens _pcgCode (\ s a -> s{_pcgCode = a})
instance GoogleRequest PostalCodesGet where
type Rs PostalCodesGet = PostalCode
type Scopes PostalCodesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PostalCodesGet'{..}
= go _pcgProFileId _pcgCode (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy PostalCodesGetResource)
mempty