{-# 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.Proposals.Insert
(
ProposalsInsertResource
, proposalsInsert
, ProposalsInsert
, piPayload
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type ProposalsInsertResource =
"adexchangebuyer" :>
"v1.4" :>
"proposals" :>
"insert" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateOrdersRequest :>
Post '[JSON] CreateOrdersResponse
newtype ProposalsInsert = ProposalsInsert'
{ _piPayload :: CreateOrdersRequest
} deriving (Eq,Show,Data,Typeable,Generic)
proposalsInsert
:: CreateOrdersRequest
-> ProposalsInsert
proposalsInsert pPiPayload_ =
ProposalsInsert'
{ _piPayload = pPiPayload_
}
piPayload :: Lens' ProposalsInsert CreateOrdersRequest
piPayload
= lens _piPayload (\ s a -> s{_piPayload = a})
instance GoogleRequest ProposalsInsert where
type Rs ProposalsInsert = CreateOrdersResponse
type Scopes ProposalsInsert =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient ProposalsInsert'{..}
= go (Just AltJSON) _piPayload adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy ProposalsInsertResource)
mempty