{-# 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.DoubleClickBidManager.Queries.RunQuery
(
QueriesRunQueryResource
, queriesRunQuery
, QueriesRunQuery
, qrqQueryId
, qrqPayload
) where
import Network.Google.DoubleClickBids.Types
import Network.Google.Prelude
type QueriesRunQueryResource =
"doubleclickbidmanager" :>
"v1" :>
"query" :>
Capture "queryId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RunQueryRequest :> Post '[JSON] ()
data QueriesRunQuery = QueriesRunQuery'
{ _qrqQueryId :: !(Textual Int64)
, _qrqPayload :: !RunQueryRequest
} deriving (Eq,Show,Data,Typeable,Generic)
queriesRunQuery
:: Int64
-> RunQueryRequest
-> QueriesRunQuery
queriesRunQuery pQrqQueryId_ pQrqPayload_ =
QueriesRunQuery'
{ _qrqQueryId = _Coerce # pQrqQueryId_
, _qrqPayload = pQrqPayload_
}
qrqQueryId :: Lens' QueriesRunQuery Int64
qrqQueryId
= lens _qrqQueryId (\ s a -> s{_qrqQueryId = a}) .
_Coerce
qrqPayload :: Lens' QueriesRunQuery RunQueryRequest
qrqPayload
= lens _qrqPayload (\ s a -> s{_qrqPayload = a})
instance GoogleRequest QueriesRunQuery where
type Rs QueriesRunQuery = ()
type Scopes QueriesRunQuery =
'["https://www.googleapis.com/auth/doubleclickbidmanager"]
requestClient QueriesRunQuery'{..}
= go _qrqQueryId (Just AltJSON) _qrqPayload
doubleClickBidsService
where go
= buildClient
(Proxy :: Proxy QueriesRunQueryResource)
mempty