{-# 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.AdExchangeBuyer.Creatives.Insert
(
CreativesInsertResource
, creativesInsert
, CreativesInsert
, ciPayload
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type CreativesInsertResource =
"adexchangebuyer" :>
"v1.4" :>
"creatives" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Creative :> Post '[JSON] Creative
newtype CreativesInsert = CreativesInsert'
{ _ciPayload :: Creative
} deriving (Eq,Show,Data,Typeable,Generic)
creativesInsert
:: Creative
-> CreativesInsert
creativesInsert pCiPayload_ =
CreativesInsert'
{ _ciPayload = pCiPayload_
}
ciPayload :: Lens' CreativesInsert Creative
ciPayload
= lens _ciPayload (\ s a -> s{_ciPayload = a})
instance GoogleRequest CreativesInsert where
type Rs CreativesInsert = Creative
type Scopes CreativesInsert =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient CreativesInsert'{..}
= go (Just AltJSON) _ciPayload adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy CreativesInsertResource)
mempty