{-# 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.AdSenseHost.AssociationSessions.Start
(
AssociationSessionsStartResource
, associationSessionsStart
, AssociationSessionsStart
, assWebsiteLocale
, assUserLocale
, assWebsiteURL
, assProductCode
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type AssociationSessionsStartResource =
"adsensehost" :>
"v4.1" :>
"associationsessions" :>
"start" :>
QueryParams "productCode"
AssociationSessionsStartProductCode
:>
QueryParam "websiteUrl" Text :>
QueryParam "websiteLocale" Text :>
QueryParam "userLocale" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] AssociationSession
data AssociationSessionsStart = AssociationSessionsStart'
{ _assWebsiteLocale :: !(Maybe Text)
, _assUserLocale :: !(Maybe Text)
, _assWebsiteURL :: !Text
, _assProductCode :: ![AssociationSessionsStartProductCode]
} deriving (Eq,Show,Data,Typeable,Generic)
associationSessionsStart
:: Text
-> [AssociationSessionsStartProductCode]
-> AssociationSessionsStart
associationSessionsStart pAssWebsiteURL_ pAssProductCode_ =
AssociationSessionsStart'
{ _assWebsiteLocale = Nothing
, _assUserLocale = Nothing
, _assWebsiteURL = pAssWebsiteURL_
, _assProductCode = _Coerce # pAssProductCode_
}
assWebsiteLocale :: Lens' AssociationSessionsStart (Maybe Text)
assWebsiteLocale
= lens _assWebsiteLocale
(\ s a -> s{_assWebsiteLocale = a})
assUserLocale :: Lens' AssociationSessionsStart (Maybe Text)
assUserLocale
= lens _assUserLocale
(\ s a -> s{_assUserLocale = a})
assWebsiteURL :: Lens' AssociationSessionsStart Text
assWebsiteURL
= lens _assWebsiteURL
(\ s a -> s{_assWebsiteURL = a})
assProductCode :: Lens' AssociationSessionsStart [AssociationSessionsStartProductCode]
assProductCode
= lens _assProductCode
(\ s a -> s{_assProductCode = a})
. _Coerce
instance GoogleRequest AssociationSessionsStart where
type Rs AssociationSessionsStart = AssociationSession
type Scopes AssociationSessionsStart =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient AssociationSessionsStart'{..}
= go _assProductCode (Just _assWebsiteURL)
_assWebsiteLocale
_assUserLocale
(Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy AssociationSessionsStartResource)
mempty