{-# 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.Placements.Insert
(
PlacementsInsertResource
, placementsInsert
, PlacementsInsert
, piProFileId
, piPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type PlacementsInsertResource =
"dfareporting" :>
"v3.3" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"placements" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Placement :> Post '[JSON] Placement
data PlacementsInsert =
PlacementsInsert'
{ _piProFileId :: !(Textual Int64)
, _piPayload :: !Placement
}
deriving (Eq, Show, Data, Typeable, Generic)
placementsInsert
:: Int64
-> Placement
-> PlacementsInsert
placementsInsert pPiProFileId_ pPiPayload_ =
PlacementsInsert'
{_piProFileId = _Coerce # pPiProFileId_, _piPayload = pPiPayload_}
piProFileId :: Lens' PlacementsInsert Int64
piProFileId
= lens _piProFileId (\ s a -> s{_piProFileId = a}) .
_Coerce
piPayload :: Lens' PlacementsInsert Placement
piPayload
= lens _piPayload (\ s a -> s{_piPayload = a})
instance GoogleRequest PlacementsInsert where
type Rs PlacementsInsert = Placement
type Scopes PlacementsInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient PlacementsInsert'{..}
= go _piProFileId (Just AltJSON) _piPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy PlacementsInsertResource)
mempty