{-# 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.Content.Accountstatuses.Get
(
AccountstatusesGetResource
, accountstatusesGet
, AccountstatusesGet
, aaMerchantId
, aaAccountId
, aaDestinations
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type AccountstatusesGetResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"accountstatuses" :>
Capture "accountId" (Textual Word64) :>
QueryParams "destinations" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] AccountStatus
data AccountstatusesGet = AccountstatusesGet'
{ _aaMerchantId :: !(Textual Word64)
, _aaAccountId :: !(Textual Word64)
, _aaDestinations :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
accountstatusesGet
:: Word64
-> Word64
-> AccountstatusesGet
accountstatusesGet pAaMerchantId_ pAaAccountId_ =
AccountstatusesGet'
{ _aaMerchantId = _Coerce # pAaMerchantId_
, _aaAccountId = _Coerce # pAaAccountId_
, _aaDestinations = Nothing
}
aaMerchantId :: Lens' AccountstatusesGet Word64
aaMerchantId
= lens _aaMerchantId (\ s a -> s{_aaMerchantId = a})
. _Coerce
aaAccountId :: Lens' AccountstatusesGet Word64
aaAccountId
= lens _aaAccountId (\ s a -> s{_aaAccountId = a}) .
_Coerce
aaDestinations :: Lens' AccountstatusesGet [Text]
aaDestinations
= lens _aaDestinations
(\ s a -> s{_aaDestinations = a})
. _Default
. _Coerce
instance GoogleRequest AccountstatusesGet where
type Rs AccountstatusesGet = AccountStatus
type Scopes AccountstatusesGet =
'["https://www.googleapis.com/auth/content"]
requestClient AccountstatusesGet'{..}
= go _aaMerchantId _aaAccountId
(_aaDestinations ^. _Default)
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy AccountstatusesGetResource)
mempty