{-# 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.Partners.Offers.List
(
OffersListResource
, offersList
, OffersList
, olXgafv
, olUploadProtocol
, olAccessToken
, olUploadType
, olRequestMetadataPartnersSessionId
, olRequestMetadataLocale
, olRequestMetadataExperimentIds
, olRequestMetadataUserOverridesIPAddress
, olRequestMetadataTrafficSourceTrafficSubId
, olRequestMetadataUserOverridesUserId
, olRequestMetadataTrafficSourceTrafficSourceId
, olCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type OffersListResource =
"v2" :>
"offers" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "requestMetadata.partnersSessionId" Text
:>
QueryParam "requestMetadata.locale" Text :>
QueryParams "requestMetadata.experimentIds" Text :>
QueryParam "requestMetadata.userOverrides.ipAddress"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSubId"
Text
:>
QueryParam "requestMetadata.userOverrides.userId"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSourceId"
Text
:>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListOffersResponse
data OffersList = OffersList'
{ _olXgafv :: !(Maybe Xgafv)
, _olUploadProtocol :: !(Maybe Text)
, _olAccessToken :: !(Maybe Text)
, _olUploadType :: !(Maybe Text)
, _olRequestMetadataPartnersSessionId :: !(Maybe Text)
, _olRequestMetadataLocale :: !(Maybe Text)
, _olRequestMetadataExperimentIds :: !(Maybe [Text])
, _olRequestMetadataUserOverridesIPAddress :: !(Maybe Text)
, _olRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text)
, _olRequestMetadataUserOverridesUserId :: !(Maybe Text)
, _olRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text)
, _olCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
offersList
:: OffersList
offersList =
OffersList'
{ _olXgafv = Nothing
, _olUploadProtocol = Nothing
, _olAccessToken = Nothing
, _olUploadType = Nothing
, _olRequestMetadataPartnersSessionId = Nothing
, _olRequestMetadataLocale = Nothing
, _olRequestMetadataExperimentIds = Nothing
, _olRequestMetadataUserOverridesIPAddress = Nothing
, _olRequestMetadataTrafficSourceTrafficSubId = Nothing
, _olRequestMetadataUserOverridesUserId = Nothing
, _olRequestMetadataTrafficSourceTrafficSourceId = Nothing
, _olCallback = Nothing
}
olXgafv :: Lens' OffersList (Maybe Xgafv)
olXgafv = lens _olXgafv (\ s a -> s{_olXgafv = a})
olUploadProtocol :: Lens' OffersList (Maybe Text)
olUploadProtocol
= lens _olUploadProtocol
(\ s a -> s{_olUploadProtocol = a})
olAccessToken :: Lens' OffersList (Maybe Text)
olAccessToken
= lens _olAccessToken
(\ s a -> s{_olAccessToken = a})
olUploadType :: Lens' OffersList (Maybe Text)
olUploadType
= lens _olUploadType (\ s a -> s{_olUploadType = a})
olRequestMetadataPartnersSessionId :: Lens' OffersList (Maybe Text)
olRequestMetadataPartnersSessionId
= lens _olRequestMetadataPartnersSessionId
(\ s a -> s{_olRequestMetadataPartnersSessionId = a})
olRequestMetadataLocale :: Lens' OffersList (Maybe Text)
olRequestMetadataLocale
= lens _olRequestMetadataLocale
(\ s a -> s{_olRequestMetadataLocale = a})
olRequestMetadataExperimentIds :: Lens' OffersList [Text]
olRequestMetadataExperimentIds
= lens _olRequestMetadataExperimentIds
(\ s a -> s{_olRequestMetadataExperimentIds = a})
. _Default
. _Coerce
olRequestMetadataUserOverridesIPAddress :: Lens' OffersList (Maybe Text)
olRequestMetadataUserOverridesIPAddress
= lens _olRequestMetadataUserOverridesIPAddress
(\ s a ->
s{_olRequestMetadataUserOverridesIPAddress = a})
olRequestMetadataTrafficSourceTrafficSubId :: Lens' OffersList (Maybe Text)
olRequestMetadataTrafficSourceTrafficSubId
= lens _olRequestMetadataTrafficSourceTrafficSubId
(\ s a ->
s{_olRequestMetadataTrafficSourceTrafficSubId = a})
olRequestMetadataUserOverridesUserId :: Lens' OffersList (Maybe Text)
olRequestMetadataUserOverridesUserId
= lens _olRequestMetadataUserOverridesUserId
(\ s a ->
s{_olRequestMetadataUserOverridesUserId = a})
olRequestMetadataTrafficSourceTrafficSourceId :: Lens' OffersList (Maybe Text)
olRequestMetadataTrafficSourceTrafficSourceId
= lens _olRequestMetadataTrafficSourceTrafficSourceId
(\ s a ->
s{_olRequestMetadataTrafficSourceTrafficSourceId =
a})
olCallback :: Lens' OffersList (Maybe Text)
olCallback
= lens _olCallback (\ s a -> s{_olCallback = a})
instance GoogleRequest OffersList where
type Rs OffersList = ListOffersResponse
type Scopes OffersList = '[]
requestClient OffersList'{..}
= go _olXgafv _olUploadProtocol _olAccessToken
_olUploadType
_olRequestMetadataPartnersSessionId
_olRequestMetadataLocale
(_olRequestMetadataExperimentIds ^. _Default)
_olRequestMetadataUserOverridesIPAddress
_olRequestMetadataTrafficSourceTrafficSubId
_olRequestMetadataUserOverridesUserId
_olRequestMetadataTrafficSourceTrafficSourceId
_olCallback
(Just AltJSON)
partnersService
where go
= buildClient (Proxy :: Proxy OffersListResource)
mempty