{-# 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.Sizes.Insert
(
SizesInsertResource
, sizesInsert
, SizesInsert
, siProFileId
, siPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type SizesInsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"sizes" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Size :> Post '[JSON] Size
data SizesInsert = SizesInsert'
{ _siProFileId :: !(Textual Int64)
, _siPayload :: !Size
} deriving (Eq,Show,Data,Typeable,Generic)
sizesInsert
:: Int64
-> Size
-> SizesInsert
sizesInsert pSiProFileId_ pSiPayload_ =
SizesInsert'
{ _siProFileId = _Coerce # pSiProFileId_
, _siPayload = pSiPayload_
}
siProFileId :: Lens' SizesInsert Int64
siProFileId
= lens _siProFileId (\ s a -> s{_siProFileId = a}) .
_Coerce
siPayload :: Lens' SizesInsert Size
siPayload
= lens _siPayload (\ s a -> s{_siPayload = a})
instance GoogleRequest SizesInsert where
type Rs SizesInsert = Size
type Scopes SizesInsert =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient SizesInsert'{..}
= go _siProFileId (Just AltJSON) _siPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy SizesInsertResource)
mempty