{-# 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.Countries.Get
    (
    
      CountriesGetResource
    
    , countriesGet
    , CountriesGet
    
    , cgProFileId
    , cgDartId
    ) where
import           Network.Google.DFAReporting.Types
import           Network.Google.Prelude
type CountriesGetResource =
     "dfareporting" :>
       "v3.2" :>
         "userprofiles" :>
           Capture "profileId" (Textual Int64) :>
             "countries" :>
               Capture "dartId" (Textual Int64) :>
                 QueryParam "alt" AltJSON :> Get '[JSON] Country
data CountriesGet = CountriesGet'
    { _cgProFileId :: !(Textual Int64)
    , _cgDartId    :: !(Textual Int64)
    } deriving (Eq,Show,Data,Typeable,Generic)
countriesGet
    :: Int64 
    -> Int64 
    -> CountriesGet
countriesGet pCgProFileId_ pCgDartId_ =
    CountriesGet'
    { _cgProFileId = _Coerce # pCgProFileId_
    , _cgDartId = _Coerce # pCgDartId_
    }
cgProFileId :: Lens' CountriesGet Int64
cgProFileId
  = lens _cgProFileId (\ s a -> s{_cgProFileId = a}) .
      _Coerce
cgDartId :: Lens' CountriesGet Int64
cgDartId
  = lens _cgDartId (\ s a -> s{_cgDartId = a}) .
      _Coerce
instance GoogleRequest CountriesGet where
        type Rs CountriesGet = Country
        type Scopes CountriesGet =
             '["https://www.googleapis.com/auth/dfatrafficking"]
        requestClient CountriesGet'{..}
          = go _cgProFileId _cgDartId (Just AltJSON)
              dFAReportingService
          where go
                  = buildClient (Proxy :: Proxy CountriesGetResource)
                      mempty